/* Buddies Bet Tracker — marketing + legal site. Brand tokens mirror the app's
   design system (src/constants/theme.ts). */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  --bg-outer: #eee7d9;
  --bg-screen: #f9f5eb;
  --navy: #132b5a;
  --navy-shadow: #041335;
  --text-primary: #162537;
  --text-secondary: #4d5969;
  --text-tertiary: #6a727d;
  --green: #269143;
  --green-text: #005f1d;
  --orange: #fa6e1d;
  --orange-text: #bd4600;
  --card: #fcfcfc;
  --hairline: #272e3826;
  --radius-card: 14px;
  --radius-button: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background: var(--bg-outer);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: 'Archivo Black', 'Poppins', sans-serif; font-weight: 400; line-height: 1.15; color: var(--text-primary); }

a { color: var(--navy); }
a:hover { color: var(--orange-text); }

/* Header / nav */
.site-header {
  background: var(--bg-screen);
  border-bottom: 1px solid var(--hairline);
  position: sticky; top: 0; z-index: 10;
}
.nav {
  max-width: 860px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span { font-family: 'Archivo Black', sans-serif; font-size: 17px; color: var(--navy); }
.nav-links { display: flex; gap: 18px; flex-wrap: wrap; }
.nav-links a { font-weight: 600; font-size: 14px; text-decoration: none; color: var(--text-secondary); }
.nav-links a:hover { color: var(--navy); }

/* Hero */
.hero { background: var(--bg-screen); padding: 72px 0 64px; text-align: center; }
.hero img.icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 12px 30px rgba(4,19,53,0.18); margin-bottom: 26px; }
.hero h1 { font-size: clamp(30px, 6vw, 46px); margin-bottom: 16px; }
.hero .tagline { font-size: clamp(17px, 2.6vw, 21px); color: var(--text-secondary); max-width: 620px; margin: 0 auto 30px; }
.btn-appstore {
  display: inline-block; background: var(--navy); color: #fff;
  font-weight: 700; font-size: 13px; letter-spacing: 0.4px;
  padding: 12px 22px; border-radius: var(--radius-button);
  text-decoration: none;
}

/* Sections */
section.block { padding: 56px 0; }
section.block.alt { background: var(--bg-screen); }
.block h2 { font-size: clamp(24px, 4vw, 32px); margin-bottom: 10px; text-align: center; }
.block .sub { text-align: center; color: var(--text-secondary); max-width: 620px; margin: 0 auto 34px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius-card); padding: 22px;
}
.card h3 { font-size: 17px; margin-bottom: 8px; color: var(--navy); }
.card p { color: var(--text-secondary); font-size: 14px; }

.games { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 680px; margin: 0 auto; }
.game-chip {
  background: var(--card); border: 1px solid var(--hairline); text-decoration: none;
  border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: 14px; color: var(--navy);
  transition: border-color 0.15s ease;
}
.game-chip:hover { border-color: var(--navy); color: var(--navy); }

.signup { text-align: center; }
.signup .btn-appstore { margin-top: 22px; }

.disclaimer-strip {
  background: var(--bg-outer); border-top: 1px solid var(--hairline);
  padding: 22px 0; text-align: center;
}
.disclaimer-strip p { color: var(--text-tertiary); font-size: 13px; max-width: 720px; margin: 0 auto; }

/* Footer */
footer.site-footer { background: var(--navy); color: #cdd6e6; padding: 34px 0; }
footer.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; }
footer.site-footer a { color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; margin-left: 18px; }
footer.site-footer a:first-child { margin-left: 0; }
footer.site-footer .copy { font-size: 13px; color: #9fb0cc; }

/* Legal / doc pages */
.doc { background: var(--bg-screen); padding: 48px 0 72px; min-height: 60vh; }
.doc h1 { font-size: clamp(26px, 5vw, 36px); margin-bottom: 6px; }
.doc .updated { color: var(--text-tertiary); font-size: 14px; margin-bottom: 30px; }
.doc h2 { font-size: 20px; margin: 30px 0 10px; color: var(--navy); }
.doc p, .doc li { color: var(--text-secondary); font-size: 15px; margin-bottom: 12px; }
.doc ul { padding-left: 22px; margin-bottom: 12px; }
.doc strong { color: var(--text-primary); }
.doc .backhome { display: inline-block; margin-bottom: 26px; font-weight: 600; text-decoration: none; }

/* FAQ */
.faq-item { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 20px; margin-bottom: 14px; }
.faq-item h3 { font-size: 16px; color: var(--navy); margin-bottom: 8px; }
.faq-item p { color: var(--text-secondary); font-size: 14px; }

.contact-card { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 26px; text-align: center; margin-bottom: 30px; }
.contact-card a { font-family: 'Archivo Black', sans-serif; font-size: 20px; }

/* ===== Marketing pages v2 (home, games hub, game detail, blog) ===== */

.wrap-wide { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header nav CTA — a compact version of .btn-appstore that fits inline in the nav bar */
.nav-links { align-items: center; }
.nav-cta {
  display: inline-block; background: var(--navy); color: #fff !important;
  font-weight: 700; font-size: 13px; text-decoration: none;
  padding: 9px 16px; border-radius: var(--radius-button);
}
.nav-cta:hover { background: var(--navy-shadow); }

/* Eyebrow pill used above hero / section headlines */
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-tint, rgba(38,145,67,0.12)); color: var(--green-text);
  font-weight: 700; font-size: 12px; letter-spacing: 0.4px; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 18px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* Hero v2 — two column: copy left, phone screenshot right */
.hero-v2 { background: var(--bg-screen); padding: 64px 0 0; overflow: hidden; }
.hero-v2 .hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center;
}
.hero-v2 h1 { font-size: clamp(32px, 4.6vw, 50px); margin-bottom: 18px; text-align: left; }
.hero-v2 .tagline { font-size: clamp(16px, 1.8vw, 19px); color: var(--text-secondary); margin: 0 0 28px; max-width: 480px; }
.hero-v2 .cta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-v2 .cta-fineprint { font-size: 13px; color: var(--text-tertiary); }
.hero-v2 .hero-art { text-align: center; position: relative; }
.hero-v2 .hero-art::before {
  content: ''; position: absolute; inset: 8% 18%; z-index: 0;
  background: radial-gradient(closest-side, rgba(250,110,29,0.20), rgba(250,110,29,0) 70%);
}

/* Phone screenshot artwork — shared by hero + feature rows */
.phone-shot { position: relative; z-index: 1; max-width: 280px; width: 100%; height: auto; display: block; filter: drop-shadow(0 24px 40px rgba(4,19,53,0.22)); }
.hero-v2 .phone-shot { max-width: 320px; margin: 0 auto; }

/* Feature row — alternating image/copy sections used for the leaderboard,
   live-scoring, and settle-up story blocks. */
.feature-row { padding: 64px 0; }
.feature-row .wrap-wide { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature-row.reverse .wrap-wide { direction: rtl; }
.feature-row.reverse .wrap-wide > * { direction: ltr; }
.feature-row .feature-art { text-align: center; }
.feature-row h2 { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 14px; text-align: left; }
.feature-row p { color: var(--text-secondary); font-size: 16px; margin-bottom: 14px; }
.feature-row ul { padding-left: 20px; color: var(--text-secondary); font-size: 15px; }
.feature-row li { margin-bottom: 8px; }
.feature-row.alt { background: var(--bg-screen); }

/* Differentiator — the season-leaderboard callout, styled a notch louder
   than a standard feature row since it's the core "no one else has this" claim. */
.differentiator { background: var(--navy); color: #fff; padding: 72px 0; }
.differentiator .wrap-wide { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.differentiator .eyebrow { background: rgba(255,255,255,0.14); color: #fff; }
.differentiator .eyebrow .dot { background: var(--green); }
.differentiator h2 { color: #fff; font-size: clamp(26px, 3.6vw, 36px); text-align: left; margin-bottom: 14px; }
.differentiator p { color: #cdd6e6; font-size: 16px; margin-bottom: 20px; }
.differentiator ul { list-style: none; }
.differentiator li { display: flex; align-items: flex-start; gap: 10px; color: #e7ecf5; font-size: 15px; margin-bottom: 12px; }
.differentiator li::before { content: '✓'; color: var(--green); font-weight: 700; flex: 0 0 auto; }
.differentiator .phone-shot { filter: drop-shadow(0 24px 44px rgba(0,0,0,0.4)); max-width: 300px; margin: 0 auto; }

/* Games showcase grid on the home page */
.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; max-width: 960px; margin: 0 auto; }
.game-tile {
  display: block; background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius-card); padding: 16px 18px; text-decoration: none;
  transition: border-color 0.15s ease;
}
.game-tile:hover { border-color: var(--navy); }
.game-tile strong { display: block; font-size: 15px; color: var(--navy); margin-bottom: 4px; }
.game-tile span { display: block; font-size: 13px; color: var(--text-secondary); }

/* Callout box — used to preview the incoming Games hub / guide links */
.callout {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-card);
  padding: 20px 24px; max-width: 680px; margin: 30px auto 0;
}
.callout p { margin: 0; font-size: 14px; color: var(--text-secondary); }
.callout strong { color: var(--text-primary); }
.callout a.learn-more { font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; }

/* Social proof placeholder — honest "just launched" framing, no fabricated quotes */
.proof-card {
  background: var(--card); border: 1px dashed var(--hairline); border-radius: var(--radius-card);
  padding: 34px; text-align: center; max-width: 560px; margin: 0 auto;
}
.proof-card .stars { color: var(--orange); font-size: 20px; letter-spacing: 3px; margin-bottom: 14px; }
.proof-card p { color: var(--text-secondary); font-size: 15px; margin-bottom: 14px; }
.proof-card a { font-weight: 700; text-decoration: none; }

/* ===== Game detail page (/games/<slug>/) ===== */

.game-hero { background: var(--bg-screen); padding: 40px 0 56px; }
.breadcrumb { font-size: 13px; color: var(--text-tertiary); margin-bottom: 18px; }
.breadcrumb a { color: var(--text-tertiary); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { color: var(--navy); }
.game-hero h1 { font-size: clamp(28px, 4.4vw, 42px); text-align: left; margin-bottom: 14px; max-width: 640px; }
.game-hero .tagline { font-size: 17px; color: var(--text-secondary); max-width: 600px; margin: 0 0 26px; }

.game-body { padding: 8px 0 60px; }
.game-body .wrap { max-width: 720px; }
.game-body h2 { font-size: 22px; margin: 44px 0 12px; color: var(--navy); text-align: left; }
.game-body h2:first-child { margin-top: 0; }
.game-body p { color: var(--text-secondary); font-size: 16px; margin-bottom: 14px; }
.game-body ul { padding-left: 22px; color: var(--text-secondary); font-size: 16px; margin-bottom: 14px; }
.game-body li { margin-bottom: 8px; }

.example-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-card); overflow: hidden; margin-bottom: 16px; }
.example-table th, .example-table td { padding: 12px 16px; text-align: left; font-size: 14px; }
.example-table th { background: var(--bg-screen); color: var(--text-tertiary); font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; }
.example-table td { border-top: 1px solid var(--hairline); color: var(--text-primary); }
.example-table td.win { color: var(--green-text); font-weight: 700; }

.result-card { background: var(--navy); color: #fff; border-radius: var(--radius-card); padding: 22px 24px; margin-bottom: 30px; }
.result-card strong { color: #fff; }
.result-card p { color: #cdd6e6; margin: 0; font-size: 15px; }

.game-shot { background: var(--bg-screen); padding: 50px 0; text-align: center; }
.game-shot .phone-shot { max-width: 300px; }
.game-shot .caption { color: var(--text-tertiary); font-size: 14px; margin-top: 16px; }

.game-cta { padding: 56px 0; text-align: center; }
.game-cta h2 { text-align: center; }

@media (max-width: 760px) {
  .hero-v2 .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-v2 h1, .hero-v2 .tagline { text-align: center; margin-left: auto; margin-right: auto; }
  .hero-v2 .cta-row { justify-content: center; }
  .hero-v2 .hero-art { margin-top: 36px; }
  .feature-row .wrap-wide, .differentiator .wrap-wide { grid-template-columns: 1fr; text-align: center; }
  .feature-row.reverse .wrap-wide { direction: ltr; }
  .feature-row h2, .differentiator h2 { text-align: center; }
  .feature-row .feature-art { order: -1; }
  .differentiator ul { display: inline-block; text-align: left; }
  .callout { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  /* Support stays reachable via the footer on every page — dropping it
     here keeps Games + the Download CTA on one line next to the brand. */
  .nav-links a:not(.nav-cta):nth-child(2) { display: none; }
}

/* ===== Energy / motion system ===== */

/* Scroll reveal — site.js adds .is-visible via IntersectionObserver.
   Falls back to instantly-visible for reduced-motion or no-JS. */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.card-grid .card:nth-child(1), .stats-row .stat:nth-child(1) { transition-delay: 0s; }
.card-grid .card:nth-child(2), .stats-row .stat:nth-child(2) { transition-delay: 0.09s; }
.card-grid .card:nth-child(3), .stats-row .stat:nth-child(3) { transition-delay: 0.18s; }
.card-grid .card:nth-child(4) { transition-delay: 0.27s; }

/* Hover lift on interactive cards/tiles */
.card, .game-tile {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.15s ease;
}
.card:hover, .game-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 30px rgba(4, 19, 53, 0.14);
}
.game-chip { transition: transform 0.15s ease, border-color 0.15s ease; }
.game-chip:hover { transform: translateY(-3px); }
.btn-appstore { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.btn-appstore:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(4, 19, 53, 0.22); }

/* LIVE motif — a pulsing dot used as a recurring visual signature, echoing
   the app's real "round in progress" status rather than a generic bullet. */
.eyebrow .dot, .live-sticker .dot {
  position: relative;
  width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: 0 0 auto;
}
.eyebrow .dot::after, .live-sticker .dot::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 1.5px solid currentColor; opacity: 0; animation: pulse-ring 1.8s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.55); opacity: 0.9; }
  75% { transform: scale(1.7); opacity: 0; }
  100% { opacity: 0; }
}

.shot-frame { position: relative; display: inline-block; }
.live-sticker {
  position: absolute; top: 10px; right: -10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--navy); color: #fff; font-weight: 800; font-size: 11px; letter-spacing: 0.6px;
  padding: 7px 12px; border-radius: 999px; box-shadow: 0 10px 20px rgba(4, 19, 53, 0.3);
  transform: rotate(5deg);
}
.live-sticker .dot { background: #4fe08a; color: #4fe08a; }

/* Stats row with count-up numbers (site.js drives the counting) */
.stats-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 8px 0 48px; }
.stat { text-align: center; min-width: 140px; }
.stat .num {
  font-family: 'Archivo Black', sans-serif; font-size: clamp(34px, 5.5vw, 50px);
  color: var(--navy); line-height: 1;
}
.stat .label { font-size: 12px; color: var(--text-tertiary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 8px; }

/* Hero screenshot carousel */
.hero-carousel { position: relative; max-width: 320px; margin: 0 auto; }
.carousel-slide { display: none; }
.carousel-slide.is-active { display: block; animation: carousel-in 0.5s ease; }
@keyframes carousel-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.carousel-caption { text-align: center; font-size: 13px; font-weight: 700; color: var(--navy); margin-top: 16px; min-height: 18px; }
.carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.carousel-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--hairline); border: none; padding: 0;
  cursor: pointer; transition: background-color 0.2s ease, transform 0.2s ease;
}
.carousel-dot.is-active { background: var(--navy); transform: scale(1.35); }

/* Auto-scrolling games marquee — two copies of the chip row back to back,
   translated by exactly half its width for a seamless loop. */
.games-marquee {
  overflow: hidden; position: relative; max-width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
}
.games-marquee-track { display: flex; gap: 10px; width: max-content; animation: marquee 24s linear infinite; }
.games-marquee:hover .games-marquee-track,
.games-marquee:focus-within .games-marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .eyebrow .dot::after, .live-sticker .dot::after { animation: none; display: none; }
  .carousel-slide.is-active { animation: none; }
  .games-marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .games-marquee { overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .card:hover, .game-tile:hover, .game-chip:hover, .btn-appstore:hover { transform: none; }
}
