/* ==========================================================================
   THE NIGHT CLUB — Home Page

   Loaded ONLY by index.html, after tokens/theme/base/site/public.
   This is the single source of truth for the homepage: structure, the
   particle hero, and every section below it. (Previously split across
   home.css + home-futuristic.css as two design eras loaded together —
   merged into one file so there is exactly one definition per selector.)

   SCOPING RULE: several classes used here (.site-header, .btn, .site-footer,
   .footer-grid, .brand …) are SHARED with other pages. Every override of a
   shared class is therefore prefixed with `.home-page`, so courses.html,
   course.html, about.html etc. are not affected. Homepage-only classes are
   not shared.

   Colours/spacing come from tokens.css. Literal rgba() values are ambient
   lighting effects derived from the purple accent family.
   ========================================================================== */

/* ---- Page-level -------------------------------------------------------- */

.home-page {
  background: var(--color-bg);
  overflow-x: clip; /* ambient glows may extend past the viewport; never scroll sideways */
  --gold: #d9b96a;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--color-accent-500);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 500;
}
.skip-link:focus { top: var(--space-4); color: #fff; }

.home-page :focus-visible {
  outline: 2px solid var(--color-lavender);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---- Shared type primitives (homepage) ------------------------------------ */

.home-page .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-6);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-lavender);
}
.home-page .eyebrow i { font-style: normal; opacity: 0.5; }
.home-page .eyebrow-plain {
  margin-bottom: var(--space-4);
  padding: 0;
  gap: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--color-accent-700);
}
/* Accent line before the label (replaces the old boxed look) */
.home-page .eyebrow-plain::before {
  content: "";
  flex: none;
  width: 34px;
  height: 2px;
  border-radius: 2px;
}
/* Centered headers get a mirrored line on the right too */
.section-head-center .eyebrow-plain::after,
.tm-teaser .eyebrow-plain::after,
.sk-video-head .eyebrow-plain::after {
  content: "";
  flex: none;
  width: 34px;
  height: 2px;
  border-radius: 2px;
}
.eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-accent-600);
  box-shadow: 0 0 12px 2px rgba(139, 92, 246, 0.8);
}

.home-page .section-title {
  margin: 0;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 500;
}
.home-page .section-title-sm { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
.home-page .section-sub {
  margin: var(--space-4) 0 0;
  max-width: 46ch;
  color: var(--color-text-muted);
  font-size: var(--font-size-lg);
  line-height: 1.6;
}

/* Rhythm: generous but never empty. R1 foundation fix B — desktop vertical
   rhythm brought down from --space-24 (96px) to --space-16 (64px); the hero
   itself is sized separately and stays exempt from this. */
.section-block { padding: var(--space-16) 0; position: relative; }
.section-tight { padding-top: 0; padding-bottom: var(--space-16); }

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-12);
  flex-wrap: wrap;
}
.section-head-center { text-align: center; margin-bottom: var(--space-16); }
.section-head-center .eyebrow { justify-content: center; }

/* Refined secondary action — deliberately quieter than the heading. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--color-border-soft);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), gap var(--dur-fast) var(--ease-out);
}
.section-head-row .link-arrow { margin-top: 0; }
.link-arrow:hover { color: var(--color-text); border-color: var(--color-accent-600); gap: var(--space-3); }

/* "Explore All Courses" CTA — moved below the Featured Courses grid.
   Scoped to .explore-all-cta only; does not touch the shared .btn-primary
   colour/shadow/transform rules owned by buttons.css. Adds a standing
   glow + gentle bounce so the button draws the eye without a hover. */
.explore-all-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-10);
}
.explore-all-cta {
  font-weight: 700;
  letter-spacing: 0.01em;
  font-size: 0.88rem;
  padding: 0 var(--space-6);
  min-height: 42px;
}

/* Shared standing glow + gentle bounce — reused on any CTA that should draw
   the eye without needing hover (hero "Explore Courses", "Explore All
   Courses" below Featured Courses, etc). Scoped to .glow-bounce-cta only;
   does not touch the shared .btn-primary colour/shadow/transform rules
   owned by buttons.css. */
.glow-bounce-cta {
  animation: explore-cta-glow 2.2s ease-in-out infinite, explore-cta-bounce 2.2s ease-in-out infinite;
}
@keyframes explore-cta-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.55), 0 14px 32px -12px rgba(124, 58, 237, 0.65); }
  50% { box-shadow: 0 0 28px 8px rgba(168, 85, 247, 0.55), 0 14px 32px -12px rgba(124, 58, 237, 0.65); }
}
@keyframes explore-cta-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .explore-all-cta { animation: none; }
}

/* ---- Buttons (homepage only) ------------------------------------------------
   Colour, background and hover now live in buttons.css (single source of
   truth). Size/shape overrides for the homepage's larger CTA buttons stay
   here since they're layout, not colour. ------------------------------------ */

.home-page .btn-lg { padding: 0.95rem 1.75rem; font-size: 1rem; border-radius: 12px; gap: var(--space-2); }

/* Auth-pending guard for body-level (non-header) auth groups: same signal
   nav.js already provides — no JS change. Prevents a guest-CTA flash for a
   signed-in visitor. Degrades to a brief flash on browsers without :has(). */
.home-page:has(.nav-actions[data-auth-pending]) main [data-auth] {
  visibility: hidden;
}
/* Auth groups in the body flow inline with their sibling buttons. */
.home-page main [data-auth] { display: contents; }
.home-page main [data-auth][hidden] { display: none; }

/* ==========================================================================
   HEADER + FOOTER live in assets/css/public.css (shared by every public page).
   ========================================================================== */

/* ==========================================================================
   1. HERO — photographic founder/workspace portrait (dark + light background
   images, swapped per theme in theme-futuristic.css / site.css), with a
   cinematic sticky-overlap scroll effect: the hero stays pinned while the
   first section slides up over it (see "CINEMATIC HERO OVERLAP" near the
   bottom). Left column = real HTML copy. Right side = the supplied raster
   photo, shown as a background-image on the hero itself (see THE IMAGE
   LAYER below) — never duplicated as an <img>, SVG or CSS illustration.
   ========================================================================== */

.home-page .hero.hero-v2 {
  min-height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-top: calc(-1 * var(--pub-header-height));
  overflow: hidden;
  isolation: isolate;
  background: var(--color-bg);
  /* position & z-index set in the CINEMATIC HERO OVERLAP section below */
}

/* THE IMAGE LAYER — one element, one background-image per theme.
   Base rule only sets geometry; the actual image + scrim are declared once
   per theme (dark: theme-futuristic.css §4, light: site.css §F) so there is
   exactly one authoritative background declaration per mode. */
.hero.hero-v2::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  display: block;
  background-repeat: no-repeat;
  background-position: 88% center;
  background-size: cover;
}

/* Subtle scanline overlay for futuristic feel (dark-only; hidden in light
   mode by site.css since the photo already carries its own texture) */
.hero.hero-v2::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(139, 69, 255, 0.045) 2px,
    rgba(139, 69, 255, 0.045) 4px
  );
  pointer-events: none;
}

.hero-v2-inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
}

.hero-v2-copy {
  grid-column: 1 / 2;
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 0 var(--space-6);
  position: relative;
  z-index: 1;
}

/* Pill badge above headline */
.hero-v2-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.45rem 1.2rem;
  border-radius: var(--radius-full);
  background: rgba(139, 69, 255, 0.12);
  border: 1px solid rgba(139, 69, 255, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-family-base);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-lavender);
  margin: 0 0 var(--space-6);
  box-shadow: 0 0 24px rgba(139, 69, 255, 0.25);
}

/* Dot before the tag text */
.hero-v2-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent-600);
  box-shadow: 0 0 8px var(--color-accent-500);
}

/* Huge headline */
.home-page .hero h1.hero-v2-title {
  margin: 0 0 var(--space-6);
  max-width: 820px;
  font-family: 'Sora', var(--font-family-base);
  font-size: clamp(2.2rem, 3.8vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  /* base.css's global `h1 { font-weight: 400 !important }` (added for the
     Staatliches h1 font) overrides any non-!important weight here — match
     it with !important so this headline stays genuinely bold. */
  font-weight: 700 !important;
  color: var(--color-text);
  text-wrap: balance;
  text-shadow:
    0 0 80px rgba(139, 69, 255, 0.4),
    0 2px 40px rgba(6, 4, 12, 0.6);
}

/* Gradient highlight accent word — color fallback precedes the clip trick
   in case the browser doesn't support background-clip:text */
.hero-title-accent {
  font-family: 'Sora', var(--font-family-base);
  /* base.css's global `h1 span { font-weight: 400 !important }` overrides
     this unless matched with !important too (same issue as .hero-v2-title
     above — "FORGOT" is a <span> inside the <h1>). */
  font-weight: 700 !important;
  color: #a855f7;
  background: linear-gradient(135deg, #c084fc, #a855f7, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(139, 69, 255, 0.5));
}

.hero-v2-lead {
  margin: 0 0 var(--space-10);
  max-width: 520px;
  font-family: var(--font-family-base);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.7;
  color: rgba(213, 207, 235, 0.85);
  text-wrap: balance;
}

/* CTA buttons */
.home-page .hero-v2-actions.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-4);
}

/* Button glow removed — buttons must look identical on every page.
   All .btn-primary/.btn-outline/.btn-ghost visuals (colour, shadow,
   hover) live only in assets/css/buttons.css. Do not re-add rules
   here — see buttons.css's "DO NOT ADD BUTTON COLOUR RULES ELSEWHERE". */

/* Stats strip at bottom of hero */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-8);
  margin-top: var(--space-12);
  flex-wrap: wrap;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.hero-stat strong {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--color-lavender);
  line-height: 1;
}
.hero-stat span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}
.hero-stat-div {
  width: 1px;
  height: 32px;
  background: var(--color-border-soft);
}

/* Scroll indicator */
.hero-scroll-hint {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-scroll-mouse {
  width: 20px;
  height: 32px;
  border: 1.5px solid rgba(192, 160, 255, 0.4);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  padding-top: 5px;
}
.hero-scroll-wheel {
  width: 3px;
  height: 6px;
  background: var(--color-lavender);
  border-radius: 2px;
}


/* ==========================================================================
   1b. HERO COURSE ORBIT — right-side hero visual, desktop only.
   Real published courses (home.js, same Catalog.listCourses response as
   Featured Courses) arranged on a continuous 3D circular path.

   Structure: .hero-orbit (region, column 2 of .hero-v2-inner) >
   .hero-orbit-stage (perspective) > .hero-orbit-track (the rotating ring,
   one authoritative animation: hero-orbit-spin) > .hero-orbit-card (one
   per course; positioned around the ring by an inline --i/--n angle, with
   its own counter-rotation so the card face and its text stay upright
   regardless of ring rotation — the "separate inner transform" required
   so text never goes sideways).

   One animation drives the whole ring; cards never animate individually.
   Colors, borders and glass surfaces all route through tokens.css, so
   dark/light need no separate rule set here — only the two theme files'
   small, declared-once adjustments (glow intensity, thumb overlay).
   ========================================================================== */

.hero-orbit {
  grid-column: 2 / 3;
  position: relative;
  height: min(74vh, 620px);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-orbit-stage {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 520px;
  perspective: 1400px;
}

.hero-orbit-track {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: hero-orbit-spin 16s linear infinite;
}

@keyframes hero-orbit-spin {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

/* Pause on hover/focus (Phase 4 requirement) — one declaration, no JS
   timer needed since CSS animations respect animation-play-state. */
.hero-orbit-stage:hover .hero-orbit-track,
.hero-orbit-track:focus-within {
  animation-play-state: paused;
}

.hero-orbit-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 215px;
  margin: -90px 0 0 -107px;
  /* Placed on the ring by JS via --i (index) and --n (count) as inline
     custom properties; the transform itself lives here so there is one
     authoritative placement rule, not one per card. Radius bumped along
     with the larger card width so bigger cards still clear each other
     around the ring instead of overlapping. */
  transform:
    rotateY(calc(360deg / var(--n) * var(--i)))
    translateZ(var(--hero-orbit-radius, 170px))
    scale(var(--hero-orbit-scale, 0.82));
  backface-visibility: hidden;
}

/* Inner face counter-rotates against the ring so the card content stays
   upright and forward-facing at every point in the rotation — the
   dedicated inner transform the brief requires. */
.hero-orbit-card-face {
  display: block;
  transform-style: preserve-3d;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--color-surface-2), var(--color-surface));
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.hero-orbit-card-face:hover,
.hero-orbit-card-face:focus-visible {
  border-color: var(--color-border-strong);
  box-shadow: var(--glow-soft);
  outline: none;
}
.hero-orbit-card-face:focus-visible {
  outline: 2px solid var(--color-accent-500);
  outline-offset: 2px;
}

.hero-orbit-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--color-surface-2);
  overflow: hidden;
}
.hero-orbit-thumb img,
.hero-orbit-thumb .thumb-art {
  width: 100%;
  height: 100%;
}
.hero-orbit-thumb img { object-fit: cover; display: block; }
.hero-orbit-thumb::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(180deg, transparent, var(--color-scrim-thumb));
  pointer-events: none;
}

.hero-orbit-badge {
  position: absolute;
  left: var(--space-2);
  bottom: var(--space-2);
  z-index: 1;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-lavender);
  background: var(--color-scrim-card);
  border: 1px solid rgba(167, 139, 254, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Light theme only: a near-white glass chip reads weakly over a bright
   thumbnail photo. Use a dark scrim with white text instead, the same
   treatment the thumbnail's own bottom fade already uses, so the badge
   stays readable over any course photo. */
html[data-site-theme="light"] .hero-orbit-badge {
  color: #ffffff;
  background: rgba(28, 21, 48, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-orbit-body {
  padding: var(--space-3) var(--space-4) var(--space-4);
}
.hero-orbit-title {
  margin: 0 0 2px;
  font-size: 0.94rem;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-orbit-price {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--color-lavender);
}

/* Depth cue: cards nearer the back of the ring read smaller/quieter so the
   front cards stay most prominent, without any per-frame JS measurement —
   driven purely by each card's own placement angle via --i/--n. */
.hero-orbit-card:nth-child(odd)  { z-index: 2; }
.hero-orbit-card { opacity: 0.55; }
.hero-orbit-card[data-front="true"] { opacity: 1; }

/* Light theme only: on a white/light backdrop the dark-tuned 0.55 opacity
   and soft shadow made back-ring cards wash out almost invisibly. Lift the
   floor opacity and give the card face a firmer shadow/border so every
   card in the ring stays legible in daylight, without touching dark mode. */
html[data-site-theme="light"] .hero-orbit-card { opacity: 0.72; }
html[data-site-theme="light"] .hero-orbit-card[data-front="true"] { opacity: 1; }
html[data-site-theme="light"] .hero-orbit-card-face {
  box-shadow: 0 10px 30px -8px rgba(28, 21, 48, 0.22), 0 2px 8px rgba(28, 21, 48, 0.08);
  border-color: rgba(28, 21, 48, 0.10);
}
html[data-site-theme="light"] .hero-orbit-card-face:hover,
html[data-site-theme="light"] .hero-orbit-card-face:focus-visible {
  border-color: var(--color-border-strong);
}

@media (hover: hover) {
  .hero-orbit-card-face:hover { transform: translateY(-4px); }
}

/* Reduced motion / no JS: a single still, readable frame — ring stops,
   every card shown at full opacity, exactly the "stable arrangement"
   Phase 7 requires. */
@media (prefers-reduced-motion: reduce) {
  .hero-orbit-track {
    animation: none;
  }
  .hero-orbit-card {
    opacity: 1;
  }
}

/* ==========================================================================
   2. EDITORIAL TWO-COLUMN (What is / Why practical)
   ========================================================================== */

.ed-grid { display: grid; grid-template-columns: 5fr 6fr; gap: var(--space-16); align-items: start; }
.ed-grid-rev { grid-template-columns: 6fr 5fr; }
.ed-grid-rev > :first-child { order: 2; }
.ed-prose p { color: var(--color-text-muted); font-size: 1.0625rem; line-height: 1.75; margin: 0 0 var(--space-5); max-width: 62ch; }
.ed-quote { margin: var(--space-8) 0 0; padding-left: var(--space-5); border-left: 2px solid var(--gold); font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.5rem; line-height: 1.35; color: var(--color-text); }
.pill-list { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-3); }
.pill-list li { padding: 0.45rem 0.95rem; border: 1px solid var(--color-border-soft); border-radius: var(--radius-full); font-size: var(--font-size-sm); color: var(--color-lavender); }

/* ==========================================================================
   3. FOUNDER — ScaleToSky-inspired layout (home + about shared)
   Base .founder-v2-* rules now live in public.css (loaded by both home.css
   and about.css) — consolidated here as part of R1 foundation fix A.
   Homepage-only overrides on top of that shared base:
   ========================================================================== */

/* Homepage-only perspective for the founder photo wrap; About does not use
   this treatment, so it stays homepage-only rather than moving to the
   shared base. */
.founder-v2-photo-wrap {
  perspective: 1000px;
}

/* ==========================================================================
   4. SKILLS — category cards, plus optional video column
   ========================================================================== */

.sk-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.sk-num { font-size: var(--font-size-sm); letter-spacing: .14em; color: var(--gold); }

/* ---- SKILLS SECTION VIDEO HEADING ----
   Eyebrow + title sitting above the video card, centred. Poppins throughout
   (site's base font), not the Oswald h1 font. */
.sk-video-head {
  max-width: 860px;
  margin: 0 auto var(--space-6);
  text-align: center;
}
.sk-video-head .eyebrow-plain {
  margin-bottom: var(--space-3);
}
.sk-video-title {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 500;
  color: var(--color-text);
}
.sk-video-title-accent {
  font-family: var(--font-family-base);
  font-weight: 500;
  color: var(--color-lavender);
}

/* ---- SKILLS SECTION VIDEO (Central Placeholders System — home.skills.video)
   The video lives in the same #skills section as the skill cards.
   Desktop layout: heading + cards on the left, video on the right.
   Mobile: heading → video → cards, stacked full-width.

   .sk-layout       — two-column wrapper replacing the direct .container > .sk-grid pattern.
   .sk-content-col  — left column: heading + cards.
   .sk-video-col    — right column: video (or placeholder when not configured).
   #skills-video-wrap — the live target JS populates (four states below). ---- */

.sk-layout {
  display: grid;
  grid-template-columns: 1fr 420px; /* cards + video side-by-side on desktop */
  gap: var(--space-10);
  align-items: start;
}


/* Video column — card-style surface that matches the skill cards */
.sk-video-col {
  position: sticky;
  top: var(--space-8);
  /* Sticky only makes sense at larger viewports; collapsed below */
}

/* Full-width video when skill cards are removed */
.sk-video-col.sk-video-full {
  position: static;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

/* ---- Video container (inner wrapper for border + background) ---- */
#skills-video-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border-soft);
  background: linear-gradient(160deg, rgba(124,58,237,.10), var(--color-surface));
  min-height: 200px; /* prevents zero-height before JS runs */
  transition: border-color var(--dur-base) var(--ease-out);
}

#skills-video-wrap:focus-within {
  border-color: var(--color-border-strong);
}

/* ── STATE: LOADING ── */
#skills-video-wrap[data-sv-state="loading"] {
  border-color: var(--color-border-soft);
}

.sv-skeleton {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
}

.sv-skeleton-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(192, 160, 255, 0.12) 40%,
    rgba(192, 160, 255, 0.22) 50%,
    rgba(192, 160, 255, 0.12) 60%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: sv-shimmer 1.6s ease-in-out infinite;
}

@keyframes sv-shimmer {
  0%   { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

/* ── STATE: CONFIGURED — 16:9 Bunny iframe ── */
#skills-video-wrap[data-sv-state="configured"] {
  border-color: var(--color-border-strong);
}

.sv-ratio {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.sv-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-lg);
  background: #000;
}

/* ── STATE: EMPTY (not configured) ── */
.sv-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-10) var(--space-6);
  text-align: center;
  min-height: 220px;
}

.sv-empty-icon {
  color: var(--color-accent-700);
  opacity: 0.6;
  margin-bottom: var(--space-2);
}

.sv-empty-title {
  margin: 0;
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--color-text);
}

.sv-empty-desc {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  max-width: 28ch;
  line-height: 1.6;
}

/* ── STATE: ERROR ── */
.sv-error {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-6);
  min-height: 160px;
  text-align: center;
}

.sv-error p {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* R1 foundation fix I: !important removed from all four declarations below.
   This selector (0,2,0 specificity) already beats the base #skills-video-wrap
   rule (0,1,0) on its own, and for the one property it shares with
   #skills-video-wrap[data-sv-state="configured"] (also 0,2,0) — border-color
   — this rule comes later in the same file, so normal cascade order already
   resolves it the same way !important was forcing. Kept entirely within
   home.css; no change to site.css or theme-futuristic.css. */
html[data-site-theme="light"] #skills-video-wrap {
  background: #ffffff;
  border-color: rgba(109, 61, 245, 0.16);
  box-shadow: 0 14px 34px -22px rgba(28, 21, 48, 0.35);
}

html[data-site-theme="light"] #skills-video-wrap[data-sv-state="configured"] {
  border-color: rgba(109, 61, 245, 0.38);
}

html[data-site-theme="light"] .sv-skeleton {
  background: var(--color-surface-2);
}

html[data-site-theme="light"] .sv-skeleton-shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(109, 61, 245, 0.08) 40%,
    rgba(109, 61, 245, 0.15) 50%,
    rgba(109, 61, 245, 0.08) 60%,
    transparent 100%
  );
  background-size: 200% 100%;
}

html[data-site-theme="light"] .sv-empty-icon {
  color: var(--color-accent-600);
}

html[data-site-theme="light"] .sv-empty-title {
  color: var(--color-text);
}

html[data-site-theme="light"] .sv-empty-desc,
html[data-site-theme="light"] .sv-error p {
  color: var(--color-text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .sv-skeleton-shimmer { animation: none; }
  #skills-video-wrap { transition: none; }
}

/* ==========================================================================
   5. FEATURED COURSES — premium cards
   ========================================================================== */

.hc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

.hc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, var(--color-surface-2), var(--color-surface));
  border: 1px solid var(--color-border-soft);
  box-shadow: 0 0 0 1px rgba(192, 160, 255, 0.06) inset, 0 1px 0 rgba(192, 160, 255, 0.08) inset, 0 20px 50px -30px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  color: var(--color-text);
  transition: transform 280ms var(--ease-out), border-color 280ms var(--ease-out), box-shadow 280ms var(--ease-out);
}
.hc-card:hover { color: var(--color-text); }

/* Corner-accent + hover shine sweep — matches .cc-card on the courses page */
.hc-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 60px; height: 60px;
  background: linear-gradient(225deg, rgba(139, 69, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  transition: opacity 280ms var(--ease-out);
}
.hc-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.025) 50%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity 280ms var(--ease-out);
  pointer-events: none;
  z-index: 0;
  border-radius: var(--radius-xl);
}

.hc-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--color-surface-2); }
.hc-thumb img,
.hc-thumb .thumb-art {
  width: 100%; height: 100%;
  transition: transform 520ms var(--ease-out);
}
.hc-thumb img { object-fit: cover; }
/* bottom scrim so the badges stay legible on any image */
.hc-thumb::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 45%;
  background: linear-gradient(180deg, transparent, var(--color-scrim-thumb));
  pointer-events: none;
}

.hc-badges { position: absolute; left: var(--space-3); bottom: var(--space-3); z-index: 2; display: flex; gap: var(--space-2); flex-wrap: wrap; }
.hc-badge {
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.65rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--color-text);
  background: var(--color-scrim-card);
  border: 1px solid var(--color-border-soft);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.hc-badge-cat { color: var(--color-lavender); border-color: rgba(167, 139, 250, 0.3); }

.hc-body { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4) var(--space-5) var(--space-5); flex: 1; }
.hc-title {
  margin: 0;
  font-size: 1.05rem; line-height: 1.3; font-weight: 500; letter-spacing: -0.02em;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color 280ms var(--ease-out);
}
/* Card is an <article>, not a nested-link <a>: the title link covers the card. */
.hc-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.hc-instructor { margin: 0; font-size: 0.8125rem; color: var(--color-text-muted); }
.hc-desc { margin: var(--space-1) 0 0; color: var(--color-text-muted); font-size: 0.8125rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: var(--space-3); }
.hc-price { display: inline-flex; align-items: baseline; gap: var(--space-2); }
.hc-price-now { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.02em; transition: filter 280ms var(--ease-out); }
.hc-price-was { font-size: 0.8125rem; color: var(--color-text-muted); text-decoration: line-through; }
.hc-off { margin-left: var(--space-2); font-size: .7rem; font-weight: 500; color: var(--gold); }
.hc-go {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  color: var(--color-lavender);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid var(--color-border-soft);
  transition: background 280ms var(--ease-out), transform 280ms var(--ease-out), box-shadow 280ms var(--ease-out);
}
.hc-cta-group { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: var(--space-2); }
.hc-cta-slot { position: relative; z-index: 2; }
.hc-cta { display: inline-flex; align-items: center; padding: 0.4rem var(--space-3); border: 1px solid var(--color-border-strong); border-radius: var(--radius-full); font-size: 0.8125rem; font-weight: 500; color: var(--color-text); transition: background 280ms var(--ease-out), border-color 280ms var(--ease-out), color 280ms var(--ease-out), box-shadow 280ms var(--ease-out); }
.hc-cta:hover { background: linear-gradient(135deg, var(--bx-from) 0%, var(--bx-via) 50%, var(--bx-to) 100%); border-color: transparent; color: #fff; }
.hc-cta-owned { background: linear-gradient(135deg, var(--bx-from) 0%, var(--bx-via) 50%, var(--bx-to) 100%); border-color: transparent; color: #fff; }
.hc-cta-owned:hover { background: linear-gradient(135deg, var(--bx-from-h) 0%, var(--bx-via-h) 50%, var(--bx-to-h) 100%); }

/* Secondary Add to Cart icon-button — compact, sits beside the primary CTA. */
.hc-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  background: rgba(139, 92, 246, 0.12);
  color: var(--color-text);
  cursor: pointer;
  transition: background 280ms var(--ease-out), border-color 280ms var(--ease-out), color 280ms var(--ease-out), transform 120ms var(--ease-out);
}
.hc-cart-btn:hover, .hc-cart-btn:focus-visible {
  background: linear-gradient(135deg, var(--bx-from) 0%, var(--bx-via) 50%, var(--bx-to) 100%);
  border-color: transparent;
  color: #fff;
}
.hc-cart-btn:active { transform: translateY(1px); }
.hc-cart-btn:disabled { cursor: default; }
.hc-cart-btn.is-loading { opacity: 0.6; animation: hc-cart-pulse 900ms ease-in-out infinite; }
.hc-cart-btn.is-added {
  background: rgba(100, 200, 80, 0.14);
  border-color: rgba(100, 200, 80, 0.35);
  color: #a0e878;
}
.hc-cart-btn.is-added:hover { background: rgba(100, 200, 80, 0.14); color: #a0e878; }
@keyframes hc-cart-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) {
  .hc-cart-btn.is-loading { animation: none; }
}

/* Hover only on devices that can hover — avoids sticky-hover on touch.
   Colour/shadow change only — no movement or scaling. */
@media (hover: hover) {
  .hc-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-border-strong);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 34px 70px -28px rgba(124, 58, 237, 0.5), 0 0 60px -20px rgba(124, 58, 237, 0.35);
  }
  .hc-card:hover::before { opacity: 2; }
  .hc-card:hover::after { opacity: 1; }
  .hc-card:hover .hc-thumb img,
  .hc-card:hover .hc-thumb .thumb-art { transform: scale(1.07); }
  .hc-card:hover .hc-title { color: var(--color-lavender); }
  .hc-card:hover .hc-price-now { filter: drop-shadow(0 0 14px rgba(139, 69, 255, 0.45)); }
  .hc-card:hover .hc-go {
    background: linear-gradient(135deg, #8b45ff, #6b21d4);
    color: #fff;
    transform: translate(2px, -2px);
    box-shadow: 0 0 16px rgba(139, 69, 255, 0.6);
  }
  .hc-card:hover .hc-cta {
    background: rgba(139, 69, 255, 0.22);
    border-color: rgba(139, 69, 255, 0.55);
    box-shadow: 0 0 20px -6px rgba(139, 69, 255, 0.5);
  }
}
.hc-card:focus-visible {
  border-color: rgba(139, 69, 255, 0.7);
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 69, 255, 0.3);
}

/* Skeleton + states */
.hc-skeleton { pointer-events: none; }
.hc-skeleton .hc-thumb { border-radius: 0; }
.sk-line { height: 14px; border-radius: 6px; }
.sk-short { width: 55%; }
.sk-price { width: 30%; height: 20px; margin-top: var(--space-4); }
.hc-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-16) var(--space-6);
  border: 1px dashed var(--color-border-soft);
  border-radius: var(--radius-xl);
  background: var(--color-scrim-soft);
}
.hc-state h3 { margin: 0 0 var(--space-2); }
.hc-state p { margin: 0 auto var(--space-6); max-width: 44ch; color: var(--color-text-muted); }
.hc-state p:last-child { margin-bottom: 0; }

/* ---- Generated thumbnail fallback (no image) ---------------------------------------
   Driven by inline custom props (--art-hue, --art-x, --art-y) set from a hash
   of the course, so each card is distinct but stays inside the brand's
   purple family. */

.thumb-art {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at var(--art-x, 30%) var(--art-y, 25%), hsl(var(--art-hue, 262) 85% 62% / 0.55), transparent 58%),
    radial-gradient(circle at 85% 90%, hsl(calc(var(--art-hue, 262) + 24) 80% 55% / 0.22), transparent 55%),
    linear-gradient(155deg, #1d1538 0%, #120c26 100%);
}
/* subtle fine grid texture */
.thumb-art::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(196, 181, 253, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 181, 253, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 78%);
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 78%);
}
.art-shape { position: absolute; z-index: 0; pointer-events: none; }
.art-shape-a { border: 1px solid rgba(196, 181, 253, 0.22); }
.art-shape-b { background: linear-gradient(135deg, rgba(196, 181, 253, 0.16), rgba(124, 58, 237, 0.02)); border: 1px solid rgba(196, 181, 253, 0.12); }

/* four deterministic geometric compositions */
.art-v0 .art-shape-a { width: 62%; aspect-ratio: 1; border-radius: 50%; right: -14%; top: -30%; }
.art-v0 .art-shape-b { width: 38%; aspect-ratio: 1; border-radius: 50%; left: -8%; bottom: -26%; }
.art-v1 .art-shape-a { width: 54%; aspect-ratio: 1; border-radius: 22%; transform: rotate(18deg); right: -8%; bottom: -34%; }
.art-v1 .art-shape-b { width: 30%; aspect-ratio: 1; border-radius: 50%; left: 8%; top: -16%; }
.art-v2 .art-shape-a { width: 70%; height: 1px; border: 0; background: linear-gradient(90deg, transparent, rgba(196, 181, 253, 0.35), transparent); left: 8%; top: 34%; transform: rotate(-14deg); }
.art-v2 .art-shape-b { width: 46%; aspect-ratio: 1; border-radius: 50%; right: -12%; bottom: -30%; }
.art-v3 .art-shape-a { width: 46%; aspect-ratio: 1; transform: rotate(45deg); border-radius: 14%; left: -12%; top: -24%; }
.art-v3 .art-shape-b { width: 58%; aspect-ratio: 1; border-radius: 50%; right: -18%; bottom: -36%; }

.art-initials {
  position: absolute; z-index: 1; left: var(--space-5); top: 50%;
  transform: translateY(-58%);
  font-size: clamp(3.2rem, 7vw, 4.6rem);
  font-weight: 600; letter-spacing: -0.06em; line-height: 1;
  color: transparent;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92) 0%, rgba(196, 181, 253, 0.55) 55%, rgba(167, 139, 250, 0.22) 100%);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 6px 24px rgba(124, 58, 237, 0.55));
}
.art-label {
  position: absolute; z-index: 1; right: var(--space-4); top: var(--space-4);
  font-size: 0.62rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(196, 181, 253, 0.6);
}
/* In the hero the card already shows the category as text; hide the duplicate. */
.thumb-art-hero .art-label { display: none; }

/* ==========================================================================
   6. ECOSYSTEM — course-level vs membership-only
   ========================================================================== */

.eco-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.eco-col { padding: var(--space-8); border: 1px solid var(--color-border-soft); border-radius: var(--radius-lg); background: var(--color-glass); }
.eco-col-club { border-color: var(--color-border-strong); background: linear-gradient(160deg, rgba(124,58,237,.18), var(--color-surface)); }
.eco-col h3 { margin: 0 0 var(--space-5); font-size: 1.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.eco-flag { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); border: 1px solid rgba(217,185,106,.4); border-radius: var(--radius-full); padding: .2rem .6rem; }
.eco-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.eco-col li { color: var(--color-text-muted); line-height: 1.6; }
.eco-col li strong { display: block; color: var(--color-text); }

/* ==========================================================================
   7. AUDIENCE — open text tiles with a top hairline (deliberately not cards)
   ========================================================================== */

.aud-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.aud-grid li {
  position: relative;
  padding: var(--space-6) var(--space-6) var(--space-6) calc(var(--space-6) + 3px);
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-left: 3px solid var(--color-accent-500);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.aud-grid li:hover {
  border-left-color: var(--color-accent-600);
  box-shadow: var(--shadow-md);
}
.aud-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--color-accent-50);
  color: var(--color-accent-600);
}
.aud-grid h3 {
  margin: 0 0 var(--space-2);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-text);
}
.aud-grid p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ==========================================================================
   8. LEARN / APPLY / BUILD / GROW — one connected rail, not cards
   ========================================================================== */

.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-8); counter-reset: none; }
.flow li { position: relative; padding-top: var(--space-6); border-top: 1px solid var(--color-border-strong); }
.flow li::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent-600); box-shadow: 0 0 12px var(--color-accent-500); }
.flow-num { font-size: var(--font-size-sm); letter-spacing: .14em; color: var(--gold); }
.flow h3 { margin: var(--space-2) 0 var(--space-2); font-size: 1.5rem; }
.flow p { margin: 0; color: var(--color-text-muted); line-height: 1.65; }

/* ==========================================================================
   9. 1% CLUB TEASER — exclusive, atmospheric, not a pricing card
   ========================================================================== */

.club-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-12) var(--space-16);
  border-radius: 32px;
  border: 1px solid var(--color-border-strong);
  background:
    radial-gradient(900px 500px at 90% 10%, rgba(124, 58, 237, 0.32), transparent 65%),
    linear-gradient(180deg, rgba(30, 18, 58, 0.95), rgba(15, 10, 30, 0.98));
  box-shadow: 0 0 0 1px rgba(192, 160, 255, 0.12), inset 0 1px 0 rgba(192, 160, 255, 0.10);
}

/* Gradient border accent — the border's own position never moves/rotates;
   only the colors shift through the brand's purple/violet/gold palette
   over time (background-position animated on an oversized gradient strip). */
.club-panel::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 33px;
  background: linear-gradient(90deg,
    rgba(139, 69, 255, 0.6),
    rgba(192, 160, 255, 0.5),
    rgba(255, 196, 102, 0.55),
    rgba(236, 72, 153, 0.5),
    rgba(124, 58, 237, 0.6),
    rgba(139, 69, 255, 0.6));
  background-size: 300% 100%;
  z-index: -1;
  animation: club-glow-colorshift 8s ease-in-out infinite;
}
/* Soft diffuse halo behind the panel that breathes in and out, reinforcing
   the "premium / alive" feel without being a harsh flashing light. */
.club-panel::after {
  content: '';
  position: absolute;
  inset: -40px;
  z-index: -2;
  border-radius: 48px;
  background: radial-gradient(60% 60% at 50% 50%, rgba(139, 69, 255, 0.35), transparent 70%);
  filter: blur(32px);
  animation: club-glow-pulse 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes club-glow-colorshift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes club-glow-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .club-panel::before { animation: none; background-position: 0% 50%; }
  .club-panel::after { animation: none; opacity: 0.7; }
}

.club-mark {
  font-size: clamp(4.5rem, 10vw, 8rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
  color: transparent;
  background: linear-gradient(160deg, rgba(255,255,255,0.95) 0%, rgba(196, 181, 253, 0.6) 50%, rgba(124, 58, 237, 0.3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 8px 40px rgba(124, 58, 237, 0.55));
}

.club-copy h2 {
  margin: 0 0 var(--space-4);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.club-copy p {
  margin: 0 0 var(--space-8);
  max-width: 44ch;
  color: var(--color-text-muted);
  font-size: var(--font-size-base);
  line-height: 1.7;
}

/* ==========================================================================
   10. TESTIMONIALS TEASER — honest "coming soon" preview, no fake data
   ========================================================================== */

.tm-teaser {
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
  padding: var(--space-16) var(--space-8);
  border-radius: 32px;
  border: 1px dashed rgba(139, 69, 255, 0.25);
  background: var(--color-scrim-soft);
}
.tm-teaser .eyebrow { justify-content: center; }
.tm-teaser-mark {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: var(--space-5);
  border-radius: 14px;
  font-size: 1.5rem;
  color: var(--color-lavender);
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.18), rgba(139, 92, 246, 0.04));
  border: 1px solid var(--color-border-soft);
}
.tm-teaser h3 { margin: 0 0 var(--space-3); font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -0.02em; }
.tm-teaser p { margin: 0 auto var(--space-6); max-width: 44ch; color: var(--color-text-muted); line-height: 1.6; }

/* ==========================================================================
   11. FINAL CTA
   ========================================================================== */

.section-cta { padding-bottom: var(--space-16); }
.cta-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  padding: var(--space-16) var(--space-8);
  border-radius: 32px;
  border: 1px solid var(--color-border-strong);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139, 69, 255, 0.28) 0%, transparent 65%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(99, 40, 220, 0.22) 0%, transparent 70%),
    linear-gradient(180deg, rgba(30, 18, 58, 0.95), rgba(15, 10, 30, 0.98));
  box-shadow: 0 0 0 1px rgba(192, 160, 255, 0.12), inset 0 1px 0 rgba(192, 160, 255, 0.10);
}

/* Animated grid lines behind CTA */
.cta-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 69, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 69, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
  pointer-events: none;
  z-index: 0;
}
.cta-panel > * { position: relative; z-index: 1; }

.cta-glow {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 100%;
  width: 1200px;
  height: 800px;
  transform: translate(-50%, -58%);
  background: radial-gradient(closest-side, rgba(139, 69, 255, 0.65), rgba(139, 69, 255, 0.2) 52%, transparent 76%);
  filter: blur(14px);
}
.cta-panel h2 {
  margin: 0 0 var(--space-4);
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 600;
}
.cta-panel p {
  margin: 0 auto var(--space-10);
  max-width: 40ch;
  color: var(--color-text-muted);
  font-size: var(--font-size-lg);
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .founder-v2-panel { gap: var(--space-12); }
  .club-panel { padding: var(--space-12); gap: var(--space-8); }
  .sk-grid { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .aud-grid { grid-template-columns: repeat(2, 1fr); }

  /* Hero: give the copy column more of the width before the 768px full
     stack, and shrink the orbit's radius/card size to match its smaller
     column rather than letting it crowd the headline. */
  .hero-v2-inner { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .hero-orbit-stage { max-width: 360px; }
  .hero-orbit-card { width: 150px; margin: -64px 0 0 -75px; }
  :root { --hero-orbit-radius: 160px; }
}

@media (max-width: 1024px) {
  .sk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sk-grid li:first-child,
  .sk-grid li:last-child { grid-column: span 2; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
  .flow::before,
  .flow::after { display: none; }
  .sk-layout {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .sk-video-col {
    position: static; /* disable sticky when stacked */
    order: -1; /* heading → video → cards */
  }
  #skills-video-wrap {
    max-width: 640px; /* cap it so it doesn't span an 1100px-wide full-width */
  }
}

/* Tablet: hero's two columns collapse into one; the continuous 3D orbit is
   desktop-only (Phase 6), so it hides here and the horizontally
   scrollable mobile course strip takes over instead. 2 course columns. */
@media (max-width: 768px) {
  .section-block { padding: var(--space-12) 0; }
  .section-tight { padding-bottom: var(--space-12); }
  .home-page .hero.hero-v2 { min-height: 0; height: auto; }
  .hero-v2-inner { grid-template-columns: 1fr; }
  .hero-v2-copy { grid-column: 1 / -1; max-width: 560px; padding: 0 var(--space-4); }
  .hero-orbit { display: none; }
  .hc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
  /* .founder-v2-panel / .founder-v2-card tablet stacking now in public.css */
  .club-panel { grid-template-columns: 1fr; text-align: center; }
  .club-mark { text-align: center; justify-self: center; }
  .club-copy p { margin: 0 auto var(--space-8); }
}

@media (max-width: 768px) {
  .ed-grid, .ed-grid-rev, .eco-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .ed-grid-rev > :first-child { order: 0; }
}

/* Mobile: single column throughout.
   Kept at 640px (not folded into 480/768) as a genuine third collapse step:
   768px above only stacks the tablet 2-col panels, while this is the full
   mobile single-column treatment for hero/flow/sk-grid/aud-grid — merging it
   into either neighbor would leave those grids 2-column through part of the
   480-768px phone/tablet range, a real visual regression there. */
@media (max-width: 640px) {
  /* ---- Hero: clean, center-aligned text area; no visual column, no
     orbit. The hero stops being a fixed-viewport-height flex-centered
     panel and becomes a natural-height stack: header offset, then copy,
     then the next section (Featured Courses — the real published course
     grid already below the hero in the page's normal flow). The desktop
     ambient layer (.hero.hero-v2::after / ::before) is switched off here
     rather than re-positioned, since it was sized for the wide desktop
     orbit and reads as noise on a narrow screen. */
  .home-page .hero.hero-v2 {
    min-height: 0;
    height: auto;
    display: block;
    padding: calc(var(--pub-header-height) + var(--space-10)) 0 var(--space-10);
  }
  .hero.hero-v2::after,
  .hero.hero-v2::before {
    display: none;
  }

  .hero-v2-inner {
    display: block;
    height: auto;
  }
  /* Copy block: center-aligned stack (eyebrow, headline, lead, CTAs,
     stats all share this one alignment context instead of each
     re-declaring center/left). */
  .hero-v2-copy {
    max-width: none;
    padding: 0 var(--space-5);
    align-items: center;
    text-align: center;
  }

  .home-page .hero h1.hero-v2-title {
    font-size: clamp(2rem, 8.5vw, 2.8rem);
    max-width: none;
  }
  .hero-v2-lead { max-width: 480px; }

  /* Stats: compact, evenly spaced horizontal row, centered under the CTAs. */
  .hero-stats {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: var(--space-5);
    margin-top: var(--space-10);
  }
  .hero-stat { align-items: center; gap: 1px; }
  .hero-stat strong { font-size: 1.25rem; }
  .hero-stat span { font-size: 0.64rem; }
  .hero-stat-div { height: 28px; }

  /* CTAs: stacked and centered; primary goes full-width within the capped
     column, secondary sits centered beneath it. Destinations are unchanged
     — only layout/alignment is touched here. */
  .home-page .hero-v2-actions.hero-actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
  .home-page .hero-v2-actions .btn.btn-primary { width: 100%; }
  .home-page .hero-v2-actions .btn.hero-v2-btn-outline {
    width: auto;
    align-self: center;
    padding-left: 0;
    padding-right: 0;
    border-color: transparent;
    background: none;
  }

  .hero-scroll-hint { display: none; }

  .section-block { padding: var(--space-8) 0; }
  .section-head-row { margin-bottom: var(--space-8); }
  .section-head-center { margin-bottom: var(--space-12); }

  .sk-grid { grid-template-columns: 1fr; }
  .sk-grid li:first-child,
  .sk-grid li:last-child { grid-column: span 1; }
  .flow { grid-template-columns: 1fr; gap: var(--space-6); max-width: 380px; }
  .flow::before, .flow::after { display: none; }
  .flow li { text-align: left; display: grid; grid-template-columns: 80px 1fr; align-items: start; gap: var(--space-4); }
  .flow-num { grid-row: 1 / span 2; }
  .aud-grid { grid-template-columns: 1fr; }

  .hc-grid { grid-template-columns: 1fr; gap: var(--space-4); }

  .club-panel { padding: var(--space-10) var(--space-5); border-radius: var(--radius-xl); }
  .cta-panel { padding: var(--space-16) var(--space-5); border-radius: var(--radius-xl); }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .cta-actions .btn { width: 100%; }
  .tm-teaser { padding: var(--space-10) var(--space-5); border-radius: var(--radius-xl); }

  #skills-video-wrap {
    max-width: none;
  }
  .eco-col { padding: var(--space-6); }
  /* .founder-v2-traits single-column collapse now in public.css */
}

/* ==========================================================================
   CINEMATIC HERO OVERLAP — Hero stays sticky, content slides up over it
   ========================================================================== */

/* Smooth scrolling is configured in css/1-base/scroll.css + js/core/smooth-scroll.js */

/* ---- Hero: pinned behind the page; sections slide up over it ----
   The hero stays stuck at the top while the next sections (opaque, z-index 1)
   scroll over it and visually cover it as the page scrolls. Kept as-is
   (intentionally not simplified further). */
.home-page .hero.hero-v2 {
  position: sticky !important;
  top: 0 !important;
  z-index: 0 !important;
  max-height: none !important;
}

/* ---- Main layout ---- */
main#main {
  position: relative;
}

/* ---- Sections: opaque + stacked above the pinned hero ---- */
section.section-block {
  position: relative;
  will-change: auto;
  transform-origin: center top;
  z-index: 1;
  background: var(--color-bg);
}

/* All sections: no radius, no border, no shadow */
section#what-is,
section.section-block {
  border-radius: 0;
  overflow: visible;
  border-top: none;
  box-shadow: none;
}

/* First section after the hero: soft shadow so the overlap reads as depth */
main#main > section#founder.section-block {
  box-shadow: 0 -28px 60px -18px rgba(0, 0, 0, 0.55);
}
html[data-site-theme="light"] main#main > section#founder.section-block {
  box-shadow: 0 -24px 50px -22px rgba(28, 21, 48, 0.28);
}

/* ---- Hero scroll FX: blur / dim / zoom-out driven by --hero-scroll ----
   assets/js/hero-scroll-fx.js writes --hero-scroll (0 → 1) onto the hero
   element as the user scrolls through one hero-height. We translate that
   single progress value into a blur, a slow zoom-out, a brightness dip and
   a touch of upward parallax on the copy, so the hero visibly reacts
   instead of just getting covered. Defaults (--hero-scroll: 0) keep the
   hero perfectly crisp at the top of the page. */
.home-page .hero.hero-v2 {
  --hero-scroll: 0;
  transition: filter 0.05s linear;
}

/* The background image/scrim layer: blur + slight extra darken + zoom. */
.home-page .hero.hero-v2::after {
  filter:
    blur(calc(var(--hero-scroll) * 14px))
    brightness(calc(1 - var(--hero-scroll) * 0.35));
  transform: scale(calc(1 + var(--hero-scroll) * 0.08));
  transition: filter 0.05s linear, transform 0.05s linear;
}

/* Copy block: fades, drifts up a little, and softens as it disappears
   behind the next section. Scoped to .hero-v2-copy (not the whole
   .hero-v2-inner grid) so the orbit — a separate visual region living in
   the grid's other column — is unaffected and stays readable/clickable
   through the scroll, instead of fading and blurring along with the text
   it was never meant to be coupled to. */
.hero-v2-copy {
  opacity: calc(1 - var(--hero-scroll) * 1.15);
  transform:
    translateY(calc(var(--hero-scroll) * -48px))
    scale(calc(1 - var(--hero-scroll) * 0.06));
  filter: blur(calc(var(--hero-scroll) * 6px));
  transition: opacity 0.05s linear, transform 0.05s linear, filter 0.05s linear;
  will-change: opacity, transform, filter;
}

.hero-scroll-hint {
  opacity: calc(1 - var(--hero-scroll) * 4);
  transition: opacity 0.05s linear;
}

/* Mobile: hero keeps the same sticky-pin cinematic overlap as desktop —
   it stays fixed in place while the next section (#founder) scrolls up
   and slides over it. The hero itself is still the natural-height text
   stack from the 640px breakpoint above (no forced full-viewport height),
   so the "pinned" distance is short and the overlap reads as a quick,
   deliberate reveal rather than a long scrub. Intensities are toned down
   from desktop (less blur/zoom/translate) since the hero is shorter here
   and the ambient ::after/::before image layer is off on mobile anyway. */
@media (max-width: 640px) {
  .home-page .hero.hero-v2 {
    position: sticky !important;
    top: 0 !important;
    z-index: 0 !important;
  }

  .hero-v2-copy {
    opacity: calc(1 - var(--hero-scroll) * 1.1);
    transform:
      translateY(calc(var(--hero-scroll) * -28px))
      scale(calc(1 - var(--hero-scroll) * 0.04));
    filter: blur(calc(var(--hero-scroll) * 4px));
    transition: opacity 0.05s linear, transform 0.05s linear, filter 0.05s linear;
  }

  .hero-scroll-hint { display: none; }
}

/* Founder section is the one that slides up and visually covers the
   pinned hero — give it a rounded top edge on mobile too (desktop keeps
   square corners/just a shadow) so the overlap reads as a distinct
   "sheet" sliding over the hero, not just a hard rectangular cut. */
@media (max-width: 640px) {
  main#main > section#founder.section-block {
    position: relative;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: 0 -16px 40px -12px rgba(0, 0, 0, 0.5);
  }
  html[data-site-theme="light"] main#main > section#founder.section-block {
    box-shadow: 0 -14px 34px -14px rgba(28, 21, 48, 0.25);
  }
}

/* Reduced motion: plain flow, no pinning, no scroll FX. */
@media (prefers-reduced-motion: reduce) {
  .home-page .hero.hero-v2 { position: relative !important; }
  .home-page .hero.hero-v2::after,
  .hero-v2-inner,
  .hero-scroll-hint {
    filter: none !important;
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
}

/* R1 foundation fix F: .section-title and .faq-list .faq-item previously
   carried permanent will-change hints here, but both only ever animate once
   on their GSAP scroll-reveal entrance (toggleActions: 'play none none
   none') — a static hint bought nothing after that and just reserved GPU
   compositing layers for the rest of the page's life. Removed. */

/* will-change: transform removed from buttons — that hint existed only
   to support the magnetic-button JS, which has been removed. Buttons
   must not declare transform/will-change outside buttons.css. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* R1 foundation fix F: these also only ever play one GSAP entrance
   (toggleActions: 'play none none none'), so no permanent will-change. */