/* ── Scoreboard Marketing Site ────────────────────────────────────────────
   Reuses the design language from the Scoreboard app (marquee.css /
   settings.css): dark surfaces, red accent, gold highlight, Barlow type. */

:root {
  --bg: #0d0d0f;
  --bg-panel: #141417;
  --bg-card: #1a1a20;
  --bg-hover: #202028;
  --border: #2a2a35;
  --border-light: #222230;
  --accent: #e8192c;
  --accent-hover: #ff2c40;
  --accent-glow: rgba(232, 25, 44, 0.35);
  --gold: #ffc038;
  --text-primary: #f0f0f5;
  --text-muted: #7a7a8c;
  --text-dim: #4a4a5a;
  --live-color: #00d68f;
  --pre-color: #7a7a8c;
  --final-color: #5a5a6a;
  --font-display: "Barlow Condensed", sans-serif;
  --font-body: "Barlow", sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-width: 1080px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Top nav ───────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 24px;
  background: rgba(13, 13, 15, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.nav-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.12s ease, background 0.12s ease;
}

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

.nav-links .nav-cta {
  color: var(--text-primary);
  background: var(--accent);
}

.nav-links .nav-cta:hover {
  background: var(--accent-hover);
}

/* ── Shared section scaffolding ────────────────────────────────────────── */

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 88px 24px;
}

.section-alt {
      max-width: 90%;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 24px;
}

.section-alt > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 0.02em;
  text-align: center;
}

.section-sub {
  max-width: 640px;
  margin: 16px auto 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 17px;
}

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 96px 24px 72px;
  text-align: center;
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--border);
  background: rgba(255, 192, 56, 0.06);
  padding: 6px 14px;
  border-radius: 999px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin-top: 24px;
}

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

.lede {
  max-width: 600px;
  margin: 22px auto 0;
  font-size: 19px;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 36px;
  flex-wrap: wrap;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  transition: all 0.14s ease;
}

.btn-primary {
  font-size: 15px;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 var(--accent-glow);
}

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

.btn-ghost {
  font-size: 15px;
  padding: 14px 28px;
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  border-color: #3a3a4a;
}

/* ── Feature cards ─────────────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 48px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.feature-card:hover {
  border-color: #3a3a4a;
  transform: translateY(-3px);
}

.feature-icon {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.03em;
}

.feature-card p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ── League scroller (looping marquee) ─────────────────────────────────── */

.league-scroller {
  /* Full-bleed across the section-alt band */
  max-width: none;
  position: relative;
  margin-top: 48px;
  overflow: hidden;
  -webkit-mask-image: none;
}

/* Edge gradients — fade the chips in on the left, out on the right. Matches
   the section-alt panel background so they blend seamlessly. */
.league-scroller::before,
.league-scroller::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 140px;
  z-index: 2;
  pointer-events: none;
}

.league-scroller::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-panel), transparent);
}

.league-scroller::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-panel), transparent);
}

.league-track {
  display: flex;
  width: max-content;
  gap: 14px;
  /* Duration is set inline by script.js based on track width so the speed
     stays constant regardless of how many leagues are listed. */
  animation: league-scroll 36s linear infinite;
}

@keyframes league-scroll {
  from {
    transform: translateX(0);
  }
  to {
    /* The track holds two identical copies of the league list, so shifting
       by exactly half its width loops seamlessly. */
    transform: translateX(-50%);
  }
}

.league-chip {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 20px 30px;
  transition: color 0.14s ease;
}

.league-chip:hover {
  color: var(--text-primary);
}

.league-chip img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  filter: grayscale(100%);
  opacity: 0.55;
  transition: filter 0.14s ease, opacity 0.14s ease;
}

.league-chip:hover img {
  filter: none;
  opacity: 1;
}

/* ── Download ──────────────────────────────────────────────────────────── */

.download {
  text-align: center;
}

.download-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 44px;
  flex-wrap: wrap;
}

.btn-download {
  min-width: 230px;
  padding: 16px 26px;
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border);
  text-transform: none;
  letter-spacing: 0.02em;
}

.btn-download:hover {
  border-color: var(--gold);
  background: var(--bg-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.btn-os-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  background: var(--text-primary);
  /* Apple logo glyph */
  -webkit-mask: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='black' d='M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z'/%3E%3C/svg%3E");
  mask: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='black' d='M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z'/%3E%3C/svg%3E");
}

.btn-os-icon--win {
  /* Windows logo glyph */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='black' d='M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='black' d='M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z'/%3E%3C/svg%3E");
}

.btn-os-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.btn-os-small {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.btn-os-big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.02em;
}

.download-note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

/* ── Marquee preview (interactive mock of the real ticker) ─────────────── */

.marquee-preview {
  display: flex;
  align-items: stretch;
  max-width: 860px;
  margin: 56px auto 0;
  height: 56px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
  text-align: left;
  /* overflow visible so the dropdown can escape the bar; the viewport clips
     the scrolling track on its own. */
  overflow: visible;
}

.mp-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 14px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  flex-shrink: 0;
  position: relative;
  z-index: 20;
}

.mp-logo {
  width: 22px;
  height: 22px;
  border-radius: 3px;
}

.mp-sport-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: background 0.12s ease;
}

.mp-sport-info:hover {
  background: var(--bg-hover);
}

.mp-sport {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mp-arrow {
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1;
  transition: transform 0.15s ease;
}

.mp-arrow.open {
  transform: rotate(180deg);
}

/* ── Sport dropdown ────────────────────────────────────────────────────── */

.mp-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 210px;
  max-height: 340px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  z-index: 100;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.mp-dropdown::-webkit-scrollbar {
  width: 4px;
}
.mp-dropdown::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.mp-dropdown.hidden {
  display: none;
}

.mp-group-header {
  padding: 6px 14px 3px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.mp-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 3px 0 0;
}

.mp-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.08s ease, color 0.08s ease;
}

.mp-dropdown-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.mp-dropdown-btn.active {
  color: var(--accent);
  background: rgba(232, 25, 44, 0.08);
}

.mp-dropdown-btn img,
.mp-dropdown-btn .mp-all-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.mp-dropdown-btn.coming-soon {
  cursor: not-allowed;
  opacity: 0.55;
}
.mp-dropdown-btn.coming-soon:hover {
  background: transparent;
  color: var(--text-muted);
}

.mp-coming-soon-badge {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
}

/* ── Ticker viewport + scrolling track ─────────────────────────────────── */

.mp-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.mp-viewport::before,
.mp-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 36px;
  z-index: 5;
  pointer-events: none;
}
.mp-viewport::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}
.mp-viewport::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}

.mp-track {
  display: flex;
  align-items: stretch;
  height: 100%;
  width: max-content;
  animation: ticker-scroll 40s linear infinite;
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ── Game cards, dividers, status badges ────────────────────────────────
   Ported verbatim from the app's marquee.css so the ticker matches 1:1. */

.game-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 100%;
  border-right: 1px solid var(--border);
  transition: background 0.15s ease;
  flex-shrink: 0;
  position: relative;
}
.game-card:hover {
  background: var(--bg-hover);
  cursor: pointer;
}

.game-teams {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.game-team {
  display: flex;
  align-items: center;
  gap: 4px;
}

.team-abbr {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}
.team-abbr.winner {
  color: var(--gold);
}

.team-record {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.team-score {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  min-width: 18px;
  text-align: right;
  transition: color 0.15s ease;
  margin-left: auto;
}
.team-score.winner {
  color: var(--gold);
  font-weight: 700;
}
.team-score.loser {
  color: #9c9ca8;
}

.game-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

.game-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 48px;
}

.status-badge {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
}
.status-badge.live {
  background: rgba(0, 214, 143, 0.15);
  color: var(--live-color);
  animation: pulse 1.8s ease infinite;
}
/* Baseball/soccer live badge: strip the green pill and show caret + inning
   (or the match minute) in larger white text. */
.status-badge.live.card-inning {
  background: transparent;
  animation: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  text-transform: none;
}
.status-badge.live.card-inning .fa-caret-up,
.status-badge.live.card-inning .fa-caret-down {
  font-size: 12px;
  color: var(--gold);
}
.card-inning-half {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.status-badge.final {
  color: var(--final-color);
  background: transparent;
}
.status-badge.pre {
  font-size: 13px;
  color: var(--pre-color);
  background: transparent;
}

.status-detail {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-align: center;
}

/* ── Sport (league) divider ─────────────────────────────────────────────── */
.sport-divider {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
}
.sport-divider-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Upcoming divider ───────────────────────────────────────────────────── */
.upcoming-divider {
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.upcoming-divider-label {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

/* ── Footer ────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.footer-logo {
  width: 22px;
  height: 22px;
  border-radius: 4px;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-dim);
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .section {
    padding: 64px 20px;
  }

  .btn-download {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .status-badge.live,
  .mp-track,
  .league-track {
    animation: none;
  }
}
