/* ===========================================================================
   FAMILY MAN RX — pre-launch
   Tokens and type ladder from hero-studies/site-copper-hisramp.html
   (neutral ramp M2, copper Y2, Archivo only). Nothing invented here.

   TWO GROUNDS, ONE SHEET.
   The homepage runs navy (body class="navy"); the origin story runs cream.
   Only the semantic layer below flips — every component reads tokens and
   never knows which ground it is on. Change a colour in one of the two
   blocks, never in a component rule.

   Copper is not one value. On cream: a-500 fills, a-700 sets display type,
   a-800 sets small text. On navy all three are a-400, which would be
   unreadable on cream and is the whole reason these are separate tokens.

   Width axis as voice: 62 display caps · 100 reading · 125 micro.
   ======================================================================== */
:root {
  /* neutral ramp */
  --n-0:#FEFCF9; --n-25:#FAFCFF; --n-50:#F6F9FD; --n-100:#EEF2F9;
  --n-150:#DCE2EB; --n-200:#CBD1DC; --n-300:#A3ABBA; --n-400:#8A93A3;
  --n-500:#717B8B; --n-600:#5A6474; --n-700:#444C5B; --n-800:#2F3641;
  --n-850:#1A2A45; --n-900:#152238; --n-950:#101A2B;

  /* copper ramp */
  --a-50:#F5EADD; --a-100:#EEDBC6; --a-300:#D9A778; --a-400:#CE8C50;
  --a-500:#B87333; --a-700:#924A24; --a-800:#78371E;

  /* ---- cream ground (origin story) ---- */
  --ground:        var(--n-0);      /* #FEFCF9 — dE 2.0 warm off-white */
  --surface:       var(--n-50);
  --ink:           var(--n-950);
  --ink-2:         var(--n-800);
  --ink-3:         var(--n-700);
  --ink-4:         var(--n-600);
  --line:          var(--n-200);
  --brand:         var(--a-500);
  --brand-display: var(--a-700);
  --brand-text:    var(--a-800);
  --on-brand:      var(--n-950);
  --btn-bg:        var(--a-500);
  --btn-bg-hover:  var(--a-400);
  --err:           var(--a-800);
  --field-bg:      var(--n-0);
  --field-hover:   var(--n-400);
  --placeholder:   var(--n-400);
  --focus:         var(--a-700);
  --ghost-hover:   var(--a-50);

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gut: clamp(20px, 5vw, 64px);

  color-scheme: light;
}

/* ---- navy ground (homepage) — the palette it launched with -------------- */
body.navy {
  --ground:        var(--n-950);    /* #101A2B */
  --surface:       var(--n-900);
  --ink:           var(--n-25);
  --ink-2:         var(--n-200);
  --ink-3:         var(--n-200);
  --ink-4:         var(--n-300);
  --line:          var(--n-800);
  --brand:         var(--a-400);    /* copper on dark — all three jobs */
  --brand-display: var(--a-400);
  --brand-text:    var(--a-400);
  --on-brand:      var(--n-950);
  --btn-bg:        var(--a-500);
  --btn-bg-hover:  var(--a-400);
  --err:           var(--a-300);
  --field-bg:      var(--n-900);
  --field-hover:   var(--n-850);
  --placeholder:   var(--n-500);
  --focus:         var(--a-300);
  --ghost-hover:   rgba(206, 140, 80, .09);

  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font); font-stretch: 100%;
  font-size: 16px; line-height: 1.6;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.shell { max-width: 1200px; margin-inline: auto; padding-inline: var(--gut); width: 100%; }

.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;
}

/* ---- the ladder ------------------------------------------------------- */
.d-xl, .d-lg {
  font-weight: 900; font-stretch: 62%; text-transform: uppercase;
  margin: 0; text-wrap: balance; letter-spacing: .03em;
}
.d-xl { font-size: clamp(34px, 5.8vw, 62px); line-height: .92; }
.d-lg { font-size: clamp(28px, 4.4vw, 46px); line-height: .96; }
.d-sm {
  font-weight: 800; font-stretch: 62%; text-transform: uppercase;
  font-size: clamp(20px, 2.4vw, 25px); line-height: 1.0; letter-spacing: .02em; margin: 0;
}
.eyebrow {
  font-weight: 700; font-stretch: 125%; font-size: 12.5px; line-height: 1.2;
  letter-spacing: .10em; text-transform: uppercase; margin: 0; color: var(--brand-text);
}
.stamp {
  font-weight: 800; font-stretch: 125%; font-size: 11.5px; line-height: 1.1;
  letter-spacing: .08em; text-transform: uppercase; margin: 0;
}
.read-lg { font-size: clamp(17px, 1.9vw, 20px); line-height: 1.5; margin: 0; }
.read-sm { font-size: 14px; line-height: 1.55; margin: 0; }

/* ---- page frame ------------------------------------------------------- */
.page {
  min-height: 100svh;
  display: flex; flex-direction: column;
  padding-block: clamp(24px, 4vw, 40px) clamp(32px, 5vw, 56px);
  gap: clamp(32px, 6vw, 64px);
}

.masthead { flex: none; }
/* logo left, origin-story link right, on one row */
.masthead-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
/* desktop only — below 860px the button under the photo takes over */
.nav-cta { display: inline-block; padding: 11px 18px; flex: none; }
.logo {
  font-weight: 900; font-stretch: 62%; font-size: 22px; letter-spacing: .045em;
  text-transform: uppercase; text-decoration: none; color: var(--ink);
  display: inline-block;
}
.logo span { color: var(--brand-text); }

/* ---- hero ------------------------------------------------------------- */
.hero { flex: 1 1 auto; display: flex; align-items: center; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 68px); align-items: center; width: 100%;
}
.col-copy { display: grid; gap: 22px; align-content: center; justify-items: start; }

.marker { display: flex; align-items: center; gap: 12px; }
.marker i { display: block; width: 30px; height: 4px; background: var(--brand); flex: none; }

h1 em, h2 em { font-style: italic; color: var(--brand-display); }
.sub { color: var(--ink-3); max-width: 34ch; }

figure { margin: 0; }
figure img {
  width: 100%; height: auto; display: block;
  border-radius: 4px; border: 1px solid var(--line);
}
figcaption { margin-top: 16px; color: var(--ink-4); }
/* .stamp declares `margin: 0`, and a class beats the element selector above —
   so a figcaption carrying .stamp sat flush against the photo. Must be
   figcaption.stamp (0,1,1) to win. */
figcaption.stamp { margin-top: 16px; }

/* ---- signup ----------------------------------------------------------- */
.signup { width: 100%; max-width: 520px; display: grid; gap: 10px; margin-top: 4px; }
.field-row { display: flex; flex-wrap: wrap; gap: 10px; }

.field {
  flex: 1 1 200px; min-width: 0;
  font-family: var(--font); font-size: 15px; font-stretch: 100%;
  color: var(--ink); background: var(--field-bg);
  border: 1px solid var(--line); border-radius: 3px;
  padding: 15px 16px; line-height: 1.4;
  transition: border-color .15s ease;
}
.field::placeholder { color: var(--placeholder); }
.field:hover { border-color: var(--field-hover); }
.field:focus { border-color: var(--brand); outline: none; }
.field:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.field[aria-invalid="true"] { border-color: var(--err); }

.btn {
  font-family: var(--font); font-weight: 700; font-stretch: 100%;
  font-size: 12px; line-height: 1.4; letter-spacing: .10em; text-transform: uppercase;
  border: 0; border-radius: 3px; padding: 15px 26px; cursor: pointer;
  background: var(--btn-bg); color: var(--on-brand);
  text-decoration: none; display: inline-block;
  transition: background .15s ease, border-color .15s ease; flex: 0 0 auto;
}
.btn:hover { background: var(--btn-bg-hover); }
.btn[disabled] { opacity: .6; cursor: default; }

/* deliberately subordinate to the copper primary, so the origin story never
   outranks the email capture on the splash */
.btn-ghost {
  background: transparent; color: var(--brand-text);
  border: 1px solid var(--line);
  padding: 13px 20px;
}
.btn-ghost:hover { background: var(--ghost-hover); border-color: var(--brand); }
/* Desktop hides this: the photo and the form sit side by side, so after
   signup the success-state CTA would be a second identical button. On mobile
   the photo is far below the form and the button earns its place. */
.figure-cta { margin-top: 16px; display: none; }

.err { color: var(--err); }
[hidden] { display: none !important; }

/* ---- success ---------------------------------------------------------- */
.done { display: grid; gap: 14px; justify-items: start; max-width: 42ch; }
.done .read-sm { color: var(--ink-4); }
/* once the form is gone the origin story IS the next action, so it takes the
   primary treatment the form's button just vacated */
.done .btn { margin-top: 6px; }

/* ---- origin page ------------------------------------------------------ */
.narrow { max-width: 680px; }
.story { display: grid; gap: clamp(28px, 4vw, 44px); padding-block: clamp(32px, 5vw, 56px); }
.story-head { display: grid; gap: 20px; justify-items: start; }
.signoff { display: grid; gap: 24px; justify-items: start; }

.prose { display: grid; gap: 20px; max-width: 62ch; }
.prose p { margin: 0; color: var(--ink-3); font-size: 17px; line-height: 1.62; }
/* .lede removed — the story reads at one size and one colour throughout */
/* must out-specify `.prose p` (0,1,1), which otherwise overrides the stamp's
   size, colour and leading and renders the byline as grey body text */
.prose p.attrib {
  color: var(--brand-text);
  font-size: 11.5px; line-height: 1.1;
  margin-top: 4px;
}

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

.backlink {
  color: var(--ink-4); text-decoration: none;
  font-weight: 700; font-stretch: 125%; font-size: 12px;
  letter-spacing: .08em; text-transform: uppercase;
}
.backlink:hover { color: var(--brand-text); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { align-items: start; }
  .figure-cta { display: inline-block; }
  .nav-cta { display: none; }
}
@media (max-width: 560px) {
  /* scoped to the signup row — an unscoped .btn here also stretched the
     ghost button, which is meant to stay content-width and subordinate */
  .signup .field, .signup .btn { flex: 1 1 100%; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* before/after sits between headline and story — capped so it reads as
   evidence inside the article, not as a second hero */
.ba { max-width: 420px; }
.ba figcaption { max-width: 44ch; display: grid; gap: 5px; }
/* the formula is the caption proper; the line under it identifies the subject */
.formula { color: var(--ink-2); }
/* sentence case, not the stamp's caps — a qualifier nobody can read is a
   qualifier that isn't doing its job */
.qualifier { font-size: 13px; line-height: 1.45; color: var(--ink-4); }

/* honeypot — positioned off-screen rather than display:none, because many
   bots skip hidden inputs but happily fill ones that are merely out of view */
.hp {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
