/* SkillFusion design system.
   Every colour is taken from the logo: cyan → sky blue → teal → emerald,
   a violet glow, on near-black. */

:root {
  /* logo colours */
  --logo-cyan: #1ae8ff;
  --logo-sky: #3db3fd;
  --logo-blue: #1262cb;
  --logo-teal: #01bfb1;
  --logo-green: #05bf7c;
  --logo-violet: #7c64ee;
  --logo-grad: linear-gradient(120deg, var(--logo-cyan), var(--logo-sky) 35%, var(--logo-teal) 65%, var(--logo-green));

  --bg: #02080f;
  --bg-2: #061220;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .08);
  --line: rgba(120, 200, 255, .12);
  --text: #eef6fb;
  --muted: #9fb3c3;
  --blue: var(--logo-sky);
  --green: var(--logo-green);
  --wa: var(--logo-green);
  --wa-ink: #011a10;
  --accent: var(--logo-cyan);
  --accent-ink: #011018;
  --accent-soft: rgba(26, 232, 255, .12);
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .7);
  --radius: 20px;
  --pattern-ink: rgba(61, 179, 253, .08);
  --font-head: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  /* same logo colours, darkened so text stays readable on white */
  --bg: #f5f9fc;
  --bg-2: #e9f2f8;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --line: rgba(18, 98, 203, .14);
  --text: #08182b;
  --muted: #4d6273;
  --blue: var(--logo-blue);
  --green: #008c58;
  --accent: #0379a6;
  --accent-soft: rgba(3, 121, 166, .1);
  --shadow: 0 18px 40px -22px rgba(18, 60, 120, .3);
  --pattern-ink: rgba(18, 98, 203, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f5f9fc; --bg-2: #e9f2f8; --surface: #ffffff; --surface-2: #ffffff;
    --line: rgba(18, 98, 203, .14); --text: #08182b; --muted: #4d6273;
    --blue: var(--logo-blue); --green: #008c58; --accent: #0379a6; --accent-soft: rgba(3, 121, 166, .1);
    --shadow: 0 18px 40px -22px rgba(18, 60, 120, .3); --pattern-ink: rgba(18, 98, 203, .08);
    color-scheme: light;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0; letter-spacing: -.01em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.4; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.ico { width: 1.15em; height: 1.15em; flex: none; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.center-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 12px; }

/* mashrabiya lattice: 8-point stars, drawn as one tiny SVG */
.pattern { position: relative; isolation: isolate; }
.pattern::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  --lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56' fill='none' stroke='black' stroke-width='1.1'%3E%3Crect x='16' y='16' width='24' height='24'/%3E%3Crect x='16' y='16' width='24' height='24' transform='rotate(45 28 28)'/%3E%3Cpath d='M0 28h11M45 28h11M28 0v11M28 45v11'/%3E%3C/svg%3E");
  background-color: var(--pattern-ink);
  /* lattice tile, faded out towards the bottom */
  -webkit-mask-image: var(--lattice), linear-gradient(#000, transparent 85%);
  -webkit-mask-size: 56px 56px, 100% 100%;
  -webkit-mask-composite: source-in;
  mask-image: var(--lattice), linear-gradient(#000, transparent 85%);
  mask-size: 56px 56px, 100% 100%;
  mask-composite: intersect;
}

/* ---------- buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 20px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: transform .2s, background-color .2s, box-shadow .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 16px; border-radius: 16px; }
.btn-wa { background: var(--wa); color: var(--wa-ink); box-shadow: 0 10px 28px -12px rgba(5, 191, 124, .8); }
.btn-wa:hover { background: #1fd492; }
.btn-accent { background: var(--logo-grad); color: var(--accent-ink); box-shadow: 0 10px 28px -12px rgba(26, 232, 255, .7); }
.btn-ghost { border-color: var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); transition: border-color .2s;
}
.icon-btn:hover { border-color: var(--accent); }
.chip { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; }
.chip:hover { border-color: var(--accent); }
.lang:lang(ar) { font-family: var(--font-body); }

/* theme icon shows what you will switch TO */
.i-sun { display: none; }
:root[data-theme="light"] .i-moon { display: block; }
:root:not([data-theme="light"]) .i-sun { display: block; }
:root:not([data-theme="light"]) .i-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .i-sun { display: none; }
  :root:not([data-theme]) .i-moon { display: block; }
}

/* ---------- header ---------- */
.hdr { position: fixed; inset: 0 0 auto; z-index: 50; transition: background-color .25s, border-color .25s; border-bottom: 1px solid transparent; }
.hdr.scrolled { background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.hdr-in { display: flex; align-items: center; gap: 16px; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 19px; font-weight: 600; direction: ltr; }
.brand img { border-radius: 10px; }
.brand b { font-weight: 800; background: var(--logo-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.nav a:not(.btn) { padding: 8px 12px; border-radius: 10px; font-size: 14.5px; color: var(--muted); transition: color .2s, background-color .2s; }
.nav a:not(.btn):hover, .nav a.active { color: var(--text); background: var(--surface); }
.nav-cta { display: none; }
.hdr-act { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; }

@media (max-width: 960px) {
  .hdr-in { height: 64px; gap: 10px; }
  .hdr-act { margin-inline-start: auto; }
  .menu-btn { display: inline-grid; }
  .hdr-cta span { display: none; }
  .hdr-cta { width: 40px; padding: 0; }
  .nav {
    position: absolute; inset: 64px 12px auto; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px; border-radius: 18px; border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-2) 96%, transparent); backdrop-filter: blur(16px); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav a:not(.btn) { padding: 12px 14px; font-size: 16px; color: var(--text); }
  .nav-cta { display: inline-flex; margin-top: 6px; }
}
@media (max-width: 380px) { .brand span { display: none; } }

/* ---------- animated background (whole site) ----------
   Three soft colour glows from the logo drift slowly behind everything.
   Only transform is animated, so it stays smooth on phones. */
.fx { position: fixed; inset: 0; z-index: -10; overflow: hidden; pointer-events: none; }
.fx i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; opacity: .55; will-change: transform; }
.fx-1 { background: radial-gradient(closest-side, rgba(26, 232, 255, .28), transparent); top: -25vmax; inset-inline-start: -15vmax; animation: drift1 26s ease-in-out infinite alternate; }
.fx-2 { background: radial-gradient(closest-side, rgba(124, 100, 238, .3), transparent); top: 20vh; inset-inline-end: -25vmax; animation: drift2 32s ease-in-out infinite alternate; }
.fx-3 { background: radial-gradient(closest-side, rgba(5, 191, 124, .22), transparent); bottom: -30vmax; inset-inline-start: 20vw; animation: drift3 28s ease-in-out infinite alternate; }
:root[data-theme="light"] .fx i { opacity: .35; }
.fx-net { position: absolute; inset: 0; width: 100%; height: 100%; }
@keyframes drift1 { to { transform: translate(18vw, 22vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-22vw, 30vh) scale(.9); } }
@keyframes drift3 { to { transform: translate(-16vw, -26vh) scale(1.2); } }
body { background: var(--bg); }
.sec-alt { background: color-mix(in srgb, var(--bg-2) 70%, transparent); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 150px 0 56px; overflow: hidden; isolation: isolate; }
/* moving perspective grid floor: the "code" feel */
.hero-floor {
  position: absolute; z-index: -1; inset: auto -40% -10% -40%; height: 70%;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px), linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(520px) rotateX(62deg); transform-origin: bottom;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 75%); mask-image: linear-gradient(to top, #000 10%, transparent 75%);
  animation: floor 3.2s linear infinite;
}
@keyframes floor { to { background-position: 0 64px; } }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--accent-soft); background: var(--accent-soft); color: var(--accent); font-size: 13.5px; font-weight: 600; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 0 rgba(5, 191, 124, .6); animation: pulse 2.2s infinite; display: inline-block; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(5, 191, 124, 0); } 100% { box-shadow: 0 0 0 0 rgba(5, 191, 124, 0); } }
.hero h1 { margin-top: 26px; font-size: clamp(46px, 6.3vw, 96px); font-weight: 800; line-height: .98; letter-spacing: -.035em; }
[dir="rtl"] .hero h1 { line-height: 1.28; letter-spacing: 0; font-size: clamp(40px, 5.6vw, 84px); }
.grad { background: var(--logo-grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 8s ease-in-out infinite alternate; }
@keyframes shine { to { background-position: 100% 0; } }
.lead { margin-top: 22px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.75; color: var(--muted); max-width: 54ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.rating { display: flex; align-items: center; gap: 8px; margin-top: 26px; font-size: 14px; color: var(--muted); }
.rating b { color: var(--text); }
.stars { display: inline-flex; color: var(--logo-cyan); }
.stars .ico { width: 16px; height: 16px; }

.hero-art { position: relative; }
.float-card {
  position: absolute; z-index: 2; display: grid; gap: 2px; padding: 12px 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--bg-2) 80%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13px; color: var(--muted);
  animation: bob 6s ease-in-out infinite;
}
.fc-k { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--text); direction: ltr; }
.fc-2 { inset-inline-end: -18px; top: -30px; animation-delay: -3s; }
.fc-2 .fc-k { background: var(--logo-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* ---------- mock terminal ---------- */
.term {
  margin: 0; position: relative; border-radius: 22px; overflow: hidden;
  background: rgba(3, 10, 20, .88); border: 1px solid rgba(61, 179, 253, .25);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(26, 232, 255, .05), 0 0 80px -20px rgba(124, 100, 238, .45);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: #d9e9f5;
}
.term::before { /* gradient top edge */ content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--logo-grad); }
.term-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid rgba(61, 179, 253, .14); font: 500 12px ui-monospace, "Cascadia Mono", Consolas, monospace; color: #7f97ab; }
.dots { display: flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; } .dots i:nth-child(3) { background: #28c840; }
.term-title { flex: 1; text-align: center; }
.term-live { display: inline-flex; align-items: center; gap: 6px; color: var(--logo-green); font-weight: 700; letter-spacing: .08em; }
.term-body { display: grid; gap: 14px; padding: 18px; }
.term-code { margin: 0; min-height: 132px; font: 500 13.5px/1.75 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.t-p { color: var(--logo-violet); font-weight: 700; } .t-s { color: var(--logo-cyan); } .t-d { color: #6f8aa1; }
.t-f { color: var(--logo-sky); } .t-k { color: #c39bff; } .t-ok { color: var(--logo-green); font-weight: 700; }
.caret { display: inline-block; width: 8px; height: 1.1em; vertical-align: -3px; background: var(--logo-cyan); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.term-chart { padding: 14px 16px 12px; border-radius: 14px; background: rgba(10, 26, 46, .7); border: 1px solid rgba(61, 179, 253, .14); transition: opacity .4s; }
.term-chart.hide { opacity: .25; }
.tc-head { display: flex; justify-content: space-between; align-items: baseline; font: 600 12px var(--font-body); color: #7f97ab; }
.tc-head b { font: 800 22px var(--font-head); background: var(--logo-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tc-plot { position: relative; height: 120px; margin-top: 8px; }
.tc-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 10px; }
.tc-bars i { flex: 1; height: var(--h); border-radius: 6px 6px 2px 2px; background: linear-gradient(to top, var(--logo-blue), var(--logo-sky)); opacity: .85; transform-origin: bottom; transition: transform .7s cubic-bezier(.2, .8, .2, 1), height .7s cubic-bezier(.2, .8, .2, 1); }
.tc-bars i:last-child { background: linear-gradient(to top, var(--logo-teal), var(--logo-cyan)); }
.term-chart.hide .tc-bars i { transform: scaleY(.04); }
.tc-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tc-line polyline { fill: none; stroke: var(--logo-green); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s ease .5s; filter: drop-shadow(0 0 6px rgba(5, 191, 124, .7)); }
.term-chart.hide .tc-line polyline { stroke-dashoffset: 1; transition: none; }
.term-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 18px 18px; font-size: 12.5px; color: #7f97ab; }
.term-chips button { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(61, 179, 253, .25); background: rgba(61, 179, 253, .06); color: #d9e9f5; font-size: 12.5px; transition: border-color .2s, background-color .2s; }
.term-chips button:hover { border-color: var(--logo-cyan); }
.term-chips button[aria-pressed="true"] { border-color: transparent; background: var(--logo-grad); color: #011018; font-weight: 700; }

/* stats: big type, no boxes */
.stats { list-style: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 40px; margin-top: 96px; padding: 28px 0 0; border-top: 1px solid var(--line); }
.stats li { display: grid; gap: 2px; }
.stats b { font: 800 clamp(30px, 3.6vw, 48px)/1.1 var(--font-head); background: var(--logo-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { font-size: 15px; color: var(--muted); }

@media (max-width: 960px) {
  .hero { padding-top: 112px; }
  .hero-grid { grid-template-columns: 1fr; gap: 64px; }
  .hero-copy { text-align: center; }
  .hero-copy .lead { margin-inline: auto; }
  .cta-row, .rating { justify-content: center; }
  .hero-art { max-width: 560px; width: 100%; margin-inline: auto; }
  .stats { margin-top: 72px; justify-content: space-around; text-align: center; }
}
@media (max-width: 520px) {
  .cta-row .btn { width: 100%; }
  .fc-2 { inset-inline-end: -6px; top: -34px; }
  .float-card { padding: 8px 12px; } .fc-k { font-size: 15px; }
  .term-code { font-size: 12px; min-height: 120px; } .term-body { padding: 14px; } .tc-plot { height: 96px; }
  .stats { display: grid; grid-template-columns: 1fr 1fr; }
}

/* ---------- skills ticker ---------- */
.marquee { overflow: hidden; padding: 22px 0; border-block: 1px solid var(--line); direction: ltr;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee ul { display: flex; gap: 44px; width: max-content; margin: 0; padding: 0; list-style: none; animation: marquee 40s linear infinite; }
.marquee li { display: inline-flex; align-items: center; gap: 14px; font: 700 clamp(20px, 2.4vw, 30px) var(--font-head); color: var(--muted); white-space: nowrap; }
.marquee li:nth-child(3n+1) span { color: var(--text); }
.marquee .orn { width: 16px; height: 16px; color: var(--accent); }
.marquee:hover ul { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.sec { padding: clamp(96px, 11vw, 168px) 0; }
.sec-head { max-width: 860px; margin-bottom: clamp(44px, 5vw, 72px); }
.sec-head.center { margin-inline: auto; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 700; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
[dir="rtl"] .eyebrow { letter-spacing: 0; }
.orn { width: 14px; height: 14px; color: var(--accent); flex: none; }
.sec-head h2, .why-title { margin-top: 14px; font-size: clamp(38px, 5.6vw, 76px); font-weight: 800; line-height: 1.02; letter-spacing: -.03em; }
[dir="rtl"] .sec-head h2, [dir="rtl"] .why-title { line-height: 1.3; letter-spacing: 0; }
.sec-head .lead { margin-top: 18px; }

.card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
/* cursor spotlight (set by app.js on desktop) */
.spot { position: relative; }
.spot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(26, 232, 255, .10), transparent 60%); }
.spot:hover::after { opacity: 1; }

/* ---------- courses: bento ---------- */
.courses { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: auto; gap: 18px; }
.course { display: flex; flex-direction: column; overflow: hidden; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .3s; }
.course:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.c-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000410; }
.art { display: block; width: 100%; height: 100%; }
.art .f1, .art .f2 { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.course:hover .art .f1 { transform: translateY(-6px); }
.course:hover .art .f2 { transform: translateY(5px); }
.c-body { display: flex; flex-direction: column; gap: 12px; padding: 22px; flex: 1; }
.c-level { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--blue); }
.pill-accent { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.pill-accent .orn { width: 11px; height: 11px; }
.course h3 { font-size: 20px; font-weight: 800; line-height: 1.25; }
.course .muted { font-size: 14.5px; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.facts li { padding: 5px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13px; font-weight: 600; }
.ticks { list-style: none; display: grid; gap: 8px; padding: 0; margin: 0; font-size: 14.5px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .ico { color: var(--green); width: 16px; height: 16px; margin-top: 5px; }
.c-cta { margin-top: auto; }

/* flagship: one wide row on top (video + details), so the whole card and its
   Apply button fit on one screen; the other four courses sit in a row below */
.flagship { grid-column: 1 / -1; flex-direction: row; align-items: center; }
/* flagship video: same frame as the placement-test intro */
.c-video { flex: 0 0 min(290px, 36%); margin: 0; padding: 26px; padding-inline-end: 0; }
.c-video figcaption, .pt-video figcaption { display: grid; gap: 2px; margin-top: 14px; text-align: center; font-size: 14px; }
.flagship .c-body { padding: 34px 40px; gap: 14px; max-width: 640px; }
.flagship h3 { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.12; }
.flagship .c-cta { align-self: flex-start; }
.course:not(.flagship) .ticks { display: none; } /* compact tiles: points stay on the flagship */
.swipe-hint { display: none; }

@media (max-width: 1100px) {
  .courses { grid-template-columns: repeat(2, 1fr); }
  .course:not(.flagship) .ticks { display: grid; }
}
@media (max-width: 640px) {
  .courses {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: -16px; padding: 4px 16px 18px; scroll-padding-inline: 16px; scrollbar-width: none;
  }
  .courses::-webkit-scrollbar { display: none; }
  .course { flex: 0 0 86%; scroll-snap-align: start; }
  .course:hover { transform: none; }
  .courses { align-items: flex-start; }      /* each card only as tall as its own content */
  /* flagship on phones: small video beside the title and facts, text and button below */
  .flagship { display: grid; grid-template-columns: 42% 1fr; gap: 0 14px; padding: 18px; align-items: start; }
  .flagship .c-body { display: contents; }
  .c-video { grid-column: 1; grid-row: 1 / span 3; padding: 0; width: auto; }
  .c-video figcaption { font-size: 11.5px; margin-top: 8px; }
  .c-video .vid-frame { border-radius: 18px; }
  .c-video .vid-play { width: 52px; height: 52px; }
  .c-video .vid-play .ico { width: 22px; height: 22px; }
  .flagship .c-level { grid-column: 2; grid-row: 1; }
  .flagship h3 { grid-column: 2; grid-row: 2; font-size: 21px; margin-top: 8px; }
  .flagship .facts { grid-column: 2; grid-row: 3; align-self: start; margin-top: 10px; gap: 6px; }
  .flagship .facts li { font-size: 12px; padding: 4px 9px; }
  .flagship > .c-body > .muted, .flagship .ticks, .flagship .c-cta { grid-column: 1 / -1; margin-top: 14px; }
  .flagship > .c-body > .muted { grid-row: 4; } .flagship .c-cta { grid-row: 5; }
  .flagship .ticks { display: none; }
  .flagship .c-cta { align-self: stretch; }
  .swipe-hint { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--muted); }
}

/* ---------- placement test ---------- */
.pt-grid { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.pt-video { margin: 0; position: sticky; top: 96px; }
.vid-frame { position: relative; aspect-ratio: 9 / 16; border-radius: 28px; overflow: hidden; background: #000410; border: 1px solid var(--line);
  box-shadow: var(--shadow), 0 0 70px -24px rgba(124, 100, 238, .6); }
.vid-frame::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; padding: 1.5px; background: var(--logo-grad); pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.vid-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-play { position: absolute; z-index: 2; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--logo-grad); color: #011018; box-shadow: 0 0 0 10px rgba(26, 232, 255, .15), 0 18px 40px -10px rgba(0, 0, 0, .7); transition: transform .2s; }
.vid-play .ico { width: 30px; height: 30px; margin-inline-start: 4px; }
.vid-play:hover { transform: scale(1.06); }
.vid-frame.playing .vid-play { display: none; }
.pt-card { padding: clamp(24px, 3vw, 40px); min-height: 420px; }
.pt-intro { display: grid; gap: 28px; justify-items: start; }
.pt-intro .ticks { font-size: 17px; gap: 14px; }
.ladder { list-style: none; display: flex; align-items: flex-end; gap: 8px; width: 100%; max-width: 420px; padding: 0; margin: 0; direction: ltr; }
.ladder li { flex: 1; display: grid; place-items: end center; padding-bottom: 10px; border-radius: 12px; font-family: var(--font-head); font-weight: 800; font-size: 15px; color: var(--text); background: linear-gradient(to top, var(--accent-soft), transparent); border: 1px solid var(--line); }
.ladder li:nth-child(1) { height: 48px; } .ladder li:nth-child(2) { height: 66px; } .ladder li:nth-child(3) { height: 84px; }
.ladder li:nth-child(4) { height: 102px; } .ladder li:nth-child(5) { height: 120px; color: #011018; background: var(--logo-grad); border-color: transparent; }
.pt-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--muted); }
.pt-bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.pt-bar i { display: block; height: 100%; border-radius: inherit; background: var(--logo-grad); transition: width .35s; }
.pt-qtext { margin-top: 28px; font-size: clamp(21px, 2.2vw, 28px); font-weight: 700; font-family: var(--font-head); direction: ltr; text-align: left; }
.pt-opts { display: grid; gap: 10px; margin-top: 22px; direction: ltr; }
.pt-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 16px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); text-align: left; font-size: 16px;
  transition: border-color .15s, background-color .15s, transform .15s;
}
.pt-opt b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 14px; flex: none; }
.pt-opt:hover { border-color: var(--accent); transform: translateX(3px); }
.pt-opt[aria-pressed="true"] { border-color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.pt-back { margin-top: 16px; background: none; border: 0; padding: 6px 0; color: var(--muted); text-decoration: underline; font-size: 14px; }
.pt-done h3 { font-size: clamp(24px, 2.4vw, 30px); margin-top: 14px; }
.pt-done > p { margin-top: 8px; }
.pt-saved { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); font-weight: 600; font-size: 13.5px; }
.pt-ref { margin-top: 18px; padding: 16px 18px; border-radius: 16px; border: 1px dashed color-mix(in srgb, var(--accent) 60%, transparent); background: var(--accent-soft); }
.pt-ref small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.pt-ref strong { display: block; margin-top: 2px; font: 700 26px/1.3 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .14em; color: var(--accent); direction: ltr; }
.pt-form { display: grid; gap: 8px; margin-top: 22px; }
.pt-form label { font-weight: 600; font-size: 14px; }
.pt-input { width: 100%; height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 500 17px var(--font-body); direction: ltr; text-align: left; }
.pt-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pt-err { color: #f87171; font-size: 14px; }
.pt-form .btn { margin-top: 6px; justify-self: start; }
.pt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; }
@media (max-width: 860px) {
  .pt-grid { grid-template-columns: 1fr; }
  .pt-video { position: static; width: min(300px, 78%); margin-inline: auto; }
}
@media (max-width: 520px) { .pt-qtext { font-size: 20px; } .pt-form .btn, .pt-intro .btn { justify-self: stretch; width: 100%; } }

/* ---------- reviews: tilted phone screenshots on a rail ---------- */
.reviews { display: flex; justify-content: center; gap: 26px; padding: 20px 16px 30px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.reviews::-webkit-scrollbar { display: none; }
.review { flex: 0 0 min(260px, 70vw); position: relative; padding: 0; border: 1px solid var(--line); border-radius: 26px; overflow: hidden; background: #000410; aspect-ratio: 9 / 15; box-shadow: var(--shadow); scroll-snap-align: center; transition: transform .45s cubic-bezier(.2, .8, .2, 1), border-color .3s; }
.review:nth-child(odd) { transform: rotate(-3deg) translateY(10px); }
.review:nth-child(even) { transform: rotate(2.5deg); }
.review img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.review::after { content: ""; position: absolute; inset: auto 0 0; height: 35%; background: linear-gradient(transparent, rgba(0, 4, 16, .8)); }
.review:hover { transform: rotate(0) translateY(-10px) scale(1.03); border-color: var(--accent); z-index: 1; }
@media (max-width: 1100px) { .reviews { justify-content: flex-start; } }

/* ---------- how it works: timeline ---------- */
.timeline { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; top: 28px; inset-inline: 28px; height: 2px; background: var(--line); }
.timeline::after { content: ""; position: absolute; top: 28px; inset-inline-start: 28px; height: 2px; width: calc(100% - 56px); background: var(--logo-grad); transform: scaleX(0); transform-origin: left; transition: transform 1.6s cubic-bezier(.2, .8, .2, 1) .2s; }
[dir="rtl"] .timeline::after { transform-origin: right; }
.timeline.in::after { transform: scaleX(1); }
.step { position: relative; }
.num { position: relative; z-index: 1; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; font: 800 22px var(--font-head); color: #011018; background: var(--logo-grad); box-shadow: 0 0 0 8px var(--bg), 0 12px 30px -10px rgba(26, 232, 255, .6); }
.step h3 { margin-top: 24px; font-size: 20px; font-weight: 800; }
.step p { margin-top: 8px; font-size: 15px; }
@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr; gap: 36px; padding-inline-start: 80px; }
  .timeline::before, .timeline::after { top: 28px; bottom: 28px; inset-inline-start: 27px; width: 2px; height: auto; }
  .timeline::after { transform: scaleY(0); transform-origin: top; }
  .timeline.in::after { transform: scaleY(1); }
  .num { position: absolute; inset-inline-start: -80px; top: 0; }
  .step h3 { margin-top: 12px; }
}

/* ---------- why us: editorial list ---------- */
.why-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
.why-title { position: sticky; top: 110px; margin: 0; }
.why-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.why { display: grid; grid-template-columns: 70px 1fr; gap: 4px 20px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.why-n { grid-row: span 2; font: 800 15px var(--font-head); color: var(--accent); padding-top: 8px; }
.why h3 { font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; transition: color .3s; }
.why p { font-size: 16px; }
.why:hover h3 { background: var(--logo-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 900px) { .why-wrap { grid-template-columns: 1fr; gap: 28px; } .why-title { position: static; } .why { grid-template-columns: 44px 1fr; } }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
.faqs { display: grid; gap: 10px; }
.faq { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); transition: border-color .2s; }
.faq[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 19px; transition: transform .2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq-a { padding: 0 22px 22px; color: var(--muted); font-size: 15.5px; }
.faq-a strong { color: var(--text); }
@media (max-width: 900px) { .faq-wrap { grid-template-columns: 1fr; gap: 0; } }

/* ---------- CTA band ---------- */
.cta-band { padding: clamp(110px, 13vw, 190px) 0; position: relative; overflow: hidden; isolation: isolate; border-block: 1px solid var(--line); }
.cta-band::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(60% 80% at 50% 100%, rgba(124, 100, 238, .28), transparent 70%), radial-gradient(40% 60% at 15% 0%, rgba(26, 232, 255, .16), transparent 70%); }
.cta-in { display: grid; justify-items: center; text-align: center; gap: 4px; }
.cta-in h2 { font-size: clamp(52px, 9.5vw, 140px); font-weight: 800; line-height: 1; letter-spacing: -.04em; }
[dir="rtl"] .cta-in h2 { line-height: 1.3; letter-spacing: 0; }
.cta-in .lead { margin: 18px 0 34px; }
.cta-in .small { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; }

/* ---------- footer ---------- */
.ftr { padding: 56px 0 110px; }
.ftr-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.ftr-in .muted { margin-top: 12px; font-size: 14px; max-width: 36ch; }
.socials { display: flex; gap: 8px; margin-top: 18px; }
.ftr-links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-content: start; font-size: 14.5px; color: var(--muted); }
.ftr-links a:hover { color: var(--accent); }
.ftr-note { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 12.5px; color: var(--muted); }

/* ---------- floating WhatsApp, consent, dialog ---------- */
.wa-fab {
  position: fixed; z-index: 40; inset-inline-end: 18px; bottom: calc(18px + env(safe-area-inset-bottom));
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: var(--wa-ink); box-shadow: 0 14px 34px -10px rgba(5, 191, 124, .9);
  transition: transform .2s, bottom .3s;
}
.wa-fab .ico { width: 28px; height: 28px; }
.wa-fab:hover { transform: scale(1.06); }
.has-consent .wa-fab { bottom: calc(150px + env(safe-area-inset-bottom)); }

/* ---------- FAQ chat bot ---------- */
.bot-launch {
  position: fixed; z-index: 40; inset-inline-end: 18px; bottom: calc(88px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px 0 14px; border-radius: 999px; border: 0;
  background: var(--logo-grad); color: #011018; font-weight: 700; font-size: 14.5px;
  box-shadow: 0 14px 34px -12px rgba(26, 232, 255, .8); transition: transform .2s, bottom .3s, opacity .2s;
  animation: botIn .6s cubic-bezier(.2, .8, .2, 1) 1.2s both;
}
.bot-launch .ico { width: 20px; height: 20px; }
.bot-launch:hover { transform: translateY(-2px); }
.has-consent .bot-launch { bottom: calc(220px + env(safe-area-inset-bottom)); }
.bot-on .bot-launch, .bot-on .wa-fab { opacity: 0; pointer-events: none; }
@keyframes botIn { from { opacity: 0; transform: translateY(16px) scale(.9); } }
@media (max-width: 520px) { .bot-launch span { display: none; } .bot-launch { width: 52px; height: 52px; padding: 0; justify-content: center; } .bot-launch .ico { width: 24px; height: 24px; } }

.bot {
  position: fixed; z-index: 60; inset-inline-end: 18px; bottom: calc(18px + env(safe-area-inset-bottom));
  width: min(380px, 100vw - 24px); height: min(600px, 100dvh - 110px); display: flex; flex-direction: column;
  border-radius: 24px; overflow: hidden; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 94%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .75), 0 0 60px -20px rgba(124, 100, 238, .5);
  transform-origin: bottom right; animation: botPop .35s cubic-bezier(.2, .8, .2, 1);
}
[dir="rtl"] .bot { transform-origin: bottom left; }
.bot[hidden] { display: none; }
@keyframes botPop { from { opacity: 0; transform: translateY(14px) scale(.94); } }
.bot::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--logo-grad); }
.bot-hd { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; border-bottom: 1px solid var(--line); }
.bot-hd img { border-radius: 12px; }
.bot-hd > div { flex: 1; }
.bot-t { font: 700 15.5px var(--font-head); }
.bot-s { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.bot-body { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; overscroll-behavior: contain; }
.bm { max-width: 86%; padding: 11px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.6; white-space: pre-line; animation: msgIn .3s ease both; }
.bm.ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-end-start-radius: 6px; }
.bm.me { align-self: flex-end; background: var(--logo-grad); color: #011018; font-weight: 600; border-end-end-radius: 6px; }
.bm strong { color: var(--accent); }
.bm .bm-cta { display: flex; margin-top: 12px; white-space: nowrap; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 30% { transform: translateY(-4px); opacity: .5; } }
.bchips { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; margin-top: 2px; animation: msgIn .3s ease both; }
.bchips button { text-align: start; padding: 9px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); color: var(--text); font-size: 13.5px; font-weight: 600; transition: background-color .2s, border-color .2s; }
.bchips button:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, transparent); }
.bot-ft { padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.bot-ft .btn { width: 100%; }
@media (max-width: 520px) {
  .bot { inset-inline: 8px; width: auto; bottom: calc(8px + env(safe-area-inset-bottom)); height: min(620px, 100dvh - 70px); }
}

.consent {
  position: fixed; z-index: 45; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 820px; margin-inline: auto; display: flex; align-items: center; gap: 18px; padding: 16px 18px;
  border-radius: 18px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 96%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow);
}
.consent[hidden] { display: none; }
.consent-t { font-weight: 700; font-size: 14.5px; }
.consent-b { font-size: 13px; color: var(--muted); margin-top: 2px; }
.consent-b a { text-decoration: underline; }
.consent-act { display: flex; gap: 8px; flex: none; }
@media (max-width: 640px) { .consent { flex-direction: column; align-items: stretch; gap: 12px; } .consent-act .btn { flex: 1; } }

.dlg { width: min(560px, 100% - 24px); max-height: 92vh; padding: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--bg-2); color: var(--text); box-shadow: var(--shadow); overflow: hidden; }
.dlg::backdrop { background: rgba(2, 8, 12, .78); backdrop-filter: blur(4px); }
.dlg-x { position: absolute; z-index: 2; inset-inline-end: 10px; top: 10px; background: rgba(5, 16, 22, .75); color: #fff; }
.dlg-body img { width: 100%; max-height: 92vh; object-fit: contain; }

/* ---------- legal pages ---------- */
.legal { padding: 110px 0 60px; }
.legal h1 { font-size: clamp(30px, 4vw, 42px); margin: 18px 0 6px; }
.legal section { margin-top: 30px; }
.legal h2 { font-size: 18px; font-weight: 700; color: var(--accent); }
.legal section p { margin-top: 8px; color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.back .ico { transform: scaleX(-1); }
[dir="rtl"] .back .ico { transform: none; }
.back:hover { color: var(--accent); }

/* ---------- reveal on scroll (only when JS is running) ---------- */
/* uses "translate", not "transform", so it never cancels hover lifts or the review tilt */
.js .reveal { opacity: 0; translate: 0 22px; transition: opacity .8s ease, translate .8s cubic-bezier(.2, .8, .2, 1), transform .45s cubic-bezier(.2, .8, .2, 1), border-color .3s; }
.js .reveal.in { opacity: 1; translate: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; translate: none; }
}
