/* ============================================
   STAKES GOLF — Design System
   Dark-first, lime green accent, premium athletic
   ============================================ */

:root {
  /* Colors — matches AppColors.swift */
  --primary: #8EFF71;
  --primary-dim: rgba(142, 255, 113, 0.15);
  --primary-glow: rgba(142, 255, 113, 0.3);
  --negative: #FF7162;
  --background: #0A0A0C;
  --surface: #141418;
  --surface-secondary: #1C1C22;
  --surface-elevated: #24242C;
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.5);
  --text-muted: rgba(255, 255, 255, 0.3);
  --divider: rgba(255, 255, 255, 0.08);
  --gold: #FFD700;

  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing — 8pt grid */
  --space-xxs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  --space-huge: 64px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* ============================================
   Reset & Base
   ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ============================================
   Navigation
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) 0;
  background: rgba(10, 10, 12, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--divider);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.1em;
  color: var(--primary);
}

.nav-cta {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--background);
  background: var(--primary);
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--primary-glow);
}

/* ============================================
   Hero
   ============================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px var(--space-lg) var(--space-huge);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--primary-dim) 0%, transparent 70%);
  pointer-events: none;
  animation: glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.7; transform: translateX(-50%) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--primary);
  background: var(--primary-dim);
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid rgba(142, 255, 113, 0.2);
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.8s ease both;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.8s ease 0.15s both;
}

.hero-accent {
  color: var(--primary);
}

.hero-subtitle {
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-cta-row {
  animation: fadeInUp 0.8s ease 0.45s both;
}

.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--background));
  pointer-events: none;
}

/* ============================================
   Shared Section Styles
   ============================================ */

.section {
  padding: var(--space-huge) 0;
  position: relative;
}

.section-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--primary);
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(20px);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
  opacity: 0;
  transform: translateY(20px);
}

/* ============================================
   What's Coming — Features Grid
   ============================================ */

.whats-coming {
  border-top: 1px solid var(--divider);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xxl);
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

.feature-card:hover {
  border-color: rgba(142, 255, 113, 0.15);
  background: var(--surface-secondary);
  transform: translateY(-2px);
}

.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-dim);
  border-radius: var(--radius-md);
  color: var(--primary);
  margin-bottom: var(--space-md);
}

.feature-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  margin-bottom: var(--space-xs);
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* ============================================
   Games Teaser — Marquee
   ============================================ */

.games-teaser {
  border-top: 1px solid var(--divider);
  text-align: center;
}

.games-subtitle {
  color: var(--text-secondary);
  font-size: clamp(16px, 2vw, 18px);
  max-width: 600px;
  margin: 0 auto var(--space-xxl);
  line-height: 1.7;
  opacity: 0;
  transform: translateY(20px);
}

.games-marquee-wrapper {
  overflow: hidden;
  margin: 0 calc(-1 * var(--space-lg));
  padding: var(--space-md) 0;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.games-marquee {
  display: flex;
  gap: var(--space-md);
  animation: marquee 30s linear infinite;
  width: max-content;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.game-pill {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--divider);
  padding: 12px 28px;
  border-radius: 999px;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.game-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-dim);
}

.games-footnote {
  color: var(--text-tertiary);
  font-size: 14px;
  margin-top: var(--space-xl);
  opacity: 0;
  transform: translateY(20px);
}

/* ============================================
   Waitlist CTA
   ============================================ */

.waitlist {
  border-top: 1px solid var(--divider);
}

.waitlist-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-xl);
  padding: var(--space-huge) var(--space-xl);
  text-align: center;
  overflow: hidden;
}

.waitlist-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary-dim) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.5;
}

.waitlist-card .section-title {
  position: relative;
  z-index: 1;
  opacity: 1;
  transform: none;
}

.waitlist-desc {
  position: relative;
  z-index: 1;
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 480px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
}

.waitlist-form {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
}

.form-row {
  display: flex;
  gap: var(--space-sm);
}

.form-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-primary);
  background: var(--surface-secondary);
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--primary);
}

.form-message {
  margin-top: var(--space-sm);
  font-size: 14px;
  min-height: 20px;
}

.form-message.success {
  color: var(--primary);
}

.form-message.error {
  color: var(--negative);
}

.waitlist-privacy {
  position: relative;
  z-index: 1;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: var(--space-md);
}

/* ============================================
   Buttons
   ============================================ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--background);
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 32px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 24px var(--primary-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-submit {
  flex-shrink: 0;
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================
   Footer
   ============================================ */

.footer {
  border-top: 1px solid var(--divider);
  padding: var(--space-xxl) 0 var(--space-xl);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-xxl);
  margin-bottom: var(--space-xl);
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: var(--space-xs);
}

.footer-tagline {
  color: var(--text-tertiary);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: var(--space-xxl);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-col-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-bottom: var(--space-xxs);
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--divider);
  padding-top: var(--space-lg);
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 13px;
}

/* ============================================
   Scroll Animations
   ============================================ */

.animate-in {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Stagger children */
.feature-card:nth-child(1) { transition-delay: 0s; }
.feature-card:nth-child(2) { transition-delay: 0.1s; }
.feature-card:nth-child(3) { transition-delay: 0.2s; }
.feature-card:nth-child(4) { transition-delay: 0.3s; }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 90vh;
    padding: 100px var(--space-md) var(--space-xxl);
  }

  .hero-title {
    font-size: 36px;
  }

  .section {
    padding: var(--space-xxl) 0;
  }

  .form-row {
    flex-direction: column;
  }

  .btn-submit {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--space-xl);
  }

  .footer-links {
    gap: var(--space-xl);
  }

  .waitlist-card {
    padding: var(--space-xxl) var(--space-md);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .hero-title {
    font-size: 32px;
  }

  .section-title {
    font-size: 28px;
  }

  .feature-card {
    padding: var(--space-lg);
  }
}

/* ============================================
   Legal Pages (shared)
   ============================================ */

.legal-page {
  padding: 120px 0 var(--space-huge);
}

.legal-page h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  margin-bottom: var(--space-xs);
}

.legal-date {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: var(--space-xxl);
}

.legal-page h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.legal-page p,
.legal-page li {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.legal-page ul {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.legal-page li {
  margin-bottom: var(--space-xs);
}

.legal-page a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-page a:hover {
  opacity: 0.8;
}
