/* CodeBloomAPP — knowledge-network theme.
   The page floats over a full-screen WebGL scene (#scene). */

:root {
  --ink: #fbf6ef;
  --ink-soft: rgba(251, 246, 239, .82);
  --ink-mute: rgba(251, 246, 239, .6);
  --sakura: #f7b8c9;
  --sakura-strong: #ef8fae;
  --gold: #ffd166;
  --gold-deep: #f2b440;
  --vermilion: #e0573a;
  --night: #0a0c1f;
  --panel: rgba(14, 16, 38, .62);
  --panel-strong: rgba(12, 14, 34, .8);
  --line: rgba(255, 255, 255, .14);
  --line-strong: rgba(255, 255, 255, .26);
  --radius: 18px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .55);
  --font-display: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  /* Shown before the scene draws, and as the fallback without WebGL */
  background:
    radial-gradient(70% 50% at 15% 45%, rgba(26, 166, 208, .22), transparent 70%),
    radial-gradient(60% 45% at 85% 40%, rgba(162, 75, 208, .22), transparent 70%),
    linear-gradient(180deg, #060918 0%, #1a1446 52%, #05060f 100%) fixed;
  background-color: var(--night);
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.15; }
p { margin: 0 0 1em; }
small { font-size: .62em; letter-spacing: .04em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ===== Scene layers ===== */
#scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.scene-ready #scene { opacity: 1; }

.scene-shade {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 8, 22, .45) 0%, rgba(6, 8, 22, 0) 18%),
    linear-gradient(0deg, rgba(6, 8, 22, .55) 0%, rgba(6, 8, 22, 0) 38%),
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(4, 5, 14, .45) 100%);
}

main, .footer { position: relative; z-index: 2; }

/* ===== Top bar ===== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px var(--gutter);
  transition: background-color .4s ease, backdrop-filter .4s ease, padding .4s ease, border-color .4s ease;
  border-bottom: 1px solid transparent;
}

.topbar.scrolled {
  padding-top: 10px;
  padding-bottom: 10px;
  background-color: rgba(10, 12, 30, .55);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .85);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}

.brand small { color: var(--gold); }

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  position: relative;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color .25s ease;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--sakura);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}

.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(10, 12, 30, .45);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 5px auto;
  background: var(--ink);
  transition: transform .3s var(--ease);
}

.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  font-family: var(--font-body);
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .3s ease, border-color .3s ease;
}

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

.btn-gold {
  color: #241a10;
  background: linear-gradient(180deg, #ffe08f, var(--gold) 45%, var(--gold-deep));
  box-shadow: 0 10px 30px -10px rgba(255, 190, 80, .7), inset 0 1px 0 rgba(255, 255, 255, .6);
}

.btn-gold:hover { box-shadow: 0 16px 36px -10px rgba(255, 190, 80, .85), inset 0 1px 0 rgba(255, 255, 255, .6); }

.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, .08);
  border-color: var(--line-strong);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover { background: rgba(255, 255, 255, .16); }

.btn-sm { min-height: 40px; padding: 0 18px; font-size: .9rem; }
.btn-lg { min-height: 56px; padding: 0 36px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ===== Hero ===== */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: 120px var(--gutter) clamp(72px, 12vh, 120px);
}

.hero-copy { max-width: 760px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--sakura);
  padding: 6px 14px;
  background: rgba(10, 12, 30, .5);
  border: 1px solid var(--line);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.petal-mark {
  width: 10px;
  height: 10px;
  border-radius: 10px 0 10px 0;
  background: var(--sakura);
  transform: rotate(-20deg);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.4vw, 4.6rem);
  line-height: 1.06;
  letter-spacing: -.025em;
  text-wrap: balance;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .35);
}

.hero-title em {
  display: block;
  font-style: normal;
  color: var(--gold);
}

.hero-sub {
  margin: 22px 0 30px;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  text-shadow: 0 2px 16px rgba(0, 0, 0, .5);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(72px, 12vh, 120px);
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  writing-mode: vertical-rl;
}

.scroll-cue i {
  position: relative;
  width: 1px;
  height: 64px;
  overflow: hidden;
  background: var(--line-strong);
}

.scroll-cue i::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--sakura);
  animation: cue 2.4s var(--ease) infinite;
}

@keyframes cue {
  from { transform: translateY(-100%); }
  to { transform: translateY(100%); }
}

/* ===== Chapters ===== */
.chapter {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(110px, 22vh, 220px) var(--gutter) 0;
  scroll-margin-top: 40px;
}

.chapter-head { margin-bottom: 40px; }
.chapter-head.center { text-align: center; }
.chapter-head.sub { margin: 80px 0 32px; }

.chapter-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  text-wrap: balance;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .35);
}

.chapter-title small { color: var(--gold); }
.chapter-title.small { font-size: clamp(1.6rem, 3vw, 2.3rem); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Intro video */
.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--line-strong);
  background: #12143a;
  box-shadow: var(--shadow), 0 0 0 8px rgba(255, 255, 255, .04);
}

.video-frame video {
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
}

.video-controls {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 8px;
}

.pill-btn {
  min-height: 36px;
  padding: 0 14px;
  font-size: .85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(8, 10, 24, .6);
  cursor: pointer;
  transition: background-color .25s ease;
}

.pill-btn:hover { background: rgba(8, 10, 24, .85); }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.chapter-title .emoji {
  font-size: .55em;
  vertical-align: .25em;
  text-shadow: none;
}

.motto {
  margin-top: 24px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--gold);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .75), 0 0 2px rgba(0, 0, 0, .6);
}

.about-panel {
  padding: clamp(24px, 4vw, 44px);
  font-size: 1.08rem;
  color: var(--ink-soft);
}

.about-panel strong { color: var(--ink); }
.about-panel strong small { color: var(--gold); }

.about-panel blockquote {
  margin: 28px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.45;
  color: var(--sakura);
}

/* ===== Cards ===== */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .45s var(--ease), border-color .45s ease, box-shadow .45s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(247, 184, 201, .45);
  box-shadow: 0 30px 70px -26px rgba(0, 0, 0, .7), 0 0 0 1px rgba(247, 184, 201, .15);
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #161a3c;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease), opacity .6s ease;
}

.card:hover .card-media img { transform: scale(1.06); }

.card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10, 12, 30, .55));
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 22px 22px 24px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.card-text {
  flex: 1;
  margin: 0 0 6px;
  color: var(--ink-soft);
}

.chip {
  align-self: flex-start;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sakura);
  border: 1px solid rgba(247, 184, 201, .4);
  border-radius: 999px;
}

.levels,
.specialised,
.reviews {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.course .card-title { font-size: 1.3rem; }

.scope {
  flex: 1;
  margin: 0;
  color: var(--ink-soft);
}

.scope span {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.cert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--ink-mute);
}

.cert::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sakura);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  color: #241a10;
  background: var(--gold);
  border-radius: 999px;
  transition: transform .3s var(--ease), background-color .3s ease;
}

.link-arrow::after { content: '→'; transition: transform .3s var(--ease); }
.link-arrow:hover { background: #ffe08f; }
.link-arrow:hover::after { transform: translateX(3px); }

/* Reviews */
.review { margin: 0; }

.review-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.review-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .35));
}

.play-overlay svg {
  width: 64px;
  height: 64px;
  padding: 18px 16px 18px 20px;
  fill: #241a10;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  transition: transform .3s var(--ease);
}

.play-overlay:hover svg { transform: scale(1.08); }
.review.playing .play-overlay { display: none; }

.review blockquote {
  flex: 1;
  margin: 0;
  font-size: 1.02rem;
  color: var(--ink-soft);
}

.review cite {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: normal;
  font-weight: 700;
  color: var(--ink);
}

.stars { letter-spacing: .2em; color: var(--gold); }

/* Demo */
.demo-card {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 72px) clamp(24px, 6vw, 72px);
  text-align: center;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(247, 184, 201, .16), transparent 60%),
    var(--panel);
}

.demo-card .chapter-title { margin-bottom: 16px; }

.demo-text {
  margin: 0 auto 30px;
  max-width: 34ch;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* Contact */
#contact { padding-bottom: clamp(100px, 18vh, 180px); }

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.social-links a {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  color: var(--ink);
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform .3s var(--ease), color .3s ease, background-color .3s ease, border-color .3s ease;
}

.social-links svg { width: 24px; height: 24px; fill: currentColor; }

.social-links a:hover {
  transform: translateY(-3px);
  color: #241a10;
  background: var(--gold);
  border-color: var(--gold);
}

/* Footer */
.footer {
  padding: 28px var(--gutter) 90px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .14em;
  color: var(--ink-mute);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(6, 8, 22, 0), rgba(6, 8, 22, .6));
}

.footer p { margin: 0; }
.footer small { font-size: .75em; color: var(--gold); }

/* ===== Pause button for the background animation ===== */
.motion-toggle {
  position: fixed;
  left: var(--gutter);
  bottom: 18px;
  z-index: 40;
  min-height: 32px;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(10, 12, 30, .55);
  border: 1px solid var(--line);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
}

.motion-toggle:hover { color: var(--ink); background: rgba(10, 12, 30, .8); }
.motion-toggle[hidden] { display: none; }

/* ===== Book a free demo ===== */
html:has(.book-dialog[open]) { overflow: hidden; }

.book-dialog {
  width: min(680px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  overflow: visible;
}

.book-dialog::backdrop {
  background: rgba(4, 5, 14, .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.book-dialog[open] { animation: dialog-in .35s var(--ease); }

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
}

.book-shell {
  position: relative;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: clamp(24px, 5vw, 44px);
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(94, 231, 255, .1), transparent 60%),
    radial-gradient(80% 60% at 0% 0%, rgba(247, 184, 201, .1), transparent 60%),
    #0e1130;
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .8);
}

.book-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  line-height: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  cursor: pointer;
  transition: background-color .25s ease;
}

.book-close:hover { background: rgba(255, 255, 255, .14); }

.book-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: -.02em;
}

.book-lede {
  margin: 10px 0 26px;
  color: var(--ink-soft);
}

.book-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-wide { grid-column: 1 / -1; }

.field label,
.field legend {
  padding: 0;
  font-size: .86rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.field legend { margin-bottom: 6px; }
.optional { color: var(--ink-mute); font-weight: 400; }

.book-form input:not([type="radio"]),
.book-form select,
.book-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  font: inherit;
  font-size: 16px; /* stops iOS zooming into the field */
  color: var(--ink);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.book-form textarea { resize: vertical; min-height: 84px; }
.book-form select option, .book-form select optgroup { color: #111; }

.book-form input:focus,
.book-form select:focus,
.book-form textarea:focus {
  outline: none;
  border-color: var(--sakura);
  background: rgba(255, 255, 255, .09);
  box-shadow: 0 0 0 3px rgba(247, 184, 201, .2);
}

.phone-row {
  display: grid;
  grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
  gap: 8px;
}

.choice-row { display: flex; gap: 10px; }

.choice {
  position: relative;
  flex: 1;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
}

.choice span {
  display: grid;
  place-items: center;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.choice input:checked + span {
  color: #241a10;
  font-weight: 600;
  background: var(--gold);
  border-color: var(--gold);
}

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

.field-error {
  display: none;
  font-size: .8rem;
  color: #ff9d8a;
}

.book-form.checked .field:has(:invalid) .field-error { display: block; }
.book-form.checked .field:has(:invalid) :is(input, select):not([type="radio"]),
.book-form.checked .field:has(:invalid) .choice span { border-color: #ff9d8a; }

.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.book-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 6px;
}

.book-actions .btn:disabled { opacity: .7; cursor: progress; transform: none; }

.book-note {
  margin: 0;
  font-size: .82rem;
  color: var(--ink-mute);
}

.book-error {
  margin: 0;
  padding: 12px 14px;
  font-size: .92rem;
  color: #ffd2c8;
  background: rgba(224, 87, 58, .14);
  border: 1px solid rgba(224, 87, 58, .45);
  border-radius: 12px;
}

.book-error a { color: var(--gold); }

.book-done {
  padding: 18px 0 6px;
  text-align: center;
  outline: none;
}

.book-done .book-lede { max-width: 42ch; margin: 12px auto 26px; }

.done-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  font-size: 1.8rem;
  font-weight: 700;
  color: #241a10;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 12px 34px -10px rgba(255, 190, 80, .8);
}

@media (max-width: 640px) {
  .book-form { grid-template-columns: 1fr; }
  .book-actions .btn { width: 100%; }
}

/* ===== Reveal on scroll ===== */
.js .reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.js .reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .levels, .specialised, .reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar { gap: 10px; }
  .menu-toggle { display: block; }
  .nav {
    position: absolute;
    top: calc(100% + 8px);
    right: var(--gutter);
    left: var(--gutter);
    flex-direction: column;
    gap: 0;
    padding: 8px;
    background: rgba(10, 12, 30, .92);
    border: 1px solid var(--line);
    border-radius: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s var(--ease), visibility .25s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 14px 12px; font-size: .82rem; }
  .nav a::after { display: none; }
  .scroll-cue { display: none; }
  .hero { padding-bottom: 96px; }
}

@media (max-width: 640px) {
  .scene-shade {
    background:
      linear-gradient(180deg, rgba(6, 8, 22, .5) 0%, rgba(6, 8, 22, 0) 18%),
      linear-gradient(0deg, rgba(6, 8, 22, .8) 0%, rgba(6, 8, 22, .35) 48%, rgba(6, 8, 22, 0) 70%);
  }
  .eyebrow { font-size: .66rem; letter-spacing: .14em; }
  .levels, .specialised, .reviews { grid-template-columns: 1fr; }
  .brand span { font-size: 1.1rem; }
  .brand img { width: 38px; height: 38px; }
  .topbar-cta { padding: 0 14px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .chapter { padding-top: 120px; }
  .motion-toggle { bottom: 12px; }
}

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