/* Tokens from HIC design canon (design/DESIGN.md). No raw hex outside this block. */
:root {
  --ink: #141210;
  --cream: #FAF8F3;
  --alt-cream: #F3EEE3;
  --hover-paper: #EDE6D6;
  --text-2: #424242;
  --text-grey: #606060;
  --red: #C8102E;
  --text-red: #B20E28;
  --red-pressed: #A8001F;
  --blue-focus: #2563EB;
  --link-blue: #1E50CD;
  --on-ink-2: #D6D1C4;

  --f-display: "League Spartan", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;

  --s-h1: clamp(32px, 6vw, 76px);
  --s-h2: clamp(26px, 4vw, 46px);
  --s-body: 1.0625rem;   /* 17px */
  --s-small: 0.9375rem;  /* 15px */
  --s-label: 0.8125rem;  /* 13px */
}

@font-face {
  font-family: "League Spartan";
  src: url("/fonts/league-spartan-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 400 var(--s-body)/1.6 var(--f-body);
  min-height: 100vh; display: flex; flex-direction: column;
}
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: clamp(40px, 8vw, 96px) 24px 48px; flex: 1; }

.eyebrow, .label, .field-label {
  font: 700 var(--s-label)/1.4 var(--f-display);
  letter-spacing: 0.16em; text-transform: uppercase; margin: 0;
}
.eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.eyebrow::after { content: ""; flex: 1; height: 2px; background: var(--ink); opacity: .85; }

.h1 {
  font: 900 var(--s-h1)/1.0 var(--f-display); letter-spacing: -0.028em;
  text-transform: uppercase; margin: 0 0 24px; text-wrap: balance;
}
.emph { font-style: normal; font-weight: 900; color: var(--red); position: relative; white-space: nowrap; display: inline-block; }
.stroke { position: absolute; left: 0; bottom: -0.16em; width: 1.1em; max-width: 115%; height: 0.24em; fill: var(--red); opacity: .9; }
.emph .stroke { width: 100%; }

.lede { font-size: 1.1875rem; color: var(--text-2); max-width: 36em; margin: 0 0 40px; text-wrap: pretty; }

.countdown { margin: 0 0 40px; }
.label { color: var(--text-grey); margin-bottom: 12px; }
.cd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 520px; }
.cd > div { background: var(--ink); color: var(--cream); border-radius: 4px; padding: 14px 8px 10px; text-align: center; }
.cd span { display: block; font: 800 clamp(30px, 6vw, 48px)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.cd small { display: block; margin-top: 6px; font: 700 var(--s-label)/1 var(--f-display); letter-spacing: .16em; text-transform: uppercase; color: var(--on-ink-2); }
.cd-text { font: 800 clamp(26px, 4vw, 40px)/1.1 var(--f-display); margin: 0; }

.card { background: var(--alt-cream); border-radius: 4px; padding: clamp(24px, 5vw, 40px); max-width: 560px; }
.h2 { font: 800 clamp(26px, 4vw, 36px)/1.05 var(--f-display); letter-spacing: -0.01em; margin: 0 0 8px; }
.sub { color: var(--text-2); margin: 0 0 24px; }

.field-label { display: block; margin: 18px 0 8px; }
.opt { text-transform: none; letter-spacing: 0; font: 400 var(--s-small) var(--f-body); color: var(--text-grey); }
input[type=email], input[type=tel] {
  width: 100%; font: 400 1rem/1.4 var(--f-body); color: var(--ink);
  background: var(--cream); border: 2px solid var(--ink); border-radius: 4px; padding: 12px 14px;
}
input[aria-invalid=true] { border-color: var(--text-red); }
input:focus-visible, button:focus-visible, a:focus-visible, .check input:focus-visible {
  outline: 3px solid var(--blue-focus); outline-offset: 2px;
}
.check { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0 0; font-size: var(--s-small); line-height: 1.5; color: var(--text-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.err { color: var(--text-red); font-size: var(--s-small); font-weight: 600; margin: 8px 0 0; }

.stamp {
  margin-top: 28px; width: 100%; cursor: pointer;
  font: 900 1.125rem/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase;
  color: var(--cream); background: var(--red); border: 0; border-radius: 4px; padding: 18px 24px;
}
.stamp:hover { background: var(--text-red); }
.stamp:active { background: var(--red-pressed); }
.stamp[aria-busy=true] { opacity: .85; cursor: progress; }

.fine { font-size: var(--s-label); color: var(--text-grey); margin: 16px 0 0; }
a { color: var(--link-blue); text-underline-offset: 3px; }
.link-btn { background: none; border: 0; padding: 0; font: 700 var(--s-body) var(--f-display); color: var(--ink); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.done:focus { outline: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.foot { padding: 24px; text-align: center; font-size: var(--s-small); color: var(--text-grey); border-top: 1px solid var(--alt-cream); }
.foot p { margin: 0; }

@media (max-width: 420px) {
  .cd { gap: 8px; }
  .cd small { letter-spacing: .08em; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Pledge */
.pledge-line { font: 700 1.25rem/1.3 var(--f-display); color: var(--ink); margin: 0 0 16px; }
.progress { margin: 0 0 20px; }
.bar { height: 14px; background: var(--cream); border: 2px solid var(--ink); border-radius: 4px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--red); transition: width .6s ease; }
.progress-text { margin: 8px 0 0; font: 600 var(--s-small)/1.4 var(--f-body); font-variant-numeric: tabular-nums; }

/* Share panel */
textarea {
  width: 100%; font: 400 1rem/1.5 var(--f-body); color: var(--ink); resize: vertical;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 4px; padding: 12px 14px;
}
textarea:focus-visible { outline: 3px solid var(--blue-focus); outline-offset: 2px; }
.share-primary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 20px; }
.share-primary .stamp { margin-top: 0; display: block; text-align: center; text-decoration: none; }
.share-primary .stamp[hidden] { display: none; }
#share-sms { background: var(--ink); }
#share-sms:hover { background: var(--ink); opacity: .9; }
.share-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.share-grid a, .share-grid button {
  font: 700 var(--s-small)/1 var(--f-display); color: var(--ink); text-decoration: none; cursor: pointer;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 999px; padding: 10px 16px;
}
.share-grid a:hover, .share-grid button:hover { background: var(--hover-paper); }
.recruits { margin-top: 28px; padding-top: 20px; border-top: 2px solid var(--ink); }
.ref-link { font: 600 var(--s-body)/1.4 var(--f-body); margin: 4px 0 8px; word-break: break-all; }
.recruit-count { margin: 0; color: var(--text-2); font-variant-numeric: tabular-nums; }
.recruit-count strong { color: var(--text-red); font-weight: 700; }

/* Desktop/laptop: two columns, everything above the fold (target ≥1024×680 viewport) */
@media (min-width: 1024px) {
  .wrap {
    max-width: 1200px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr);
    column-gap: clamp(40px, 5vw, 80px); align-items: center;
    padding: clamp(24px, 4vh, 56px) 40px;
  }
  .eyebrow { margin-bottom: clamp(12px, 2vh, 20px); }
  .h1 { font-size: clamp(40px, min(5vw, 8.4vh), 76px); margin-bottom: clamp(14px, 2.4vh, 24px); }
  .lede { font-size: clamp(1rem, 2.2vh, 1.1875rem); margin-bottom: clamp(18px, 3.5vh, 36px); }
  .countdown { margin: 0; }
  .label { margin-bottom: 8px; }
  .cd { gap: 10px; max-width: 460px; }
  .cd > div { padding: clamp(8px, 1.4vh, 14px) 6px clamp(6px, 1.1vh, 10px); }
  .cd span { font-size: clamp(26px, 5vh, 44px); }

  .card { max-width: none; padding: clamp(20px, 3.4vh, 36px) clamp(24px, 2.6vw, 36px); }
  .card .h2 { font-size: clamp(26px, 4vh, 34px); }
  .pledge-line { margin-bottom: 10px; }
  .card .sub { margin-bottom: clamp(8px, 1.6vh, 16px); font-size: var(--s-small); line-height: 1.5; }
  .field-label { margin: clamp(10px, 1.6vh, 16px) 0 6px; }
  input[type=email], input[type=tel] { padding: clamp(8px, 1.2vh, 12px) 12px; }
  .check { margin-top: 12px; font-size: var(--s-label); line-height: 1.45; }
  .stamp { margin-top: clamp(14px, 2.4vh, 24px); padding: clamp(14px, 2vh, 18px) 20px; }
  .fine { margin-top: 10px; }
  .progress { margin-bottom: 12px; }

  /* share panel */
  textarea { font-size: var(--s-small); }
  #share-text { height: 6.2em; }
  .share-primary { margin-top: 14px; }
  .share-grid { margin-top: 12px; gap: 6px; }
  .share-grid a, .share-grid button { padding: 8px 13px; font-size: var(--s-label); }
  .recruits { margin-top: 16px; padding-top: 12px; }
  .ref-link { font-size: var(--s-small); margin: 2px 0 4px; }
  .recruit-count { font-size: var(--s-small); }

  .foot { padding: 14px 24px; font-size: var(--s-label); }
}

@media (min-width: 1024px) and (max-height: 700px) {
  .wrap { padding-top: 16px; padding-bottom: 16px; }
  .card { padding-top: 18px; padding-bottom: 18px; }
  .card .h2 { font-size: 24px; margin-bottom: 4px; }
  .pledge-line { font-size: 1.0625rem; margin-bottom: 6px; }
  .progress { margin-bottom: 8px; }
  .bar { height: 10px; }
  .progress-text { margin-top: 4px; }
  .field-label { margin: 8px 0 4px; }
  .err { margin-top: 4px; font-size: var(--s-label); }
  .check { margin-top: 8px; }
  .stamp { margin-top: 12px; padding: 12px 20px; }
  .fine { margin-top: 6px; font-size: 12px; }
  .foot { padding: 8px 24px; }
}
@media (min-width: 1024px) and (min-height: 760px) { #share-text { height: 7.6em; } }
.lede:has(+ .why) { margin-bottom: 14px; }
.why { font-size: var(--s-small); line-height: 1.5; color: var(--text-2); max-width: 38em; margin: 0 0 36px; padding-left: 14px; border-left: 3px solid var(--red); }
.why strong { font-weight: 600; color: var(--ink); }
@media (min-width: 1024px) { .why { margin-bottom: clamp(16px, 3.2vh, 32px); } }
@media (min-width: 1024px) and (max-height: 700px) { .lede:has(+ .why) { margin-bottom: 8px; } .why { font-size: var(--s-label); } }
