/* ============================================
   VELOCITY LEARNING - ENHANCED STYLES
   Fixed: Grid performance, animations, controls
   ============================================ */

/* Font loaded via HTML link with display=swap for better performance */

:root{
  /* Aligned with game app design system */
  --velocity-blue: #1E90FF;
  --velocity-blue-dark: #0066CC;
  --fluency-orange: #FF8C1A;
  --fluency-orange-dark: #E67300;
  --deep-navy: #0B1C3D;
  --glow-yellow: #FFCC00;
  --soft-sky: #E8F4FF;

  --text: var(--deep-navy);
  --muted: #4A5D73;
  --muted2: #9AAAC0;

  --panel: rgba(255,255,255,0.92);
  --border: rgba(11,28,61,0.10);

  --shadowSoft: 0 12px 28px rgba(11,28,61,0.10);
  --shadowMedium: 0 20px 40px rgba(11,28,61,0.12);
  --shadowLarge: 0 32px 64px rgba(11,28,61,0.16);
  --radius: 20px;
  --radius-lg: 28px;

  --max: 1140px;
  --headerH: 78px;
  
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

body{
  font-family: 'DM Sans', 'Noto Sans', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans Arabic', ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--soft-sky) 0%, #ffffff 50%, #f8fafc 100%);
  overflow-x: hidden;
  min-height: 100vh;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
body.isNavigating{ opacity: 0; transform: translateY(8px); }

a{ color: inherit; text-decoration: none; }
strong{ color: var(--deep-navy); font-weight: 700; }

.container{
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

/* ============================================
   BACKGROUND EFFECTS
   ============================================ */
.bg{ position: fixed; inset: 0; z-index: -2; pointer-events: none; }

.noise{
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

.glow{
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  will-change: transform;
  animation: floatOrb 18s ease-in-out infinite;
}

.glow-blue{
  left: -240px;
  top: -160px;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle at 30% 30%, rgba(30,144,255,0.55), transparent 55%);
  animation-name: floatOrbBlue;
  animation-duration: 22s;
}

.glow-orange{
  right: -240px;
  bottom: -160px;
  width: 750px;
  height: 750px;
  background: radial-gradient(circle at 30% 30%, rgba(255,140,26,0.5), transparent 55%);
  animation-name: floatOrbOrange;
  animation-delay: -8s;
  animation-duration: 20s;
}

.glow-yellow{
  left: 30%;
  top: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle at 30% 30%, rgba(255,204,0,0.35), transparent 55%);
  animation-name: floatOrbYellow;
  animation-delay: -12s;
  animation-duration: 16s;
}

/* Additional floating orb for more depth */
.bg::after {
  content: "";
  position: absolute;
  right: 20%;
  top: 40%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  background: radial-gradient(circle at 50% 50%, rgba(30,144,255,0.4), transparent 60%);
  animation: floatOrbSmall 15s ease-in-out infinite;
  animation-delay: -5s;
}

@keyframes floatOrbBlue {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  25% { transform: translate(40px, -30px) scale(1.08) rotate(2deg); }
  50% { transform: translate(20px, 40px) scale(0.95) rotate(-1deg); }
  75% { transform: translate(-30px, -10px) scale(1.03) rotate(1deg); }
}

@keyframes floatOrbOrange {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  25% { transform: translate(-35px, 25px) scale(1.06) rotate(-2deg); }
  50% { transform: translate(25px, -35px) scale(0.96) rotate(1deg); }
  75% { transform: translate(40px, 20px) scale(1.04) rotate(-1deg); }
}

@keyframes floatOrbYellow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, -40px) scale(1.1); }
  66% { transform: translate(-40px, 30px) scale(0.92); }
}

@keyframes floatOrbSmall {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, 40px) scale(1.15); }
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.grid-lines{
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(11,28,61,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,28,61,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black 40%, transparent 100%);
}

/* ============================================
   FOCUS STATES
   ============================================ */
:focus-visible{
  outline: 3px solid rgba(30,144,255,0.5);
  outline-offset: 4px;
  border-radius: 12px;
}

/* ============================================
   HEADER
   ============================================ */
.header{
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--headerH);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(234,244,255,0.8);
  border-bottom: 1px solid rgba(11,28,61,0.06);
  transition: background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.header.scrolled{
  background: rgba(255,255,255,0.95);
  box-shadow: 0 4px 20px rgba(11,28,61,0.08);
}

.headerInner{
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brandLogo{
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(11,28,61,0.12));
  transition: transform 0.4s var(--ease-bounce), filter 0.3s var(--ease-out);
}

.brand:hover .brandLogo{
  transform: translateY(-2px) scale(1.02);
  filter: drop-shadow(0 12px 24px rgba(11,28,61,0.16));
}

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

.navLink{
  position: relative;
  font-weight: 600;
  font-size: 14px;
  color: rgba(11,28,61,0.75);
  padding: 10px 14px;
  border-radius: 12px;
  transition: background 0.25s var(--ease-out), color 0.25s var(--ease-out);
}

.navLink::after{
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--velocity-blue), var(--fluency-orange));
  transition: transform 0.35s var(--ease-out);
  border-radius: 999px;
}

.navLink:hover{
  background: rgba(255,255,255,0.8);
  color: var(--deep-navy);
}

.navLink:hover::after{ transform: scaleX(1); }

.headerCtas{ display: flex; align-items: center; gap: 12px; }

.menuBtn{
  display: none;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(11,28,61,0.1);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  transition: background 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.menuBtn:hover{
  background: rgba(255,255,255,1);
  transform: scale(1.05);
}

.menuBtn span{ 
  display: block; 
  width: 18px; 
  height: 2px; 
  margin: 4px 0; 
  background: rgba(11,28,61,0.8);
  border-radius: 2px;
}

.mobileMenu{
  display: none;
  position: absolute;
  top: var(--headerH);
  left: 0;
  right: 0;
  padding: 16px 24px 20px;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(11,28,61,0.08);
  box-shadow: 0 20px 40px rgba(11,28,61,0.1);
}

.mobileMenu a{
  display: block;
  padding: 14px 12px;
  border-radius: 14px;
  font-weight: 600;
  color: rgba(11,28,61,0.85);
  transition: background 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.mobileMenu a:hover{ 
  background: rgba(234,244,255,0.8);
  transform: translateX(4px);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 14px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), filter 0.2s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.2s var(--ease-out);
}

.btn:hover::before{ opacity: 1; }
.btn:active{ transform: translateY(1px) scale(0.98); }
.btnLg{ padding: 16px 24px; border-radius: 16px; font-size: 16px; }

.btnPrimary{
  background: linear-gradient(135deg, var(--velocity-blue) 0%, var(--velocity-blue-dark) 100%);
  color: #fff;
  box-shadow:
    0 8px 24px rgba(0,128,255,0.35),
    0 0 40px rgba(0,128,255,0.15),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

.btnPrimary:hover{
  transform: translateY(-3px);
  box-shadow:
    0 16px 40px rgba(0,128,255,0.45),
    0 0 60px rgba(0,128,255,0.25),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

.btnCta{
  background: linear-gradient(135deg, var(--fluency-orange) 0%, var(--fluency-orange-dark) 100%);
  color: #fff;
  box-shadow:
    0 8px 24px rgba(255,122,0,0.35),
    0 0 40px rgba(255,122,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

.btnCta:hover{
  transform: translateY(-3px);
  box-shadow:
    0 16px 40px rgba(255,122,0,0.45),
    0 0 60px rgba(255,122,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

.btnGhost{
  background: rgba(255,255,255,0.9);
  border-color: rgba(11,28,61,0.1);
  color: rgba(11,28,61,0.85);
  box-shadow: 0 4px 12px rgba(11,28,61,0.06);
}

.btnGhost:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,1);
  box-shadow: var(--shadowSoft);
}

.btn-arrow{
  transition: transform 0.3s var(--ease-out);
}

.btn:hover .btn-arrow{
  transform: translateX(4px);
}

/* ============================================
   CTA BREATHE / ZOOM ANIMATION - RESTORED
   ============================================ */
.ctaBreathe{
  animation: breathe 2.6s ease-in-out infinite;
}

@keyframes breathe{
  0%, 100%{ 
    transform: scale(1); 
    box-shadow: 0 8px 24px rgba(30,144,255,0.25);
  }
  50%{ 
    transform: scale(1.04); 
    box-shadow: 0 14px 36px rgba(30,144,255,0.35);
  }
}

/* Orange CTA breathe variant */
.btnCta.ctaBreathe{
  animation: breatheOrange 2.6s ease-in-out infinite;
}

@keyframes breatheOrange{
  0%, 100%{ 
    transform: scale(1); 
    box-shadow: 0 8px 24px rgba(255,140,26,0.25);
  }
  50%{ 
    transform: scale(1.04); 
    box-shadow: 0 14px 36px rgba(255,140,26,0.35);
  }
}

/* ============================================
   LOADING SPINNER & BUTTON STATES
   ============================================ */
.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btnSpin 0.6s linear infinite;
  margin-left: 8px;
  flex-shrink: 0;
}

@keyframes btnSpin {
  to { transform: rotate(360deg); }
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  pointer-events: none;
}

/* ============================================
   THANK-YOU PAGE
   ============================================ */
.thanksPage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.thanksMain {
  flex: 1;
  padding: 80px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thanksHero {
  animation: fadeUp 0.8s var(--ease-out) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(34,197,94,0.15), rgba(16,185,129,0.15));
  border: 2px solid rgba(34,197,94,0.3);
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 700;
  color: #15803d;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(34,197,94,0.15);
  animation: fadeUp 0.8s var(--ease-out) 0.1s both;
}

.success-badge span:first-child {
  font-size: 24px;
  line-height: 1;
}

.thanksTitle {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  color: var(--deep-navy);
  margin: 0 0 20px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  animation: fadeUp 0.8s var(--ease-out) 0.2s both;
}

.thanksSubtitle {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  margin: 0 auto 40px;
  max-width: 50ch;
  animation: fadeUp 0.8s var(--ease-out) 0.3s both;
}

.thanksCard {
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(11,28,61,0.08);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadowMedium);
  margin-bottom: 32px;
  animation: fadeUp 0.8s var(--ease-out) 0.4s both;
}

.thanksCard h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--deep-navy);
}

.thanksCard ul {
  text-align: left;
  max-width: 400px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
}

.thanksCard li {
  padding: 16px 0;
  border-bottom: 1px solid rgba(11,28,61,0.06);
}

.thanksCard li:last-child {
  border-bottom: none;
}

.thanksCard strong {
  display: block;
  font-weight: 700;
  font-size: 16px;
  color: var(--deep-navy);
  margin-bottom: 4px;
}

.thanksCard p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.thanksActions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.8s var(--ease-out) 0.5s both;
}

.copySuccess {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(22,163,74,0.95);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(22,163,74,0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease-out), visibility 0.25s;
  pointer-events: none;
  z-index: 10;
}

.copySuccess::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid rgba(22,163,74,0.95);
}

.copySuccess.show {
  opacity: 1;
  visibility: visible;
}

/* Responsive adjustments for thank-you page */
@media (max-width: 640px) {
  .thanksMain {
    padding: 60px 0;
  }

  .thanksCard {
    padding: 28px 24px;
  }

  .thanksActions {
    flex-direction: column;
  }

  .thanksActions .btn {
    width: 100%;
  }

  .success-badge {
    font-size: 16px;
    padding: 10px 20px;
  }
}

/* ============================================
   SHARE MODAL
   ============================================ */
.shareModal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-out), visibility 0.3s;
}

.shareModal.active {
  opacity: 1;
  visibility: visible;
}

.shareModalOverlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 28, 61, 0.8);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.shareModalContent {
  position: relative;
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(11, 28, 61, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s var(--ease-out);
  padding: 32px;
}

.shareModal.active .shareModalContent {
  transform: scale(1) translateY(0);
}

.shareModalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.shareModalHeader h3 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--deep-navy);
}

.shareModalClose {
  background: transparent;
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  color: var(--muted);
  transition: background-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.shareModalClose:hover {
  background: rgba(11, 28, 61, 0.05);
  color: var(--deep-navy);
}

.shareModalClose svg {
  width: 24px;
  height: 24px;
}

.shareModalSubtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.shareOptions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shareOption {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(11, 28, 61, 0.08);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  text-decoration: none;
  color: inherit;
  width: 100%;
  text-align: left;
}

.shareOption:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(11, 28, 61, 0.12);
  box-shadow: 0 4px 12px rgba(11, 28, 61, 0.08);
  transform: translateY(-2px);
}

.shareOption:active {
  transform: translateY(0);
}

.shareIcon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
}

.shareIcon svg {
  width: 24px;
  height: 24px;
}

.shareOptionText {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shareOptionText strong {
  font-size: 16px;
  font-weight: 600;
  color: var(--deep-navy);
}

.shareOptionText span {
  font-size: 13px;
  color: var(--muted);
}

/* Responsive modal */
@media (max-width: 640px) {
  .shareModalContent {
    padding: 24px;
    width: 95%;
  }

  .shareModalHeader h3 {
    font-size: 20px;
  }

  .shareOption {
    padding: 14px;
  }

  .shareIcon {
    width: 44px;
    height: 44px;
  }

  .shareOptionText strong {
    font-size: 15px;
  }
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal{
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.in{ 
  opacity: 1; 
  transform: translateY(0); 
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero{ padding: 80px 0 40px; }
.heroCenter{ max-width: 900px; margin: 0 auto; text-align: center; }

.heroTitle{
  margin: 0 0 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--deep-navy);
}

.heroDrop{
  animation: heroDrop 1s var(--ease-out) both;
}

@keyframes heroDrop{
  from{ opacity: 0; transform: translateY(-20px); }
  to{ opacity: 1; transform: translateY(0); }
}

.gradCycle{
  background: linear-gradient(135deg, var(--velocity-blue), var(--fluency-orange), var(--glow-yellow), var(--velocity-blue));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift{
  0%, 100%{ background-position: 0% 50%; }
  50%{ background-position: 100% 50%; }
}

.heroSub{
  margin: 0 auto 28px;
  max-width: 65ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  animation: fadeUp 0.8s var(--ease-out) 0.2s both;
}

@keyframes fadeUp{
  from{ opacity: 0; transform: translateY(16px); }
  to{ opacity: 1; transform: translateY(0); }
}

.emo{
  display: inline-flex;
  margin-left: 4px;
  margin-right: 2px;
  transform: translateY(2px);
}

.heroCtas{
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  animation: fadeUp 0.8s var(--ease-out) 0.4s both;
}

.heroMeta{
  margin-top: 20px;
  color: rgba(11,28,61,0.6);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  animation: fadeUp 0.8s var(--ease-out) 0.6s both;
}

.metaDot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-yellow), var(--fluency-orange));
}

.pulseDot{
  box-shadow: 0 0 0 0 rgba(255,211,77,0.4);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse{
  0%{ box-shadow: 0 0 0 0 rgba(255,211,77,0.4); }
  70%{ box-shadow: 0 0 0 12px rgba(255,211,77,0); }
  100%{ box-shadow: 0 0 0 0 rgba(255,211,77,0); }
}

/* ============================================
   STATS ROW
   ============================================ */
.statsRow{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.statCard{
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadowSoft), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.statCard:hover{
  transform: translateY(-8px);
  box-shadow:
    var(--shadowMedium),
    0 0 30px rgba(30, 144, 255, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

/* Subtle staggered float animation on stats */
.statCard:nth-child(1){ animation: subtleFloat 4s ease-in-out infinite; }
.statCard:nth-child(2){ animation: subtleFloat 4s ease-in-out infinite 0.5s; }
.statCard:nth-child(3){ animation: subtleFloat 4s ease-in-out infinite 1s; }
.statCard:nth-child(4){ animation: subtleFloat 4s ease-in-out infinite 1.5s; }

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

.statBig{
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--deep-navy);
  margin-bottom: 4px;
}

.statSmall{
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

/* ============================================
   SECTIONS
   ============================================ */
.section{ padding: 80px 0; }

.sectionHead{
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
}

.sectionHead h2{
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.sectionHead p{
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.sectionHeadLight h2{ color: #fff; }
.sectionHeadLight p{ color: rgba(255,255,255,0.8); }

/* ============================================
   NAVY SECTION WITH ORANGE GRADIENT ANIMATION
   ============================================ */
.sectionNavy{
  background: linear-gradient(135deg, var(--deep-navy) 0%, #162a4a 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 100px 0;
}

/* Dot pattern */
.sectionNavy::before{
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* ORANGE GRADIENT ANIMATION - RESTORED */
.sectionNavyAnim::after{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg, 
    transparent 0%,
    rgba(255,140,26,0.08) 25%,
    rgba(30,144,255,0.08) 50%,
    rgba(255,140,26,0.08) 75%,
    transparent 100%
  );
  animation: orangeWave 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes orangeWave{
  0%{ transform: translateX(-50%); }
  100%{ transform: translateX(0%); }
}

/* ============================================
   CARDS
   ============================================ */
.cards3{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card{
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadowSoft), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  text-align: center;
}

.card:hover{
  transform: translateY(-8px);
  box-shadow:
    var(--shadowMedium),
    0 0 40px rgba(30, 144, 255, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.card .icon{
  font-size: 40px;
  margin-bottom: 16px;
  display: inline-block;
  animation: iconBounce 3s ease-in-out infinite;
}

@keyframes iconBounce{
  0%, 100%{ transform: translateY(0) rotate(0deg); }
  25%{ transform: translateY(-3px) rotate(-3deg); }
  75%{ transform: translateY(-3px) rotate(3deg); }
}

.card h3{
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 10px;
}

.card p{
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* Built For Panel */
.builtFor{
  margin-top: 48px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadowSoft);
}

.builtForRow{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.builtForLabel{
  font-weight: 700;
  color: var(--muted);
  margin-right: 8px;
}

.builtPill{
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.builtPill:hover{
  border-color: rgba(30,144,255,0.3);
  color: var(--deep-navy);
  transform: translateY(-2px);
}

.builtPill.isActive{
  background: linear-gradient(135deg, var(--velocity-blue), var(--velocity-blue-dark));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(30,144,255,0.3);
}

.builtForPanel{
  background: rgba(234,244,255,0.5);
  border-radius: var(--radius);
  padding: 24px;
}

.builtForTitle{
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}

.builtForList{
  list-style: none;
  padding: 0;
  margin: 0;
}

.builtForList li{
  padding: 10px 0;
  padding-left: 28px;
  position: relative;
  color: var(--muted);
  font-weight: 500;
}

.builtForList li::before{
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--velocity-blue);
  font-weight: 700;
}

/* ============================================
   3D CUBE PREVIEW
   ============================================ */
.cubeScene {
  perspective: 1400px;
  perspective-origin: center center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 580px;
  padding: 60px 20px;
  position: relative;
  user-select: none;
  touch-action: none;
}

.cube {
  width: 380px;
  height: 380px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-15deg) rotateY(-25deg);
  transition: transform 0.1s ease-out;
  cursor: grab;
}

.cube.isDragging {
  cursor: grabbing;
  transition: none;
}

.cube.isAutoRotating {
  animation: cubeAutoRotate 20s linear infinite;
}

@keyframes cubeAutoRotate {
  from { transform: rotateX(-15deg) rotateY(0deg); }
  to { transform: rotateX(-15deg) rotateY(360deg); }
}

.cubeFace {
  position: absolute;
  width: 380px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: visible;
  border-radius: 40px;
  overflow: hidden;

  /* Glassmorphism with filled rounded look */
  background: linear-gradient(145deg, rgba(15, 35, 70, 0.95), rgba(8, 20, 45, 0.98));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 3px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 2px 20px rgba(255, 255, 255, 0.05),
    inset 0 -2px 20px rgba(0, 0, 0, 0.2),
    inset 0 0 40px rgba(0, 128, 255, 0.08),
    0 20px 60px rgba(0, 0, 0, 0.4);

  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.cubeFace:hover {
  border-color: rgba(30, 144, 255, 0.4);
  box-shadow:
    inset 0 2px 20px rgba(255, 255, 255, 0.08),
    inset 0 -2px 20px rgba(0, 0, 0, 0.2),
    inset 0 0 40px rgba(0, 128, 255, 0.15),
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 50px rgba(30, 144, 255, 0.25);
}

/* Animated gradient border on hover */
.cubeFace::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 44px;
  background: linear-gradient(
    135deg,
    var(--velocity-blue),
    var(--fluency-orange),
    var(--velocity-blue)
  );
  background-size: 200% 200%;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
  animation: gradientBorderRotate 3s linear infinite paused;
}

.cubeFace:hover::before {
  opacity: 0.5;
  animation-play-state: running;
}

@keyframes gradientBorderRotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Face positions (3D transforms) - larger cube */
.cubeFace--front  { transform: translateZ(190px); }
.cubeFace--back   { transform: rotateY(180deg) translateZ(190px); }
.cubeFace--right  { transform: rotateY(90deg) translateZ(190px); }
.cubeFace--left   { transform: rotateY(-90deg) translateZ(190px); }
.cubeFace--top    { transform: rotateX(90deg) translateZ(190px); }
.cubeFace--bottom { transform: rotateX(-90deg) translateZ(190px); }

/* Face content styling */
.faceContent {
  text-align: center;
  color: #fff;
  padding: 24px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Front face: Equation */
.faceContent--equation .equationDisplay {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.equationProblem {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: -0.02em;
}

.equationAnswer {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 64px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--velocity-blue), #00AAFF);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 12px rgba(0, 128, 255, 0.5));
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s ease, transform 0.4s var(--ease-bounce);
}

.equationAnswer.show {
  opacity: 1;
  transform: scale(1);
}

.equationLabel {
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Back face: Progress Ring */
.faceContent--progress .progressRing {
  position: relative;
  width: 180px;
  height: 180px;
}

.faceContent--progress .progressRing svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progressRing__bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 8;
}

.progressRing__fill {
  fill: none;
  stroke: url(#progressGradient);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 264;
  stroke-dashoffset: 58;
  transition: stroke-dashoffset 1s ease;
}

.progressRing__text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: #fff;
}

.progressLabel {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Right face: Mini Grid */
.faceContent--grid .miniGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 180px;
}

.miniGridCell {
  aspect-ratio: 1;
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(11, 28, 61, 0.8);
  transition: all 0.3s ease;
}

.miniGridCell[data-state="not_started"] {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

.miniGridCell[data-state="in_progress"] {
  background: rgba(255, 204, 0, 0.4);
  border: 1px solid rgba(255, 204, 0, 0.7);
  box-shadow: 0 0 12px rgba(255, 204, 0, 0.5);
  color: #fff;
}

.miniGridCell[data-state="mastered"] {
  background: rgba(30, 144, 255, 0.5);
  border: 1px solid rgba(30, 144, 255, 0.8);
  box-shadow: 0 0 12px rgba(30, 144, 255, 0.5);
  color: #fff;
}

.gridLabel {
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Left face: Blocky */
.faceContent--blocky .blockyPreview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.blockyRow {
  display: flex;
  gap: 8px;
}

.blockyCell {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.blockyCell--filled {
  background: linear-gradient(135deg, var(--velocity-blue), #00AAFF);
  border-color: rgba(30, 144, 255, 0.8);
  box-shadow: 0 0 16px rgba(30, 144, 255, 0.5);
}

.blockyCell--active {
  background: linear-gradient(135deg, var(--fluency-orange), #FFB347);
  border-color: rgba(255, 140, 26, 0.8);
  box-shadow: 0 0 16px rgba(255, 140, 26, 0.5);
  animation: blockyPulse 1.5s ease-in-out infinite;
}

@keyframes blockyPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 16px rgba(255, 140, 26, 0.5); }
  50% { transform: scale(1.05); box-shadow: 0 0 24px rgba(255, 140, 26, 0.7); }
}

.blockyLabel {
  margin-top: 24px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Top face: Streak */
.faceContent--streak .streakNumber {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 72px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--fluency-orange), var(--glow-yellow));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 12px rgba(255, 140, 26, 0.5));
  line-height: 1;
}

.faceContent--streak .streakLabel {
  font-size: 20px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.streakStats {
  margin-top: 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.streakStats strong {
  color: var(--velocity-blue);
  font-weight: 700;
}

/* Bottom face: Modes */
.faceContent--modes .modeIcons {
  display: flex;
  gap: 24px;
}

.modeIcon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.modeIcon:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.modeEmoji {
  font-size: 32px;
}

.modeText {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modesLabel {
  margin-top: 24px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Cube hint */
.cubeHint {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  animation: hintPulse 2s ease-in-out infinite;
}

.cubeHintIcon {
  font-size: 18px;
  animation: hintWiggle 2s ease-in-out infinite;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes hintWiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

/* Responsive cube - Tablet */
@media (max-width: 900px) {
  .cubeScene {
    perspective: 1200px;
    min-height: 520px;
    padding: 48px 20px;
  }

  .cube {
    width: 320px;
    height: 320px;
  }

  .cubeFace {
    width: 320px;
    height: 320px;
    border-radius: 32px;
  }

  .cubeFace--front  { transform: translateZ(160px); }
  .cubeFace--back   { transform: rotateY(180deg) translateZ(160px); }
  .cubeFace--right  { transform: rotateY(90deg) translateZ(160px); }
  .cubeFace--left   { transform: rotateY(-90deg) translateZ(160px); }
  .cubeFace--top    { transform: rotateX(90deg) translateZ(160px); }
  .cubeFace--bottom { transform: rotateX(-90deg) translateZ(160px); }

  .equationProblem { font-size: 36px; }
  .equationAnswer { font-size: 54px; }
  .faceContent--streak .streakNumber { font-size: 60px; }
  .faceContent--progress .progressRing { width: 150px; height: 150px; }
  .progressRing__text { font-size: 36px; }
  .faceContent--grid .miniGrid { width: 160px; gap: 6px; }
  .miniGridCell { font-size: 13px; }
  .blockyCell { width: 44px; height: 44px; }
  .modeIcon { padding: 14px; }
  .modeEmoji { font-size: 28px; }
}

/* Responsive cube - Mobile */
@media (max-width: 600px) {
  .cubeScene {
    perspective: 1000px;
    min-height: 460px;
    padding: 40px 16px;
  }

  .cube {
    width: 280px;
    height: 280px;
  }

  .cubeFace {
    width: 280px;
    height: 280px;
    border-radius: 28px;
    border-width: 2px;
  }

  .cubeFace--front  { transform: translateZ(140px); }
  .cubeFace--back   { transform: rotateY(180deg) translateZ(140px); }
  .cubeFace--right  { transform: rotateY(90deg) translateZ(140px); }
  .cubeFace--left   { transform: rotateY(-90deg) translateZ(140px); }
  .cubeFace--top    { transform: rotateX(90deg) translateZ(140px); }
  .cubeFace--bottom { transform: rotateX(-90deg) translateZ(140px); }

  .faceContent { padding: 20px; }
  .equationProblem { font-size: 30px; }
  .equationAnswer { font-size: 46px; }
  .equationLabel { font-size: 12px; margin-top: 16px; }
  .faceContent--streak .streakNumber { font-size: 52px; }
  .faceContent--streak .streakLabel { font-size: 18px; }
  .streakStats { font-size: 13px; }
  .faceContent--progress .progressRing { width: 130px; height: 130px; }
  .progressRing__text { font-size: 30px; }
  .progressLabel { font-size: 12px; }
  .faceContent--grid .miniGrid { width: 140px; gap: 5px; }
  .miniGridCell { font-size: 11px; border-radius: 6px; }
  .gridLabel { font-size: 12px; margin-top: 16px; }
  .blockyCell { width: 38px; height: 38px; border-radius: 8px; }
  .blockyRow { gap: 6px; }
  .blockyLabel { font-size: 12px; margin-top: 18px; }
  .modeIcons { gap: 16px; }
  .modeIcon { padding: 12px; border-radius: 14px; }
  .modeEmoji { font-size: 26px; }
  .modeText { font-size: 11px; }
  .modesLabel { font-size: 12px; margin-top: 18px; }
  .cubeHint { margin-top: 28px; font-size: 14px; }
}

/* Responsive cube - Small Mobile */
@media (max-width: 400px) {
  .cubeScene {
    perspective: 800px;
    min-height: 400px;
    padding: 32px 12px;
  }

  .cube {
    width: 240px;
    height: 240px;
  }

  .cubeFace {
    width: 240px;
    height: 240px;
    border-radius: 24px;
  }

  .cubeFace--front  { transform: translateZ(120px); }
  .cubeFace--back   { transform: rotateY(180deg) translateZ(120px); }
  .cubeFace--right  { transform: rotateY(90deg) translateZ(120px); }
  .cubeFace--left   { transform: rotateY(-90deg) translateZ(120px); }
  .cubeFace--top    { transform: rotateX(90deg) translateZ(120px); }
  .cubeFace--bottom { transform: rotateX(-90deg) translateZ(120px); }

  .faceContent { padding: 16px; }
  .equationProblem { font-size: 24px; }
  .equationAnswer { font-size: 38px; }
  .equationLabel { font-size: 11px; margin-top: 12px; }
  .faceContent--streak .streakNumber { font-size: 42px; }
  .faceContent--streak .streakLabel { font-size: 14px; }
  .streakStats { font-size: 11px; margin-top: 14px; }
  .faceContent--progress .progressRing { width: 100px; height: 100px; }
  .progressRing__text { font-size: 24px; }
  .progressLabel { font-size: 11px; margin-top: 12px; }
  .faceContent--grid .miniGrid { width: 110px; gap: 4px; }
  .miniGridCell { font-size: 9px; border-radius: 5px; }
  .gridLabel { font-size: 11px; margin-top: 12px; }
  .blockyCell { width: 30px; height: 30px; border-radius: 6px; }
  .blockyRow { gap: 5px; }
  .blockyLabel { font-size: 11px; margin-top: 14px; }
  .modeIcons { gap: 10px; }
  .modeIcon { padding: 8px; border-radius: 10px; gap: 4px; }
  .modeEmoji { font-size: 20px; }
  .modeText { font-size: 9px; }
  .modesLabel { font-size: 11px; margin-top: 14px; }
  .cubeHint { margin-top: 20px; font-size: 12px; }
  .cubeHintIcon { font-size: 14px; }
}

/* Ensure 16px for mobile to prevent zoom */
.select, .waitlistForm input{
  font-size: 16px;
}

.select{
  appearance: none;
  border: 1px solid rgba(11,28,61,0.12);
  background: rgba(255,255,255,0.95);
  color: rgba(11,28,61,0.9);
  padding: 12px 16px;
  padding-right: 36px;
  border-radius: 14px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230B1C3D' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.select:hover{
  border-color: rgba(30,144,255,0.4);
}

.select:focus{
  outline: none;
  border-color: var(--velocity-blue);
  box-shadow: 0 0 0 3px rgba(30,144,255,0.15);
}

.select option{
  color: rgba(11,28,61,0.9);
  background: #ffffff;
}

/* ============================================
   WHY SECTION (What You Build)
   ============================================ */
.whyWrap{ margin-top: 32px; position: relative; }

.whyTrack{
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(11,28,61,0.06);
  border: 1px solid rgba(11,28,61,0.08);
  overflow: hidden;
  margin: 0 auto 24px;
  max-width: 860px;
}

.whyBeam{
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(30,144,255,0),
    rgba(30,144,255,0.6),
    rgba(255,140,26,0.6),
    rgba(30,144,255,0)
  );
  animation: beam 3s ease-in-out infinite;
}

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

.whyCards{ 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 20px; 
}

.whyCard{
  position: relative;
}

.whyKicker{ 
  font-weight: 700; 
  color: var(--velocity-blue);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px; 
}

.whyCta{ margin-top: 32px; display: flex; justify-content: center; }

/* ============================================
   WAITLIST PAGE
   ============================================ */
.waitlistPage{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.waitlistMain{ 
  flex: 1;
  padding: 60px 0 80px;
  display: flex;
  align-items: center;
}

.waitlistHero{ 
  text-align: center; 
  max-width: 680px; 
  margin: 0 auto;
  animation: fadeUp 0.8s var(--ease-out) both;
}

/* Social Proof Badge */
.social-proof-badge{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(11,28,61,0.08);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(11,28,61,0.06);
  animation: fadeUp 0.8s var(--ease-out) 0.1s both;
}

.badge-dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 0 0 0 rgba(34,197,94,0.4);
  animation: pulse 2s ease-in-out infinite;
}

.gradient-text{
  background: linear-gradient(135deg, var(--velocity-blue), var(--fluency-orange));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.waitlistTitle{ 
  margin: 0 0 16px; 
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(36px, 5vw, 56px); 
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  animation: fadeUp 0.8s var(--ease-out) 0.2s both;
}

.waitlistSub{ 
  margin: 0 auto 32px; 
  color: var(--muted); 
  max-width: 55ch; 
  line-height: 1.7;
  font-size: 17px;
  animation: fadeUp 0.8s var(--ease-out) 0.3s both;
}

.waitlistCard{
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadowMedium), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  text-align: center;
  animation: fadeUp 0.8s var(--ease-out) 0.4s both;
}

.waitlistCardStandalone{ margin-top: 0; }

/* Waitlist Progress Indicator */
.waitlistProgress{
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(11, 28, 61, 0.08);
}

.progressLabel{
  font-size: 18px;
  font-weight: 700;
  color: var(--deep-navy);
  margin-bottom: 12px;
}

.progressCurrent{
  color: var(--velocity-blue);
  font-size: 24px;
  font-family: 'Space Grotesk', sans-serif;
}

.progressTotal{
  color: var(--fluency-orange);
  font-family: 'Space Grotesk', sans-serif;
}

.progressBar{
  height: 12px;
  background: rgba(11, 28, 61, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progressFill{
  height: 100%;
  background: linear-gradient(90deg, var(--velocity-blue), var(--fluency-orange));
  border-radius: 999px;
  position: relative;
  animation: progressGlow 2s ease-in-out infinite;
}

.progressFill::after{
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4));
  animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressGlow{
  0%, 100%{ box-shadow: 0 0 12px rgba(30, 144, 255, 0.4); }
  50%{ box-shadow: 0 0 20px rgba(255, 140, 26, 0.5); }
}

@keyframes progressShine{
  0%, 100%{ opacity: 0.5; }
  50%{ opacity: 1; }
}

.progressUrgency{
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fluency-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.progressUrgency::before{
  content: "🔥";
  font-size: 14px;
}

.waitlistHead h2{ 
  font-family: 'Space Grotesk', sans-serif;
  margin: 0 0 8px; 
  font-size: 28px;
  font-weight: 700;
}

.waitlistHead p{ 
  margin: 0; 
  color: var(--muted); 
  font-weight: 500; 
  line-height: 1.6; 
}

.waitlistForm{
  margin-top: 20px;
}

.form-row{
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 18px;
  background: rgba(234,244,255,0.6);
  border: 2px solid rgba(11,28,61,0.08);
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.form-row:focus-within{
  border-color: rgba(30,144,255,0.4);
  background: rgba(234,244,255,0.8);
  box-shadow: 0 0 0 4px rgba(30,144,255,0.1);
}

.waitlistForm input{
  flex: 1;
  min-width: 0;
  padding: 16px 18px;
  border-radius: 12px;
  border: none;
  outline: none;
  background: rgba(255,255,255,0.95);
  color: var(--deep-navy);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 16px;
}

.waitlistForm input::placeholder{ color: var(--muted2); }

.waitlistForm .btn{
  flex-shrink: 0;
  padding: 16px 24px;
}

.notice{ 
  margin-top: 16px; 
  font-weight: 700; 
  min-height: 24px;
  font-size: 15px;
}

.notice.good{ color: #16a34a; }
.notice.bad{ color: #dc2626; }

/* Feature Pills */
.feature-pills{
  margin-top: 24px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.feature-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(234,244,255,0.8);
  border: 1px solid rgba(11,28,61,0.08);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  color: rgba(11,28,61,0.75);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-pill:hover{
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11,28,61,0.08);
}

.feature-pill svg{
  color: var(--velocity-blue);
  flex-shrink: 0;
}

.finePrint{ 
  margin-top: 16px; 
  color: rgba(11,28,61,0.5); 
  font-weight: 500; 
  font-size: 13px; 
}

/* Trust Section */
.trust-section{
  margin-top: 48px;
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  animation: fadeUp 0.8s var(--ease-out) 0.5s both;
}

.trust-item{
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: transform 0.3s ease;
}

.trust-item:hover{
  transform: translateY(-3px);
}

.trust-icon{
  font-size: 32px;
  animation: iconBounce 3s ease-in-out infinite;
}

.trust-text{
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trust-text strong{
  font-weight: 700;
  font-size: 15px;
  color: var(--deep-navy);
}

.trust-text span{
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* ============================================
   TESTIMONIALS SECTION
   ============================================ */
.testimonialsGrid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.testimonialCard{
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadowSoft), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.testimonialCard:hover{
  transform: translateY(-8px);
  box-shadow:
    var(--shadowMedium),
    0 0 40px rgba(255, 140, 26, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.testimonialQuote{
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  font-style: italic;
  position: relative;
  padding-left: 20px;
}

.testimonialQuote::before{
  content: '"';
  position: absolute;
  left: 0;
  top: -8px;
  font-size: 48px;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--velocity-blue);
  opacity: 0.3;
  line-height: 1;
}

.testimonialAuthor{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
}

.testimonialAvatar{
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--velocity-blue), var(--fluency-orange));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(30, 144, 255, 0.3);
}

.testimonialInfo{
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.testimonialName{
  font-weight: 700;
  font-size: 15px;
  color: var(--deep-navy);
}

.testimonialRole{
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 980px){
  .testimonialsGrid{
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq{ 
  margin-top: 32px; 
  display: grid; 
  gap: 12px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.faqItem{
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(11,28,61,0.06);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.faqItem:hover{
  box-shadow: var(--shadowSoft), 0 0 25px rgba(30, 144, 255, 0.08);
  transform: translateY(-4px);
}

.faqItem[open]{
  box-shadow: var(--shadowSoft);
}

.faqItem summary{ 
  cursor: pointer; 
  font-weight: 700; 
  color: var(--deep-navy);
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faqItem summary::-webkit-details-marker{ display: none; }

.faqItem summary::after{
  content: "+";
  font-size: 20px;
  font-weight: 500;
  color: var(--muted);
  transition: transform 0.3s ease;
}

.faqItem[open] summary::after{
  transform: rotate(45deg);
}

.faqItem p{ 
  margin: 16px 0 0; 
  color: var(--muted); 
  line-height: 1.7;
  font-size: 15px;
}

/* ============================================
   FOOTER - FIXED
   ============================================ */
.footer{
  margin-top: auto;
  background: var(--deep-navy);
  color: #fff;
  position: relative;
}

.footer::before{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--velocity-blue), var(--fluency-orange), var(--glow-yellow), var(--velocity-blue));
  background-size: 300% 100%;
  animation: borderGlow 4s linear infinite;
}

.footerInner{
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.simpleFooter{ justify-content: space-between; }

.footLogo img{
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.2));
  transition: transform 0.3s ease;
}

.footLogo:hover img{
  transform: scale(1.05) rotate(-5deg);
}

.footCopy{
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  font-size: 14px;
}

.footWillOfD{
  font-family: 'Pacifico', cursive;
  font-weight: 400;
  font-size: 18px;
  color: rgba(255,255,255,0.5);
}

/* Screen Reader Only */
.srOnly{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Scroll offset for sections */
section[id], .section[id]{ scroll-margin-top: calc(var(--headerH) + 20px); }

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 980px){
  .nav{ display: none; }
  .menuBtn{ display: inline-block; }
  .statsRow{ grid-template-columns: repeat(2, 1fr); }
  .cards3{ grid-template-columns: 1fr; }
  .whyCards{ grid-template-columns: 1fr; }
  .trust-section{ gap: 24px; }
}

@media (max-width: 640px){
  .container{ width: calc(100% - 32px); }
  .hero{ padding-top: 60px; }
  .section{ padding: 60px 0; }

  /* Fix yellow dot alignment in hero */
  .heroMeta {
    flex-wrap: wrap;
    font-size: 12px;
    gap: 6px;
    line-height: 1.5;
    padding: 0 16px;
  }

  .metaDot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-left: 6px;
  }

  .metaText {
    flex: 1;
    min-width: 0;
  }

  /* Fix waitlist notice visibility */
  .notice {
    display: block;
    min-height: 28px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    text-align: center;
    word-wrap: break-word;
  }

  .notice.good {
    background: rgba(22, 163, 74, 0.1);
    border: 1px solid rgba(22, 163, 74, 0.2);
  }

  .notice.bad {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
  }

  .waitlistCard {
    overflow: visible;
  }
  
  .statsRow{ grid-template-columns: 1fr 1fr; gap: 12px; }
  .statCard{ padding: 20px 16px; }
  .statBig{ font-size: 24px; }
  
  .waitlistMain{ padding: 40px 0 60px; }
  .waitlistCard{ padding: 24px 20px; }
  
  .form-row{ 
    flex-direction: column;
    padding: 12px;
  }
  
  .waitlistForm input{
    width: 100%;
  }
  
  .waitlistForm .btn{ 
    width: 100%; 
  }
  
  .feature-pills{
    flex-direction: column;
    align-items: stretch;
  }
  
  .feature-pill{
    justify-content: center;
  }
  
  .trust-section{
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }
  
  .trust-item{
    background: rgba(255,255,255,0.8);
    padding: 16px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  
  .builtForRow{
    justify-content: center;
  }

  .footerInner{
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

@media (max-width: 400px){
  .heroTitle{ font-size: 36px; }
  .waitlistTitle{ font-size: 32px; }
  .social-proof-badge{ font-size: 12px; padding: 8px 14px; }

  /* Extra small screen adjustments for hero meta */
  .heroMeta {
    font-size: 11px;
    gap: 5px;
  }

  .metaDot {
    width: 7px;
    height: 7px;
  }
}

/* ============================================
   LANGUAGE SELECTOR
   ============================================ */
.langSelector {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.langBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(11,28,61,0.1);
  background: rgba(255,255,255,0.8);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: rgba(11,28,61,0.75);
  cursor: pointer;
  transition: background 0.25s var(--ease-out),
              transform 0.25s var(--ease-out),
              border-color 0.25s var(--ease-out);
}

.langBtn:hover {
  background: rgba(255,255,255,1);
  transform: scale(1.05);
  border-color: rgba(30,144,255,0.3);
}

.langBtn svg.globe-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  flex-shrink: 0;
}

.langBtn svg.chevron {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  transition: transform 0.3s var(--ease-out);
  flex-shrink: 0;
}

.langBtn[aria-expanded="true"] svg.chevron {
  transform: rotate(180deg);
}

.langCurrent {
  font-weight: 700;
}

.langDropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(11,28,61,0.08);
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(11,28,61,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s var(--ease-out),
              transform 0.2s var(--ease-out),
              visibility 0.2s;
  z-index: 110;
}

.langDropdown.isOpen {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.langDropdown::-webkit-scrollbar {
  width: 6px;
}

.langDropdown::-webkit-scrollbar-track {
  background: rgba(234,244,255,0.5);
  border-radius: 3px;
}

.langDropdown::-webkit-scrollbar-thumb {
  background: rgba(30,144,255,0.3);
  border-radius: 3px;
}

.langDropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(30,144,255,0.5);
}

.langOption {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  color: rgba(11,28,61,0.85);
  cursor: pointer;
  transition: background 0.25s var(--ease-out),
              transform 0.25s var(--ease-out);
}

.langOption:hover {
  background: rgba(234,244,255,0.8);
  transform: translateX(4px);
}

.langOption.isActive {
  background: linear-gradient(135deg, var(--velocity-blue), var(--velocity-blue-dark));
  color: #fff;
  box-shadow: 0 4px 16px rgba(30,144,255,0.3);
}

.langOption.isActive:hover {
  transform: none;
}

.langFlag {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.langName {
  flex: 1;
}

.langNative {
  font-size: 12px;
  color: rgba(11,28,61,0.5);
}

.langOption.isActive .langNative {
  color: rgba(255,255,255,0.7);
}

/* Mobile language row in mobile menu */
.mobileLangRow {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-top: 1px solid rgba(11,28,61,0.08);
  margin-top: 8px;
}

.mobileLangLabel {
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.mobileLangSelect {
  flex: 1;
}

/* Responsive: Hide desktop dropdown on mobile, show native select */
@media (max-width: 980px) {
  .langSelector {
    display: none;
  }

  .mobileLangRow {
    display: flex;
  }
}

/* Old mobile grid demo removed - replaced by 3D cube */

/* ============================================
   RTL (Right-to-Left) SUPPORT
   ============================================ */
html[dir="rtl"] {
  direction: rtl;
}

html[dir="rtl"] .mobileMenu a:hover {
  transform: translateX(-4px);
}

html[dir="rtl"] .langOption:hover {
  transform: translateX(-4px);
}

html[dir="rtl"] .navLink::after {
  transform-origin: right;
}

html[dir="rtl"] .btn .btn-arrow {
  transform: rotate(180deg);
}

html[dir="rtl"] .btn:hover .btn-arrow {
  transform: rotate(180deg) translateX(4px);
}

html[dir="rtl"] .langDropdown {
  right: auto;
  left: 0;
}

html[dir="rtl"] .builtForList li {
  padding-left: 0;
  padding-right: 28px;
}

html[dir="rtl"] .builtForList li::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .headerInner {
  flex-direction: row-reverse;
}

html[dir="rtl"] .nav {
  flex-direction: row-reverse;
}

html[dir="rtl"] .headerCtas {
  flex-direction: row-reverse;
}

/* Keep math grid LTR even in RTL mode */
html[dir="rtl"] .gridTable {
  direction: ltr;
}

html[dir="rtl"] .gridPreview {
  direction: ltr;
}

/* ============================================
   HERO DEMO EMBED
   ============================================ */
.demoEmbed {
  margin-top: 48px;
  text-align: center;
  animation: fadeUp 0.8s var(--ease-out) 0.8s both;
}

.demoIntro {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.demoContainer {
  max-width: 400px;
  margin: 0 auto;
  background: rgba(255,255,255,0.95);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow:
    0 20px 40px rgba(11,28,61,0.12),
    0 8px 16px rgba(0,128,255,0.08),
    0 0 0 1px rgba(0,128,255,0.1);
  position: relative;
  overflow: hidden;
}

/* Animated gradient border effect */
.demoContainer::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius) + 2px);
  background: linear-gradient(
    90deg,
    var(--velocity-blue),
    var(--fluency-orange),
    var(--glow-yellow),
    var(--velocity-blue)
  );
  background-size: 300% 100%;
  animation: demoBorderGlow 4s linear infinite;
  z-index: -1;
  opacity: 0.7;
}

/* Inner white background to cover the gradient */
.demoContainer::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: rgba(255,255,255,0.98);
  border-radius: calc(var(--radius) - 2px);
  z-index: -1;
}

@keyframes demoBorderGlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.demoQuestion {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--deep-navy);
  margin-bottom: 20px;
  min-height: 44px;
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-bounce);
}

.demoQuestion.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.demoAnswer {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--velocity-blue), #00AAFF);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: none;
  filter: drop-shadow(0 2px 8px rgba(0, 128, 255, 0.3));
}

.demoAnswer .cursor {
  display: inline-block;
  width: 3px;
  height: 48px;
  background: var(--velocity-blue);
  margin-left: 4px;
  animation: cursorBlink 0.6s ease-in-out infinite;
}

@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.demoFeedback {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: 20px;
  font-size: 16px;
  font-weight: 600;
  min-height: 28px;
}

.demoCorrect {
  color: #22c55e;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s var(--ease-bounce);
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

.demoCorrect.show {
  opacity: 1;
  transform: scale(1);
  animation: correctPop 0.5s var(--ease-bounce);
}

@keyframes correctPop {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.demoCorrect svg {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.5));
}

.demoStreak {
  color: var(--fluency-orange);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s var(--ease-bounce);
  text-shadow: 0 0 12px rgba(255, 122, 0, 0.4);
}

.demoStreak.show {
  opacity: 1;
  transform: scale(1);
  animation: streakPulse 0.6s var(--ease-bounce);
}

@keyframes streakPulse {
  0% { transform: scale(0.5) rotate(-5deg); opacity: 0; }
  50% { transform: scale(1.15) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.demoCelebration {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--fluency-orange);
  opacity: 0;
  pointer-events: none;
  text-shadow:
    0 0 20px rgba(255, 122, 0, 0.6),
    0 0 40px rgba(255, 122, 0, 0.4),
    0 0 60px rgba(255, 122, 0, 0.2);
  z-index: 10;
}

.demoCelebration.show {
  opacity: 1;
  animation: celebrationBurst 0.8s var(--ease-bounce);
}

@keyframes celebrationBurst {
  0% {
    transform: translate(-50%, -50%) scale(0.3) rotate(-10deg);
    opacity: 0;
  }
  40% {
    transform: translate(-50%, -50%) scale(1.3) rotate(5deg);
    opacity: 1;
  }
  60% {
    transform: translate(-50%, -50%) scale(0.95) rotate(-2deg);
  }
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 1;
  }
}

.demoGlow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(
    circle at center,
    rgba(255, 122, 0, 0.25) 0%,
    rgba(255, 204, 0, 0.15) 30%,
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out);
  z-index: 5;
}

.demoGlow.show {
  opacity: 1;
  animation: glowPulse 1.5s ease-in-out;
}

@keyframes glowPulse {
  0% { opacity: 0; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0.7; transform: scale(1); }
}

/* Sparkle particles for celebration */
.demoSparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  overflow: hidden;
}

.demoSparkle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--glow-yellow);
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 6px var(--glow-yellow), 0 0 12px var(--fluency-orange);
}

.demoSparkles.show .demoSparkle {
  animation: sparkleFloat 1s ease-out forwards;
}

.demoSparkle:nth-child(1) { left: 20%; top: 50%; animation-delay: 0s; }
.demoSparkle:nth-child(2) { left: 80%; top: 50%; animation-delay: 0.1s; }
.demoSparkle:nth-child(3) { left: 50%; top: 20%; animation-delay: 0.05s; }
.demoSparkle:nth-child(4) { left: 50%; top: 80%; animation-delay: 0.15s; }
.demoSparkle:nth-child(5) { left: 30%; top: 30%; animation-delay: 0.08s; }
.demoSparkle:nth-child(6) { left: 70%; top: 30%; animation-delay: 0.12s; }
.demoSparkle:nth-child(7) { left: 30%; top: 70%; animation-delay: 0.18s; }
.demoSparkle:nth-child(8) { left: 70%; top: 70%; animation-delay: 0.06s; }

@keyframes sparkleFloat {
  0% {
    opacity: 0;
    transform: scale(0) translate(0, 0);
  }
  30% {
    opacity: 1;
    transform: scale(1.5);
  }
  100% {
    opacity: 0;
    transform: scale(0.5) translate(
      calc((var(--x, 0) - 0.5) * 80px),
      calc((var(--y, 0) - 0.5) * 80px)
    );
  }
}

.demoSparkle:nth-child(1) { --x: 0; --y: 0.5; }
.demoSparkle:nth-child(2) { --x: 1; --y: 0.5; }
.demoSparkle:nth-child(3) { --x: 0.5; --y: 0; }
.demoSparkle:nth-child(4) { --x: 0.5; --y: 1; }
.demoSparkle:nth-child(5) { --x: 0.2; --y: 0.2; }
.demoSparkle:nth-child(6) { --x: 0.8; --y: 0.2; }
.demoSparkle:nth-child(7) { --x: 0.2; --y: 0.8; }
.demoSparkle:nth-child(8) { --x: 0.8; --y: 0.8; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .demoEmbed .demoQuestion,
  .demoEmbed .demoAnswer,
  .demoEmbed .demoCorrect,
  .demoEmbed .demoStreak,
  .demoEmbed .demoCelebration {
    animation: none !important;
    transition: none !important;
  }

  .demoAnswer .cursor {
    animation: none;
    opacity: 1;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .demoEmbed {
    margin-top: 36px;
  }

  .demoContainer {
    max-width: 100%;
    padding: 24px 16px;
  }

  .demoQuestion {
    font-size: 28px;
  }

  .demoAnswer {
    font-size: 40px;
  }

  .demoAnswer .cursor {
    height: 40px;
  }

  .demoCelebration {
    font-size: 24px;
  }
}

/* ============================================
   DEMO PAGE (standalone)
   ============================================ */
.demoPage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.demoMain {
  flex: 1;
  padding: 80px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demoHero {
  animation: fadeUp 0.8s var(--ease-out) both;
}

.demoTitle {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: var(--deep-navy);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  animation: fadeUp 0.8s var(--ease-out) 0.1s both;
}

.demoSubtitle {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  margin: 0 auto 24px;
  max-width: 50ch;
  animation: fadeUp 0.8s var(--ease-out) 0.2s both;
}

.demoActions {
  animation: fadeUp 0.8s var(--ease-out) 0.4s both;
}

@media (max-width: 640px) {
  .demoMain {
    padding: 60px 0;
  }

  .demoActions {
    flex-direction: column;
  }

  .demoActions .btn {
    width: 100%;
  }
}
