/* Knowzone website: the app's look (white pages, purple open book, Manrope) with motion throughout. */

:root {
  --purple: #7c5cff;
  --purple-deep: #6a45ff;
  --purple-soft: rgba(124, 92, 255, 0.1);
  --magenta: #b04cff;
  --teal: #14c8b4;
  --gold: #ffb627;
  --coral: #ff5a7a;
  --sky: #4cc9ff;
  --ink: #1b1f3b;
  --ink-2: #4a5078;
  --ink-3: #868bae;
  --line: rgba(124, 92, 255, 0.16);
  --surface: #ffffff;
  --tint: #f6f3ff;
  --night: #0b1026;
  --radius: 22px;
  --shadow: 0 24px 60px -24px rgba(76, 48, 190, 0.35);
  --shadow-soft: 0 10px 30px -12px rgba(76, 48, 190, 0.22);
  --ai: linear-gradient(120deg, #7c5cff, #b04cff);
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
}

.wrap {
  width: min(var(--max), 100% - 40px);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ─── Scroll progress ───────────────────────────────────────────────────────── */

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 60;
  background: var(--ai);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ─── Navigation ────────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 6px 16px -6px rgba(124, 92, 255, 0.7);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover img {
  transform: rotate(-8deg) scale(1.08);
}

.brand span b {
  background: var(--ai);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink-2);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--purple);
  background: var(--purple-soft);
}

.menu-btn {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--purple-soft);
  color: var(--purple);
  cursor: pointer;
}

.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: auto;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-btn span::before,
.menu-btn span::after {
  content: '';
  position: absolute;
  left: 0;
}

.menu-btn span::before {
  top: -6px;
}

.menu-btn span::after {
  top: 6px;
}

.nav.open .menu-btn span {
  background: transparent;
}

.nav.open .menu-btn span::before {
  transform: translateY(6px) rotate(45deg);
}

.nav.open .menu-btn span::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ─── Buttons ───────────────────────────────────────────────────────────────── */

.btn {
  --x: 50%;
  --y: 50%;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary {
  color: #fff;
  background: var(--ai);
  box-shadow: 0 14px 30px -12px rgba(124, 92, 255, 0.75);
}

/* A soft light that follows the pointer across the button. */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(160px circle at var(--x) var(--y), rgba(255, 255, 255, 0.35), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-primary:hover {
  box-shadow: 0 20px 40px -14px rgba(124, 92, 255, 0.85);
}

.btn-ghost {
  color: var(--purple);
  background: var(--purple-soft);
}

.btn-ghost:hover {
  background: rgba(124, 92, 255, 0.16);
}

.btn-sm {
  padding: 10px 18px;
  font-size: 14px;
}

.btn .arrow {
  transition: transform 0.25s;
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* ─── Shared bits ───────────────────────────────────────────────────────────── */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(20, 200, 180, 0.6);
  animation: ping 2s infinite;
}

.grad {
  background: linear-gradient(110deg, #7c5cff 0%, #b04cff 35%, #14c8b4 70%, #7c5cff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 8s linear infinite;
}

.section {
  position: relative;
  padding: 110px 0;
}

.section-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
  display: grid;
  gap: 16px;
  justify-items: center;
}

.section-head h2 {
  font-size: clamp(32px, 4.4vw, 52px);
}

.section-head p {
  font-size: 18px;
  color: var(--ink-2);
}

/* The app's open purple book, behind sections. */
.book-bg {
  position: absolute;
  left: 50%;
  width: min(1100px, 120vw);
  transform: translateX(-50%);
  opacity: 0.55;
  pointer-events: none;
  z-index: -1;
}

/* ─── Hero ──────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 40px 0 120px;
  isolation: isolate;
  overflow: hidden;
}

/* The hero's background fades into the white page instead of ending in a line. */
.hero::after,
.page-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 160px;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff);
  z-index: -1;
  pointer-events: none;
}

.hero .book-bg {
  bottom: -40px;
  animation: bookFloat 9s ease-in-out infinite;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  z-index: -2;
  animation: drift 18s ease-in-out infinite alternate;
}

.blob.b1 {
  width: 520px;
  height: 520px;
  top: -160px;
  left: -140px;
  background: #c3b5ff;
}

.blob.b2 {
  width: 420px;
  height: 420px;
  top: 60px;
  right: -120px;
  background: #ffd9f6;
  animation-delay: -6s;
}

.blob.b3 {
  width: 360px;
  height: 360px;
  bottom: -80px;
  left: 35%;
  background: #b8f3ea;
  animation-delay: -12s;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 40px;
}

.hero-copy {
  display: grid;
  gap: 24px;
  justify-items: start;
}

.hero h1 {
  font-size: clamp(42px, 6.2vw, 76px);
}

.hero h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.hero h1 .line > span {
  display: inline-block;
  transform: translateY(110%);
  animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero h1 .line:nth-child(2) > span {
  animation-delay: 0.12s;
}

.hero h1 .line:nth-child(3) > span {
  animation-delay: 0.24s;
}

/* The word that changes: "JAMB", "WAEC", "calculus"… */
.swap {
  display: inline-grid;
  vertical-align: bottom;
  text-align: left;
}

.swap > span {
  grid-area: 1 / 1;
  background: linear-gradient(110deg, #7c5cff 0%, #b04cff 45%, #14c8b4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  transform: translateY(40%) rotateX(-60deg);
  transition: opacity 0.5s, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.swap > span.on {
  opacity: 1;
  transform: none;
}

.swap > span.off {
  opacity: 0;
  transform: translateY(-40%) rotateX(60deg);
}

.hero .lead {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink-2);
  max-width: 560px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 700;
}

.hero-note svg {
  flex: none;
}

.fade-in {
  opacity: 0;
  animation: fadeUp 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.d1 {
  animation-delay: 0.35s;
}

.d2 {
  animation-delay: 0.5s;
}

.d3 {
  animation-delay: 0.65s;
}

.d4 {
  animation-delay: 0.8s;
}

/* Phones */
.hero-visual {
  position: relative;
  height: 640px;
  perspective: 1400px;
}

.phone {
  position: absolute;
  width: 270px;
  aspect-ratio: 600 / 1298;
  padding: 9px;
  border-radius: 44px;
  background: linear-gradient(145deg, #2a2f55, #0f1330);
  box-shadow: 0 40px 80px -30px rgba(27, 31, 59, 0.6), inset 0 0 0 1.5px rgba(255, 255, 255, 0.12);
}


.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 36px;
  background: #fff;
}

.hero-visual .phone {
  transition: transform 0.2s linear;
}

.hero-visual .p1 {
  left: 50%;
  top: 30px;
  margin-left: -135px;
  z-index: 3;
  animation: phoneIn 1.1s 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both, float 7s 1.4s ease-in-out infinite;
}

.hero-visual .p2 {
  left: 2%;
  top: 110px;
  width: 230px;
  z-index: 2;
  --r: -9deg;
  animation: phoneIn 1.1s 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both, float 8s 1.6s ease-in-out infinite;
}

.hero-visual .p3 {
  right: 2%;
  top: 110px;
  width: 230px;
  z-index: 2;
  --r: 9deg;
  animation: phoneIn 1.1s 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both, float 7.5s 1.8s ease-in-out infinite;
}

/* Little cards floating around the phones. */
.chip {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  animation: chipIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both, bob 5s ease-in-out infinite;
}

.chip small {
  display: block;
  font-weight: 600;
  color: var(--ink-3);
  font-size: 11px;
}

.chip i {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-style: normal;
  font-size: 16px;
}

.chip.c1 {
  top: 40px;
  left: -10px;
  animation-delay: 1.2s, 1.2s;
}

.chip.c2 {
  top: 300px;
  right: -16px;
  animation-delay: 1.45s, 2s;
}

.chip.c3 {
  bottom: 40px;
  left: 6%;
  animation-delay: 1.7s, 2.6s;
}

.sparkle {
  position: absolute;
  color: var(--gold);
  font-size: 22px;
  animation: twinkle 3s ease-in-out infinite;
  pointer-events: none;
}

/* ─── Marquee ───────────────────────────────────────────────────────────────── */

.marquee {
  position: relative;
  overflow: hidden;
  padding: 22px 0;
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg, #fff, var(--tint), #fff);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
  display: flex;
  gap: 44px;
  width: max-content;
  animation: scroll 40s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  color: var(--ink-2);
  white-space: nowrap;
}

.marquee-track span::before {
  content: '✦';
  color: var(--purple);
}

/* ─── Stats ─────────────────────────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.stat {
  padding: 26px 18px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.stat b {
  display: block;
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--ai);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}

/* ─── Feature cards ─────────────────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 26px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out, box-shadow 0.3s;
  overflow: hidden;
}

/* A glow that follows the pointer. */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--mx) var(--my), rgba(124, 92, 255, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  box-shadow: var(--shadow);
}

.card .icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 24px;
  color: #fff;
  box-shadow: 0 10px 20px -10px currentColor;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover .icon {
  transform: translateY(-4px) rotate(-6deg) scale(1.06);
}

.card h3 {
  font-size: 19px;
}

.card p {
  color: var(--ink-2);
  font-size: 15px;
}

.card .tag {
  justify-self: start;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(20, 200, 180, 0.12);
  color: #0f9f8a;
  font-size: 12px;
  font-weight: 800;
}

.i-purple {
  background: linear-gradient(135deg, #9b6bff, #6a45ff);
}

.i-pink {
  background: linear-gradient(135deg, #ff6fb5, #e0459a);
}

.i-blue {
  background: linear-gradient(135deg, #3ba9ff, #1f6fe5);
}

.i-gold {
  background: linear-gradient(135deg, #ffb547, #ff8a1f);
}

.i-teal {
  background: linear-gradient(135deg, #3ddcb0, #14a88e);
}

.i-coral {
  background: linear-gradient(135deg, #ff7a93, #e5486a);
}

.i-indigo {
  background: linear-gradient(135deg, #5b7cff, #3b2dbf);
}

.i-green {
  background: linear-gradient(135deg, #7ce38b, #0e8f6e);
}

/* ─── Scroll story: a phone that changes screen as you read ────────────────── */

.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.story-steps {
  display: grid;
}

.step {
  min-height: 78vh;
  display: grid;
  align-content: center;
  gap: 16px;
  opacity: 0.25;
  transform: translateX(-10px);
  transition: opacity 0.5s, transform 0.5s;
}

.step.active {
  opacity: 1;
  transform: none;
}

.step .eyebrow {
  justify-self: start;
}

.step h3 {
  font-size: clamp(28px, 3.2vw, 42px);
}

.step p {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 500px;
}

.step ul {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.step li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--ink-2);
  font-weight: 600;
}

.step li::before {
  content: '✓';
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(20, 200, 180, 0.14);
  color: #0f9f8a;
  font-size: 13px;
  font-weight: 800;
}

.story-stage {
  position: sticky;
  top: 11vh;
  height: 78vh;
  display: grid;
  place-items: center;
}

.story-stage .halo {
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #c3b5ff, #ffd9f6, #b8f3ea, #c3b5ff);
  filter: blur(50px);
  opacity: 0.8;
  animation: spin 16s linear infinite;
}

.story-stage .phone {
  position: relative;
  width: min(300px, 70vw);
}

.story-stage .phone img {
  position: absolute;
  inset: 9px;
  width: calc(100% - 18px);
  height: calc(100% - 18px);
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.6s, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.story-stage .phone img.on {
  opacity: 1;
  transform: none;
}

.story-stage .phone .spacer {
  width: 100%;
  aspect-ratio: 600 / 1298;
}

.story-dots {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 10px;
}

.story-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.3s, height 0.3s;
}

.story-dots i.on {
  height: 26px;
  border-radius: 6px;
  background: var(--purple);
}

/* ─── Knowzone World (dark, starry) ─────────────────────────────────────────── */

.world {
  position: relative;
  color: #fff;
  background: radial-gradient(ellipse at top, #2a1f7a 0%, #120d3d 45%, #070b1f 100%);
  overflow: hidden;
  isolation: isolate;
}

.world .section-head p {
  color: rgba(255, 255, 255, 0.75);
}

.world .eyebrow {
  background: rgba(255, 255, 255, 0.12);
  color: #e6dfff;
}

.stars,
.stars::before,
.stars::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(1.5px 1.5px at 20% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 20%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 40% 80%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 85% 65%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 10% 70%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 55% 50%, #c3b5ff 50%, transparent 51%);
  background-size: 260px 260px;
  animation: twinkleBg 6s ease-in-out infinite;
}

.stars::before {
  content: '';
  background-size: 410px 410px;
  animation-delay: -2s;
  opacity: 0.7;
}

.stars::after {
  content: '';
  background-size: 170px 170px;
  animation-delay: -4s;
  opacity: 0.5;
}

.world-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 50px;
  align-items: center;
}

.world-hero {
  position: relative;
  display: grid;
  place-items: center;
}

.world-hero img.kid {
  width: min(420px, 90%);
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.5));
  animation: float 7s ease-in-out infinite;
}

.orbit {
  position: absolute;
  inset: 0;
  animation: spin 40s linear infinite;
  pointer-events: none;
}

.orbit img {
  position: absolute;
  animation: spin 40s linear infinite reverse;
}

.orbit .o1 {
  width: 120px;
  top: 2%;
  left: 6%;
}

.orbit .o2 {
  width: 54px;
  bottom: 10%;
  right: 8%;
}

.orbit .o3 {
  width: 70px;
  top: 12%;
  right: 4%;
}

.worlds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.world-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.7);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s;
}

.world-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 30px 60px -20px rgba(124, 92, 255, 0.8);
}

.world-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.world-card:hover img {
  transform: scale(1.1);
}

.world-card .cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 14px 14px;
  background: linear-gradient(transparent, rgba(7, 11, 31, 0.92));
}

.world-card .cap b {
  display: block;
  font-size: 15px;
}

.world-card .cap span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.world-card.contain img {
  object-fit: contain;
  padding: 22% 16% 30%;
}

.world-card.space {
  background: url('assets/world/space-bg.webp') center / cover;
}

.world-card.history {
  background: linear-gradient(160deg, #9c6b1e, #ffc857);
}

.world-card.tech {
  background: linear-gradient(160deg, #1663c7, #4cc9ff);
}

.world-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.world-perks span {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 14px;
  font-weight: 700;
}

/* ─── Study rooms collage ───────────────────────────────────────────────────── */

.rooms-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: center;
}

.rooms-phones {
  position: relative;
  height: 600px;
}

.rooms-phones .phone {
  width: 250px;
}

.rooms-phones .r1 {
  left: 0;
  top: 40px;
  transform: rotate(-6deg);
}

.rooms-phones .r2 {
  left: 34%;
  top: 0;
  z-index: 2;
}

.rooms-phones .r3 {
  right: 0;
  top: 70px;
  transform: rotate(6deg);
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 28px;
}

.feature-list div {
  display: grid;
  gap: 4px;
  padding: 18px;
  border-radius: 18px;
  background: var(--tint);
  border: 1px solid var(--line);
  transition: transform 0.3s, background 0.3s;
}

.feature-list div:hover {
  transform: translateY(-3px);
  background: #fff;
}

.feature-list b {
  font-size: 16px;
}

.feature-list span {
  color: var(--ink-2);
  font-size: 14px;
}

/* ─── Languages ─────────────────────────────────────────────────────────────── */

.hellos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}

.hello {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s;
}

.hello:hover {
  transform: translateY(-6px) rotate(-2deg);
  border-color: var(--purple);
}

.hello b {
  font-size: 20px;
}

.hello span {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 700;
}

/* ─── Plans ─────────────────────────────────────────────────────────────────── */

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.plan {
  position: relative;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 30px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s, box-shadow 0.3s;
}

.plan:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.plan.featured {
  border: 2px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(120deg, #7c5cff, #b04cff, #14c8b4, #7c5cff) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: borderFlow 6s linear infinite;
}

.plan .badge {
  position: absolute;
  top: -13px;
  left: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--ai);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.plan h3 {
  font-size: 24px;
}

.plan .sub {
  color: var(--ink-2);
}

.plan ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.plan li {
  display: flex;
  gap: 10px;
  font-weight: 600;
  color: var(--ink-2);
  font-size: 15px;
}

.plan li::before {
  content: '✓';
  color: var(--purple);
  font-weight: 800;
}

.plans-note {
  margin-top: 22px;
  text-align: center;
  color: var(--ink-3);
  font-weight: 600;
}

/* ─── FAQ ───────────────────────────────────────────────────────────────────── */

.faq {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.faq details {
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.faq details[open] {
  box-shadow: var(--shadow-soft);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--purple-soft);
  color: var(--purple);
  transition: transform 0.3s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq .answer {
  padding: 0 24px 22px;
  color: var(--ink-2);
  animation: fadeUp 0.4s ease both;
}

/* ─── Call to action ────────────────────────────────────────────────────────── */

.cta {
  position: relative;
  padding: 80px 40px;
  border-radius: 36px;
  text-align: center;
  color: #fff;
  background: linear-gradient(120deg, #6a45ff, #b04cff, #7c5cff);
  background-size: 200% 200%;
  animation: gradientMove 10s ease infinite;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  gap: 20px;
  justify-items: center;
}

.cta h2 {
  font-size: clamp(32px, 4.6vw, 54px);
}

.cta p {
  font-size: 18px;
  opacity: 0.88;
  max-width: 560px;
}

.cta .btn-primary {
  background: #fff;
  color: var(--purple);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.45);
}

.cta .ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  z-index: -1;
  animation: ripple 6s linear infinite;
}

.cta .ring:nth-child(2) {
  animation-delay: -2s;
}

.cta .ring:nth-child(3) {
  animation-delay: -4s;
}

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

footer {
  padding: 70px 0 40px;
  margin-top: 90px;
  border-top: 1px solid var(--line);
  background: linear-gradient(#fff, var(--tint));
}

.foot {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
}

.foot p {
  color: var(--ink-2);
  font-size: 15px;
  max-width: 320px;
  margin-top: 14px;
}

.foot h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 14px;
}

.foot ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.foot a {
  text-decoration: none;
  font-weight: 700;
  color: var(--ink-2);
  transition: color 0.2s;
}

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

.legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 50px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 600;
}

/* ─── Page header (About, Waitlist, Privacy) ───────────────────────────────── */

.page-hero {
  position: relative;
  padding: 70px 0 90px;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}

.page-hero .book-bg {
  bottom: -90px;
  animation: bookFloat 9s ease-in-out infinite;
}

.page-hero .inner {
  display: grid;
  gap: 20px;
  justify-items: center;
  max-width: 820px;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(40px, 5.6vw, 66px);
}

.page-hero p {
  font-size: 19px;
  color: var(--ink-2);
}

/* About */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.split h2 {
  font-size: clamp(30px, 3.6vw, 44px);
  margin-bottom: 18px;
}

.split p + p {
  margin-top: 14px;
}

.split p {
  font-size: 17px;
  color: var(--ink-2);
}

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 26px;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--purple), var(--teal));
  transform-origin: top;
  transform: scaleY(var(--grow, 0));
  transition: transform 1.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.timeline.in::before {
  --grow: 1;
}

.timeline .t {
  position: relative;
  display: grid;
  gap: 6px;
}

.timeline .t::before {
  content: '';
  position: absolute;
  left: -36px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--purple);
}

.timeline .t.now::before {
  background: var(--purple);
  box-shadow: 0 0 0 0 rgba(124, 92, 255, 0.5);
  animation: ping 2s infinite;
}

.timeline b {
  font-size: 18px;
}

.timeline span {
  color: var(--ink-2);
}

/* Waitlist */
.waitlist {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 50px;
  align-items: start;
}

.perks {
  display: grid;
  gap: 18px;
}

.perk {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.perk .icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #fff;
  font-size: 22px;
}

.perk b {
  display: block;
  font-size: 17px;
}

.perk span {
  color: var(--ink-2);
}

.form-card {
  position: relative;
  padding: 34px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.form-card h2 {
  font-size: 28px;
  margin-bottom: 6px;
}

.form-card > p {
  color: var(--ink-2);
  margin-bottom: 24px;
}

form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label,
.field legend {
  font-weight: 800;
  font-size: 14px;
}

.field .hint {
  font-weight: 600;
  color: var(--ink-3);
}

input[type='text'],
input[type='email'],
select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 4px var(--purple-soft);
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.pills label {
  position: relative;
  cursor: pointer;
}

.pills input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pills span {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
}

.pills input:checked + span {
  border-color: var(--purple);
  background: var(--purple-soft);
  color: var(--purple);
  transform: scale(1.04);
}

.pills input:focus-visible + span {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
}

.honey {
  position: absolute;
  left: -9999px;
}

.form-msg {
  min-height: 22px;
  font-weight: 700;
  font-size: 14px;
  color: #e5486a;
}

.form-msg.wait {
  color: var(--ink-3);
}

.small {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 600;
}

.small a {
  color: var(--purple);
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

.done {
  display: none;
  text-align: center;
  gap: 16px;
  justify-items: center;
  padding: 20px 0;
}

.form-card.success form,
.form-card.success > h2,
.form-card.success > p {
  display: none;
}

.form-card.success .done {
  display: grid;
  animation: pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.done .check {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--ai);
  color: #fff;
  font-size: 40px;
  box-shadow: 0 18px 40px -14px rgba(124, 92, 255, 0.8);
}

.done h2 {
  font-size: 30px;
}

.done .place {
  font-size: 54px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.done p {
  color: var(--ink-2);
}

.share {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 70;
}

/* Prose (Privacy) */
.prose {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
  color: var(--ink-2);
  font-size: 17px;
}

.prose h2 {
  color: var(--ink);
  font-size: 24px;
  margin-top: 18px;
}

.prose ul {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}

/* ─── Reveal on scroll ──────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.reveal.from-left {
  transform: translateX(-50px);
}

.reveal.from-right {
  transform: translateX(50px);
}

.reveal.zoom {
  transform: scale(0.9);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

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

@keyframes rise {
  to {
    transform: none;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes phoneIn {
  from {
    opacity: 0;
    transform: translateY(80px) rotate(var(--r, 0deg)) rotateY(-20deg);
  }
  to {
    opacity: 1;
    transform: rotate(var(--r, 0deg));
  }
}

@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -16px;
  }
}

@keyframes bob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

@keyframes chipIn {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(60px, 40px) scale(1.15);
  }
}

@keyframes bookFloat {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-14px);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.7) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.15) rotate(20deg);
  }
}

@keyframes twinkleBg {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes scroll {
  to {
    transform: translateX(-50%);
  }
}

@keyframes shine {
  to {
    background-position: -250% 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ping {
  70% {
    box-shadow: 0 0 0 10px rgba(20, 200, 180, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(20, 200, 180, 0);
  }
}

@keyframes borderFlow {
  to {
    background-position: 0 0, 300% 0;
  }
}

@keyframes gradientMove {
  50% {
    background-position: 100% 50%;
  }
}

@keyframes ripple {
  from {
    width: 0;
    height: 0;
    opacity: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  to {
    width: 1400px;
    height: 1400px;
    opacity: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ─── Smaller screens ───────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .foot {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    gap: 4px;
    padding: 16px 20px 24px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 40px -20px rgba(27, 31, 59, 0.25);
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }
  .nav.open .nav-links {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a {
    padding: 14px 16px;
    font-size: 17px;
  }
  .menu-btn {
    display: grid;
  }
  .nav-cta {
    display: none;
  }
  .hero-grid,
  .world-grid,
  .rooms-grid,
  .split,
  .waitlist {
    grid-template-columns: 1fr;
  }
  .hero {
    padding-bottom: 60px;
  }
  .hero-copy {
    justify-items: center;
    text-align: center;
  }
  .hero-cta {
    justify-content: center;
  }
  .hero-visual {
    height: 560px;
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
  }
  .story {
    grid-template-columns: 1fr;
  }
  .story-stage {
    display: none;
  }
  .step {
    min-height: 0;
    opacity: 1;
    transform: none;
    padding: 30px 0;
  }
  .step .mobile-shot {
    display: block;
  }
  .rooms-phones {
    height: 520px;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
  }
  .values,
  .plans {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 80px 0;
  }
}

.step .mobile-shot {
  display: none;
  width: min(260px, 70vw);
  margin-top: 10px;
}

@media (max-width: 600px) {
  .cards,
  .feature-list {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .worlds {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-visual {
    height: 470px;
  }
  .hero-visual .phone.p1 {
    width: 210px;
    margin-left: -105px;
  }
  .hero-visual .p2,
  .hero-visual .p3 {
    width: 170px;
    top: 90px;
  }
  .chip.c2 {
    top: 250px;
  }
  .rooms-phones {
    height: 430px;
  }
  .rooms-phones .phone {
    width: 180px;
  }
  .rooms-phones .r2 {
    left: 28%;
  }
  .foot {
    grid-template-columns: 1fr;
  }
  .form-card {
    padding: 24px;
  }
  .cta {
    padding: 60px 22px;
  }
}

/* ─── Less motion, for people who ask for it ───────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal,
  .fade-in,
  .hero h1 .line > span {
    opacity: 1 !important;
    transform: none !important;
  }
}
