/* Charleston Digital Defense — shared site styles (views/_layouts/master.jtml).
   Design language from the Sep 2026 PTA intake mockup: ink/paper palette,
   Barlow Condensed display, IBM Plex Mono labels, IBM Plex Sans body. */

:root {
  --ink: #101722;
  --paper: #e8e4d9;
  --panel: #f3f0e8;
  --line: #aaa99f;
  --muted: #667078;
  --cyan: #64c7cb;
  --rust: #dc6847;
  --lime: #c7d65a;
  --white: #fbfaf6;
  --display: 'Barlow Condensed', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --body: 'IBM Plex Sans', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 15px; }
a { color: inherit; }

.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 20; opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
}

/* ── Masthead / footer ─────────────────────────────────────────────────── */

.masthead {
  height: 74px; padding: 0 4vw; background: var(--ink); color: var(--white);
  display: flex; align-items: center; border-bottom: 1px solid #37414e; position: relative; z-index: 10;
}
.brand { display: flex; align-items: center; color: inherit; text-decoration: none; }
.brand img { display: block; height: 56px; width: auto; }
.status { margin-left: auto; font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.status span { display: inline-block; width: 7px; height: 7px; background: var(--lime); border-radius: 50%; margin-right: 8px; }
.save-state {
  border-left: 1px solid #37414e; color: #87929e; font: 10px var(--mono);
  margin-left: 28px; padding: 8px 0 8px 28px; min-width: 150px;
}
.save-state.error { color: var(--rust); }

.site-footer {
  background: var(--ink); color: #95a0a9; display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 12px 24px;
  padding: 40px 4vw; font: 10px var(--mono); text-transform: uppercase;
}
.site-footer strong { color: var(--white); }
.site-footer span:last-child { text-align: right; }
.site-footer a { color: inherit; }

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  min-height: 600px; background: var(--ink); color: var(--white); padding: 62px 4vw 72px;
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); position: relative; overflow: hidden;
}
.hero:after {
  content: ""; position: absolute; width: 420px; height: 420px; border: 1px solid #40505a;
  right: -110px; top: 80px; transform: rotate(45deg);
}
.hero-kicker {
  grid-column: 1/-1; border-top: 1px solid #3d4651; padding-top: 12px; display: flex; justify-content: space-between;
  font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: #95a0aa;
}
.hero h1 {
  font: 800 clamp(78px, 11vw, 172px)/.72 var(--display); letter-spacing: -.045em; text-transform: uppercase;
  margin: 90px 0 0; position: relative; z-index: 1;
}
.hero h1 em { font-style: normal; color: var(--cyan); }
.hero-copy { align-self: end; padding: 0 5vw 0 2vw; position: relative; z-index: 2; }
.hero-copy p { font-size: 17px; line-height: 1.65; color: #bac3ca; max-width: 490px; }
.start-link {
  display: flex; justify-content: space-between; color: var(--white); text-decoration: none; text-transform: uppercase;
  font: 600 12px var(--mono); border-bottom: 1px solid var(--cyan); padding: 15px 0; margin-top: 34px;
}
.start-link span { color: var(--cyan); font-size: 18px; }
.hero-index { position: absolute; right: 4vw; bottom: 28px; color: #52606c; font: 600 12px var(--mono); }

.process { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--lime); border-bottom: 1px solid var(--ink); }
.process div { padding: 24px 3vw; border-right: 1px solid rgba(16, 23, 34, .32); display: flex; gap: 18px; align-items: center; }
.process b { font: 600 10px var(--mono); }
.process span { font: 700 13px var(--display); text-transform: uppercase; letter-spacing: .08em; }

/* ── Shared type ───────────────────────────────────────────────────────── */

.eyebrow, .step-head > span { font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.step-head {
  display: grid; grid-template-columns: 1fr 1fr; align-items: end; border-bottom: 1px solid var(--line);
  padding-bottom: 30px; margin-bottom: 42px;
}
.step-head > span { grid-column: 1/-1; margin-bottom: 20px; }
.step-head h2 { font: 800 clamp(48px, 6vw, 83px)/.78 var(--display); text-transform: uppercase; letter-spacing: -.035em; margin: 0; }
.step-head p { max-width: 390px; color: var(--muted); line-height: 1.6; margin: 0; }

/* ── Buttons & form controls ───────────────────────────────────────────── */

.button {
  border: 1px solid var(--ink); min-height: 48px; padding: 0 20px; background: none; color: var(--ink);
  font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; cursor: pointer;
}
.button:active { transform: translate(2px, 2px); }
.button:disabled { opacity: .5; cursor: default; }
.button.primary {
  margin-left: auto; background: var(--ink); color: var(--white); min-width: 190px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.button.primary:hover:not(:disabled) { background: var(--rust); border-color: var(--rust); }
.button.small { min-height: 38px; padding: 0 14px; }
.text-button { border: 0; color: var(--muted); }
.link-button {
  background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer;
}

.field { display: grid; gap: 9px; align-content: start; }
.field.wide { grid-column: 1/-1; }
.field span { font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
input, select, textarea {
  width: 100%; border: 1px solid #b9b7ae; border-radius: 0; background: var(--white); padding: 14px 15px;
  color: var(--ink); font: 15px var(--body); outline: none; transition: border .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 100px; }
input, select { line-height: 20px; }
select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M0 0h14L7 9z' fill='%23101722'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center; background-size: 14px 9px;
}
select::-ms-expand { display: none; }
select:has(option[value=""]:checked) { color: var(--muted); }
select option { color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 4px 4px 0 var(--cyan); }
[aria-invalid="true"] { border-color: var(--rust); }
.honeypot { position: absolute; left: -9999px; }
[hidden] { display: none !important; }

/* ── Dialogs (native <dialog>) ─────────────────────────────────────────── */

dialog.cdd-dialog {
  border: 0; padding: 0; max-width: min(720px, calc(100vw - 32px)); width: 100%;
  background: var(--panel); color: var(--ink); box-shadow: 10px 10px 0 var(--ink);
}
dialog.cdd-dialog::backdrop { background: rgba(16, 23, 34, .72); }
.dialog-head {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  background: var(--ink); color: var(--white); padding: 18px 24px;
}
.dialog-head h3 { margin: 0; font: 800 28px/1 var(--display); text-transform: uppercase; letter-spacing: -.01em; }
.dialog-close { background: none; border: 0; color: var(--white); font: 24px/1 var(--mono); cursor: pointer; padding: 4px; }
.dialog-body { padding: 24px; max-height: 70vh; overflow: auto; line-height: 1.6; }
.dialog-body p:first-child { margin-top: 0; }
.dialog-note { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 4px; font-size: 14px; }
.dialog-note a { word-break: break-word; }
.dialog-actions { display: flex; gap: 12px; padding: 0 24px 24px; flex-wrap: wrap; }
.dialog-actions .button.primary { margin-left: 0; min-width: 0; }

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 850px) {
  .save-state { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 640px; }
  .hero h1 { margin-top: 100px; }
  .hero-copy { padding: 55px 0 0; align-self: start; max-width: 520px; }
  .process { grid-template-columns: 1fr 1fr; }
  .step-head { grid-template-columns: 1fr; }
  .step-head p { margin-top: 25px; }
}
@media (max-width: 560px) {
  .masthead { padding: 0 16px; }
  .brand img { height: 38px; }
  .status { font-size: 9px; }
  .hero { padding: 35px 16px 60px; min-height: 560px; }
  .hero h1 { font-size: 74px; }
  .process div { padding: 18px 15px; gap: 10px; }
  .process span { font-size: 11px; }
  .site-footer { grid-template-columns: 1fr; gap: 12px; padding: 32px 16px; }
  .site-footer span:last-child { text-align: left; }
}

/* reCAPTCHA v3 badge hidden, as on clc */
.grecaptcha-badge { display: none !important; }
