@font-face {
  font-family: 'IMFell';
  src: url('https://fonts.googleapis.com/css2?family=IM+Fell+Double+Pica&display=swap');
  font-display: swap;
}

:root {
  --bg: #000000;
  --bg-elev: #0d0d0d;
  --bg-card: #1a1a1a;
  --fg: #ffffff;
  --fg-dim: #b0b0b0;
  --fg-muted: #6a6a6a;
  --accent: #ff4b2b;
  --accent-glow: #ff6a4d;
  --neon-lime: #c8ff00;
  --neon-cyan: #00e5ff;
  --neon-magenta: #ff2d92;
  --accent-soft: rgba(255, 75, 43, 0.14);
  --border: rgba(255, 255, 255, 0.08);
  --max: 1080px;
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease;
}
a:hover {
  border-bottom-color: var(--accent);
}

header.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  background: rgba(0, 0, 0, 0.72);
  border-bottom: 1px solid var(--border);
}
header.nav .wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: 'IM Fell Double Pica', Georgia, serif;
  font-size: 26px;
  letter-spacing: 0.02em;
  color: var(--fg);
}
.logo span {
  color: var(--accent);
}
nav.links {
  display: flex;
  gap: 24px;
  font-size: 14px;
}
nav.links a {
  color: var(--fg-dim);
  border: none;
}
nav.links a:hover {
  color: var(--fg);
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 24px 120px;
}

.hero {
  text-align: center;
  padding: 80px 0 56px;
}
.hero .kicker {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 32px;
}
.hero h1 {
  font-family: 'IM Fell Double Pica', Georgia, serif;
  font-size: clamp(48px, 9vw, 88px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.hero h1 .accent {
  color: var(--accent);
}
.hero p.tagline {
  font-size: 20px;
  color: var(--fg-dim);
  max-width: 520px;
  margin: 0 auto 40px;
}
.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.badge-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--fg-dim);
  font-size: 14px;
  font-weight: 500;
}
.badge-store strong {
  color: var(--fg);
  font-weight: 600;
  display: block;
  font-size: 16px;
}

.legal-doc {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 40px;
  margin-top: 32px;
}
.legal-doc h1 {
  font-family: 'IM Fell Double Pica', Georgia, serif;
  font-size: 38px;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.legal-doc .meta {
  color: var(--fg-muted);
  font-size: 13px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.legal-doc h2 {
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 14px;
  font-weight: 600;
  color: var(--fg);
}
.legal-doc h3 {
  font-size: 17px;
  margin-top: 24px;
  margin-bottom: 10px;
  color: var(--fg);
}
.legal-doc p,
.legal-doc li {
  color: var(--fg-dim);
  font-size: 15px;
}
.legal-doc ul,
.legal-doc ol {
  padding-left: 22px;
  margin: 12px 0;
}
.legal-doc li {
  margin-bottom: 6px;
}
.legal-doc strong {
  color: var(--fg);
  font-weight: 600;
}
.legal-doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.legal-doc th,
.legal-doc td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.legal-doc th {
  background: rgba(255, 75, 43, 0.06);
  color: var(--fg);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.legal-doc tr:last-child td {
  border-bottom: none;
}
.legal-doc code {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', ui-monospace, Menlo, monospace;
  font-size: 13px;
  color: var(--accent);
}

footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--fg-muted);
  font-size: 13px;
}
footer .links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 16px;
}
footer .links a {
  color: var(--fg-dim);
  border: none;
}
footer .links a:hover {
  color: var(--fg);
}

@media (max-width: 600px) {
  main {
    padding: 32px 16px 80px;
  }
  .legal-doc {
    padding: 28px 20px;
  }
  .hero {
    padding: 40px 0 32px;
  }
}

/* =========================================================
   APPLE FITNESS — HOME LANDING
   ========================================================= */

body.home {
  background: #000;
  overflow-x: hidden;
}

.home-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 24px 96px;
}

/* HERO with rings */
.hero-fitness {
  position: relative;
  text-align: center;
  padding: 48px 0 56px;
  overflow: visible;
}

.hero-rings {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, 90vw);
  height: min(640px, 90vw);
  opacity: 0.22;
  filter: blur(0.5px);
  pointer-events: none;
  z-index: 0;
}
.hero-rings svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.hero-rings .ring {
  fill: none;
  stroke-width: 22;
  stroke-linecap: round;
  stroke-dasharray: 0 9999;
  animation: ringFill 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-rings .r1 {
  stroke-dashoffset: 0;
  animation-delay: 0.1s;
}
.hero-rings .r2 {
  animation-delay: 0.25s;
}
.hero-rings .r3 {
  animation-delay: 0.4s;
}
@keyframes ringFill {
  to {
    stroke-dasharray: 880 9999;
  }
}

.hero-meta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 12px;
  border-radius: 999px;
  background: rgba(255, 75, 43, 0.1);
  border: 1px solid rgba(255, 75, 43, 0.3);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-glow);
  font-weight: 600;
  margin-bottom: 28px;
}
.hero-meta .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 75, 43, 0.6);
  animation: pulseDot 1.6s ease-out infinite;
}
@keyframes pulseDot {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 75, 43, 0.6);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(255, 75, 43, 0);
  }
}

.hero-title {
  position: relative;
  z-index: 1;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(64px, 14vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--fg);
  margin: 0;
}
.hero-title .line {
  display: block;
  opacity: 0;
  animation: lineUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-title .line:nth-child(1) {
  animation-delay: 0.15s;
}
.hero-title .line:nth-child(2) {
  animation-delay: 0.28s;
}
.hero-title .line:nth-child(3) {
  animation-delay: 0.41s;
}
.hero-title em {
  color: var(--accent);
  font-style: normal;
}
@keyframes lineUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-tagline {
  position: relative;
  z-index: 1;
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 500;
  color: var(--fg-dim);
  max-width: 480px;
  margin: 32px auto 0;
  letter-spacing: -0.005em;
  opacity: 0;
  animation: lineUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.55s forwards;
}

/* STATS — big numerals + tiny caps labels */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: 24px;
  overflow: hidden;
  margin: 64px 0 56px;
  border: 1px solid var(--border);
}
.stat {
  background: var(--bg-elev);
  padding: 32px 20px;
  text-align: center;
}
.stat-value {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-weight: 800;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--fg);
}
.stat-value em {
  color: var(--accent);
  font-style: normal;
  font-size: 0.55em;
  font-weight: 700;
  margin-left: 2px;
  letter-spacing: -0.02em;
}
.stat:nth-child(2) .stat-value {
  color: var(--neon-lime);
  font-size: clamp(32px, 5.5vw, 56px);
  letter-spacing: 0.04em;
}
.stat-label {
  margin-top: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* SPORTS — colored circles row */
.sports-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 0 0 64px;
}
.sport {
  text-align: center;
}
.sport-circle {
  width: 100%;
  aspect-ratio: 1;
  max-width: 120px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at 30% 30%,
    color-mix(in srgb, var(--c) 60%, #fff 0%),
    color-mix(in srgb, var(--c) 100%, #000 30%)
  );
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-weight: 800;
  font-size: clamp(20px, 3.6vw, 32px);
  letter-spacing: -0.02em;
  color: #000;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 24px 48px -16px color-mix(in srgb, var(--c) 50%, transparent);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.sport-circle:hover {
  transform: scale(1.06);
}
.sport[style*='#ffffff'] .sport-circle {
  color: #000;
}
.sport-name {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fg-dim);
  text-transform: uppercase;
}

/* CTA — edge-to-edge dark cards */
.cta-fitness {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cta-card {
  position: relative;
  padding: 36px 32px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 220ms;
}
.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255, 75, 43, 0.16), transparent 60%);
  pointer-events: none;
}
.cta-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 75, 43, 0.4);
}
.cta-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.cta-headline {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--fg);
  line-height: 1.2;
}

/* HOME nav adjusted */
body.home header.nav {
  background: rgba(0, 0, 0, 0.7);
}

@media (max-width: 720px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
  .sports-row {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
  .sport-name {
    font-size: 10px;
  }
  .cta-fitness {
    grid-template-columns: 1fr;
  }
  .hero-fitness {
    padding: 32px 0 40px;
  }
}
