/* =========================================================
   CodeNMath Academy — Playful 3D Theme
   ========================================================= */
:root {
  --ink: #24195b;
  --ink-2: #3b2f7a;
  --text: #55507a;
  --orange: #f26a2e;
  --orange-2: #ff9152;
  --purple: #8b6cf6;
  --purple-2: #b4a1ff;
  --yellow: #ffc93c;
  --mint: #34c9a0;
  --cream: #fff7f2;
  --lilac: #f4f0ff;
  --peach: #fff1e8;
  --border: #ece6fb;
  --r: 28px;
  --fd: 'Outfit', 'Poppins', system-ui, sans-serif;
  --shadow: 0 10px 30px rgba(52, 35, 120, .08);
  --shadow-lg: 0 24px 60px rgba(52, 35, 120, .15);
  --g-orange: linear-gradient(135deg, #ff9152, #f26a2e 55%, #e2541a);
  --g-purple: linear-gradient(135deg, #b4a1ff, #8b6cf6);
  --g-yellow: linear-gradient(135deg, #ffe07a, #ffc93c);
  --bs-primary: #f26a2e; --bs-primary-rgb: 242, 106, 46;
}
* { scroll-behavior: smooth; }
html { scroll-padding-top: 96px; }
body { font-family: 'Poppins', system-ui, sans-serif; color: var(--text); line-height: 1.75; background: #fff; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6, .btn, .navbar, .brand-text { font-family: var(--fd); }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 1rem; }
h3 { font-weight: 700; }
a { color: var(--orange); text-decoration: none; transition: color .2s; }
a:hover { color: #d4501a; }
img { max-width: 100%; height: auto; }
.t-orange { color: var(--orange); }
.t-yellow { color: var(--yellow); }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 2000; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { left: 1rem; top: 1rem; color: #fff; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn { font-weight: 700; border-radius: 50px; padding: .7rem 1.6rem; letter-spacing: .01em; transition: transform .25s, box-shadow .25s, background .25s, color .25s; border: 0; }
.btn-lg { padding: 1rem 2.2rem; font-size: 1.1rem; }
.btn-sm { padding: .5rem 1.15rem; font-size: .9rem; }
.btn-orange { background: var(--g-orange); color: #fff; box-shadow: 0 10px 24px rgba(242, 106, 46, .35), inset 0 -3px 0 rgba(0,0,0,.08); }
.btn-orange:hover, .btn-orange:focus { color: #fff; transform: translateY(-3px); box-shadow: 0 16px 30px rgba(242, 106, 46, .45); }
.btn-white { background: #fff; color: var(--ink); box-shadow: 0 8px 22px rgba(52, 35, 120, .1); border: 2px solid var(--border); }
.btn-white:hover { color: var(--orange); transform: translateY(-3px); border-color: #ffd6c2; }
.btn-ink { background: var(--ink); color: #fff; box-shadow: 0 10px 24px rgba(36, 25, 91, .25); }
.btn-ink:hover { background: var(--ink-2); color: #fff; transform: translateY(-3px); }
.btn-soft { background: var(--lilac); color: var(--ink); }
.btn-soft:hover { background: var(--purple); color: #fff; transform: translateY(-2px); }
.btn-peach { background: #ffe3d3; color: var(--ink); }
.btn-peach:hover { background: #ffd0b6; color: var(--ink); }
.btn-light-pill { background: #fff; color: var(--orange); box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.btn-light-pill:hover { color: #d4501a; transform: translateY(-3px); }
.btn-ghost-light { background: rgba(255,255,255,.12); color: #fff; border: 2px solid rgba(255,255,255,.55); }
.btn-ghost-light:hover { background: #fff; color: var(--ink); transform: translateY(-3px); }
.btn-whatsapp { background: #25d366; color: #fff; box-shadow: 0 10px 24px rgba(37, 211, 102, .3); }
.btn-whatsapp:hover { background: #1eb957; color: #fff; transform: translateY(-3px); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 1030; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); transition: box-shadow .3s; }
.site-header.scrolled { box-shadow: 0 8px 30px rgba(52, 35, 120, .08); }
.navbar { padding: .7rem 0; }
.brand { display: flex; align-items: center; gap: .5rem; }
.brand-bot { width: 52px; height: 52px; filter: drop-shadow(0 6px 10px rgba(242,106,46,.25)); transition: transform .4s; }
.brand:hover .brand-bot { transform: rotate(-10deg) scale(1.06); }
.brand-text { font-weight: 800; font-size: 1.55rem; line-height: .95; letter-spacing: -.02em; }
.brand-text .b1 { color: var(--orange); } .brand-text .b2 { color: var(--ink); }
.brand-text small { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .38em; text-transform: uppercase; color: var(--ink); margin-top: 3px; opacity: .8; }
.brand-light .brand-text .b2, .brand-light .brand-text small { color: #fff; }
.navbar .nav-link { color: var(--ink); font-weight: 600; font-size: 1.08rem; padding: .55rem 1rem !important; border-radius: 50px; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--orange); }
.nav-pill { background: #dff8ef; color: #0f6b52 !important; display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.2rem !important; }
.nav-pill:hover { background: #c9f2e3; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); display: inline-block; flex-shrink: 0; animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,201,160,.6); } 70% { box-shadow: 0 0 0 8px rgba(52,201,160,0); } 100% { box-shadow: 0 0 0 0 rgba(52,201,160,0); } }
.dd-toggle { background: none; border: 0; color: var(--ink); padding: .4rem .5rem; font-size: .85rem; }
.dd-toggle i { display: inline-block; transition: transform .25s; }
.dd-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
@media (min-width: 1200px) {
  .hover-dropdown .dd-toggle { margin-left: -.9rem; }
  .hover-dropdown:hover > .dropdown-menu, .hover-dropdown:focus-within > .dropdown-menu { display: block; }
  .hover-dropdown .dropdown-menu { top: 100%; margin-top: 0; }
  .hover-dropdown:hover .dd-toggle i { transform: rotate(180deg); }
}
.dropdown-menu { border: 0; border-radius: 22px; box-shadow: var(--shadow-lg); padding: .7rem; min-width: 310px; animation: ddIn .22s ease; }
@keyframes ddIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.dropdown-item { border-radius: 14px; padding: .55rem .8rem; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: .8rem; font-family: var(--fd); white-space: normal; }
.dropdown-item small { display: block; font-size: .78rem; font-weight: 500; color: var(--text); font-family: 'Poppins', sans-serif; }
.dd-ic { width: 38px; height: 38px; background: var(--lilac); border-radius: 12px; padding: 4px; flex-shrink: 0; }
.dropdown-item:hover, .dropdown-item.active { background: var(--cream); color: var(--orange); }
.dd-all { justify-content: center; color: var(--orange); margin-top: .3rem; background: var(--cream); }
.navbar-toggler { border: 0; padding: .5rem; display: flex; flex-direction: column; gap: 5px; background: var(--lilac); border-radius: 14px; }
.navbar-toggler:focus { box-shadow: none; }
.toggler-bar { width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: .3s; }
.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(2) { opacity: 0; }
.navbar-toggler[aria-expanded="true"] .toggler-bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
@media (max-width: 1199.98px) {
  .navbar-collapse { padding: 1rem 0 .5rem; max-height: calc(100vh - 80px); overflow-y: auto; }
  .navbar .nav-link { padding: .7rem .6rem !important; }
  .nav-pill { margin: .3rem 0; }
  .dropdown-menu { position: static !important; box-shadow: none; background: var(--lilac); margin: .3rem 0; min-width: 0; }
  .dropdown-menu.show { display: block; }
}

/* ---------- Decorative ---------- */
.orb { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; }
.orb-orange { width: 110px; height: 110px; left: 6%; top: 34%; background: radial-gradient(circle at 32% 28%, #ffd2b3 0, #ff9152 28%, #f26a2e 62%, #c94713 100%); box-shadow: 0 25px 40px rgba(242,106,46,.3); animation: floatY 7s ease-in-out infinite; }
.orb-purple { width: 84px; height: 84px; right: 8%; bottom: 16%; background: radial-gradient(circle at 32% 28%, #e8e0ff 0, #b4a1ff 30%, #8b6cf6 65%, #6343d8 100%); box-shadow: 0 25px 40px rgba(139,108,246,.3); animation: floatY 8s ease-in-out infinite reverse; }
.spark { position: absolute; color: var(--orange-2); font-size: 2.2rem; z-index: 0; animation: twinkle 3s ease-in-out infinite; }
.sp1 { left: 18%; top: 14%; } .sp2 { right: 24%; bottom: 10%; color: var(--purple-2); font-size: 1.6rem; animation-delay: 1.2s; }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.7) rotate(45deg); opacity: .6; } }
.hero-grid { position: absolute; inset: 0; z-index: 0; background-image: linear-gradient(rgba(36,25,91,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(36,25,91,.04) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
.float { animation: floatY 6s ease-in-out infinite; }
.float-rev { animation: floatY 7s ease-in-out infinite reverse; }
.float-soft { animation: floatY 5s ease-in-out infinite; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 70px 0 100px; background: radial-gradient(ellipse at 10% 0%, #ffe5d6 0, transparent 50%), radial-gradient(ellipse at 100% 100%, #e6ddff 0, transparent 55%), linear-gradient(180deg, #fff6f0, #f7f2ff); }
.hero-bot { position: absolute; right: 3%; top: 150px; width: clamp(120px, 12vw, 190px); z-index: 1; filter: drop-shadow(0 25px 30px rgba(52,35,120,.2)); }
.hero-side { position: absolute; z-index: 1; filter: drop-shadow(0 18px 24px rgba(52,35,120,.18)); }
.hs-l { left: 4%; bottom: 12%; width: clamp(70px, 9vw, 120px); }
.hs-r { left: 15%; top: 16%; width: clamp(50px, 6vw, 80px); }
.topic-pills { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .2rem; background: rgba(255,255,255,.85); border: 2px solid #f3e4ff; border-radius: 50px; padding: .45rem .6rem; box-shadow: var(--shadow); margin-bottom: 2.2rem; }
.topic-pills > span { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--fd); font-weight: 700; color: var(--ink); font-size: 1.1rem; padding: .15rem .9rem .15rem .3rem; border-right: 2px solid #f1ebfb; }
.topic-pills > span:last-child { border-right: 0; }
.tp { width: 38px; height: 38px; border-radius: 12px; display: inline-grid; place-items: center; color: #fff; font-size: 1.05rem; box-shadow: inset 0 -3px 0 rgba(0,0,0,.1); }
.tp-orange { background: var(--g-orange); } .tp-purple { background: var(--g-purple); } .tp-mint { background: linear-gradient(135deg, #6ee7c7, #34c9a0); }
.tp-yellow { background: var(--g-yellow); color: var(--ink); } .tp-lilac { background: #e8e0ff; color: var(--purple); }
.hero-title { font-size: clamp(2.4rem, 6vw, 5.2rem); font-weight: 900; line-height: 1.08; margin: 0 auto 1.8rem; max-width: 1100px; }
.ipill { display: inline-grid; place-items: center; width: 1.5em; height: .95em; border-radius: 50px; font-size: .9em; vertical-align: .02em; box-shadow: 0 10px 24px rgba(52,35,120,.15), inset 0 -4px 0 rgba(0,0,0,.08); }
.ipill i { font-size: .52em; }
.ip-orange { background: var(--g-orange); color: var(--ink); } .ip-purple { background: var(--g-purple); color: #fff; } .ip-yellow { background: var(--g-yellow); color: var(--ink); }
.hero-text { font-size: clamp(1.05rem, 1.6vw, 1.35rem); color: var(--ink-2); max-width: 860px; margin: 0 auto 2.4rem; }
.hero-text u { text-decoration: none; color: var(--purple); font-weight: 600; background: linear-gradient(var(--purple-2), var(--purple-2)) bottom/100% 3px no-repeat; }
.live-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--orange); margin-right: .5rem; vertical-align: .05em; }

/* ---------- Sections ---------- */
.section { padding: 100px 0; position: relative; }
.section-lilac { background: linear-gradient(180deg, #f8f5ff, #f3eeff); }
.section-peach { background: linear-gradient(180deg, #fff8f3, #fff1e8); }
.section-head { max-width: 820px; margin-bottom: 3.2rem; }
.section-desc { font-size: 1.12rem; color: var(--text); }
.pill-kicker { display: inline-flex; align-items: center; gap: .6rem; background: #fff; border: 2px solid var(--border); color: var(--ink); font-family: var(--fd); font-weight: 700; font-size: 1rem; padding: .45rem 1.2rem; border-radius: 50px; margin-bottom: 1.2rem; box-shadow: var(--shadow); }
.pill-kicker .dot { background: var(--orange); animation: none; }
.pk-white { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.3); color: #fff; box-shadow: none; }
.pk-white .dot { background: var(--yellow); }
.display-h { font-size: clamp(2.4rem, 5vw, 4.2rem); }

/* ---------- Course card ---------- */
.tint-yellow { --tint: linear-gradient(160deg, #fff6d6, #ffe7a3); }
.tint-purple { --tint: linear-gradient(160deg, #f1ecff, #ddd2ff); }
.tint-mint { --tint: linear-gradient(160deg, #e3fbf3, #bff0df); }
.tint-peach { --tint: linear-gradient(160deg, #fff1e8, #ffd9c4); }
.tint-orange { --tint: linear-gradient(160deg, #ffe9dc, #ffc6a6); }
.course-card { background: #fff; border-radius: var(--r); padding: .7rem; box-shadow: var(--shadow); border: 2px solid #f5f1fd; display: flex; flex-direction: column; transition: transform .35s, box-shadow .35s; }
.course-card:hover { transform: translateY(-10px) rotate(-.4deg); box-shadow: var(--shadow-lg); }
.course-art { position: relative; display: grid; place-items: center; height: 200px; border-radius: 22px; background: var(--tint); overflow: hidden; }
.course-art::after { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.45); }
.course-art img { position: relative; z-index: 1; width: 140px; height: 140px; filter: drop-shadow(0 18px 18px rgba(52,35,120,.2)); transition: transform .4s; }
.course-card:hover .course-art img { transform: scale(1.1) rotate(-6deg); }
.course-tag { position: absolute; top: 14px; left: 14px; z-index: 2; background: rgba(255,255,255,.9); color: var(--ink); font-size: .75rem; font-weight: 700; padding: .3rem .8rem; border-radius: 50px; }
.course-body { padding: 1.3rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; }
.level-chip { align-self: flex-start; font-size: .75rem; font-weight: 600; color: #0f6b52; background: #dff8ef; padding: .2rem .7rem; border-radius: 50px; margin-bottom: .7rem; }
.course-body h3 { font-size: 1.4rem; margin-bottom: .5rem; }
.course-body h3 a { color: var(--ink); }
.course-body h3 a:hover { color: var(--orange); }
.course-body p { font-size: .95rem; flex: 1; }
.course-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Robot Quest ---------- */
.quest-section { background: linear-gradient(180deg, #fff, #f6f1ff); }
.quest-shell { background: rgba(255,255,255,.7); border: 2px solid #efe9fd; border-radius: 44px; padding: 1.6rem; box-shadow: var(--shadow-lg); }
.quest-game { position: relative; background: linear-gradient(180deg, #dbeeff 0, #e8f4ff 45%, #f1f8ff 100%); border-radius: 32px; padding: 1.4rem; height: 100%; overflow: hidden; }
.quest-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; position: relative; z-index: 2; }
.quest-top h3 { font-size: 1.7rem; margin: 0; }
.levels { display: flex; align-items: center; gap: .4rem; background: #fff; padding: .35rem .45rem .35rem 1rem; border-radius: 50px; box-shadow: var(--shadow); font-family: var(--fd); font-weight: 700; color: var(--ink); }
.lvl { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--lilac); color: var(--purple); font-weight: 800; display: grid; place-items: center; font-family: var(--fd); }
.lvl.active { background: var(--g-orange); color: #fff; box-shadow: 0 6px 14px rgba(242,106,46,.4); }
.lvl.done:not(.active) { background: #dff8ef; color: #0f6b52; }
.lvl:disabled { cursor: not-allowed; }
.quest-sky { position: relative; height: 70px; }
.q-sun { position: absolute; right: 6%; top: 2px; width: 56px; animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.q-cloud { position: absolute; opacity: .95; animation: drift 14s ease-in-out infinite alternate; }
.c1 { left: 8%; top: 4px; width: 70px; } .c2 { left: 48%; top: 18px; width: 54px; animation-duration: 18s; }
@keyframes drift { to { transform: translateX(40px); } }
.board-wrap { position: relative; }
.board { position: relative; display: grid; grid-template-columns: repeat(var(--cols, 7), 1fr); gap: 4px; background: #9fdcb9; border-radius: 18px; padding: 6px; box-shadow: 0 10px 0 #e48a52, 0 22px 30px rgba(52,35,120,.18); }
.tile { aspect-ratio: 1; border-radius: 10px; background: linear-gradient(180deg, #b6ecc9, #a3e2bb); position: relative; display: grid; place-items: center; }
.tile.path { background: linear-gradient(180deg, #ffeaa9, #ffdc85); box-shadow: inset 0 -4px 0 rgba(214,160,60,.35); }
.tile.goal { background: radial-gradient(circle, #fff3c4 0 30%, #ffd36b 31% 45%, #ffeaa9 46%); }
.tile img { width: 72%; height: auto; pointer-events: none; }
.tile .deco { width: 62%; opacity: .95; }
.tile .star-pick { width: 52%; transition: transform .3s, opacity .3s; }
.tile .star-pick.got { transform: scale(1.6); opacity: 0; }
.robot-piece { position: absolute; z-index: 3; display: grid; place-items: center; transition: left .38s ease, top .38s ease; pointer-events: none; }
.robot-piece img { width: 82%; filter: drop-shadow(0 6px 6px rgba(0,0,0,.25)); }
.robot-piece.bump img { animation: bump .4s; }
.robot-piece.win img { animation: hop .6s 2; }
@keyframes bump { 25% { transform: translateX(-6px) rotate(-8deg); } 75% { transform: translateX(6px) rotate(8deg); } }
@keyframes hop { 50% { transform: translateY(-18px) scale(1.1); } }
.quest-code { background: #fff; border-radius: 32px; padding: 1.8rem; height: 100%; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.quest-code h3 { font-size: 1.7rem; margin-bottom: .2rem; }
.editor { position: relative; background: #f1eefc; border-radius: 22px; padding: 1rem 1.2rem; margin: 1.2rem 0 1rem; min-height: 230px; flex: 1; }
.editor-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--fd); font-weight: 700; color: var(--ink); margin-bottom: .6rem; }
.blocks-count { background: #fff; padding: .25rem .8rem; border-radius: 50px; font-size: .9rem; }
.blocks-count.full { color: var(--orange); }
.editor-lines { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.05rem; color: var(--ink); padding-left: 2rem; margin: 0; max-height: 260px; overflow-y: auto; }
.editor-lines li { padding: .15rem .5rem; border-radius: 8px; cursor: pointer; }
.editor-lines li::marker { color: #9a93bd; font-size: .9rem; }
.editor-lines li:hover { background: #ffe3d3; text-decoration: line-through; }
.editor-lines li.running { background: #fff; box-shadow: 0 0 0 2px var(--orange-2); }
.editor-empty { color: #9a93bd; font-family: ui-monospace, monospace; padding-left: .3rem; }
.quest-msg { min-height: 1.6rem; font-weight: 600; margin-bottom: .6rem; }
.quest-msg.ok { color: #0f8a66; } .quest-msg.err { color: #d4501a; }
.code-blocks { display: flex; flex-wrap: wrap; gap: .6rem; }
.code-block { flex: 1 1 110px; background: #fff; border: 2px solid #ffd6c2; border-radius: 16px; padding: .7rem .6rem; font-family: ui-monospace, monospace; font-weight: 600; color: var(--ink); box-shadow: 0 4px 0 #ffd6c2; transition: transform .15s, box-shadow .15s; }
.code-block i { color: var(--orange); }
.code-block:hover { transform: translateY(-2px); }
.code-block:active { transform: translateY(3px); box-shadow: 0 1px 0 #ffd6c2; }
.run-btn { flex: 1 1 110px; border-radius: 16px; font-size: 1.15rem; }
.quest-shell.is-running .code-block, .quest-shell.is-running #questClear { pointer-events: none; opacity: .6; }

/* ---------- Features ---------- */
.feature-card { background: #fff; padding: 2rem 1.8rem; border-radius: var(--r); border: 2px solid #f3effc; height: 100%; transition: all .35s; box-shadow: var(--shadow); }
.feature-card.tint-yellow, .feature-card.tint-purple, .feature-card.tint-mint, .feature-card.tint-peach { background: var(--tint); border-color: transparent; }
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.feature-art { width: 92px; height: 92px; border-radius: 26px; background: var(--lilac); display: grid; place-items: center; margin-bottom: 1.3rem; transition: transform .35s; }
.feature-card.tint-yellow .feature-art, .feature-card.tint-purple .feature-art, .feature-card.tint-mint .feature-art, .feature-card.tint-peach .feature-art { background: rgba(255,255,255,.6); }
.feature-art img { width: 64px; height: 64px; filter: drop-shadow(0 8px 8px rgba(52,35,120,.15)); }
.feature-card:hover .feature-art { transform: rotate(-8deg) scale(1.06); }
.feature-card h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.feature-card p { margin-bottom: 0; }

/* ---------- Audience picker ---------- */
.aud-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-top: 2rem; }
.aud-tab { background: #fff; border: 2px solid transparent; border-radius: 24px; padding: 1rem .5rem; display: flex; flex-direction: column; align-items: center; gap: .2rem; box-shadow: var(--shadow); transition: all .3s; }
.aud-tab strong { font-family: var(--fd); font-size: 1.3rem; color: var(--ink); line-height: 1.1; }
.aud-tab small { color: var(--text); font-weight: 500; font-size: .8rem; text-align: center; line-height: 1.2; }
.aud-ic { width: 44px; height: 44px; margin-bottom: .3rem; }
.aud-tab:hover { transform: translateY(-4px); }
.aud-tab.active { background: var(--g-orange); box-shadow: 0 16px 30px rgba(242,106,46,.35); transform: translateY(-4px); }
.aud-tab.active strong, .aud-tab.active small { color: #fff; }
.aud-card { background: rgba(255,255,255,.75); border-radius: 40px; padding: 1.4rem; box-shadow: var(--shadow-lg); border: 2px solid #fff; }
.aud-panel { display: grid; gap: .8rem; animation: ddIn .35s ease; }
.aud-row { display: flex; align-items: center; gap: 1.1rem; background: linear-gradient(90deg, #fff, #fff8f3); border-radius: 26px; padding: .9rem 1.1rem; color: var(--text); transition: all .3s; border: 2px solid #fdf0e8; }
.aud-row:hover { transform: translateX(6px); box-shadow: var(--shadow); color: var(--text); }
.aud-art { width: 82px; height: 82px; flex-shrink: 0; border-radius: 22px; background: var(--tint); display: grid; place-items: center; }
.aud-art img { width: 58px; height: 58px; }
.aud-txt { flex: 1; }
.aud-txt strong { display: block; font-family: var(--fd); font-size: 1.3rem; color: var(--ink); }
.aud-txt small { font-size: .93rem; display: block; line-height: 1.5; }
.aud-go { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--ink); box-shadow: var(--shadow); transition: all .3s; }
.aud-row:hover .aud-go { background: var(--orange); color: #fff; }

/* ---------- Art collage ---------- */
.art-collage { position: relative; height: 420px; display: grid; place-items: center; }
.ac-blob { position: absolute; width: 360px; height: 360px; max-width: 90%; border-radius: 42% 58% 55% 45% / 45% 40% 60% 55%; background: linear-gradient(135deg, #ffe2d1, #e7defe); animation: morph 10s ease-in-out infinite; }
.ac-blob-2 { background: linear-gradient(135deg, #dff8ef, #fff1c9); }
@keyframes morph { 50% { border-radius: 58% 42% 45% 55% / 55% 60% 40% 45%; } }
.art-collage img { position: absolute; filter: drop-shadow(0 20px 24px rgba(52,35,120,.2)); }
.ac-main { width: 240px; z-index: 2; }
.ac-a { width: 96px; left: 10%; top: 8%; } .ac-b { width: 86px; right: 12%; top: 12%; } .ac-c { width: 100px; right: 14%; bottom: 8%; }

/* ---------- Stats ---------- */
.stats-section { padding: 30px 0 80px; }
.stats-wrap { background: linear-gradient(135deg, var(--ink), #3f2f95); border-radius: 40px; padding: 2.2rem; position: relative; overflow: hidden; }
.stats-wrap::after { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(139,108,246,.5), transparent 70%); right: -120px; top: -160px; }
.stat-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 26px; padding: 1.5rem 1rem; text-align: center; position: relative; z-index: 1; height: 100%; }
.stat-art { width: 60px; height: 60px; }
.stat-num { font-family: var(--fd); font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 900; color: #fff; line-height: 1.1; margin-top: .4rem; }
.stat-label { color: #d6cffa; font-weight: 500; }

/* ---------- Founders ---------- */
.founder-card { padding: 2.6rem 2rem; border-radius: 36px; text-align: center; height: 100%; transition: transform .35s, box-shadow .35s; background: #fff; box-shadow: var(--shadow); border: 2px solid #f3effc; }
.founder-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.founder-avatar { width: 140px; height: 140px; border-radius: 50%; margin: 0 auto 1.4rem; display: grid; place-items: center; overflow: hidden; border: 6px solid #fff; box-shadow: 0 16px 30px rgba(52,35,120,.18); }
.fc-orange .founder-avatar { background: var(--g-orange); } .fc-purple .founder-avatar { background: var(--g-purple); }
.founder-avatar span { color: #fff; font-family: var(--fd); font-size: 2.8rem; font-weight: 800; }
.founder-avatar img { width: 100%; height: 100%; object-fit: cover; }
.founder-card h3 { font-size: 1.6rem; margin-bottom: .2rem; }
.founder-role { color: var(--orange); font-weight: 600; }

/* ---------- Robotics promo ---------- */
.robotics-promo { padding: 20px 0 40px; }
.promo-box { background: var(--g-orange); border-radius: 44px; padding: 4rem 3.5rem; color: #fff3ea; position: relative; overflow: hidden; }
.promo-box::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.18) 1.5px, transparent 1.5px); background-size: 24px 24px; }
.promo-box > .row { position: relative; }
.promo-box h2 { color: #fff; font-size: clamp(2.2rem, 4.5vw, 3.6rem); }
.promo-art { position: relative; height: 360px; display: grid; place-items: center; }
.promo-art::before { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,.2); }
.promo-art img { position: absolute; filter: drop-shadow(0 22px 24px rgba(120,40,0,.3)); }
.pa-main { width: 260px; z-index: 2; } .pa-a { width: 90px; left: 6%; top: 10%; } .pa-b { width: 70px; right: 10%; top: 6%; }
.pa-c { width: 80px; left: 12%; bottom: 6%; } .pa-d { width: 74px; right: 8%; bottom: 14%; }

/* ---------- Lists ---------- */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 2.2rem; margin-bottom: .85rem; color: var(--ink-2); font-weight: 500; }
.check-list li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: #dff8ef; color: #0f8a66; display: grid; place-items: center; font-size: 1.1rem; }
.check-list.light li { color: #fff; }
.check-list.light li::before { background: rgba(255,255,255,.25); color: #fff; }
.mini-row { display: flex; align-items: center; gap: 1rem; background: #fff; border-radius: 20px; padding: .9rem 1.1rem; box-shadow: var(--shadow); height: 100%; color: var(--ink-2); font-weight: 500; }
.mini-row img { width: 44px; height: 44px; flex-shrink: 0; }

/* ---------- CTA ---------- */
.cta-section { padding: 60px 0 100px; }
.cta-box { position: relative; background: linear-gradient(135deg, #8b6cf6, #6a4be0 50%, #3f2f95); border-radius: 44px; padding: 80px 30px; text-align: center; color: #e9e3ff; overflow: hidden; }
.cta-box::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.14) 1.5px, transparent 1.5px); background-size: 24px 24px; }
.cta-box > * { position: relative; }
.cta-box h2 { color: #fff; max-width: 800px; margin: 0 auto 1rem; }
.cta-box p { max-width: 620px; margin: 0 auto 2rem; font-size: 1.12rem; }
.cta-art { position: absolute !important; filter: drop-shadow(0 20px 24px rgba(0,0,0,.25)); }
.cta-l { left: 4%; bottom: 14%; width: 120px; } .cta-r { right: 4%; top: 12%; width: 130px; }

/* ---------- Page banners ---------- */
.page-banner { position: relative; overflow: hidden; padding: 80px 0 90px; background: radial-gradient(ellipse at 0% 0%, #ffe5d6 0, transparent 50%), radial-gradient(ellipse at 100% 100%, #e6ddff 0, transparent 55%), linear-gradient(180deg, #fff6f0, #f7f2ff); }
.page-banner .orb-orange { width: 70px; height: 70px; top: auto; bottom: 10%; left: 2%; }
.page-banner .orb-purple { width: 56px; height: 56px; right: 4%; bottom: 8%; }
.page-banner h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); font-weight: 900; margin-bottom: 1rem; }
.page-banner .lead { font-size: 1.2rem; color: var(--ink-2); max-width: 680px; margin-bottom: 0; }
.course-hero .lead { margin-bottom: 2rem; }
.breadcrumb { margin-bottom: 1.4rem; font-weight: 600; font-size: .95rem; background: #fff; display: inline-flex; padding: .4rem 1.1rem; border-radius: 50px; box-shadow: var(--shadow); }
.breadcrumb-item a { color: var(--text); }
.breadcrumb-item a:hover { color: var(--orange); }
.breadcrumb-item.active { color: var(--orange); }
.banner-art { position: relative; height: 260px; }
.banner-art img { position: absolute; filter: drop-shadow(0 24px 26px rgba(52,35,120,.2)); }
.ba-main { width: 220px; right: 10%; top: 10px; } .ba-sub { width: 90px; left: 6%; bottom: 0; }
.course-meta { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: 1rem 1.8rem; font-family: var(--fd); font-weight: 700; color: var(--ink); }
.course-meta li { display: flex; align-items: center; gap: .5rem; }
.course-meta .tp { width: 32px; height: 32px; font-size: .9rem; border-radius: 10px; }
.course-hero-art { position: relative; height: 380px; border-radius: 48% 52% 45% 55% / 50% 45% 55% 50%; background: var(--tint); display: grid; place-items: center; animation: morph 12s ease-in-out infinite; }
.course-hero-art img { position: absolute; filter: drop-shadow(0 26px 28px rgba(52,35,120,.22)); }
.cha-main { width: 260px; } .cha-a { width: 70px; right: 8%; top: 8%; } .cha-b { width: 56px; left: 10%; bottom: 12%; }

/* ---------- About ---------- */
.mv-card { padding: 2.4rem 2rem; border-radius: 34px; height: 100%; background: var(--tint); }
.mv-art { width: 72px; height: 72px; filter: drop-shadow(0 10px 10px rgba(52,35,120,.15)); }
.mv-card h2 { font-size: 1.6rem; margin: 1.1rem 0 .7rem; }
.mv-card p { margin-bottom: 0; color: var(--ink-2); }
.step-card { background: #fff; padding: 2rem 1.6rem; border-radius: 30px; height: 100%; position: relative; box-shadow: var(--shadow); transition: all .3s; }
.step-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.step-no { position: absolute; top: 1.2rem; right: 1.4rem; font-family: var(--fd); font-size: 2.4rem; font-weight: 900; color: #f1ebff; line-height: 1; }
.step-art { width: 64px; height: 64px; }
.step-card h3 { font-size: 1.3rem; margin: 1rem 0 .4rem; }
.step-card p { font-size: .95rem; margin-bottom: 0; }

/* ---------- Courses page ---------- */
.cat-card { background: var(--tint); border-radius: 30px; padding: 1.8rem; height: 100%; transition: all .3s; }
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.cat-art { width: 72px; height: 72px; }
.cat-card h3 { font-size: 1.3rem; margin: .9rem 0 .7rem; }
.cat-card ul { list-style: none; padding: 0; margin: 0; }
.cat-card li a { font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: .4rem; }
.cat-card li a:hover { color: var(--orange); }
.path-flow { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem; }
.path-flow a { display: flex; align-items: center; gap: .7rem; background: #fff; border: 2px solid var(--border); padding: .7rem 1.6rem .7rem .8rem; border-radius: 50px; font-family: var(--fd); font-weight: 700; font-size: 1.15rem; color: var(--ink); box-shadow: var(--shadow); transition: all .3s; }
.path-flow a:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-4px); }
.path-flow img { width: 40px; height: 40px; }
.path-flow .arrow { color: var(--orange); font-size: 1.6rem; }

/* ---------- Course detail ---------- */
.learn-box { background: linear-gradient(160deg, #fff7f1, #f5f0ff); border-radius: 32px; padding: 2rem; border: 2px solid #fff; box-shadow: var(--shadow); }
.text-panel { display: flex; gap: 1.6rem; align-items: flex-start; background: #fff; border-radius: 32px; padding: 2.4rem; box-shadow: var(--shadow); }
.tp-art { width: 80px; height: 80px; flex-shrink: 0; }
.text-panel h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.accordion.curriculum, .accordion.faq { max-width: 920px; }
.accordion-item { border: 0; border-radius: 22px !important; margin-bottom: .9rem; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.accordion-button { font-family: var(--fd); font-weight: 700; color: var(--ink); padding: 1.2rem 1.5rem; font-size: 1.15rem; gap: 1rem; border-radius: 22px !important; }
.accordion-button:not(.collapsed) { background: #fff; color: var(--orange); box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 3px rgba(139,108,246,.25); }
.accordion-button::after { background-color: var(--lilac); border-radius: 50%; background-position: center; background-size: 14px; width: 32px; height: 32px; }
.accordion-body { padding: 0 1.5rem 1.4rem; }
.mod-no { min-width: 44px; height: 44px; border-radius: 14px; display: inline-grid; place-items: center; background: var(--g-orange); color: #fff; font-size: 1rem; box-shadow: inset 0 -3px 0 rgba(0,0,0,.1); }
.project-card { background: #fff; border-radius: 30px; padding: 1.8rem; height: 100%; box-shadow: var(--shadow); transition: all .3s; border: 2px solid #f3effc; }
.project-card:hover { transform: translateY(-6px) rotate(-.5deg); box-shadow: var(--shadow-lg); }
.project-card img { width: 60px; height: 60px; }
.project-card h3 { font-size: 1.25rem; margin: 1rem 0 .4rem; }
.project-card p { font-size: .95rem; margin-bottom: 0; }
.enroll-panel { background: var(--g-orange); color: #fff3ea; border-radius: 36px; padding: 2.6rem; position: relative; overflow: hidden; }
.enroll-panel h2 { color: #fff; }
.ep-art { position: absolute; right: 1rem; top: 1rem; width: 110px; opacity: .95; }
.enroll-panel h2, .enroll-panel p { max-width: 72%; }

/* ---------- Contact ---------- */
.contact-info-card { display: flex; gap: 1rem; align-items: center; background: var(--tint); border-radius: 24px; padding: 1rem 1.2rem; margin-top: 1rem; }
.contact-info-card img { width: 52px; height: 52px; flex-shrink: 0; background: rgba(255,255,255,.6); border-radius: 16px; padding: 6px; }
.contact-info-card h3 { font-size: 1.1rem; margin-bottom: 0; }
.contact-info-card p { margin: 0; word-break: break-word; }
.contact-info-card a { color: var(--ink-2); font-weight: 500; }
.contact-info-card a:hover { color: var(--orange); }
.form-card { background: #fff; border-radius: 36px; padding: 2.5rem; box-shadow: var(--shadow-lg); border: 2px solid #f3effc; }
.form-label { font-weight: 600; color: var(--ink); }
.form-control, .form-select { border-radius: 16px; padding: .85rem 1.1rem; border: 2px solid var(--border); background-color: #fcfbff; }
.form-control:focus, .form-select:focus { border-color: var(--purple-2); box-shadow: 0 0 0 4px rgba(139,108,246,.15); }
.map-section { padding-bottom: 20px; }
.map-section iframe { width: 100%; height: 420px; border: 0; display: block; border-radius: 36px; box-shadow: var(--shadow); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c4bce9; padding: 80px 0 0; border-radius: 48px 48px 0 0; }
.footer-title { color: #fff; font-size: 1.25rem; margin-bottom: 1.2rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .55rem; }
.footer-links a, .footer-contact a { color: #c4bce9; transition: all .2s; }
.footer-links a:hover, .footer-contact a:hover { color: var(--orange-2); padding-left: 4px; }
.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li { display: flex; gap: .75rem; margin-bottom: .8rem; align-items: center; word-break: break-word; }
.fc-ic { width: 28px; height: 28px; flex-shrink: 0; }
.footer-map { border-radius: 22px; overflow: hidden; }
.footer-map iframe { border: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 60px; padding: 1.6rem 0; text-align: center; font-size: .92rem; }

/* ---------- Floating buttons ---------- */
.wa-float { position: fixed; right: 22px; bottom: 22px; width: 62px; height: 62px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #5ef08f, #25d366 55%, #14a84a); color: #fff; display: grid; place-items: center; font-size: 1.9rem; box-shadow: 0 0 0 7px rgba(37,211,102,.15), 0 14px 30px rgba(37,211,102,.4); z-index: 1025; transition: transform .25s; }
.wa-float:hover { color: #fff; transform: scale(1.08); }
.back-to-top { position: fixed; right: 30px; bottom: 98px; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(16px); transition: all .3s; z-index: 1020; }
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { color: #fff; background: var(--orange); }

/* ---------- 404 ---------- */
.error-page { position: relative; overflow: hidden; padding: 100px 0 120px; background: linear-gradient(180deg, #fff6f0, #f7f2ff); }
.err-code { font-family: var(--fd); font-size: clamp(6rem, 18vw, 10rem); font-weight: 900; line-height: 1; background: var(--g-orange); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1399.98px) { .hero-bot { top: auto; bottom: 30px; } .hs-r { display: none; } }
@media (max-width: 1199.98px) {
  .hero-bot { top: auto; bottom: 20px; right: 3%; }
  .hs-r { display: none; }
}
@media (max-width: 991.98px) {
  .section { padding: 72px 0; }
  .hero { padding: 50px 0 170px; }
  .hs-l { bottom: 30px; }
  .promo-box { padding: 3rem 1.8rem; }
  .cta-art { opacity: .35; }
  .art-collage { height: 340px; }
  .aud-tabs { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 575.98px) {
  .section { padding: 56px 0; }
  .brand-text { font-size: 1.3rem; } .brand-bot { width: 44px; height: 44px; }
  .topic-pills > span { font-size: .95rem; padding-right: .6rem; }
  .tp { width: 32px; height: 32px; }
  .hero .btn-lg, .cta-box .btn-lg { width: 100%; }
  .aud-tabs { grid-template-columns: repeat(2, 1fr); }
  .aud-row { padding: .8rem; gap: .8rem; }
  .aud-art { width: 64px; height: 64px; } .aud-art img { width: 46px; height: 46px; }
  .aud-txt strong { font-size: 1.1rem; } .aud-txt small { font-size: .85rem; }
  .aud-go { display: none; }
  .quest-shell { padding: .8rem; border-radius: 30px; }
  .quest-game, .quest-code { padding: 1rem; border-radius: 24px; }
  .text-panel { flex-direction: column; padding: 1.6rem; }
  .form-card, .enroll-panel { padding: 1.6rem; }
  .enroll-panel h2, .enroll-panel p { max-width: 100%; }
  .ep-art { position: static; width: 80px; margin-bottom: .5rem; }
  .cta-box { padding: 56px 20px; border-radius: 30px; }
  .cta-art { display: none; }
  .stats-wrap { padding: 1rem; border-radius: 30px; }
  .promo-art { height: 280px; } .pa-main { width: 200px; }
  .site-footer { border-radius: 32px 32px 0 0; }
}
@media (max-width: 767.98px) {
  .orb, .spark { display: none; }
  .hero { padding-bottom: 150px; }
  .hero-bot { width: 110px; right: 50%; transform: translateX(50%); bottom: 20px; animation: none; }
  .hs-l { width: 64px; left: 6%; bottom: 40px; }
}
