:root {
  --bg:     #0a2429;
  --card:   #0B4650;
  --border: #1e6b78;
  --accent: #E6FF2B;
  --white:  #F9F7F2;
  --grey:   #7a8c8e;
  --win:    #6dbf8e;
  --loss:   #e05050;
  --amber:  #e6a820;

  --display: 'Space Grotesk', 'Inter', sans-serif;
  --font:    'Inter', sans-serif;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 22px;

  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-lg: 0 24px 64px rgba(0,0,0,0.45);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* ── Ambient glow + subtle noise texture on every page ── */
body::before {
  content: '';
  position: fixed; inset: -20% -20% auto -20%; height: 70vh;
  background:
    radial-gradient(ellipse 55% 60% at 20% 10%, rgba(230,255,43,0.055) 0%, transparent 60%),
    radial-gradient(ellipse 55% 60% at 85% 30%, rgba(30,107,120,0.45) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.035; pointer-events: none; z-index: 1; mix-blend-mode: overlay;
}
nav, main, .mobile-menu { position: relative; z-index: 2; }
footer { position: relative; z-index: 1; }

a { text-decoration: none; color: inherit; }
main { flex: 1; }

h1, h2, h3, .display { font-family: var(--display); letter-spacing: -0.02em; }

::selection { background: rgba(230,255,43,0.3); color: var(--white); }

/* Focus ring for accessibility */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  height: 72px;
  background: rgba(10, 36, 41, 0.7);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(30,107,120,0);
  transition: height 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}
nav.scrolled {
  height: 60px;
  background: rgba(10, 36, 41, 0.88);
  border-bottom-color: rgba(30,107,120,0.45);
}

.nav-left { display: flex; align-items: center; gap: 2rem; }

.nav-logo { display: flex; align-items: center; transition: transform 0.2s var(--ease); }
.nav-logo:hover { transform: rotate(-4deg); }
.nav-logo img {
  height: 36px;
  width: auto;
  border-radius: 8px;
  display: block;
}

.nav-links { display: flex; gap: 1.75rem; align-items: center; }

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--grey);
  transition: color 0.2s;
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--accent); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-divider {
  width: 1px; height: 18px;
  background: var(--border);
  display: none;
}
.nav-auth-links { display: none; gap: 1.5rem; align-items: center; }
.nav-auth-links a {
  font-size: 0.875rem; font-weight: 500;
  color: var(--grey); transition: color 0.2s;
}
.nav-auth-links a:hover, .nav-auth-links a.active { color: var(--white); }

/* ── NAV DROPDOWN ── */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  display: flex; align-items: center; gap: 0.3rem;
  font-size: 0.875rem; font-weight: 500; color: var(--grey);
  cursor: pointer; transition: color 0.2s;
  background: none; border: none; padding: 0; font-family: inherit;
  height: 64px;
}
.nav-dropdown-trigger:hover,
.nav-dropdown-trigger.active { color: var(--white); }
.nav-dropdown-trigger svg {
  width: 12px; height: 12px; transition: transform 0.2s;
}
.nav-dropdown:hover .nav-dropdown-trigger svg { transform: rotate(180deg); }
.nav-dropdown-menu {
  display: none;
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: rgba(10, 36, 41, 0.97);
  border: 1px solid rgba(30,107,120,0.5);
  border-radius: 12px;
  padding: 0.5rem;
  min-width: 210px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 0.6rem 0.875rem;
  border-radius: 8px;
  font-size: 0.85rem; font-weight: 500;
  color: var(--grey);
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  background: rgba(255,255,255,0.05);
  color: var(--white);
}
.nav-dropdown-menu .dropdown-desc {
  font-size: 0.75rem; color: var(--grey); opacity: 0.7;
  margin-top: 1px; font-weight: 400;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: #0B2A2E;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.85; }

/* ── STORE BADGES ── */
.store-badge { display: inline-block; transition: opacity 0.2s, transform 0.2s; }
.store-badge:hover { opacity: 0.85; transform: translateY(-2px); }
/* App Store SVG has minimal padding; Google Play PNG content area is ~70%
   of the full image, so 63px renders at the same visual height as 44px App Store. */
.badge-appstore { height: 44px; width: auto; display: block; }
.badge-googleplay { height: 63px; width: auto; display: block; }
/* Hero variant — slightly larger */
.store-badge-hero .badge-appstore { height: 52px; }
.store-badge-hero .badge-googleplay { height: 74px; }
.store-badges { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; justify-content: center; }

.hamburger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; cursor: pointer;
  background: none; border: none; padding: 4px;
}
.hamburger span {
  display: block; height: 2px; border-radius: 2px;
  background: var(--white); transition: transform 0.2s, opacity 0.2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed; top: 64px; left: 0; right: 0;
  background: rgba(10, 36, 41, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(30,107,120,0.4);
  flex-direction: column;
  z-index: 99;
  padding: 1rem 0;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 1rem; font-weight: 600; color: var(--grey);
  padding: 0.875rem clamp(1.5rem, 5vw, 4rem);
  border-bottom: 1px solid rgba(30,107,120,0.2);
  transition: color 0.2s, background 0.2s;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover, .mobile-menu a.active { color: var(--white); background: rgba(255,255,255,0.03); }
.mobile-menu .mobile-download {
  margin: 1rem clamp(1.5rem, 5vw, 4rem) 0.25rem;
  background: var(--accent); color: #0B2A2E;
  font-weight: 700; border-radius: 8px; text-align: center;
  padding: 0.75rem; border-bottom: none;
}
.mobile-menu .mobile-download:hover { background: var(--accent); opacity: 0.85; }

@media (max-width: 600px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-auth { display: none !important; }
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem clamp(1.5rem, 5vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo img {
  height: 28px;
  width: auto;
  border-radius: 6px;
  opacity: 0.85;
  display: block;
}

.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { font-size: 0.875rem; color: var(--grey); transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }
.footer-copy { font-size: 0.8rem; color: var(--grey); }

@media (max-width: 600px) {
  footer { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

/* ── SHARED COMPONENTS ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent); color: #0B2A2E;
  font-weight: 800; font-size: 1rem;
  padding: 0.875rem 2rem; border-radius: 12px;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), filter 0.2s var(--ease);
  box-shadow: 0 8px 28px rgba(230,255,43,0.25), inset 0 1px 0 rgba(255,255,255,0.35);
  position: relative;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(230,255,43,0.45), inset 0 1px 0 rgba(255,255,255,0.35); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(0) scale(0.98); transition-duration: 0.1s; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.02); color: var(--white);
  font-weight: 700; font-size: 1rem;
  padding: 0.875rem 2rem; border-radius: 12px;
  border: 1px solid var(--border);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn-secondary:hover { background: rgba(255,255,255,0.06); border-color: var(--grey); transform: translateY(-1px); }
.btn-secondary:active { transform: translateY(0) scale(0.98); transition-duration: 0.1s; }

.pill { font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.pill-win  { background: rgba(109,191,142,0.15); color: var(--win); }
.pill-draw { background: rgba(249,247,242,0.1);  color: var(--white); }
.pill-loss { background: rgba(224,80,80,0.15);   color: var(--loss); }

/* Reusable subtle eyebrow chip */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--accent);
  padding: 0.4rem 0.9rem; border-radius: 100px;
  background: rgba(230,255,43,0.06);
  border: 1px solid rgba(230,255,43,0.22);
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
}

.section-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(1.85rem, 4vw, 2.75rem); font-weight: 700;
  color: var(--white); line-height: 1.1; letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.section-sub {
  font-size: 1rem; color: var(--grey); line-height: 1.65; margin-bottom: 3rem;
}
.divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(30,107,120,0.6) 50%, transparent 100%);
  margin: 0;
}

/* ── Reusable card with glow hover ── */
.surface {
  background: linear-gradient(180deg, rgba(11,70,80,0.65) 0%, rgba(11,70,80,0.45) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  transition: transform 0.3s var(--ease), border-color 0.25s var(--ease), box-shadow 0.3s var(--ease);
}
.surface::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(230,255,43,0) 0%, rgba(230,255,43,0.35) 50%, rgba(230,255,43,0) 100%);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.surface:hover { transform: translateY(-3px); border-color: transparent; box-shadow: 0 14px 40px rgba(0,0,0,0.35); }
.surface:hover::before { opacity: 1; }

/* ── Reveal on scroll ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ── Inline SVG icon sprite ── */
.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: currentColor;
  stroke: currentColor;
  flex-shrink: 0;
}
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
