/* ==========================================================================
   Landing page — full-viewport hero, no page scroll.
   Self-contained: no Bootstrap, no 3D library. Every scene in the deck is
   built from real CSS 3D cuboids (see "3D primitives" below).
   ========================================================================== */

:root {
  --lp-ink: #f4f6ff;
  --lp-muted: #9ba6c6;
  --lp-dim: #6f7a99;
  --lp-void: #05070f;
  --lp-deep: #0a0f22;
  --lp-panel: rgba(255, 255, 255, 0.05);
  --lp-line: rgba(255, 255, 255, 0.1);
  --lp-indigo: #3b46ff;
  --lp-violet: #8a3cf6;
  --lp-amber: #ffc93c;
  --lp-orange: #ff7a18;
  --lp-brand: linear-gradient(135deg, #ffc93c 0%, #ff7a18 100%);

  /* Two independent scale inputs (width- and height-driven); the deck uses
     whichever is smaller so the scene never overflows a short viewport. */
  --sw: 1;
  --sh: 1;
  --scale: min(var(--sw), var(--sh));
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body.lp-body {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--lp-void);
  color: var(--lp-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Shell ────────────────────────────────────────────────────────────── */

.lp {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  isolation: isolate;
}

/* ── Animated background ──────────────────────────────────────────────── */

.lp-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 78% 12%, #131c3f 0%, transparent 55%),
    radial-gradient(90% 80% at 8% 92%, #1a1230 0%, transparent 60%),
    linear-gradient(180deg, #080c1c 0%, #05070f 100%);
}

.lp-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}

.orb-1 {
  width: 46vmax;
  height: 46vmax;
  right: -12vmax;
  top: -16vmax;
  background: radial-gradient(circle at 35% 35%, rgba(255, 145, 40, 0.55), transparent 62%);
  animation: orb-drift-a 22s ease-in-out infinite;
}

.orb-2 {
  width: 40vmax;
  height: 40vmax;
  left: -14vmax;
  bottom: -14vmax;
  background: radial-gradient(circle at 60% 40%, rgba(72, 84, 255, 0.6), transparent 62%);
  animation: orb-drift-b 26s ease-in-out infinite;
}

.orb-3 {
  width: 30vmax;
  height: 30vmax;
  left: 44%;
  top: 52%;
  background: radial-gradient(circle at 50% 50%, rgba(138, 60, 246, 0.42), transparent 65%);
  animation: orb-drift-c 30s ease-in-out infinite;
}

/* Starfield: three tiled dot layers at different densities. */
.lp-bg .stars {
  position: absolute;
  inset: -20%;
  background-image:
    radial-gradient(1.6px 1.6px at 20px 30px, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1.4px 1.4px at 130px 90px, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.2px 1.2px at 70px 160px, rgba(255, 214, 150, 0.55), transparent),
    radial-gradient(1.8px 1.8px at 190px 40px, rgba(255, 255, 255, 0.35), transparent);
  background-size: 240px 240px, 320px 320px, 400px 400px, 520px 520px;
  opacity: 0.5;
  animation: star-drift 120s linear infinite;
}

.lp-bg .mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(100% 70% at 50% 40%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(100% 70% at 50% 40%, #000 10%, transparent 78%);
}

/* Follows the pointer (vars set in landing.js). */
.lp-bg .spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    340px 340px at var(--mx, 70%) var(--my, 30%),
    rgba(255, 170, 60, 0.13),
    transparent 70%
  );
  transition: background-position 0.2s ease;
}

.lp-bg .vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 100% at 50% 50%, transparent 45%, rgba(0, 0, 0, 0.65) 100%);
}

/* ── Top bar ──────────────────────────────────────────────────────────── */

.lp-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(14px, 2.2vh, 26px) clamp(18px, 4vw, 60px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: clamp(38px, 4.4vh, 50px);
  aspect-ratio: 1;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(255, 122, 24, 0.28);
  overflow: hidden;
  flex: none;
}

.brand-logo img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-size: clamp(0.95rem, 1.6vh, 1.1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-text small {
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--lp-dim);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--lp-line);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  color: var(--lp-ink);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.btn-ghost:hover {
  border-color: rgba(255, 201, 60, 0.55);
  background: rgba(255, 201, 60, 0.1);
  transform: translateY(-1px);
}

.btn-ghost svg {
  width: 15px;
  height: 15px;
}

/* ── Main split ───────────────────────────────────────────────────────── */

.lp-main {
  position: relative;
  z-index: 2;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(16px, 3vw, 56px);
  padding: 0 clamp(18px, 4vw, 60px);
}

/* ── Copy column ──────────────────────────────────────────────────────── */

.lp-copy {
  max-width: 34rem;
  animation: rise-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 201, 60, 0.28);
  background: rgba(255, 201, 60, 0.08);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffd67a;
  margin-bottom: clamp(12px, 2.4vh, 22px);
}

.eyebrow .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lp-amber);
  box-shadow: 0 0 0 0 rgba(255, 201, 60, 0.6);
  animation: pulse-dot 2.4s ease-out infinite;
}

.lp-copy h1 {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.1rem, 5.2vw, 4.15rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 clamp(10px, 1.8vh, 18px);
}

.lp-copy h1 .grad {
  display: block;
  background: var(--lp-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
}

.lp-copy .lead {
  color: var(--lp-muted);
  font-size: clamp(0.92rem, 1.05vw, 1.06rem);
  line-height: 1.65;
  max-width: 30rem;
  margin: 0 0 clamp(18px, 3.2vh, 34px);
}

.cta-row {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 20px);
  flex-wrap: wrap;
}

.btn-login {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: clamp(13px, 1.7vh, 17px) clamp(24px, 2.4vw, 34px);
  border-radius: 999px;
  border: 0;
  background: var(--lp-brand);
  color: #1b1103;
  font-family: inherit;
  font-size: clamp(0.92rem, 1vw, 1.02rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 14px 38px rgba(255, 122, 24, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease;
}

.btn-login:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 20px 48px rgba(255, 122, 24, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-login:active {
  transform: translateY(0) scale(0.99);
}

.btn-login svg {
  width: 17px;
  height: 17px;
  transition: transform 0.25s ease;
}

.btn-login:hover svg {
  transform: translateX(4px);
}

/* Sheen sweep. */
.btn-login::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -30%;
  width: 40%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-22deg);
  animation: sheen 4.5s ease-in-out infinite;
}

.roles {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--lp-dim);
}

/* Each chip is its own sign-in door: admin, teacher, student, parent. */
.roles a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--lp-line);
  background: var(--lp-panel);
  color: #c3cbe4;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.22s ease, border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.roles a:hover,
.roles a:focus-visible {
  color: #fff;
  border-color: rgba(255, 201, 60, 0.55);
  background: rgba(255, 201, 60, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.roles a i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lp-amber);
  flex: none;
  transition: box-shadow 0.22s ease;
}

.roles a:hover i,
.roles a:focus-visible i {
  box-shadow: 0 0 8px 2px rgba(255, 201, 60, 0.75);
}

/* ── Stage / deck ─────────────────────────────────────────────────────── */

.lp-stage {
  position: relative;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vh, 20px);
  padding-bottom: clamp(6px, 1.4vh, 16px);
  animation: rise-in 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.12s both;
}

.deck {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  perspective: 1200px;
  perspective-origin: 50% 46%;
}

.deck::before {
  /* floor glow under the scenes */
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: min(60%, 420px);
  height: 90px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255, 160, 60, 0.28), transparent 70%);
  filter: blur(18px);
  pointer-events: none;
}

.slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  opacity: 0;
  visibility: hidden;
  transform: rotateY(38deg) translateZ(-140px) scale(0.9);
  transition: opacity 0.75s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.9s;
  pointer-events: none;
}

.slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: rotateY(0deg) translateZ(0) scale(1);
  transition: opacity 0.75s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
}

.slide.is-leaving {
  transform: rotateY(-38deg) translateZ(-140px) scale(0.9);
}

/* The 3D root of each slide: scaled to fit, tilted by pointer parallax. */
.scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: scale(var(--scale));
}

/* --tilt-base keeps a slight "looking down at it" camera at rest; --tx/--ty are
   the pointer parallax offsets written by landing.js. */
.core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  --tilt-base: -8; /* negative pitch = camera looks down onto the scene */
  transform-style: preserve-3d;
  transform: rotateX(calc((var(--ty, 0) + var(--tilt-base)) * 1deg)) rotateY(calc(var(--tx, 0) * 1deg));
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ── Deck caption + nav ───────────────────────────────────────────────── */

.deck-foot {
  position: relative;
  z-index: 2;
  width: min(100%, 460px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.4vh, 14px);
  text-align: center;
  flex: none;
}

.caption {
  position: relative;
  align-self: stretch; /* flex centring would otherwise shrink-wrap it to nothing */
  width: 100%;
  min-height: 3.6em;
}

.caption-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.caption-item.is-active {
  opacity: 1;
  transform: none;
}

.caption-item b {
  display: block;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}

.caption-item span {
  display: block;
  font-size: 0.85rem;
  color: var(--lp-muted);
  line-height: 1.5;
}

.dots {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  position: relative;
  width: 30px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  overflow: hidden;
  transition: width 0.4s ease, background 0.3s ease;
}

.dot:hover {
  background: rgba(255, 255, 255, 0.3);
}

.dot.is-active {
  width: 62px;
  background: rgba(255, 255, 255, 0.16);
}

.dot .fill {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(0);
  background: var(--lp-brand);
  border-radius: inherit;
}

.dot.is-active .fill {
  animation: dot-fill var(--dur, 7000ms) linear forwards;
}

.deck.is-paused .dot.is-active .fill {
  animation-play-state: paused;
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.lp-foot {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: clamp(10px, 1.8vh, 22px) clamp(18px, 4vw, 60px);
  font-size: 0.74rem;
  color: var(--lp-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.lp-foot a {
  color: var(--lp-muted);
  text-decoration: none;
}

.lp-foot a:hover {
  color: var(--lp-ink);
}

.lp-foot .secure {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.lp-foot .secure svg {
  width: 13px;
  height: 13px;
}

/* ==========================================================================
   3D primitives — a parametric cuboid.
   .node = a zero-size anchor point used purely for placement/rotation.
   .box  = a cuboid centred on its parent node, sized by --w / --h / --d.
   ========================================================================== */

.node {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}

.box {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--w);
  height: var(--h);
  margin-left: calc(var(--w) / -2);
  margin-top: calc(var(--h) / -2);
  transform-style: preserve-3d;
}

.box > i {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  background: var(--c, #2a3153);
  backface-visibility: hidden;
}

.box > .fz {
  width: var(--w);
  height: var(--h);
  transform: translateZ(calc(var(--d) / 2));
}

.box > .bz {
  width: var(--w);
  height: var(--h);
  transform: translateZ(calc(var(--d) / -2)) rotateY(180deg);
}

.box > .rx {
  width: var(--d);
  height: var(--h);
  transform: translateX(calc((var(--w) - var(--d)) / 2)) rotateY(90deg) translateZ(calc(var(--w) / 2));
}

.box > .lx {
  width: var(--d);
  height: var(--h);
  transform: translateX(calc((var(--w) - var(--d)) / 2)) rotateY(-90deg) translateZ(calc(var(--w) / 2));
}

.box > .ty {
  width: var(--w);
  height: var(--d);
  transform: translateY(calc((var(--h) - var(--d)) / 2)) rotateX(90deg) translateZ(calc(var(--h) / 2));
}

.box > .by {
  width: var(--w);
  height: var(--d);
  transform: translateY(calc((var(--h) - var(--d)) / 2)) rotateX(-90deg) translateZ(calc(var(--h) / 2));
}

/* A flat centred plane (for shadows, rings, glows). */
.plane {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--w);
  height: var(--h);
  margin-left: calc(var(--w) / -2);
  margin-top: calc(var(--h) / -2);
}

.floor-shadow {
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55), transparent 68%);
  filter: blur(10px);
}

.ring {
  border-radius: 50%;
  border: 1px solid rgba(255, 201, 60, 0.28);
  box-shadow: 0 0 34px rgba(255, 160, 60, 0.16), inset 0 0 34px rgba(255, 160, 60, 0.08);
  animation: spin-y 26s linear infinite;
}

.ring.alt {
  border-color: rgba(96, 122, 255, 0.3);
  box-shadow: 0 0 34px rgba(80, 110, 255, 0.16), inset 0 0 34px rgba(80, 110, 255, 0.08);
  animation-duration: 34s;
  animation-direction: reverse;
}

/* Free-floating glyph chips shared by all scenes. */
.chip {
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
  font-size: 18px;
  font-weight: 700;
  color: #ffe6ad;
}

.chip svg {
  width: 20px;
  height: 20px;
}

.spark {
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(255, 201, 60, 0.9) 40%, transparent 70%);
  box-shadow: 0 0 12px rgba(255, 201, 60, 0.9);
}

/* ── Scene 1: books + mortarboard ─────────────────────────────────────── */

.scene-books .core {
  animation: sway-y 16s ease-in-out infinite;
}

.book > .fz {
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.book > .bz {
  background: linear-gradient(135deg, var(--c2), var(--c1));
  filter: brightness(0.7);
}

.book > .lx {
  background: linear-gradient(180deg, var(--c1), var(--c2));
  filter: brightness(0.82);
  display: grid;
  place-items: center;
}

.book > .rx,
.book > .ty,
.book > .by {
  background: repeating-linear-gradient(
    90deg,
    #f7f5ef 0px,
    #f7f5ef 2px,
    #ddd8cb 2px,
    #ddd8cb 3px
  );
}

.book > .ty {
  background: linear-gradient(180deg, var(--c1), var(--c2));
  filter: brightness(1.06);
}

.book .spine-tag {
  width: 60%;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.55);
}

.mortar > i {
  background: linear-gradient(140deg, #454e7d, #262c47);
}

.mortar > .ty {
  background: linear-gradient(140deg, #6a76b8, #3a4271);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 122, 0.35);
}

.crown > i {
  background: linear-gradient(150deg, #3d4570, #222840);
}

.crown > .ty {
  background: linear-gradient(150deg, #525c95, #2c3352);
}

.tassel {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 54px;
  margin-left: -1.5px;
  background: linear-gradient(180deg, var(--lp-amber), var(--lp-orange));
  transform-origin: top center;
  animation: swing 4.6s ease-in-out infinite;
}

.tassel::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 12px;
  height: 16px;
  margin-left: -6px;
  border-radius: 4px 4px 6px 6px;
  background: linear-gradient(180deg, var(--lp-amber), var(--lp-orange));
  box-shadow: 0 0 14px rgba(255, 160, 40, 0.6);
}

.float-a {
  animation: bob 5.5s ease-in-out infinite;
}

.float-b {
  animation: bob 6.8s ease-in-out infinite 0.6s;
}

.float-c {
  animation: bob 8s ease-in-out infinite 1.2s;
}

/* ── Scene 2: board + desk ────────────────────────────────────────────── */

.scene-board .core {
  animation: sway-y 20s ease-in-out infinite reverse;
}

.board > i {
  background: linear-gradient(160deg, #cfa54a, #8d6a24);
}

.board > .fz {
  background: linear-gradient(165deg, #0e2b26, #071a17);
  box-shadow: inset 0 0 0 7px #a97f31, inset 0 0 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.board-art {
  position: absolute;
  inset: 7px;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
}

.board-art path,
.board-art line,
.board-art circle,
.board-art rect {
  stroke: rgba(230, 245, 235, 0.9);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: var(--len, 400);
  stroke-dashoffset: var(--len, 400);
  animation: draw 9s ease-in-out infinite;
  animation-delay: var(--dly, 0s);
}

.board-art .accent {
  stroke: var(--lp-amber);
}

.board-art text {
  fill: rgba(235, 250, 242, 0.92);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 21px;
  opacity: 0;
  animation: fade-cycle 9s ease-in-out infinite;
  animation-delay: var(--dly, 0s);
}

.board-leg > i {
  background: linear-gradient(180deg, #414a6b, #232a42);
}

.desk > i {
  background: linear-gradient(160deg, #3a4266, #232a42);
}

.desk > .ty {
  background: linear-gradient(160deg, #5b6591, #39426b);
}

.marker > i {
  background: linear-gradient(180deg, #ff9a3c, #e2571c);
}

.marker > .rx {
  background: #fff3d8;
}

/* ── Scene 3: laptop / live class ─────────────────────────────────────── */

.scene-live .core {
  animation: sway-y 18s ease-in-out infinite;
}

.lap-base > i {
  background: linear-gradient(160deg, #39415f, #1c2137);
}

.lap-base > .ty {
  background: linear-gradient(160deg, #4d5677, #2b3151);
  display: grid;
  place-items: center;
}

.keys {
  width: 84%;
  height: 62%;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 1fr;
  gap: 2px;
  transform: translateY(-8%);
}

.keys i {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

.trackpad {
  position: absolute;
  left: 50%;
  bottom: 6%;
  width: 26%;
  height: 20%;
  transform: translateX(-50%);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.lap-lid > i {
  background: linear-gradient(160deg, #333a57, #1a1f33);
}

.lap-lid > .fz {
  background: #070c1b;
  box-shadow: inset 0 0 0 6px #262c46;
  overflow: hidden;
  padding: 14px;
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
}

.screen .tile {
  position: relative;
  border-radius: 8px;
  background: linear-gradient(150deg, rgba(90, 110, 255, 0.42), rgba(30, 38, 70, 0.85));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  animation: tile-in 6s ease-in-out infinite;
}

.screen .tile:nth-child(2) {
  animation-delay: 0.5s;
  background: linear-gradient(150deg, rgba(255, 160, 60, 0.4), rgba(50, 32, 20, 0.85));
}

.screen .tile:nth-child(3) {
  animation-delay: 1s;
  background: linear-gradient(150deg, rgba(138, 60, 246, 0.42), rgba(35, 24, 60, 0.85));
}

.screen .tile:nth-child(4) {
  animation-delay: 1.5s;
  background: linear-gradient(150deg, rgba(60, 200, 170, 0.36), rgba(18, 44, 40, 0.85));
}

/* Little avatar puck inside each tile. */
.screen .tile::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 34%;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
}

.screen .tile::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 60%;
  width: 44px;
  height: 22px;
  margin-left: -22px;
  border-radius: 22px 22px 0 0;
  background: rgba(255, 255, 255, 0.55);
}

.live-pill {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 60, 80, 0.92);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.live-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: pulse-dot 1.6s ease-out infinite;
}

.waveform {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
  transform: translateX(-50%);
}

.waveform i {
  width: 3px;
  height: 30%;
  border-radius: 2px;
  background: var(--lp-amber);
  animation: eq 1.1s ease-in-out infinite;
}

.waveform i:nth-child(2) { animation-delay: 0.12s; }
.waveform i:nth-child(3) { animation-delay: 0.24s; }
.waveform i:nth-child(4) { animation-delay: 0.36s; }
.waveform i:nth-child(5) { animation-delay: 0.48s; }
.waveform i:nth-child(6) { animation-delay: 0.6s; }

.bubble {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border-radius: 14px 14px 14px 4px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  color: #eef2ff;
}

.bubble i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6ee7b7;
}

/* ── Scene 4: sports — track, podium, trophy ──────────────────────────── */

.scene-sports .core {
  animation: sway-y 19s ease-in-out infinite;
}

.track-floor > i {
  background: linear-gradient(180deg, #7c3524, #4a2119);
}

.track-floor > .ty {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.55) 0 3px, transparent 3px 54px),
    linear-gradient(160deg, #c25c3c, #7c3524);
}

.podium > i {
  background: linear-gradient(180deg, #3d4675, #232a49);
}

.podium > .fz {
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.podium > .ty {
  background: linear-gradient(160deg, #5b67a8, #39426f);
}

.podium .num {
  font-size: 30px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.podium.p1 > .ty { background: linear-gradient(160deg, #ffd76a, #d98a19); }
.podium.p2 > .ty { background: linear-gradient(160deg, #dfe6f5, #94a0bd); }
.podium.p3 > .ty { background: linear-gradient(160deg, #e2a76b, #b06a2a); }

.trophy-cup {
  border-radius: 10px 10px 46% 46% / 8px 8px 76% 76%;
  background: linear-gradient(150deg, #ffe8a6, #ff9f1a 48%, #d9761a);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4), 0 0 30px rgba(255, 170, 50, 0.5);
  display: grid;
  place-items: center;
  color: rgba(120, 62, 6, 0.75);
}

/* Cup handles. */
.trophy-cup::before,
.trophy-cup::after {
  content: "";
  position: absolute;
  top: 12%;
  width: 28px;
  height: 40px;
  border: 6px solid #f0a72a;
  border-radius: 50%;
}

.trophy-cup::before {
  left: -22px;
  border-right-color: transparent;
}

.trophy-cup::after {
  right: -22px;
  border-left-color: transparent;
}

.trophy > i {
  background: linear-gradient(180deg, #ffcf6b, #c9791a);
}

/* Soccer ball: a centre patch plus five clipped rim patches. */
.ball {
  border-radius: 50%;
  background:
    radial-gradient(circle at 48% 46%, #1b2138 0 15%, transparent 16%),
    radial-gradient(circle at 48% -4%, #1b2138 0 13%, transparent 14%),
    radial-gradient(circle at 3% 34%, #1b2138 0 12%, transparent 13%),
    radial-gradient(circle at 93% 34%, #1b2138 0 12%, transparent 13%),
    radial-gradient(circle at 20% 96%, #1b2138 0 12%, transparent 13%),
    radial-gradient(circle at 78% 96%, #1b2138 0 12%, transparent 13%),
    radial-gradient(circle at 34% 30%, #ffffff 0 44%, #ccd4ea 45% 100%);
  box-shadow: inset -8px -10px 20px rgba(0, 0, 0, 0.3), 0 14px 26px rgba(0, 0, 0, 0.5);
  animation: dribble 1.5s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}

.whistle {
  color: #bfe9ff;
}

@keyframes dribble {
  from { transform: translateY(-34px) scale(1); }
  to { transform: translateY(34px) scale(0.97, 0.94); }
}

/* ── Scene 5: analytics + medal ───────────────────────────────────────── */

.scene-data .core {
  animation: sway-y 22s ease-in-out infinite reverse;
}

.grid-floor > i {
  background:
    linear-gradient(rgba(120, 150, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 150, 255, 0.22) 1px, transparent 1px),
    rgba(20, 28, 55, 0.55);
  background-size: 28px 28px, 28px 28px, 100% 100%;
}

.bar {
  transform-origin: 50% 100%;
  animation: grow-bar 5s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.bar > i {
  background: linear-gradient(180deg, var(--c1), var(--c2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.bar > .ty {
  background: var(--c1);
  filter: brightness(1.25);
}

.medal {
  border-radius: 50%;
  background: conic-gradient(from 210deg, #ffe08a, #ff9f1a, #ffd76a, #e8801a, #ffe08a);
  box-shadow: 0 0 26px rgba(255, 170, 50, 0.55), inset 0 0 0 4px rgba(255, 255, 255, 0.4);
  display: grid;
  place-items: center;
  color: #6a3d05;
  font-weight: 900;
  font-size: 22px;
}

.medal-spin {
  animation: spin-coin 9s linear infinite;
}

.ribbon {
  position: absolute;
  left: 50%;
  bottom: 82%;
  width: 26px;
  height: 30px;
  margin-left: -13px;
  background: linear-gradient(180deg, #ff5b6e, #b02236);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%);
}

.card {
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.94), rgba(226, 232, 255, 0.86));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
  padding: 12px 13px;
  color: #1a2140;
}

.card .k {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6b76a0;
  font-weight: 800;
}

.card .v {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.card .v small {
  font-size: 11px;
  color: #16a34a;
  font-weight: 800;
  margin-left: 4px;
}

.card .sparkline {
  margin-top: 6px;
  width: 100%;
  height: 22px;
}

.card .sparkline path {
  fill: none;
  stroke: #ff7a18;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: draw-once 3.4s ease-in-out infinite;
}

.arrow-up {
  color: #6ee7b7;
}

/* ── Keyframes ────────────────────────────────────────────────────────── */

@keyframes rise-in {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

@keyframes orb-drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-5vw, 4vh, 0) scale(1.12); }
}

@keyframes orb-drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6vw, -5vh, 0) scale(1.1); }
}

@keyframes orb-drift-c {
  0%, 100% { transform: translate3d(-50%, -50%, 0) scale(1); }
  50% { transform: translate3d(-58%, -42%, 0) scale(1.2); }
}

@keyframes star-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-240px, -240px, 0); }
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(255, 201, 60, 0.55); }
  70% { box-shadow: 0 0 0 11px rgba(255, 201, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 201, 60, 0); }
}

@keyframes sheen {
  0%, 62% { left: -35%; }
  100% { left: 125%; }
}

@keyframes dot-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes spin-y {
  from { transform: rotateX(-74deg) rotateZ(0deg); }
  to { transform: rotateX(-74deg) rotateZ(360deg); }
}

@keyframes sway-y {
  0%, 100% {
    transform: rotateX(calc((var(--ty, 0) + var(--tilt-base, 0)) * 1deg))
      rotateY(calc(var(--tx, 0) * 1deg + -13deg));
  }
  50% {
    transform: rotateX(calc((var(--ty, 0) + var(--tilt-base, 0)) * 1deg))
      rotateY(calc(var(--tx, 0) * 1deg + 13deg));
  }
}

/* Applied to a nested node, so placement lives on the parent node and the
   float animation is free to own `transform` outright. */
@keyframes bob {
  0%, 100% { transform: translateY(0) rotateY(0deg); }
  50% { transform: translateY(-16px) rotateY(14deg); }
}

@keyframes spin-coin {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

@keyframes swing {
  0%, 100% { transform: rotateZ(12deg); }
  50% { transform: rotateZ(-12deg); }
}

@keyframes draw {
  0% { stroke-dashoffset: var(--len, 400); }
  35%, 78% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: var(--len, 400); }
}

@keyframes draw-once {
  0% { stroke-dashoffset: 200; }
  55%, 100% { stroke-dashoffset: 0; }
}

@keyframes fade-cycle {
  0%, 18% { opacity: 0; }
  38%, 78% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes tile-in {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.04); filter: brightness(1.25); }
}

@keyframes eq {
  0%, 100% { height: 25%; }
  50% { height: 100%; }
}

@keyframes grow-bar {
  0% { transform: scaleY(0.08); }
  38%, 82% { transform: scaleY(1); }
  100% { transform: scaleY(0.08); }
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 1400px) { :root { --sw: 0.92; } }
@media (max-width: 1200px) { :root { --sw: 0.8; } }
@media (max-width: 992px)  { :root { --sw: 0.74; } }
@media (max-width: 768px)  { :root { --sw: 0.68; } }
@media (max-width: 560px)  { :root { --sw: 0.56; } }
@media (max-width: 400px)  { :root { --sw: 0.46; } }

@media (max-height: 860px) { :root { --sh: 0.88; } }
@media (max-height: 760px) { :root { --sh: 0.78; } }
@media (max-height: 660px) { :root { --sh: 0.66; } }
@media (max-height: 560px) { :root { --sh: 0.54; } }

/* Tablet / phone: stack, stage in the middle, CTA never off-screen. */
@media (max-width: 940px) {
  .lp-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-items: start;
    gap: clamp(6px, 1.6vh, 16px);
    padding-top: clamp(4px, 1vh, 12px);
    text-align: center;
  }

  .lp-copy {
    max-width: none;
    margin: 0 auto;
    order: 1;
  }

  .lp-copy .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .cta-row {
    justify-content: center;
  }

  .lp-stage {
    order: 2;
  }

  .btn-ghost {
    display: none;
  }
}

/* Short screens lose the paragraph, never the role links — they are the doors in. */
@media (max-width: 940px) and (max-height: 720px) {
  .lp-copy .lead {
    display: none;
  }
}

@media (max-width: 560px) {
  .lp-copy .lead {
    font-size: 0.86rem;
  }

  .roles {
    gap: 7px;
    font-size: 0.74rem;
  }

  .roles a {
    padding: 6px 11px;
  }

  .lp-foot .foot-mid {
    display: none;
  }

  .deck-foot {
    width: min(100%, 340px);
  }
}

/* Landscape phones: brutally short — drop the caption block. */
@media (max-height: 520px) and (max-width: 940px) {
  .caption {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .board-art path,
  .board-art line,
  .board-art circle,
  .board-art rect {
    stroke-dashoffset: 0;
  }

  .board-art text,
  .card .sparkline path {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}
