/* ==========================================================================
   FINDING CHARLIE — design system  (light / dawn theme)
   Style:  Swiss Modernism grid discipline, warmed — generous space, soft
           edges, daylight ground. Accessibility-first.
   Colour: every text/background pair below is contrast-verified.
   NOTE:   brand red #D93A2B is 4.50:1 on paper — LARGE DISPLAY TEXT + FILLS
           ONLY. Small red text uses --red-deep (6.44:1).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400&family=Public+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- Tokens ------------------------------------------------------------- */
:root {
  /* Surfaces — daylight */
  --paper:     #FFFDF8;   /* primary background, warm white              */
  --sand:      #FBF3E4;   /* alternating sections                        */
  --dawn:      #FFF4E2;   /* hero / highlight tint                       */
  --white:     #FFFFFF;   /* raised cards                                */

  /* Text */
  --ink:       #1E2533;   /* 15.10:1 on paper                      AAA   */
  --muted:     #464F66;   /*  8.04:1 paper · 7.41:1 sand           AAA   */

  /* Accents */
  --red:       #D93A2B;   /*  4.50:1 on paper — LARGE / FILLS ONLY       */
  --red-deep:  #B4241A;   /*  6.44:1 on paper — small text, buttons AA   */
  --gold:      #E8A33D;   /*  fills; ink on gold is 7.12:1         AAA   */
  --gold-deep: #A85B06;   /*  4.96:1 on paper — small text          AA   */

  /* On the dark footer */
  --on-ink:        #FFFDF8;  /* 15.10:1                            AAA   */
  --on-ink-muted:  #B9BFCC;  /*  8.33:1                            AAA   */

  --rule:        #EDE3D0;
  --rule-strong: #DCCFB4;

  /* Warm shadows — never grey, so nothing looks dirty on cream */
  --lift-1: 0 1px 2px rgba(94, 66, 30, .05), 0 2px 8px rgba(94, 66, 30, .05);
  --lift-2: 0 2px 4px rgba(94, 66, 30, .06), 0 12px 28px rgba(94, 66, 30, .09);

  /* Type */
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-ui:      'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  /* Grid — 12 col, 8px base unit. Spacing is looser than the dark build:
     daylight designs need more air or they read cramped. */
  --grid-columns: 12;
  --space-1: 8px;   --space-2: 16px;  --space-3: 24px;  --space-4: 40px;
  --space-5: 56px;  --space-6: 80px;  --space-7: 112px; --space-8: 144px;

  --measure: 66ch;
  --shell: 1200px;
  --gutter: clamp(20px, 5vw, 64px);

  --radius:    10px;
  --radius-sm: 6px;

  --focus-ring: 3px;
  --dur: 220ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, svg { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* --- Base --------------------------------------------------------------- */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold); color: var(--ink); }

:focus-visible {
  outline: var(--focus-ring) solid var(--red-deep);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute; left: var(--space-2); top: -100px; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 12px 20px; font-weight: 700; text-decoration: none;
  border-radius: var(--radius-sm);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--space-2); }

/* --- Layout ------------------------------------------------------------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 10vw, 128px); }
.section--tight { padding-block: clamp(48px, 7vw, 80px); }

/* Alternating warm ground. (Class name kept from the earlier build so the
   HTML did not need rewriting — it now means "sand", not "cream on dark".) */
.section--cream { background: var(--sand); }

/* --- Typography --------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: var(--space-2);
}
.eyebrow::before {
  content: ''; width: 18px; height: 2px; border-radius: 2px;
  background: var(--gold); flex: none;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600; line-height: 1.1; letter-spacing: -.02em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.25; }
h4 { font-family: var(--font-ui); font-size: 1.05rem; font-weight: 700; line-height: 1.4; color: var(--ink); }

/* Red at display size only — it does not pass AA at body size. */
.h-accent { color: var(--red); }

.lede {
  font-size: clamp(1.1rem, 1.9vw, 1.3rem); line-height: 1.6;
  color: var(--muted); max-width: 60ch; text-wrap: pretty;
}
.prose { max-width: var(--measure); }
.prose p { text-wrap: pretty; color: var(--muted); }
.prose p + p { margin-top: var(--space-3); }
.prose h3 { margin-top: var(--space-5); margin-bottom: var(--space-2); }

.section-head { max-width: 780px; margin-bottom: var(--space-6); }
.section-head h2 + .lede { margin-top: var(--space-3); }

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--red); }

/* --- Masthead ----------------------------------------------------------- */
.masthead {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid var(--rule);
}
@supports not (backdrop-filter: blur(12px)) { .masthead { background: var(--paper); } }

.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); min-height: 76px; position: relative;
}

.wordmark {
  display: inline-flex; align-items: center; gap: 11px;
  min-height: 44px;
  text-decoration: none; color: var(--ink);
}
/* Circular badge. It carries its own lettering, which is decorative at this
   size; the text wordmark beside it keeps the name legible and indexable. */
.wordmark__mark { width: 54px; height: 54px; flex: none; border-radius: 50%; }
.wordmark__text {
  font-family: var(--font-ui); font-weight: 800;
  font-size: 1.02rem; letter-spacing: .06em; text-transform: uppercase; line-height: 1;
}
.wordmark__text b { color: var(--red-deep); font-weight: 800; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 12px 14px;
  font-size: 15px; font-weight: 500; text-decoration: none; color: var(--muted);
  border-radius: var(--radius-sm);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav__link:hover { color: var(--ink); background: var(--dawn); }
.nav__link[aria-current='page'] { color: var(--ink); font-weight: 600; }
.nav__link[aria-current='page']::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--red); margin-right: 8px;
}

/* The nav is two items, so it stays inline at every width — no hamburger, no
   JavaScript. On the narrowest screens the About link drops away (it is still
   in the footer) and the call to action keeps the room it needs. */
@media (max-width: 560px) {
  .wordmark__mark { width: 42px; height: 42px; }
  .nav__link { display: none; }
  .masthead__inner { gap: var(--space-1); min-height: 66px; }
  .masthead .btn { padding: 11px 16px; font-size: 14px; min-height: 44px; }
  .wordmark { gap: 8px; }
  .wordmark__mark { height: 28px; }
  .wordmark__text { font-size: .85rem; letter-spacing: .04em; }
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 13px 26px;
  font-size: 15px; font-weight: 700; letter-spacing: .01em;
  text-decoration: none; cursor: pointer; text-align: center; white-space: nowrap;
  border: 1.5px solid var(--red-deep); border-radius: var(--radius);
  background: var(--red-deep); color: #FFFFFF;
  box-shadow: var(--lift-1);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease),
              color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.btn:hover { background: var(--red); border-color: var(--red); transform: translateY(-2px); box-shadow: var(--lift-2); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn--lg { min-height: 56px; padding: 16px 32px; font-size: 16px; }

.btn--ghost {
  background: var(--white); color: var(--ink); border-color: var(--rule-strong);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(64px, 10vw, 128px) clamp(56px, 8vw, 104px);
  /* Sunrise: warm light coming up from the lower left, gold high right. */
  background:
    radial-gradient(80% 60% at 82% 6%, rgba(232,163,61,.30) 0%, transparent 60%),
    radial-gradient(70% 60% at 6% 96%, rgba(217,58,43,.14) 0%, transparent 62%),
    linear-gradient(180deg, var(--dawn) 0%, var(--paper) 72%);
}
/* Capped so the headline breaks into a readable column instead of running the
   full width of the shell. Without this the h1 sets ~1070px wide at desktop
   while the paragraph below it stops at 54ch, and the two do not look related. */
.hero__body { max-width: 900px; }
.hero h1 { margin-bottom: var(--space-3); }
.hero h1 .h-accent { display: block; }
.hero .lede { max-width: 54ch; color: var(--muted); }
.hero__cta { margin-top: var(--space-5); }
.hero__note {
  margin-top: var(--space-3); font-size: 13.5px; color: var(--muted);
  display: flex; align-items: flex-start; gap: 8px;
}
.hero__note svg { width: 15px; height: 15px; flex: none; margin-top: 3px; color: var(--gold-deep); }

/* --- Media -------------------------------------------------------------- */
/* Fixed-ratio boxes: no layout shift while loading, no overflow. If a file
   is missing the box keeps its designed dawn panel rather than breaking. */
.media {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(110% 110% at 72% 18%, rgba(232,163,61,.34) 0%, transparent 60%),
    radial-gradient(100% 100% at 14% 92%, rgba(217,58,43,.14) 0%, transparent 64%),
    var(--dawn);
  border: 1px solid var(--rule);
  display: grid; place-items: center;
}
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Solid bar, not a fade. A gradient that reaches transparent at its top edge
   leaves white caption text sitting on the light panel — unreadable whenever
   the caption wraps to two lines or no photo has loaded. */
.media figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 12px var(--space-3);
  background: rgba(30, 37, 51, .92);
  color: #FFFFFF; font-size: 13px; line-height: 1.45;
}

/* The banner keeps its true 24:10 ratio at every width — its wordmark and
   tagline are part of the artwork, so cropping it to a taller box on a phone
   would cut the lettering and the torch off the sides. */
.media--banner  { aspect-ratio: 24 / 10; border-inline: 0; border-radius: 0; }
.media--feature { aspect-ratio: 4 / 3; }

@media (max-width: 880px) { .media--feature { aspect-ratio: 16 / 9; } }

.banner { border-block: 1px solid var(--rule); }
.banner .media { border: 0; }

/* --- Quote card --------------------------------------------------------- */
/* Text panel + portrait. Built in HTML rather than shipped as a flat image so
   the quote is selectable, translatable, readable to search engines and screen
   readers, and reflows on a phone instead of shrinking to nothing. */
.quote-card {
  display: grid; grid-template-columns: 1fr 1fr;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--lift-2); border: 1px solid var(--rule);
}
.quote-card__text {
  background: var(--ink); color: #FFFFFF;
  padding: var(--space-5) var(--space-4);
  display: flex; flex-direction: column; justify-content: center;
}
.quote-card__q {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.15;
  letter-spacing: -.02em; color: #FFFFFF;
}
.quote-card__by {
  margin-top: var(--space-3);
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
  font-style: normal; display: block;
}
.quote-card__media { position: relative; min-height: 300px; background: var(--dawn); }
.quote-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 760px) {
  .quote-card { grid-template-columns: 1fr; }
  .quote-card__media { min-height: 260px; order: -1; }   /* photo first on a phone */
  .quote-card__text { padding: var(--space-4) var(--space-3); }
}

/* --- Flow (how it works) ------------------------------------------------ */
.flow {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: var(--space-2);
}
.flow__item {
  background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: var(--space-4) var(--space-3) var(--space-3);
  box-shadow: var(--lift-1);
}
.flow__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--red-deep); color: #FFFFFF;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  margin-bottom: var(--space-2);
}
.flow__item h3,
.flow__item .flow__title { font-size: 1.15rem; line-height: 1.25; letter-spacing: -.01em; }
.flow__item p { color: var(--muted); font-size: 15px; margin-top: 8px; }

/* --- Pillars ------------------------------------------------------------ */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-2); }
.pillar {
  border-left: 3px solid var(--gold); padding: 4px 0 4px var(--space-3);
}
.pillar h3 { font-size: 1.2rem; }
.pillar p { color: var(--muted); font-size: 15px; margin-top: 6px; }

/* --- Contact list ------------------------------------------------------- */
/* Each address is an action, not prose, so each row is a full-width 44px
   target rather than a link buried mid-sentence. */
.contact { display: grid; gap: 8px; margin-top: var(--space-3); }
.contact a {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  min-height: 48px; padding: 12px 16px;
  background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  text-decoration: none; color: var(--muted); font-size: 15px;
  transition: border-color var(--dur) var(--ease);
}
.contact a:hover { border-color: var(--ink); }
.contact b {
  color: var(--ink); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  min-width: 82px;
}

/* --- Emblem band ------------------------------------------------------- */
.emblem-band { background: var(--sand); border-top: 1px solid var(--rule); }
.emblem { display: grid; place-items: center; text-align: center; margin: 0; }
.emblem img {
  width: clamp(200px, 34vw, 300px); height: auto; border-radius: 50%;
  box-shadow: var(--lift-2);
}
.emblem figcaption {
  margin-top: var(--space-4); max-width: 52ch;
  font-family: var(--font-display); font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  line-height: 1.45; color: var(--ink);
}
.emblem figcaption span {
  display: block; margin-top: var(--space-2);
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep);
}

/* --- Share -------------------------------------------------------------- */
.share { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.share a {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 48px; padding: 12px 20px;
  background: var(--white); color: var(--ink);
  border: 1.5px solid var(--rule-strong); border-radius: var(--radius);
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.share a:hover { border-color: var(--ink); transform: translateY(-2px); }
.share svg { width: 18px; height: 18px; flex: none; }

/* --- Forms -------------------------------------------------------------- */
.form { max-width: 760px; }
.field { margin-bottom: var(--space-4); }
.field > label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; color: var(--ink); }
/* Hints are small type on a 760px form. Left uncapped they set ~109 characters
   per line, which is well past a comfortable measure. */
.field .hint {
  display: block; font-size: 14px; color: var(--muted);
  margin-bottom: 10px; font-weight: 400; max-width: 62ch;
}
.req { color: var(--red-deep); font-weight: 700; }
.optional { font-weight: 400; color: var(--muted); font-size: 13.5px; }

input[type='text'], input[type='email'], input[type='url'], select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--white); color: var(--ink);
  border: 1.5px solid var(--rule-strong); border-radius: var(--radius-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #8A8578; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: var(--red-deep);
  outline: var(--focus-ring) solid var(--red-deep); outline-offset: 1px;
}
input[aria-invalid='true'], textarea[aria-invalid='true'], select[aria-invalid='true'] {
  border-color: var(--red-deep); background: #FEF5F3;
}

/* Errors carry an icon and text, never colour alone. */
.error {
  display: none; align-items: center; gap: 7px;
  margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--red-deep);
}
.error.is-shown { display: flex; }
.error svg { width: 15px; height: 15px; flex: none; }

/* Consent checkbox — people are agreeing to be shown publicly, so it needs to
   look like a decision, not a footnote. */
.checks { display: grid; gap: 10px; }
.check {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px; cursor: pointer;
  border: 1.5px solid var(--rule-strong); border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.check:hover { border-color: var(--muted); }
.check:has(input:checked) { border-color: var(--red-deep); background: var(--dawn); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--red-deep); flex: none; }
.check span { font-size: 15px; font-weight: 600; color: var(--ink); }
.check small {
  display: block; color: var(--muted); font-size: 13.5px; margin-top: 4px;
  font-weight: 400; line-height: 1.5; max-width: 64ch;
}

.form-status {
  display: none; gap: 12px; align-items: flex-start;
  padding: var(--space-3); border: 1.5px solid var(--red-deep);
  border-radius: var(--radius); background: #FEF5F3; margin-bottom: var(--space-4);
}
.form-status.is-shown { display: flex; }
.form-status svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--red-deep); }
.form-status p { font-size: 15px; color: var(--muted); }
.form-status strong { display: block; margin-bottom: 4px; color: var(--ink); }

/* --- Footer ------------------------------------------------------------- */
/* Kept dark on purpose: it grounds a light page and makes the torch glow. */
.footer {
  background: var(--ink); color: var(--on-ink-muted);
  padding-block: var(--space-6) var(--space-4); font-size: 14.5px;
}
.footer a { color: var(--on-ink); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-5); }
.footer__brand .wordmark { color: var(--on-ink); }
.footer__brand .wordmark__text b { color: var(--gold); }
.footer .wordmark__mark { width: 48px; height: 48px; }
.footer__brand p { margin-top: var(--space-2); max-width: 44ch; }
.footer h3 {
  color: var(--on-ink); font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: var(--space-2);
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li + li { margin-top: 2px; }
.footer ul a { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 0; }
.footer__legal {
  margin-top: var(--space-6); padding-top: var(--space-3);
  border-top: 1px solid rgba(255,253,248,.18);
  display: grid; gap: var(--space-2); font-size: 13px; line-height: 1.6;
}
.footer__disclaimer { max-width: 78ch; }
.footer__disclaimer strong { color: var(--on-ink); }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; gap: var(--space-4); } }

/* --- Scroll reveal — fade + 12px rise, 350ms --------------------------- */
.reveal { opacity: 0; transform: translateY(12px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity 350ms var(--ease), transform 350ms var(--ease); }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* --- Utilities ---------------------------------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: var(--space-4); } }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
