/* ============================================================
   SparkEra — light prismatic redesign
   Brand: amber spark + full-spectrum grainy gradients on light
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* surfaces */
  --bg:        #ffffff;
  --bg-alt:    #f5f5f8;
  --bg-tint:   #fbfaff;
  --ink-bg:    #0d0d12;       /* dark accent sections */
  --card:      #ffffff;

  /* ink / text */
  --ink:       #101019;
  --ink-soft:  #3a3a47;
  --muted:     #6b6b7a;
  --faint:     #9c9caa;
  --on-dark:   #f3f3f7;
  --on-dark-mut:#a6a6b6;

  /* lines */
  --line:      rgba(16,16,25,.09);
  --line-2:    rgba(16,16,25,.16);
  --line-dark: rgba(255,255,255,.12);

  /* brand spectrum */
  --amber:  #FF579B;
  --gold:   #FF579B;
  --coral:  #FF579B;
  --pink:   #FF579B;
  --cyan:   #1DB4FF;
  --azure:  #1DB4FF;
  --lilac:  #9C6AFF;

  --spark:    linear-gradient(135deg, #FF579B 0%, #9C6AFF 50%, #1DB4FF 100%);
  --spectrum: linear-gradient(135deg, #FF579B, #9C6AFF, #1DB4FF);
  --spectrum-soft: linear-gradient(120deg, rgba(255,87,155,.14), rgba(156,106,255,.12), rgba(29,180,255,.14));

  /* radius */
  --r-sm: 12px; --r-md: 18px; --r-lg: 26px; --r-xl: 34px; --r-full: 999px;

  /* layout */
  --container: 1200px;
  --section-py: clamp(80px, 10vw, 140px);
  --banner-height: clamp(40px, 5vw, 52px);

  /* shadow (soft, slightly warm) */
  --shadow-xs: 0 2px 10px rgba(16,16,25,.05);
  --shadow:    0 14px 40px rgba(16,16,25,.08);
  --shadow-lg: 0 30px 80px rgba(16,16,25,.13);
  --shadow-amber: 0 16px 40px rgba(255,87,155,.28);

  --ease: cubic-bezier(.22,.61,.36,1);

  /* Shared dark gradient — final-card, quiz teaser, popups */
  --bg-dark-gradient:
    radial-gradient(ellipse 115% 80% at -4% 50%,   rgba(255,87,155,.44) 0%, transparent 52%),
    radial-gradient(ellipse 95%  80% at 104% 50%,  rgba(29,180,255,.38) 0%, transparent 52%),
    radial-gradient(ellipse 75%  100% at 50% -12%, rgba(156,106,255,.32) 0%, transparent 54%),
    radial-gradient(ellipse 55%  60%  at 50% 115%, rgba(255,87,155,.14) 0%, transparent 50%),
    linear-gradient(145deg, #050610 0%, #080b1e 100%);
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-overflow-scrolling: touch; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
::selection { background: rgba(255,87,155,.22); color: var(--ink); }

/* ---------- Global grain (the "grainy gradient" texture) ---------- */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .06; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Grainy gradient blobs ---------- */
.blob { position: absolute; border-radius: 50%; filter: blur(64px); opacity: .55; z-index: 0; pointer-events: none; }
.blob.amber { background: radial-gradient(circle, var(--amber), transparent 68%); }
.blob.coral { background: radial-gradient(circle, var(--coral), transparent 68%); }
.blob.pink  { background: radial-gradient(circle, var(--pink),  transparent 68%); }
.blob.cyan  { background: radial-gradient(circle, var(--cyan),  transparent 68%); }
.blob.lilac { background: radial-gradient(circle, var(--lilac), transparent 68%); }
.blob.float { animation: blobFloat 16s ease-in-out infinite; }
@keyframes blobFloat { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(4%,5%) scale(1.08)} }
@media (max-width: 768px) {
  @keyframes blobFloat { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(0,5%) scale(1.05)} }
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }
section { padding: var(--section-py) 0; position: relative; }
.sec-tint { background: var(--bg-alt); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); padding: 7px 15px 7px 11px; border-radius: var(--r-full);
  background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow-xs);
}
.eyebrow .spark-ic { width: 15px; height: 15px; }
.dark .eyebrow { background: rgba(255,255,255,.06); border-color: var(--line-dark); color: var(--on-dark); }

h1,h2,h3,h4 { font-family: 'Manrope', sans-serif; font-weight: 800; line-height: 1.06; letter-spacing: -.025em; }
.section-head { max-width: 760px; margin-bottom: 60px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-title { font-size: clamp(32px, 4.6vw, 58px); margin: 22px 0 18px; }
.section-sub { color: var(--muted); font-size: clamp(16px,1.4vw,19px); max-width: 640px; }
.section-head.center .section-sub { margin-inline: auto; }
.dark .section-sub { color: var(--on-dark-mut); }

.grad-text {
  background: var(--spectrum); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.amber-text {
  background: var(--spark); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 600; font-size: 15px; padding: 15px 28px; border-radius: var(--r-full);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s, color .25s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.14); }
.btn-spark { background: var(--spark); color: #fff; box-shadow: 0 10px 28px rgba(255,87,155,.3); }
.btn-ghost { background: var(--bg); color: var(--ink); border: 1px solid var(--line-2); box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.dark .btn-ghost { background: rgba(255,255,255,.05); color: #fff; border-color: var(--line-dark); }
.dark .btn-primary { background: #fff; color: var(--ink); }
.btn-lg { padding: 17px 34px; font-size: 16px; }
/* :hover gated to real hover-capable pointers only — on iOS Safari an
   unconditional :hover on a tappable element with an onclick handler
   requires a first tap to resolve the hover state and a second to fire
   the click, which is what caused course popup buttons to need 2 taps. */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { transform: translateY(-2px) scale(1.03); box-shadow: var(--shadow-amber); }
  .btn-spark:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 16px 40px rgba(255,87,155,.45); }
  .btn-ghost:hover { transform: translateY(-2px) scale(1.03); border-color: var(--ink); box-shadow: 0 6px 20px rgba(0,0,0,.11); }
  .dark .btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); }
}

/* ============================================================
   PROMO BANNER — sticky, above header
   ============================================================ */
.promo-banner {
  position: sticky;
  top: 0;
  z-index: 101; /* header is 100 — banner must sit above it */
  width: 100%;
  height: var(--banner-height);
  overflow: hidden;
  transition: max-height .4s ease, opacity .4s ease;
  max-height: var(--banner-height);
  border-bottom: 1px solid rgba(255,87,155,.2);
}
.promo-banner.hidden { max-height: 0; opacity: 0; pointer-events: none; border-bottom-color: transparent; }

html[data-theme="dark"] .promo-banner { background: var(--spark); color: #ffffff; }
html[data-theme="light"] .promo-banner {
  background: linear-gradient(135deg, rgba(255,87,155,.18) 0%, rgba(156,106,255,.16) 50%, rgba(29,180,255,.18) 100%), var(--bg-alt);
  color: var(--ink);
}

.promo-banner__inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: clamp(6px, 1.5vw, 16px);
  position: relative;
  height: 100%;
  padding: 0 clamp(40px, 6vw, 80px);
}

.promo-banner__text {
  font-size: clamp(11px, 1.3vw, 14px);
  letter-spacing: .03em;
  font-weight: 600;
  opacity: .95;
  white-space: nowrap;
}

.promo-banner__timer { display: flex; align-items: center; justify-content: center; gap: 4px; }
.timer-block { display: inline-flex; align-items: baseline; gap: 2px; }
.timer-num {
  font-size: clamp(13px, 1.5vw, 16px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-family: monospace;
  transition: opacity .25s ease;
}
.timer-num.updating { opacity: 0; }
.timer-num.glow { animation: timerGlow .4s ease-out; }
.timer-label { font-size: clamp(9px, 1vw, 11px); opacity: .75; font-weight: 600; }
.timer-sep { opacity: .4; font-size: clamp(11px, 1.3vw, 14px); padding: 0 2px; }

.promo-banner__close {
  position: absolute;
  right: clamp(8px, 2vw, 24px);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: clamp(12px, 1.4vw, 16px);
  opacity: .6;
  padding: 4px 8px;
  color: inherit;
  line-height: 1;
  transition: opacity .2s ease;
}
.promo-banner__close:hover { opacity: 1; }

@keyframes bannerSlideIn {
  0%   { transform: translateY(-100%); opacity: 0; }
  100% { transform: translateY(0);     opacity: 1; }
}
@keyframes bannerPulse {
  0%   { opacity: 1; }
  50%  { opacity: .8; }
  100% { opacity: 1; }
}
@keyframes timerGlow {
  0%   { text-shadow: none; }
  50%  { text-shadow: 0 0 10px currentColor; }
  100% { text-shadow: none; }
}
.promo-banner:not(.hidden) {
  animation:
    bannerSlideIn .5s cubic-bezier(.22,1,.36,1) forwards,
    bannerPulse 2.8s ease-in-out .5s infinite;
}

@media (max-width: 767px) {
  .promo-banner {
    height: auto;
    min-height: clamp(52px, 12vw, 72px);
    padding: clamp(6px, 2vw, 10px) 0;
  }

  .promo-banner__inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 clamp(36px, 8vw, 56px);
  }

  .promo-banner__text {
    text-align: center;
    white-space: normal;
    line-height: 1.3;
    font-size: clamp(10px, 3vw, 13px);
  }

  .promo-banner__timer { justify-content: center; }

  .timer-num { font-size: clamp(14px, 4vw, 18px); }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .promo-banner__inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 12px;
    padding: clamp(4px, 1vw, 8px) clamp(40px, 6vw, 60px);
  }

  .promo-banner__text {
    text-align: center;
    white-space: normal;
    font-size: clamp(11px, 1.4vw, 13px);
  }
}

/* ============================================================
   HEADER
   ============================================================ */
.header { position: fixed; top: var(--banner-height); left: 0; right: 0; z-index: 100; transition: background .3s, border-color .3s, box-shadow .3s, top .4s ease; border-bottom: 1px solid transparent; }
.header.scrolled { background: rgba(255,255,255,.78); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%); border-bottom: 1px solid var(--line); box-shadow: 0 6px 24px rgba(16,16,25,.05); }
.promo-banner.hidden ~ .header { top: 0; }
/* Mobile/tablet: the transparent pre-scroll header (intentional on desktop,
   where it sits over the hero) left the logo/burger/lang/theme controls
   floating with no shared backdrop at the top of the page — always show the
   scrolled-style backdrop here instead, so it's identical before and after
   scroll. */
@media (max-width: 1024px) {
  .header { background: rgba(255,255,255,.78); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%); border-bottom: 1px solid var(--line); box-shadow: 0 6px 24px rgba(16,16,25,.05); }
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: 'Manrope'; font-weight: 800; font-size: 21px; letter-spacing: -.02em; color: var(--ink); flex-shrink: 0; }
.brand .spark-logo { width: 30px; height: 30px; }
.brand-logo-img { height: 58px; width: auto; display: block; flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a { font-size: 15px; color: var(--ink-soft); padding: 9px 15px; border-radius: var(--r-full); transition: color .2s, background .2s; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); background: rgba(16,16,25,.05); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-dd { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--ink-soft); padding: 8px 12px; border-radius: var(--r-full); border: 1px solid var(--line); transition: border-color .2s, color .2s; }
.lang-btn:hover { color: var(--ink); border-color: var(--line-2); }
.lang-btn .flag { font-size: 16px; line-height: 1; }
.lang-btn svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.lang-dd.open .lang-btn svg { transform: rotate(180deg); }
.lang-dd.open .lang-btn { border-color: var(--line-2); color: var(--ink); }
.lang-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 190px; padding: 6px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .22s var(--ease), transform .22s var(--ease); z-index: 50; }
.lang-dd.open .lang-menu { opacity: 1; transform: none; pointer-events: auto; }
.lang-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; font-weight: 500; color: var(--ink-soft); text-align: left; transition: background .18s, color .18s; }
.lang-menu button:hover { background: var(--bg-alt); color: var(--ink); }
.lang-menu button.active { background: var(--spectrum-soft); color: var(--ink); font-weight: 600; }
.lang-menu .flag { font-size: 18px; line-height: 1; }
.lang-menu .ln { flex: 1; }
.lang-menu .cur { font-family: 'Manrope'; font-weight: 800; color: var(--amber); }
.link-login { font-size: 15px; font-weight: 600; color: var(--ink-soft); padding: 8px 18px; border: 1.5px solid var(--line-2); border-radius: var(--r-full); transition: color .2s, border-color .2s, background .2s; text-align: center; line-height: 1.25; }
.link-login:hover { color: var(--ink); border-color: var(--ink-soft); background: rgba(16,16,25,.05); }
/* Mobile-only login link inside burger menu — hidden on desktop */
.nav-mobile-login { display: none; }
.burger { display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px; border-radius: 12px; align-items: center; justify-content: center; border: 1px solid var(--line); }
.burger span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s; }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding-top: 160px; padding-bottom: 80px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero .blob.amber { width: 460px; height: 460px; top: -120px; left: -120px; opacity: .35; }
.hero .blob.cyan  { width: 420px; height: 420px; top: 10%; right: -100px; opacity: .28; }
.hero .blob.pink  { width: 300px; height: 300px; bottom: -80px; left: 30%; opacity: .22; }

.hero-rotator { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 26px; font-size: 14px; font-weight: 600; color: var(--ink-soft); padding: 8px 16px 8px 12px; border-radius: var(--r-full); background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow-xs); }
.hero-rotator .spark-ic { width: 16px; height: 16px; }
.hero-rotator .rot { color: var(--amber); font-weight: 700; }
.hero h1 { font-size: clamp(44px, 6.2vw, 82px); margin-bottom: 26px; letter-spacing: -.035em; }
.hero-lead { font-size: clamp(16px,1.5vw,19px); color: var(--muted); max-width: 530px; margin-bottom: 38px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 54px; }
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.hero-stats .num { font-family: 'Manrope'; font-size: clamp(30px,3.2vw,40px); font-weight: 800; }
.hero-stats .lbl { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* hero prism visual */
.hero-visual { position: relative; height: 540px; display: grid; place-items: center; overflow: hidden; border-radius: var(--r-xl); }
.prism-stage { position: relative; width: 100%; height: 100%; }
.prism-portrait { position: absolute; inset: 0; border-radius: 0; overflow: hidden; }
.prism-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.prism-rays { position: absolute; inset: -10%; background: conic-gradient(from 200deg at 60% 40%, transparent, rgba(255,87,155,.5), rgba(156,106,255,.45), rgba(29,180,255,.5), rgba(156,106,255,.4), transparent); filter: blur(50px); opacity: .5; z-index: -1; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.float-chip { position: absolute; display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 50px; background: rgba(255,255,255,.86); backdrop-filter: blur(12px); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13px; font-weight: 600; z-index: 3; }
.float-chip .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--spectrum-soft); display: grid; place-items: center; }
.float-chip .spark-ic { width: 17px; height: 17px; }
.float-chip.c1 { top: 6%; left: 16px; animation: bob 7s ease-in-out infinite; }
.float-chip.c2 { bottom: 9%; right: 16px; animation: bob 8s ease-in-out infinite .6s; }
.float-chip .big { font-family: 'Manrope'; font-size: 18px; font-weight: 800; }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

.scroll-hint { display: flex; align-items: center; gap: 10px; margin-top: 56px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.scroll-hint .line { width: 46px; height: 1px; background: linear-gradient(90deg, var(--amber), transparent); }

/* ============================================================
   MARQUEE — trust strip / partners reused
   ============================================================ */

/* ============================================================
   COURSES
   ============================================================ */
.courses-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.course-card { position: relative; padding: 32px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-xs); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s, border-color .35s; min-height: 320px; display: flex; flex-direction: column; }
.course-card:hover { transform: translateY(-6px) scale(1.03); box-shadow: var(--shadow); border-color: var(--line-2); }
.course-card.feature { grid-row: span 2; background: linear-gradient(165deg, rgba(255,87,155,.07), rgba(29,180,255,.05)), var(--card); }
.course-card.feature::after { content: ''; position: absolute; width: 220px; height: 220px; right: -60px; top: -60px; background: radial-gradient(circle, rgba(255,87,155,.3), transparent 70%); filter: blur(30px); }
.course-num { font-family: 'Manrope'; font-size: 14px; font-weight: 800; color: var(--faint); letter-spacing: .08em; position: relative; z-index: 1; }
.course-card h3 { font-size: 22px; margin: 16px 0 12px; position: relative; z-index: 1; }
.course-card.feature h3 { font-size: 28px; }
.course-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; position: relative; z-index: 1; }
.course-tags span { font-size: 12px; font-weight: 600; color: var(--ink-soft); padding: 4px 11px; border-radius: var(--r-full); background: var(--bg-alt); border: 1px solid var(--line); }
.course-tagline { color: var(--ink-soft); font-size: 15px; margin-bottom: 20px; position: relative; z-index: 1; }
.course-detail { position: relative; z-index: 1; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .42s var(--ease), opacity .35s, margin .42s var(--ease); }
.course-card.open .course-detail { opacity: 1; margin-bottom: 4px; }
.course-detail .row:first-child { padding-top: 0; border-top: none; margin-top: 0; }
.course-detail .row { padding-top: 16px; border-top: 1px solid var(--line); margin-top: 16px; }
.course-detail .k { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--amber); margin-bottom: 6px; }
.course-detail .v { font-size: 14px; color: var(--muted); }
.course-icon { width: 54px; height: 54px; border-radius: 15px; background: var(--spectrum-soft); display: grid; place-items: center; color: var(--amber); margin-bottom: 6px; position: relative; z-index: 1; }
.course-icon svg { width: 26px; height: 26px; }
.course-toggle { margin-top: auto; display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; padding-top: 18px; font-size: 14px; font-weight: 600; color: var(--amber); position: relative; z-index: 1; transition: gap .2s; }
.course-toggle:hover { gap: 11px; }
.course-toggle svg { width: 16px; height: 16px; transition: transform .35s var(--ease); }
.course-card.open .course-toggle svg { transform: rotate(180deg); }

/* ============================================================
   SPEED BAND (dark accent)
   ============================================================ */
.speed-band {
  padding: clamp(70px,9vw,120px) 0;
  text-align: center;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(ellipse 90% 150% at 6% 90%,  rgba(255,87,155,.42) 0%, transparent 52%),
    radial-gradient(ellipse 80% 140% at 94% 10%,  rgba(29,180,255,.36) 0%, transparent 52%),
    radial-gradient(ellipse 65% 75%  at 50% 50%,  rgba(156,106,255,.18) 0%, transparent 60%),
    linear-gradient(160deg, #030508 0%, #07091a 55%, #030608 100%);
}
.speed-band .blob { opacity: .65; }
.speed-band .blob.amber { width: 480px; height: 480px; left: 2%; top: -30%; }
.speed-band .blob.cyan  { width: 440px; height: 440px; right: 2%; bottom: -40%; }
.speed-band .label { font-size: 13px; letter-spacing: .28em; text-transform: uppercase; color: var(--on-dark-mut); margin-bottom: 18px; }
.speed-band .big { font-family: 'Manrope'; font-weight: 800; font-size: clamp(46px,15vw,200px); line-height: .9; letter-spacing: -.04em; color: #fff; }
.speed-band .big .num { background: var(--spark); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.speed-band .big .unit { font-size: .26em; color: var(--on-dark-mut); margin-left: 14px; letter-spacing: 0; -webkit-text-fill-color: var(--on-dark-mut); white-space: nowrap; }
.speed-progress { max-width: 620px; margin: 40px auto 0; }
.sp-track { height: 8px; border-radius: var(--r-full); background: rgba(255,255,255,.1); overflow: hidden; position: relative; }
.sp-fill { height: 100%; width: 0; border-radius: var(--r-full); background: var(--spark); position: relative; transition: width 2.2s var(--ease); box-shadow: 0 0 18px rgba(255,87,155,.6); }
.sp-dot { position: absolute; right: -4px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 14px #9C6AFF, 0 0 6px #fff; }
.sp-meta { display: flex; justify-content: space-between; margin-top: 14px; font-size: 13px; color: var(--on-dark-mut); }
.sp-meta .sp-pct { font-family: 'Manrope'; font-weight: 800; background: var(--spark); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-gen-row { display: flex; gap: 14px; margin-top: 14px; }
.about-gen-row .gen-img-wrap { flex: 1; }
.about-text p { color: var(--muted); margin-bottom: 18px; font-size: 16px; }
.about-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.stats-card { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stats-card .cell { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 32px 28px; border-radius: var(--r-lg); position: relative; overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s; }
.card-star-bg {
  position: absolute;
  bottom: -10px; right: -10px;
  width: clamp(80px, 11vw, 120px);
  height: clamp(80px, 11vw, 120px);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: .2;
  filter: blur(8px);
  transform: rotate(225deg);
  z-index: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.stats-card .cell:nth-child(1) .card-star-bg { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5c1 6.2 4.3 9.5 10.5 10.5C16.3 13 13 16.3 12 22.5 11 16.3 7.7 13 1.5 12 7.7 11 11 7.7 12 1.5Z' fill='%23FF579B'/%3E%3C/svg%3E"); }
.stats-card .cell:nth-child(2) .card-star-bg { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5c1 6.2 4.3 9.5 10.5 10.5C16.3 13 13 16.3 12 22.5 11 16.3 7.7 13 1.5 12 7.7 11 11 7.7 12 1.5Z' fill='%231DB4FF'/%3E%3C/svg%3E"); }
.stats-card .cell:nth-child(3) .card-star-bg { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5c1 6.2 4.3 9.5 10.5 10.5C16.3 13 13 16.3 12 22.5 11 16.3 7.7 13 1.5 12 7.7 11 11 7.7 12 1.5Z' fill='%23FF579B'/%3E%3C/svg%3E"); }
.stats-card .cell:nth-child(4) .card-star-bg { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5c1 6.2 4.3 9.5 10.5 10.5C16.3 13 13 16.3 12 22.5 11 16.3 7.7 13 1.5 12 7.7 11 11 7.7 12 1.5Z' fill='%239C6AFF'/%3E%3C/svg%3E"); }
.stats-card .num { font-family: 'Manrope'; font-size: clamp(28px,3.8vw,48px); font-weight: 800; position: relative; white-space: nowrap; }
.stats-card .lbl { color: var(--muted); font-size: 14px; margin-top: 6px; position: relative; }
.stats-card .cell:nth-child(1) { --ec: 255,87,155; }
.stats-card .cell:nth-child(2) { --ec: 29,180,255; }
.stats-card .cell:nth-child(3) { --ec: 255,87,155; }
.stats-card .cell:nth-child(4) { --ec: 156,106,255; }
@media (hover: hover) and (pointer: fine) {
  .stats-card .cell:hover {
    box-shadow:
      0 0 0 1px rgba(var(--ec),.45),
      0 0 60px rgba(var(--ec),.22),
      0 28px 80px rgba(0,0,0,.45);
  }
  .stats-card .cell:hover .card-star-bg { opacity: .32; }
}

/* ============================================================
   WHY / BENTO
   ============================================================ */
.bento { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.bento .cell { padding: 28px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-xs); transition: transform .3s var(--ease), box-shadow .3s; }
.bento .cell:hover { transform: translateY(-5px) scale(1.03); box-shadow: var(--shadow); }
.bento .cell .ic { width: 48px; height: 48px; border-radius: 13px; background: var(--spectrum-soft); display: grid; place-items: center; color: var(--amber); margin-bottom: 18px; }
.bento .cell .ic svg { width: 24px; height: 24px; }
.bento .cell h4 { font-size: 18px; margin-bottom: 10px; }
.bento .cell p { font-size: 14px; color: var(--muted); }
.bento .wide { grid-column: span 2; }
.bento .tall { grid-row: span 2; background: linear-gradient(165deg, rgba(255,87,155,.08), rgba(29,180,255,.06)), var(--card); position: relative; overflow: hidden; }
.bento .tall::after { content: ''; position: absolute; width: 200px; height: 200px; left: -50px; bottom: -60px; background: radial-gradient(circle, rgba(156,106,255,.25), transparent 70%); filter: blur(20px); }
.bento .feat-num { font-family: 'Manrope'; font-size: 12px; font-weight: 800; color: var(--faint); letter-spacing: .1em; position: relative; z-index: 1; }
.bento .tall h4, .bento .tall p, .bento .tall .ic { position: relative; z-index: 1; }

/* ============================================================
   WHY — accordion
   ============================================================ */
.why-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: start; }
.why-intro { position: sticky; top: 110px; }
.why-acc { display: flex; flex-direction: column; gap: 12px; }
.acc-item { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow-xs); overflow: hidden; transition: border-color .3s, box-shadow .3s; }
.acc-item.open { border-color: var(--line-2); box-shadow: var(--shadow); }
/* Header and body share one grid template (number column | text column |
   icon column) so the answer text is always pinned to the same left edge as
   the question text — not approximated with an independent padding value
   that has to be kept in sync by hand. */
.acc-head, .acc-row { display: grid; grid-template-columns: 22px 1fr 22px; align-items: center; column-gap: 18px; width: 100%; padding: 22px 24px; text-align: left; }
.acc-n { font-family: 'Manrope'; font-weight: 800; font-size: 14px; color: var(--faint); letter-spacing: .06em; transition: color .3s; }
.acc-item.open .acc-n { background: var(--spark); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.acc-t { font-family: 'Manrope'; font-weight: 700; font-size: clamp(16px,1.5vw,19px); color: var(--ink); line-height: 1.3; }
.acc-ic { position: relative; width: 22px; height: 22px; }
.acc-ic::before, .acc-ic::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: var(--amber); border-radius: 2px; transition: transform .3s var(--ease); }
.acc-ic::before { width: 14px; height: 2px; }
.acc-ic::after { width: 2px; height: 14px; }
.acc-item.open .acc-ic::after { transform: translate(-50%,-50%) rotate(90deg); opacity: 0; }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.acc-body .acc-row { padding: 0 24px 24px; }
.acc-body p { grid-column: 2; color: var(--muted); font-size: 15px; margin: 0; }
.acc-item-amber { border-color: var(--amber); background: rgba(255,87,155,.04); }
.acc-item-amber.open { border-color: var(--amber); box-shadow: 0 8px 32px rgba(255,87,155,.18); }
.acc-item-amber .acc-n { color: var(--amber); }
.acc-item-amber.open .acc-n { background: none; -webkit-background-clip: unset; background-clip: unset; -webkit-text-fill-color: var(--amber); }
.acc-item-amber .acc-t { color: var(--amber); }

/* ============================================================
   PRICING
   ============================================================ */
.cur-switch { display: inline-flex; gap: 4px; padding: 5px; border-radius: var(--r-full); background: var(--bg-alt); border: 1px solid var(--line); margin-top: 28px; }
.sec-tint .cur-switch { background: var(--bg); }
.cur-switch button { font-size: 14px; font-weight: 600; color: var(--muted); padding: 9px 18px; border-radius: var(--r-full); transition: color .2s, background .2s, box-shadow .2s; }
.cur-switch button.active { color: var(--ink); background: var(--card); box-shadow: var(--shadow-xs); }
.cur-switch button:hover:not(.active) { color: var(--ink); }
.tier .price { transition: opacity .2s; }
.pricing { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; align-items: start; }
.tier { position: relative; padding: 36px 30px; border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s; }
.tier:hover { transform: translateY(-6px) scale(1.03); box-shadow: var(--shadow); }
.tier.popular { border: 1px solid transparent; background: linear-gradient(var(--card),var(--card)) padding-box, var(--spectrum) border-box; box-shadow: var(--shadow-lg); }
.tier .badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 6px 16px; border-radius: var(--r-full); background: var(--spark); color: #fff; }
.tier .badge.dark { background: var(--ink); color: #fff; }
.tier .tier-name { font-family: 'Manrope'; font-weight: 800; font-size: 21px; margin-bottom: 6px; }
.tier .tier-meta { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.tier .price { font-family: 'Manrope'; font-weight: 800; font-size: clamp(26px,3vw,34px); margin-bottom: 4px; }
.tier .price-sub { font-size: 13px; color: var(--muted); margin-bottom: 24px; line-height: 1.5; }
.tier ul { display: flex; flex-direction: column; gap: 13px; margin-bottom: 28px; }
.tier li { display: flex; gap: 11px; font-size: 14px; color: var(--ink-soft); }
.tier li svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--amber); margin-top: 2px; }
.tier .tier-foot { margin-top: auto; }
.tier .tier-foot .btn { width: 100%; }
.tier .install { text-align: center; font-size: 12px; color: var(--faint); margin-top: 12px; }

/* ============================================================
   COMMUNITY — circular orbit of faces
   ============================================================ */
#community {
  overflow: hidden;
  background: var(--bg-dark-gradient);
  color: #fff;
}
#community .section-title { color: #fff; }
#community .section-sub { color: rgba(255,255,255,.78); }
#community .community-hint { color: rgba(255,255,255,.55) !important; }
#community .eyebrow { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: rgba(255,255,255,.85); }
#community .btn-primary { background: #fff; color: #101019; }
#community .btn-primary:hover { background: rgba(255,255,255,.9); }
.community-orbit { position: relative; width: min(680px, 92vw); aspect-ratio: 1; margin: 0 auto; }
.community-orbit .ring { position: absolute; inset: 0; border: 1px dashed rgba(255,255,255,.18); border-radius: 50%; }
.community-orbit .ring.r2 { inset: 16%; }
.community-orbit .ring.r3 { inset: 32%; }
.orbit-face { position: absolute; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; border: 3px solid #fff; box-shadow: var(--shadow); top: 50%; left: 50%; transition: transform .3s; }
.orbit-face img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.orbit-face:hover { transform: translate(-50%,-50%) scale(1.18) !important; z-index: 5; }
.community-core { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 40%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15); box-shadow: inset 0 1px 0 rgba(255,255,255,.1); backdrop-filter: blur(18px) saturate(140%); padding: 20px; }
.community-core .spark-logo { width: 40px; height: 40px; margin: 0 auto 12px; }
.community-core .n { font-family: 'Manrope'; font-weight: 800; font-size: clamp(26px,3.6vw,40px); color: #fff; }
.community-core .t { font-size: 13px; color: rgba(255,255,255,.65); }
.community-side .section-title { margin-bottom: 18px; }
.community-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }

/* ============================================================
   AMBASSADORS
   ============================================================ */
.amb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 44px 0; }
.amb-card { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); min-height: 400px; box-shadow: var(--shadow); }
.amb-card img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: transform .5s; }
.amb-card:hover img { transform: scale(1.04); }
.amb-card { cursor: pointer; }
.amb-card .meta { position: absolute; inset: auto 0 0 0; padding: 26px; background: linear-gradient(0deg, rgba(10,10,16,.94) 6%, rgba(10,10,16,.55) 55%, transparent); z-index: 2; color: #fff; }
.amb-card .meta h4 { font-size: 23px; margin-bottom: 4px; }
.amb-card .meta .role { color: var(--gold); font-size: 14px; font-weight: 600; }
.amb-stat { display: inline-block; font-size: 12px; font-weight: 600; color: #fff; padding: 5px 12px; border-radius: var(--r-full); background: rgba(255,255,255,.14); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.2); margin-bottom: 14px; }
.amb-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; gap: 12px; }
.amb-badge { font-family: 'Manrope'; font-weight: 800; font-size: 12px; letter-spacing: .1em; color: rgba(255,255,255,.85); padding: 5px 12px; border: 1px solid rgba(255,255,255,.25); border-radius: 7px; }
.amb-card .meta .more { color: rgba(255,255,255,.7); font-size: 13px; transition: color .2s; }
.amb-card:hover .meta .more { color: var(--gold); }
.amb-detail { position: absolute; inset: 0; z-index: 3; padding: 28px; display: flex; align-items: flex-end; color: #fff; background: linear-gradient(0deg, rgba(8,8,14,.97), rgba(8,8,14,.72)); backdrop-filter: blur(3px); opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .4s var(--ease), transform .4s var(--ease); }
.amb-card.open .amb-detail { opacity: 1; transform: none; pointer-events: auto; }
.amb-detail p { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,.92); }
.amb-detail b { color: var(--gold); }
.amb-role-head { margin: 50px 0 22px; }
.amb-role-head h3 { font-size: clamp(20px,2.4vw,26px); }
.amb-note { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.amb-note .item { padding: 24px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-xs); font-size: 14px; color: var(--ink-soft); }
.amb-note .item .ic { width: 40px; height: 40px; border-radius: 11px; background: var(--spectrum-soft); display: grid; place-items: center; color: var(--amber); margin-bottom: 14px; }
.amb-note .item .ic svg { width: 20px; height: 20px; }
.amb-note .item h4 { font-family: 'Manrope'; font-size: 16px; margin-bottom: 6px; }

/* ============================================================
   EXPERT SHOWCASE — portrait cards with 3D hover
   ============================================================ */

/* Grid */
.expert-showcase {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 48px 0;
}

/* Card base */
.expert-card {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  min-height: 640px;
  cursor: pointer;
  touch-action: manipulation; /* iOS: fire click on tap without 300ms delay */
  transition: box-shadow .45s cubic-bezier(.22,.61,.36,1);
  will-change: transform, box-shadow;
  outline: none;
}
/* After reveal animation completes, JS owns transform — kill CSS transition override from .reveal */
.expert-card.in { transition: box-shadow .45s cubic-bezier(.22,.61,.36,1); }
.expert-card:focus-visible { outline: 2px solid rgba(156,106,255,.6); outline-offset: 3px; }

/* Per-expert accent RGB */
.expert-card[data-expert="1"] { --ec: 255,87,155; }
.expert-card[data-expert="2"] { --ec: 156,106,255; }
.expert-card[data-expert="3"] { --ec: 29,180,255; }
.expert-card[data-expert="4"] { --ec: 255,87,155; }

/* Per-expert photo position — face at card top, ~20px breathing room */
.expert-card[data-expert="1"] .expert-photo img { object-position: center 36%; }
.expert-card[data-expert="2"] .expert-photo img { object-position: center 46%; }
.expert-card[data-expert="3"] .expert-photo img { object-position: center 40%; }
.expert-card[data-expert="4"] .expert-photo img { object-position: center 36%; }

/* Top accent line */
.expert-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #FF579B 0%, #9C6AFF 50%, #1DB4FF 100%);
  z-index: 6;
  opacity: 0;
  transform: scaleX(.4);
  transform-origin: left;
  transition: opacity .4s ease, transform .5s cubic-bezier(.22,.61,.36,1);
}

/* Photo layer */
.expert-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.expert-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .7s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}

/* Gradient overlay — always on, name/label readable at bottom */
.expert-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg,
      rgba(6,8,20,.96) 0%,
      rgba(6,8,20,.68) 26%,
      rgba(6,8,20,.14) 50%,
      transparent 70%),
    linear-gradient(160deg,
      rgba(var(--ec),.15) 0%,
      transparent 42%);
}

/* Hover effects — ONLY on real pointer/mouse devices, not on touch */
@media (hover: hover) and (pointer: fine) {
  .expert-card:hover {
    box-shadow:
      0 0 0 1px rgba(var(--ec),.45),
      0 0 60px rgba(var(--ec),.22),
      0 28px 80px rgba(0,0,0,.45);
  }
  .expert-card:hover::before { opacity: 1; transform: scaleX(1); }
  .expert-card:hover .expert-photo img { transform: scale(1.07); }
  .expert-card:hover .expert-photo::after {
    background:
      linear-gradient(0deg,
        rgba(6,8,20,.99) 0%,
        rgba(6,8,20,.82) 35%,
        rgba(6,8,20,.28) 58%,
        transparent 76%),
      linear-gradient(160deg,
        rgba(var(--ec),.28) 0%,
        transparent 45%);
  }
}

/* Content overlay */
.expert-content {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Label — always visible, accented color per expert */
.expert-label {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgb(var(--ec));
  margin-bottom: 10px;
  opacity: 1;
}

/* Name */
.expert-card-name {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin: 0;
}

/* Bio + CTA — card-only elements hidden; full info lives in popup */
.expert-card-bio,
.expert-cta { display: none; }

/* ── Expert Popup — same layout on all devices ─────────────────── */
/* double-class 0,2,0 beats .popup-modal 0,1,0 */
.popup-modal.expert-popup-modal {
  max-width: 760px;
  padding: 0;
}
.epm-layout {
  display: flex;
  min-height: 460px;
}

/* Photo column */
.epm-photo {
  width: 300px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: var(--card);
}
.epm-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}
/* Right-edge fade — light theme: subtle (starts at 72%); dark theme overrides to 52% */
.epm-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 85%, var(--card) 100%);
  pointer-events: none;
}

/* Text column */
.epm-body {
  flex: 1;
  min-width: 0;
  padding: 40px 36px 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
  background: var(--card);
}
.epm-accent {
  width: 40px; height: 3px;
  background: linear-gradient(90deg, #FF579B, #9C6AFF, #1DB4FF);
  border-radius: 2px; margin-bottom: 18px;
}
.epm-name {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(20px, 2.8vw, 28px);
  font-weight: 800; color: var(--ink);
  line-height: 1.15; margin-bottom: 6px;
}
.epm-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 16px;
}
.epm-bio {
  font-size: 14px; line-height: 1.72; color: var(--ink-soft);
}

/* ── Responsive: expert section grid + popup ────────────────────── */
@media (max-width: 1024px) {
  .expert-showcase { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .expert-card { min-height: 540px; }
  .expert-card[data-expert="1"] .expert-photo img { object-position: center 25%; }
  .expert-card[data-expert="2"] .expert-photo img { object-position: center 31%; }
  .expert-card[data-expert="3"] .expert-photo img { object-position: center 27%; }
  .expert-card[data-expert="4"] .expert-photo img { object-position: center 25%; }
  /* Popup on tablet — same horizontal layout, photo slightly narrower */
  .expert-popup-modal { max-width: 680px; }
  .epm-photo { width: 240px; }
  .epm-body { padding: 32px 28px; }
}

@media (max-width: 640px) {
  .expert-showcase { grid-template-columns: 1fr; gap: 14px; }
  .expert-card { min-height: 440px; }
  .expert-card[data-expert="1"] .expert-photo img { object-position: center 19%; }
  .expert-card[data-expert="2"] .expert-photo img { object-position: center 23%; }
  .expert-card[data-expert="3"] .expert-photo img { object-position: center 20%; }
  .expert-card[data-expert="4"] .expert-photo img { object-position: center 19%; }
}

/* Popup on small phones — constrained height, inner scroll, always-visible close btn */
@media (max-width: 540px) {
  .popup-modal.expert-popup-modal {
    max-width: 100%;
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
  }
  .expert-popup-modal .popup-close-btn {
    position: absolute;
    top: 8px; right: 8px;
    z-index: 20;
    background: var(--bg-alt);
    border: 1px solid var(--line);
    backdrop-filter: blur(4px);
  }
  .expert-popup-modal .epm-layout {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    flex-direction: row;
    min-height: 320px;
  }
  .epm-photo { width: 160px; flex-shrink: 0; }
  .epm-photo img { object-position: center 15%; }
  .epm-body { padding: 20px 40px 20px 14px; overflow-y: auto; }
  .epm-name { font-size: 18px; }
  .epm-bio { font-size: 13px; }
}

/* Extra-small phones (320–375px) */
@media (max-width: 375px) {
  .expert-popup-modal .epm-layout { min-height: 260px; }
  .epm-photo { width: 120px; }
  .epm-body { padding: 16px 36px 16px 10px; }
  .epm-name { font-size: 16px; }
  .epm-label { font-size: 10px; }
  .epm-bio { font-size: 12px; line-height: 1.6; }
}


/* ============================================================
   STEPS
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.step { position: relative; padding: 30px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-xs); transition: transform .3s, box-shadow .3s; }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step .n { font-family: 'Manrope'; font-weight: 800; font-size: 42px; line-height: 1; margin-bottom: 16px; background: var(--spark); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.step p { font-size: 15px; color: var(--ink-soft); }

/* ============================================================
   AI ASSISTANT "Спарки" — Soul-style glowing being (dark section)
   ============================================================ */
.assist { background: var(--bg-dark-gradient); overflow: hidden; }
.assist .blob.lilac { width: 420px; height: 420px; left: -10%; top: 10%; opacity: .35; }
.assist .blob.cyan { width: 360px; height: 360px; right: -8%; bottom: 0; opacity: .3; }
.assist-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 60px; align-items: center; }
.spark-stage { position: relative; display: grid; place-items: center; min-height: 420px; }
.soul-orb { width: 220px; height: 220px; border-radius: 50%; position: relative; background: radial-gradient(circle at 38% 32%, #e8d4ff, #b088ff 35%, #9C6AFF 65%, #1DB4FF 100%); box-shadow: 0 0 90px rgba(156,106,255,.6), inset 0 0 60px rgba(255,255,255,.5); animation: soulFloat 6s ease-in-out infinite; }
.soul-orb::before { content: ''; position: absolute; inset: -30px; border-radius: 50%; background: radial-gradient(circle, rgba(29,180,255,.35), transparent 70%); filter: blur(20px); animation: pulse 4s ease-in-out infinite; }
.soul-orb .eye { position: absolute; top: 42%; width: 14px; height: 22px; background: rgba(20,20,40,.55); border-radius: 50%; }
.soul-orb .eye.l { left: 36%; } .soul-orb .eye.r { right: 36%; }
.soul-spark { position: absolute; width: 26px; height: 26px; animation: twinkle 3s ease-in-out infinite; }
.soul-spark.s1 { top: 8%; right: 18%; } .soul-spark.s2 { bottom: 14%; left: 12%; animation-delay: 1s; } .soul-spark.s3 { top: 30%; left: 4%; animation-delay: 1.8s; width: 18px; height: 18px; }
@keyframes soulFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-16px)} }
@keyframes pulse { 0%,100%{opacity:.5; transform:scale(1)} 50%{opacity:.9; transform:scale(1.12)} }
@keyframes twinkle { 0%,100%{opacity:.3; transform:scale(.8) rotate(0)} 50%{opacity:1; transform:scale(1.1) rotate(20deg)} }
.assist .eyebrow, .assist .section-title { color: #fff; }
.assist .section-title { color: #fff; }
.chat { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; max-width: 440px; }
.bubble { padding: 13px 17px; border-radius: 16px; font-size: 14px; line-height: 1.5; max-width: 88%; }
.bubble.them { background: rgba(255,255,255,.08); border: 1px solid var(--line-dark); color: var(--on-dark); border-bottom-left-radius: 5px; }
.bubble.me { margin-left: auto; background: linear-gradient(135deg, #9C6AFF, #1DB4FF); color: #fff; border-bottom-right-radius: 5px; font-weight: 500; }
.assist-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0; }
.assist-feats .f { padding: 20px; border-radius: var(--r-md); background: rgba(255,255,255,.04); border: 1px solid var(--line-dark); }
.assist-feats .f .ic { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, rgba(156,106,255,.25), rgba(29,180,255,.2)); display: grid; place-items: center; color: #C4A8FF; margin-bottom: 14px; }
.assist-feats .f .ic svg { width: 21px; height: 21px; }
.assist-feats .f h4 { font-size: 16px; margin-bottom: 7px; color: #fff; }
.assist-feats .f p { font-size: 13px; color: var(--on-dark-mut); }

/* ============================================================
   PARTNERS
   ============================================================ */
.partners-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 16px; }
.partner { aspect-ratio: 16/9; display: grid; place-items: center; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-xs); padding: 22px; transition: transform .3s, box-shadow .3s; }
.partner:hover { transform: translateY(-3px) scale(1.03); box-shadow: var(--shadow); }
.partner img { max-height: 46px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .55; transition: .3s; }
.partner:hover img { filter: grayscale(0); opacity: 1; }

/* ============================================================
   CARE / CONTACT
   ============================================================ */
.care-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.care-channels { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.care-channel { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-xs); transition: border-color .3s, transform .3s; }
.care-channel:hover { border-color: var(--amber); transform: translateX(4px); }
.care-channel .ic { width: 46px; height: 46px; border-radius: 13px; background: var(--spectrum-soft); display: grid; place-items: center; color: var(--amber); flex-shrink: 0; }
.care-channel .ic svg { width: 22px; height: 22px; }
.care-channel .t { font-size: 12px; color: var(--muted); }
.care-channel .v { font-weight: 600; }
.care-form { padding: 36px; border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.care-form .field { margin-bottom: 16px; }
.care-form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.care-form input, .care-form textarea { width: 100%; padding: 13px 16px; border-radius: var(--r-md); background: var(--bg-alt); border: 1px solid var(--line); color: var(--ink); font: inherit; transition: border-color .2s, background .2s; }
.care-form input:focus, .care-form textarea:focus { outline: none; border-color: var(--amber); background: #fff; }
.care-form textarea { resize: vertical; min-height: 96px; }
.care-form .btn { width: 100%; }

/* ============================================================
   FINAL CTA (dark)
   ============================================================ */
.final { background: var(--bg); }
.final-card {
  position: relative; z-index: 1;
  padding: clamp(56px,8vw,96px) 32px;
  border-radius: var(--r-xl);
  overflow: hidden;
  text-align: center;
  color: #fff;
  background: var(--bg-dark-gradient);
}
.final-card .blob.amber { width: 460px; height: 460px; left: 4%;  top: -25%;    opacity: .55; }
.final-card .blob.pink  { width: 400px; height: 400px; right: 4%; bottom: -35%; opacity: .45; }
.final-card .blob.cyan  { width: 380px; height: 380px; left: 38%; bottom: -45%; opacity: .40; }
.final-card > .container, .final-card > * { position: relative; z-index: 2; }
.final-card .eyebrow { background: rgba(255,255,255,.08); border-color: var(--line-dark); color: #fff; }
.final h2 { font-size: clamp(36px,5.2vw,64px); margin: 20px 0 28px; color: #fff; }
.final .chain { display: flex; flex-direction: column; gap: 6px; max-width: 560px; margin: 0 auto 40px; color: var(--on-dark-mut); font-size: clamp(15px,1.6vw,18px); }
.final .chain b { color: #fff; }
.final .chain .hl { color: var(--gold); }
.final .final-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding: 72px 0 40px; background: var(--bg-alt); }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid var(--line); }
.footer .brand { margin-bottom: 18px; }
.footer-about p { color: var(--muted); font-size: 14px; max-width: 300px; }
.footer-col h5 { font-family: 'Manrope'; font-size: 14px; font-weight: 700; margin-bottom: 18px; }
.footer-col a { display: block; color: var(--muted); font-size: 14px; margin-bottom: 11px; transition: color .2s; }
.footer-col a:hover { color: var(--amber); }
.footer-bot { display: flex; justify-content: space-between; align-items: center; padding-top: 30px; gap: 16px; flex-wrap: wrap; }
.footer-bot .copy { color: var(--faint); font-size: 13px; }
.footer-bot .links { display: flex; gap: 24px; }
.footer-bot .links a { color: var(--muted); font-size: 13px; }
.footer-bot .links a:hover { color: var(--ink); }

/* ============================================================
   REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }

/* ============================================================
   AI TEST SECTION
   ============================================================ */
.ai-test-section {
  background: var(--bg-dark-gradient);
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: clamp(40px,6vw,80px) 0;
  color: #fff;
}
.ai-test-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.ai-test-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); background: rgba(255,87,155,.15); border: 1px solid rgba(255,87,155,.35); padding: 7px 16px 7px 12px; border-radius: var(--r-full); margin-bottom: 20px; }
.ai-test-badge .spark-ic { width: 15px; height: 15px; }
.ai-test-title { font-family: 'Manrope'; font-size: clamp(26px,3.6vw,42px); font-weight: 800; color: #fff; margin-bottom: 10px; letter-spacing: -.025em; }
.ai-test-sub { font-family: 'Manrope'; font-weight: 700; font-size: clamp(15px,1.5vw,18px); color: var(--amber); margin: 0 auto 20px; letter-spacing: -.01em; }
.ai-test-text { color: rgba(255,255,255,.72); font-size: clamp(15px,1.4vw,17px); line-height: 1.7; max-width: 600px; margin: 0 auto 32px; }
.ai-test-btn { font-size: 17px; padding: 18px 40px; }

/* ============================================================
   COURSE HOVER PANEL — centered popup (desktop)
   ============================================================ */
.chp-panel {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: 9500;
  width: min(640px, calc(100vw - 32px));
  max-height: min(82vh, 720px);
  max-height: min(82svh, 720px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: 0 24px 80px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.chp-panel.chp-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.chp-bar { height: 5px; flex-shrink: 0; }

.chp-close-btn {
  position: absolute; top: 14px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-alt); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--muted);
  cursor: pointer; transition: background .2s, color .2s; z-index: 10;
}
.chp-close-btn:hover { background: rgba(255,64,56,.12); color: #ff4038; }

.chp-hdr {
  padding: 20px 26px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.chp-hdr-num {
  font-family: 'Manrope'; font-size: 11px; font-weight: 800;
  letter-spacing: .12em; color: var(--faint); margin-bottom: 6px;
}
.chp-hdr-title {
  font-family: 'Manrope'; font-size: 18px; font-weight: 800;
  color: var(--ink); line-height: 1.25; margin-bottom: 10px;
}
.chp-hdr-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.chp-hdr-tags span {
  font-size: 11px; font-weight: 600; color: var(--amber);
  padding: 3px 10px; border-radius: var(--r-full);
  background: rgba(255,87,155,.1); border: 1px solid rgba(255,87,155,.22);
}

.chp-inner {
  padding: 20px 26px 24px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.08) transparent;
}
.chp-section { margin-bottom: 18px; }
.chp-section-label {
  font-family: 'Manrope'; font-size: 10px; font-weight: 800;
  letter-spacing: .12em; color: var(--faint); text-transform: uppercase;
  margin-bottom: 9px;
}
.chp-modules { display: flex; flex-direction: column; gap: 6px; }
.chp-module {
  padding: 9px 14px; border-radius: var(--r-md);
  background: var(--bg-alt); border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-soft); line-height: 1.45;
  display: flex; gap: 8px; align-items: flex-start;
}
.chp-module::before { content: '→'; color: var(--amber); font-weight: 700; flex-shrink: 0; }

.chp-model-badge {
  display: inline-block; font-size: 13px; font-weight: 600;
  padding: 7px 16px; border-radius: var(--r-full);
  background: linear-gradient(135deg, rgba(156,106,255,.15), rgba(29,180,255,.12));
  border: 1px solid rgba(156,106,255,.3); color: var(--ink);
}

.chp-expert-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: var(--r-lg);
  background: var(--bg-alt); border: 1px solid var(--line);
}
.chp-expert-photo {
  width: 48px; height: 48px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--line);
  background: var(--bg-alt);
}
.chp-expert-name { font-weight: 700; font-size: 14px; color: var(--ink); margin-bottom: 3px; }
.chp-expert-role { font-size: 12px; color: var(--muted); line-height: 1.4; }

.chp-pkgs { display: flex; justify-content: center; align-items: stretch; flex-wrap: wrap; gap: 10px; }
.chp-pkg {
  flex: 1; padding: 14px 12px 12px; border-radius: var(--r-md);
  background: var(--bg-alt); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0; text-align: center;
  position: relative;
}
.chp-pkg-popular {
  border-color: transparent;
  background: linear-gradient(var(--bg-alt), var(--bg-alt)) padding-box,
              var(--spectrum) border-box;
}
.chp-pkg-vip { background: rgba(255,255,255,.05); border-color: rgba(255,200,0,.25); }
.chp-pkg-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 10px; border-radius: var(--r-full); white-space: nowrap;
}
.chp-pkg-badge-pop { background: var(--spark); color: #fff; }
.chp-pkg-badge-vip { background: var(--ink); color: #fff; }
.chp-pkg-name { font-size: 10px; font-weight: 800; color: var(--faint); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 5px; }
.chp-pkg-price { font-size: 13px; font-weight: 800; color: var(--amber); font-family: 'Manrope'; margin-bottom: 10px; }
.chp-pkg-feats { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.chp-pkg-feats li { font-size: 10px; color: var(--ink-soft); padding-left: 13px; position: relative; text-align: left; line-height: 1.35; }
.chp-pkg-feats li::before { content: '✓'; position: absolute; left: 0; color: var(--amber); font-weight: 700; }
.chp-pkg-btn {
  display: block;
  background: var(--amber); color: #fff; border-radius: 6px;
  font-size: 11px; font-weight: 800; padding: 6px 8px;
  text-decoration: none; transition: opacity .15s; margin-top: auto;
}
.chp-pkg-btn:hover { opacity: .85; color: #fff; }

/* ============================================================
   CHOOSE PATH (new pricing)
   ============================================================ */
.path-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; align-items: stretch; }
.path-card { position: relative; height: 100%; padding: 36px 30px; border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-xs); display: flex; flex-direction: column; gap: 0; transition: transform .3s var(--ease), box-shadow .3s; }
.path-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.path-card-popular { border: 1px solid transparent; background: linear-gradient(var(--card),var(--card)) padding-box, var(--spectrum) border-box; box-shadow: var(--shadow-lg); }
/* Left ("AI-интенсив") and right ("AI-трансформация") cards: push the CTA
   button to the bottom so it lines up across cards of unequal content
   length. Popular card intentionally excluded — left untouched. */
.path-card:not(.path-card-popular) > .btn { margin-top: auto; }
.path-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 6px 16px; border-radius: var(--r-full); background: var(--spark); color: #fff; white-space: nowrap; }
.path-badge-dark { background: var(--ink); color: #fff; }
.path-card-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.path-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--spectrum-soft); display: grid; place-items: center; color: var(--amber); flex-shrink: 0; }
.path-ic svg { width: 22px; height: 22px; }
.path-name { font-family: 'Manrope'; font-weight: 800; font-size: 18px; }
.path-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.path-desc { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.path-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.path-price { font-family: 'Manrope'; font-weight: 800; font-size: clamp(22px,2.8vw,28px); }
.path-price-premium { background: var(--spark); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.path-price-note { font-size: 12px; color: var(--faint); }
.path-list { display: flex; flex-direction: column; gap: 11px; margin-bottom: 28px; flex: 1; }
.path-list li { display: flex; gap: 10px; font-size: 14px; color: var(--ink-soft); }
.path-list li svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--amber); margin-top: 3px; }

/* ============================================================
   COMMUNITY — orbit rotation + popup
   ============================================================ */
.community-orbit { position: relative; width: min(640px, 90vw); aspect-ratio: 1; margin: 0 auto; }
.community-orbit .ring.r2 { inset: 17%; }
.community-orbit .ring.r3 { inset: 33%; }

.orbit-face {
  position: absolute;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: var(--shadow);
  top: 50%; left: 50%;
  cursor: pointer;
  transition: transform .3s, box-shadow .3s, z-index 0s;
}
.orbit-face img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.orbit-face:hover { box-shadow: 0 8px 24px rgba(0,237,195,.35), var(--shadow); z-index: 5; }

.community-core { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 38%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center; background: transparent; border: 1px solid var(--line); box-shadow: var(--shadow-xs); backdrop-filter: blur(8px); padding: 16px; }
.community-core .spark-logo { width: 36px; height: 36px; margin: 0 auto 10px; }
.community-core .n { font-family: 'Manrope'; font-weight: 800; font-size: clamp(22px,3vw,36px); color: #ffffff !important; }
.community-core .t { font-size: 12px; color: #ffffff !important; }
.community-side .section-title { margin-bottom: 18px; }
.community-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }

/* Override old orbit hover from old CSS section */
.orbit-face:hover { transform: translate(-50%,-50%) scale(1.12) !important; box-shadow: 0 8px 24px rgba(0,237,195,.35), var(--shadow); z-index: 5; }

/* Community popup */
.community-popup-modal { max-width: 360px; text-align: center; padding: 36px 28px 32px; }
.comm-popup-avatar {
  width: 160px; height: 160px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 20px;
  border: 3px solid rgba(255,87,155,.5);
  box-shadow: 0 0 32px rgba(156,106,255,.3);
  background: #171611;
}
.comm-popup-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}
.comm-popup-name { font-family: 'Manrope'; font-size: 20px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.comm-popup-story { font-size: 14px; color: var(--muted); line-height: 1.7; }

/* ============================================================
   HOW IT WORKS — timeline redesign
   ============================================================ */
.how-timeline { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 0; }
.how-step { display: grid; grid-template-columns: 80px 1fr; gap: 0; align-items: start; }
.how-step-r .how-card { margin-left: 40px; }
.how-step-left { display: flex; flex-direction: column; align-items: center; padding-top: 22px; }
.how-num-wrap { display: flex; flex-direction: column; align-items: center; }
.how-num { font-family: 'Manrope'; font-weight: 800; font-size: 36px; line-height: 1; background: var(--spark); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.how-line { width: 2px; height: 60px; background: linear-gradient(180deg, rgba(255,87,155,.4), rgba(255,87,155,.05)); margin-top: 8px; }
.how-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px; margin-bottom: 20px; box-shadow: var(--shadow-xs); transition: transform .3s, box-shadow .3s; }
.how-card:hover { transform: translateY(-3px) scale(1.03); box-shadow: var(--shadow); }
.how-card-accent { border-color: rgba(255,87,155,.3); background: linear-gradient(135deg, rgba(255,87,155,.05), var(--card)); }
.how-card-cert { border-color: rgba(156,106,255,.3); background: linear-gradient(135deg, rgba(156,106,255,.05), var(--card)); }
.how-card-final { border-color: rgba(29,180,255,.3); background: linear-gradient(135deg, rgba(29,180,255,.05), var(--card)); }
.how-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--spectrum-soft); display: grid; place-items: center; color: var(--amber); margin-bottom: 12px; }
.how-icon svg { width: 20px; height: 20px; }
.how-card h4 { font-family: 'Manrope'; font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.how-card p { font-size: 14px; color: var(--muted); line-height: 1.5; }
.cert-placeholder { color: var(--amber); font-style: italic; font-size: 12px; }

/* ============================================================
   AI ASSISTANT — updated layout
   ============================================================ */
.assist-head { margin-bottom: 60px; }
.assist-head .section-sub { text-align: center; }
.assist-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; align-items: start; }

/* 5-feature list */
.assist-feats-v2 { display: flex; flex-direction: column; gap: 18px; }
.feat-v2 { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--r-md); background: rgba(255,255,255,.04); border: 1px solid var(--line-dark); transition: background .2s; }
.feat-v2:hover { background: rgba(255,255,255,.07); }
.feat-v2-ic { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, rgba(156,106,255,.25), rgba(29,180,255,.2)); display: grid; place-items: center; color: #C4A8FF; flex-shrink: 0; }
.feat-v2-ic svg { width: 20px; height: 20px; }
.feat-v2 h4 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 5px; }
.feat-v2 p { font-size: 13px; color: var(--on-dark-mut); line-height: 1.5; }

.assist-quote { margin-top: 60px; text-align: center; max-width: 700px; margin-left: auto; margin-right: auto; }
.assist-quote p { font-family: 'Manrope'; font-size: clamp(16px,1.8vw,20px); color: var(--on-dark-mut); line-height: 1.6; font-style: italic; border-top: 1px solid var(--line-dark); padding-top: 32px; }

/* ── Character duo animation ── */
.char-duo { display: flex; align-items: center; justify-content: center; gap: 22px; margin-bottom: 14px; }
/* Solo avatar (Спарк only): scale up slightly and center */
.char-duo:has(.char-slot:only-child) { justify-content: center; }
.char-duo .char-slot:only-child .char-avatar-wrap { width: 148px; height: 228px; }
.char-slot { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.char-slot-spark { animation: charHlA 7s ease-in-out infinite; }
.char-slot-era   { animation: charHlB 7s ease-in-out infinite; }
@keyframes charHlA {
  0%, 44%  { opacity: 1; transform: scale(1) translateY(0); }
  50%, 94% { opacity: .28; transform: scale(.93) translateY(7px); }
  100%     { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes charHlB {
  0%, 44%  { opacity: .28; transform: scale(.93) translateY(7px); }
  50%, 94% { opacity: 1; transform: scale(1) translateY(0); }
  100%     { opacity: .28; transform: scale(.93) translateY(7px); }
}
.char-avatar-wrap { width: 118px; height: 182px; border-radius: var(--r-xl); overflow: hidden; border: 2px solid rgba(255,255,255,.14); box-shadow: 0 10px 36px rgba(0,0,0,.45); }
.char-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.char-slot-name { font-family: 'Manrope'; font-weight: 800; font-size: 15px; color: #fff; }
.char-slot-trait { font-size: 12px; color: var(--on-dark-mut); text-align: center; line-height: 1.5; }
.char-or { font-family: 'Manrope'; font-weight: 700; color: rgba(255,255,255,.2); font-size: 15px; }
.char-choose-hint { display: block; text-align: center; font-size: 11px; color: rgba(255,255,255,.28); letter-spacing: .1em; text-transform: uppercase; border: 1px solid rgba(255,255,255,.1); padding: 5px 16px; border-radius: var(--r-full); margin-bottom: 14px; }

/* ============================================================
   CARE — redesigned
   ============================================================ */
.care-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: stretch; margin-top: 56px; }
.care-contacts { display: flex; flex-direction: column; gap: 16px; }
.care-form-v2 { display: flex; flex-direction: column; }
.care-card-channel { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-xs); text-decoration: none; transition: border-color .25s, transform .25s, box-shadow .25s; }
.care-card-channel:hover { border-color: var(--amber); transform: translateY(-3px); box-shadow: var(--shadow); }
.care-card-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.care-card-icon-tg { background: rgba(29,180,255,.12); color: #1DB4FF; }
.care-card-icon-email { background: rgba(255,87,155,.12); color: var(--amber); }
.care-card-icon svg { width: 22px; height: 22px; }
.care-card-text { flex: 1; }
.care-card-title { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 3px; }
.care-card-val { font-weight: 700; font-size: 15px; color: var(--ink); }
.care-card-note { font-size: 12px; color: var(--faint); margin-top: 2px; }
.care-card-arr { width: 18px; height: 18px; color: var(--faint); flex-shrink: 0; }

.care-promise { display: flex; gap: 16px; padding: 20px; border-radius: var(--r-lg); background: linear-gradient(135deg, rgba(255,87,155,.06), rgba(29,180,255,.05)); border: 1px solid rgba(255,87,155,.15); flex: 1; align-items: center; }
.care-promise-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,87,155,.12); display: grid; place-items: center; color: var(--amber); flex-shrink: 0; }
.care-promise-icon svg { width: 22px; height: 22px; }
.care-promise-title { font-family: 'Manrope'; font-weight: 700; font-size: 15px; color: var(--ink); margin-bottom: 6px; }
.care-promise-text { font-size: 13px; color: var(--muted); line-height: 1.5; }

.care-form-v2 { padding: 36px; border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.care-form-title { font-family: 'Manrope'; font-size: 22px; font-weight: 800; margin-bottom: 24px; }
.care-form-v2 .field { margin-bottom: 16px; }
.care-form-v2 label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.care-form-v2 input, .care-form-v2 textarea, .care-form-v2 select { width: 100%; padding: 13px 16px; border-radius: var(--r-md); background: var(--bg-alt); border: 1px solid var(--line); color: var(--ink); font: inherit; transition: border-color .2s, background .2s; }
.care-form-v2 input:focus, .care-form-v2 textarea:focus, .care-form-v2 select:focus { outline: none; border-color: var(--amber); background: #fff; }
.care-form-v2 textarea { resize: vertical; min-height: 96px; }
.care-form-v2 select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px;
}
.care-form-v2 select option:hover,
.care-form-v2 select option:focus,
.care-form-v2 select option:checked {
  background: var(--amber, #FF579B) !important;
  color: #fff !important;
}
.frm-field.frm-field-source-other,
.care-form-v2 .field.frm-field-source-other {
  max-height: 0; opacity: 0; overflow: hidden; margin-bottom: 0;
  transition: max-height .32s ease, opacity .28s ease, margin-bottom .32s ease;
}
.frm-field.frm-field-source-other.open,
.care-form-v2 .field.frm-field-source-other.open {
  max-height: 160px; opacity: 1; margin-bottom: 16px;
}
.frm-hint { font-size: 12px; color: var(--frm-sub); line-height: 1.4; margin-top: 6px; }
.care-form-v2 .frm-hint { color: var(--muted); }

/* ============================================================
   POPUPS — shared overlay + modal
   ============================================================ */
.popup-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,.55); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.popup-overlay.open { opacity: 1; pointer-events: auto; }

.popup-modal {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: 0 32px 80px rgba(0,0,0,.22);
  width: 100%; max-height: 90vh;
  overflow-y: auto;
  transform: scale(.94) translateY(12px);
  opacity: 0;
  transition: transform .3s cubic-bezier(.22,.61,.36,1), opacity .25s cubic-bezier(.22,.61,.36,1);
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.08) transparent;
  will-change: transform, opacity;
}
.popup-overlay.open .popup-modal { transform: scale(1) translateY(0); opacity: 1; }
/* below the accent bar, scales down on small screens with the header's own padding */
.course-popup-modal .popup-close-btn { top: clamp(44px, 9vw, 56px); right: clamp(12px, 3vw, 16px); z-index: 20; }

.popup-close-btn {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg-alt); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--muted);
  cursor: pointer; transition: background .2s, color .2s;
  z-index: 10; flex-shrink: 0;
}
.popup-close-btn:hover { background: rgba(255,64,56,.12); color: #ff4038; }

/* ── Course popup ── */
.course-popup-modal { max-width: 760px; padding: 0; }
/* extra right padding reserves room for the close button so wrapped titles/tags
   never run under it (was overlapping on long RU/KZ titles at 375–768px) */
.cpm-header { padding: 36px clamp(56px, 14vw, 76px) 24px 36px; position: relative; overflow: hidden; }
.cpm-accent-bar { height: 5px; background: var(--accent, var(--amber)); border-radius: var(--r-xl) var(--r-xl) 0 0; position: absolute; top: 0; left: 0; right: 0; }
.cpm-num { font-family: 'Manrope'; font-size: 13px; font-weight: 800; color: var(--faint); letter-spacing: .1em; margin-bottom: 10px; }
.cpm-title { font-family: 'Manrope'; font-size: clamp(22px,3vw,30px); font-weight: 800; color: var(--ink); margin-bottom: 14px; line-height: 1.15; }
.cpm-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.cpm-tags span { font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: var(--r-full); background: var(--bg-alt); color: var(--ink-soft); border: 1px solid var(--line); }
.cpm-body { padding: 0 36px 36px; }
.cpm-section { margin-top: 32px; }
.cpm-section-title { font-family: 'Manrope'; font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.cpm-program { display: flex; flex-direction: column; gap: 10px; }
.cpm-program-item { padding: 12px 16px; border-radius: var(--r-md); background: var(--bg-alt); border: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); box-shadow: var(--shadow-xs); transition: transform .2s ease, box-shadow .2s ease; }
.cpm-program-item:hover { transform: scale(1.03); box-shadow: var(--shadow); }
.cpm-model { display: flex; gap: 10px; flex-wrap: wrap; }
.cpm-model-badge { display: inline-block; font-size: 14px; font-weight: 600; padding: 8px 20px; border-radius: var(--r-full); background: linear-gradient(135deg, rgba(156,106,255,.15), rgba(29,180,255,.12)); border: 1px solid rgba(156,106,255,.3); color: var(--ink); }
.cpm-experts { display: flex; flex-direction: column; gap: 14px; }
.cpm-expert { display: flex; align-items: center; gap: 14px; }
.cpm-expert-photo { width: 52px; height: 52px; border-radius: 50%; background: var(--bg-alt); border: 2px solid var(--line); display: grid; place-items: center; color: var(--faint); font-family: 'Manrope'; font-weight: 800; font-size: 18px; overflow: hidden; flex-shrink: 0; transition: transform .2s ease, box-shadow .2s ease; }
.cpm-expert-photo:hover { transform: scale(1.1); box-shadow: var(--shadow); }
.cpm-expert-photo img { width: 100%; height: 100%; object-fit: cover; }
.cpm-expert-name { font-weight: 700; font-size: 15px; }
.cpm-expert-role { font-size: 13px; color: var(--muted); }
.cpm-skills { display: flex; flex-wrap: wrap; gap: 8px; }
.cpm-skill-tag { display: inline-flex; align-items: center; background: rgba(29,180,255,.1); color: var(--ink); border: 1px solid rgba(29,180,255,.25); border-radius: 20px; padding: 5px 12px; font-size: 13px; font-weight: 500; box-shadow: 0 2px 8px rgba(29,180,255,.15); transition: transform .2s ease; }
.cpm-skill-tag:hover { transform: scale(1.06); }
.cpm-mod-title { color: var(--ink); font-weight: 700; }
.cpm-mod-desc { color: var(--ink-soft); }

.cpm-packages { display: flex; justify-content: center; align-items: stretch; flex-wrap: wrap; gap: clamp(12px, 2vw, 24px); margin-bottom: 14px; }
.cpm-package { flex: 1 1 200px; min-width: 200px; max-width: 320px; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 18px; position: relative; box-shadow: var(--shadow-xs); }
.cpm-package-popular { border-color: transparent; background: linear-gradient(var(--card),var(--card)) padding-box, var(--spectrum) border-box; }
.cpm-package-vip { background: var(--bg-alt); }
.cpm-pkg-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 5px 14px; border-radius: var(--r-full); background: var(--spark); color: #1a1206; white-space: nowrap; }
.cpm-pkg-badge-dark { background: var(--ink); color: #fff; }
.cpm-pkg-name { font-family: 'Manrope'; font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.cpm-pkg-price { font-size: 14px; font-weight: 600; color: var(--amber); margin-bottom: 14px; }
.cpm-pkg-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.cpm-pkg-list li { font-size: 13px; color: var(--ink-soft); padding-left: 16px; position: relative; }
.cpm-pkg-list li::before { content: '✓'; position: absolute; left: 0; color: var(--amber); font-weight: 700; }
.cpm-installment { text-align: center; font-size: 12px; color: var(--faint); }

/* ============================================================
   AI WIDGET — floating chat
   ============================================================ */
@keyframes aiwFloatGirl { 0%,100%{transform:translateY(0) rotate(-.5deg)} 50%{transform:translateY(-18px) rotate(.5deg)} }
@keyframes aiwFloatBoy  { 0%,100%{transform:translateY(0) rotate(.4deg)} 50%{transform:translateY(-20px) rotate(-.4deg)} }
/* Levitation amplitude capped at 6px so the avatar never reaches the
   "Спроси меня" text above or the "Спарки" label below. */
@keyframes sparkFloat { 0% { transform:translateY(0px); } 50% { transform:translateY(-6px); } 100% { transform:translateY(0px); } }
@keyframes aiwGlitch {
  0%,82%,100% { clip-path:none; transform:none; filter:none }
  83% { clip-path:inset(15% 0 55% 0); transform:translate(-5px,1px) scaleX(1.03); filter:drop-shadow(5px 0 0 rgba(255,87,155,.8)) drop-shadow(-5px 0 0 rgba(0,237,195,.8)) brightness(1.4) }
  84% { clip-path:inset(60% 0 8% 0);  transform:translate(5px,-1px) scaleX(.97); filter:drop-shadow(-4px 0 0 rgba(255,87,155,.7)) }
  85% { clip-path:none; transform:none; filter:none }
}
@keyframes aiwChoose { 0%,88%,100%{opacity:1} 89%{opacity:0} 90%{opacity:.15} 91%{opacity:1} }
@keyframes aiwBubbleIn { from{opacity:0;transform:scale(.88) translateY(16px);transform-origin:bottom right} to{opacity:1;transform:scale(1) translateY(0)} }
@keyframes aiwFabIn { from{opacity:0;transform:translateX(40px)} to{opacity:1;transform:translateX(0)} }
@keyframes aiwTyping { 0%,80%,100%{transform:scale(.4);opacity:.3} 40%{transform:scale(1);opacity:1} }
@keyframes aiwMicPulse { 0%,100%{box-shadow:0 0 0 0 rgba(255,87,155,.6)} 50%{box-shadow:0 0 0 10px rgba(255,87,155,0)} }

.ai-widget { position:fixed; bottom:clamp(16px,4vw,40px); right:clamp(12px,2.5vw,32px); z-index:15; display:flex; align-items:flex-end; gap:0; pointer-events:none; }
/* Mobile/tablet only: pull the resting widget further in from the
   bottom-right corner (desktop ≥1025px keeps the base values above
   untouched) — right += clamp(8px,2vw,16px), bottom += avatar height
   (clamp(68px,8.5vw,112px), same formula as .aiw-img-wrap) + clamp(8px,2vw,16px). */
@media (max-width: 1024px) {
  .ai-widget {
    right: calc(clamp(12px,2.5vw,32px) + clamp(8px,2vw,16px));
    bottom: calc(clamp(16px,4vw,40px) + clamp(68px,8.5vw,112px) + clamp(8px,2vw,16px));
  }
}
/* FAB */
.aiw-fab { pointer-events:auto; display:flex; align-items:flex-end; gap:4px; animation:aiwFabIn .6s cubic-bezier(.34,1.56,.64,1) both; }
.aiw-avatar-slot { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:clamp(6px,1vw,10px); cursor:pointer; position:relative; padding:8px 4px; transition:transform .2s; }
.aiw-avatar-slot:hover { transform:scale(1.04); }
.aiw-avatar-slot.aiw-slot-active .aiw-img-wrap { filter:drop-shadow(0 0 18px rgba(255,87,155,.5)); }
.aiw-choose { margin:0; padding:0; font-family:'Manrope',sans-serif; font-size:clamp(11px,1.3vw,14px); line-height:1; font-weight:800; letter-spacing:.06em; text-transform:uppercase; white-space:nowrap; opacity:.85; background:linear-gradient(135deg,#FF579B,#9C6AFF,#1DB4FF); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; animation:aiwChoose 2.4s steps(1) infinite; user-select:none; }
.aiw-avatar-slot:nth-child(2) .aiw-choose { animation-delay:.7s; }
.aiw-img-wrap { position:relative; margin:0; padding:0; width:clamp(68px,8.5vw,112px); height:clamp(68px,8.5vw,112px); border-radius:50%; overflow:hidden; display:block; flex-shrink:0; }
.aiw-img-wrap img { width:100%; height:100%; object-fit:contain; object-position:center 57%; display:block; }
.aiw-avatar-slot:nth-child(1) .aiw-img-wrap { animation:sparkFloat 3s ease-in-out infinite; }
.aiw-avatar-slot:nth-child(2) .aiw-img-wrap { animation:aiwFloatBoy 4.2s ease-in-out -2.1s infinite; }
.aiw-avatar-slot:nth-child(1) .aiw-img-wrap img { animation:aiwGlitch 2s steps(1) infinite; }
.aiw-avatar-label { margin:0; padding:0; font-family:'Manrope',sans-serif; font-size:clamp(11px,1.3vw,14px); font-weight:600; line-height:1; letter-spacing:.06em; text-transform:uppercase; white-space:nowrap; background:linear-gradient(135deg,#FF579B,#9C6AFF,#1DB4FF); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; user-select:none; }

/* Chat bubble */
.aiw-bubble { pointer-events:auto; position:relative; width:min(400px,calc(100vw - 180px)); background:rgba(255,255,255,.97); border:2px solid rgba(20,20,20,.16); border-radius:24px; display:flex; flex-direction:column; max-height:min(560px,calc(100vh - 80px)); box-shadow:0 24px 72px rgba(0,0,0,.18); animation:aiwBubbleIn .35s cubic-bezier(.25,.8,.25,1) both; margin-right:0; margin-bottom:30px; }
.aiw-bubble::after { content:''; position:absolute; right:-22px; bottom:50px; width:0; height:0; border-top:13px solid transparent; border-left:22px solid rgba(20,20,20,.16); }
.aiw-bubble::before { content:''; position:absolute; right:-18px; bottom:52px; width:0; height:0; border-top:11px solid transparent; border-left:18px solid rgba(255,255,255,.97); z-index:1; }

.aiw-bubble-tail { position:absolute; right:-44px; bottom:22px; display:flex; flex-direction:column-reverse; align-items:center; gap:4px; pointer-events:none; z-index:2; }
.aiw-dot { border-radius:50%; background:rgba(255,255,255,.97); border:2px solid rgba(20,20,20,.16); flex-shrink:0; }
.aiw-dot:nth-child(1) { width:13px; height:13px; }
.aiw-dot:nth-child(2) { width:8px; height:8px; }
.aiw-dot:nth-child(3) { width:5px; height:5px; }

.aiw-header { display:flex; align-items:center; gap:9px; padding:13px 16px 11px; border-bottom:1px solid rgba(20,20,20,.07); flex-shrink:0; }
.aiw-hdr-avatar { width:36px; height:36px; border-radius:50%; overflow:hidden; flex-shrink:0; background:#f5f5f5; }
.aiw-hdr-avatar img { width:100%; height:100%; object-fit:contain; object-position:top; }
.aiw-hdr-text { flex:1; min-width:0; }
.aiw-hdr-name { font-family:'Manrope',sans-serif; font-size:15px; font-weight:800; background:linear-gradient(135deg,#FF579B,#9C6AFF,#1DB4FF); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.aiw-hdr-sub { font-size:10px; font-weight:600; letter-spacing:.07em; text-transform:uppercase; color:rgba(20,20,20,.45); }
.aiw-switcher { display:flex; gap:5px; }
.aiw-sw-btn { display:flex; align-items:center; gap:5px; padding:4px 8px 4px 4px; border-radius:50px; border:1.5px solid rgba(20,20,20,.1); background:transparent; cursor:pointer; font-size:11px; font-weight:700; color:rgba(20,20,20,.5); transition:all .2s; opacity:.55; }
.aiw-sw-btn img { width:17px; height:17px; object-fit:contain; border-radius:50%; }
.aiw-sw-btn.aiw-sw-active { border-color:#FF579B; background:rgba(255,87,155,.1); opacity:1; color:#111; }
.aiw-controls { display:flex; gap:5px; flex-shrink:0; }
.aiw-ctrl { width:28px; height:28px; border-radius:8px; border:1px solid rgba(20,20,20,.08); background:transparent; cursor:pointer; display:flex; align-items:center; justify-content:center; color:rgba(20,20,20,.45); transition:all .18s; }
.aiw-ctrl:hover { opacity:1; transform:scale(1.1); color:#111; }
.aiw-ctrl-voice-on { color:#1DB4FF; border-color:#1DB4FF; background:rgba(29,180,255,.1); opacity:1; }
.aiw-close-btn:hover { background:rgba(255,50,50,.1); border-color:rgba(255,50,50,.3); color:#ff3232; }

.aiw-messages { flex:1; overflow-y:auto; padding:13px 14px; display:flex; flex-direction:column; gap:9px; scrollbar-width:thin; }
.aiw-msg { display:flex; gap:7px; align-items:flex-end; }
.aiw-msg-user { flex-direction:row-reverse; }
.aiw-msg-avatar { width:24px; height:24px; border-radius:50%; overflow:hidden; flex-shrink:0; background:#f5f5f5; }
.aiw-msg-avatar img { width:100%; height:100%; object-fit:contain; object-position:top; }
.aiw-msg-text { max-width:80%; padding:8px 12px; font-size:13px; line-height:1.55; color:#111; border-radius:16px; border:1px solid transparent; white-space:pre-wrap; word-break:break-word; }
.aiw-msg-bot { background:rgba(156,106,255,.08); border-color:rgba(156,106,255,.2); border-radius:4px 16px 16px 16px; }
.aiw-msg-user .aiw-msg-text { background:rgba(0,0,0,.05); border-radius:16px 16px 4px 16px; }
.aiw-typing { display:flex; align-items:center; gap:5px; padding:12px 15px !important; }
.aiw-typing span { width:7px; height:7px; border-radius:50%; background:#9C6AFF; opacity:.4; }
.aiw-typing span:nth-child(1) { animation:aiwTyping 1.2s ease-in-out infinite; }
.aiw-typing span:nth-child(2) { animation:aiwTyping 1.2s ease-in-out .2s infinite; }
.aiw-typing span:nth-child(3) { animation:aiwTyping 1.2s ease-in-out .4s infinite; }

.aiw-input-row { display:flex; align-items:flex-end; gap:7px; padding:9px 11px 11px; border-top:1px solid rgba(20,20,20,.07); flex-shrink:0; }
.aiw-mic-btn { width:36px; height:36px; border-radius:50%; border:1.5px solid rgba(20,20,20,.14); background:transparent; cursor:pointer; display:flex; align-items:center; justify-content:center; color:rgba(20,20,20,.45); flex-shrink:0; transition:all .2s; }
.aiw-mic-btn:hover { border-color:#FF579B; color:#FF579B; }
.aiw-mic-active { border-color:#FF579B!important; color:#FF579B!important; background:rgba(255,87,155,.1)!important; animation:aiwMicPulse .9s ease-in-out infinite; }
.aiw-input { flex:1; min-height:36px; max-height:90px; resize:none; border:1.5px solid rgba(20,20,20,.12); border-radius:16px; padding:7px 12px; font:inherit; font-size:13px; line-height:1.4; background:#fff; color:#111; outline:none; transition:border-color .2s; field-sizing:content; }
.aiw-input:focus { border-color:#9C6AFF; }
.aiw-send-btn { width:36px; height:36px; border-radius:50%; border:none; background:linear-gradient(135deg,#FF579B,#9C6AFF,#1DB4FF); cursor:pointer; display:flex; align-items:center; justify-content:center; color:#fff; flex-shrink:0; transition:transform .18s, opacity .18s; box-shadow:0 4px 14px rgba(0,0,0,.15); }
.aiw-send-btn:disabled { opacity:.3; cursor:default; }
.aiw-send-btn:not(:disabled):hover { transform:scale(1.1); }

/* ============================================================
   QUIZ POPUP
   ============================================================ */
.quiz-modal {
  max-width: 560px;
  padding: 0;
  overflow: hidden;
}
.quiz-progress-wrap {
  height: 4px;
  background: var(--bg-alt);
  border-radius: var(--r-full);
  margin: 0;
  overflow: hidden;
}
.quiz-bar {
  height: 100%;
  background: var(--spark);
  border-radius: var(--r-full);
  transition: width .4s var(--ease);
  width: 0%;
}
.quiz-steps { padding: 0; }
.quiz-step { display: none; padding: 60px 36px 36px; }
.quiz-step-active { display: block; }
.quiz-step-meta {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
}
.quiz-step-num {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint);
}
.quiz-skip-link {
  font-size: 13px; color: var(--muted); background: none; border: none; cursor: pointer;
  transition: color .2s;
}
.quiz-skip-link:hover { color: var(--ink); }
.quiz-q {
  font-family: 'Manrope'; font-size: clamp(18px,3vw,22px); font-weight: 800;
  color: var(--ink); line-height: 1.3; margin-bottom: 24px; letter-spacing: -.02em;
}
.quiz-opts { display: flex; flex-direction: column; gap: 10px; }
.quiz-opt {
  width: 100%; text-align: left; padding: 14px 18px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--bg-alt); color: var(--ink-soft);
  font: inherit; font-size: 15px; cursor: pointer;
  transition: border-color .2s, background .2s, color .2s, transform .15s;
}
.quiz-opt:hover { border-color: var(--amber); background: rgba(255,87,155,.06); color: var(--ink); transform: translateX(3px); }
.quiz-opt-sel { border-color: var(--amber) !important; background: rgba(255,87,155,.1) !important; color: var(--ink) !important; font-weight: 600; }

/* Result screen */
.quiz-result { text-align: center; }
.quiz-res-header { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 24px; }
.quiz-res-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--amber); background: rgba(255,87,155,.1); border: 1px solid rgba(255,87,155,.25);
  padding: 6px 14px; border-radius: var(--r-full);
}
.quiz-discount-badge {
  display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 700;
  background: linear-gradient(135deg, rgba(29,180,255,.12), rgba(156,106,255,.12));
  border: 1px solid rgba(156,106,255,.3); color: var(--ink);
  padding: 6px 14px; border-radius: var(--r-full);
}
.quiz-res-course {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 24px; margin-bottom: 24px; text-align: left;
}
.qrc-num { font-family: 'Manrope'; font-size: 12px; font-weight: 800; color: var(--faint); letter-spacing: .1em; margin-bottom: 6px; }
.qrc-title { font-family: 'Manrope'; font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.3; margin-bottom: 10px; }
.qrc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.qrc-tags span { font-size: 12px; font-weight: 600; color: var(--amber); padding: 3px 10px; border-radius: var(--r-full); background: rgba(255,87,155,.1); border: 1px solid rgba(255,87,155,.25); }
.qrc-desc { font-size: 14px; color: var(--muted); line-height: 1.6; }
.quiz-res-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.quiz-res-actions .btn { flex: 1; min-width: 160px; justify-content: center; }

/* AI widget — single avatar amber colors */
.aiw-choose {
  background: var(--spark);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.aiw-avatar-label {
  background: var(--spark);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.aiw-hdr-name {
  background: var(--spark);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
/* Single avatar */
.aiw-solo { padding: 8px; }
/* Symmetric spacing above/below the avatar is handled by .aiw-avatar-slot's
   own fluid gap, plus this 8px top/bottom padding as clearance for the
   6px levitation amplitude so the avatar never touches the text/name. */

/* ============================================================
   RESPONSIVE — all screens
   ============================================================ */
@media (max-width: 1100px) {
  .path-cards { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .care-layout { grid-template-columns: 1fr; }
  .assist-grid { grid-template-columns: 1fr; gap: 40px; }
  .community-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { height: 440px; margin-top: 10px; border-radius: var(--r-xl); }
  .prism-portrait { inset: 0; border-radius: 0; }
  .prism-portrait img { object-position: center 20%; }
  .bento { grid-template-columns: repeat(2,1fr); }
  .bento .tall { grid-row: span 1; }
  .about-grid, .assist-grid, .community-grid { grid-template-columns: 1fr; gap: 40px; }
  .partners-grid { grid-template-columns: repeat(3,1fr); }
  .amb-note { grid-template-columns: repeat(2,1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .amb-grid { grid-template-columns: 1fr; }
  .nav-links, .link-login, .lang { display: none; }
  .nav-cta { display: none; }
  .burger { display: flex; }
  .nav-links.open { display: flex; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; padding: 16px; gap: 4px; background: rgba(255,255,255,.98); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
  .nav-links.open a { padding: 13px 16px; }
  .nav-links.open .nav-mobile-login {
    display: block;
    margin: 12px 0 4px;
    padding: 13px 20px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    background: linear-gradient(135deg, #FF579B, #9C6AFF, #1DB4FF);
    border-radius: 999px;
    border: none;
  }
}
@media (max-width: 720px) {
  .brand-logo-img { max-width: 132px; }
  .nav-actions { gap: 4px; }
  .float-chip { white-space: nowrap; }
  .float-chip.c1 { left: 10px; }
  .float-chip.c2 { right: 10px; }
  .bento, .amb-note { grid-template-columns: 1fr; }
  .partners-grid { grid-template-columns: repeat(2,1fr); }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .hero { padding-top: 124px; }
  .why-grid { grid-template-columns: 1fr; gap: 32px; }
  .why-intro { position: static; }
  .orbit-face { width: 58px; height: 58px; }
  .how-step { grid-template-columns: 60px 1fr; }
  .how-step-r .how-card { margin-left: 0; }
  .how-num { font-size: 28px; }
  .how-line { height: 40px; }
  .cpm-body { padding: 0 20px 24px; }
  .cpm-header { padding: 28px clamp(52px, 16vw, 68px) 18px 20px; }
  .care-layout { grid-template-columns: 1fr; }
  .assist-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 540px) {
  /* AI widget compact */
  .aiw-bubble { width: 100%; max-width: 100%; border-radius: 20px 20px 0 0; margin-bottom: 0; max-height: min(480px, calc(100svh - 220px)); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .aiw-bubble::after, .aiw-bubble::before, .aiw-bubble-tail { display: none; }
  .ai-widget { left: 0; flex-direction: column-reverse; align-items: flex-end; }
  .aiw-fab { gap: 0; padding-right: 8px; padding-top: 4px; padding-bottom: max(8px, env(safe-area-inset-bottom, 8px)); }
  /* Hover panel hidden on mobile — uses full coursePopup instead */
  .chp-panel { display: none; }
  /* Choose-path */
  .path-cards { grid-template-columns: 1fr; }
  /* community orbit smaller — prevent overflow on narrow screens */
  .community-orbit { width: min(300px, 84vw); }
  .orbit-face { width: 48px; height: 48px; }
  /* Quiz */
  .quiz-step { padding: 52px 20px 28px; }
  .quiz-res-actions { flex-direction: column; }
}
@media (max-width: 640px) {
  /* Bug #4: stats cards — equal-height rows, centered */
  .stats-card { grid-auto-rows: 1fr; margin: 0 auto; }
  /* Bug #5: final CTA button fits with ≥16px margins */
  .final-cta { flex-direction: column; align-items: center; }
  .final-cta .btn-lg { padding: 15px 24px; font-size: 15px; width: 100%; box-sizing: border-box; text-align: center; }
}
@media (max-width: 480px) {
  /* Stats card: reduce padding so "5000+" doesn't get clipped */
  .stats-card { gap: 10px; }
  .stats-card .cell { padding: 22px 16px; }
  .stats-card .num { font-size: clamp(22px, 7vw, 34px); }
  .stats-card .lbl { font-size: 12px; }
}
@media (max-width: 400px) {
  .char-avatar-wrap { width: 88px; height: 136px; }
  .char-duo { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--r-full);
  border: 1px solid var(--line); color: var(--ink-soft);
  transition: background .2s, border-color .2s, color .2s;
  flex-shrink: 0;
}
.theme-btn:hover { background: var(--bg-alt); border-color: var(--line-2); color: var(--ink); }
@media (max-width: 720px) {
  .theme-btn { width: 28px; height: 28px; }
  .theme-btn svg { width: 14px; height: 14px; }
}
.theme-ic { display: none; }
/* light mode: show moon (click to go dark) */
html:not([data-theme="dark"]) .theme-ic-moon { display: block; }
/* dark mode: show sun (click to go light) */
html[data-theme="dark"] .theme-ic-sun { display: block; }

/* ============================================================
   DARK THEME — CSS variables override
   ============================================================ */
html[data-theme="dark"] {
  /* surfaces */
  --bg:       #0e1018;
  --bg-alt:   #12151f;
  --bg-tint:  #101320;
  --ink-bg:   #070a10;
  --card:     #181b28;

  /* ink / text */
  --ink:      #eceef8;
  --ink-soft: #aeaed0;
  --muted:    #9898c4;
  --faint:    #5858a0;
  --on-dark:       #f3f3f7;
  --on-dark-mut:   #a0a0c0;

  /* lines */
  --line:      rgba(255,255,255,.07);
  --line-2:    rgba(255,255,255,.13);
  --line-dark: rgba(255,255,255,.12);

  /* shadows */
  --shadow-xs: 0 2px 10px rgba(0,0,0,.28);
  --shadow:    0 14px 40px rgba(0,0,0,.44);
  --shadow-lg: 0 30px 80px rgba(0,0,0,.55);
  --shadow-amber: 0 16px 40px rgba(255,87,155,.24);

  /* gradients */
  --spectrum-soft: linear-gradient(120deg, rgba(255,87,155,.09), rgba(156,106,255,.07), rgba(29,180,255,.09));
}

/* ── Header ── */
html[data-theme="dark"] .header.scrolled {
  background: rgba(14,16,24,.88);
  backdrop-filter: blur(18px) saturate(180%);
  border-color: rgba(255,255,255,.07);
  box-shadow: 0 6px 24px rgba(0,0,0,.3);
}
@media (max-width: 1024px) {
  html[data-theme="dark"] .header {
    background: rgba(14,16,24,.88);
    backdrop-filter: blur(18px) saturate(180%);
    border-color: rgba(255,255,255,.07);
    box-shadow: 0 6px 24px rgba(0,0,0,.3);
  }
}
html[data-theme="dark"] .nav-links a:hover {
  background: rgba(255,255,255,.06);
}
html[data-theme="dark"] .nav-links.open {
  background: rgba(14,16,24,.98);
  border-color: rgba(255,255,255,.07);
}
html[data-theme="dark"] .lang-menu button:hover { background: rgba(255,255,255,.06); }
html[data-theme="dark"] .lang-menu button.active { background: rgba(255,87,155,.1); }

/* ── Grain — screen blend looks better on dark ── */
html[data-theme="dark"] .grain {
  mix-blend-mode: screen; opacity: .04;
}

/* ── Hero ── */
html[data-theme="dark"] .float-chip {
  background: rgba(20,23,36,.88);
  border-color: rgba(255,255,255,.1);
}
html[data-theme="dark"] .hero-visual .prism-portrait {
  border-color: rgba(255,255,255,.1);
}

/* ── Buttons ── */
html[data-theme="dark"] .btn-primary { background: #fff; color: #0e1018; }
html[data-theme="dark"] .btn-ghost {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.14);
  color: var(--ink);
}
@media (hover: hover) and (pointer: fine) {
  html[data-theme="dark"] .btn-primary:hover { box-shadow: 0 16px 40px rgba(255,255,255,.2); }
  html[data-theme="dark"] .btn-ghost:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.28);
  }
}

/* ── Eyebrow pill ── */
html[data-theme="dark"] .eyebrow:not(.dark .eyebrow) {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.09);
  color: var(--ink-soft);
}

/* ── Hover panel ── */
html[data-theme="dark"] .chp-panel {
  box-shadow: 0 24px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.07);
}
html[data-theme="dark"] .chp-hdr-tags span {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.1);
}
html[data-theme="dark"] .chp-module { border-color: rgba(255,255,255,.08); color: var(--ink-soft); }
html[data-theme="dark"] .chp-pkg { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }

/* ── Course popup modal ── */
html[data-theme="dark"] .popup-modal {
  box-shadow: 0 40px 120px rgba(0,0,0,.6);
}
html[data-theme="dark"] .cpm-tags span {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.12);
}
html[data-theme="dark"] .cpm-program-item { border-color: rgba(255,255,255,.07); }
html[data-theme="dark"] .cpm-model-badge { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
html[data-theme="dark"] .cpm-package { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.09); }
html[data-theme="dark"] .cpm-package-popular { border-color: var(--amber); }
html[data-theme="dark"] .cpm-installment { color: var(--muted); }

/* ── Accordion / Why section ── */
html[data-theme="dark"] .acc-item { border-color: rgba(255,255,255,.07); }
html[data-theme="dark"] .acc-head { color: var(--ink); }
html[data-theme="dark"] .acc-t { color: rgba(255,255,255,.95); }
html[data-theme="dark"] .acc-item-amber .acc-t { color: var(--amber); -webkit-text-fill-color: var(--amber); }
html[data-theme="dark"] .acc-body p { color: rgba(255,255,255,.88); }

/* ── Ambassadors ── */
html[data-theme="dark"] .amb-card {
  background: var(--card);
  border-color: rgba(255,255,255,.08);
}
html[data-theme="dark"] .amb-note-item {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
}
/* dark theme: wider gradient since dark backgrounds tolerate more overlap */
html[data-theme="dark"] .epm-photo::after {
  background: linear-gradient(90deg, transparent 48%, var(--card) 100%);
}

/* ── Pricing tiers ── */
html[data-theme="dark"] .tier {
  background: var(--card);
  border-color: rgba(255,255,255,.09);
}
html[data-theme="dark"] .tier.popular { border-color: var(--amber); }
html[data-theme="dark"] .tier .feat { border-color: rgba(255,255,255,.07); color: var(--ink-soft); }

/* ── How / path section ── */
html[data-theme="dark"] .how-card {
  background: var(--card);
  border-color: rgba(255,255,255,.08);
}
html[data-theme="dark"] .path-card {
  background: var(--card);
  border-color: rgba(255,255,255,.08);
}
html[data-theme="dark"] .path-badge-dark,
html[data-theme="dark"] .cpm-pkg-badge-dark,
html[data-theme="dark"] .tier .badge.dark {
  background: rgba(255,255,255,.13);
  color: var(--ink);
}

/* ── Partners ── */
html[data-theme="dark"] .partner-logo {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.09);
  filter: invert(1) brightness(0.7);
}

/* ── Care section ── */
html[data-theme="dark"] .care-form-v2 input:focus,
html[data-theme="dark"] .care-form-v2 textarea:focus,
html[data-theme="dark"] .care-form-v2 select:focus { background: var(--card); }
html[data-theme="dark"] .care-form-v2 input::placeholder,
html[data-theme="dark"] .care-form-v2 textarea::placeholder { color: var(--faint); }
html[data-theme="dark"] .care-card-channel {
  background: var(--card);
  border-color: rgba(255,255,255,.09);
}
html[data-theme="dark"] .care-promise {
  background: linear-gradient(135deg, rgba(255,87,155,.07), rgba(29,180,255,.06));
  border-color: rgba(255,87,155,.2);
}

/* ── Community popup ── */
html[data-theme="dark"] .community-popup-modal { background: var(--card); }

/* ── Quiz popup ── */
html[data-theme="dark"] .quiz-modal { background: var(--card); }
html[data-theme="dark"] .quiz-opt { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
html[data-theme="dark"] .quiz-opt:hover { background: rgba(255,255,255,.08); }
html[data-theme="dark"] .quiz-res-course { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.09); }

/* ── Footer ── */
html[data-theme="dark"] .footer { border-color: rgba(255,255,255,.07); }
html[data-theme="dark"] .footer a { color: var(--ink-soft); }
html[data-theme="dark"] .footer a:hover { color: var(--ink); }
html[data-theme="dark"] .footer-bot { border-color: rgba(255,255,255,.07); }

/* ── Selection colour ── */
html[data-theme="dark"] ::selection { background: rgba(255,87,155,.28); color: #fff; }

/* ── Stats card ── */
html[data-theme="dark"] .stats-card .cell { border-color: rgba(255,255,255,.07); }
/* star corner decoration needs slightly more opacity on dark card
   backgrounds to read at the same visual intensity as on light cards */
html[data-theme="dark"] .stats-card .cell .card-star-bg { opacity: .28; }
@media (hover: hover) and (pointer: fine) {
  html[data-theme="dark"] .stats-card .cell:hover .card-star-bg { opacity: .4; }
}

/* ── Dark sections in dark theme ── */
/* .assist uses --bg-dark-gradient in both themes, no override needed */

/* ── Orbit center circle ── */
html[data-theme="dark"] .community-orbit-center { background: var(--ink-bg); }

/* community-core: always dark (same in both themes) */

/* ── Bento / feature cards ── */
html[data-theme="dark"] .bento-card { background: var(--card); border-color: rgba(255,255,255,.08); }

/* ── AI widget input ── */
html[data-theme="dark"] .aiw-input {
  background: rgba(255,255,255,.06);
  color: var(--ink);
  border-color: rgba(255,255,255,.12);
}
html[data-theme="dark"] .aiw-panel {
  background: var(--card);
  border-color: rgba(255,255,255,.1);
}

/* ── Mobile nav lang visibility ── */
@media (max-width: 1024px) {
  html[data-theme="dark"] .nav-links.open {
    background: rgba(14,16,24,.98);
    backdrop-filter: blur(18px);
  }
}

/* ══════════════════════════════════════════════════════════
   FORM POPUPS (frm-*)
   Light page → dark card; Dark page → white card
   ══════════════════════════════════════════════════════════ */

/* Form-specific CSS variables */
:root {
  --frm-bg:          #0d0e1c;
  --frm-bg2:         #141526;
  --frm-text:        #eaecff;
  --frm-label:       rgba(210,212,255,.72);
  --frm-sub:         rgba(160,162,210,.8);
  --frm-field-bg:    rgba(255,255,255,.06);
  --frm-field-bdr:   rgba(255,255,255,.13);
  --frm-field-focus: rgba(255,87,155,.45);
  --frm-field-txt:   #e8eaff;
  --frm-ph:          rgba(140,142,200,.65);
  --frm-note-bg:     rgba(255,87,155,.08);
  --frm-note-bdr:    rgba(255,87,155,.22);
  --frm-note-txt:    rgba(220,60,130,.95);
  --frm-icon-bg:     rgba(29,180,255,.12);
  --frm-icon-clr:    #1DB4FF;
}
html[data-theme="dark"] {
  --frm-bg:          #ffffff;
  --frm-bg2:         #f4f6fa;
  --frm-text:        #0d0e1c;
  --frm-label:       #404060;
  --frm-sub:         #6060a0;
  --frm-field-bg:    #f0f2f8;
  --frm-field-bdr:   #cdd0e0;
  --frm-field-focus: rgba(255,87,155,.6);
  --frm-field-txt:   #0d0e1c;
  --frm-ph:          #9898b8;
  --frm-note-bg:     rgba(255,87,155,.07);
  --frm-note-bdr:    rgba(255,87,155,.22);
  --frm-note-txt:    #cc3377;
  --frm-icon-bg:     rgba(29,180,255,.1);
  --frm-icon-clr:    #1DB4FF;
}

/* Overlay */
.frm-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity .22s var(--ease, ease);
}
.frm-overlay.open {
  opacity: 1; pointer-events: auto;
}

/* Card */
.frm-card {
  position: relative;
  background: var(--frm-bg);
  color: var(--frm-text);
  border-radius: 20px;
  padding: 36px 32px 32px;
  width: 100%; max-width: 480px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,.42);
  top: 18px;
  opacity: 0;
  transition: top .28s var(--ease, ease), opacity .22s var(--ease, ease);
  will-change: opacity;
}
.frm-overlay.open .frm-card { top: 0; opacity: 1; }

/* Close button */
.frm-x {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--frm-field-bg);
  color: var(--frm-label);
  display: flex; align-items: center; justify-content: center;
  transition: background .18s, color .18s;
  flex-shrink: 0;
}
.frm-x:hover { background: var(--frm-field-bdr); color: var(--frm-text); }

/* Heading */
.frm-h {
  font-size: clamp(20px, 4vw, 24px);
  font-weight: 800;
  color: var(--frm-text);
  margin-bottom: 6px;
  line-height: 1.3;
}
.frm-sub {
  font-size: 14px;
  color: var(--frm-sub);
  margin-bottom: 22px;
  line-height: 1.5;
}

/* Fields */
.frm-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.frm-row2  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 0; }
.frm-field label {
  font-size: 13px; font-weight: 600;
  color: var(--frm-label);
  letter-spacing: .01em;
}
.frm-field input,
.frm-field select,
.frm-field textarea {
  background: var(--frm-field-bg);
  color: var(--frm-field-txt);
  border: 1.5px solid var(--frm-field-bdr);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color .18s, box-shadow .18s;
  width: 100%;
}
.frm-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.frm-field select option { background: var(--frm-bg); color: var(--frm-text); }
.frm-field select option:hover,
.frm-field select option:focus,
.frm-field select option:checked {
  background: var(--amber, #FF579B) !important;
  color: #fff !important;
}
.frm-field input::placeholder,
.frm-field textarea::placeholder { color: var(--frm-ph); }
.frm-field input:focus,
.frm-field select:focus,
.frm-field textarea:focus {
  outline: none;
  border-color: var(--amber, #FF579B);
  box-shadow: 0 0 0 3px var(--frm-field-focus);
}
.frm-field input.frm-error,
.frm-field select.frm-error,
.frm-field textarea.frm-error {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229,62,62,.2);
}
.frm-err-msg {
  font-size: 12px;
  color: #e53e3e;
  margin-top: 3px;
  min-height: 16px;
  line-height: 1.3;
}
/* Care form fields reuse frm-field error states */
.care-form-v2 .field input.frm-error,
.care-form-v2 .field textarea.frm-error {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229,62,62,.2);
}
.care-form-v2 .field .frm-err-msg { font-size: 12px; color: #e53e3e; margin-top: 3px; }

/* Submit button */
.frm-btn {
  width: 100%; justify-content: center;
  margin-top: 6px;
  font-size: 16px; font-weight: 700;
  min-height: 48px;
}
.frm-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Login note */
.frm-login-note {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--frm-note-bg);
  border: 1px solid var(--frm-note-bdr);
  border-radius: 10px;
  font-size: 13px;
  color: var(--frm-note-txt);
  line-height: 1.5;
}
.frm-login-note svg { flex-shrink: 0; margin-top: 1px; }

/* Thank you card */
.frm-thank-card { text-align: center; padding: 44px 32px 36px; }
.frm-thank-icon {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--frm-icon-bg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.frm-thank-icon svg { width: 30px; height: 30px; stroke: var(--frm-icon-clr); }
.frm-thank-text {
  font-size: 15px;
  color: var(--frm-sub);
  line-height: 1.6;
  margin-bottom: 24px;
  margin-top: 8px;
}

/* Responsive */
@media (max-width: 540px) {
  .frm-card { padding: 28px 20px 24px; border-radius: 16px; }
  .frm-row2 { grid-template-columns: 1fr; gap: 0; }
  .frm-thank-card { padding: 36px 20px 28px; }
}
@media (max-width: 360px) {
  .frm-card { padding: 24px 16px 20px; }
  .frm-h    { font-size: 18px; }
}

/* ── Phone country code selector ── */
.phone-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}
.phone-cc-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px 0 12px;
  background: var(--frm-field-bg);
  border: 1.5px solid var(--frm-field-bdr);
  border-right: none;
  border-radius: 10px 0 0 10px;
  color: var(--frm-field-txt);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background .18s, border-color .18s;
  flex-shrink: 0;
  min-height: 44px;
}
.phone-cc-btn:hover { background: rgba(255,255,255,.1); }
html[data-theme="dark"] .phone-cc-btn:hover { background: rgba(0,0,0,.07); }
.phone-wrap.focused .phone-cc-btn { border-color: var(--amber, #FF579B); }
.phone-cc-flag { font-size: 18px; line-height: 1; }
.phone-cc-dial { font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.phone-cc-chev { color: var(--frm-ph); transition: transform .2s; flex-shrink: 0; }
.phone-cc-btn[aria-expanded="true"] .phone-cc-chev { transform: rotate(180deg); }
.phone-wrap input[type="tel"] {
  border-radius: 0 10px 10px 0 !important;
  border-left-color: transparent !important;
  flex: 1;
  min-width: 0;
}
.phone-cc-drop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9500;
  background: var(--frm-bg);
  border: 1.5px solid var(--frm-field-bdr);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.32);
  min-width: 240px;
  max-height: 252px;
  overflow-y: auto;
  display: none;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--frm-field-bdr) transparent;
}
.phone-cc-drop.open { display: block; }
.phone-cc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--frm-field-txt);
  transition: background .13s;
  line-height: 1.2;
}
.phone-cc-item:hover { background: var(--frm-field-bg); }
.phone-cc-item.active { background: var(--frm-field-bg); font-weight: 600; }
.phone-cc-item-flag { font-size: 19px; flex-shrink: 0; }
.phone-cc-item-name { flex: 1; font-size: 13px; }
.phone-cc-item-dial { font-size: 12px; color: var(--frm-ph); }
@media (max-width: 400px) {
  .phone-cc-btn { padding: 0 8px 0 10px; gap: 4px; }
  .phone-cc-dial { font-size: 12px; }
  .phone-cc-drop { min-width: 200px; }
}

/* ── Custom select (source dropdown etc.) — replaces native <select>
   so option hover/selected color is under our control everywhere,
   since native <option> list styling is not reliably overridable
   (Chromium/Linux renders it via the OS toolkit, ignoring CSS). ── */
.cselect { position: relative; }
.cselect-native { display: none; }
.cselect-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%;
  background: var(--frm-field-bg);
  color: var(--frm-field-txt);
  border: 1.5px solid var(--frm-field-bdr);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s;
}
.cselect-btn:hover { border-color: var(--amber, #FF579B); }
.cselect-btn:focus-visible,
.cselect-btn[aria-expanded="true"] {
  outline: none;
  border-color: var(--amber, #FF579B);
  box-shadow: 0 0 0 3px var(--frm-field-focus);
}
.cselect-btn.frm-error { border-color: #e53e3e; box-shadow: 0 0 0 3px rgba(229,62,62,.2); }
.cselect-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect-val.is-placeholder { color: var(--frm-ph); }
.cselect-chev { color: var(--frm-ph); transition: transform .2s; flex-shrink: 0; }
.cselect-btn[aria-expanded="true"] .cselect-chev { transform: rotate(180deg); }

.cselect-drop {
  position: fixed; z-index: 9500;
  background: var(--frm-bg);
  border: 1.5px solid var(--frm-field-bdr);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.32);
  max-height: 260px;
  overflow-y: auto;
  display: none;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--frm-field-bdr) transparent;
}
.cselect-drop.open { display: block; }
.cselect-opt {
  display: block; width: 100%; text-align: left;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--frm-text);
  background: none; border: none; font-family: inherit;
  transition: background .13s, color .13s;
}
.cselect-opt.active { background: var(--frm-field-bg); font-weight: 600; }
.cselect-opt:hover,
.cselect-opt:focus-visible {
  background: var(--amber, #FF579B);
  color: #fff;
}

.care-form-v2 .cselect-btn {
  background: var(--bg-alt); border-color: var(--line); color: var(--ink);
}
.care-form-v2 .cselect-val.is-placeholder { color: var(--faint); }
.care-form-v2 .cselect-btn:hover,
.care-form-v2 .cselect-btn:focus-visible,
.care-form-v2 .cselect-btn[aria-expanded="true"] {
  border-color: var(--amber); background: #fff;
}
html[data-theme="dark"] .care-form-v2 .cselect-btn:focus-visible,
html[data-theme="dark"] .care-form-v2 .cselect-btn[aria-expanded="true"] { background: var(--card); }

/* ── Consent checkbox ──────────────────────────────────────── */
.frm-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--frm-text);
}
.frm-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #f59e0b;
  border-radius: 3px;
}
.frm-consent label { cursor: pointer; }
.frm-consent label a { color: #f59e0b; text-decoration: underline; }
.frm-consent label a:hover { opacity: .8; }
.frm-consent.frm-error label { color: #ef4444; }
.frm-consent.frm-error label a { color: #ef4444; }
/* Care form sits on a light/dark section background — keep readable */
.care-consent { color: inherit; }

/* ── Legal document popup ───────────────────────────────────── */
.doc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  padding: 16px;
}
.doc-overlay.open { opacity: 1; pointer-events: all; }
.doc-card {
  background: var(--frm-bg);
  color: var(--frm-text);
  border-radius: 20px;
  padding: 48px 52px 44px;
  width: 100%;
  max-width: 700px;
  max-height: 82vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(18px);
  transition: transform .28s;
  scrollbar-width: thin;
}
.doc-overlay.open .doc-card { transform: translateY(0); }
.doc-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--frm-text);
  padding-right: 32px;
}
.doc-body { font-size: 14px; line-height: 1.75; color: var(--frm-text); }
.doc-body h3 {
  font-size: .92rem;
  font-weight: 700;
  margin: 22px 0 6px;
  color: var(--frm-text);
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .75;
}
.doc-body p { margin-bottom: 10px; }
.doc-body em { opacity: .6; font-style: italic; }
@media (max-width: 640px) {
  .doc-card { padding: 36px 24px 32px; }
  .doc-title { font-size: 1.15rem; }
}
@media (max-width: 360px) {
  .doc-card { padding: 28px 16px 24px; border-radius: 14px; }
}

/* ── Cookie banner ──────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15,15,15,.96);
  color: #d1d5db;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  z-index: 9800;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 -4px 24px rgba(0,0,0,.4);
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  flex: 1;
}
.cookie-banner p a { color: #f59e0b; text-decoration: underline; }
.cookie-btn { padding: 8px 22px; font-size: 13px; flex-shrink: 0; border-radius: 8px; }
@media (max-width: 600px) {
  .cookie-banner { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px 20px; }
  .cookie-btn { width: 100%; justify-content: center; }
}

/* ============================================================
   TASK BATCH — partners/ambassador hide, why overflow, sizes
   ============================================================ */
#partners { display: none; }
.amb-role-head, .amb-note { display: none; }
#why { overflow: hidden; }

/* ── Assist needs position:relative for ::before bokeh ── */
.assist { position: relative; }

/* Stars removed */
.speed-band::before, .assist::before, .final-card::before { display: none; }
/* Content must sit above the ::before overlay */
.speed-band .container,
.speed-band .blob,
.assist .container,
.assist .blob,
.final-card > .container,
.final-card .blob { position: relative; z-index: 1; }

/* ============================================================
   ABOUT SECTION — creative photo layout
   ============================================================ */
.about-gen-creative {
  display: flex;
  align-items: flex-start;
  margin-top: 28px;
  position: relative;
}
.agc-img {
  border-radius: 18px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.agc-img img {
  width: 100%;
  height: auto;
  display: block;
}
.agc-img-main {
  width: 62%;
  z-index: 2;
  transform: rotate(-1.8deg) translateY(-6px);
  box-shadow: 0 18px 48px rgba(0,0,0,.20), 0 4px 16px rgba(0,0,0,.12);
  margin-right: -22px;
}
.agc-img-secondary {
  width: 52%;
  z-index: 1;
  transform: rotate(2.2deg) translateY(20px);
  box-shadow: 0 22px 56px rgba(0,0,0,.26), 0 6px 20px rgba(0,0,0,.15);
  margin-top: auto;
  align-self: flex-end;
}
@media (max-width: 900px) {
  .about-gen-creative { gap: 10px; }
  .agc-img-main { width: 60%; margin-right: -16px; transform: rotate(-1.2deg); }
  .agc-img-secondary { width: 50%; transform: rotate(1.5deg) translateY(14px); }
}
@media (max-width: 640px) {
  .about-gen-creative { flex-direction: column; gap: 12px; }
  .agc-img-main, .agc-img-secondary { width: 90%; margin: 0 auto; transform: none; align-self: auto; }
  .agc-img-secondary { transform: rotate(1.5deg) translateX(20px); }
}

/* ============================================================
   HOW SECTION — creative photo layout (3 images)
   ============================================================ */
.how-gen-creative {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  margin-top: 48px;
}
.hgc-img {
  border-radius: 18px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.hgc-img img {
  width: 100%;
  height: auto;
  display: block;
}
.hgc-img-1 {
  width: 195px;
  transform: rotate(-2.5deg) translateY(14px);
  box-shadow: 0 14px 40px rgba(0,0,0,.18);
  z-index: 1;
}
.hgc-img-2 {
  width: 230px;
  transform: rotate(0deg) translateY(-6px);
  box-shadow: 0 20px 52px rgba(0,0,0,.22);
  z-index: 3;
  position: relative;
}
.hgc-img-3 {
  width: 195px;
  transform: rotate(2.5deg) translateY(10px);
  box-shadow: 0 14px 40px rgba(0,0,0,.18);
  z-index: 1;
}
@media (max-width: 768px) {
  .hgc-img-1, .hgc-img-3 { width: 155px; }
  .hgc-img-2 { width: 185px; }
}
@media (max-width: 640px) { .how-gen-creative { display: none; } }

/* ============================================================
   CART POPUP — inverted theme (dark bg in light, light bg in dark)
   ============================================================ */
.cart-overlay {
  position: fixed; inset: 0; z-index: 10200;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-card {
  position: relative;
  width: 100%; max-width: 440px;
  background: #0d0d12;
  color: #f3f3f7;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-xl);
  padding: 40px 36px 36px;
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
  text-align: center;
  transform: scale(.94);
  transition: transform .3s var(--ease);
}
.cart-overlay.open .cart-card { transform: scale(1); }
.cart-x {
  position: absolute; top: 16px; right: 18px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: none; cursor: pointer;
  display: grid; place-items: center; color: rgba(255,255,255,.7);
  transition: background .2s, color .2s;
}
.cart-x:hover { background: rgba(255,255,255,.18); color: #fff; }
.cart-icon-wrap {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,87,155,.25), rgba(156,106,255,.2));
  display: grid; place-items: center; margin: 0 auto 20px;
  border: 1px solid rgba(255,87,155,.35);
}
.cart-icon-wrap svg { width: 28px; height: 28px; color: var(--amber); }
.cart-h { font-family: 'Manrope'; font-size: 22px; font-weight: 800; margin-bottom: 22px; color: #fff; }
.cart-item {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 22px; text-align: left;
}
.cart-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; }
.cart-row + .cart-row { border-top: 1px solid rgba(255,255,255,.07); margin-top: 5px; padding-top: 10px; }
.cart-lbl { font-size: 13px; color: rgba(255,255,255,.55); }
.cart-val { font-size: 14px; font-weight: 600; color: #fff; text-align: right; max-width: 60%; }
.cart-price-row .cart-val { font-size: 18px; font-family: 'Manrope'; color: var(--amber); }
.cart-checkout-btn { width: 100%; margin-bottom: 10px; }
.cart-back-btn {
  width: 100%; padding: 13px 20px; border-radius: var(--r-md);
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.7); cursor: pointer; font: inherit; font-size: 14px;
  transition: background .2s; margin-bottom: 14px;
}
.cart-back-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.cart-note { font-size: 12px; color: rgba(255,255,255,.4); line-height: 1.6; }

/* Dark theme — inverted (light cart) */
html[data-theme="dark"] .cart-card {
  background: #f5f5f8;
  color: #101019;
  border-color: rgba(16,16,25,.12);
}
html[data-theme="dark"] .cart-x { background: rgba(0,0,0,.07); color: rgba(0,0,0,.6); }
html[data-theme="dark"] .cart-x:hover { background: rgba(0,0,0,.14); color: #000; }
html[data-theme="dark"] .cart-h { color: #101019; }
html[data-theme="dark"] .cart-item { background: rgba(0,0,0,.04); border-color: rgba(0,0,0,.1); }
html[data-theme="dark"] .cart-row + .cart-row { border-color: rgba(0,0,0,.08); }
html[data-theme="dark"] .cart-lbl { color: rgba(0,0,0,.45); }
html[data-theme="dark"] .cart-val { color: #101019; }
html[data-theme="dark"] .cart-price-row .cart-val { color: var(--amber); }
html[data-theme="dark"] .cart-back-btn { background: rgba(0,0,0,.06); border-color: rgba(0,0,0,.12); color: rgba(0,0,0,.65); }
html[data-theme="dark"] .cart-back-btn:hover { background: rgba(0,0,0,.1); color: #000; }
html[data-theme="dark"] .cart-note { color: rgba(0,0,0,.4); }

/* ============================================================
   POPUP — subtitle and result
   ============================================================ */
.cpm-subtitle {
  font-size: 15px; color: var(--on-dark-mut); line-height: 1.6;
  margin: 6px 0 0; padding: 0;
}
.cpm-result-section { margin-bottom: 0; }
.cpm-result {
  font-size: 14px; color: var(--ink-soft); line-height: 1.7;
  padding: 14px 16px; border-radius: var(--r-md);
  background: rgba(255,87,155,.06); border: 1px solid rgba(255,87,155,.18);
}
html[data-theme="dark"] .cpm-result {
  background: rgba(255,87,155,.08); border-color: rgba(255,87,155,.22);
}

/* Market salary range plaque */
.cpm-market-section { margin-bottom: 0; }
.cpm-market {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(255,87,155,.10), rgba(156,106,255,.08));
  border: 1px solid rgba(255,87,155,.22);
}
.cpm-market-icon {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--spark); color: #fff;
}
.cpm-market-icon svg { width: 22px; height: 22px; }
.cpm-market-body { min-width: 0; }
.cpm-market-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); margin-bottom: 4px;
}
.cpm-market-amount { font-family: 'Manrope'; font-size: 20px; font-weight: 800; color: var(--ink); margin-right: 8px; }
.cpm-market-role { font-size: 13px; color: var(--ink-soft); }
.cpm-market-text { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
html[data-theme="dark"] .cpm-market {
  background: linear-gradient(135deg, rgba(255,87,155,.14), rgba(156,106,255,.12));
  border-color: rgba(255,87,155,.3);
}
@media (max-width: 480px) {
  .cpm-market { padding: 14px; gap: 10px; }
  .cpm-market-icon { width: 36px; height: 36px; }
  .cpm-market-icon svg { width: 18px; height: 18px; }
  .cpm-market-amount { font-size: 17px; }
}

/* ============================================================
   GENERATION IMAGES — decorative AI visuals
   ============================================================ */
.gen-img-wrap {
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform .25s ease, box-shadow .25s ease;
  display: block;
}
.gen-img-wrap:hover { transform: scale(1.03); box-shadow: 0 24px 64px rgba(0,0,0,.22); }
.gen-img-wrap img { width: 100%; height: auto; display: block; }

/* Decorative row in #how section */
.how-gen-row {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  justify-content: center;
}
.how-gen-row .gen-img-wrap {
  width: 220px;
  flex-shrink: 0;
}
@media (max-width: 640px) { .how-gen-row { display: none; } }

/* Floated decorative image in #why section */
.why-gen-float {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 260px;
  height: 200px;
  border-radius: var(--r-xl) 0 0 var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform .25s ease;
  pointer-events: none;
  opacity: .85;
}
@media (max-width: 900px) { .why-gen-float { display: none; } }

/* Section bg overlay with generation image */
.gen-bg-section {
  position: relative;
}
.gen-bg-section::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.gen-bg-section > * { position: relative; z-index: 1; }

/* General image hover scale */
@media (hover: hover) {
  .prism-portrait:hover { transform: scale(1.02); transition: transform .3s ease; }
  .stats-card .cell img:hover,
  .float-chip img:hover { transform: scale(1.05); transition: transform .2s ease; }
}

/* ============================================================
   LIGHT THEME — flat neutral background + animated film-grain canvas.
   The reference (ladookhotnikov.com/ru) has no particle library — a
   CSS background-position-shift trick was tried first here but read
   as small static dots, not the large, visibly-moving film grain the
   reference shows at high zoom. Replaced with a per-frame randomized
   <canvas> (#light-bg-canvas, driven by script.v2.js) which redraws
   fresh noise every animation frame — a true "alive" grain texture.
   ============================================================ */

/* 1. Body — flat neutral grey fallback (shows briefly before canvas
      paints, and if JS/canvas is unavailable). No image, no gradient. */
html:not([data-theme="dark"]) body {
  background-color: #F0F0F0;
  background-image: none;
}

/* 2. Remove opaque fills from all light sections so the grain canvas
      (sitting behind everything, z-index:-1) shows through uniformly.
      Dark sections keep their own bg. */
html:not([data-theme="dark"]) .sec-tint {
  background: transparent;
}

html:not([data-theme="dark"]) .footer {
  background: transparent;
}

html:not([data-theme="dark"]) .final {
  background: transparent;
}

/* 3. Hide the existing static grain div — replaced by #light-bg-canvas
      for the light theme. */
html:not([data-theme="dark"]) .grain {
  opacity: 0;
}

/* 4. Film-grain canvas — fixed full-viewport, behind all content,
      shown/hidden and driven by initLightGrain() in script.v2.js. */
#light-bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  display: none;
  opacity: 0.55;
  image-rendering: pixelated;
  filter: blur(0.4px);
}
html[data-theme="dark"] #light-bg-canvas { display: none !important; }

/* 5. Neutral translucent glass on content cards/plates — replaces the
      flat opaque white + generic shadow "glossy" look. Neutral
      black/white-based tones (no warm tint), matching the reference's
      plain neutral palette. Scoped to real content cards only;
      .path-card-popular keeps its own rainbow border treatment, and
      modals/popups stay opaque (they sit over a dark scrim, so
      translucency would read muddy there). */
[data-theme="light"] .stats-card .cell,
[data-theme="light"] .path-card:not(.path-card-popular),
[data-theme="light"] .how-card,
[data-theme="light"] .care-card-channel,
[data-theme="light"] .acc-item,
[data-theme="light"] .amb-note .item,
[data-theme="light"] .partner,
[data-theme="light"] .care-form-v2 {
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,.07);
  box-shadow: 0 2px 20px rgba(0,0,0,.05);
}

/* ══════════════════════════════════════════
   DIRECTIONS — card deck (Figma "Slide 16:9 - 5", file "правки-лк")
   Colors/gradients/layout taken 1:1 from Figma. Cards use dark text
   (#1d1d1b) since every gradient in the design is light/bright.

   Reference slide shows 4 full-size cards laid on top of each other in
   normal flow, each pulled up over the previous one by a fixed amount via
   negative margin — since later siblings paint over earlier ones with no
   z-index needed, this leaves only a thin title+"+" strip of every card
   except the LAST one (which is fully exposed — nothing after it to cover
   it). That last-in-DOM-order card is the "active" one. Clicking "+" on a
   peek strip moves that course to the end of the order (script.v2.js
   promoteDirCard) — no overlay/fixed-position/body-lock anywhere, which is
   also what fixed the earlier double-scrollbar bug.
══════════════════════════════════════════ */
.dir-section { padding: var(--section-py) 0 clamp(48px, 8vw, 96px); }

.dir-deck {
  --dir-h: clamp(420px, 85vh, 820px);
  /* enough room for padding-top + title/"+" + a real bottom margin, so a
     peek strip's title and "+" never crowd the card stacked below it */
  --dir-peek: clamp(84px, 13vh, 130px);
  --dir-pad: clamp(20px, 4.2vw, 44px);
  position: relative;
  max-width: min(var(--container), 1040px); /* bigger "plates" per Figma's own note, still short of the full site container so text/photo don't drift apart */
  margin: 3rem auto 0;
  padding: 0 clamp(12px, 4vw, 24px);
  display: flex;
  flex-direction: column;
}

.dir-card {
  position: relative;
  border-radius: clamp(14px, 2vw, 20px);
  overflow: hidden;
  padding: var(--dir-pad);
  height: var(--dir-h);
  display: flex;
  cursor: pointer;
}
.dir-card[hidden] { display: none; }
/* .dir-stacked (not :not(:first-child)) — the hidden 5th card (course 4) stays
   in the DOM as an actual first child even though it's display:none, which
   would make a structural selector target the wrong element; JS assigns this
   class explicitly based on the *visible* stacking order instead. */
.dir-card.dir-stacked { margin-top: calc(-1 * (var(--dir-h) - var(--dir-peek))); }

.dir-card--navigator { background: linear-gradient(135deg, #FF578B 0%, #9C6AFF 55%, #1DB4FF 100%); }
.dir-card--creator,
.dir-card--cinema    { background: linear-gradient(135deg, #FF6A00 0%, #FFC038 50%, #FEE412 100%); }
.dir-card--business  { background: linear-gradient(135deg, #6DFEC7 0%, #68FF22 50%, #D6FB37 100%); }
.dir-card--freelance { background: linear-gradient(135deg, #5182FE 0%, #1DB4FF 50%, #51FEED 100%); }
/* .dir-card--cinema reuses the creator gradient — Figma had no frame for this course (it's hidden anyway) */

/* Title is its own full-width row (top, level with "+"); everything else
   (description + image) lives in .dir-row, a second row below it that
   fills the rest of the card's height — so the image runs almost to the
   card's bottom edge and the "+"/title never overlaps it. */
.dir-card-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.dir-title {
  flex: 0 0 auto;
  font-family: 'Zen Kaku Gothic Antique', 'Manrope', sans-serif; /* Figma: Zen Kaku Gothic Antique Bold — Manrope covers Kazakh extended Cyrillic letters this font lacks (ғ, қ, ң, ө, ү, һ, ә) */
  font-size: clamp(24px, 4.4vw, 44px); /* hits Figma's exact 34px around 768px viewport instead of dipping below it in the ~650-1000px band */
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.022em;
  color: #1d1d1b;
  margin: 0;
  padding-right: clamp(50px, 7.5vw, 70px); /* keeps long titles from running under the "+" */
}

.dir-row {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: stretch; /* description column and image both span this row's full height */
  justify-content: space-between;
  gap: clamp(14px, 3.2vw, 28px);
  margin-top: clamp(22px, 3.8vw, 40px); /* clear gap so description+photo detach visually from the title */
}

.dir-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* details at top, CTA pinned to the bottom — spans the same height as the image */
}

.dir-intro {
  font-family: 'Zen Kaku Gothic Antique', 'Manrope', sans-serif; /* Figma: Zen Kaku Gothic Antique Medium 22px/26 — same family as .dir-title, was left on the inherited Inter by mistake */
  font-size: clamp(14px, 1.75vw, 22px);
  font-weight: 500;
  line-height: 1.18;
  color: #1d1d1b;
  margin: 0 0 clamp(11px, 2.2vw, 22px);
  max-width: 34ch;
}

.dir-meta {
  font-family: 'Zen Kaku Gothic Antique', 'Manrope', sans-serif;
  font-size: clamp(12px, 1.45vw, 20px);
  font-weight: 500;
  line-height: 1.7;
  color: #1d1d1b;
  margin: 0;
}
.dir-meta b { font-weight: 700; }

.dir-cta {
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-family: 'Zen Kaku Gothic Antique', 'Manrope', sans-serif;
  font-size: clamp(16px, 2.2vw, 24px);
  font-weight: 700;
  color: #1d1d1b;
  text-decoration: underline;
  cursor: pointer;
  align-self: flex-start;
}

/* Image spans the full height of .dir-row (almost to the card's bottom
   edge, matching Figma) — width is a fluid clamp (not aspect-ratio driven
   by height) specifically so it can never out-grow the card on narrow
   viewports; object-fit:cover handles whatever crop that implies. */
.dir-media {
  flex: 0 0 auto;
  width: clamp(100px, 37vw, 400px);
  height: 100%;
  border-radius: clamp(3px, 0.6vw, 4px);
  overflow: hidden;
  background: rgba(0,0,0,.06);
}
.dir-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* The card slot is much narrower than tall (most extreme on mobile), so cover
   crops width down to a thin vertical strip, not height — a centered crop on
   the two-person business photo lands in the empty gap between them. Shift
   the focal point onto the foreground face instead. */
.dir-card--business .dir-media img { object-position: 32% center; }

/* "+" always top-right of the card, on every card (active or peeking) —
   for peeks only the top of the card is exposed, so this naturally lands
   inside the visible strip without any separate positioning rule needed.
   Turns into a "×" (rotated 45°) once the card is the active/open one. */
.dir-plus {
  position: absolute;
  top: var(--dir-pad); /* same offset as the card's own padding, so it's always level with the title */
  right: clamp(10px, 2.2vw, 22px);
  width: clamp(32px, 4.8vw, 48px);
  height: clamp(32px, 4.8vw, 48px);
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.08);
  color: #1d1d1b;
  font-size: clamp(18px, 2.6vw, 28px);
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  flex-shrink: 0;
  transition: background .2s, transform .35s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .dir-plus:hover { background: rgba(0,0,0,.16); }
}
.dir-role-active .dir-plus { transform: rotate(45deg); }

/* ---- peeking cards: only title + "+" show (the description+image row
   exists but stays hidden until this course becomes active) ---- */
.dir-role-peek .dir-row { display: none; }

@media (prefers-reduced-motion: reduce) {
  .dir-card, .dir-plus { transition: none; }
}


/* ============================================================
   MOBILE HEADER — ≤768px
   1. Shrink lang-btn (font, padding, flag, chevron)
   2. Reorder: lang-dd → theme-btn → burger
   ============================================================ */
@media (max-width: 768px) {
  .lang-btn { padding: 5px 8px; font-size: 12px; gap: 3px; }
  .lang-btn .flag { font-size: 13px; }
  .lang-btn svg { width: 10px; height: 10px; }
  .lang-dd { order: 1; }
  .theme-btn { order: 2; }
  .burger { order: 3; }
  /* Final CTA button — ensure text fits on mobile */
  .final-cta { flex-direction: column; align-items: center; }
  .final-cta .btn-lg { font-size: 14px; padding: 14px 20px; width: 100%; box-sizing: border-box; text-align: center; }
}

/* ============================================================
   COMMUNITY ORBIT — shrink avatar faces on mobile/tablet
   The orbit-face size is set as an inline style by JS
   (buildOrbit() in script.v2.js, fixed 76px/66px regardless of
   viewport), which overrides any plain CSS rule — !important is
   required here to actually take effect. Desktop (≥1025px)
   untouched (falls through to the JS-set 76px/66px as before).
   ============================================================ */
@media (max-width: 767px) {
  .orbit-face { width: 38px !important; height: 38px !important; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .orbit-face { width: 50px !important; height: 50px !important; }
}
