:root {
  --night: #0b0b0d;
  --paper: #faf5ec;
  --muted: rgba(250, 245, 236, 0.66);
  --faint: rgba(250, 245, 236, 0.14);
  --cobalt: #3d61ff;
  --tangerine: #ff7a3d;
  --peach: #ffc6ad;
  --mint: #a9e5bb;
  --sky: #c2d6ff;
  --lilac: #e3d6ff;
  --font-display: "Gabarito", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --font-hand: "Gochi Hand", cursive;
  --font-label: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--night) url("assets/black-paper.jpg") center / cover fixed;
  color: var(--paper);
  font: 17px/1.6 var(--font-body);
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--tangerine); outline-offset: 4px; border-radius: 8px; }

/* ---------- Sky ---------- */

#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.nebula {
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 35% at 18% 22%, rgba(61, 97, 255, 0.22), transparent 70%),
    radial-gradient(35% 30% at 82% 30%, rgba(255, 122, 61, 0.14), transparent 70%),
    radial-gradient(45% 40% at 60% 85%, rgba(227, 214, 255, 0.1), transparent 70%);
  mix-blend-mode: screen;
  animation: nebula 40s ease-in-out infinite alternate;
}
@keyframes nebula { to { transform: translate(3%, -2%) scale(1.06); } }
.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 420px;
  height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61, 97, 255, 0.16), transparent 65%);
  pointer-events: none;
  z-index: 0;
  transform: translate(var(--mx, -999px), var(--my, -999px));
}
body > :not(#sky, .nebula, .cursor-glow) { position: relative; z-index: 1; }

/* ---------- Type & buttons ---------- */

.label {
  font: 500 12.5px/1 var(--font-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--peach);
}
/* Buttons match learningbakehouse.com: tangerine pill, and paper pill with a hard offset shadow. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 700 16px/1.2 var(--font-display);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out, background-color 0.16s ease-out, color 0.16s ease-out;
}
.btn .arrow { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; transition: transform 0.16s ease-out; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-primary { background: var(--tangerine); color: #141414; }
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }
.btn-paper { background: #fff8f0; color: #141414; border-color: #f5eee0; box-shadow: 3px 3px #141414; }
.btn-paper:hover { background: #f0956a; transform: translate(-2px, -2px); box-shadow: 5px 5px #141414; }
.btn-paper:active { transform: translate(3px, 3px); box-shadow: none; transition-duration: 80ms; }
.btn-small { padding: 10px 18px; font-size: 15px; }

/* ---------- Nav ---------- */

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 48px);
}
.brand img { display: block; width: clamp(120px, 12vw, 160px); height: auto; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 32px); font-weight: 600; }
.nav-links a:not(.btn) { text-decoration: none; opacity: 0.8; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }

/* ---------- Hero ---------- */

.hero {
  min-height: calc(100vh - 90px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 40px 24px 80px;
  text-align: center;
}
.hero h1 {
  font: 900 clamp(52px, 10vw, 148px)/0.92 var(--font-display);
  letter-spacing: -0.03em;
}
.glow-word {
  background: linear-gradient(100deg, var(--sky), var(--lilac) 35%, var(--peach) 65%, var(--tangerine));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 30px rgba(61, 97, 255, 0.35));
}
.lede { max-width: 620px; font-size: clamp(17px, 2vw, 21px); color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.scribble { font: 22px/1 var(--font-hand); color: var(--sky); transform: rotate(-2deg); opacity: 0.85; }

/* ---------- Sections ---------- */

.section { padding: clamp(80px, 12vh, 140px) clamp(20px, 4vw, 48px); max-width: 1280px; margin: 0 auto; }
.section-head { max-width: 720px; display: grid; gap: 14px; margin-bottom: 48px; }
.section-head h2 { font: 800 clamp(36px, 5.5vw, 68px)/1 var(--font-display); letter-spacing: -0.02em; }
.section-head p:not(.label) { color: var(--muted); font-size: 18px; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Orbit ---------- */

.orbit-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); gap: 40px; align-items: center; }
.orbit-stage {
  --stage: min(640px, 88vw);
  position: relative;
  width: var(--stage);
  height: var(--stage);
  margin: 0 auto;
}
.sun {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background: radial-gradient(circle at 35% 30%, #ffd9b8, var(--tangerine) 45%, #c84b16 100%);
  box-shadow: 0 0 60px rgba(255, 122, 61, 0.55), 0 0 140px rgba(255, 122, 61, 0.25);
  animation: sun-pulse 5s ease-in-out infinite;
}
.sun span { font: 900 clamp(11px, 1.6vw, 16px)/1 var(--font-display); text-transform: uppercase; color: var(--night); }
@keyframes sun-pulse { 50% { box-shadow: 0 0 80px rgba(255, 122, 61, 0.7), 0 0 180px rgba(255, 122, 61, 0.3); } }

.ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--stage) * var(--f));
  height: calc(var(--stage) * var(--f));
  margin: calc(var(--stage) * var(--f) / -2) 0 0 calc(var(--stage) * var(--f) / -2);
  border-radius: 50%;
  border: 1px dashed rgba(250, 245, 236, 0.16);
  animation: spin var(--dur) linear infinite;
  animation-delay: var(--delay);
  pointer-events: none;
}
.planet-slot {
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% -50%;
  animation: spin var(--dur) linear infinite reverse;
  animation-delay: var(--delay);
  pointer-events: auto;
}
.orbit-stage.paused .ring, .orbit-stage.paused .planet-slot { animation-play-state: paused; }
@keyframes spin { to { rotate: 360deg; } }

.planet {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
}
.planet-ball {
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.45), transparent 38%),
    radial-gradient(circle at 72% 78%, rgba(0, 0, 0, 0.7), transparent 62%),
    linear-gradient(color-mix(in srgb, var(--color) 40%, transparent), color-mix(in srgb, var(--color) 40%, transparent)),
    var(--img, none) center / cover,
    var(--color);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08), 0 0 30px color-mix(in srgb, var(--color) 60%, transparent);
  transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), box-shadow 0.35s;
}
.planet:hover .planet-ball, .planet.active .planet-ball {
  transform: scale(1.15);
  box-shadow: 0 0 0 3px var(--color), 0 0 50px var(--color);
}
.planet-name { font: 21px/1 var(--font-hand); white-space: nowrap; text-shadow: 0 2px 10px #000; }
.planet.idea .planet-ball {
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.25), transparent 40%), rgba(250, 245, 236, 0.04);
  border: 2px dashed rgba(250, 245, 236, 0.5);
  display: grid;
  place-items: center;
  font: 800 30px/1 var(--font-display);
  color: var(--paper);
}

.planet-card {
  padding: 30px;
  border-radius: 28px;
  background: rgba(14, 14, 18, 0.72);
  border: 1px solid var(--faint);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  display: grid;
  gap: 16px;
}
.planet-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 18px; background: #222; }
.planet-card h3 { font: 800 34px/1.05 var(--font-display); }
.planet-card .tagline { font: 22px/1.25 var(--font-hand); color: var(--c, var(--sky)); }
.planet-card .desc { color: var(--muted); font-size: 16px; }
.planet-card .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.planet-card .actions .btn { padding: 13px 22px; font-size: 16px; }
.planet-card.swap { animation: card-in 0.5s cubic-bezier(.2, .8, .2, 1); }
@keyframes card-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 5px 12px;
  border-radius: 999px;
  font: 500 12px/1.4 var(--font-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(250, 245, 236, 0.08);
  border: 1px solid var(--faint);
}
.chip.kind { background: var(--c, var(--sky)); color: var(--night); border-color: transparent; }

.grid-title { margin: 90px 0 24px; font: 800 28px/1 var(--font-display); }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.demo-tile {
  display: grid;
  gap: 10px;
  padding: 14px 14px 20px;
  border-radius: 24px;
  background: rgba(14, 14, 18, 0.6);
  border: 1px solid var(--faint);
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), border-color 0.35s, box-shadow 0.35s;
}
.demo-tile:hover { transform: translateY(-6px) rotate(-0.6deg); border-color: var(--c); box-shadow: 0 20px 50px color-mix(in srgb, var(--c) 25%, transparent); }
.demo-tile img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; }
.demo-tile h4 { margin: 4px 6px 0; font: 800 22px/1.1 var(--font-display); }
.demo-tile p { margin: 0 6px; color: var(--muted); font-size: 15px; }
.demo-tile.idea-tile { place-content: center; text-align: center; min-height: 260px; border-style: dashed; }
.demo-tile.idea-tile .big { font: 800 44px/1 var(--font-display); color: var(--peach); }

/* ---------- Constellation ---------- */

.constellation {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 70px 50px;
}
.constellation-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.constellation-lines line {
  stroke: rgba(194, 214, 255, 0.35);
  stroke-width: 1.5;
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  transition: stroke-dashoffset 1.6s ease, stroke 0.3s, stroke-width 0.3s;
}
.constellation.drawn .constellation-lines line { stroke-dashoffset: 0; }
.constellation-lines line.lit { stroke: var(--peach); stroke-width: 2.5; }
.star-card {
  position: relative;
  padding: 26px;
  border-radius: 24px;
  background: rgba(14, 14, 18, 0.7);
  border: 1px solid var(--faint);
  backdrop-filter: blur(8px);
  display: grid;
  gap: 10px;
  transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), border-color 0.35s;
}
.star-card:nth-child(3n + 2) { translate: 0 46px; }
.star-card:nth-child(3n + 3) { translate: 0 -18px; }
.star-card:hover { transform: translateY(-6px); border-color: var(--c); }
.star-dot {
  position: absolute;
  top: -9px;
  left: 26px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 18px var(--c), 0 0 40px var(--c);
  animation: twinkle 3s ease-in-out infinite;
  animation-delay: var(--d);
}
@keyframes twinkle { 50% { transform: scale(0.7); opacity: 0.7; } }
.star-card h3 { font: 800 24px/1.1 var(--font-display); }
.star-card p { color: var(--muted); font-size: 16px; }
.star-card .example { font: 19px/1.2 var(--font-hand); color: var(--c); text-decoration: none; }
.star-card .example:hover { text-decoration: underline; }

/* ---------- Journey ---------- */

.journey { position: relative; height: 420vh; }
.journey-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 70px clamp(20px, 4vw, 48px) 40px;
  max-width: 1280px;
  margin: 0 auto;
}
.journey-sticky .section-head { margin-bottom: 0; }
.journey-map { position: relative; align-self: center; width: 100%; aspect-ratio: 3 / 1; max-height: 100%; margin: 0 auto; }
.journey-map svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.route { fill: none; stroke: rgba(250, 245, 236, 0.18); stroke-width: 3; stroke-dasharray: 2 12; stroke-linecap: round; }
.route-label { font: 500 11px/1 var(--font-label); letter-spacing: 0.16em; text-transform: uppercase; fill: rgba(250, 245, 236, 0.4); }
.route-done { fill: none; stroke: var(--peach); stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 0 8px rgba(255, 198, 173, 0.7)); }
.flame { fill: var(--peach); animation: flame 0.18s ease-in-out infinite alternate; transform-origin: -14px 0; }
@keyframes flame { to { transform: scaleX(0.6); } }
.stop {
  position: absolute;
  translate: -50% -50%;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
}
.stop-ball {
  width: clamp(26px, 3.4vw, 46px);
  height: clamp(26px, 3.4vw, 46px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 800 15px/1 var(--font-display);
  color: var(--night);
  background: rgba(250, 245, 236, 0.25);
  transition: background 0.4s, box-shadow 0.4s, transform 0.4s;
}
.stop.reached .stop-ball { background: var(--c); box-shadow: 0 0 24px var(--c); }
.stop.current .stop-ball { transform: scale(1.3); }
.stop-name { font: 800 clamp(14px, 1.6vw, 20px)/1 var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.55; transition: opacity 0.4s; }
.stop.reached .stop-name { opacity: 1; }
.journey-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 26px 30px;
  border-radius: 28px;
  background: rgba(14, 14, 18, 0.75);
  border: 1px solid var(--faint);
  backdrop-filter: blur(12px);
}
.journey-panel .num { font: 900 64px/0.85 var(--font-display); color: var(--c); }
.journey-panel h3 { font: 800 30px/1 var(--font-display); }
.journey-panel .bake { font: 22px/1.2 var(--font-hand); color: var(--c); margin-top: 6px; }
.layer { color: var(--muted); font-size: 15.5px; }
.layer b { display: block; margin-bottom: 4px; color: var(--paper); font: 500 12px/1.6 var(--font-label); letter-spacing: 0.12em; text-transform: uppercase; }
.layer.systems { padding-left: 24px; border-left: 2px dashed var(--peach); }
.layer.systems b { color: var(--peach); }
.journey-panel.swap > * { animation: card-in 0.45s cubic-bezier(.2, .8, .2, 1); }
.journey-list { display: none; }
.desktop-only { display: inline; }

/* ---------- Launchpad ---------- */

.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.door {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 32px 28px;
  border-radius: 28px;
  background: rgba(14, 14, 18, 0.7);
  border: 1.5px solid var(--faint);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), border-color 0.35s, box-shadow 0.35s, background 0.35s;
}
.door:hover { transform: translateY(-8px) rotate(-1deg); border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, rgba(14, 14, 18, 0.8)); box-shadow: 0 24px 60px color-mix(in srgb, var(--c) 25%, transparent); }
.door-icon { font-size: 34px; color: var(--c); line-height: 1; }
.door strong { font: 800 26px/1.1 var(--font-display); }
.door span:not(.door-icon) { color: var(--muted); }
.door em { margin-top: 8px; font: 700 16px/1 var(--font-display); font-style: normal; color: var(--c); }

.site-footer { padding: 40px 24px 60px; text-align: center; color: var(--muted); font-size: 15px; }

/* ---------- Smaller screens ---------- */

@media (max-width: 960px) {
  .orbit-layout { grid-template-columns: 1fr; }
  .constellation { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .star-card:nth-child(n) { translate: none; }
  .constellation-lines { display: none; }
  .doors { grid-template-columns: 1fr; }
  .journey { height: auto; }
  .journey-sticky { position: static; height: auto; display: block; padding-bottom: 0; }
  .journey-map, .journey-panel, .desktop-only { display: none; }
  .journey-list { display: grid; gap: 18px; list-style: none; margin: 32px auto 0; padding: 0 clamp(20px, 4vw, 48px) 80px; max-width: 720px; }
  .journey-list li { padding: 24px; border-radius: 24px; background: rgba(14, 14, 18, 0.72); border: 1px solid var(--faint); border-left: 6px solid var(--c); display: grid; gap: 8px; }
  .journey-list h3 { font: 800 26px/1 var(--font-display); }
  .journey-list .bake { font: 21px/1.2 var(--font-hand); color: var(--c); }
  .journey-list .layer.systems { padding: 10px 0 0; border-left: 0; border-top: 2px dashed var(--peach); }
}
@media (max-width: 620px) {
  .nav-links a:not(.btn) { display: none; }
  .constellation { grid-template-columns: 1fr; }
  .planet-name { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nebula, .sun, .ring, .planet-slot, .star-dot, .flame { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
