/* =========================================================
   GRAFT sport pages (PART 7 pilot)
   Scoped under .sports-hub (the /sports hub) and .sport-page
   (per-sport pages, e.g. /sports/football). Replicates the
   home sport-card look and the .mod vertical rhythm locally so
   NOTHING in home.css is touched and no shared class is
   restyled. Depends on tokens.css + base.css + components.css.
   ========================================================= */

/* Anchored sections clear the sticky header on jump (home.css scopes
   this to the home page; replicate it locally for these pages). */
.sports-hub [id],
.sport-page [id] { scroll-margin-top: 88px; }

/* ============ MODULE RHYTHM (local copy of home.css .mod base) ============
   Only these pages load sport.css, so this cannot bleed into home. Lets the
   reused install module (markup uses .mod) size its h2 correctly here. */
.sports-hub .mod,
.sport-page .mod { padding: 120px 0; position: relative; z-index: 1; }
.sports-hub .mod h2,
.sport-page .mod h2 {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.sports-hub .mod h2 .dot,
.sport-page .mod h2 .dot { color: var(--lime); }
.sports-hub .mod-sub,
.sport-page .mod-sub {
  font-size: 18px;
  color: var(--dim);
  max-width: 560px;
  line-height: 1.55;
}

/* =========================================================
   SPORTS HUB (/sports)
   ========================================================= */
.sports-hub-hero {
  padding: 100px 0 40px;
  text-align: center;
  position: relative; z-index: 1;
}
.sports-hub-hero .eb { margin-bottom: 24px; }
.sports-hub-hero h1 {
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.0;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}
.sports-hub-hero h1 .dot { color: var(--lime); }
.sports-hub-hero p {
  font-size: 19px; color: var(--dim);
  max-width: 560px; margin: 0 auto;
  line-height: 1.55;
}

.sports-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  padding: 40px 0 0;
}

/* Tile = whole-card link. Replicates .sport-card visuals from home.css. */
.sports-hub-tile {
  display: flex; flex-direction: column;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  transition: transform 0.35s var(--ease), border-color 0.3s, background 0.3s, box-shadow 0.4s;
  position: relative; overflow: hidden;
}
.sports-hub-tile::before {
  content: ""; position: absolute;
  top: 0; left: 0; height: 2px; width: 0;
  background: var(--lime);
  transition: width 0.5s var(--ease-out);
}
.sports-hub-tile:hover::before { width: 100%; }
.sports-hub-tile:hover {
  background: var(--bg-2);
  border-color: var(--lime);
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 40px var(--lime-soft);
}
.sports-hub-tile-icon {
  width: 48px; height: 48px;
  background: var(--lime-soft);
  border: 1px solid var(--lime-glow);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--lime);
  transition: transform 0.4s var(--ease-spring), background 0.3s;
}
.sports-hub-tile:hover .sports-hub-tile-icon {
  transform: rotate(-8deg) scale(1.08);
  background: rgba(200, 245, 66, 0.18);
}
.sports-hub-tile-icon svg { width: 40px; height: 40px; }
.sports-hub-tile-name {
  font-size: 22px; font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}
.sports-hub-tile-desc {
  font-size: 14px; color: var(--dim);
  line-height: 1.5;
  margin-bottom: 20px;
  flex: 1;
}
.sports-hub-tile-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--lime);
  font-weight: 700;
  min-height: 24px;
  transition: gap 0.3s var(--ease);
}
.sports-hub-tile:hover .sports-hub-tile-arrow { gap: 12px; }

/* =========================================================
   PER-SPORT PAGE (/sports/football)
   ========================================================= */

/* Breadcrumb */
.sport-page .sp-breadcrumb {
  padding: 24px 0 0;
  font-size: 13px; color: var(--dim);
  letter-spacing: 0.02em;
}
.sport-page .sp-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sport-page .sp-breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.sport-page .sp-breadcrumb a { color: var(--dim); transition: color 0.2s; }
.sport-page .sp-breadcrumb a:hover { color: var(--lime); }
.sport-page .sp-breadcrumb .sep { color: var(--dimmer); }
.sport-page .sp-breadcrumb [aria-current="page"] { color: var(--text); }

/* HERO */
.sport-page .sp-hero { padding: 48px 0 80px; }
.sport-page .sp-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
.sport-page .sp-hero .eb { margin-bottom: 24px; }
.sport-page .sp-hero h1 {
  font-size: clamp(40px, 5.5vw, 72px);
  line-height: 1.0;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}
.sport-page .sp-hero h1 .dot { color: var(--lime); }
.sport-page .sp-hero-pitch {
  font-size: 19px; color: var(--dim);
  max-width: 480px;
  line-height: 1.55;
  margin-bottom: 32px;
}
.sport-page .sp-hero-cta {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;
}

/* Phone frame (local copy of the home hero-phone envelope) */
.sport-page .sp-phone {
  width: 100%; max-width: 340px;
  aspect-ratio: 9/19;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  border: 1px solid var(--border-2);
  border-radius: 36px;
  padding: 16px 12px;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05), 0 0 80px var(--lime-soft);
  animation: phoneFloat 6s ease-in-out infinite;
}
.sport-page .sp-phone-screen {
  width: 100%; height: 100%;
  border-radius: 22px;
  background: var(--bg);
  overflow: hidden;
}
.sport-page .sp-phone-screen img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  border-radius: 22px; display: block;
}

/* Framed clip (local copy of the pillar-shot look) */
.sport-page .sp-shot {
  display: block;
  width: 100%; max-width: 360px; height: auto;
  border-radius: 16px;
  border: 1px solid var(--border-2);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
/* Tall screens (e.g. the dashboard) get a tighter cap so the strip stays balanced */
.sport-page .sp-shot--cap { max-width: 300px; }

/* WHAT GRAFT TRACKS */
.sport-page .sp-tracks .mod-sub { margin-bottom: 48px; }
.sport-page .sp-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.sport-page .sp-stat-group {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 26px;
  transition: border-color 0.3s, transform 0.35s var(--ease), box-shadow 0.4s;
  position: relative; overflow: hidden;
}
.sport-page .sp-stat-group:hover {
  border-color: var(--lime-glow);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.sport-page .sp-stat-group h3 {
  font-size: 13px; color: var(--lime);
  font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.sport-page .sp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sport-page .sp-chip {
  font-size: 14px; color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 7px 14px;
  line-height: 1.2;
}
.sport-page .sp-stat-group--wide { grid-column: 1 / -1; }
.sport-page .sp-stat-group--gk {
  grid-column: 1 / -1;
  background: linear-gradient(180deg, var(--lime-soft) 0%, var(--bg-1) 60%);
  border-color: var(--lime-glow);
}
.sport-page .sp-stat-group--gk .sp-chip { background: var(--bg-1); }
.sport-page .sp-stat-note { font-size: 13px; color: var(--dim); margin-top: 16px; line-height: 1.5; }

/* TWO-RATING CALLOUT */
.sport-page .sp-ratings { text-align: center; }
.sport-page .sp-ratings-panel {
  max-width: 820px; margin: 0 auto;
  background: linear-gradient(180deg, var(--lime-soft) 0%, var(--bg-1) 70%);
  border: 1px solid var(--lime-glow);
  border-radius: 24px;
  padding: 56px 40px;
  position: relative; overflow: hidden;
}
.sport-page .sp-ratings-panel h2 { margin-bottom: 16px; }
.sport-page .sp-ratings-sub { font-size: 18px; color: var(--dim); max-width: 560px; margin: 0 auto 40px; line-height: 1.55; }
.sport-page .sp-ratings-row {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 20px;
}
.sport-page .sp-rating {
  flex: 1 1 240px; max-width: 320px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
}
.sport-page .sp-rating-icons { font-size: 26px; letter-spacing: 4px; margin-bottom: 12px; line-height: 1; }
.sport-page .sp-rating-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.sport-page .sp-rating-desc { font-size: 14px; color: var(--dim); line-height: 1.5; }

/* INSIGHTS strip */
.sport-page .sp-insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.sport-page .sp-insights .eb { margin-bottom: 24px; }
.sport-page .sp-feature-list { list-style: none; margin-top: 28px; display: grid; gap: 14px; }
.sport-page .sp-feature-list li {
  font-size: 16px; color: var(--text);
  padding-left: 26px; position: relative; line-height: 1.5;
}
.sport-page .sp-feature-list li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 14px; height: 2px; background: var(--lime);
}
.sport-page .sp-feature-list .sp-pro { color: var(--lime); font-weight: 700; font-size: 12px; letter-spacing: 0.1em; }
.sport-page .sp-insights-visual { display: flex; justify-content: center; }

/* CROSS-SPORT pillars (2-up; the clips have very different aspect ratios,
   so each one letterboxes fully visible on the dark panel instead of being
   cropped to a fixed-height cover) */
.sport-page .sp-cross { text-align: center; }
.sport-page .sp-cross .mod-sub { margin: 0 auto 48px; }
.sport-page .sp-cross-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  text-align: left;
  align-items: start; /* let a taller card size to itself, not stretch its row */
}
.sport-page .sp-cross-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  transition: border-color 0.3s, transform 0.35s var(--ease);
  display: flex; flex-direction: column;
}
.sport-page .sp-cross-card:hover { border-color: var(--lime-glow); transform: translateY(-4px); }
.sport-page .sp-cross-visual {
  height: 230px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border-2);
  margin-bottom: 18px; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
}
.sport-page .sp-cross-visual img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}
/* Weekly + Rivals are wide clips and fill the shared 230px box. The body-map
   (nth-child 3) is a tall full-body figure and the AI card (nth-child 4) is a
   portrait card, so the shared box strands them in dead space. Give each a box
   sized to its aspect ratio so it fills, no crop. Fixed heights keep CLS at 0.
   Clip order is identical on every sport page, so nth-child is stable. */
.sport-page .sp-cross-card:nth-child(3) .sp-cross-visual { height: 540px; }
/* AI card stays fully visible (inherits object-fit: contain, never cropped) and
   is given the same tall box so it reads large beside the body map. */
.sport-page .sp-cross-card:nth-child(4) .sp-cross-visual { height: 540px; }
.sport-page .sp-cross-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; letter-spacing: 0.01em; }
.sport-page .sp-cross-card p { font-size: 14px; color: var(--dim); line-height: 1.5; }

/* FAQ */
.sport-page .sp-faq { }
.sport-page .sp-faq .mod-sub { margin-bottom: 40px; }
.sport-page .sp-faq-list { max-width: 820px; }
.sport-page .sp-faq details {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-1);
  padding: 4px 24px;
  margin-bottom: 12px;
  transition: border-color 0.3s;
}
.sport-page .sp-faq details[open] { border-color: var(--lime-glow); }
.sport-page .sp-faq summary {
  list-style: none; cursor: pointer;
  font-size: 18px; font-weight: 700;
  padding: 20px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 44px;
}
.sport-page .sp-faq summary::-webkit-details-marker { display: none; }
.sport-page .sp-faq summary::after {
  content: "+"; color: var(--lime);
  font-size: 24px; font-weight: 700;
  transition: transform 0.3s var(--ease);
  flex: 0 0 auto;
}
.sport-page .sp-faq details[open] summary::after { transform: rotate(45deg); }
.sport-page .sp-faq-answer {
  font-size: 16px; color: var(--dim);
  line-height: 1.6;
  padding: 0 0 22px;
}
.sport-page .sp-faq-answer a { color: var(--lime); text-decoration: underline; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .sports-hub .mod, .sport-page .mod { padding: 80px 0; }
  .sport-page .sp-hero-grid,
  .sport-page .sp-insights-grid { grid-template-columns: 1fr; gap: 48px; }
  .sport-page .sp-hero { padding: 32px 0 56px; }
  .sport-page .sp-cross-grid { grid-template-columns: 1fr 1fr; }
  .sport-page .sp-phone { animation: none; } /* save battery on mobile */
}
@media (max-width: 560px) {
  .sport-page .sp-cross-grid { grid-template-columns: 1fr; }
}
