/* darts180 — landing page styles
   Tokens map onto the existing app design system; values pulled from
   the dartboard reference (home green, away red, neutral gold) so the
   page reads as "darts" without the prototype's monochrome palette.
   ---------------------------------------------------- */

:root {
  --bg: #1a1814;
  --bg-2: #23211a;
  --bg-3: #2c2922;
  --fg: #ece5d2;
  --fg-2: rgba(236, 229, 210, 0.72);
  --fg-3: rgba(236, 229, 210, 0.45);
  --line: rgba(236, 229, 210, 0.10);
  --line-strong: rgba(236, 229, 210, 0.22);

  /* Dartboard-extracted palette */
  --home: #1f8a4d;
  --home-deep: #0e4a28;
  --away: #c8302a;
  --away-deep: #7a1612;
  --sisal: #c8b079;
  --neutral: #e6b94a;

  --board-black: #181410;
  --board-cream: #efe7d2;

  --r-sm: 4px;
  --r-md: 8px;

  --font-display: "Bebas Neue", "Inter", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --t-tap: 80ms;
  --t-state: 200ms;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);

  --reveal-ease: cubic-bezier(0.16, 0.84, 0.24, 1);
  --reveal-dur: 1100ms;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--fg); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--neutral); outline-offset: 2px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.page-grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(to right, rgba(236,229,210,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(236,229,210,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mix-blend-mode: screen;
}

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: clamp(20px, 5vw, 48px); position: relative; z-index: 2; }

/* Type ---------------------------------------------------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg-3);
  margin: 0;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow-rule { display: inline-block; width: 20px; height: 2px; }
.eyebrow-home .eyebrow-rule { background: var(--home); }
.eyebrow-away .eyebrow-rule { background: var(--away); }
.eyebrow-neutral .eyebrow-rule { background: var(--neutral); }

.h-display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, 10vw, 120px);
  line-height: 0.88;
  letter-spacing: 0.01em;
  margin: 0;
  text-wrap: balance;
}
.h-section {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
.h-cta {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin: 0;
}
.lead {
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 56ch;
  text-wrap: pretty;
  margin: 0;
}

/* Header -------------------------------------------------- */
.site-header {
  position: relative; z-index: 3;
  padding-block: clamp(20px, 3vw, 28px);
}
.site-header .row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--fg);
}
.brand .word {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.01em;
  display: inline-flex; align-items: center;
}
.brand .word .zero-bull {
  width: 0.78em; height: 0.78em;
  margin: 0 0.5px;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--neutral);
  border: 1px solid rgba(230,185,74,0.35);
  border-radius: var(--r-sm);
  background: rgba(230,185,74,0.06);
}
.badge .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--neutral);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(230,185,74,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(230,185,74,0); }
}

/* Hero ---------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(32px, 6vw, 80px) clamp(64px, 9vw, 120px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
}
@media (min-width: 960px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}
.hero-copy { display: flex; flex-direction: column; gap: clamp(20px, 3vw, 28px); position: relative; z-index: 2; }
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  perspective: 1400px;
  perspective-origin: 50% 30%;
}
.hero-visual .dartboard-stage {
  width: 100%; height: 100%;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,0.55)) drop-shadow(0 8px 12px rgba(0,0,0,0.45));
}
.hero-visual .dartboard-svg {
  width: 100%; height: 100%;
  transform: rotateX(20deg);
  transform-style: preserve-3d;
}

/* Hero variant chips — game modes surfaced */
.hero-chips {
  list-style: none; margin: 4px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.hero-chips li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg-2);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.chip-dot {
  width: 6px; height: 6px; border-radius: 50%;
  flex: 0 0 auto;
}
.chip-dot-home { background: var(--home); box-shadow: 0 0 0 3px rgba(31,138,77,0.18); }
.chip-dot-away { background: var(--away); box-shadow: 0 0 0 3px rgba(200,48,42,0.18); }
.chip-dot-neutral { background: var(--neutral); box-shadow: 0 0 0 3px rgba(230,185,74,0.18); }

/* Form ---------------------------------------------------- */
.waitlist-form {
  position: relative; display: flex; flex-direction: column; gap: 10px; max-width: 520px;
}
.waitlist-form .field-row {
  display: flex; flex-direction: column; gap: 10px;
}
@media (min-width: 560px) {
  .waitlist-form .field-row { flex-direction: row; align-items: stretch; }
}
.waitlist-form input[type="email"] {
  flex: 1; min-width: 0; height: 52px; padding: 0 16px;
  font: 500 16px var(--font-sans);
  color: var(--fg);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color var(--t-state) var(--ease), background var(--t-state) var(--ease);
}
.waitlist-form input[type="email"]::placeholder { color: var(--fg-3); }
.waitlist-form input[type="email"]:hover { border-color: rgba(236,229,210,0.32); }
.waitlist-form input[type="email"]:focus {
  outline: none; border-color: var(--neutral);
  box-shadow: 0 0 0 2px rgba(230,185,74,0.35);
}
.waitlist-form input[aria-invalid="true"] { border-color: var(--away); }
.waitlist-form input:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
  position: relative;
  height: 52px; padding: 0 22px;
  font: 700 15px var(--font-sans);
  letter-spacing: 0.01em;
  color: #061a0e;
  background: var(--home);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background var(--t-tap) var(--ease), transform var(--t-tap) var(--ease);
}
.btn-primary:hover { background: #2bb066; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { background: var(--home-deep); color: rgba(236,229,210,0.6); cursor: not-allowed; }
.btn-primary .spinner {
  display: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(6,26,14,0.25); border-top-color: #061a0e;
  animation: spin 0.7s linear infinite;
  vertical-align: -3px; margin-right: 8px;
}
.waitlist-form[data-state="submitting"] .btn-primary .spinner { display: inline-block; }
.waitlist-form[data-state="submitting"] .btn-primary .label { opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-trust { font-size: 12px; color: var(--fg-3); margin: 0; }
.form-error { display: none; font-size: 13px; color: var(--away); margin: 0; }
.waitlist-form[data-state="error"] .form-error { display: block; }

.form-success {
  display: none;
  padding: 18px 20px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--home);
  border-radius: var(--r-md);
  color: var(--fg);
}
.form-success strong { font-weight: 700; }
.form-success p { margin: 4px 0 0; color: var(--fg-2); font-size: 14px; }
.waitlist-form[data-state="success"] .field-row,
.waitlist-form[data-state="success"] .form-trust,
.waitlist-form[data-state="success"] .form-error,
.waitlist-form[data-state="success"] .form-protect { display: none; }
.waitlist-form[data-state="success"] .form-success { display: block; animation: rise 500ms var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Anti-spam slot — clearly commented placeholder for Turnstile/hCaptcha/honeypot */
.form-protect { min-height: 0; }

/* Sections ----------------------------------------------- */
.section {
  padding-block: clamp(64px, 9vw, 112px);
  position: relative;
  border-bottom: 1px solid var(--line);
}
.section-head {
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: clamp(32px, 5vw, 48px);
  max-width: 720px;
}

/* Feature cards ------------------------------------------ */
.features {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }

.feature {
  position: relative;
  display: flex; flex-direction: column; gap: 18px;
  padding: 28px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--t-state) var(--ease), background var(--t-state) var(--ease);
}
.feature::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent, var(--home));
}
.feature-home { --accent: var(--home); }
.feature-away { --accent: var(--away); }
.feature-neutral { --accent: var(--neutral); }
.feature .icon-wrap {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  background: color-mix(in oklab, var(--accent) 15%, transparent);
  color: var(--accent);
}
.feature .icon-wrap svg { width: 26px; height: 26px; }
.feature .rule { height: 1px; background: var(--line); }
.feature h3 { font-family: var(--font-sans); font-weight: 700; font-size: 18px; margin: 0; }
.feature p { font-size: 14.5px; line-height: 1.55; color: var(--fg-2); margin: 0; }
.feature:hover { border-color: rgba(236,229,210,0.32); background: var(--bg-3); }

/* Narrative — with giant 180 glyph ----------------------- */
.narrative {
  background:
    radial-gradient(60% 90% at 90% 30%, rgba(200,48,42,0.05), transparent 70%),
    radial-gradient(50% 80% at 10% 70%, rgba(31,138,77,0.05), transparent 70%);
}
.narrative .wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
@media (min-width: 880px) {
  .narrative .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
}
.narrative-side { display: flex; flex-direction: column; gap: 24px; }
.narrative-stat { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(120px, 14vw, 220px);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, var(--home) 0%, var(--away) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  font-size: 11px; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: 0.16em; font-weight: 700;
  max-width: 24ch;
}
.narrative-body { display: flex; flex-direction: column; gap: 20px; }
.narrative-body p {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--fg-2);
  margin: 0; max-width: 60ch;
}
.signature {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 12px;
  color: var(--fg-3);
  font-size: 13px; letter-spacing: 0.04em;
}
.signature .chalk { width: 28px; height: 1px; background: var(--sisal); }

/* CTA band ----------------------------------------------- */
.cta-band {
  position: relative;
  padding-block: clamp(64px, 9vw, 112px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60% 80% at 20% 50%, rgba(31,138,77,0.07), transparent 70%),
    radial-gradient(50% 80% at 90% 50%, rgba(200,48,42,0.06), transparent 70%);
}
.cta-band .wrap {
  display: grid; gap: clamp(20px, 3vw, 56px);
  grid-template-columns: 1fr;
}
@media (min-width: 880px) {
  .cta-band .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
}

/* Footer ------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line-strong);
  padding-block: 36px 56px;
  color: var(--fg-3);
  font-size: 13px;
}
.site-footer .row {
  display: flex; flex-direction: column; gap: 16px;
  align-items: flex-start; justify-content: space-between;
}
@media (min-width: 720px) {
  .site-footer .row { flex-direction: row; align-items: center; }
}
.site-footer a { color: var(--fg-2); border-bottom: 1px solid transparent; transition: color var(--t-state), border-color var(--t-state); }
.site-footer a:hover { color: var(--fg); border-bottom-color: var(--line-strong); }
.site-footer .meta { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.site-footer .meta .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }

/* Dartboard assembly + dart-throw animation -------------- */
.dartboard-svg .db-slice,
.dartboard-svg .db-num,
.dartboard-svg .db-band,
.dartboard-svg .db-wire,
.dartboard-svg .db-ring,
.dartboard-svg .db-bull,
.dartboard-svg .db-dart { opacity: 0; }

.dartboard-stage.is-playing .db-slice {
  animation: db-fade-in 700ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: var(--delay);
}
.dartboard-stage.is-playing .db-band {
  animation: db-fade-in 660ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: var(--delay);
}
.dartboard-stage.is-playing .db-num {
  animation: db-num-in 500ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: var(--delay);
}
.dartboard-stage.is-playing .db-wire {
  animation: db-wire-in 420ms ease forwards;
  animation-delay: var(--delay);
}
.dartboard-stage.is-playing .db-ring {
  stroke: var(--sisal);
  stroke-width: 1.2;
  animation: db-ring-in 1000ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: 2050ms;
  stroke-dasharray: 1800;
  stroke-dashoffset: 1800;
}
.dartboard-stage.is-playing .db-bull {
  animation: db-bull-in 700ms cubic-bezier(0.2, 1.6, 0.2, 1) forwards;
  animation-delay: 2300ms;
  transform-origin: 300px 300px;
  transform-box: view-box;
}

@keyframes db-fade-in { to { opacity: 1; } }
@keyframes db-num-in { 0% { opacity: 0; } 100% { opacity: 0.85; } }
@keyframes db-wire-in { to { opacity: 0.55; } }
@keyframes db-ring-in { to { stroke-dashoffset: 0; opacity: 0.55; } }
@keyframes db-bull-in {
  0% { opacity: 0; transform: scale(0.4); }
  60% { opacity: 1; transform: scale(1.15); }
  100% { opacity: 1; transform: scale(1); }
}

.db-dart.impact { animation: db-impact 380ms ease-out; }
@keyframes db-impact {
  0%   { transform: translate(0,0) scale(1) rotate(0); }
  20%  { transform: translate(0,0) scale(1) rotate(-1.5deg); }
  50%  { transform: translate(0,0) scale(1) rotate(1deg); }
  100% { transform: translate(0,0) scale(1) rotate(0); }
}

/* Scroll reveal ------------------------------------------ */
.reveal,
.reveal-left,
.reveal-right,
.reveal-up,
.reveal-stagger > *,
.reveal-children > * {
  opacity: 0;
  filter: blur(6px);
  transition:
    opacity var(--reveal-dur) var(--reveal-ease),
    transform var(--reveal-dur) var(--reveal-ease),
    filter var(--reveal-dur) var(--reveal-ease);
  will-change: opacity, transform, filter;
}

.reveal,
.reveal-up { transform: translate3d(0, 40px, 0) scale(0.985); }
.reveal-left { transform: translate3d(-48px, 0, 0); }
.reveal-right { transform: translate3d(48px, 0, 0); }
.reveal-stagger > *,
.reveal-children > * { transform: translate3d(0, 44px, 0) scale(0.97); }

.reveal.is-visible,
.reveal-up.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible,
.reveal-stagger.is-visible > *,
.reveal-children.is-visible > * {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1);
}

.reveal-stagger.is-visible > *:nth-child(1),
.reveal-children.is-visible > *:nth-child(1) { transition-delay: 60ms; }
.reveal-stagger.is-visible > *:nth-child(2),
.reveal-children.is-visible > *:nth-child(2) { transition-delay: 180ms; }
.reveal-stagger.is-visible > *:nth-child(3),
.reveal-children.is-visible > *:nth-child(3) { transition-delay: 300ms; }
.reveal-stagger.is-visible > *:nth-child(4),
.reveal-children.is-visible > *:nth-child(4) { transition-delay: 420ms; }
.reveal-stagger.is-visible > *:nth-child(5),
.reveal-children.is-visible > *:nth-child(5) { transition-delay: 540ms; }
.reveal-stagger.is-visible > *:nth-child(6),
.reveal-children.is-visible > *:nth-child(6) { transition-delay: 660ms; }

.section-head .eyebrow-rule {
  transition: width 900ms 200ms var(--reveal-ease);
  width: 0;
}
.section-head.is-visible .eyebrow-rule { width: 18px; }

.reveal-stagger.is-visible > .feature {
  animation: featureGlow 1400ms var(--reveal-ease);
}
@keyframes featureGlow {
  0%   { box-shadow: 0 0 0 0 rgba(31, 138, 77, 0); }
  40%  { box-shadow: 0 12px 32px -16px rgba(31, 138, 77, 0.35); }
  100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}

/* Reduced motion ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal, .reveal-left, .reveal-right, .reveal-up,
  .reveal-stagger > *, .reveal-children > * {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .section-head .eyebrow-rule { width: 18px !important; }
  .dartboard-stage .db-slice,
  .dartboard-stage .db-num,
  .dartboard-stage .db-band,
  .dartboard-stage .db-wire,
  .dartboard-stage .db-ring,
  .dartboard-stage .db-bull,
  .dartboard-stage .db-dart { opacity: 1 !important; }
}
