:root {
  --bg: #0a0a0a;
  --bg-darker: #050505;
  --bg-card: #0f0f0f;
  --bg-card-hover: #151515;
  --fg: #f5f5f5;
  --fg-dim: #c0c0c0;
  --muted: #6a6a6a;
  --accent: #8764B8;
  --accent-bright: #A285D3;
  --accent-dim: #5E3D8E;
  --accent-glow: rgba(135, 100, 184, 0.45);
  --silver: #C8C8C8;
  --silver-dim: #5a5a5a;
  --border: #1f1f1f;
  --border-light: #2a2a2a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Archivo', sans-serif;
  overflow-x: hidden;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* ─── Typography ─────────────────────────────── */
.font-display  { font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.005em; }
.font-heading  { font-family: 'Oswald', sans-serif; }
.font-body     { font-family: 'Archivo', sans-serif; }
.font-mono     { font-family: 'JetBrains Mono', monospace; }

/* ─── Grain overlay ──────────────────────────── */
.grain {
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: 200;
  opacity: 0.08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='250' height='250'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
  will-change: transform;
}

/* ─── Section reveal ─────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0s);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-stagger.in-view > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.in-view > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.in-view > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger.in-view > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger.in-view > *:nth-child(5) { transition-delay: 0.4s; }
.reveal-stagger.in-view > *:nth-child(6) { transition-delay: 0.5s; }

/* ─── Hero reel ──────────────────────────────── */
.reel-frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 2s ease-in-out;
  z-index: 1;
}
.reel-frame.active {
  opacity: 1;
  z-index: 2;
}
.reel-frame.leaving {
  opacity: 0;
  z-index: 1;
}
.reel-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.55) brightness(0.42);
  transform: scale(1.06);
}
.reel-frame.active img,
.reel-frame.leaving img {
  animation: kenburns 9s ease-out forwards;
}
@keyframes kenburns {
  0%   { transform: scale(1.06) translate(0, 0); }
  100% { transform: scale(1.2)  translate(-3%, -3%); }
}

#reelContainer {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(10,10,10,0.92) 0%, rgba(10,10,10,0.45) 28%, rgba(10,10,10,0.55) 65%, rgba(10,10,10,0.98) 100%),
    linear-gradient(90deg,  rgba(10,10,10,0.85) 0%, rgba(10,10,10,0.2)  50%, rgba(10,10,10,0.5)  100%),
    radial-gradient(ellipse at 25% 60%, rgba(135, 100, 184, 0.18) 0%, transparent 55%);
}

/* ─── Coach flip card ────────────────────────── */
.flip-card { perspective: 1800px; height: 580px; }
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.9s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner,
.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}
.flip-back { transform: rotateY(180deg); }

/* ─── Pulse animation ────────────────────────── */
@keyframes pulse-cta {
  0%, 100% { box-shadow: 0 0 0 0 rgba(135, 100, 184, 0.65), 0 0 40px rgba(135, 100, 184, 0.3); }
  50%       { box-shadow: 0 0 0 18px rgba(135, 100, 184, 0),  0 0 40px rgba(135, 100, 184, 0.3); }
}
.pulse-btn { animation: pulse-cta 2.4s ease-out infinite; }

/* ─── Sticky CTA bar ─────────────────────────── */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  transform: translateY(110%);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 90;
}
.sticky-cta.visible { transform: translateY(0); }

/* ─── Marquee ────────────────────────────────── */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  animation: marquee 38s linear infinite;
  width: max-content;
}

/* ─── Reviews carousel ───────────────────────── */
.review-track {
  display: flex;
  gap: 1.5rem;
  will-change: transform;
  padding: 0 2rem;
}
.review-card {
  flex: 0 0 auto;
  width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.4s, transform 0.4s;
}
.review-card:hover { border-color: var(--accent); }

/* ─── Info card ──────────────────────────────── */
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.4s, background 0.4s;
}
.info-card:hover,
.flip-card:hover .info-card,
.flip-card.flipped .info-card {
  border-color: var(--accent-dim);
  background: var(--bg-card-hover);
}

/* ─── Image treatments ───────────────────────── */
.img-noir {
  filter: grayscale(30%) contrast(1.12) brightness(0.9);
  transition: filter 0.8s ease, transform 0.8s ease;
}

/* ─── Text effects ───────────────────────────── */
.text-stroke        { -webkit-text-stroke: 1.5px var(--silver-dim); color: transparent; }
.text-stroke-accent { -webkit-text-stroke: 1.5px var(--accent);     color: transparent; }

/* ─── Vertical text ──────────────────────────── */
.vertical-text { writing-mode: vertical-rl; text-orientation: mixed; }

/* ─── Underline animation ────────────────────── */
.link-underline { position: relative; display: inline-block; }
.link-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.link-underline:hover::after { width: 100%; }

/* ─── Number counter ─────────────────────────── */
.number-display { font-variant-numeric: tabular-nums; }

/* ─── Form inputs ────────────────────────────── */
.form-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-light);
  color: var(--fg);
  padding: 0.85rem 0;
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  width: 100%;
  transition: border-color 0.3s;
  letter-spacing: 0.04em;
}
.form-input:focus         { outline: none; border-color: var(--accent); }
.form-input::placeholder  {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
}

/* ─── Goal selector pills ────────────────────── */
.goal-pill {
  cursor: pointer;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--fg-dim);
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all 0.3s;
}
.goal-pill:hover  { border-color: var(--silver-dim); color: var(--fg); }
.goal-pill.active { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 600; }

/* ─── Sound bars animation ───────────────────── */
@keyframes wave {
  0%, 100% { height: 3px; }
  50%       { height: 16px; }
}
.wave-bar {
  display: inline-block;
  width: 2px;
  background: var(--accent);
  margin: 0 1.5px;
  height: 3px;
  vertical-align: bottom;
}
.unmuted .wave-bar           { animation: wave 0.7s ease-in-out infinite; }
.wave-bar:nth-child(2)       { animation-delay: 0.1s; }
.wave-bar:nth-child(3)       { animation-delay: 0.2s; }
.wave-bar:nth-child(4)       { animation-delay: 0.3s; }
.wave-bar:nth-child(5)       { animation-delay: 0.4s; }

/* ─── Program cards ──────────────────────────── */
.program-card { transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.program-card:hover { transform: translateY(-8px); }
.program-card .program-img {
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.8s;
}
.program-card:hover .program-img {
  transform: scale(1.08);
  filter: grayscale(30%) contrast(1.3) brightness(0.85);
}
.program-card:hover .program-number {
  color: var(--accent);
  -webkit-text-stroke-color: var(--accent);
}

/* ─── Corner notch decoration ────────────────── */
.notch-corner { position: relative; }
.notch-corner::before,
.notch-corner::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--accent);
  pointer-events: none;
}
.notch-corner::before { top: -1px;    left: -1px;  border-right: none; border-bottom: none; }
.notch-corner::after  { bottom: -1px; right: -1px; border-left: none;  border-top: none; }


/* ─── Custom scrollbar ───────────────────────── */
::-webkit-scrollbar        { width: 8px; height: 8px; }
::-webkit-scrollbar-track  { background: var(--bg-darker); }
::-webkit-scrollbar-thumb  { background: var(--accent-dim); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── Toast notification ─────────────────────── */
.toast {
  position: fixed;
  top: 90px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  z-index: 150;
  transform: translateX(120%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: 360px;
}
.toast.visible { transform: translateX(0); }

/* ─── Headline line reveal ───────────────────── */
.headline-line { overflow: hidden; display: block; }
.headline-line span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.in-view .headline-line span            { transform: translateY(0); }
.headline-line:nth-child(2) span        { transition-delay: 0.1s; }
.headline-line:nth-child(3) span        { transition-delay: 0.2s; }

/* ─── Section marker ─────────────────────────── */
.section-marker {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
}
.section-marker::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent);
}

/* ─── Coach image wrapper ────────────────────── */
.coach-img-wrap { position: relative; height: 70%; overflow: hidden; }
.coach-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.35) brightness(0.78);
  transition: filter 0.6s, transform 0.8s;
}
.flip-card:hover .coach-img-wrap img,
.flip-card.flipped .coach-img-wrap img {
  filter: grayscale(70%) contrast(1.4) brightness(0.85);
}

/* ─── Booking panel ──────────────────────────── */
.booking-frame {
  background: linear-gradient(135deg, rgba(135,100,184,0.04) 0%, transparent 50%, rgba(135,100,184,0.02) 100%);
  border: 1px solid var(--border);
  position: relative;
}
.booking-frame::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 60px; height: 60px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}
.booking-frame::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 60px; height: 60px;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

/* ─── Scan line overlay ──────────────────────── */
.scan-line {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.15) 3px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
  z-index: 3;
}

/* ─── Background texture ─────────────────────── */
.bg-textured {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(135, 100, 184, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(80, 80, 80, 0.06) 0%, transparent 40%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='r'><feTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23r)' opacity='0.4'/></svg>");
  background-blend-mode: normal, normal, overlay;
}


/* ─── Hero progress bar ──────────────────────── */
.progress-bar      { height: 1px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--accent); width: 0%; transition: width 0.1s linear; }

/* ─── Nav link ───────────────────────────────── */
.nav-link {
  position: relative;
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  transition: color 0.3s;
}
.nav-link:hover { color: var(--fg); }
.nav-link::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 4px;
  height: 4px;
  background: var(--accent);
  transition: transform 0.3s;
}
.nav-link:hover::before { transform: translateY(-50%) scaleY(1); }

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
  .flip-card  { height: 480px; }
  .review-card { width: 300px; }
}
