/* Home — hero 3D stage, marquee, scroll story, bento, sections */

/* ---------- hero ---------- */
.hero { position: relative; padding-block: clamp(16px, 4vw, 48px) clamp(48px, 7vw, 88px); overflow: clip; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; min-height: min(78svh, 760px); }
.hero-copy { display: grid; gap: 22px; justify-items: start; position: relative; z-index: 2; }
.hero-copy .display { max-width: 12ch; }
.hero-proof { display: grid; gap: 8px; color: var(--ink-2); font-weight: 600; font-size: 14.5px; }
.hero-proof li { display: flex; align-items: center; gap: 8px; }
.hero-proof .svg-icon { color: var(--c-5); }
.scroll-cue { position: absolute; left: 50%; bottom: 14px; translate: -50% 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--muted); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 50% { translate: -50% 8px; } }

.aurora { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 520px; height: 520px; right: -8%; top: -12%; background: var(--c-4); }
.aurora i:nth-child(2) { width: 460px; height: 460px; left: -6%; top: 18%; background: var(--c-6); animation-delay: -6s; opacity: .4; }
.aurora i:nth-child(3) { width: 380px; height: 380px; left: 34%; bottom: -22%; background: var(--c-8); animation-delay: -11s; opacity: .35; }
html[data-theme="dark"] .aurora i { opacity: .38; }
html[data-theme="dark"] .aurora i:nth-child(3) { opacity: .18; }
@keyframes drift { to { transform: translate3d(40px, 30px, 0) scale(1.12); } }

/* 3D stage */
.stage { position: relative; perspective: 1500px; aspect-ratio: 1 / 1.02; width: min(100%, 560px); justify-self: center; --rx: 0deg; --ry: 0deg; }
.stage-inner {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(calc(var(--rx) + 10deg + var(--sy, 0) * .012deg)) rotateY(calc(var(--ry) + 16deg - var(--sy, 0) * .02deg)) rotateZ(-2deg);
  transition: transform .3s ease-out;
  animation: stage-in 1.4s var(--ease) both;
}
@keyframes stage-in { from { transform: rotateX(40deg) rotateY(-50deg) rotateZ(-14deg) scale(.7); opacity: 0; } }
.glow-ring { position: absolute; border-radius: 50%; border: 1.5px solid var(--line-strong); inset: 6%; transform: translateZ(-80px); }
.glow-ring.r2 { inset: -4%; transform: translateZ(-160px); border-style: dashed; opacity: .6; }

.s-card {
  position: absolute; border-radius: 26px; padding: 18px; color: var(--ink);
  background: var(--glass); border: 1px solid var(--line-strong); box-shadow: var(--shadow-2);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  transform: translateZ(var(--z, 0)); animation: float 7s ease-in-out infinite;
}
.s-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(260px circle at var(--gx, 30%) var(--gy, 0%), rgba(255,255,255,.35), transparent 60%); mix-blend-mode: soft-light; }
@keyframes float { 50% { translate: 0 -12px; } }
.s-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.s-head b { display: block; font-size: 15px; } .s-head small, .chat-top small { color: var(--muted); font-size: 12px; }
.s-head .icon-tile { width: 40px; height: 40px; border-radius: 12px; }

.s-plan { inset: 10% 14% auto 4%; padding: 20px; }
.s-rows { display: grid; gap: 8px; margin-bottom: 14px; }
.s-rows li { display: grid; grid-template-columns: 10px auto 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: var(--surface-2); font-size: 13.5px; }
.s-rows li > span { color: var(--muted); font-size: 12.5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.d1 { background: var(--c-3); } .dot.d2 { background: var(--c-5); } .dot.d3 { background: var(--c-6); } .dot.d4 { background: var(--c-7); }
.tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-primary); color: #fff; }
.tick.off { background: transparent; border: 1.5px solid var(--line-strong); }

.s-chat { inset: auto 0 20% auto; width: 60%; display: grid; gap: 8px; animation-delay: -2s; }
.chat-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; } .chat-top b { display: block; font-size: 14px; }
.chat-top .avatar { width: 36px; height: 36px; }
.bubble { padding: 9px 14px; border-radius: 16px; font-size: 13px; line-height: 1.7; max-width: 92%; }
.bubble.in { background: var(--surface-2); border-end-end-radius: 16px; border-start-start-radius: 4px; }
.bubble.out { background: var(--grad-primary); color: #fff; margin-inline-start: auto; border-start-end-radius: 4px; }

.s-report { inset: auto auto 2% 0; width: 52%; animation-delay: -4s; }
.bars { height: 92px; display: flex; align-items: flex-end; gap: 8px; }
.bars i { flex: 1; height: var(--h); border-radius: 8px 8px 4px 4px; background: var(--grad-hot); transform-origin: bottom; animation: grow 1.4s var(--ease) both; }
.bars i:nth-child(2) { animation-delay: .08s; } .bars i:nth-child(3) { animation-delay: .16s; } .bars i:nth-child(4) { animation-delay: .24s; } .bars i:nth-child(5) { animation-delay: .32s; } .bars i:nth-child(6) { animation-delay: .4s; } .bars i:nth-child(7) { animation-delay: .48s; }
@keyframes grow { from { transform: scaleY(.1); } }
.bars.big { height: 130px; margin: 6px 0 16px; }

.s-chip { position: absolute; padding: 9px 16px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; transform: translateZ(var(--z)); animation: float 6s ease-in-out infinite; box-shadow: var(--shadow-2); }
.chip-1 { top: 2%; right: 2%; background: var(--grad-sun); color: #2a0f40; }
.chip-2 { bottom: 34%; left: 2%; background: var(--c-1); color: #fff; animation-delay: -3s; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--surface); transform: rotate(-1.2deg) scale(1.02); margin-block: 8px 0; }
.marquee-track { display: flex; width: max-content; direction: ltr; gap: 28px; padding: 16px 0; animation: marq 36s linear infinite; font-size: clamp(20px, 3vw, 30px); font-weight: 900; white-space: nowrap; align-items: center; }
.marquee-track span { color: var(--ink); }
.marquee-track b { width: 10px; height: 10px; border-radius: 50%; background: var(--grad-hot); font-size: 0; display: inline-block; flex: none; }
@keyframes marq { to { transform: translateX(-50%); } }

/* ---------- scroll story ---------- */
.story { height: 380vh; position: relative; --s: 0; }
.story[data-step="0"] { --s: 0; } .story[data-step="1"] { --s: 1; } .story[data-step="2"] { --s: 2; }
.story-sticky { position: sticky; top: 0; height: 100svh; display: grid; align-items: center; overflow: clip; }
.story-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(20px, 4vw, 64px); align-items: center; }
.story-copy { display: grid; position: relative; }
.story-item { grid-area: 1 / 1; display: grid; gap: 18px; justify-items: start; opacity: 0; transform: translateY(26px); pointer-events: none; transition: opacity .6s var(--ease), transform .7s var(--ease); }
.story-item .h1 { font-size: clamp(30px, 4.4vw, 54px); }
.story[data-step="0"] .story-item[data-i="0"], .story[data-step="1"] .story-item[data-i="1"], .story[data-step="2"] .story-item[data-i="2"] { opacity: 1; transform: none; pointer-events: auto; }
.story-dots { display: flex; gap: 8px; margin-top: 150px; grid-area: 1 / 1; align-self: end; }
.story-dots i { width: 28px; height: 6px; border-radius: 6px; background: var(--surface-3); transition: width .4s var(--ease), background .4s; }
.story[data-step="0"] .story-dots i:nth-child(1), .story[data-step="1"] .story-dots i:nth-child(2), .story[data-step="2"] .story-dots i:nth-child(3) { width: 56px; background: var(--grad-hot); }

.story-stage { position: relative; perspective: 1400px; height: min(520px, 62svh); display: grid; place-items: center; }
.deck { position: relative; width: min(100%, 440px); height: 100%; transform-style: preserve-3d; transform: rotateX(8deg) rotateY(calc((var(--p, 0) - .5) * -34deg)); transition: transform .2s linear; }
.sc {
  --d: calc(var(--i) - var(--s));
  position: absolute; inset: 8% 0 auto 0; padding: 22px; border-radius: 30px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-2);
  --ahead: max(0, var(--d));   /* cards still to come sit behind the active one */
  --gone: min(0, var(--d));    /* cards already shown fly up and away */
  transform: translate3d(calc(var(--ahead) * -9% + var(--gone) * -30%), calc(var(--ahead) * -7% + var(--gone) * -24%), calc(var(--ahead) * -170px)) rotateY(calc(var(--ahead) * 12deg + var(--gone) * -18deg)) rotateZ(calc(var(--ahead) * -2deg + var(--gone) * 6deg));
  opacity: max(0, calc((1 - var(--ahead) * .4) * (1 + var(--gone))));
  transition: transform .9s var(--ease), opacity .7s var(--ease);
  display: grid; gap: 10px; min-height: 270px;
}
.sc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; } .sc-top b { display: block; } .sc-top small { color: var(--muted); font-size: 12px; }
.sc-top .icon-tile { width: 42px; height: 42px; border-radius: 13px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; } .week i { height: 10px; border-radius: 6px; background: var(--surface-3); } .week i.on { background: var(--grad-primary); }
.floor { position: absolute; bottom: 4%; left: 12%; right: 12%; height: 40px; border-radius: 50%; background: radial-gradient(closest-side, rgba(123,44,191,.35), transparent); filter: blur(10px); }

@media (max-width: 860px) {
  .aurora i { filter: blur(60px); }
  .aurora i:nth-child(1) { width: 300px; height: 300px; opacity: .4; }
  .aurora i:nth-child(2) { width: 260px; height: 260px; opacity: .3; }
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-copy .display { max-width: none; }
  .stage { width: min(100%, 420px); margin-top: 8px; }
  .story { height: 330vh; }
  .story-sticky { padding-top: calc(var(--header-h) + 4px); padding-bottom: calc(var(--bar-h) + 24px); align-items: start; }
  .story-grid { grid-template-columns: 1fr; gap: 6px; }
  .story-item { gap: 10px; } .story-item .lead { font-size: 15px; line-height: 1.8; }
  .story-dots { margin-top: 0; position: absolute; bottom: -22px; }
  .story-stage { height: 300px; }
  .sc { min-height: 230px; padding: 16px; border-radius: 24px; }
}

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.tile { grid-column: span 2; padding: 26px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); display: grid; gap: 12px; align-content: start; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .3s ease-out, box-shadow .3s; position: relative; overflow: hidden; }
.tile:hover { box-shadow: var(--shadow-2); }
.tile p { color: var(--ink-2); font-size: 15px; }
.tile .link-arrow, .tile .btn { justify-self: start; }
.t-wide { grid-column: span 4; }
.t-hot.t-wide { grid-column: 1 / -1; grid-template-columns: 1fr auto; align-items: center; }
.t-hot.t-wide .icon-tile, .t-hot.t-wide h3, .t-hot.t-wide p { grid-column: 1; }
.t-hot.t-wide .btn { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
@media (max-width: 900px) { .t-hot.t-wide { grid-template-columns: 1fr; } .t-hot.t-wide .btn { grid-column: 1; grid-row: auto; } }
.t-purple { background: linear-gradient(140deg, var(--c-1), var(--c-2) 60%, var(--c-3)); color: #fff; border-color: transparent; }
.t-purple p { color: #eadcff; } .t-purple .link-arrow { color: var(--c-10); } .t-purple .icon-tile { background: rgba(255,255,255,.2); }
.t-sun { background: linear-gradient(140deg, var(--c-8), var(--c-7) 55%, var(--c-6)); color: #2a0f40; border-color: transparent; }
.t-sun p { color: #4a2a1a; } .t-sun .icon-tile { background: rgba(42,15,64,.9); color: var(--c-9); }
.t-hot { background: linear-gradient(140deg, var(--c-4), var(--c-5) 55%, var(--c-6)); color: #fff; border-color: transparent; }
.t-hot p { color: #fff0f6; } .t-hot .icon-tile { background: rgba(255,255,255,.22); }
@media (max-width: 900px) { .bento { grid-template-columns: repeat(2, 1fr); } .tile, .t-wide { grid-column: span 1; } .t-wide { grid-column: 1 / -1; } }
@media (max-width: 560px) { .bento { grid-template-columns: 1fr; } }

/* ---------- mentors / courses / teachers ---------- */
.mentors-sec { background: linear-gradient(180deg, transparent, var(--bg-soft) 18%, var(--bg-soft) 82%, transparent); }
.mentor-card, .teacher-card { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.mentor-card:hover, .teacher-card:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px); }
.teacher-card { text-align: center; justify-items: center; display: grid; }
.teacher-card .avatar-lg { margin-inline: auto; }
.join-banner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: clamp(22px, 4vw, 40px); border-radius: var(--r-xl); background: var(--grad-brand); color: #fff; position: relative; overflow: hidden; }
.join-banner h3 { display: flex; gap: 8px; align-items: center; } .join-banner p { max-width: 56ch; margin-top: 8px; color: #fff7ff; }
.course-toolbar { display: grid; gap: 14px; grid-template-columns: minmax(240px, 380px) 1fr; align-items: center; }
@media (max-width: 760px) { .course-toolbar { grid-template-columns: 1fr; } .course-toolbar .row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; } }
.course-card[hidden] { display: none; }

/* ---------- final CTA ---------- */
.cta-wrap { padding-block: clamp(24px, 6vw, 72px); perspective: 1200px; }
.cta { position: relative; overflow: hidden; text-align: center; display: grid; gap: 22px; justify-items: center; padding: clamp(40px, 8vw, 96px) clamp(20px, 5vw, 64px); border-radius: 40px; color: #fff; background: linear-gradient(135deg, var(--c-1), var(--c-2) 45%, var(--c-4) 80%, var(--c-5)); transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .3s ease-out; box-shadow: var(--shadow-2); }
.cta .display { font-size: clamp(32px, 6vw, 68px); }
.sun-text { background: var(--grad-sun); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta-glow { position: absolute; width: 480px; height: 480px; border-radius: 50%; left: var(--gx, 20%); top: var(--gy, 0%); translate: -50% -50%; background: radial-gradient(closest-side, rgba(253,230,138,.5), transparent); pointer-events: none; }
.cta > *:not(.cta-glow) { position: relative; }

@media (prefers-reduced-motion: reduce) {
  .stage-inner { animation: none; transform: rotateX(10deg) rotateY(16deg); }
  .story { height: auto; } .story-sticky { position: static; height: auto; padding-block: 48px; }
  .story-item { opacity: 1; transform: none; grid-area: auto; margin-bottom: 32px; pointer-events: auto; } .story-copy { display: grid; } .story-dots { display: none; }
  .story-stage { display: none; }
}
