/* ============================================
   MagnusIBA 3D Showcase Homepage
   White + Gold/Black futuristic theme
   ============================================ */

/* ── Design Tokens ── */
:root {
  --bg: #ffffff;
  --bg-surface: #fafaf9;
  --bg-elevated: #f5f5f4;
  --bg-card: #ffffff;
  --text: #0a0a0a;
  --text-secondary: #404040;
  --text-muted: #737373;
  --border: rgba(0,0,0,0.06);
  --border-glow: rgba(234,179,8,0.3);

  --gold: #eab308;
  --gold-light: #fbbf24;
  --gold-dark: #ca8a04;
  --gold-wash: #fef9c3;
  --black: #0a0a0a;
  --black-mid: #171717;
  --black-soft: #262626;

  --subject-math: #3b82f6;
  --subject-english: #8b5cf6;
  --subject-analytical: #22c55e;
  --subject-written: #f59e0b;
  --subject-general: #64748b;

  --font-body: 'Inter', system-ui, sans-serif;
  --font-display: 'Syne', system-ui, sans-serif;
  --font-accent: 'Orbitron', 'Syne', system-ui, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
}

/* ── Animated Border Property ── */
@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes borderSpin {
  to { --border-angle: 360deg; }
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Brand Colors ── */
.brand-i { color: #e53e3e; }
.brand-b { color: #38a169; }
.brand-a { color: #3182ce; }
.brand-prep { color: var(--text); }
.brand-nus { color: var(--gold-dark); }

/* ── Particles ── */
.particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 2px;
  opacity: 0;
  animation: particleDrift linear infinite;
}
@keyframes particleDrift {
  0% { opacity: 0; transform: translateY(100vh) rotate(0deg); }
  10% { opacity: 0.6; }
  90% { opacity: 0.4; }
  100% { opacity: 0; transform: translateY(-10vh) rotate(360deg); }
}

/* ── Section Shared ── */
.section-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-header {
  text-align: center;
  margin-bottom: 22px;
}
.section-tag {
  display: inline-block;
  padding: 6px 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #fff;
  background: #d97706;
  border: 2px solid #b45309;
  border-radius: 9999px;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

/* ── 3D Reveal System ── */
.reveal-3d {
  opacity: 0;
  transform: translateY(50px) rotateX(3deg);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal-3d.visible {
  opacity: 1;
  transform: translateY(0) rotateX(0);
}

/* ===== HERO ===== */

/*
 * 3D Parallax Hero — Premium / Futuristic
 * GPU-accelerated: only transforms, opacity, filter — no layout reflow.
 * Perspective is set on .hero itself so child transforms create true depth.
 */

.hero {
  position: relative;
  z-index: 1;
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 24px 32px;
  overflow-x: clip;
  overflow-y: visible;
  perspective: 1200px;
  perspective-origin: 50% 40%;
  background: #fafafa;
}

/* ── Blurred IBA watermark text behind content ── */
.hero__watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-accent);
  font-size: clamp(20rem, 50vw, 38rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: rgba(234,179,8,0.14);
  pointer-events: none;
  z-index: 0;
  user-select: none;
  filter: blur(6px);
  white-space: nowrap;
  line-height: 1;
}

/* ── Magnus Logo (legacy, hidden during reveal) ── */
.hero__logo {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 110px;
  height: auto;
  border-radius: 18px;
  margin-bottom: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  animation: fadeInUp 0.8s var(--ease-out) 0.05s both;
  transform: translateZ(40px);
  will-change: transform;
}

/* ===== HERO REVEAL SEQUENCE ===== */
.hero-reveal {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 200px;
  margin-bottom: 20px;
  perspective: 800px;
}

/* Phase 1: Old MagnusIBA logo — fades in, holds, then morphs out */
.hero-reveal__old-logo {
  position: absolute;
  width: 110px;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  opacity: 0;
  transform: scale(0.85);
  will-change: transform, opacity, filter;
  z-index: 2;
}
.hero-reveal__old-logo.entrance {
  animation: oldLogoIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-reveal__old-logo.morph-out {
  animation: oldLogoOut 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes oldLogoIn {
  0% {
    opacity: 0;
    transform: scale(0.85) translateY(8px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes oldLogoOut {
  0% {
    opacity: 1;
    transform: scale(1) perspective(600px) rotateY(0deg);
    filter: blur(0) brightness(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.6) perspective(600px) rotateY(90deg);
    filter: blur(8px) brightness(1.5);
  }
}

/* Phase 2: Reveal video */
.hero-reveal__video {
  position: absolute;
  width: 100%;
  max-width: 380px;
  height: auto;
  border-radius: var(--radius-xl);
  opacity: 0;
  transform: scale(0.92);
  will-change: opacity, transform;
  z-index: 1;
  box-shadow: 0 12px 48px rgba(0,0,0,0.2);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-reveal__video.playing {
  opacity: 1;
  transform: scale(1);
}
.hero-reveal__video.fade-out {
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1),
              transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Phase 3: New PrepNus logo — transparent PNG, smooth entrance */
.hero-reveal__new-logo {
  position: absolute;
  width: 150px;
  height: auto;
  opacity: 0;
  transform: scale(0.5);
  will-change: transform, opacity, filter;
  z-index: 3;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.15));
}
.hero-reveal__new-logo.enter {
  animation: logoEnter 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-reveal__new-logo.settled {
  opacity: 1;
  transform: scale(1);
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.15));
  animation: logoBreath 5s ease-in-out infinite;
}

@keyframes logoEnter {
  0% {
    opacity: 0;
    transform: scale(0.4) translateY(12px);
    filter: drop-shadow(0 0 0 transparent) blur(6px);
  }
  40% {
    opacity: 1;
    filter: drop-shadow(0 0 28px rgba(234,179,8,0.5)) blur(0px);
  }
  70% {
    transform: scale(1.08) translateY(-3px);
  }
  85% {
    transform: scale(0.97) translateY(1px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 2px 12px rgba(0,0,0,0.15));
  }
}

@keyframes logoBreath {
  0%, 100% {
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 2px 12px rgba(0,0,0,0.15));
  }
  50% {
    transform: scale(1.02) translateY(-5px);
    filter: drop-shadow(0 6px 20px rgba(0,0,0,0.12));
  }
}

/* Revealed state for hero text */
.hero__inner.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive reveal ── */
@media (max-width: 768px) {
  .hero-reveal {
    min-height: 160px;
    margin-bottom: 16px;
  }
  .hero-reveal__old-logo {
    width: 80px;
  }
  .hero-reveal__video {
    max-width: 300px;
  }
  .hero-reveal__new-logo {
    width: 110px;
  }
}
@media (max-width: 400px) {
  .hero-reveal {
    min-height: 130px;
    margin-bottom: 12px;
  }
  .hero-reveal__old-logo {
    width: 64px;
  }
  .hero-reveal__video {
    max-width: 240px;
  }
  .hero-reveal__new-logo {
    width: 90px;
  }
}

/* ── No animated pseudo backgrounds ── */
.hero::after {
  display: none;
}
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse at center,
    rgba(234,179,8,0.10) 0%,
    rgba(234,179,8,0.03) 50%,
    transparent 75%
  );
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: lightPulse 4s ease-in-out infinite;
  will-change: opacity, transform;
}

@keyframes lightPulse {
  0%, 100% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12);
  }
}

/* ── Geometric crosshatch grid — parallax layer (depth: far) ── */
.hero__grid {
  position: absolute;
  inset: -10%;        /* oversized so parallax shift never reveals edges */
  background-image:
    linear-gradient(rgba(234,179,8,0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234,179,8,0.09) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 10%, transparent 75%);
  pointer-events: none;
  will-change: transform;
  /* Slight base 3D tilt so it reads as a receding plane */
  transform: translateZ(-60px) scale(1.06);
  transform-origin: center center;
  transition: transform 0.05s linear;
}

/* ── Corner accent lines — purely decorative ── */
.hero__grid::before,
.hero__grid::after {
  content: '';
  position: absolute;
  pointer-events: none;
}
/* Top-right bracket */
.hero__grid::before {
  top: 12%;
  right: 8%;
  width: 60px;
  height: 60px;
  border-top: 1.5px solid rgba(234,179,8,0.35);
  border-right: 1.5px solid rgba(234,179,8,0.35);
}
/* Bottom-left bracket */
.hero__grid::after {
  bottom: 12%;
  left: 8%;
  width: 60px;
  height: 60px;
  border-bottom: 1.5px solid rgba(234,179,8,0.35);
  border-left: 1.5px solid rgba(234,179,8,0.35);
}

/* ── Floating 3D Hexagons ── */
.hero__hex {
  position: absolute;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  pointer-events: none;
  will-change: transform, opacity;
  /* GPU-friendly base */
  backface-visibility: hidden;
}

/* Hex 1 — top-left, deep layer */
.hero__hex:nth-child(2) {
  width: 88px;
  height: 88px;
  top: 14%;
  left: 9%;
  background: linear-gradient(
    145deg,
    rgba(234,179,8,0.55) 0%,
    rgba(251,191,36,0.25) 50%,
    rgba(202,138,4,0.10) 100%
  );
  /* Drop shadow creates depth illusion */
  filter:
    drop-shadow(0 0 12px rgba(234,179,8,0.6))
    drop-shadow(0 0 32px rgba(234,179,8,0.25));
  transform: translateZ(-120px) rotate(15deg);
  animation: hexFloat1 22s ease-in-out infinite;
}

/* Hex 2 — right side, medium layer */
.hero__hex:nth-child(3) {
  width: 54px;
  height: 54px;
  top: 62%;
  right: 12%;
  background: linear-gradient(
    135deg,
    rgba(251,191,36,0.65) 0%,
    rgba(234,179,8,0.30) 60%,
    rgba(202,138,4,0.08) 100%
  );
  filter:
    drop-shadow(0 0 10px rgba(251,191,36,0.7))
    drop-shadow(0 0 24px rgba(234,179,8,0.30));
  transform: translateZ(-40px) rotate(-20deg);
  animation: hexFloat2 17s ease-in-out infinite;
}

/* Hex 3 — bottom-left, close layer */
.hero__hex:nth-child(4) {
  width: 40px;
  height: 40px;
  bottom: 22%;
  left: 18%;
  background: linear-gradient(
    115deg,
    rgba(234,179,8,0.70) 0%,
    rgba(251,191,36,0.35) 55%,
    rgba(202,138,4,0.12) 100%
  );
  filter:
    drop-shadow(0 0 8px rgba(234,179,8,0.75))
    drop-shadow(0 0 20px rgba(234,179,8,0.35));
  transform: translateZ(20px) rotate(30deg);
  animation: hexFloat3 14s ease-in-out infinite;
}

@keyframes hexFloat1 {
  0%   { transform: translateZ(-120px) rotate(15deg)  translateY(0px);  opacity: 0.75; }
  30%  { transform: translateZ(-120px) rotate(22deg)  translateY(-18px); opacity: 0.95; }
  60%  { transform: translateZ(-120px) rotate(10deg)  translateY(-8px);  opacity: 0.80; }
  100% { transform: translateZ(-120px) rotate(15deg)  translateY(0px);  opacity: 0.75; }
}
@keyframes hexFloat2 {
  0%   { transform: translateZ(-40px) rotate(-20deg) translateY(0px);   opacity: 0.80; }
  40%  { transform: translateZ(-40px) rotate(-28deg) translateY(-14px);  opacity: 1.00; }
  70%  { transform: translateZ(-40px) rotate(-14deg) translateY(-6px);   opacity: 0.85; }
  100% { transform: translateZ(-40px) rotate(-20deg) translateY(0px);   opacity: 0.80; }
}
@keyframes hexFloat3 {
  0%   { transform: translateZ(20px)  rotate(30deg)  translateY(0px);   opacity: 0.70; }
  35%  { transform: translateZ(20px)  rotate(40deg)  translateY(-10px);  opacity: 0.90; }
  65%  { transform: translateZ(20px)  rotate(24deg)  translateY(-4px);   opacity: 0.75; }
  100% { transform: translateZ(20px)  rotate(30deg)  translateY(0px);   opacity: 0.70; }
}

/* ── Scanline shimmer on each hex ──
   A pseudo-element can't be placed on clip-path elements cleanly,
   so we rely on the gradient + glow filter for the surface texture. */

/* ── Hero inner content ── */
.hero__inner {
  max-width: 580px;
  width: 100%;
  position: relative;
  z-index: 2;
  transform-style: preserve-3d;
  will-change: transform, opacity;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Hidden during reveal sequence — JS adds .revealed */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

/* ── Title ── */
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
  color: var(--black);
  animation: fadeInUp 0.8s var(--ease-out) 0.15s both;
  transform: translateZ(20px);
  will-change: transform;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ── Hero Tagline ── */
.hero__tagline {
  font-family: var(--font-body);
  font-size: clamp(14px, 2.2vw, 18px);
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  animation: fadeInUp 0.8s var(--ease-out) 0.2s both;
}

/* ── Hero Transition Badge (MagnusIBA → PrepNus) ── */
.hero__transition {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: 9999px;
  margin-bottom: 14px;
  animation: fadeInUp 0.8s var(--ease-out) 0.25s both;
}

.hero__transition-from {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(0,0,0,0.25);
}

.hero__transition-arrow {
  color: var(--gold-dark);
  flex-shrink: 0;
}

.hero__transition-to {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}

/* ── Hero Cards — solid bright backgrounds ── */
.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.hero-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* ── Course name card — vibrant orange ── */
.hero-card--course {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  margin-bottom: 10px;
  background: #ff9800;
  border: 2px solid #e65100;
  border-radius: 9999px;
  box-shadow: 0 3px 12px rgba(255,152,0,0.30);
  animation: fadeInUp 0.8s var(--ease-out) 0.25s both;
  transform: translateZ(16px);
  will-change: transform;
}
.hero-card__icon {
  font-size: 20px;
  line-height: 1;
}
.hero__course-name {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.4vw, 1.3rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  margin: 0;
}

/* ── Description card — vibrant indigo ── */
.hero-card--desc {
  padding: 14px 22px;
  margin: 0 auto 16px;
  max-width: 500px;
  background: #4338ca;
  border: 2px solid #312e81;
  border-radius: var(--radius-lg);
  box-shadow: 0 3px 14px rgba(67,56,202,0.28);
  animation: fadeInUp 0.8s var(--ease-out) 0.35s both;
  transform: translateZ(10px);
  will-change: transform;
}
.hero__subtitle {
  font-size: clamp(13.5px, 1.7vw, 16px);
  color: #e0e7ff;
  line-height: 1.7;
  margin: 0;
  text-align: justify;
  text-align-last: center;
}

/* ── Scroll indicator ── */
.hero__scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  animation: fadeInUp 0.8s var(--ease-out) 0.6s both;
  transform: translateZ(4px);
}

.hero__scroll-line {
  display: block;
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.25; transform: scaleY(0.65); }
  50%       { opacity: 1;    transform: scaleY(1);    }
}

.hero__scroll-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Entry animation ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px) translateZ(0); }
  to   { opacity: 1; transform: translateY(0)    translateZ(0); }
}

/* ── Mobile overrides ── */
@media (max-width: 640px) {
  .hero {
    perspective: none;         /* disable parallax perspective on mobile */
    min-height: auto;
    padding: 28px 16px 24px;
  }
  .hero__inner {
    max-width: 100%;
    padding: 0 8px;
  }
  /* Remove all 3D translateZ on mobile — keep layout flat */
  .hero__title,
  .hero__scroll-indicator,
  .hero__logo,
  .hero-card,
  .hero-card--course,
  .hero-card--desc {
    transform: none;
  }
  .hero__logo {
    width: 80px;
    margin-bottom: 10px;
    border-radius: 14px;
  }
  .hero__title {
    font-size: clamp(1.8rem, 9vw, 2.6rem);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
  }
  .hero__tagline {
    font-size: 13px;
    margin-bottom: 10px;
  }
  .hero__transition {
    padding: 5px 14px;
    gap: 8px;
    margin-bottom: 10px;
  }
  .hero__transition-from { font-size: 11px; }
  .hero__transition-to { font-size: 12px; }
  .hero__transition-arrow { width: 16px; height: 16px; }
  .hero-card--course {
    padding: 8px 18px;
    gap: 8px;
    margin-bottom: 8px;
  }
  .hero-card__icon {
    font-size: 16px;
  }
  .hero__course-name {
    font-size: clamp(0.85rem, 3.5vw, 1.1rem);
  }
  .hero-card--desc {
    padding: 10px 14px;
    margin-bottom: 12px;
  }
  .hero__subtitle {
    font-size: 13.5px;
  }
  .hero__watermark {
    font-size: clamp(12rem, 55vw, 20rem);
    filter: blur(5px);
    color: rgba(234,179,8,0.12);
  }
  .hero__hex {
    display: none;
  }
  .hero::before {
    width: 320px;
    height: 320px;
  }
}

/* ── Reduced-motion overrides ── */
@media (prefers-reduced-motion: reduce) {
  .hero::before         { animation: none; opacity: 0.5; }
  .hero__hex            { animation: none; }
  .hero__scroll-line    { animation: none; opacity: 0.5; }
  .hero__title,
  .hero__scroll-indicator { animation: none; opacity: 1; transform: none; }
  .hero-card            { animation: none !important; }
  .hero__inner          { transform: none !important; opacity: 1 !important; }
  .hero__grid           { transform: none; }
  .hero__logo           { animation: none !important; opacity: 1; transform: none; }
  .hero__watermark      { animation: none !important; }
  .hero-reveal__old-logo { display: none !important; }
  .hero-reveal__video   { display: none !important; }
  .hero-reveal__new-logo { opacity: 1 !important; transform: scale(1) !important; animation: none !important; }
}


/* ===== COUNTER SECTION ===== */

.counter-section {
  position: relative;
  z-index: 1;
  padding: 36px 24px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
  perspective-origin: 50% 50%;
}

.scene {
  transform-style: preserve-3d;
}

/* ── Counter Card ── */
.counter-card {
  position: relative;
  padding: 32px 56px 28px;
  background: linear-gradient(135deg, #059669, #047857);
  border: 3px solid #065f46;
  border-radius: var(--radius-2xl);
  text-align: center;
  transform-style: preserve-3d;
  will-change: transform;
  box-shadow: 0 4px 24px rgba(5,150,105,0.25);
  overflow: visible;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}

.counter-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(5,150,105,0.35);
}

.counter-card::before,
.counter-card::after { display: none; }
.counter-card__glow { display: none; }
.counter-card__ring { display: none; }

/* ── Counter Number ── */
.counter-card__number {
  position: relative;
  font-family: var(--font-accent);
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 14px;
  color: #fff;
  transform: translateZ(20px);
  will-change: transform;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.counter-card__number::before,
.counter-card__number::after {
  display: none;
}

/* ── Label ── */
.counter-card__label {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: #ecfdf5;
  letter-spacing: -0.01em;
  transform: translateZ(10px);
  will-change: transform;
}

/* ── Sub-label ── */
.counter-card__sub {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-top: 6px;
  transform: translateZ(6px);
  will-change: transform;
}

/* ── Counter mobile ── */
@media (max-width: 640px) {
  .counter-section {
    padding: 40px 20px 52px;
    perspective: 900px;
  }
  .counter-card {
    padding: 32px 40px 28px;
    border-width: 1.5px;
  }
  .counter-card__number {
    font-size: clamp(3rem, 16vw, 4.5rem);
    transform: none;
  }
  .counter-card__label { transform: none; }
  .counter-card__sub { transform: none; }
}

/* ===== LEADERBOARD ===== */
.lb-section {
  position: relative;
  z-index: 1;
  padding: 36px 24px 40px;
  background: #fafafa;
}

/* Podium stage wrapper — sets up 3D perspective for the whole podium */
.lb-podium {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  max-width: 700px;
  margin: 0 auto 24px;
  align-items: end;
  perspective: 900px;
  perspective-origin: 50% 120%;
}

/* ── Base podium card ── */
.podium-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-card);
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-xl);
  text-align: center;
  transform-style: preserve-3d;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  will-change: transform;
  overflow: visible;
}
.podium-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.10);
}

/* ── 3rd place — bronze/coral ── */
.podium-card--3 {
  min-height: 180px;
  padding: 24px 14px 20px;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  border: 2px solid #c2410c;
  box-shadow: 0 3px 14px rgba(234,88,12,0.22);
  color: #fff;
}
.podium-card--3:hover {
  box-shadow: 0 8px 28px rgba(234,88,12,0.30);
}
.podium-card--3 .podium-card__name { color: #fff; }
.podium-card--3 .podium-card__rank { color: rgba(255,255,255,0.8); }
.podium-card--3 .podium-card__xp { color: #fff; }
/* Bronze step riser */
.podium-card--3::after {
  content: \'\';
  position: absolute;
  bottom: -10px;
  left: 10%;
  right: 10%;
  height: 10px;
  background: linear-gradient(180deg, rgba(234,88,12,0.30), rgba(234,88,12,0.05));
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  filter: blur(1px);
}

/* ── 2nd place — vibrant blue ── */
.podium-card--2 {
  min-height: 210px;
  padding: 26px 14px 22px;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  border: 2px solid #3730a3;
  box-shadow: 0 3px 14px rgba(99,102,241,0.25);
  color: #fff;
}
.podium-card--2:hover {
  box-shadow: 0 8px 28px rgba(99,102,241,0.32);
}
.podium-card--2 .podium-card__name { color: #fff; }
.podium-card--2 .podium-card__rank { color: rgba(255,255,255,0.8); }
.podium-card--2 .podium-card__xp { color: #c7d2fe; }
/* Silver step riser */
.podium-card--2::after {
  content: \'\';
  position: absolute;
  bottom: -14px;
  left: 10%;
  right: 10%;
  height: 14px;
  background: linear-gradient(180deg, rgba(67,56,202,0.30), rgba(67,56,202,0.05));
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  filter: blur(1px);
}

/* ── 1st place — gold ── */
.podium-card--1 {
  min-height: 250px;
  padding: 44px 16px 32px;
  background: linear-gradient(135deg, #eab308, #b45309);
  border: 3px solid #92400e;
  box-shadow: 0 4px 16px rgba(234,179,8,0.28);
  color: #fff;
  z-index: 2;
}
.podium-card--1:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 32px rgba(234,179,8,0.38);
}
.podium-card--1::before { display: none; }
/* Gold step riser (tallest) */
.podium-card--1::after {
  content: \'\';
  position: absolute;
  bottom: -20px;
  left: 8%;
  right: 8%;
  height: 20px;
  background: linear-gradient(180deg, rgba(180,83,9,0.35), rgba(180,83,9,0.05));
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  filter: blur(2px);
}

/* ── Crown ── */
.podium-card__crown {
  position: absolute;
  top: -18px;
  font-size: 30px;
  filter: drop-shadow(0 2px 10px rgba(234,179,8,0.6));
  animation: crownFloat 3s ease-in-out infinite;
  z-index: 3;
}
@keyframes crownFloat {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50%       { transform: translateY(-4px) rotate(5deg); }
}

/* ── Rank badge ── */
.podium-card__rank {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.podium-card--1 .podium-card__rank {
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  text-shadow: none;
}
.podium-card--2 .podium-card__rank { color: rgba(255,255,255,0.8); }
.podium-card--3 .podium-card__rank { color: rgba(255,255,255,0.8); }

/* ── Avatar — glowing conic ring effect ── */
.podium-card__avatar {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 14px;
  flex-shrink: 0;
  background: #eab308;
  padding: 2.5px;
}
.podium-card--2 .podium-card__avatar {
  background: #6366f1;
}
.podium-card--3 .podium-card__avatar {
  background: #d97706;
}
/* Inner mask to clip the image inside the spinning ring */
.podium-card__avatar::before {
  content: \'\';
  position: absolute;
  inset: 2.5px;
  border-radius: 50%;
  background: var(--bg-card);
  z-index: 0;
}
.podium-card__avatar img,
.podium-card__avatar svg {
  position: relative;
  width: calc(100% - 5px);
  height: calc(100% - 5px);
  border-radius: 50%;
  object-fit: cover;
  margin: 2.5px;
  z-index: 1;
}
/* 1st-place avatar — larger + gold halo ring glow */
.podium-card--1 .podium-card__avatar {
  width: 84px;
  height: 84px;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.35);
}

/* ── Name ── */
.podium-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.podium-card--1 .podium-card__name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  max-width: 160px;
}

/* ── XP ── */
.podium-card__xp {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--gold-dark);
  letter-spacing: -0.01em;
}
.podium-card--1 .podium-card__xp {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 16px rgba(234,179,8,0.4);
}
.podium-card--2 .podium-card__xp { color: #c7d2fe; }
.podium-card--3 .podium-card__xp { color: #fff; }

/* ===== Leaderboard list ===== */
.lb-list {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Staggered entry animation delays */
.lb-row:nth-child(1)  { animation-delay: 0.05s; }
.lb-row:nth-child(2)  { animation-delay: 0.10s; }
.lb-row:nth-child(3)  { animation-delay: 0.15s; }
.lb-row:nth-child(4)  { animation-delay: 0.20s; }
.lb-row:nth-child(5)  { animation-delay: 0.25s; }
.lb-row:nth-child(6)  { animation-delay: 0.30s; }
.lb-row:nth-child(7)  { animation-delay: 0.35s; }
.lb-row:nth-child(8)  { animation-delay: 0.40s; }
.lb-row:nth-child(9)  { animation-delay: 0.45s; }
.lb-row:nth-child(10) { animation-delay: 0.50s; }

.lb-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1.5px solid #e5e7eb;
  border-left: 3px solid #8b5cf6;
  border-radius: var(--radius-md);
  animation: lbRowEnter 0.5s var(--ease-out) both;
  transition:
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out),
    background 0.2s;
}
@keyframes lbRowEnter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lb-row:hover {
  transform: translateY(-2px);
  background: #faf5ff;
  box-shadow: 0 4px 16px rgba(139,92,246,0.10);
}
/* Alternating left border colors — vibrant rainbow */
.lb-row:nth-child(odd)  { border-left-color: #7c3aed; }
.lb-row:nth-child(even) { border-left-color: #2563eb; }
.lb-row:nth-child(3n)   { border-left-color: #059669; }
.lb-row:nth-child(5n)   { border-left-color: #dc2626; }
/* Top row (rank 4) gets vibrant gold accent */
.lb-row:first-child {
  background: #fef3c7;
  border-left: 4px solid #d97706;
  border-color: #d97706;
}

/* ── Rank number ── */
.lb-row__rank {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  width: 28px;
  text-align: center;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

/* ── Row avatar ── */
.lb-row__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lb-row:hover .lb-row__avatar {
  border-color: rgba(234,179,8,0.30);
  box-shadow: 0 0 8px rgba(234,179,8,0.18);
}
.lb-row__avatar img,
.lb-row__avatar svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Name ── */
.lb-row__name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── XP score ── */
.lb-row__xp {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-dark);
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

/* ===== CLASSES ===== */
.classes-section {
  position: relative;
  z-index: 1;
  padding: 36px 0 40px;
  /* Hard wall against horizontal overflow */
  max-width: 100vw;
  overflow-x: hidden;
}

/* ── Netflix Horizontal Scroller ── */
.netflix-scroller {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 4px 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}
.netflix-scroller::-webkit-scrollbar { height: 4px; }
.netflix-scroller::-webkit-scrollbar-track { background: transparent; }
.netflix-scroller::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }

/* ── Netflix Thumbnail Card ── */
.netflix-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1.5px solid #e5e7eb;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.netflix-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Virtual thumbnail */
.netflix-card__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Magnus logo watermark */
.netflix-card__logo {
  width: 40px;
  height: auto;
  opacity: 0.25;
  position: absolute;
  top: 8px;
  left: 8px;
  border-radius: 6px;
}

/* Play button overlay */
.netflix-card__play {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 2;
}

/* Title overlay at bottom of thumbnail */
.netflix-card__title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 10px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

/* Info bar below thumbnail */
.netflix-card__info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
}

/* ── Upcoming card variant ── */
.netflix-card--upcoming {
  border-color: rgba(234, 179, 8, 0.3);
}
.netflix-card--upcoming:hover {
  box-shadow: 0 8px 24px rgba(234, 179, 8, 0.18);
}

/* Zoom icon (replaces play button) */
.netflix-card__zoom {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 2;
}

/* Upcoming info — subject only, no duration */
.netflix-card__info--upcoming {
  justify-content: center;
}

.classes-col__count {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 2px 9px;
  border-radius: 9999px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Subject badge ── */
.class-item__subject {
  display: inline-flex;
  align-items: center;
  /* Shrinkable but from a natural size baseline */
  flex: 0 1 auto;
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-radius: 9999px;
  color: #fff;
  /* Badge text never wraps */
  white-space: nowrap;
  /* Hard cap: ANALYTICAL badge becomes "ANALY..." at extreme narrowness */
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.class-item__subject--math       { background: var(--subject-math); }
.class-item__subject--english    { background: var(--subject-english); }
.class-item__subject--analytical { background: var(--subject-analytical); }
.class-item__subject--written    { background: var(--subject-written); }
.class-item__subject--general    { background: var(--subject-general); }

/* ── Duration chip ── */
.class-item__duration {
  /* never grow, never shrink */
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 2px 7px;
  background: var(--bg-elevated);
  border-radius: 9999px;
  white-space: nowrap;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Pagination ── */
.classes-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  /* Wrap if viewport is very tight */
  flex-wrap: wrap;
}

.classes-pager__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  /* Min 44px touch target */
  min-height: 44px;
  padding: 0 16px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 2px solid #d1d5db;
  border-radius: 9999px;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.2s var(--ease-out),
    box-shadow 0.2s;
  animation: borderSpin 24s linear infinite;
  white-space: nowrap;
}
.classes-pager__btn:hover:not(:disabled) {
  background:
    linear-gradient(var(--gold-wash), var(--gold-wash)) padding-box,
    conic-gradient(from var(--border-angle), #eab308, #0a0a0a 30%, #ffffff 50%, #eab308) border-box;
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.15);
}
.classes-pager__btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}
.classes-pager__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.classes-pager__info {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 40px;
  text-align: center;
}

/* ── Tablet: tighten spacing ── */
@media (max-width: 860px) {
  .class-item__subject {
    max-width: 68px;
    font-size: 8.5px;
    padding: 2px 6px;
  }
}

/* ── Mobile: Netflix cards shrink ── */
@media (max-width: 640px) {
  .classes-section {
    padding: 28px 0 32px;
  }

  .netflix-card {
    flex: 0 0 180px;
  }

  /* Pager: comfortable touch targets */
  .classes-pager {
    gap: 10px;
    margin-top: 12px;
  }
  .classes-pager__btn {
    min-height: 44px;
    padding: 0 18px;
    font-size: 13px;
  }
}

/* ── Very narrow (<380px) safety net ── */
@media (max-width: 380px) {
  .class-item__subject {
    font-size: 8.5px;
    padding: 2px 7px;
  }
  .classes-pager__btn {
    padding: 0 14px;
    font-size: 12px;
  }
}

/* ===== ANALYTICS ===== */
.analytics-section {
  position: relative;
  z-index: 1;
  padding: 36px 24px 40px;
}

/* Give the grid a 3D perspective context so card tilts have real depth */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  perspective: 1200px;
  perspective-origin: 50% 40%;
}

/* Base card: glassmorphism + animated border */
.analytics-card {
  position: relative;
  padding: 28px 24px;
  background: var(--bg-card);
  border: 2px solid #e5e7eb;
  border-top: 5px solid #7c3aed;
  border-radius: var(--radius-xl);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  overflow: hidden;
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s,
    opacity 0.5s var(--ease-out);
}

/* Staggered appear — JS sets transitionDelay inline (i * 0.08s) */
.analytics-card.card-hidden {
  opacity: 0;
  transform: translateY(20px) translateZ(0);
}

.analytics-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(124,58,237,0.15);
}
/* Vibrant rainbow top borders */
.analytics-card:nth-child(2) { border-top-color: #2563eb; }
.analytics-card:nth-child(3) { border-top-color: #059669; }
.analytics-card:nth-child(4) { border-top-color: #d97706; }
.analytics-card:nth-child(5) { border-top-color: #dc2626; }
.analytics-card:nth-child(6) { border-top-color: #db2777; }

.analytics-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.analytics-card__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.analytics-card__stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

.analytics-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.analytics-stat__label {
  font-size: 12px;
  color: var(--text-muted);
}

.analytics-stat__value {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}

/* Progress bar: taller + more dramatic shimmer */
.analytics-bar {
  width: 100%;
  height: 5px;
  background: rgba(0,0,0,0.06);
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.analytics-bar__fill {
  height: 100%;
  border-radius: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  position: relative;
  transition: width 1.5s var(--ease-out);
  box-shadow: 0 0 8px rgba(234,179,8,0.35);
}

/* High-contrast shimmer sweep */
.analytics-bar__fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.15) 30%,
    rgba(255,255,255,0.75) 50%,
    rgba(255,255,255,0.15) 70%,
    transparent 100%
  );
  animation: shimmerSweep 1.8s ease-in-out infinite;
}

@keyframes shimmerSweep {
  0%   { transform: translateX(-150%); }
  100% { transform: translateX(150%);  }
}

/* ── Blurred (locked) card ──
   overflow:hidden is required here for the ::after frosted overlay,
   but it clips the conic-gradient animated border.
   Fix: replace with a static gradient border + pulsing glow animation
   that maintains the gold visual language without needing the spin. */
.analytics-card--blurred {
  background: #fefce8;
  border: 2px solid #d97706;
  border-top: 4px solid #d97706;
  overflow: hidden;
}

.analytics-card--blurred .analytics-card__stats {
  filter: blur(8px);
  -webkit-filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

/* Frosted overlay — works because overflow:hidden is set on the card */
.analytics-card--blurred::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: inherit;
  z-index: 2;
}

.analytics-card__lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3;
  gap: 8px;
  pointer-events: none;
}

.analytics-card__lock-icon {
  font-size: 28px;
  opacity: 0.75;
  filter: grayscale(0.2) sepia(0.4) hue-rotate(-10deg);
  animation: lockFloat 3s ease-in-out infinite;
}

@keyframes lockFloat {
  0%, 100% { transform: translateY(0);    }
  50%       { transform: translateY(-4px); }
}

.analytics-card__lock-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}


/* ===== CTA + PRICING ===== */
.cta-section {
  position: relative;
  z-index: 1;
  padding: 60px 24px;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(234,179,8,0.05) 0%, transparent 60%),
    var(--bg-surface);
}

.cta-header {
  text-align: center;
  margin-bottom: 40px;
}

.cta-header__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.2;
  color: var(--text);
  margin-top: 12px;
}

.cta-header__subtitle {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--gold-dark);
  margin-top: 8px;
}

.cta-header__note {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 12px auto 0;
  line-height: 1.6;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  align-items: start;
}

/* Card Base */
.pricing-card {
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  text-align: center;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

/* 3 Installments */
.pricing-card--3inst {
  border-top: 4px solid #f59e0b;
}

/* 2 Installments (Popular) */
.pricing-card--2inst {
  border: 2.5px solid var(--gold);
  box-shadow: 0 8px 28px rgba(234,179,8,0.12);
  transform: scale(1.04);
  z-index: 2;
}

.pricing-card--2inst:hover {
  transform: scale(1.04) translateY(-4px);
  box-shadow: 0 16px 40px rgba(234,179,8,0.18);
}

/* One-Time (Best Value) */
.pricing-card--onetime {
  border-top: 4px solid #059669;
}

/* Ribbon */
.pricing-card__ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #fff;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 16px;
  border-radius: 20px;
  white-space: nowrap;
}

.pricing-card__ribbon--green {
  background: #059669;
}

/* Badge */
.pricing-card__badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Price */
.pricing-card__price {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-bottom: 8px;
}

.pricing-card__amount {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.pricing-card__cycle {
  font-size: 14px;
  color: var(--text-muted);
}

/* Total */
.pricing-card__total {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* Save pill */
.pricing-card__save {
  display: inline-block;
  background: #ecfdf5;
  color: #059669;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* Perks */
.pricing-card__perks {
  list-style: none;
  text-align: left;
  margin-top: 16px;
  padding: 0;
}

.pricing-card__perks li {
  position: relative;
  font-size: 13px;
  color: var(--text-secondary);
  padding-left: 22px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.pricing-card__perks li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  top: 0;
  color: #059669;
  font-weight: 700;
  font-size: 14px;
}

/* No Refund Notice */
.cta-refund {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 540px;
  margin: 32px auto 0;
  padding: 10px 20px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.cta-refund svg {
  flex-shrink: 0;
  opacity: 0.6;
}


/* ===== APP STORES ===== */
.appstore-section {
  position: relative;
  z-index: 1;
  padding: 48px 24px;
  text-align: center;
  background: var(--bg);
}

.appstore-section__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: var(--text);
  margin-top: 12px;
  margin-bottom: 8px;
}

.appstore-section__sub {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* Launch Countdown */
.launch-countdown {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
  padding: 12px 8px;
  background: var(--black);
  border-radius: var(--radius-md);
  color: #fff;
}

.countdown-unit__value {
  font-family: var(--font-accent);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--gold-light);
}

.countdown-unit__label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

.appstore-badges {
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: center;
  gap: 14px;
  max-width: 520px;
  margin: 0 auto;
}

.appstore-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  background: var(--black);
  color: #fff;
  border-radius: var(--radius-lg);
  cursor: default;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}

.appstore-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.appstore-badge__icon {
  flex-shrink: 0;
}

.appstore-badge__text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.appstore-badge__soon {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.6);
  line-height: 1.2;
}

.appstore-badge__store {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}


/* ===== FOOTER (inverted: black bg) ===== */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 32px 24px 28px;
  text-align: center;

  /* Layered background: gold radial glow + dark gradient */
  background:
    radial-gradient(ellipse at 50% 0%, rgba(234,179,8,0.06) 0%, transparent 55%),
    linear-gradient(180deg, var(--black-mid) 0%, var(--black) 60%, #050505 100%);
  color: #f0f0f5;
}

/* Gold top-accent line via ::before */
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--gold-dark) 20%,
    var(--gold-light) 50%,
    var(--gold-dark) 80%,
    transparent 100%
  );
  opacity: 0.7;
}

/* Subtle SVG noise texture for extra depth */
.site-footer::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.footer__inner {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Brand: animated gold shimmer sweep */
.footer__brand {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: #f0f0f5;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.footer__brand .brand-i { color: #fc8181; }
.footer__brand .brand-b { color: #68d391; }
.footer__brand .brand-a { color: #63b3ed; }
.footer__brand .brand-prep { color: #f0f0f5; }
.footer__brand .brand-nus { color: var(--gold-light); }

.footer__reach {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

/* FB link: gold pill with animated border + lift shadow */
.footer__fb-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  background: #eab308;
  border: 2px solid #ca8a04;
  border-radius: 9999px;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(234,179,8,0.2);
}

.footer__fb-link:hover {
  background: #fbbf24;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(234,179,8,0.3);
}

.footer__copy {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.03em;
}


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

/* ── Tablet (≤ 1024px) ── */
@media (max-width: 1024px) {
  .analytics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .lb-podium {
    gap: 14px;
  }
}

/* ── Small tablet (≤ 768px) ── */
@media (max-width: 768px) {
  .section-container {
    padding: 0 20px;
  }
  .section-header {
    margin-bottom: 20px;
  }
  .section-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }
  .counter-card {
    padding: 32px 44px;
  }
  .lb-podium {
    gap: 12px;
    max-width: 600px;
  }
  .analytics-grid {
    gap: 14px;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
  }
  .pricing-card--2inst {
    transform: none;
  }
  .pricing-card--2inst:hover {
    transform: translateY(-4px);
  }
}

/* ── Mobile (≤ 640px) ── */
@media (max-width: 640px) {
  /* Hero */
  .hero {
    min-height: auto;
    padding: 28px 16px 24px;
  }
  .hero__title {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
  }
  .hero__hex {
    display: none;
  }

  /* Section container */
  .section-container {
    padding: 0 12px;
  }

  /* Section headers */
  .section-header {
    margin-bottom: 18px;
  }
  .section-title {
    font-size: clamp(1.4rem, 6vw, 1.8rem);
  }

  /* All main sections: uniform compact padding */
  .counter-section,
  .lb-section,
  .classes-section,
  .analytics-section,
  .cta-section,
  .appstore-section {
    padding: 28px 12px 32px;
  }

  /* Countdown compact */
  .launch-countdown {
    gap: 10px;
  }
  .countdown-unit {
    min-width: 56px;
    padding: 10px 6px;
  }

  /* App store badges stack */
  .appstore-badges {
    grid-template-columns: 1fr;
    max-width: 260px;
  }

  /* Counter card */
  .counter-card {
    padding: 28px 24px;
    border-width: 2px;
  }
  .counter-card__number {
    font-size: clamp(3rem, 15vw, 5rem);
  }
  .counter-card__ring {
    display: none;
  }

  /* Podium: single column, #1 first, compact */
  .lb-podium {
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: 280px;
  }
  .podium-card--1 {
    order: -1;
  }
  .podium-card {
    padding: 22px 16px 18px;
  }
  .podium-card--1 {
    padding-top: 28px;
    padding-bottom: 22px;
  }

  /* Leaderboard list: smaller rows */
  .lb-list {
    max-width: 100%;
    gap: 5px;
  }
  .lb-row {
    padding: 10px 12px;
    gap: 10px;
  }
  .lb-row__avatar {
    width: 30px;
    height: 30px;
  }
  .lb-row__rank {
    font-size: 12px;
    width: 22px;
  }
  .lb-row__name {
    font-size: 13px;
  }
  .lb-row__xp {
    font-size: 13px;
  }

  /* Analytics: single column */
  .analytics-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    perspective: none;
  }
  .analytics-card {
    padding: 22px 18px;
    border-width: 1px;
  }
  .analytics-card--blurred {
    border-width: 1px;
  }
  .analytics-card__icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
    margin-bottom: 12px;
  }
  .analytics-card__title {
    font-size: 14px;
  }
  .analytics-bar {
    height: 4px;
  }

  /* All animated borders: reduce to 1px on mobile for subtlety */
  .section-tag,
  .hero-card,
  .counter-card,
  .podium-card,
  .lb-row,
  .classes-pager__btn,
  .footer__fb-link {
    border-width: 1px;
  }

  /* Footer */
  .site-footer {
    padding: 32px 16px 24px;
  }
  .footer__brand {
    font-size: 1.35rem;
  }
  .footer__fb-link {
    padding: 8px 20px;
    font-size: 13px;
    margin-bottom: 18px;
  }
  .footer__reach {
    font-size: 12px;
    margin-bottom: 16px;
  }
}

/* ── Small mobile (≤ 480px) ── */
@media (max-width: 480px) {
  /* Hide particles for performance */
  .particles {
    display: none;
  }

  /* Hero */
  .hero {
    padding: 20px 10px 16px;
  }
  .hero__logo {
    width: 64px;
    margin-bottom: 8px;
    border-radius: 10px;
  }
  .hero__title {
    font-size: clamp(1.6rem, 8.5vw, 2.2rem);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
  }
  .hero-card--course {
    padding: 6px 12px;
    gap: 6px;
    margin-bottom: 8px;
  }
  .hero-card__icon {
    font-size: 14px;
  }
  .hero__course-name {
    font-size: 0.82rem;
  }
  .hero-card--desc {
    padding: 8px 12px;
    margin-bottom: 10px;
  }
  .hero__subtitle {
    font-size: 12.5px;
    line-height: 1.6;
  }
  .hero__scroll-indicator {
    display: none;
  }
  .hero__watermark {
    font-size: clamp(9rem, 60vw, 14rem);
    filter: blur(4px);
    color: rgba(234,179,8,0.10);
  }

  /* Section spacing */
  .section-container {
    padding: 0 10px;
  }
  .counter-section,
  .lb-section,
  .classes-section,
  .analytics-section,
  .cta-section,
  .appstore-section {
    padding: 22px 10px 28px;
  }
  .section-header {
    margin-bottom: 14px;
  }
  .section-title {
    font-size: clamp(1.25rem, 7vw, 1.6rem);
  }
  .section-tag {
    font-size: 10px;
    padding: 3px 12px;
    letter-spacing: 1px;
  }

  /* Counter card */
  .counter-card {
    padding: 22px 18px;
  }
  .counter-card__number {
    font-size: clamp(2.5rem, 18vw, 4rem);
  }
  .counter-card__label {
    font-size: 1rem;
  }

  /* Podium */
  .lb-podium {
    max-width: 240px;
    gap: 8px;
  }
  .podium-card__avatar {
    width: 52px;
    height: 52px;
  }
  .podium-card--1 .podium-card__avatar {
    width: 64px;
    height: 64px;
  }
  .podium-card__name {
    font-size: 13px;
    max-width: 130px;
  }
  .podium-card__xp {
    font-size: 15px;
  }
  .podium-card--1 .podium-card__xp {
    font-size: 18px;
  }

  /* Leaderboard */
  .lb-row {
    padding: 8px 10px;
    gap: 8px;
  }
  .lb-row__avatar {
    width: 26px;
    height: 26px;
  }

  /* Classes */
  .netflix-card {
    flex: 0 0 160px;
  }

  /* Analytics */
  .analytics-card {
    padding: 16px 14px;
  }
  .analytics-card__stats {
    gap: 8px;
    margin-top: 12px;
  }
  .analytics-stat__label {
    font-size: 11px;
  }
  .analytics-stat__value {
    font-size: 13px;
  }
  .analytics-card__lock-icon {
    font-size: 22px;
  }
  .analytics-card__lock-text {
    font-size: 11px;
  }

  /* Pricing */
  .pricing-card {
    padding: 22px 18px;
  }
  .pricing-card__amount {
    font-size: 1.7rem;
  }
  .cta-refund {
    font-size: 12px;
    padding: 8px 14px;
  }

  /* Footer */
  .site-footer {
    padding: 28px 12px 20px;
  }
  .footer__brand {
    font-size: 1.2rem;
  }
  .footer__fb-link {
    padding: 8px 16px;
    font-size: 12px;
    gap: 6px;
    margin-bottom: 14px;
  }
  .footer__fb-link svg {
    width: 16px;
    height: 16px;
  }
  .footer__copy {
    font-size: 11px;
  }
}


/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Reveal system: show immediately */
  .reveal-3d {
    opacity: 1;
    transform: none;
  }

  /* Hidden card state: show immediately */
  .analytics-card.card-hidden {
    opacity: 1;
    transform: none;
  }

  /* Decorative elements off */
  .particle {
    display: none;
  }
  .hero__hex {
    display: none;
  }
  .hero::after {
    animation: none;
    opacity: 0.5;
  }
  .hero__scroll-line {
    animation: none;
    opacity: 0.5;
  }
  .counter-card__ring {
    display: none;
  }
  /* Hero cards: no animation */
  .hero-card { animation: none !important; }

  /* Bar shimmer off */
  .analytics-bar__fill::after {
    display: none;
  }

  /* borderSpin: stop on all animated-border elements */
  .section-tag,
  .hero-card,
  .counter-card,
  .podium-card,
  .lb-row,
  .netflix-card,
  .classes-pager__btn,
  .analytics-card,
  .footer__fb-link {
    animation: none !important;
  }

  /* Blurred card glow: off */
  .analytics-card--blurred {
    animation: none !important;
  }

  /* Lock float: off */
  .analytics-card__lock-icon {
    animation: none !important;
  }

  /* Counter hover tilt: off */
  .counter-card:hover {
    transform: none;
  }
}


/* ── Empty / Loading States ── */
.lb-loading, .classes-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Animated scroller loading state ── */
.scroller-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1 0 100%;
  min-width: 100%;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
.scroller-loading__spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--bg-elevated);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spinLoader 0.7s linear infinite;
}
@keyframes spinLoader {
  to { transform: rotate(360deg); }
}
.scroller-loading__text {
  animation: loadingPulse 1.5s ease-in-out infinite;
}
@keyframes loadingPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== READNUS PREVIEW SECTION ===== */

.readnus-section { padding: 40px 0; }

/* Trigger — the clickable banner */
.readnus-trigger {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #faf5ff 0%, #f0e7ff 40%, #ede9fe 100%);
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  position: relative; overflow: hidden;
}
.readnus-trigger::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(139,92,246,0.06) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: readnusShimmer 4s ease-in-out infinite;
}
@keyframes readnusShimmer {
  0%,100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}
.readnus-trigger:hover {
  border-color: rgba(139,92,246,0.3);
  box-shadow: 0 8px 32px rgba(139,92,246,0.12);
  transform: translateY(-1px);
}
.readnus-trigger--open { border-radius: var(--radius-xl) var(--radius-xl) 0 0; }

/* Trigger sub-parts */
.readnus-trigger__brand { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; z-index: 1; }
.readnus-trigger__icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  color: white; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(139,92,246,0.3);
}
.readnus-trigger__title {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; color: #1e1b4b;
}
.readnus-trigger__title span { color: #8b5cf6; }
.readnus-trigger__sub {
  font-size: 13px; color: #6b7280; margin-top: 2px;
}
.readnus-trigger__badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 4px 12px; border-radius: 99px;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: white; white-space: nowrap; z-index: 1;
}
.readnus-trigger__chevron {
  color: #8b5cf6; transition: transform 0.3s var(--ease-out); z-index: 1; flex-shrink: 0;
}
.readnus-trigger--open .readnus-trigger__chevron { transform: rotate(180deg); }

/* Expandable Body */
.readnus-body {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.5s var(--ease-out), opacity 0.3s ease;
}
.readnus-body--open {
  max-height: 2000px; opacity: 1;
  transition: max-height 0.6s var(--ease-out), opacity 0.4s ease 0.1s;
}
.readnus-body__inner {
  background: var(--bg-card);
  border: 1px solid rgba(139,92,246,0.12);
  border-top: none;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  padding: 24px;
}
.readnus-body__intro {
  font-size: 14px; color: var(--text-muted);
  max-width: 560px; line-height: 1.6; margin-bottom: 20px;
}

/* Preview Container */
.preview-container { min-height: 200px; position: relative; }

/* Preview Nav */
.preview-nav { display: none; align-items: center; gap: 12px; margin-bottom: 16px; }
.preview-nav--visible { display: flex; }
.preview-nav__back {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; font-size: 13px; font-weight: 600;
  color: #7c3aed; background: #f5f3ff; border: 1px solid rgba(139,92,246,0.15);
  border-radius: 8px; cursor: pointer; transition: all 0.15s;
}
.preview-nav__back:hover { background: #ede9fe; }
.preview-nav__crumb {
  font-size: 13px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}

/* View System */
.preview-view { display: none; opacity: 0; }
.preview-view--active { display: block; opacity: 1; animation: pvFadeIn 0.3s ease; }
@keyframes pvFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Premium Category Cards */
.preview-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.preview-cat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden; cursor: pointer;
  transition: all 0.25s var(--ease-out);
  position: relative;
}
.preview-cat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa, #c4b5fd);
  opacity: 0; transition: opacity 0.25s;
}
.preview-cat:hover::before { opacity: 1; }
.preview-cat:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(139,92,246,0.12);
  border-color: rgba(139,92,246,0.2);
}
.preview-cat__cover {
  height: 72px; display: flex; align-items: center; justify-content: center;
  position: relative; border-radius: 16px 16px 0 0;
}
.preview-cat__cover-icon { font-size: 1.6rem; user-select: none; }
.preview-cat__body { padding: 14px 12px 10px; }
.preview-cat__title {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 2px; line-height: 1.3;
}
.preview-cat__caption {
  font-size: 11px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.preview-cat__footer { padding: 0 12px 10px; }
.preview-cat__count {
  display: inline-block; font-size: 10px; font-weight: 700;
  color: #7c3aed; background: #f5f3ff;
  padding: 2px 8px; border-radius: 99px;
}

/* Premium Article Cards */
.preview-articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.preview-article {
  background: #fff; border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; cursor: pointer;
  transition: all 0.25s var(--ease-out);
  position: relative;
}
.preview-article::after {
  content: ''; position: absolute; inset: -1px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(99,102,241,0.1));
  opacity: 0; transition: opacity 0.25s; z-index: -1;
}
.preview-article:hover::after { opacity: 1; }
.preview-article:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(139,92,246,0.1);
  border-color: rgba(139,92,246,0.25);
}
.preview-article__body { padding: 16px 14px; }
.preview-article__title {
  font-size: 14px; font-weight: 600; color: var(--text);
  line-height: 1.45; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.preview-article__meta {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}
.preview-article__meta::before {
  content: ''; width: 4px; height: 4px;
  background: #8b5cf6; border-radius: 50%; flex-shrink: 0;
}

/* Premium Article Reader */
.preview-reader { max-width: 700px; margin: 0 auto; }
.preview-reader__header {
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.preview-reader__title {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 700;
  color: var(--text); line-height: 1.35; margin-bottom: 10px;
}
.preview-reader__meta {
  font-size: 12px; color: var(--text-muted);
  display: flex; flex-wrap: wrap; gap: 6px 14px;
}
.preview-reader__content {
  font-family: var(--font-body); font-size: 15px;
  line-height: 1.85; color: var(--text);
}
.preview-reader__content p {
  margin-bottom: 22px; position: relative;
}
.preview-reader__fade {
  position: relative; margin-top: -20px; padding-top: 30px;
  background: linear-gradient(transparent, #fff 70%);
  text-align: center; padding-bottom: 8px;
}
.preview-reader__fade-text {
  font-size: 13px; color: #7c3aed; font-weight: 500;
  background: #f5f3ff; padding: 6px 16px; border-radius: 99px;
  display: inline-block;
}

/* Premium Word Annotations & Popup */
.pv-word {
  border-bottom: 2px dotted #a78bfa; color: #6d28d9;
  cursor: pointer; transition: all 0.2s; border-radius: 2px;
  padding-bottom: 1px;
}
.pv-word:hover {
  border-bottom-style: solid; border-bottom-color: #8b5cf6;
  background: rgba(139,92,246,0.08);
}
.preview-word-popup {
  position: absolute; z-index: 50;
  background: #fff; border: 1px solid rgba(139,92,246,0.15);
  box-shadow: 0 16px 48px rgba(139,92,246,0.15), 0 4px 12px rgba(0,0,0,0.06);
  border-radius: 16px; max-width: 340px; width: max-content; padding: 20px;
  animation: pvPopIn 0.25s var(--ease-spring);
}
@keyframes pvPopIn {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to { opacity: 1; transform: none; }
}
.preview-word-popup__close {
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated); border: none; font-size: 14px;
  color: var(--text-muted); cursor: pointer; border-radius: 50%;
  transition: all 0.15s;
}
.preview-word-popup__close:hover { background: #f5f3ff; color: #7c3aed; }
.preview-word-popup__word {
  font-size: 1.15rem; font-weight: 800; color: #6d28d9; margin-bottom: 4px;
  font-family: var(--font-display);
}
.preview-word-popup__pos {
  display: inline-block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: #7c3aed; background: #f5f3ff;
  padding: 2px 8px; border-radius: 6px; margin-bottom: 10px;
}
.preview-word-popup__def {
  font-size: 13px; line-height: 1.55; color: var(--text-secondary); margin-bottom: 10px;
}
.preview-word-popup__bangla {
  font-size: 13px; color: var(--text-muted); margin-bottom: 10px;
  padding: 8px 12px; background: #fefce8; border-radius: 8px;
  border-left: 3px solid var(--gold);
}
.preview-word-popup__synonyms { display: flex; flex-wrap: wrap; gap: 5px; }
.preview-word-popup__syn {
  font-size: 11px; padding: 3px 10px;
  background: #f5f3ff; border-radius: 99px;
  color: #6d28d9; font-weight: 500;
}

/* Sentence / Paragraph Icons */
.pv-sent-icon, .pv-para-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px;
  cursor: pointer; transition: all 0.2s;
  font-size: 12px; vertical-align: middle; margin-left: 4px;
  background: transparent; opacity: 0.5;
}
.pv-sent-icon:hover {
  background: #f5f3ff; opacity: 1;
}
.pv-para-icon:hover {
  background: #fefce8; opacity: 1;
}

/* Premium Analysis Panel */
.preview-analysis-panel {
  background: #faf8ff; border: 1px solid rgba(139,92,246,0.1);
  border-radius: 12px; margin-top: 14px; padding: 14px;
  animation: pvFadeIn 0.25s ease;
}
.preview-analysis-panel__tabs {
  display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap;
}
.preview-analysis-panel__tab {
  font-size: 11px; font-weight: 700; padding: 5px 12px;
  border: 1px solid rgba(139,92,246,0.15); background: white;
  border-radius: 99px; cursor: pointer;
  color: var(--text-muted); transition: all 0.15s;
}
.preview-analysis-panel__tab:hover,
.preview-analysis-panel__tab--active {
  background: #8b5cf6; border-color: #8b5cf6; color: white;
}
.preview-analysis-panel__content {
  font-size: 13px; line-height: 1.65; color: var(--text-secondary);
}

/* Premium Sources Badge */
.preview-sources { margin-top: 20px; }
.preview-sources__badge {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #faf5ff, #f0e7ff);
  border: 1px solid rgba(139,92,246,0.12);
  border-radius: var(--radius-md);
  font-size: 13px; line-height: 1.55; color: var(--text-secondary);
}
.preview-sources__badge svg { flex-shrink: 0; margin-top: 1px; color: #7c3aed; }
.preview-sources__badge strong { color: #6d28d9; font-weight: 700; }

/* Loading state */
.preview-loading {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 60px 20px;
  color: var(--text-muted); font-size: 13px;
}
.preview-loading__spinner {
  width: 18px; height: 18px;
  border: 2px solid #ede9fe; border-top-color: #8b5cf6;
  border-radius: 50%; animation: spinLoader 0.7s linear infinite;
}

/* Responsive — ReadNus */
@media (max-width: 768px) {
  .preview-cats { grid-template-columns: repeat(2, 1fr); }
  .preview-articles { grid-template-columns: repeat(2, 1fr); }
  .readnus-trigger { padding: 16px 18px; gap: 12px; }
  .readnus-trigger__badge { display: none; }
}
@media (max-width: 640px) {
  .preview-cats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .preview-articles { grid-template-columns: 1fr; }
  .readnus-body__inner { padding: 16px; }
  .preview-cat__cover { height: 56px; }
  .preview-word-popup {
    max-width: calc(100vw - 60px);
    left: 8px !important; right: 8px !important;
  }
}
@media (max-width: 480px) {
  .readnus-trigger { padding: 14px 16px; }
  .readnus-trigger__icon { width: 40px; height: 40px; border-radius: 10px; }
  .readnus-trigger__icon svg { width: 22px; height: 22px; }
  .readnus-trigger__title { font-size: 1.15rem; }
  .readnus-trigger__sub { font-size: 12px; }
  .readnus-body__inner { padding: 12px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
  .preview-reader__title { font-size: 1.1rem; }
  .preview-reader__content { font-size: 14px; }
}
