/* =====================================================================
   PADELLAB — Shared Design System
   Premium tactical · broadcast feel · F1/NBA coaching software vibe
   ===================================================================== */

:root {
  /* Core palette — premium dark with strategic lime accent */
  --bg-night:       #050709;
  --bg-deep:        #0a0d12;
  --bg-panel:       rgba(14, 18, 24, 0.7);
  --bg-card:        rgba(20, 26, 34, 0.75);

  --accent:         #d4ff00;  /* electric lime — main brand accent */
  --accent-warm:    #ff6b35;  /* warm orange — secondary */
  --accent-cool:    #00d4ff;  /* cyan — tertiary */

  --text:           #e6e9ee;
  --text-dim:       #8a93a3;
  --text-faint:     #5a6271;

  --border-light:   rgba(255, 255, 255, 0.08);
  --border-medium:  rgba(255, 255, 255, 0.15);
  --border-accent:  rgba(212, 255, 0, 0.3);

  /* Typography stack */
  --font-display:   'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-body:      'Fraunces', Georgia, serif;
  --font-ui:        'Inter', system-ui, sans-serif;
  --font-mono:      'JetBrains Mono', ui-monospace, monospace;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-night);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* === ATMOSPHERIC BACKGROUND === */
body.has-bg-effects::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%,
      rgba(212, 255, 0, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 20% 80%,
      rgba(255, 107, 53, 0.025) 0%, transparent 60%),
    var(--bg-night);
}

/* =====================================================================
   SITE HEADER — shared across all pages
   ===================================================================== */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: linear-gradient(180deg, rgba(5, 7, 9, 0.85) 0%, rgba(5, 7, 9, 0) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo-mark {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.05em;
  color: var(--text);
  line-height: 1;
}
.site-logo-mark span {
  color: var(--accent);
}
.site-logo-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-faint);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  padding: 10px 16px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-link.active { color: var(--accent); }

.site-nav-cta {
  margin-left: 8px;
  background: var(--accent);
  color: var(--bg-night);
  padding: 10px 18px;
  border-radius: 4px;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 14px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.site-nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 255, 0, 0.25);
}

/* Mobile burger */
.nav-toggle { display: none; }
.nav-burger {
  display: none;
  width: 32px; height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  height: 2px;
  background: var(--text);
  transition: all 0.2s;
}

@media (max-width: 768px) {
  .site-header { padding: 14px 18px; }
  .site-logo-mark { font-size: 22px; }
  .nav-burger { display: flex; }
  .site-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: 78%;
    max-width: 320px;
    background: var(--bg-deep);
    flex-direction: column;
    align-items: stretch;
    padding: 80px 24px 24px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    border-left: 1px solid var(--border-light);
  }
  .nav-toggle:checked ~ .site-nav { transform: translateX(0); }
  .nav-link, .site-nav-cta { width: 100%; text-align: left; }
}

/* =====================================================================
   FOOTER
   ===================================================================== */

.site-footer {
  margin-top: 80px;
  padding: 48px 32px 32px;
  border-top: 1px solid var(--border-light);
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-dim);
}
.site-footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
}
.site-footer-brand .site-logo-mark { font-size: 22px; }
.site-footer-brand p {
  margin-top: 14px;
  max-width: 360px;
  font-family: var(--font-body);
  line-height: 1.6;
}
.site-footer h4 {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--text);
  margin: 0 0 14px;
  text-transform: uppercase;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a:hover { color: var(--accent); }
.site-footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}
@media (max-width: 768px) {
  .site-footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .site-footer { padding: 32px 18px 24px; }
}

/* =====================================================================
   HERO TYPO — typographic with neon-trail animation
   The text IS the hero. A glowing ball flies across the words.
   ===================================================================== */

.hero-typo {
  position: relative;
  min-height: 96vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 140px 32px 100px;
}

.hero-typo-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* "Live" indicator at top */
.hero-typo-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 36px;
  padding: 6px 12px;
  border: 1px solid rgba(212, 255, 0, 0.25);
  background: rgba(212, 255, 0, 0.04);
}
.live-dot-mini {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse-live 1.4s ease-in-out infinite;
}
@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}

/* THE TITLE — broadcast-poster scale */
.hero-typo-title {
  font-family: var(--font-display);
  font-size: clamp(64px, 11vw, 168px);
  line-height: 0.88;
  letter-spacing: 0.005em;
  margin: 0 0 28px;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  gap: 0.16em 0.28em;
  max-width: 1200px;
}

.hero-typo-title .word {
  position: relative;
  display: inline-block;
}

.hero-typo-title .word.small {
  font-size: 0.55em;
  align-self: flex-end;
  padding-bottom: 0.15em;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.hero-typo-title .word.accent {
  color: var(--accent);
  text-shadow:
    0 0 40px rgba(212, 255, 0, 0.4),
    0 0 80px rgba(212, 255, 0, 0.2);
}

/* When the rally-ball is hitting a word, light it up — subtle flash */
.hero-typo-title .word.hit {
  color: var(--accent);
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.6),
    0 0 18px rgba(212, 255, 0, 0.65),
    0 0 45px rgba(212, 255, 0, 0.35);
}
.hero-typo-title .word.small.hit {
  color: var(--accent);
}

/* Title transitions — smooth in/out for hit effect */
.hero-typo-title .word {
  transition: color 0.45s ease, text-shadow 0.45s ease;
}

/* THE SUBTITLE — the punchline */
.hero-typo-subtitle {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 32px);
  line-height: 1.3;
  color: var(--text-dim);
  margin: 0 0 36px;
  max-width: 720px;
}

/* THE LEDE — concrete tool description */
.hero-typo-lede {
  font-family: var(--font-body);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 40px;
  max-width: 620px;
}
.hero-typo-lede strong {
  color: var(--accent);
  font-weight: 500;
}

/* THE NEON RALLY SVG — absolute positioned over the title */
.hero-trail-svg {
  position: absolute;
  /* Roughly aligns with the title area */
  top: 110px;
  left: 0;
  right: 0;
  width: 100%;
  height: 75%;
  pointer-events: none;
  z-index: 1;
  /* Below CTA buttons but above background */
}

/* Title needs higher z-index than the SVG but ball-glow should peek through */
.hero-typo-title { position: relative; z-index: 3; }
.hero-typo-subtitle, .hero-typo-lede, .hero-cta-row { position: relative; z-index: 3; }

/* Make sure the ball draws "in front of" the text via mix-blend mode */
.hero-trail-svg .trail-ball-glow,
.hero-trail-svg .trail-ball,
.hero-trail-svg .trail-line {
  mix-blend-mode: screen;
}

/* CTA spacing */
.hero-typo .hero-cta-row {
  margin-top: 12px;
}

/* =====================================================================
   STATS BAND — trust signals between sections
   ===================================================================== */

.stats-band {
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 48px 32px;
  margin: 80px 0 40px;
  background: rgba(212, 255, 0, 0.02);
}
.stats-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.stat-item {
  padding: 0 8px;
}
.stat-number {
  font-family: var(--font-display);
  font-size: 56px;
  color: var(--accent);
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: 0 0 30px rgba(212, 255, 0, 0.2);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .stats-band {
    padding: 36px 18px;
    margin: 48px 0 24px;
  }
  /* 2x2 grid on mobile — much more readable than 1x4 list */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 16px;
  }
  .stat-number { font-size: 44px; }
  .stat-label { font-size: 10px; letter-spacing: 0.15em; }
}

/* =====================================================================
   MANIFESTO mobile fixes
   ===================================================================== */
@media (max-width: 768px) {
  .manifesto .section-title {
    font-size: clamp(28px, 7vw, 40px) !important;
    margin-bottom: 32px !important;
    line-height: 1.05;
  }
  .manifesto p {
    font-size: 16px !important;
    line-height: 1.55 !important;
  }
}

/* =====================================================================
   TOOLS GRID mobile improvements
   ===================================================================== */
@media (max-width: 768px) {
  .tool-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .tool-tile {
    min-height: auto;
    padding: 24px 22px 22px;
  }
  .tool-tile h3 { font-size: 26px; }
  .tool-tile p { font-size: 14px; line-height: 1.5; }

  /* Tools section header more compact on mobile */
  .tools-section .section-title {
    font-size: clamp(32px, 7vw, 44px);
    margin-bottom: 24px;
  }
}

/* =====================================================================
   SITE FOOTER mobile improvements
   ===================================================================== */
@media (max-width: 768px) {
  .site-footer { padding: 40px 18px 28px; }
  .site-footer h4 { font-size: 12px; }
  .site-footer ul { font-size: 14px; }
  .site-footer-bottom { font-size: 10px; gap: 8px; }
}

/* =====================================================================
   SITE HEADER mobile improvements — make logo + tagline cleaner
   ===================================================================== */
@media (max-width: 768px) {
  .site-header { padding: 14px 16px; }
  .site-logo-tag {
    /* Hide tagline on mobile — header gets crowded with burger */
    display: none;
  }
}
@media (max-width: 768px) {
  .hero-typo {
    padding: 90px 18px 60px;
    min-height: auto;
  }

  .hero-typo-eyebrow {
    font-size: 10px;
    letter-spacing: 0.18em;
    margin-bottom: 24px;
    padding: 5px 10px;
  }
  .live-dot-mini {
    width: 6px;
    height: 6px;
  }

  /* Title: stack words more aggressively on portrait */
  .hero-typo-title {
    font-size: clamp(46px, 13vw, 76px);
    line-height: 0.92;
    gap: 0.06em 0.18em;
    margin: 0 0 20px;
  }
  .hero-typo-title .word.small {
    font-size: 0.42em;
    padding-bottom: 0.18em;
  }

  .hero-typo-subtitle {
    font-size: 17px;
    line-height: 1.35;
    margin: 0 0 28px;
  }

  .hero-typo-lede {
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 32px;
  }

  /* Trail SVG: better proportions for portrait — sits closer behind text */
  .hero-trail-svg {
    top: 78px;
    height: 60%;
  }

  /* CTAs: stack vertically on narrow screens, full-width feel */
  .hero-typo .hero-cta-row {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .hero-typo .cta-primary,
  .hero-typo .cta-secondary {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
    font-size: 14px;
  }
}

/* Very narrow phones (iPhone SE etc): squeeze more */
@media (max-width: 380px) {
  .hero-typo-title {
    font-size: clamp(40px, 14vw, 56px);
  }
  .hero-typo-title .word.small {
    font-size: 0.38em;
  }
}

/* =====================================================================
   HERO SECTION (used on hub and tool intro pages)
   ===================================================================== */

.hero {
  padding: 140px 32px 80px;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.95;
  letter-spacing: 0.005em;
  margin: 0 0 24px;
  color: var(--text);
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-lede {
  font-family: var(--font-body);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 680px;
  margin: 0 0 36px;
}
.hero-cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 36px;
}
.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--accent);
  color: var(--bg-night);
  padding: 16px 28px;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.15s, box-shadow 0.15s;
  border: none;
}
.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 255, 0, 0.3);
}
.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: var(--text);
  padding: 16px 28px;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--border-medium);
  transition: border-color 0.15s, color 0.15s;
}
.cta-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 768px) {
  .hero { padding: 100px 18px 60px; }
}

/* =====================================================================
   TOOL TILES (for the hub page)
   ===================================================================== */

.tools-section {
  padding: 80px 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: 0.01em;
  margin: 0 0 48px;
  color: var(--text);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.tool-tile {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 32px 28px 28px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}
.tool-tile:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  background: rgba(28, 36, 48, 0.85);
}
.tool-tile.coming-soon {
  cursor: default;
  opacity: 0.72;
}
.tool-tile.coming-soon:hover {
  border-color: var(--border-light);
  transform: none;
  background: var(--bg-card);
}

.tool-tile-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tool-tile-eyebrow.dim { color: var(--text-faint); }
.tool-tile-eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.tool-tile-eyebrow.dim .dot { background: var(--text-faint); }

.tool-tile h3 {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 0.01em;
  margin: 0 0 8px;
  color: var(--text);
}
.tool-tile .spanish {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 14px;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.tool-tile p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0;
  flex: 1;
}
.tool-tile-arrow {
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-tile.coming-soon .tool-tile-arrow { color: var(--text-faint); }

@media (max-width: 768px) {
  .tools-section { padding: 36px 18px; }
  .tool-tile { min-height: 240px; padding: 24px 22px 22px; }
}

/* =====================================================================
   GENERIC CONTENT (for Over, coming-soon pages, etc.)
   ===================================================================== */

.content-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 140px 32px 80px;
}
.content-section h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  margin: 0 0 24px;
}
.content-section h2 {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.02em;
  margin: 40px 0 14px;
  color: var(--text);
}
.content-section p {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-dim);
  margin: 0 0 16px;
}
.content-section .lede {
  font-size: 21px;
  color: var(--text);
}
@media (max-width: 768px) {
  .content-section { padding: 100px 18px 60px; }
}

/* =====================================================================
   COMING SOON CARD (for placeholder tool pages)
   ===================================================================== */

.coming-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 48px 32px;
  margin: 32px 0;
}
.coming-card .badge {
  display: inline-block;
  background: rgba(212, 255, 0, 0.1);
  color: var(--accent);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.feature-list li {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before {
  content: '→';
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 18px;
  flex-shrink: 0;
}

/* =====================================================================
   VERSION MARKER (for cache verification during dev)
   ===================================================================== */
.version-marker {
  position: fixed;
  bottom: 4px; left: 8px;
  z-index: 99;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--accent);
  opacity: 0.35;
  letter-spacing: 0.1em;
  pointer-events: none;
}
