/* ═══════════════════════════════════════════════════════════════
   ScoreTally Marketing Site — Dark Theme
   ═══════════════════════════════════════════════════════════════ */

/* ─── Tokens ─────────────────────────────────────────────────── */
:root {
  --bg-deep: #0d0d1a;
  --bg-surface: #1a1a2e;
  --bg-card: rgba(26, 26, 46, 0.8);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-glow: rgba(0, 128, 128, 0.3);
  --text-primary: #f0f0f0;
  --text-secondary: #8b8b9e;
  --text-dim: #5a5a6e;
  --accent: #008080;
  --accent-light: #00b3b3;
  --accent-glow: rgba(0, 128, 128, 0.25);
  --surface-dimmed: #2a2a3e;
  --error: #E53935;
  --success: #4CAF50;

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

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --section-padding: 100px 24px;
  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--accent-light);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* ─── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: var(--section-padding);
  position: relative;
}

/* ─── Navigation ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 24px;
  background: url('../assets/bg_nonbirdie_ub.png') no-repeat center/cover;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Darken overlay so text is readable on bg image */
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(13, 13, 26, 0.6);
  backdrop-filter: blur(6px);
}

.nav > * {
  position: relative;
  z-index: 1;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-brand img {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* ─── Hero ───────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0, 128, 128, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 179, 179, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 80%, rgba(0, 100, 100, 0.1) 0%, transparent 50%);
  animation: meshDrift 12s ease-in-out infinite alternate;
}

/* Birdie shuttlecock decoration — both sides */
.hero::after {
  content: '';
  position: absolute;
  right: 3%;
  top: 50%;
  transform: translateY(-50%);
  width: 320px;
  height: 320px;
  background: url('../assets/birdie02_ray1.png') no-repeat center/contain;
  opacity: 0.3;
  pointer-events: none;
}

.hero-decor-left {
  position: absolute;
  left: 3%;
  top: 50%;
  transform: translateY(-50%) scaleX(-1);
  width: 280px;
  height: 280px;
  opacity: 0.25;
  pointer-events: none;
}

@keyframes meshDrift {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.05) translate(-2%, 3%); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 32px;
  position: relative;
  /* Fixed height to prevent layout shift — fits longest headline at largest size */
  height: 4.8em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-headline .cycle-text {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 16px;
}

.hero-headline .cycle-text.active {
  opacity: 1;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── CTA Button ─────────────────────────────────────────────── */
.btn-cta {
  display: inline-block;
  padding: 14px 36px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px var(--accent-glow);
  text-decoration: none;
}

.btn-cta:hover {
  background: var(--accent-light);
  box-shadow: 0 0 35px var(--accent-glow);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-cta--pulse {
  animation: pulse 2.5s infinite;
}

.btn-cta--secondary {
  background: transparent;
  border: 2px solid var(--accent);
  box-shadow: none;
}

.btn-cta--secondary:hover {
  background: rgba(0, 128, 128, 0.15);
  box-shadow: 0 0 20px var(--accent-glow);
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 40px rgba(0, 128, 128, 0.4); }
}

/* ─── Sports Row ─────────────────────────────────────────────── */
.sports-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.sport-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 32px;
  text-align: center;
  transition: all 0.3s ease;
  min-width: 150px;
}

.sport-card--active {
  border-color: var(--border-glow);
  box-shadow: 0 0 25px var(--accent-glow);
}

.sport-card--active:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 40px var(--accent-glow);
}

.sport-card--dimmed {
  opacity: 0.4;
  border-color: var(--surface-dimmed);
}

.sport-card__icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.sport-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}

.sport-card__status {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ─── Section Headers ────────────────────────────────────────── */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 60px;
  padding-top: 40px;
}

.section-title span {
  color: var(--accent-light);
}

/* ─── Feature Cards ──────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 4px 30px rgba(0, 128, 128, 0.12);
  transform: translateY(-4px);
}

.feature-card__icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature-card__desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ─── How It Works ───────────────────────────────────────────── */
.steps {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.step {
  text-align: center;
  max-width: 250px;
  position: relative;
}

.step__number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 20px var(--accent-glow);
}

.step__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.step__desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Connecting line between steps (desktop) */
.steps .step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 28px;
  right: -24px;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* ─── Subsection Title ───────────────────────────────────────── */
.subsection-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 32px;
  color: var(--text-primary);
}

/* Flow variant — wraps for 5 steps */
.steps--flow {
  flex-wrap: wrap;
  gap: 24px;
}

.steps--flow .step {
  min-width: 140px;
  max-width: 180px;
}

/* ─── Banner ─────────────────────────────────────────────────── */
.banner-img {
  text-align: center;
  margin: 20px 0;
}

.banner-img img {
  width: 100%;
  max-width: 800px;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* ─── Screenshots ────────────────────────────────────────────── */
.screenshots {
  text-align: center;
}

.screenshots-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 16px 0 24px;
}

.screenshots-scroll::-webkit-scrollbar {
  height: 6px;
}

.screenshots-scroll::-webkit-scrollbar-track {
  background: var(--bg-surface);
  border-radius: 3px;
}

.screenshots-scroll::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

.screenshot-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: 220px;
}

.screenshot-item img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
}

.screenshot-caption {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
}

/* ─── Ad Slots ───────────────────────────────────────────────── */
.ad-slot {
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  padding: 4px;
  box-shadow: 0 0 20px rgba(0, 128, 128, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.ad-slot--led {
  border-radius: 4px;
  border-color: rgba(0, 128, 128, 0.2);
  max-width: 728px;
  height: 90px;
}

.ad-slot--sign {
  max-width: 300px;
  height: 250px;
  border-radius: var(--radius-md);
}

.ad-slot--screen {
  max-width: 336px;
  height: 280px;
  border-radius: var(--radius-md);
  border-width: 3px;
  border-color: var(--surface-dimmed);
}

.ad-slot__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.ad-slot__content img {
  width: 40px;
  height: 40px;
  opacity: 0.7;
}

.ad-slot__content span {
  color: var(--accent-light);
  font-weight: 500;
}

/* Branded ad — birdie on bg_nonbirdie background */
.ad-slot__branded {
  background: url('../assets/bg_nonbirdie_portrait.webp') no-repeat center/cover;
  border-radius: inherit;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
}

.ad-slot__branded::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(13, 13, 26, 0.4);
  border-radius: inherit;
}

.ad-slot__branded > * {
  position: relative;
  z-index: 1;
}

.ad-slot__branded img {
  width: 48px;
  height: 48px;
  opacity: 1;
}

.ad-slot__branded span {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* ─── Footer ─────────────────────────────────────────────────── */
.footer {
  padding: 60px 24px;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

.footer-cta {
  margin-bottom: 40px;
}

.footer-cta__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer-contact {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: 20px;
}

/* ─── Scroll Animations ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: none; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px 16px;
  }

  .nav-links {
    display: none; /* hamburger menu in future */
  }

  .hero-headline {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
    height: 6em;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

  .steps .step::after {
    display: none;
  }

  .ad-slot--led {
    max-width: 320px;
    height: 50px;
  }

  .hero::after {
    display: none;
  }

  .hero-decor-left {
    display: none;
  }

  .sports-row {
    gap: 12px;
  }

  .sport-card {
    padding: 16px 20px;
    min-width: 130px;
  }
}

@media (max-width: 380px) {
  .hero-headline {
    font-size: 1.6rem;
  }

  .btn-cta {
    padding: 12px 28px;
    font-size: 0.95rem;
  }
}
