/* Sound Reason. Layout: one quiet column of alternating bands; the hero wave (noise to harmony) is the one bold moment. */
:root {
  --bg: #0D1517;
  --band: #121D20;
  --panel: #18262A;
  --line: #2A3B40;
  --fg: #ECE5D6;
  --muted: #98A7A6;
  --gold: #E3B456;
  --signal: #72B9CB;
  --on-gold: #1A1408;
  --glow: rgba(227, 180, 86, 0.16);
  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --step--1: 0.82rem; --step-0: 1rem; --step-1: 1.2rem; --step-2: 1.6rem; --step-3: clamp(2rem, 4.6vw, 2.8rem); --step-4: clamp(2.8rem, 8vw, 5.4rem);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F5F3EE; --band: #ECE9E1; --panel: #FFFFFF; --line: #D6D1C4;
    --fg: #14201F; --muted: #56625F; --gold: #9C6A0E; --signal: #23708A; --on-gold: #FFFFFF;
    --glow: rgba(156, 106, 14, 0.10);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F5F3EE; --band: #ECE9E1; --panel: #FFFFFF; --line: #D6D1C4;
  --fg: #14201F; --muted: #56625F; --gold: #9C6A0E; --signal: #23708A; --on-gold: #FFFFFF;
  --glow: rgba(156, 106, 14, 0.10);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: var(--step-0); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
section { padding-block: clamp(64px, 10vw, 120px); }
.band { background: var(--band); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.05; text-wrap: balance; margin: 0; }
h2 { font-size: var(--step-3); max-width: 22ch; }
h2 em, h1 em { color: var(--gold); }
h3 { font-size: var(--step-2); }
p { margin: 0; }
.lede { color: var(--muted); font-size: var(--step-1); max-width: 58ch; }
.label { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--signal); }
.head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(32px, 5vw, 52px); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 2px; font-weight: 600; text-decoration: none; border: 1px solid var(--gold); transition: transform .2s ease, box-shadow .2s ease, background .2s ease; cursor: pointer; font-family: var(--font-body); font-size: var(--step-0); }
.btn.primary { background: var(--gold); color: var(--on-gold); }
.btn.primary:hover { box-shadow: 0 8px 28px var(--glow); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--gold); }
.btn:hover { transform: translateY(-2px); }
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark svg { width: 34px; height: 22px; flex: none; }
.wordmark span { font-family: var(--font-display); font-size: 1.45rem; }
nav.top-links { display: flex; align-items: center; gap: 20px; font-size: var(--step--1); }
nav.top-links a { text-decoration: none; color: var(--muted); }
nav.top-links a:hover { color: var(--fg); }
nav.top-links .btn { min-height: 38px; padding: 0 16px; font-size: var(--step--1); color: var(--on-gold); }
@media (max-width: 700px) { nav.top-links .hide-sm { display: none; } }

/* Reveal: elements are visible at rest; they only animate when scrolled into view */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.rv.in { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--d, 0) * 110ms); }

/* Footer */
footer.site { border-top: 1px solid var(--line); padding-block: 32px; font-size: var(--step--1); color: var(--muted); }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
footer.site i { font-family: var(--font-display); font-size: 1.15rem; color: var(--fg); }

/* Forms (apply page) */
form { display: flex; flex-direction: column; gap: 30px; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
legend { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--signal); padding: 0; margin-bottom: 4px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .field > .q { font-weight: 600; }
.help { font-size: var(--step--1); color: var(--muted); font-weight: 400; }
input[type=text], input[type=email], input[type=url], select, textarea { width: 100%; background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 2px; padding: 12px 14px; font: inherit; }
textarea { min-height: 110px; resize: vertical; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choices label { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; transition: border-color .15s ease; }
.choices label:has(input:checked) { border-color: var(--gold); }
.choices input { margin-top: 5px; accent-color: var(--gold); }
.count { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.err { color: #D9705F; font-size: var(--step--1); }
.result { border: 1px solid var(--gold); padding: 26px; display: flex; flex-direction: column; gap: 10px; background: var(--panel); }
.fine { font-size: var(--step--1); color: var(--muted); }

/* Theme toggle */
.theme-btn { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: transparent; color: var(--fg); border-radius: 50%; cursor: pointer; transition: border-color .2s ease, transform .3s ease; }
.theme-btn:hover { border-color: var(--gold); transform: rotate(20deg); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-btn .sun { display: none; }
:root[data-theme="light"] .theme-btn .sun { display: block; }
:root[data-theme="light"] .theme-btn .moon { display: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }
