/* ══════════════════════════════════════════
   Deep Map · Design Tokens v1 — paper-and-ink
   Private press meets laboratory.
   The site presages the bound object.

   Import this on every Deep Map surface. Do NOT co-load pq.css / app.css
   / pq-skin.css alongside — those carry the legacy amber/black cinematic
   scheme and will fight these tokens.

   Rules that are as binding as the values:
   - Cormorant Garamond is set UPRIGHT (500/600). Italics are reserved for
     mid-sentence emphasis and titles of works — never ambient, never a
     whole headline.
   - Foil (--foil) occupies at most ~5% of any viewport. Wordmark, link
     underlines, hairline dividers, focus rings, one map frame. That's it.
   - No shadows (except one 1px hairline elevation), no gradients, no
     glows, no blurs, no parallax.
   - Radius 2px maximum on everything.
   - Numbers that matter (2,160 · No. 7 · dates) render in --data (mono).
   ══════════════════════════════════════════ */

:root {
  /* ── FIELDS ── */
  --paper:        #F7F3EC;   /* warm cream — the page */
  --paper-raised: #FDFBF7;   /* cards, form fields */
  --paper-inset:  #EFE9DE;   /* map well, quiet panels */

  /* ── INK ── */
  --ink:          #1C1814;   /* warm near-black — all body text */
  --ink-soft:     #4A443C;   /* secondary text */
  --ink-faint:    #8A8276;   /* captions, placeholders */

  /* ── STRUCTURE ── */
  --rule:         #D8D0C2;   /* hairlines, borders (1px only) */

  /* ── FOIL (rationed like foil on a spine) ── */
  --foil:         #9C7A3C;   /* bronze-gold: wordmark, hairlines, underlines */
  --foil-deep:    #7A5E2C;   /* foil on hover / small text on paper (AA safe) */

  /* ── FUNCTIONAL ONLY (never decorative) ── */
  --alert:        #8C2F24;   /* oxblood: errors, destructive */
  --confirm:      #3D5A3C;   /* moss: success only */

  /* ── TYPE ── */
  --display: 'Cormorant Garamond', Georgia, serif;    /* headlines UPRIGHT 500/600 */
  --text:    'Source Serif 4', Georgia, serif;         /* body 400/600 */
  --label:   'Raleway', system-ui, sans-serif;         /* small caps labels/nav/buttons 500 letterspaced */
  --data:    'IBM Plex Mono', 'DM Mono', monospace;    /* numbers, dates, trace numbers */

  --fs-hero:  clamp(2.6rem, 6vw, 4.4rem);
  --fs-h2:    clamp(1.6rem, 3vw, 2.2rem);
  --fs-body:  1.0625rem;   /* 17px */
  --fs-small: .875rem;
  --lh-body:  1.65;
  --measure:  62ch;

  /* Spacing (8px base): 8/16/24/40/64/104 */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 40px; --s5: 64px; --s6: 104px;
}

[data-theme="dark"] {
  /* Evening variant — assessment surfaces may adopt this. Bone NOT amber. */
  --paper:        #14120F;
  --paper-raised: #1C1915;
  --paper-inset:  #0F0D0B;
  --ink:          #EDE6D9;   /* bone */
  --ink-soft:     #B5AC9C;
  --ink-faint:    #7A7264;
  --rule:         #2E2A24;
  --foil:         #A98A4E;
  --foil-deep:    #C2A468;
  --alert:        #B5483A;
  --confirm:      #5F7F5E;
}

/* ── RESET / BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* ── TYPE PRIMITIVES ── */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;              /* upright — NEVER italic */
  font-style: normal;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: 0;
}
h1 { font-size: var(--fs-hero); font-weight: 500; margin-bottom: var(--s3); }
h2 { font-size: var(--fs-h2); font-weight: 500; margin: var(--s5) 0 var(--s3); }
h3 { font-size: 1.25rem; font-weight: 600; margin: var(--s4) 0 var(--s2); }

p, li { max-width: var(--measure); }
p { margin-bottom: var(--s3); color: var(--ink); }
p em, li em { font-style: italic; color: var(--ink); }   /* reserved for mid-sentence emphasis */
strong { font-weight: 600; }

ul, ol { padding-left: var(--s3); margin-bottom: var(--s3); }
li { margin-bottom: var(--s1); }

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--foil);
  padding-bottom: 1px;
  text-underline-offset: 3px;
  transition: border-color 150ms ease-out;
}
a:hover { border-bottom-color: var(--foil-deep); }
a:focus-visible { outline: 2px solid var(--foil-deep); outline-offset: 2px; }

/* ── LABELS (Raleway caps) ── */
.label, nav.top a:not(.brand), .cta {
  font-family: var(--label);
  font-weight: 500;
  font-size: var(--fs-small);
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ── NAV (wordmark left, two links right, hairline beneath) ── */
nav.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--s2) var(--s4);
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
nav.top .brand {
  font-family: var(--label);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--foil);
  border-bottom: none;
}
nav.top .brand:hover { color: var(--foil-deep); }
nav.top .nav-right { display: flex; gap: var(--s3); }
nav.top .nav-right a {
  color: var(--ink);
  border-bottom: none;
  font-family: var(--label);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
nav.top .nav-right a:hover { color: var(--foil-deep); }

/* ── BUTTONS ── */
/* Primary: ink field, paper text. Never gold-filled — gold is foil, not paint. */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--label);
  font-weight: 500;
  font-size: var(--fs-small);
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 18px 40px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 150ms ease-out, color 150ms ease-out;
}
.btn:hover:not(:disabled) {
  border: 1px solid var(--foil);         /* foil edge appears on hover, not fill */
  color: var(--paper);
}
.btn:focus-visible {
  outline: 2px solid var(--foil-deep);
  outline-offset: 2px;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Quiet: transparent, hairline border, ink text */
.btn-quiet {
  display: inline-block;
  background: transparent;
  color: var(--ink);
  font-family: var(--label);
  font-weight: 500;
  font-size: var(--fs-small);
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 17px 39px;   /* -1px on each side because border is 1px */
  border: 1px solid var(--rule);
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 150ms ease-out;
}
.btn-quiet:hover:not(:disabled) { border-color: var(--foil-deep); }

/* ── FORM FIELDS ── */
.field { display: flex; flex-direction: column; gap: var(--s1); margin-bottom: var(--s3); }
.field label, .field .field-label {
  font-family: var(--label);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field .field-prompt {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
}
.field .field-hint {
  font-family: var(--text);
  font-style: italic;
  font-size: var(--fs-small);
  color: var(--ink-faint);
}
.input, .textarea {
  background: var(--paper-raised);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  outline: none;
  width: 100%;
  transition: border-color 150ms ease-out;
}
.input::placeholder, .textarea::placeholder {
  color: var(--ink-faint);
  font-style: italic;
}
.input:focus, .textarea:focus { border-color: var(--foil-deep); }
.textarea { min-height: 108px; resize: vertical; }

/* ── STRUCTURE ── */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 var(--s4); }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 var(--s4); }

.section {
  padding: var(--s6) 0;
  border-top: 1px solid var(--rule);
}
.section:first-of-type { border-top: none; }
.section-eyebrow {
  font-family: var(--label);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: var(--s2);
  text-align: center;
}
.section-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  color: var(--ink);
  text-align: center;
  margin-bottom: var(--s4);
  max-width: 20ch;
  margin-left: auto;
  margin-right: auto;
}

/* ── FOIL HAIRLINE (the only decorative flourish permitted) ── */
.hairline {
  width: 64px;
  height: 1px;
  background: var(--foil);
  border: none;
  margin: var(--s3) auto;
}

/* ── DATA (mono for numbers that matter) ── */
.data, .meta { font-family: var(--data); font-size: var(--fs-small); color: var(--ink-soft); }

/* ── EMPHASIS STRIP (pull-quote) ── */
.emph {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--ink);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: var(--s3) 0;
  margin: var(--s3) 0;
  text-align: center;
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}

/* ── FOOTER ── */
footer.bottom {
  padding: var(--s4);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  justify-content: center;
  align-items: baseline;
  background: var(--paper);
}
footer.bottom a {
  font-family: var(--label);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: none;
}
footer.bottom a:hover { color: var(--foil-deep); }
footer.bottom .house-credit {
  flex-basis: 100%;
  text-align: center;
  font-family: var(--label);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: var(--s2) 0 0;
  max-width: none;
}

/* ── FUNCTIONAL STATES ── */
.msg-alert { color: var(--alert); font-family: var(--text); font-style: italic; }
.msg-confirm { color: var(--confirm); font-family: var(--text); font-style: italic; }

/* ── APPLY CTA WRAPPER (the single call-to-action) ── */
.apply-cta-row { text-align: center; padding: var(--s5) 0; }
.apply-cta-row .cta-note {
  font-family: var(--text);
  font-style: italic;
  font-size: var(--fs-small);
  color: var(--ink-faint);
  margin-top: var(--s2);
}

/* ── UTILITIES ── */
.center { text-align: center; }
.measure { max-width: var(--measure); margin-left: auto; margin-right: auto; }
