/* ═══════════════════════════════════════════════════════════════════
   MUSE SPARK AI — the studio inside a dream
   bone paper · deep violet night · iridescent pigment · Fraunces + Space Grotesk
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --bone: #EFE8DA;
  --bone-2: #E7DECE;
  --paper-shadow: #D8CDB8;
  --ink: #171310;
  --ink-soft: #4A423A;
  --night: #0B0912;
  --night-2: #141020;
  --night-3: #1D1830;
  --milk: #F4EFE6;
  --violet: #C9A7FF;
  --cyan: #8FE3E0;
  --gold: #FFCB8A;
  --rose: #FFB3D1;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  --pad: clamp(20px, 5vw, 72px);
  --maxw: 1220px;
}

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

html { scroll-behavior: smooth; }
html.reduced-motion { scroll-behavior: auto; }

body {
  background: var(--night);
  color: var(--milk);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--violet); color: var(--night); }

html.has-cursor body, html.has-cursor a, html.has-cursor button,
html.has-cursor input, html.has-cursor [data-cursor] { cursor: none; }

/* paper grain over everything — the studio smell */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ── cursor ─────────────────────────────────────────────────────────── */
.cursor { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.cursor-dot, .cursor-ring { position: absolute; top: 0; left: 0; will-change: transform; }
.cursor-dot {
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(255, 203, 138, 0.9);
}
.cursor-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 1px solid rgba(201, 167, 255, 0.55);
  transition: border-color 0.25s;
}
.cursor-active .cursor-ring { border-color: var(--gold); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ── header ─────────────────────────────────────────────────────────── */
.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px var(--pad);
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s;
}
.head-scrolled {
  background: rgba(11, 9, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--milk); }
.brand-glyph { width: 26px; height: 26px; flex: none; }
.spark-glyph { fill: var(--gold); filter: drop-shadow(0 0 6px rgba(255, 203, 138, 0.7)); }
.brand-word {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 19px;
  letter-spacing: 0.01em;
}
.brand-word em { font-style: normal; font-size: 11px; vertical-align: super; letter-spacing: 0.14em; color: var(--violet); }
.brand-former {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.5);
  white-space: nowrap;
}
.former-mark { width: 16px; height: 16px; opacity: 0.65; }
.site-nav { margin-left: auto; display: flex; gap: 26px; align-items: center; }
.site-nav a {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.72);
  text-decoration: none;
  transition: color 0.25s;
}
.site-nav a:hover { color: var(--gold); }
.nav-cta {
  border: 1px solid rgba(255, 203, 138, 0.45);
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--gold) !important;
}

/* ── shared section chrome ──────────────────────────────────────────── */
.section-inner { max-width: var(--maxw); margin: 0 auto; padding: clamp(90px, 13vh, 160px) var(--pad); }
.paper { background: var(--bone); color: var(--ink); }
.paper ::selection { background: var(--ink); color: var(--bone); }

.kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}
.kicker-num { color: #A34E00; font-weight: 500; }
.kicker::after { content: ""; height: 1px; width: 64px; background: currentColor; opacity: 0.4; }
.kicker-light { color: rgba(244, 239, 230, 0.55); }
.kicker-light .kicker-num { color: var(--gold); }

.section-title {
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  max-width: 15ch;
}
.section-title em, .manifesto-lede em, .finale-title em, .hero-title em {
  font-style: italic;
  font-weight: 420;
}
.section-lede { max-width: 56ch; margin-top: 26px; font-size: clamp(15px, 1.6vw, 18px); color: var(--ink-soft); }
.studio .section-lede { color: rgba(244, 239, 230, 0.66); }

/* ── reveals ────────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; }
html.reduced-motion .reveal { opacity: 1 !important; transform: none !important; transition: none; }

/* ═══ 1 · HERO ═══════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--night);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-inner {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad) clamp(70px, 12vh, 130px);
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  pointer-events: none;
}
.hero-inner a, .hero-inner .reveal { pointer-events: auto; }
.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.2vw, 12.5px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.62);
  margin-bottom: clamp(18px, 3vh, 34px);
}
.eyebrow-rule { width: clamp(30px, 6vw, 80px); height: 1px; background: var(--gold); opacity: 0.8; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(72px, 17vw, 218px);
  line-height: 0.86;
  letter-spacing: -0.03em;
  color: var(--milk);
}
.hero-title .line { display: block; }
.hero-title .line:nth-child(2) { margin-left: clamp(30px, 9vw, 160px); }
.hero-title .ai {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.8vw, 20px);
  letter-spacing: 0.3em;
  vertical-align: top;
  margin-top: clamp(14px, 3vw, 44px);
  margin-left: clamp(8px, 1.6vw, 22px);
  color: var(--violet);
}
.hero-title em {
  background: linear-gradient(100deg, var(--milk) 20%, var(--violet) 48%, var(--cyan) 62%, var(--gold) 80%, var(--milk) 95%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-sub {
  margin-top: clamp(22px, 4vh, 40px);
  font-size: clamp(15px, 1.9vw, 20px);
  line-height: 1.55;
  color: rgba(244, 239, 230, 0.78);
  max-width: 46ch;
}
.hero-sub .accent { color: var(--gold); font-style: italic; font-family: var(--font-display); }
.scroll-hint {
  position: absolute;
  right: var(--pad);
  bottom: clamp(70px, 12vh, 130px);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: rgba(244, 239, 230, 0.6);
}
.scroll-hint-text {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.scroll-hint-line { position: relative; width: 1px; height: 72px; background: rgba(244, 239, 230, 0.22); overflow: hidden; }
.scroll-hint-drop {
  position: absolute; left: 0; top: -12px;
  width: 1px; height: 12px;
  background: var(--gold);
  animation: hintDrop 2.1s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}
@keyframes hintDrop { 0% { top: -12px; } 100% { top: 76px; } }
html.reduced-motion .scroll-hint-drop { animation: none; top: 30px; }

/* ═══ 2 · MANIFESTO ══════════════════════════════════════════════════ */
.manifesto { position: relative; }
.manifesto-lede { margin-bottom: clamp(44px, 7vh, 80px); }
.manifesto-lede .big {
  font-family: var(--font-display);
  font-weight: 330;
  font-size: clamp(46px, 8.6vw, 118px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.manifesto-lede .big em { color: #A34E00; }
.manifesto-lede .w { display: inline-block; opacity: 0; transform: translateY(0.5em) rotate(1.2deg); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: calc(var(--wi) * 70ms); }
.manifesto-lede.in .w { opacity: 1; transform: none; }
html.reduced-motion .manifesto-lede .w { opacity: 1; transform: none; transition: none; }
.manifesto-body {
  display: grid;
  grid-template-columns: minmax(0, 60ch);
  gap: 26px;
  margin-left: auto;
  font-size: clamp(15.5px, 1.7vw, 18.5px);
  line-height: 1.75;
  color: var(--ink-soft);
}
.manifesto-body em { font-family: var(--font-display); color: var(--ink); font-size: 1.06em; }
.colophon {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #A34E00;
}

/* ═══ 3 · STUDIO ═════════════════════════════════════════════════════ */
.studio { background: var(--night); }
.studio .section-title { color: var(--milk); }
.cap {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  margin-top: clamp(64px, 10vh, 120px);
}
.cap-flip .cap-canvas-wrap { order: 2; }
.cap-flip .cap-copy { order: 1; }
.cap-canvas-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(244, 239, 230, 0.14);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  aspect-ratio: 4 / 3;
  background: var(--night-2);
}
.cap-canvas { width: 100%; height: 100%; display: block; }
.cap-tag {
  position: absolute;
  left: 14px; bottom: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.6);
  background: rgba(11, 9, 18, 0.5);
  border: 1px solid rgba(244, 239, 230, 0.16);
  padding: 5px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}
.cap-copy h3 {
  font-family: var(--font-display);
  font-weight: 380;
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--milk);
  margin-bottom: 18px;
}
.cap-copy h3 em { font-style: italic; color: var(--violet); }
.cap-num { font-family: var(--font-mono); font-size: 0.6em; color: var(--gold); letter-spacing: 0.1em; vertical-align: 0.28em; margin-right: 6px; }
.cap-copy p { color: rgba(244, 239, 230, 0.72); font-size: clamp(14.5px, 1.5vw, 16.5px); line-height: 1.7; }
.cap-copy p em { color: var(--cyan); font-style: italic; }
.cap-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(244, 239, 230, 0.14);
  font-family: var(--font-mono);
  font-size: 12px !important;
  letter-spacing: 0.04em;
  color: rgba(244, 239, 230, 0.48) !important;
}

/* ═══ 4 · INSTRUMENTS ════════════════════════════════════════════════ */
.instruments .section-title { color: var(--ink); }
.instrument-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(18px, 2.6vw, 30px);
  margin-top: clamp(50px, 8vh, 90px);
}
.instrument {
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(23, 19, 16, 0.12);
  border-radius: 12px;
  padding: 26px 22px 28px;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s;
  transition-delay: calc(var(--i, 0) * 90ms);
}
.instrument:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -24px rgba(23, 19, 16, 0.35); }
.instrument-plinth {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(23, 19, 16, 0.1);
  padding-bottom: 20px;
}
.instrument-plinth img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: grayscale(1) opacity(0.72);
  transition: filter 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.instrument:hover .instrument-plinth img { filter: grayscale(0) opacity(1); transform: scale(1.12) rotate(-3deg); }
.instrument-epitaph {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(23, 19, 16, 0.45);
  margin-bottom: 8px;
}
.instrument h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 420;
  font-size: 23px;
  color: var(--ink);
  margin-bottom: 10px;
}
.instrument p:last-child { font-size: 14px; line-height: 1.65; color: var(--ink-soft); }

/* ═══ 5 · WELLSPRING ═════════════════════════════════════════════════ */
.wellspring { position: relative; background: #0A1114; overflow: hidden; }
.wellspring-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* reading scrim: the water stays visible on the right, the words stay legible */
.wellspring::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(10, 17, 20, 0.94) 0%, rgba(10, 17, 20, 0.82) 42%, rgba(10, 17, 20, 0.45) 72%, rgba(10, 17, 20, 0.25) 100%);
  pointer-events: none;
}
.wellspring-inner { position: relative; z-index: 2; }
.wellspring .section-title { color: var(--milk); text-shadow: 0 2px 30px rgba(10, 17, 20, 0.8); }
.wellspring-body { max-width: 62ch; margin-top: 30px; display: grid; gap: 22px; }
.wellspring-body p { color: rgba(244, 239, 230, 0.78); font-size: clamp(15px, 1.6vw, 17.5px); line-height: 1.75; text-shadow: 0 1px 18px rgba(10, 17, 20, 0.9); }
.wellspring-body em { color: var(--cyan); font-family: var(--font-display); font-size: 1.05em; }
.llama-lineage { list-style: none; display: grid; gap: 10px; margin-top: 12px; }
.llama-lineage li {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: rgba(244, 239, 230, 0.66);
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.llama-lineage .gen { color: var(--gold); min-width: 76px; font-weight: 500; }

/* ═══ 6 · FINALE ═════════════════════════════════════════════════════ */
.finale { background: var(--night); text-align: center; }
.finale .kicker { justify-content: center; }
.finale .kicker::after { display: none; }
.finale-title {
  font-family: var(--font-display);
  font-weight: 320;
  font-size: clamp(44px, 7.6vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--milk);
}
.finale-title em { color: var(--gold); }
.finale-lede {
  max-width: 52ch;
  margin: 26px auto 0;
  color: rgba(244, 239, 230, 0.7);
  font-size: clamp(15px, 1.7vw, 18px);
}
.spark-form {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: clamp(36px, 6vh, 56px) auto 0;
  max-width: 560px;
}
#sparkInput {
  flex: 1;
  min-width: 0;
  background: rgba(244, 239, 230, 0.05);
  border: 1px solid rgba(244, 239, 230, 0.22);
  border-radius: 999px;
  padding: 16px 24px;
  color: var(--milk);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  outline: none;
  transition: border-color 0.3s, background 0.3s;
}
#sparkInput::placeholder { color: rgba(244, 239, 230, 0.35); }
#sparkInput:focus { border-color: var(--gold); background: rgba(244, 239, 230, 0.09); }
#sparkButton {
  border: none;
  border-radius: 999px;
  padding: 16px 30px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--night);
  background: var(--gold);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s;
}
#sparkButton:hover { transform: scale(1.05); box-shadow: 0 0 26px rgba(255, 203, 138, 0.35); }
.spark-stage {
  margin: clamp(30px, 5vh, 48px) auto 0;
  max-width: 760px;
}
#canvasFinale {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(244, 239, 230, 0.14);
  background: var(--night);
}
.spark-caption {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(244, 239, 230, 0.55);
}
.spark-caption strong { color: var(--gold); font-weight: 500; }
.begin-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(30px, 5vh, 48px);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(18px, 2.4vw, 24px);
  color: var(--milk);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 203, 138, 0.5);
  padding-bottom: 6px;
  transition: color 0.3s;
}
.begin-cta:hover { color: var(--gold); }
.begin-arrow { font-style: normal; transition: transform 0.3s; display: inline-block; }
.begin-cta:hover .begin-arrow { transform: translateX(6px); }

/* ═══ footer ═════════════════════════════════════════════════════════ */
.site-foot { background: var(--night); border-top: 1px solid rgba(244, 239, 230, 0.1); }
.foot-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(50px, 8vh, 80px) var(--pad) 44px;
  display: grid;
  gap: 26px;
}
.foot-brand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.foot-word { font-family: var(--font-display); font-style: italic; font-size: 20px; color: var(--milk); }
.foot-former {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.5);
  width: 100%;
  margin-top: 6px;
}
.foot-meta-mark { height: 12px; width: auto; opacity: 0.7; filter: invert(1); }
.foot-line { max-width: 56ch; color: rgba(244, 239, 230, 0.6); font-size: 14px; line-height: 1.7; }
.foot-colophon {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.35);
}

/* ═══ responsive ═════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .brand-former { display: none; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: 10.5px; }
}

@media (max-width: 1024px) {
  .instrument-grid { grid-template-columns: repeat(2, 1fr); }
  .cap, .cap-flip { grid-template-columns: 1fr; gap: 26px; }
  .cap-flip .cap-canvas-wrap { order: 0; }
  .cap-flip .cap-copy { order: 1; }
  .cap-canvas-wrap { aspect-ratio: 16 / 10; }
}

@media (max-width: 640px) {
  .site-nav { display: none; }
  .brand-former { margin-left: auto; }
  .hero { align-items: flex-end; }
  .hero-title .line:nth-child(2) { margin-left: 8vw; }
  .scroll-hint { display: none; }
  .manifesto-body { margin-left: 0; }
  .instrument-grid { grid-template-columns: 1fr; }
  .spark-form { flex-direction: column; }
  #sparkButton { padding: 15px; }
  .foot-former { width: auto; margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  html { scroll-behavior: auto; }
}
