/* ==========================================================
   Make playground — bright, candy, soft-body
   ========================================================== */

@font-face {
  font-family: "Baloo 2";
  src: url("../fonts/baloo2-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --bg: #FBFAFF;
  --ink: #2B1B4E;
  --ink-soft: #6B5B95;
  --violet: #7C3AED;
  --violet-deep: #5B21B6;
  --pink: #EC4899;
  --orange: #FB923C;
  --amber: #FACC15;
  --green: #34D399;
  --cyan: #22D3EE;
  --blue: #60A5FA;
  --card: rgba(255, 255, 255, 0.86);
  --line: rgba(124, 58, 237, 0.14);
  --shadow: 0 18px 50px -18px rgba(76, 29, 149, 0.25);
  --radius: 26px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 600px at 110% -5%, rgba(34, 211, 238, 0.14), transparent 60%),
    radial-gradient(800px 620px at -12% 12%, rgba(236, 72, 153, 0.10), transparent 60%),
    radial-gradient(1000px 800px at 50% 115%, rgba(124, 58, 237, 0.10), transparent 60%),
    var(--bg);
  overflow-x: hidden;
  line-height: 1.55;
}

h1, h2, h3 { font-family: "Baloo 2", sans-serif; line-height: 1.02; letter-spacing: -0.015em; }
h1 { font-size: clamp(3rem, 8.5vw, 6.2rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; }
h1 em, h2 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--violet), var(--pink) 55%, var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

a { color: var(--violet); }

/* ---------- pills & buttons ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.38rem 0.95rem;
  font-weight: 800; font-size: 0.82rem;
  color: var(--ink-soft);
  box-shadow: 0 6px 18px -10px rgba(76, 29, 149, 0.3);
}
.dot { width: 0.66em; height: 0.66em; border-radius: 50%; display: inline-block; }
.dot-violet { background: var(--violet); } .dot-green { background: var(--green); }
.dot-pink { background: var(--pink); } .dot-cyan { background: var(--cyan); }
.dot-amber { background: var(--amber); } .dot-blue { background: var(--blue); }

.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: "Baloo 2", sans-serif;
  font-weight: 700; font-size: 1.05rem;
  border: none; cursor: pointer; text-decoration: none;
  border-radius: 999px; padding: 0.85rem 1.7rem;
  transition: transform 0.18s cubic-bezier(0.34, 1.7, 0.64, 1), box-shadow 0.18s ease;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 22px -10px rgba(76, 29, 149, 0.35), inset 0 0 0 2px var(--line);
}
.btn:hover { transform: translateY(-2px) scale(1.03); }
.btn:active { transform: scale(0.95); }
.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--violet), var(--pink));
  box-shadow: 0 14px 30px -10px rgba(124, 58, 237, 0.55);
}
.btn-ghost { background: #fff; }
.btn-small { font-size: 0.92rem; padding: 0.55rem 1.15rem; }
.play-ico {
  width: 0; height: 0; display: inline-block;
  border-left: 0.62em solid currentColor;
  border-top: 0.4em solid transparent;
  border-bottom: 0.4em solid transparent;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0.8rem; z-index: 50;
  margin: 0.8rem auto 0;
  max-width: 1120px;
  display: flex; align-items: center; gap: 1rem;
  padding: 0.55rem 1rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  width: calc(100% - 2rem);
}
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; margin-right: auto; }
.brand-orb {
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #C084FC, var(--violet) 60%, var(--violet-deep));
  box-shadow: inset -3px -4px 8px rgba(0,0,0,0.12), 0 4px 10px -4px rgba(124,58,237,0.6);
  animation: bob 4.5s ease-in-out infinite;
}
.brand-orb.small { width: 1rem; height: 1rem; display: inline-block; vertical-align: -0.12em; }
@keyframes bob { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-3px);} }
.brand-word { font-family: "Baloo 2"; font-weight: 800; font-size: 1.45rem; color: var(--ink); }
.brand-tag {
  font-size: 0.68rem; font-weight: 800; color: var(--pink);
  background: rgba(236, 72, 153, 0.1); border-radius: 999px; padding: 0.2rem 0.55rem;
  transform: rotate(-3deg);
}
.nav-links { display: flex; gap: 1.2rem; }
.nav-links a {
  text-decoration: none; color: var(--ink-soft); font-weight: 800; font-size: 0.92rem;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--violet); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  max-width: 1120px; margin: 0 auto;
  padding: clamp(2rem, 6vh, 4.5rem) 1rem 0;
  min-height: 92vh;
  display: flex; flex-direction: column;
}
.eyebrow { margin-bottom: 1.1rem; align-self: flex-start; }
.hero-copy { position: relative; z-index: 2; max-width: 720px; }
.lede, .section-lede {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 46rem;
  margin-top: 1.1rem;
}
.lede strong, .section-lede strong { color: var(--ink); }
.hero-ctas { display: flex; gap: 0.8rem; margin-top: 1.6rem; flex-wrap: wrap; }
.hint { margin-top: 0.9rem; font-size: 0.9rem; font-weight: 700; color: var(--pink); }

.hero-stage {
  position: relative; z-index: 1;
  flex: 1; min-height: 430px;
  margin: -3.5rem -1rem 0;
}
#hero-canvas { width: 100%; height: 100%; position: absolute; inset: 0; }
.ops-log {
  position: absolute; left: 1rem; bottom: 1.2rem; z-index: 3;
  width: min(340px, calc(100% - 2rem));
  background: rgba(43, 27, 78, 0.9);
  color: #EDE9FE;
  border-radius: 18px;
  padding: 0.7rem 0.9rem;
  font-size: 0.8rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.ops-log-head {
  display: flex; align-items: center; gap: 0.45rem;
  font-family: "Baloo 2"; font-weight: 700; font-size: 0.8rem;
  color: #C4B5FD; margin-bottom: 0.35rem;
}
.ops-dot { width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.ops-log ul { list-style: none; }
.ops-log li {
  padding: 0.1rem 0; opacity: 0; transform: translateY(5px);
  animation: logIn 0.35s ease forwards;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ops-log li b { color: #FACC15; font-weight: 700; }
.ops-log li.ok { color: #6EE7B7; }
@keyframes logIn { to { opacity: 1; transform: none; } }

.scroll-cue {
  position: absolute; right: 2rem; bottom: 1.4rem; z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--line);
  display: grid; place-items: center;
  box-shadow: var(--shadow);
}
.scroll-marble {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(140deg, var(--cyan), var(--violet));
  animation: marbleDrop 1.6s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
@keyframes marbleDrop {
  0% { transform: translateY(-7px); opacity: 0; }
  30% { opacity: 1; }
  70% { transform: translateY(7px); opacity: 1; }
  100% { transform: translateY(9px); opacity: 0; }
}

/* ---------- sections ---------- */
.section, .closing {
  scroll-margin-top: 96px;
}
.section {
  position: relative;
  max-width: 1120px; margin: 0 auto;
  padding: clamp(4rem, 9vh, 7rem) 1rem;
}
.section-tint {
  background: linear-gradient(180deg, rgba(124,58,237,0.045), rgba(34,211,238,0.05));
  border-radius: 48px;
}
.section-calm { text-align: center; }
.section h2 { margin-bottom: 0.4rem; }
.section-lede { margin: 0.6rem 0 2.2rem; }
.section-calm .eyebrow, .section-calm .section-lede { margin-left: auto; margin-right: auto; }

/* marble-run rail connecting sections */
.section::before {
  content: "";
  position: absolute; left: 0.35rem; top: 8.2rem; bottom: 3rem;
  border-left: 3px dotted rgba(124, 58, 237, 0.18);
  display: none;
}

/* ---------- anatomy ---------- */
.anatomy-grid {
  display: grid; grid-template-columns: 340px 1fr; gap: 2rem; align-items: stretch;
}
.callouts { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.callouts li {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 0.8rem 1rem;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), border-color 0.2s, box-shadow 0.2s;
}
.callouts li b { font-family: "Baloo 2"; font-size: 1.05rem; display: block; }
.callouts li span { font-size: 0.86rem; color: var(--ink-soft); }
.callouts li:hover, .callouts li.active {
  transform: translateX(6px) rotate(-0.4deg);
  border-color: var(--violet);
  box-shadow: 0 10px 26px -14px rgba(124, 58, 237, 0.5);
}
.anatomy-stage {
  position: relative;
  min-height: 380px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 70% 20%, rgba(236,72,153,0.06), transparent 55%),
    rgba(255,255,255,0.5);
  border: 1.5px solid var(--line);
  overflow: hidden;
}
#anatomy-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-run { position: absolute; right: 1rem; bottom: 1rem; z-index: 2; }

/* ---------- builder ---------- */
.builder-wrap { display: flex; flex-direction: column; gap: 0.8rem; }
.tray {
  display: flex; gap: 0.55rem; overflow-x: auto; padding: 0.4rem 0.2rem 0.7rem;
  scrollbar-width: thin;
}
.tray-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1.5px solid var(--line);
  background: #fff; border-radius: 999px;
  padding: 0.45rem 0.9rem 0.45rem 0.5rem;
  font-family: "Baloo 2"; font-weight: 700; font-size: 0.9rem;
  cursor: grab; user-select: none; -webkit-user-select: none;
  touch-action: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tray-chip:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 8px 18px -8px rgba(76,29,149,0.35); }
.tray-chip:active { cursor: grabbing; }
.tray-chip small { display: block; font-family: "Nunito"; font-weight: 700; font-size: 0.68rem; color: var(--ink-soft); }
.tray-orb {
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-size: 0.72rem; font-weight: 800;
  box-shadow: inset -2px -3px 5px rgba(0,0,0,0.18);
}
.builder-stage {
  position: relative; height: 440px;
  border-radius: var(--radius);
  border: 1.5px dashed rgba(124, 58, 237, 0.35);
  background:
    radial-gradient(circle at 30% 80%, rgba(52,211,153,0.07), transparent 50%),
    rgba(255,255,255,0.45);
  overflow: hidden;
}
#builder-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.builder-bar {
  position: absolute; left: 1rem; bottom: 1rem; right: 1rem; z-index: 2;
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
}
.build-status {
  font-weight: 800; font-size: 0.85rem; color: var(--ink-soft);
  background: var(--card); border: 1.5px solid var(--line);
  padding: 0.4rem 0.8rem; border-radius: 999px;
}
.build-toast {
  position: fixed; left: 50%; bottom: 1.4rem; z-index: 90;
  transform: translate(-50%, 140%);
  max-width: min(480px, calc(100vw - 2rem));
  background: linear-gradient(120deg, var(--violet), var(--pink));
  color: #fff; font-weight: 800;
  border-radius: 20px; padding: 0.9rem 1.3rem;
  box-shadow: 0 20px 50px -12px rgba(124,58,237,0.6);
  transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1);
  text-align: center;
}
.build-toast.show { transform: translate(-50%, 0); }

/* ---------- catalog ---------- */
.catalog-wrap { position: relative; }
.catalog-search {
  width: 100%; max-width: 430px;
  font-family: "Nunito"; font-weight: 700; font-size: 1rem;
  color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 999px;
  background: #fff; padding: 0.7rem 1.2rem;
  outline: none; margin-bottom: 1.4rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.catalog-search:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(124,58,237,0.12); }
.catalog-cloud {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  position: relative; z-index: 1;
}
.app-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #fff; border: 1.5px solid var(--line);
  border-radius: 999px; padding: 0.42rem 0.95rem 0.42rem 0.55rem;
  font-family: "Baloo 2"; font-weight: 700; font-size: 0.92rem;
  cursor: pointer; color: var(--ink);
  transition: transform 0.18s cubic-bezier(0.34,1.56,0.64,1), border-color 0.18s, box-shadow 0.18s;
}
.app-chip i {
  width: 1.15rem; height: 1.15rem; border-radius: 50%; display: inline-block;
  box-shadow: inset -2px -2px 4px rgba(0,0,0,0.2);
}
.app-chip:hover { transform: translateY(-3px) rotate(-1.5deg); border-color: currentColor; }
.app-chip.picked {
  border-color: currentColor;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15), 0 10px 22px -10px rgba(76,29,149,0.4);
  transform: translateY(-4px) scale(1.06);
}
.app-chip.hidden { display: none; }
.catalog-arc { position: absolute; inset: 0; width: 100%; height: 64%; pointer-events: none; z-index: 2; }
.recipe-card {
  margin-top: 1.4rem;
  max-width: 620px;
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: 20px; padding: 1rem 1.3rem;
  box-shadow: var(--shadow);
  transition: border-color 0.3s, transform 0.3s;
}
.recipe-card.pop { animation: cardPop 0.45s cubic-bezier(0.34,1.56,0.64,1); border-color: var(--pink); }
@keyframes cardPop { 0% { transform: scale(0.96); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }
.recipe-kicker {
  display: block;
  font-family: "Baloo 2"; font-weight: 700; font-size: 0.82rem;
  color: var(--pink); margin-bottom: 0.2rem;
}

/* ---------- proof ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}
.stat {
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: 22px; padding: 1.3rem 0.8rem;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.stat:hover { transform: translateY(-5px) rotate(1deg); }
.stat-num { display: block; font-family: "Baloo 2"; font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.5rem); }
.stat .star { color: var(--amber); font-size: 0.6em; vertical-align: 0.35em; }
.stat-label { font-size: 0.84rem; font-weight: 700; color: var(--ink-soft); }
.story {
  max-width: 640px; margin: 0 auto 2.2rem;
  font-family: "Baloo 2"; font-size: clamp(1.2rem, 2.4vw, 1.7rem); font-weight: 600;
}
.story cite { display: block; margin-top: 0.6rem; font-family: "Nunito"; font-size: 0.9rem; font-weight: 700; color: var(--ink-soft); font-style: normal; }
.customers {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center;
}
.customers li {
  font-family: "Baloo 2"; font-weight: 700; font-size: 0.92rem;
  color: var(--ink-soft);
  border: 1.5px solid var(--line); background: var(--card);
  padding: 0.4rem 1rem; border-radius: 999px;
}

/* ---------- makers ---------- */
.personas { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.persona {
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 1.3rem 1.4rem;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s;
  position: relative; overflow: hidden;
}
.persona:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.persona h3 { font-size: 1.25rem; margin-bottom: 0.7rem; }
.flow { display: flex; align-items: center; gap: 0; margin-bottom: 0.8rem; flex-wrap: nowrap; }
.flow-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: #fff; border: 1.5px solid var(--line);
  border-radius: 999px; padding: 0.3rem 0.75rem 0.3rem 0.4rem;
  font-family: "Baloo 2"; font-weight: 700; font-size: 0.85rem;
}
.flow-chip i { width: 1rem; height: 1rem; border-radius: 50%; }
.flow-wire { position: relative; flex: 1 1 24px; height: 3px; min-width: 18px; border-radius: 2px; background: rgba(124,58,237,0.22); }
.flow-wire::after {
  content: ""; position: absolute; top: 50%; left: 0;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--wire-color, var(--violet));
  transform: translate(-2px, -50%);
  animation: travel 2.6s linear infinite;
  animation-delay: var(--wire-delay, 0s);
  box-shadow: 0 0 8px var(--wire-color, var(--violet));
}
@keyframes travel { from { left: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } to { left: calc(100% - 6px); opacity: 0; } }
.persona p { font-size: 0.92rem; color: var(--ink-soft); font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  .flow-wire::after, .scroll-marble, .brand-orb { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- closing ---------- */
.closing {
  position: relative;
  text-align: center;
  padding: clamp(4rem, 10vh, 7rem) 1rem 0;
  overflow: hidden;
}
.closing h2 { position: relative; z-index: 2; }
.closing .section-lede { margin: 1rem auto 0; position: relative; z-index: 2; }
#closing-canvas {
  position: relative; z-index: 1;
  width: 100%; height: 380px; margin-top: -1rem;
  cursor: pointer;
}
.closing-note { position: relative; z-index: 2; font-weight: 800; color: var(--ink-soft); font-size: 0.92rem; padding-bottom: 2rem; }

/* ---------- footer ---------- */
.footer {
  max-width: 1120px; margin: 0 auto;
  padding: 2rem 1rem 3rem;
  border-top: 1.5px solid var(--line);
  text-align: center;
  font-weight: 700; color: var(--ink-soft);
}
.footer .fine { margin-top: 0.6rem; font-size: 0.8rem; font-weight: 600; opacity: 0.8; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px) scale(0.99); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .anatomy-grid { grid-template-columns: 1fr; }
  .anatomy-stage { min-height: 320px; height: 340px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .personas { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero-stage { margin-top: -1rem; min-height: 400px; }
  .ops-log { bottom: 0.6rem; }
  .scroll-cue { display: none; }
}
@media (max-width: 520px) {
  .brand-tag { display: none; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .builder-stage { height: 400px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .flow { gap: 0; }
  .flow-chip { font-size: 0.78rem; padding: 0.28rem 0.6rem 0.28rem 0.35rem; }
}
