/* Baseball at Cards — site styles
   Palette and fonts mirror the game's theme (src/theme/index.ts). */

:root {
  --navy: #0d1b2e;
  --navy-mid: #13243d;
  --navy-light: #1c3050;
  --dark: #070e1a;
  --ruby: #cc2936;
  --ruby-light: #e84050;
  --gold: #f5c518;
  --gold-dk: #b8890a;
  --gold-pale: #fde888;
  --parchment: #fdf0d5;
  --cream: #fffcf2;
  --emerald-lt: #29b860;
  --gray: #7a8098;
  --gray-light: #a8aabb;

  /* Ballpark palette (Stadium Jumbotron theme) */
  --grass: #125c32;
  --grass-dk: #0b3f22;
  --grass-line: rgba(255, 255, 255, 0.16);
  --dirt: #b06a3b;
  --chalk: #f5f1e6;
  --chalk-ink: #16223a;
  --chalk-line: rgba(245, 241, 230, 0.6);
  --scoreboard-bg: #06101f;
  --frame: #2b3d56;

  --maxw: 1040px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--cream);
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  overflow-x: hidden;
}

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

a { color: var(--gold); }
a:hover { color: var(--gold-pale); }

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

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 14, 26, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--navy-light);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--cream);
}
.nav-brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav-brand span {
  font-family: "Bungee", sans-serif;
  font-size: 17px;
  letter-spacing: 0.3px;
}
.nav-links {
  display: flex;
  gap: 20px;
  font-family: "Bungee", sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.nav-links a { color: var(--gray-light); text-decoration: none; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); }

/* ---------- Hero: stadium jumbotron ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 20px 64px;
  background:
    radial-gradient(120% 80% at 50% -20%, rgba(28, 48, 80, 0.9), transparent 60%),
    linear-gradient(180deg, #0a1524, var(--dark));
  border-bottom: 1px solid var(--navy-light);
}
/* Floodlight beams raking down from above the board */
.floodlights {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(48% 60% at 16% -8%, rgba(245, 197, 24, 0.16), transparent 60%),
    radial-gradient(48% 60% at 84% -8%, rgba(245, 197, 24, 0.16), transparent 60%);
}

/* Asymmetric split: copy left, jumbotron right */
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 44px;
  align-items: center;
}
.hero-copy { text-align: left; }

/* Hero trading card: the app as a foil-bordered rookie card */
.tradingcard {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  aspect-ratio: 5 / 7;
  padding: 12px;
  border-radius: 20px;
  /* brushed gold-foil border */
  background:
    linear-gradient(135deg, #fdeaa0 0%, #b8890a 26%, #f7d25e 48%, #8a6608 70%, #f5c518 100%);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(0, 0, 0, 0.25),
    inset 0 0 0 2px rgba(255, 255, 255, 0.25);
  transition: transform 0.25s ease;
}
.tradingcard:hover { transform: translateY(-4px); }
/* holographic sheen */
.tradingcard::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 38%, transparent 64%, rgba(255, 255, 255, 0.14));
  pointer-events: none;
  z-index: 3;
}
.tc-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--navy-mid), var(--navy));
  border: 1px solid rgba(0, 0, 0, 0.5);
}
.tc-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--ruby);
  color: var(--cream);
  font-family: "Bungee", sans-serif;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.tc-banner .star { color: var(--gold-pale); }
/* photo window = app icon on a spotlit field */
.tc-photo {
  position: relative;
  margin: 12px 12px 8px;
  padding: 20px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 2px solid var(--gold-dk);
  background: radial-gradient(circle at 50% 30%, #22406a, #0b1526 72%);
}
.tc-photo img {
  width: 66%;
  max-width: 150px;
  border-radius: 20px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
}
.tc-name { text-align: center; padding: 2px 12px 10px; }
.tc-name h1 {
  font-family: "Bowlby One", "Bungee", sans-serif;
  font-weight: 400;
  font-size: clamp(20px, 3.4vw, 26px);
  line-height: 1.04;
  margin: 0;
  color: var(--gold-pale);
  text-shadow: 0 2px 0 var(--gold-dk), 0 0 16px rgba(245, 197, 24, 0.35);
}
.tc-name .sub {
  display: block;
  margin-top: 6px;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  letter-spacing: 0.5px;
  color: var(--gray-light);
}
/* stat line along the bottom, like the back-of-card numbers */
.tc-stats {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid var(--gold-dk);
  background: rgba(0, 0, 0, 0.28);
}
.tc-stats div {
  padding: 9px 4px;
  text-align: center;
  border-right: 1px solid var(--navy-light);
}
.tc-stats div:last-child { border-right: none; }
.tc-stats b {
  display: block;
  font-family: "Bungee", sans-serif;
  font-size: 16px;
  color: var(--gold);
}
.tc-stats span {
  font-family: "Press Start 2P", monospace;
  font-size: 7px;
  letter-spacing: 0.5px;
  color: var(--gray-light);
}

.hero-eyebrow {
  display: inline-block;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--gold);
  margin: 0 0 18px;
}
.hero-lead {
  font-family: "Bowlby One", "Bungee", sans-serif;
  font-weight: 400;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.06;
  margin: 0 0 16px;
  color: var(--cream);
  text-shadow: 0 3px 0 var(--ruby), 0 4px 16px rgba(0, 0, 0, 0.5);
}
.hero .tagline {
  font-size: clamp(16px, 3.2vw, 19px);
  color: var(--gold-pale);
  max-width: 480px;
  margin: 0 0 28px;
}
/* Stack the hero on narrow screens */
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-copy { text-align: center; order: 2; }
  .tradingcard { order: 1; }
  .hero .tagline { max-width: 560px; margin-left: auto; margin-right: auto; }
  .hero-copy .hero-cta { justify-content: center; }
}

/* ---------- Buttons / badges ---------- */
.btn {
  display: inline-block;
  font-family: "Bungee", sans-serif;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--gold);
  color: var(--dark);
  box-shadow: 0 6px 0 var(--gold-dk);
}
.btn-primary:hover { color: var(--dark); transform: translateY(1px); box-shadow: 0 5px 0 var(--gold-dk); }
.btn-ghost {
  background: transparent;
  color: var(--gold-pale);
  border-color: var(--gold-dk);
}
.btn-ghost:hover { color: var(--cream); border-color: var(--gold); }

/* Call-to-action row in the hero */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-start;
  align-items: center;
}

/* Apple App Store download badge */
.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 12px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: transform 0.1s ease, background 0.15s ease;
}
.btn-appstore:hover { color: #fff; background: #1a1a1a; transform: translateY(-1px); }
.btn-appstore .apple-logo { width: 26px; height: 26px; flex: none; }
.btn-appstore-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}
.btn-appstore-text small {
  font-family: "Nunito", sans-serif;
  font-size: 11px;
  font-weight: 600;
}
.btn-appstore-text strong {
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* ---------- Sections ---------- */
section { padding: 56px 0; }
.section-kicker {
  display: block;
  text-align: center;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--gold);
  margin: 0 0 14px;
}
.section-title {
  font-family: "Bungee", sans-serif;
  font-size: clamp(24px, 5vw, 34px);
  text-align: center;
  margin: 0 0 8px;
  color: var(--gold);
}
.section-sub {
  text-align: center;
  color: var(--gray-light);
  margin: 0 auto 40px;
  max-width: 560px;
}

/* Outfield-wall field section: green wall, yellow home-run line, distance marker */
.section-field {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(180deg, transparent 0 38px, rgba(0, 0, 0, 0.06) 38px 76px),
    linear-gradient(180deg, var(--grass), var(--grass-dk));
  border-top: 5px solid var(--gold);
  border-bottom: 1px solid var(--grass-dk);
}
.section-field .section-title { color: var(--cream); }
.section-field .section-sub { color: rgba(255, 255, 255, 0.78); }
.section-field .section-kicker { color: var(--gold-pale); }
/* Painted outfield distance marker, like a wall */
.section-field::after {
  content: "408";
  position: absolute;
  right: 24px;
  bottom: 8px;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(40px, 12vw, 96px);
  color: rgba(255, 255, 255, 0.06);
  letter-spacing: 2px;
  pointer-events: none;
}

/* ---------- Feature "base path": cards zig-zag down a chalk baseline ---------- */
.basepath {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}
/* the running baseline down the middle */
.basepath::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 3px dashed var(--chalk-line);
}
.feature {
  position: relative;
  width: calc(50% - 46px);
  background: var(--chalk);
  color: var(--chalk-ink);
  border: 1px solid #ded7c4;
  border-radius: 10px;
  padding: 24px 22px 22px;
  margin-bottom: 26px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
.feature-l { margin-right: auto; }
.feature-r { margin-left: auto; }
/* base marker sitting on the baseline, connected to the card */
.feature .pos {
  position: absolute;
  top: 22px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  transform: rotate(45deg);
  background: var(--cream);
  color: var(--ruby);
  border: 2px solid var(--ruby);
  font-family: "Bungee", sans-serif;
  font-size: 15px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  z-index: 1;
}
.feature .pos > span { transform: rotate(-45deg); }
/* left cards: base hangs off the right edge, toward the line */
.feature-l .pos { right: -66px; }
.feature-r .pos { left: -66px; }
/* little connector from card to base */
.feature-l::after, .feature-r::after {
  content: "";
  position: absolute;
  top: 40px;
  width: 26px;
  border-top: 3px dashed var(--chalk-line);
}
.feature-l::after { right: -28px; }
.feature-r::after { left: -28px; }

.feature .emoji { font-size: 30px; line-height: 1; }
.feature h3 {
  font-family: "Bungee", sans-serif;
  font-size: 17px;
  margin: 12px 0 8px;
  color: var(--chalk-ink);
}
.feature p { margin: 0; color: #45506a; font-size: 16px; }

/* On narrow screens: baseline runs down the left, cards stack full-width */
@media (max-width: 680px) {
  .basepath::before { left: 20px; transform: none; }
  .feature { width: auto; margin-left: 52px; }
  .feature-l, .feature-r { margin-right: 0; }
  .feature-l .pos, .feature-r .pos { left: -72px; right: auto; }
  .feature-l::after, .feature-r::after { left: -34px; right: auto; }
}

/* ---------- Screenshots ---------- */
.shots {
  display: flex;
  justify-content: flex-start;
  justify-content: safe center;
  gap: 18px;
  overflow-x: auto;
  padding: 8px 4px 18px;
  scroll-snap-type: x mandatory;
}
.shot {
  flex: 0 0 auto;
  width: 220px;
  aspect-ratio: 9 / 19.5;
  border-radius: 22px;
  background: var(--navy-mid);
  border: 2px solid var(--navy-light);
  object-fit: cover;
  display: block;
  scroll-snap-align: start;
}
.shot:first-child { scroll-snap-align: start; margin-inline-start: auto; }
.shot:last-child { margin-inline-end: auto; }

/* ---------- Article (privacy / support) ---------- */
.article {
  padding: 48px 0 64px;
}
.article .container { max-width: 760px; }
.article h1 {
  font-family: "Bowlby One", sans-serif;
  font-weight: 400;
  font-size: clamp(30px, 6vw, 44px);
  color: var(--cream);
  margin: 0 0 6px;
}
.article .meta {
  color: var(--gray);
  font-size: 15px;
  margin-bottom: 32px;
}
.article h2 {
  font-family: "Bungee", sans-serif;
  font-size: 22px;
  color: var(--gold);
  margin: 40px 0 12px;
  padding-top: 8px;
}
.article h3 {
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 19px;
  color: var(--gold-pale);
  margin: 26px 0 8px;
}
.article p, .article li { color: var(--parchment); }
.article a { word-break: break-word; }
.article ul { padding-left: 22px; }
.article li { margin: 6px 0; }
.article hr {
  border: none;
  border-top: 1px solid var(--navy-light);
  margin: 36px 0;
}
.article code {
  background: var(--navy-mid);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.9em;
}

/* tables (third-party list) */
.table-wrap { overflow-x: auto; }
table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
  font-size: 16px;
}
th, td {
  border: 1px solid var(--navy-light);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
th { background: var(--navy-mid); color: var(--gold-pale); font-family: "Bungee", sans-serif; font-size: 13px; }
td { color: var(--parchment); }

/* callout */
.callout {
  background: var(--navy-mid);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 20px 0;
  color: var(--gold-pale);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--navy-light);
  background: var(--dark);
  padding: 34px 20px;
  text-align: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  font-family: "Bungee", sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-links a { color: var(--gray-light); text-decoration: none; }
.footer-links a:hover { color: var(--gold); }
.site-footer .copy { color: var(--gray); font-size: 14px; margin: 0; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .nav-links { gap: 14px; font-size: 11px; }
  .nav-brand span { font-size: 15px; }
  section { padding: 44px 0; }
}
