/* CR1000 — night match under floodlights */

@font-face {
  font-family: "Big Shoulders Display";
  src: url("/bigshoulders.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/instrumentsans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --pitch: #0F2E22;      /* base: pitch at night */
  --pitch-deep: #0B241A; /* rail */
  --turf: #1D4535;       /* empty dots, surfaces */
  --line: #2F5B48;       /* hairlines */
  --chalk: #EEEBDF;      /* text, scored goals */
  --chalk-dim: #A8B6AC;  /* secondary text */
  --flood: #E8B84A;      /* floodlight gold: latest goal, primary action */
  --red: #D8323F;        /* goal 1000 only */

  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --rail-w: 15rem;
  --measure: 40rem;

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 1.5rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--pitch);
  color: var(--chalk);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--chalk); text-decoration-color: var(--flood); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--flood); outline-offset: 3px; border-radius: 2px; }

.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; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--flood); color: var(--pitch); padding: .5rem 1rem; z-index: 50; font-weight: 600; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 1rem); }

/* ---------- Rail (sticky side menu) ---------- */
.rail {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: var(--rail-w);
  padding: calc(env(safe-area-inset-top, 0px) + 2.25rem) 1.75rem calc(env(safe-area-inset-bottom, 0px) + 2rem);
  background: var(--pitch-deep);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.wordmark {
  font-family: var(--display);
  font-weight: 900;
  font-size: 2.6rem;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--chalk);
}
.wordmark span { color: var(--flood); }

.nav { list-style: none; margin: 2.75rem 0 0; padding: 0; counter-reset: none; }
.nav li { margin: 0; }
.nav a {
  display: block;
  position: relative;
  padding: .45rem 0 .45rem 1rem;
  color: var(--chalk-dim);
  text-decoration: none;
  font-size: .95rem;
  border-left: 2px solid var(--line);
  transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--chalk); }
.nav a[aria-current="true"] { color: var(--chalk); border-left-color: var(--flood); }

.rail-foot { margin-top: auto; }
.rail-x { color: var(--chalk-dim); font-size: .9rem; }

/* ---------- Main ---------- */
main {
  margin-left: var(--rail-w);
  padding: 0 clamp(1.5rem, 5vw, 5rem);
}
section {
  max-width: 52rem;
  padding: 5.5rem 0 4.5rem;
  border-top: 1px solid var(--line);
}
section.hero { border-top: 0; padding-top: 4rem; }

h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.6rem, 5vw, 3.75rem);
  line-height: 1;
  letter-spacing: 0.005em;
  margin: 0 0 2rem;
}
h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1.1;
  margin: 3rem 0 .5rem;
}
p { margin: 0 0 1rem; max-width: var(--measure); }
.lede { font-size: 1.3rem; line-height: 1.5; max-width: 36rem; }
strong { font-weight: 600; }

/* ---------- Hero ---------- */
.count {
  font-family: var(--display);
  font-weight: 900;
  line-height: .82;
  margin: 0;
  max-width: none;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}
.count-now { font-size: clamp(7rem, 22vw, 15.5rem); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.count-of { font-size: clamp(2.5rem, 7vw, 5rem); color: var(--chalk-dim); font-weight: 700; margin-left: .15em; }
.hero-line { font-size: 1.3rem; margin: 1.5rem 0 2.5rem; }

.ledger { margin: 0 0 2.5rem; }
.ledger svg { display: block; width: 100%; height: auto; }
.ledger figcaption { margin-top: 1rem; font-size: .9rem; color: var(--chalk-dim); max-width: var(--measure); }
.dot { fill: var(--turf); }
.dot.on { fill: var(--chalk); }
.dot.latest { fill: var(--flood); }
.dot.k { fill: none; stroke: var(--red); stroke-width: .35; }
.dot.k.on { fill: var(--red); }

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Buttons ---------- */
.btn {
  font: 600 1rem/1 var(--body);
  padding: .95rem 1.4rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--flood); color: var(--pitch); }
.btn-primary:hover { background: #F2C966; }
.btn-ghost { border-color: var(--chalk-dim); color: var(--chalk); }
.btn-ghost:hover { border-color: var(--chalk); }
.btn-small { padding: .65rem 1.1rem; font-size: .95rem; }

/* ---------- Latest goals ---------- */
.goals { list-style: none; margin: 0; padding: 0; }
.goal {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.goal:first-child { padding-top: 0; }
.goal-n {
  font-family: var(--display);
  font-weight: 800;
  font-size: 3.25rem;
  line-height: .9;
  font-variant-numeric: tabular-nums;
}
.goal:first-child .goal-n { color: var(--flood); }
.goal-match { font-weight: 600; font-size: 1.15rem; margin: 0 0 .15rem; }
.goal-meta { color: var(--chalk-dim); margin: 0 0 .5rem; font-size: .95rem; }
.goal-note { margin: 0; font-size: .95rem; }

/* ---------- Milestones ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 3.25rem; top: .5rem; bottom: 3.5rem;
  border-left: 2px dashed var(--line);
}
.timeline li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1.5rem;
  padding: 0 0 2rem;
  position: relative;
}
.t-n {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1;
  background: var(--pitch);
  justify-self: center;
  padding: .1rem .35rem;
  position: relative;
  font-variant-numeric: tabular-nums;
}
.t-what { font-weight: 600; margin: .25rem 0 .1rem; }
.t-when { color: var(--chalk-dim); margin: 0; }
.t-next .t-n { color: var(--red); }

/* ---------- Coin ---------- */
.contract {
  margin: 2.5rem 0 1rem;
  padding: 1.5rem;
  border: 1.5px solid var(--flood);
  border-radius: 14px;
  background: var(--pitch-deep);
  max-width: 44rem;
}
.contract-label { font-weight: 600; margin: 0 0 .75rem; }
.contract-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.contract code {
  font-family: var(--mono);
  font-size: .95rem;
  word-break: break-all;
  flex: 1 1 20rem;
  user-select: all;
  color: var(--chalk);
}
.contract-note { margin: 1rem 0 0; font-size: .9rem; color: var(--chalk-dim); }

.facts { margin: 1rem 0 1.5rem; padding-left: 1.2rem; max-width: var(--measure); }
.facts li { margin: 0 0 .6rem; }
.facts li::marker { color: var(--flood); }
.links-inline { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* ---------- Tokenomics ---------- */
.specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border-top: 1px solid var(--line);
}
.specs div { padding: 1.25rem 1.5rem 1.25rem 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--chalk-dim); font-size: .9rem; margin: 0 0 .25rem; }
.specs dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* ---------- How to buy ---------- */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  column-gap: 1.25rem;
  padding: 0 0 1.75rem;
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  font-family: var(--display);
  font-weight: 900;
  font-size: 2.75rem;
  line-height: .9;
  color: var(--flood);
}
.step-t { font-weight: 600; font-size: 1.15rem; margin: 0 0 .25rem; }
.steps li p:last-child { margin: 0; }
.warn {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--red);
  background: var(--pitch-deep);
}

/* ---------- FAQ ---------- */
.faq { max-width: 44rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.25rem 2.5rem 1.25rem 0;
  font-weight: 600;
  font-size: 1.1rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: .25rem; top: 50%;
  transform: translateY(-50%);
  font-family: var(--display); font-weight: 800; font-size: 1.75rem;
  color: var(--flood);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 1.25rem; margin: 0; }

/* ---------- Footer ---------- */
.foot {
  max-width: 52rem;
  border-top: 1px solid var(--line);
  padding: 3rem 0 4rem;
  font-size: .875rem;
  color: var(--chalk-dim);
}
.foot-links { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: 1rem; margin-bottom: 1.5rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 1.5rem);
  transform: translateX(-50%);
  background: var(--chalk);
  color: var(--pitch);
  font-weight: 600;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  z-index: 40;
}

/* ---------- Mobile: rail becomes a top bar ---------- */
@media (max-width: 860px) {
  .rail {
    position: sticky;
    top: 0; bottom: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: calc(env(safe-area-inset-top, 0px) + .75rem) 1rem .75rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  body::before {
    content: "";
    position: fixed; inset: 0 0 auto;
    height: env(safe-area-inset-top, 0px);
    background: var(--pitch-deep);
    z-index: 11;
  }
  .wordmark { font-size: 1.75rem; flex: none; }
  .rail nav { overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .rail nav::-webkit-scrollbar { display: none; }
  .nav { display: flex; margin: 0; gap: .25rem; }
  .nav a { white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; padding: .4rem .6rem; font-size: .9rem; }
  .nav a[aria-current="true"] { border-bottom-color: var(--flood); }
  .rail-foot { display: none; }
  html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 4.5rem); }

  main { margin-left: 0; padding: 0 1.25rem; }
  section { padding: 3.5rem 0 3rem; }
  section.hero { padding-top: 2.5rem; }
  .goal, .timeline li { grid-template-columns: 4.5rem 1fr; gap: 1rem; }
  .goal-n { font-size: 2.5rem; }
  .t-n { font-size: 1.75rem; }
  .timeline::before { left: 2.25rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .specs { grid-template-columns: repeat(2, 1fr); }
  .specs dd { font-size: 1.5rem; }
}
