/* ============================================================
   🐬 Landing page (#screen-home.lp) — css for index.html's home
   screen. Motion lives in js/landing.js; everything here also
   reads well with no JS at all (or with reduced motion).
   Mobile-first, RTL. Palette = the site's tokens (style.css).
   ============================================================ */

.lp {
  --lp-ink: #16263a;
  --lp-ink-soft: #5b6b7d;
  --lp-bg: #f7fafc;
  --lp-card: #ffffff;
  --lp-line: #e3e9ef;
  --lp-teal: #1c6b78;
  --lp-teal-2: #2bb3a3;
  --lp-mint: #5fe3c8;
  --lp-gold: #ffc800;
  --lp-night: #0b1a2b;
  --lp-night-2: #10263d;
  --lp-radius: 22px;
  font-family: var(--font);
  color: var(--lp-ink);
  background: var(--lp-bg);
  scroll-behavior: smooth;
}
:root[data-theme="dark"] .lp {
  --lp-ink: #eef3f8;
  --lp-ink-soft: #a6b3c2;
  --lp-bg: #0f1722;
  --lp-card: #162231;
  --lp-line: #24344a;
}
.lp *, .lp *::before, .lp *::after { box-sizing: border-box; }
/* our display rules (grid, flex) would otherwise beat the hidden attribute */
.lp [hidden] { display: none !important; }
.lp h1, .lp h2, .lp h3, .lp p, .lp ul, .lp ol, .lp figure, .lp blockquote { margin: 0; }
.lp ul, .lp ol { padding: 0; list-style: none; }

/* ── buttons ─────────────────────────────────────────────── */
.lp-btn {
  font-family: var(--font); font-weight: 800; font-size: 15px; line-height: 1.2;
  border: none; border-radius: 14px; padding: 11px 18px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background .15s, filter .15s;
}
.lp-btn:active { transform: translateY(3px); }
.lp-btn:focus-visible { outline: 3px solid var(--lp-mint); outline-offset: 3px; }
.lp-btn-primary { background: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-shade); }
.lp-btn-primary:hover { filter: brightness(1.06); }
.lp-btn-primary:active { box-shadow: 0 1px 0 var(--green-shade); }
.lp-btn-ghost { background: var(--lp-card); color: var(--lp-teal); box-shadow: 0 0 0 2px var(--lp-line) inset, 0 3px 0 var(--lp-line); }
.lp-btn-ghost:hover { box-shadow: 0 0 0 2px var(--lp-teal) inset, 0 3px 0 var(--lp-line); }
.lp-btn-glass { background: rgba(255,255,255,.1); color: #fff; box-shadow: 0 0 0 1.5px rgba(255,255,255,.28) inset; backdrop-filter: blur(6px); }
.lp-btn-glass:hover { background: rgba(255,255,255,.18); }
.lp-btn-lg { font-size: 17px; padding: 15px 26px; border-radius: 16px; }
.lp-link {
  background: none; border: none; font-family: var(--font); font-weight: 800; font-size: 14px;
  color: var(--lp-teal); cursor: pointer; padding: 4px 6px; text-decoration: underline; text-underline-offset: 3px;
}

/* ── nav ─────────────────────────────────────────────────── */
.lp-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; color: #fff;
  background: rgba(11, 26, 43, .55); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: background .25s, box-shadow .25s;
}
.lp-nav.is-solid { background: rgba(11, 26, 43, .92); box-shadow: 0 8px 30px rgba(0,0,0,.18); }
.lp-logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; color: #fff; text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.lp-logo span:not(.lp-logo-mark) { color: var(--lp-mint); }
.lp-logo-mark {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 19px;
  background: linear-gradient(135deg, var(--lp-teal), var(--lp-teal-2)); box-shadow: 0 4px 14px rgba(43,179,163,.4);
}
.lp-nav-links { display: none; gap: 4px; }
.lp-nav-links a {
  color: #c9d6e3; font-weight: 700; font-size: 14.5px; text-decoration: none; padding: 8px 12px; border-radius: 10px;
  transition: color .15s, background .15s;
}
.lp-nav-links a:hover, .lp-nav-links a.is-on { color: #fff; background: rgba(255,255,255,.08); }
.lp-nav-actions { display: flex; gap: 8px; }
.lp-nav-actions .lp-btn { padding: 9px 14px; font-size: 14px; }
.lp-nav .lp-btn-ghost { background: transparent; color: #fff; box-shadow: 0 0 0 1.5px rgba(255,255,255,.3) inset; }

/* ── hero ────────────────────────────────────────────────── */
.lp-hero {
  position: relative; overflow: hidden; color: #fff;
  margin-top: -63px; padding: 100px 16px 70px; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(43,179,163,.35), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(124,58,237,.30), transparent 60%),
    linear-gradient(180deg, var(--lp-night) 0%, var(--lp-night-2) 100%);
}
.lp-hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lp-hero-glow {
  position: absolute; inset: auto 0 0 0; height: 140px; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--lp-bg));
}
.lp-hero-inner {
  position: relative; z-index: 2; width: 100%; max-width: 1180px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
  pointer-events: none; /* the 3D scene behind reacts to the pointer */
}
.lp-hero-inner a, .lp-hero-inner button { pointer-events: auto; }
.lp-hero-text { text-align: center; max-width: 620px; }
.lp-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  font-size: 13px; font-weight: 800; color: #d8fff6; line-height: 1.5;
  background: rgba(95,227,200,.12); border: 1px solid rgba(95,227,200,.35);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 18px;
}
.lp-live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #34d399; flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: lpPulse 1.8s infinite;
}
@keyframes lpPulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); } 70% { box-shadow: 0 0 0 9px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.lp-hero-title { font-size: clamp(34px, 8.4vw, 64px); font-weight: 800; line-height: 1.22; letter-spacing: -.5px; }
.lp-rotator { position: relative; display: inline-grid; vertical-align: bottom; }
.lp-rot-word {
  grid-area: 1 / 1; justify-self: start; white-space: nowrap; opacity: 0; transform: translateY(40%);
  transition: opacity .45s ease, transform .55s cubic-bezier(.2,1.2,.4,1);
}
.lp-rot-word.is-on { opacity: 1; transform: none; transition-delay: .22s; }
.lp-rot-word.is-out { opacity: 0; transform: translateY(-40%); }
.lp-rot-word[data-color="math"] { color: var(--lp-gold); }
.lp-rot-word[data-color="english"] { color: #7dd3fc; }
.lp-rot-word[data-color="coding"] { color: var(--lp-mint); }
.lp-hero-sub { font-size: clamp(15.5px, 2.2vw, 19px); line-height: 1.8; color: #c5d3e1; font-weight: 600; margin: 18px auto 0; max-width: 560px; }
.lp-hero-ctas { display: flex; flex-direction: column; gap: 12px; align-items: stretch; margin: 26px auto 0; max-width: 340px; }
.lp-gate.home-gate-note { color: #9fb1c4; margin-top: 14px; max-width: 360px; }
.lp-hero-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 28px;
}
.lp-hero-stats div {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 16px;
  padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; backdrop-filter: blur(6px);
}
.lp-hero-stats b { font-size: 26px; font-weight: 800; color: #fff; line-height: 1.1; }
.lp-hero-stats span { font-size: 12.5px; font-weight: 700; color: #a8b8c9; }

.lp-hero-art { position: relative; width: 240px; height: 240px; flex-shrink: 0; }
.lp-hero-art .lp-hero-mascot { width: 100%; height: 100%; position: relative; z-index: 1; }
.lp-mascot-ring {
  position: absolute; inset: -10%; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(95,227,200,.0), rgba(95,227,200,.5), rgba(255,200,0,.45), rgba(125,211,252,.5), rgba(95,227,200,0));
  filter: blur(26px); opacity: .55; animation: lpSpin 14s linear infinite;
}
@keyframes lpSpin { to { transform: rotate(360deg); } }
.lp-chip {
  position: absolute; z-index: 2; white-space: nowrap; font-size: 13px; font-weight: 800; color: var(--lp-night);
  background: #fff; border-radius: 999px; padding: 7px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  animation: lpFloat 4.5s ease-in-out infinite;
}
.lp-chip-1 { top: 2%; right: -12%; }
.lp-chip-2 { bottom: 16%; left: -16%; animation-delay: -1.2s; }
.lp-chip-3 { bottom: -4%; right: 2%; animation-delay: -2.4s; }
.lp-chip-4 { top: 22%; left: -20%; animation-delay: -3.3s; background: #0e2236; color: var(--lp-mint); font-family: ui-monospace, Menlo, monospace; border: 1px solid rgba(95,227,200,.4); }
@keyframes lpFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.lp-scroll-cue {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 3;
  width: 26px; height: 42px; border-radius: 14px; border: 2px solid rgba(255,255,255,.4);
}
.lp-scroll-cue span { position: absolute; top: 7px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: lpCue 1.8s infinite; }
@keyframes lpCue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

.lp-library { margin: 18px auto 0; }

/* ── sections ────────────────────────────────────────────── */
.lp-section { position: relative; padding: 72px 16px; max-width: 1180px; margin: 0 auto; }
.lp-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.lp-kicker {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800;
  color: var(--lp-teal); background: rgba(28,107,120,.08); padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}
:root[data-theme="dark"] .lp-kicker { color: var(--lp-mint); background: rgba(95,227,200,.1); }
.lp-kicker-dark { color: var(--lp-mint); background: rgba(95,227,200,.1); }
.lp-title { font-size: clamp(27px, 5.2vw, 44px); font-weight: 800; line-height: 1.3; color: var(--lp-ink); }
.lp-title-dark { color: #fff; }
.lp-hl { background: linear-gradient(90deg, var(--lp-teal), var(--lp-teal-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="dark"] .lp-hl { background-image: linear-gradient(90deg, var(--lp-mint), #7dd3fc); }
.lp-hl-dark { background: linear-gradient(90deg, var(--lp-mint), #7dd3fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-hl-gold { background: linear-gradient(90deg, #ffe066, #ffb200); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-sub { font-size: 16px; line-height: 1.85; color: var(--lp-ink-soft); font-weight: 600; margin-top: 12px; }
.lp-sub-dark { color: #a9bccd; }
.lp-dark, .lp-board-section {
  max-width: none; color: #fff;
  background:
    radial-gradient(800px 400px at 10% 0%, rgba(43,179,163,.22), transparent 60%),
    radial-gradient(700px 400px at 100% 100%, rgba(124,58,237,.22), transparent 60%),
    linear-gradient(180deg, var(--lp-night), var(--lp-night-2));
}
.lp-dark > *, .lp-board-section > * { max-width: 1180px; margin-left: auto; margin-right: auto; }

/* hover tilt (js/landing.js sets --rx/--ry) — the bouncy cards from 21st.dev, in plain CSS */
.lp-tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0)); transition: transform .35s cubic-bezier(.2,1.4,.4,1), box-shadow .3s; will-change: transform; }
.lp-tilt:hover { --lift: -6px; }

/* ── subjects ────────────────────────────────────────────── */
.lp-subjects { display: grid; grid-template-columns: 1fr; gap: 16px; }
.lp-subject {
  position: relative; overflow: hidden; border-radius: var(--lp-radius); padding: 26px 22px 22px; color: #fff;
  min-height: 300px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 18px 40px -18px var(--shadow, rgba(0,0,0,.35));
}
.lp-subject-math { background: linear-gradient(150deg, #f59e0b, #ea580c 70%); --shadow: rgba(234,88,12,.6); }
.lp-subject-english { background: linear-gradient(150deg, #38bdf8, #2563eb 70%); --shadow: rgba(37,99,235,.6); }
.lp-subject-coding { background: linear-gradient(150deg, #2bb3a3, #1c6b78 70%); --shadow: rgba(28,107,120,.6); }
.lp-subject h3 { font-size: 24px; font-weight: 800; margin-top: auto; position: relative; }
.lp-subject p { font-size: 14.5px; line-height: 1.75; font-weight: 600; opacity: .95; position: relative; }
.lp-subject ul { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; position: relative; }
.lp-subject li { font-size: 12px; font-weight: 800; background: rgba(255,255,255,.18); padding: 4px 10px; border-radius: 999px; }
.lp-subject-art { position: absolute; inset: 0; pointer-events: none; }
.lp-subject-art span {
  position: absolute; font-weight: 800; color: rgba(255,255,255,.18); line-height: 1;
  transition: transform .6s cubic-bezier(.2,1.4,.4,1);
}
.lp-subject-art span:nth-child(1) { top: 10px; left: 18px; font-size: 76px; transform: rotate(-12deg); }
.lp-subject-art span:nth-child(2) { top: 64px; left: 110px; font-size: 44px; transform: rotate(10deg); }
.lp-subject-art span:nth-child(3) { top: 8px; left: 170px; font-size: 54px; transform: rotate(-4deg); }
.lp-subject-art span:nth-child(4) { top: 110px; left: 30px; font-size: 40px; transform: rotate(18deg); }
.lp-subject:hover .lp-subject-art span:nth-child(odd) { transform: translateY(-8px) rotate(-20deg) scale(1.1); }
.lp-subject:hover .lp-subject-art span:nth-child(even) { transform: translateY(6px) rotate(24deg) scale(1.15); }
.lp-tag { align-self: flex-start; font-size: 12px; font-weight: 800; padding: 5px 11px; border-radius: 999px; position: relative; }
.lp-tag-live { background: #fff; color: #0f5132; }
.lp-tag-live::before { content: '●'; color: #22c55e; margin-left: 5px; }

.lp-soon {
  margin-top: 18px; border-radius: var(--lp-radius); padding: 18px; background: var(--lp-card);
  border: 2px dashed var(--lp-line); display: flex; flex-direction: column; gap: 14px; align-items: center;
}
.lp-soon-label { font-weight: 800; font-size: 15px; color: var(--lp-ink); display: flex; align-items: center; gap: 6px; }
.lp-soon-spark { display: inline-block; animation: lpSpin 6s linear infinite; }
.lp-soon-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.lp-soon-item {
  position: relative; display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; color: var(--lp-ink-soft);
  padding: 9px 14px 9px 16px; border-radius: 14px; background: var(--lp-bg); border: 1.5px solid var(--lp-line);
}
.lp-soon-item span { font-size: 18px; filter: grayscale(.2); }
.lp-soon-item:not(.lp-soon-more)::after {
  content: 'قريبًا'; position: absolute; top: -9px; left: -6px; font-size: 10px; font-weight: 800; color: #7a4a00;
  background: var(--lp-gold); padding: 1px 7px; border-radius: 999px;
}

/* ── coding demo ─────────────────────────────────────────── */
.lp-coding { display: grid; grid-template-columns: 1fr; gap: 34px; align-items: center; }
.lp-coding-text { text-align: right; }
.lp-coding-text .lp-title, .lp-coding-text .lp-sub { text-align: right; }
.lp-steps { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.lp-steps li {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  transition: background .3s, border-color .3s, transform .3s;
}
.lp-steps li.is-on { background: rgba(95,227,200,.1); border-color: rgba(95,227,200,.45); transform: translateX(-4px); }
.lp-steps b {
  width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: var(--lp-mint); font-size: 15px;
}
.lp-steps li.is-on b { background: var(--lp-mint); color: var(--lp-night); }
.lp-steps span { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: #a9bccd; font-weight: 600; line-height: 1.6; }
.lp-steps strong { color: #fff; font-size: 15px; font-weight: 800; }
.lp-coding-lessons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.lp-coding-lessons span { font-size: 12px; font-weight: 700; color: #cfe; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); padding: 4px 10px; border-radius: 999px; }

.lp-ide {
  border-radius: 22px; overflow: hidden; background: #0d1f31; border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(95,227,200,.08);
}
.lp-ide-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; background: #0a1827; border-bottom: 1px solid rgba(255,255,255,.06); }
.lp-ide-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.lp-ide-bar i:nth-child(2) { background: #febc2e; }
.lp-ide-bar i:nth-child(3) { background: #28c840; }
.lp-ide-bar span { margin-right: auto; font-size: 12.5px; font-weight: 700; color: #8aa0b5; }
.lp-ide-body { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 16px; }
.lp-ide-blocks { display: flex; flex-direction: column; gap: 7px; }
.lp-block {
  font-weight: 800; font-size: 14px; color: #fff; padding: 9px 12px; border-radius: 10px;
  box-shadow: 0 3px 0 rgba(0,0,0,.28); transition: transform .2s, box-shadow .2s, filter .2s; position: relative;
}
.lp-block-go { background: #3b82f6; }
.lp-block-turn { background: #a855f7; }
.lp-block-loop { background: #f59e0b; padding-bottom: 10px; }
.lp-block-loop > span { display: block; margin-bottom: 7px; }
.lp-block-inner { margin-right: 14px; }
.lp-block.is-run { transform: translateX(-6px) scale(1.03); filter: brightness(1.2); box-shadow: 0 0 0 3px #fff, 0 6px 18px rgba(0,0,0,.35); z-index: 1; }
.lp-ide-stage { display: grid; grid-template-columns: 1fr; gap: 12px; }
.lp-grid {
  position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; aspect-ratio: 1;
  padding: 6px; border-radius: 14px; background: #10304a; max-width: 300px; width: 100%; margin: 0 auto;
}
.lp-grid > i { border-radius: 7px; background: rgba(255,255,255,.06); }
.lp-grid > i.is-path { background: rgba(95,227,200,.22); transition: background .3s; }
/* placed by --c / --r (column / row, 0-4): 6px padding + one cell (width + 4px gap) per step */
.lp-grid-actor, .lp-grid-star {
  position: absolute; width: calc((100% - 28px) / 5); height: calc((100% - 28px) / 5);
  left: calc(6px + var(--c, 0) * ((100% - 28px) / 5 + 4px));
  top: calc(6px + var(--r, 0) * ((100% - 28px) / 5 + 4px));
  display: grid; place-items: center; font-size: clamp(22px, 5.5vw, 32px); pointer-events: none;
}
.lp-grid-actor { transition: left .5s cubic-bezier(.4,1.4,.5,1), top .5s cubic-bezier(.4,1.4,.5,1); z-index: 2; }
.lp-actor-face { display: inline-block; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
/* the arrow showing which way منير faces: rotated about the cell's centre */
.lp-actor-pointer { position: absolute; inset: 0; transition: transform .35s ease; }
.lp-actor-pointer::before {
  content: ''; position: absolute; top: -6px; left: 50%; margin-left: -6px; width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 9px solid var(--lp-mint);
}
.lp-grid-star { animation: lpTwinkle 1.4s ease-in-out infinite; }
@keyframes lpTwinkle { 50% { transform: scale(1.18) rotate(12deg); } }
.lp-grid.is-won .lp-grid-star { animation: lpWin .7s ease both; }
@keyframes lpWin { 40% { transform: scale(1.8) rotate(30deg); } 100% { transform: scale(0); opacity: 0; } }
.lp-code {
  margin: 0; padding: 12px 14px; border-radius: 14px; background: #08131f; border: 1px solid rgba(255,255,255,.06);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 13.5px; line-height: 1.75; color: #a7f3d0; text-align: left;
  overflow-x: auto;
}
/* each line is a block span; the newlines between them (kept for no-CSS readers) must not add blank lines */
.lp-code code { white-space: normal; }
.lp-code span { display: block; white-space: pre; padding: 0 6px; border-radius: 5px; transition: background .2s, color .2s; }
.lp-code span.is-run { background: rgba(95,227,200,.18); color: #fff; }
.lp-code em { font-style: normal; color: #fbbf24; }
.lp-ide-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.06); background: #0a1827; }
.lp-ide-status { font-size: 13px; font-weight: 800; color: #8aa0b5; }
.lp-ide-status.is-ok { color: var(--lp-mint); }
.lp-btn-run { background: var(--lp-mint); color: var(--lp-night); box-shadow: 0 4px 0 #2bb3a3; padding: 9px 16px; font-size: 14px; }
.lp-btn-run:disabled { opacity: .55; cursor: default; }

/* ── games ───────────────────────────────────────────────── */
.lp-games { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.lp-game {
  position: relative; overflow: hidden; border-radius: 18px; padding: 16px 14px 16px; background: var(--lp-card);
  border: 3px solid var(--lp-ink); box-shadow: 5px 5px 0 var(--accent); display: flex; flex-direction: column; gap: 6px;
}
:root[data-theme="dark"] .lp-game { border-color: #31445c; }
.lp-game::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 76px; opacity: .14;
  background-image: linear-gradient(var(--accent) 2px, transparent 2px), linear-gradient(90deg, var(--accent) 2px, transparent 2px);
  background-size: 12px 12px;
}
.lp-game-ico { position: relative; font-size: 40px; line-height: 1; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--accent) 18%, transparent); }
.lp-game:hover .lp-game-ico { animation: lpHop .5s ease; }
@keyframes lpHop { 40% { transform: translateY(-10px) rotate(-8deg); } }
.lp-game-tag { align-self: flex-start; font-family: 'Press Start 2P', monospace; font-size: 8px; line-height: 1.6; color: #fff; background: var(--accent); padding: 4px 7px; border-radius: 4px; margin-top: 4px; }
.lp-game h3 { font-size: 16.5px; font-weight: 800; color: var(--lp-ink); }
.lp-game p { font-size: 13px; line-height: 1.6; color: var(--lp-ink-soft); font-weight: 600; }
.lp-games-extra { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 16px; }
.lp-duel {
  display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 20px; color: #fff;
  background: linear-gradient(120deg, #1b1b2f, #2d1b69); box-shadow: 0 18px 40px -20px rgba(45,27,105,.8);
}
.lp-duel h3 { font-size: 19px; font-weight: 800; }
.lp-duel p { font-size: 14px; line-height: 1.7; color: #cbc6f2; margin-top: 4px; font-weight: 600; }
.lp-duel-vs { display: flex; align-items: center; gap: 4px; font-size: 32px; flex-shrink: 0; }
.lp-duel-vs b { font-family: 'Press Start 2P', monospace; font-size: 11px; color: #fdcb6e; animation: lpVs 1s ease-in-out infinite alternate; }
@keyframes lpVs { to { transform: scale(1.35); } }
.lp-minigames { padding: 18px 20px; border-radius: 20px; background: var(--lp-card); border: 1.5px solid var(--lp-line); }
.lp-minigames h3 { font-size: 16px; font-weight: 800; color: var(--lp-ink); margin-bottom: 10px; }
.lp-mini-list { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-mini-list span { font-size: 13px; font-weight: 700; color: var(--lp-ink); background: var(--lp-bg); border: 1px solid var(--lp-line); padding: 6px 11px; border-radius: 12px; }

/* ── live leaderboard ────────────────────────────────────── */
.lp-board { display: grid; grid-template-columns: 1fr; gap: 18px; }
.lp-board-main, .lp-feed, .lp-totals {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); border-radius: 22px; backdrop-filter: blur(8px);
}
.lp-board-main { padding: 18px 14px 10px; min-height: 420px; position: relative; }
.lp-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; padding: 6px 4px 0; }
.lp-podium:empty { display: none; }
.lp-pod { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; min-width: 0; }
.lp-pod-ava { position: relative; width: 62px; height: 62px; border-radius: 50%; padding: 3px; background: var(--ring, #cbd5e1); }
.lp-pod-ava .avatar-svg, .lp-row-ava .avatar-svg { width: 100%; height: 100%; display: block; }
.lp-pod-1 .lp-pod-ava { width: 82px; height: 82px; --ring: linear-gradient(135deg, #ffe066, #ffb200); box-shadow: 0 0 30px rgba(255,200,0,.45); }
.lp-pod-2 .lp-pod-ava { --ring: linear-gradient(135deg, #e5e7eb, #9ca3af); }
.lp-pod-3 .lp-pod-ava { --ring: linear-gradient(135deg, #fdba74, #c2410c); }
.lp-pod-crown { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: 24px; animation: lpFloat 2.4s ease-in-out infinite; }
.lp-pod-name { font-weight: 800; font-size: 14.5px; color: #fff; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-pod-xp { font-size: 12.5px; font-weight: 800; color: var(--lp-gold); }
.lp-pod-base {
  width: 100%; border-radius: 14px 14px 6px 6px; display: grid; place-items: center;
  font-family: 'Press Start 2P', monospace; font-size: 16px; color: rgba(255,255,255,.9);
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.12);
}
.lp-pod-1 .lp-pod-base { height: 96px; background: linear-gradient(180deg, rgba(255,200,0,.4), rgba(255,200,0,.06)); }
.lp-pod-2 .lp-pod-base { height: 70px; }
.lp-pod-3 .lp-pod-base { height: 54px; }
.lp-board-list { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.lp-row {
  display: grid; grid-template-columns: 30px 38px 1fr auto; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 14px; background: rgba(255,255,255,.04); position: relative; overflow: hidden;
}
.lp-row-bar { position: absolute; inset: 0 0 0 auto; width: var(--w, 0%); background: linear-gradient(270deg, rgba(95,227,200,.16), rgba(95,227,200,0)); transition: width .8s ease; pointer-events: none; }
.lp-row > *:not(.lp-row-bar) { position: relative; }
.lp-row-rank { font-family: 'Press Start 2P', monospace; font-size: 11px; color: #8aa0b5; text-align: center; }
.lp-row-ava { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; }
.lp-row-name { min-width: 0; display: flex; flex-direction: column; }
.lp-row-name b { font-size: 14.5px; font-weight: 800; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-row-name small { font-size: 11.5px; color: #8aa0b5; font-weight: 700; }
.lp-row-xp { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; color: var(--lp-gold); white-space: nowrap; }
.lp-move { font-size: 11px; font-weight: 800; padding: 1px 5px; border-radius: 6px; }
.lp-move-up { color: #34d399; background: rgba(52,211,153,.14); }
.lp-move-down { color: #f87171; background: rgba(248,113,113,.14); }
.lp-move-new { color: #7dd3fc; background: rgba(125,211,252,.14); }
.lp-row.is-flash, .lp-pod.is-flash .lp-pod-ava { animation: lpFlash 1.2s ease; }
@keyframes lpFlash { 0% { box-shadow: 0 0 0 0 rgba(95,227,200,.0); } 25% { box-shadow: 0 0 0 3px rgba(95,227,200,.7); } 100% { box-shadow: 0 0 0 0 rgba(95,227,200,0); } }
.lp-board-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; min-height: 360px; color: #a9bccd; font-weight: 700; }
.lp-board-empty b { color: #fff; font-size: 18px; }
.lp-board-empty-ico { font-size: 54px; animation: lpFloat 3s ease-in-out infinite; }
.lp-board-skel { height: 52px; border-radius: 14px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: lpShimmer 1.4s infinite linear; }
@keyframes lpShimmer { to { background-position: -200% 0; } }
.lp-board-side { display: flex; flex-direction: column; gap: 14px; }
.lp-totals { display: grid; grid-template-columns: repeat(3, 1fr); padding: 14px 8px; text-align: center; }
.lp-totals div { display: flex; flex-direction: column; gap: 2px; }
.lp-totals div + div { border-right: 1px solid rgba(255,255,255,.08); }
.lp-totals b { font-size: 24px; font-weight: 800; color: #fff; line-height: 1.2; }
.lp-totals div:first-child b { color: #34d399; }
.lp-totals span { font-size: 12px; color: #8aa0b5; font-weight: 700; }
.lp-feed { padding: 14px; flex: 1; }
.lp-feed-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 800; color: #fff; font-size: 15px; margin-bottom: 10px; }
.lp-feed-head small { font-size: 11.5px; color: #6f869c; font-weight: 700; }
.lp-feed-list { display: flex; flex-direction: column; gap: 6px; max-height: 330px; overflow: hidden; }
.lp-feed-item {
  display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #cdd9e5; font-weight: 600; line-height: 1.5;
  padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.035);
}
.lp-feed-item.is-new { animation: lpFeedIn .6s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes lpFeedIn { from { opacity: 0; transform: translateY(-12px) scale(.96); } }
.lp-feed-ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: rgba(255,255,255,.07); font-size: 16px; }
.lp-feed-item b { color: #fff; }
.lp-feed-item em { font-style: normal; color: var(--lp-gold); font-weight: 800; white-space: nowrap; }
.lp-feed-item time { margin-right: auto; font-size: 11.5px; color: #6f869c; white-space: nowrap; }
.lp-feed-empty { font-size: 13.5px; color: #8aa0b5; padding: 6px 2px; }

/* ── features bento ──────────────────────────────────────── */
.lp-bento { display: grid; grid-template-columns: 1fr; gap: 14px; }
.lp-feat {
  position: relative; overflow: hidden; border-radius: var(--lp-radius); padding: 22px; min-height: 180px;
  background: var(--lp-card); border: 1.5px solid var(--lp-line); display: flex; flex-direction: column; gap: 8px;
}
.lp-feat::after {
  content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%; top: -110px; left: -80px;
  background: radial-gradient(circle, var(--c2), transparent 70%); opacity: .18; transition: opacity .3s, transform .6s;
}
.lp-feat:hover::after { opacity: .32; transform: scale(1.25); }
.lp-feat-ico {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 10px 22px -8px var(--c1); position: relative; z-index: 1;
}
.lp-feat h3 { font-size: 18px; font-weight: 800; color: var(--lp-ink); position: relative; z-index: 1; }
.lp-feat p { font-size: 14px; line-height: 1.75; color: var(--lp-ink-soft); font-weight: 600; position: relative; z-index: 1; }
.lp-feat-demo { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 10px; position: relative; z-index: 1; }
.lp-bubble-q, .lp-bubble-a { font-size: 13px; font-weight: 700; padding: 8px 12px; border-radius: 14px; max-width: 90%; line-height: 1.6; }
.lp-bubble-q { align-self: flex-start; background: var(--lp-bg); color: var(--lp-ink); border: 1px solid var(--lp-line); border-bottom-right-radius: 4px; }
.lp-bubble-a { align-self: flex-end; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; border-bottom-left-radius: 4px; }
.lp-wave { display: flex; align-items: center; gap: 4px; height: 34px; margin-top: auto; position: relative; z-index: 1; }
.lp-wave i { width: 5px; border-radius: 3px; background: linear-gradient(var(--c1), var(--c2)); height: 30%; animation: lpWave 1.1s ease-in-out infinite; }
.lp-wave i:nth-child(2) { animation-delay: -.9s; } .lp-wave i:nth-child(3) { animation-delay: -.7s; }
.lp-wave i:nth-child(4) { animation-delay: -.5s; } .lp-wave i:nth-child(5) { animation-delay: -.3s; }
.lp-wave i:nth-child(6) { animation-delay: -.6s; } .lp-wave i:nth-child(7) { animation-delay: -.2s; }
@keyframes lpWave { 50% { height: 100%; } }
.lp-feat-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; position: relative; z-index: 1; }
.lp-feat-badges span { font-weight: 800; font-size: 14px; padding: 6px 12px; border-radius: 12px; background: var(--lp-bg); border: 1px solid var(--lp-line); color: var(--lp-ink); }

/* ── pricing ─────────────────────────────────────────────── */
.lp-cycle {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; margin-top: 22px; padding: 5px;
  background: var(--lp-card); border: 1.5px solid var(--lp-line); border-radius: 16px;
}
.lp-cycle-btn {
  position: relative; z-index: 1; font-family: var(--font); font-weight: 800; font-size: 14.5px; color: var(--lp-ink-soft);
  background: none; border: none; padding: 9px 22px; cursor: pointer; border-radius: 12px; transition: color .25s;
}
.lp-cycle-btn em { font-style: normal; font-size: 11px; color: #0f5132; background: #bbf7d0; padding: 1px 6px; border-radius: 999px; margin-right: 4px; }
.lp-cycle-btn.is-on { color: #fff; }
.lp-cycle-pill {
  position: absolute; top: 5px; bottom: 5px; right: 5px; width: calc(50% - 5px); border-radius: 12px;
  background: var(--lp-teal); box-shadow: 0 4px 12px rgba(28,107,120,.35); transition: transform .35s cubic-bezier(.3,1.4,.5,1);
}
.lp-cycle.is-yearly .lp-cycle-pill { transform: translateX(-100%); }
.lp-plans { display: grid; grid-template-columns: 1fr; gap: 14px; }
.lp-plan {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 20px; border-radius: var(--lp-radius);
  background: var(--lp-card); border: 1.5px solid var(--lp-line); transition: transform .25s, box-shadow .25s, border-color .25s;
}
.lp-plan:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -24px rgba(16,38,61,.35); border-color: var(--lp-teal-2); }
.lp-plan-featured {
  border: 2px solid transparent;
  background: linear-gradient(var(--lp-card), var(--lp-card)) padding-box, linear-gradient(135deg, var(--lp-teal-2), var(--lp-gold)) border-box;
  box-shadow: 0 24px 50px -26px rgba(28,107,120,.6);
}
.lp-plan-ribbon {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-size: 12px; font-weight: 800; color: var(--lp-night); background: var(--lp-gold); padding: 4px 14px; border-radius: 999px;
}
.lp-plan-ico { font-size: 30px; }
.lp-plan h3 { font-size: 18px; font-weight: 800; color: var(--lp-ink); }
.lp-plan-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.lp-plan-price b { font-size: 38px; font-weight: 800; color: var(--lp-ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.lp-plan-price small { font-size: 13px; font-weight: 700; color: var(--lp-ink-soft); }
.lp-plan-tag { font-size: 13.5px; font-weight: 700; color: var(--lp-teal); line-height: 1.6; }
:root[data-theme="dark"] .lp-plan-tag { color: var(--lp-mint); }
.lp-plan ul { display: flex; flex-direction: column; gap: 7px; margin: 6px 0 12px; }
.lp-plan li { font-size: 13.5px; color: var(--lp-ink-soft); font-weight: 600; display: flex; gap: 8px; line-height: 1.5; }
.lp-plan li::before { content: '✓'; color: var(--correct); font-weight: 900; }
.lp-plan-cta { margin-top: auto; width: 100%; }
.lp-pay-note { margin-top: 22px; text-align: center; font-size: 13.5px; color: var(--lp-ink-soft); font-weight: 700; line-height: 1.8; }

/* ── testimonials + faq ──────────────────────────────────── */
.lp-quote-row { display: grid; grid-template-columns: 1fr; gap: 14px; }
.lp-quote { background: var(--lp-card); border: 1.5px solid var(--lp-line); border-radius: var(--lp-radius); padding: 22px; position: relative; }
.lp-quote::before { content: '❞'; position: absolute; top: 6px; left: 16px; font-size: 52px; color: var(--lp-teal-2); opacity: .25; line-height: 1; }
.lp-quote blockquote { font-size: 15.5px; line-height: 1.85; color: var(--lp-ink); font-weight: 700; }
.lp-quote figcaption { margin-top: 12px; font-size: 13px; color: var(--lp-ink-soft); font-weight: 700; }
.lp-faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.lp-faq details { background: var(--lp-card); border: 1.5px solid var(--lp-line); border-radius: 16px; padding: 4px 18px; transition: border-color .2s; }
.lp-faq details[open] { border-color: var(--lp-teal-2); }
.lp-faq summary { cursor: pointer; list-style: none; font-weight: 800; font-size: 15.5px; color: var(--lp-ink); padding: 14px 0; display: flex; justify-content: space-between; gap: 12px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--lp-teal); transition: transform .25s; }
.lp-faq details[open] summary::after { transform: rotate(45deg); }
.lp-faq p { font-size: 14.5px; line-height: 1.85; color: var(--lp-ink-soft); font-weight: 600; padding-bottom: 16px; }

/* ── final CTA + footer ──────────────────────────────────── */
.lp-final {
  position: relative; overflow: hidden; text-align: center; color: #fff; padding: 80px 16px;
  background: linear-gradient(135deg, var(--lp-teal) 0%, #0f4f5a 60%, #2d1b69 100%);
}
.lp-final-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .7; }
.lp-final > :not(canvas) { position: relative; }
.lp-final h2 { font-size: clamp(26px, 5vw, 42px); font-weight: 800; line-height: 1.35; }
.lp-final p { font-size: 16px; color: #cfeff0; margin: 10px 0 24px; font-weight: 700; }
.lp-footer { text-align: center; padding: 34px 16px 44px; background: var(--lp-night); }
.lp-logo-footer { justify-content: center; margin-bottom: 16px; }
.lp-footer-links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.lp-footer-links a { color: #b9c2d9; font-size: 13px; font-weight: 700; text-decoration: none; }
.lp-footer-links a:hover { color: #fff; }
.lp-footer-note { color: #6c7797; font-size: 11.5px; font-weight: 600; }

/* entrance: js/landing.js animates these with GSAP; without it they just show */
.lp-js .lp-in { opacity: 0; transform: translateY(24px); }

/* ── wider screens ───────────────────────────────────────── */
@media (min-width: 640px) {
  .lp-hero-ctas { flex-direction: row; justify-content: center; max-width: none; }
  .lp-hero-stats { grid-template-columns: repeat(4, 1fr); }
  .lp-games { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .lp-plans { grid-template-columns: repeat(2, 1fr); }
  .lp-quote-row { grid-template-columns: repeat(3, 1fr); }
  .lp-ide-stage { grid-template-columns: 1fr 1fr; align-items: center; }
}
@media (min-width: 900px) {
  .lp-nav { padding: 12px 28px; }
  .lp-nav-links { display: flex; }
  .lp-hero { padding: 110px 28px 90px; }
  .lp-hero-inner { flex-direction: row; justify-content: space-between; gap: 40px; }
  .lp-hero-text { text-align: right; }
  .lp-hero-sub { margin-right: 0; }
  .lp-hero-ctas { justify-content: flex-start; }
  .lp-gate.home-gate-note { margin-right: 0; text-align: right; }
  .lp-hero-art { width: 340px; height: 340px; margin-left: 40px; }
  .lp-section { padding: 100px 28px; }
  .lp-subjects { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .lp-soon { flex-direction: row; justify-content: space-between; padding: 18px 24px; }
  .lp-coding { grid-template-columns: 1fr 1.1fr; gap: 56px; }
  .lp-ide-body { grid-template-columns: 200px 1fr; }
  .lp-ide-stage { grid-template-columns: 1fr; }
  .lp-games-extra { grid-template-columns: 1.1fr 1fr; }
  .lp-board { grid-template-columns: 1.5fr 1fr; gap: 22px; }
  .lp-bento { grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(210px, auto); }
  .lp-feat-wide { grid-column: span 2; }
  .lp-plans { grid-template-columns: repeat(5, 1fr); gap: 14px; align-items: stretch; }
  .lp-plan { padding: 22px 16px; }
  .lp-plan-price b { font-size: 34px; }
}
@media (min-width: 1100px) {
  .lp-games { grid-template-columns: repeat(6, 1fr); }
  .lp-ide-stage { grid-template-columns: 1fr 1fr; }
}
/* phones: the logo keeps its mark, the buttons keep their room */
@media (max-width: 560px) {
  .lp-logo:not(.lp-logo-footer) { font-size: 0; gap: 0; }
  .lp-logo:not(.lp-logo-footer) .lp-logo-mark { font-size: 19px; }
  .lp-nav { padding: 10px 12px; }
}
@media (max-width: 380px) {
  .lp-nav-actions .lp-btn { padding: 8px 11px; font-size: 13px; }
  .lp-games { grid-template-columns: 1fr; }
  .lp-chip { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .lp { scroll-behavior: auto; }
  .lp *, .lp *::before, .lp *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .lp-js .lp-in { opacity: 1; transform: none; }
}
