/* WC26 Soccer Football Manager - landing page.
   Colours mirror src/theme.ts: a dark "floodlit stadium at night" aesthetic -
   midnight backgrounds, vivid pitch green, a bright green accent. */

:root {
  --bg: #0A0E14;
  --bg-alt: #0E141C;
  --card: #141B26;
  --card-alt: #1B2433;
  --elevated: #202C3D;
  --border: #26303F;
  --border-strong: #37445A;

  --fg: #F4F7FB;
  --muted: #9AA7B8;
  --faint: #5E6B7E;

  --pitch: #0FA958;
  --pitch-dark: #0B6E37;
  --pitch-line: #E8F1EC;
  /* Accent: bright pitch green (replaces the old gold trophy accent). */
  --gold: #2EE07E;
  --gold-dark: #0FA958;

  --primary-fg: #04150B;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  --maxw: 1080px;
  --maxw-narrow: 720px;

  /* Native system fonts only - no third-party font CDN, matching the app's
     own 'System' font choice in src/theme.ts. Keeps the site tracker-free. */
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* guard against any incidental horizontal scroll */
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.1; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: var(--maxw-narrow); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--primary-fg);
  padding: 10px 16px;
  border-radius: var(--r-sm);
  z-index: 200;
}
.skip:focus { left: 16px; top: 16px; }

.accent { color: var(--gold); }
.grad {
  background: linear-gradient(100deg, var(--pitch) 0%, #2ee07e 55%, #86F4BC 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Eyebrow ──────────────────────────────────────────────────────────── */
.eyebrow {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}
.eyebrow .rule {
  height: 1px;
  width: 28px;
  background: linear-gradient(90deg, transparent, var(--gold-dark));
  flex: 0 0 auto;
}
.eyebrow .rule:last-child { transform: scaleX(-1); }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn--gold {
  background: var(--gold);
  color: var(--primary-fg);
  box-shadow: 0 8px 24px -8px rgba(46, 224, 126, .55);
}
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(46, 224, 126, .7); }
.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
}
.btn--ghost:hover { border-color: var(--pitch); color: var(--pitch); transform: translateY(-2px); }

/* App Store badge - Apple's official "Download on the App Store" artwork.
   Shown dimmed with a "Coming soon" caption until APP_STORE_URL is set. */
.store-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.store-badge {
  display: inline-flex;
  border-radius: 9px; /* matches the badge's own rounded corners for a clean focus ring */
  transition: transform .15s ease, opacity .15s ease;
}
.store-badge img {
  display: block;
  width: 180px;
  height: auto;
}
.store-badge[aria-disabled="true"] { opacity: .85; cursor: default; }
.store-badge:not([aria-disabled="true"]):hover { transform: translateY(-2px); }
.store-badge--lg img { width: 200px; }
.store-soon {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ── Nav ──────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 20, .72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.brand__mark { font-size: 20px; }
.brand__accent { color: var(--gold); }
.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  margin-right: 8px;
}
.nav__links a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  transition: color .15s ease;
}
.nav__links a:hover { color: var(--fg); }
.nav__cta { padding: 9px 18px; font-size: 14px; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav__mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.nav__mobile a {
  padding: 12px 4px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.nav__mobile a:last-child { border-bottom: 0; margin-top: 10px; text-align: center; color: var(--primary-fg); }
.nav__mobile.open { display: flex; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 84px;
  border-bottom: 1px solid var(--border);
}
.hero__pitch {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(15, 169, 88, .05) 0 80px, rgba(15, 169, 88, .09) 80px 160px);
  -webkit-mask: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent);
          mask: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent);
  opacity: .6;
}
.hero__glow {
  position: absolute;
  top: -240px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(15, 169, 88, .28), transparent 62%);
  filter: blur(8px);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  text-align: center;
}
.hero .eyebrow { justify-content: center; }
.hero__title {
  font-size: clamp(33px, 7.6vw, 76px);
  font-weight: 900;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
}
.hero__lead {
  max-width: 640px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(16px, 2.4vw, 19px);
}
.hero__cta {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  margin: 34px 0 14px;
}
.hero__play {
  font-size: 16px;
  padding: 16px 32px;
}
.hero__note {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--faint);
  margin: 0;
}

.stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 680px;
  margin: 52px auto 0;
  padding: 0;
}
.stats li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.stats__num {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--gold);
}
.stats__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

/* ── Sections ─────────────────────────────────────────────────────────── */
.section { padding: 92px 0; }
.section--alt { background: var(--bg-alt); }
.section__title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  max-width: 18ch;
  margin-bottom: 16px;
}
.section__lead {
  color: var(--muted);
  font-size: clamp(15px, 2.2vw, 18px);
  max-width: 56ch;
  margin: 0 0 44px;
}

/* ── Feature grid ─────────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: linear-gradient(180deg, var(--card), var(--bg-alt));
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px 24px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .8);
}
.card__icon {
  font-size: 28px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: rgba(15, 169, 88, .12);
  border: 1px solid rgba(15, 169, 88, .25);
  margin-bottom: 18px;
}
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* ── Steps ────────────────────────────────────────────────────────────── */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 0;
  margin: 0;
}
.step {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 22px 22px;
}
.step__num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-pill);
  background: var(--pitch);
  color: var(--primary-fg);
  font-weight: 800;
  font-size: 17px;
  margin-bottom: 16px;
}
.step h3 { font-size: 17px; margin-bottom: 7px; }
.step p { color: var(--muted); font-size: 14px; margin: 0; }

/* ── FAQ ──────────────────────────────────────────────────────────────── */
.faq { display: grid; gap: 12px; }
.faq__item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.faq__item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-weight: 600;
  font-size: 22px;
  color: var(--pitch);
  transition: transform .2s ease;
  flex: 0 0 auto;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: 14.5px;
}

/* ── CTA band ─────────────────────────────────────────────────────────── */
.cta {
  position: relative;
  overflow: hidden;
  padding: 88px 0;
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(11, 110, 55, .55), transparent 60%),
    linear-gradient(180deg, var(--pitch-dark), #07351c);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta__title {
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.cta__lead { color: rgba(244, 247, 251, .85); font-size: 18px; margin: 0 0 30px; }
.cta__inner .store-soon { color: #eafff2; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.footer { background: var(--bg); padding: 60px 0 36px; }
.footer__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
}
.footer__brand p {
  color: var(--muted);
  font-size: 14px;
  max-width: 40ch;
  margin: 14px 0 0;
}
.footer__links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.footer__heading {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--faint);
  margin: 0 0 14px;
  font-weight: 700;
}
.footer__links a {
  display: block;
  color: var(--muted);
  font-size: 14px;
  padding: 5px 0;
  transition: color .15s ease;
}
.footer__links a:hover { color: var(--pitch); }
.footer__bottom {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
  align-items: baseline;
}
.footer__bottom p { margin: 0; font-size: 12px; color: var(--faint); }
.footer__disclaimer { max-width: 62ch; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .hero { padding: 72px 0 64px; }
  /* Decouple mobile type from vw so sizing is deterministic on small screens. */
  .hero__title { font-size: 36px; }
  .section__title { font-size: 28px; }
  .cta__title { font-size: 30px; }
  .stats__num { font-size: 24px; }
  .section { padding: 68px 0; }
  .grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
}
