/* ============================================================
 * Illustration page — local stylesheet (il- prefix)
 * Design vocabulary: editorial · dusk · violet primary · hand-drawn
 * Mirrors the Branding (br-) conventions so the Graphics discipline
 * reads as one studio. LIME stays the site-wide primary accent;
 * violet (--il-violet) flavors the illustration demo surfaces only.
 * ============================================================ */

.il-page {
  --il-violet: #7A5CFF;
  --il-ember: #FFB36B;
  --il-pine: #3AC0A0;
  --il-rose: #E58A6B;
  --il-paper: #F4ECFF;
  --il-ink: #0A0A0F;
  --il-lime: #d4ff3a;
  --il-paper-soft: rgba(244, 236, 255, 0.04);
  --il-line: rgba(244, 236, 255, 0.12);
  --il-line-strong: rgba(244, 236, 255, 0.22);
  --il-mono: 'JetBrains Mono', ui-monospace, monospace;
  --il-display: 'Fraunces', 'Bodoni Moda', serif;
  --il-sans: 'Space Grotesk', system-ui, sans-serif;
  background: var(--il-ink);
  color: var(--il-paper);
}

/* ===== shared atoms ===== */
.il-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--il-mono);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(244, 236, 255, 0.62);
  padding: 8px 12px;
  border: 1px solid var(--il-line);
  border-radius: 999px;
  background: var(--il-paper-soft);
}
.il-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
  animation: ilPulse 2.4s ease-in-out infinite;
}
@keyframes ilPulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.45 } }

.il-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--il-sans);
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.04em;
  padding: 14px 22px;
  border: 1px solid var(--il-line-strong);
  border-radius: 999px;
  color: var(--il-paper);
  background: transparent;
  text-decoration: none;
  transition: background-color 0.35s cubic-bezier(0.16,1,0.3,1),
              color 0.35s cubic-bezier(0.16,1,0.3,1),
              border-color 0.35s cubic-bezier(0.16,1,0.3,1);
}
.il-btn:hover {
  background: var(--il-paper);
  color: var(--il-ink);
  border-color: var(--il-paper);
}
/* Primary CTA — LIME per site convention (matches .v2-btn--lime, .br-btn--lime).
 * Reserve violet for hover-state backgrounds, demo art, and warnings.
 * --il-violet alias kept so existing markup can opt into a "violet" name
 * without ever colouring a primary CTA violet. */
.il-btn--lime,
.il-btn--violet {
  background: var(--il-lime);
  color: var(--il-ink);
  border-color: var(--il-lime);
}
.il-btn--lime:hover,
.il-btn--violet:hover {
  background: transparent;
  color: var(--il-lime);
  border-color: var(--il-lime);
}
.il-btn .arr { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.il-btn:hover .arr { transform: translateX(4px); }

.il-section {
  position: relative;
  padding: 140px 6vw 160px;
  z-index: 2;
}
/* Interactive sections sit above the rich.js ambient layer + any leftover
 * stacking context from earlier sticky sections (il-pass__pin, il-process
 * are 400–600vh tall with sticky children that make their own stacking
 * contexts). Belt-and-braces pointer-events on the interactive children. */
.il-style, .il-tools, .il-sys, .il-ledger, .il-cta {
  z-index: 5;
  /* isolate so these form their own stacking context, guaranteed above the
   * leftover stacking from the 460vh/600vh sticky pins (handoff bug #15:
   * "slider/tab clicks work at viewport bottom but not centre"). */
  isolation: isolate;
}
/* Keep the tall sticky-pin sections strictly below the live interactive
 * sections so a released sticky child can never intercept their clicks. */
.il-pass, .il-process { z-index: 1; }
.il-pass__sticky, .il-process__sticky { z-index: 1; }
.il-style__stage,
.il-style__panel,
.il-style__tab-row,
.il-style__tab,
.il-style__slider-wrap,
.il-style__slider,
.il-style__tokens,
.il-tools__grid,
.il-tool {
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
.il-section__head {
  max-width: 880px;
  margin: 0 auto 80px;
  text-align: center;
}
.il-section__title {
  font-family: var(--il-display);
  font-weight: 400;
  font-size: clamp(40px, 5.6vw, 92px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 24px 0 24px;
  font-variation-settings: 'opsz' 144, 'SOFT' 30, 'WONK' 1;
}
.il-section__title em {
  font-style: italic;
  color: var(--il-lime);
}
.il-section__lede {
  font-family: var(--il-sans);
  font-size: 17px;
  line-height: 1.62;
  color: rgba(244, 236, 255, 0.70);
  max-width: 640px;
  margin: 0 auto;
}
.il-section__lede em {
  font-family: var(--il-display);
  font-style: italic;
  color: var(--il-paper);
  font-weight: 500;
}

/* ============================================================
 * 01 — HERO (sketch sandbox)
 * ============================================================ */
.il-hero {
  position: relative;
  min-height: 100vh;
  padding: 120px 6vw 60px;
  overflow: hidden;
  z-index: 1;
}
.il-hero__grain {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    radial-gradient(rgba(244, 236, 255, 0.6) 1px, transparent 1px),
    radial-gradient(rgba(244, 236, 255, 0.6) 1px, transparent 1px);
  background-size: 4px 4px, 6px 6px;
  background-position: 0 0, 2px 3px;
  mix-blend-mode: overlay;
}
.il-hero__three {
  position: absolute;
  top: 6%; right: -8%;
  width: 72vw; max-width: 1000px;
  height: 76vh;
  pointer-events: none;
  opacity: 0.6;
  z-index: 0;
}
.il-hero__inner {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  min-height: calc(100vh - 240px);
}
.il-hero__left { padding-right: 20px; }
.il-hero__title {
  font-family: var(--il-display);
  font-weight: 400;
  font-size: clamp(48px, 6.4vw, 108px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 28px 0 28px;
  font-variation-settings: 'opsz' 144, 'wght' 400, 'SOFT' 30, 'WONK' 1;
}
.il-hero__title em {
  font-style: italic;
  color: var(--il-lime);
}
.il-hero__lede {
  font-family: var(--il-sans);
  font-size: 18px;
  line-height: 1.62;
  color: rgba(244, 236, 255, 0.72);
  max-width: 540px;
}
.il-hero__cta-row {
  margin-top: 32px;
  display: flex; gap: 14px; flex-wrap: wrap;
}
.il-hero__caption {
  margin-top: 38px;
  font-family: var(--il-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 236, 255, 0.45);
  display: flex; gap: 14px; align-items: baseline;
}
.il-hero__caption .n {
  font-family: var(--il-display);
  font-style: italic;
  font-size: 16px;
  color: var(--il-lime);
}

/* sketchpad chrome */
.il-hero__pad {
  position: relative;
  width: 100%;
  height: min(620px, 70vh);
  background:
    linear-gradient(180deg, #fbf6ef 0%, #f4ecff 100%);
  border-radius: 12px;
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(244, 236, 255, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.il-pad__chrome {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(10, 10, 15, 0.10);
  background: rgba(244, 236, 255, 0.6);
  backdrop-filter: blur(8px);
  z-index: 3;
}
.il-pad__title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--il-mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(10, 10, 15, 0.7);
}
.il-pad__pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: ilPulse 1.6s ease-in-out infinite;
}
.il-pad__counter {
  font-family: var(--il-display);
  font-style: italic;
  font-size: 13px;
  color: rgba(10, 10, 15, 0.55);
}
.il-pad__counter span { font-weight: 600; color: #5a3fd0; margin-right: 4px; }

#il-pad-canvas {
  flex: 1 1 auto;
  display: block;
  width: 100%;
  min-height: 0;
  z-index: 1;
  cursor: crosshair;
  touch-action: none;
}
.il-pad__hint {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--il-display);
  font-style: italic;
  font-size: 22px;
  color: rgba(10, 10, 15, 0.28);
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 2;
}
.il-pad__hint.is-hidden { opacity: 0; }

.il-pad__hud {
  flex: 0 0 auto;
  padding: 12px 14px;
  display: flex; gap: 8px; justify-content: flex-end;
  border-top: 1px solid rgba(10, 10, 15, 0.10);
  background: rgba(244, 236, 255, 0.6);
  backdrop-filter: blur(8px);
  z-index: 3;
}
.il-pad__btn {
  font-family: var(--il-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--il-ink);
  background: var(--il-ink);
  color: var(--il-paper);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.il-pad__btn:hover { background: var(--il-lime); border-color: var(--il-lime); color: var(--il-ink); }
.il-pad__btn--ghost { background: transparent; color: var(--il-ink); }
.il-pad__btn--ghost:hover { background: var(--il-ink); color: var(--il-paper); border-color: var(--il-ink); }

/* hero metrics row */
.il-hero__metrics {
  position: relative; z-index: 2;
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--il-line);
}
.il-hero__metric {
  padding: 22px 24px;
  border-right: 1px solid var(--il-line);
  display: flex; flex-direction: column; gap: 8px;
}
.il-hero__metric:last-child { border-right: 0; }
.il-hero__metric .k {
  font-family: var(--il-mono);
  font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 236, 255, 0.5);
}
.il-hero__metric .v {
  font-family: var(--il-display);
  font-size: 38px; font-weight: 500;
  color: var(--il-paper);
  font-variation-settings: 'opsz' 96, 'wght' 500;
}
.il-hero__metric .v em {
  font-style: italic;
  color: var(--il-lime);
}

/* ============================================================
 * 02 — LEDGER
 * ============================================================ */
.il-ledger__table {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--il-line-strong);
}
.il-ledger__row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 2.4fr 1fr;
  gap: 30px;
  padding: 26px 18px;
  border-bottom: 1px solid var(--il-line);
  transition: background 0.3s ease, padding 0.3s ease;
  align-items: baseline;
}
.il-ledger__row:hover {
  background: rgba(244, 236, 255, 0.03);
  padding-left: 28px;
}
.il-ledger__name {
  font-family: var(--il-display);
  font-style: italic;
  font-size: 28px;
  font-variation-settings: 'opsz' 96, 'wght' 500, 'SOFT' 30, 'WONK' 1;
  color: var(--il-paper);
}
.il-ledger__type {
  font-family: var(--il-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 236, 255, 0.55);
}
.il-ledger__beat {
  font-family: var(--il-sans);
  font-size: 14px;
  line-height: 1.55;
  color: rgba(244, 236, 255, 0.72);
}
.il-ledger__metric {
  text-align: right;
  display: flex; flex-direction: column; gap: 4px;
}
.il-ledger__metric em {
  font-family: var(--il-display);
  font-style: italic;
  font-size: 32px;
  font-weight: 500;
  color: var(--il-lime);
  font-variation-settings: 'opsz' 96, 'wght' 500;
}
.il-ledger__metric span {
  font-family: var(--il-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 236, 255, 0.45);
}

/* ============================================================
 * 03 — FOUR PASSES (sticky scroll: line → flat → shade → render)
 * ============================================================ */
.il-pass__intro { max-width: 880px; margin: 0 auto 60px; text-align: center; }
.il-pass__pin {
  position: relative;
  height: 460vh;
}
.il-pass__stage {
  position: relative;
  width: 100%;
  height: 100%;
}
.il-pass__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.il-pass__rail {
  position: absolute;
  bottom: 6vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 18px;
  padding: 10px 20px;
  background: rgba(244, 236, 255, 0.05);
  border: 1px solid var(--il-line);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  z-index: 5;
}
.il-pass__counter {
  font-family: var(--il-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  display: flex; gap: 6px;
}
.il-pass__counter span:first-child { color: var(--il-lime); font-weight: 600; }
.il-pass__counter .sep { color: rgba(244, 236, 255, 0.3); }
.il-pass__progress {
  width: 240px;
  height: 2px;
  background: rgba(244, 236, 255, 0.12);
  border-radius: 1px;
  overflow: hidden;
}
.il-pass__progress-fill {
  height: 100%;
  width: 0%;
  background: var(--il-lime);
  transition: width 0.3s ease;
}
.il-pass__label {
  font-family: var(--il-display);
  font-style: italic;
  font-size: 13px;
  color: rgba(244, 236, 255, 0.78);
  min-width: 180px;
}
.il-pass__art {
  position: relative;
  width: min(640px, 84vw);
  display: flex; flex-direction: column; align-items: center;
  gap: 22px;
}
#il-pass-svg {
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 460;
  border-radius: 10px;
  overflow: hidden;
  background: #0d0a18;
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(244, 236, 255, 0.06);
}
/* Each pass layer fades in cumulatively; the line layer fades back as the
 * render arrives so it reads finished, not outlined. JS sets data-pass. */
.il-layer {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
#il-pass-svg[data-pass="0"] .il-layer--line { opacity: 1; }
#il-pass-svg[data-pass="1"] .il-layer--line,
#il-pass-svg[data-pass="1"] .il-layer--flat { opacity: 1; }
#il-pass-svg[data-pass="2"] .il-layer--line,
#il-pass-svg[data-pass="2"] .il-layer--flat,
#il-pass-svg[data-pass="2"] .il-layer--shade { opacity: 1; }
#il-pass-svg[data-pass="2"] .il-layer--line { opacity: 0.5; }
#il-pass-svg[data-pass="3"] .il-layer--flat,
#il-pass-svg[data-pass="3"] .il-layer--shade,
#il-pass-svg[data-pass="3"] .il-layer--render { opacity: 1; }
#il-pass-svg[data-pass="3"] .il-layer--line { opacity: 0.18; }
.il-pass__caption {
  font-family: var(--il-display);
  font-style: italic;
  font-size: 16px;
  color: rgba(244, 236, 255, 0.66);
  text-align: center;
  max-width: 520px;
  min-height: 24px;
  transition: opacity 0.4s ease;
}

/* ============================================================
 * 04 — PROCESS (sticky pinned scenes)
 * ============================================================ */
.il-process {
  position: relative;
  padding: 0;
  background: linear-gradient(180deg, transparent, rgba(244, 236, 255, 0.02), transparent);
}
.il-process__inner {
  position: relative;
  height: 600vh;
}
.il-process__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.il-process__num {
  position: absolute;
  top: 8vh; right: 6vw;
  font-family: var(--il-display);
  font-style: italic;
  font-size: clamp(120px, 18vw, 280px);
  line-height: 1;
  color: rgba(244, 236, 255, 0.05);
  font-variation-settings: 'opsz' 144, 'wght' 400, 'SOFT' 30, 'WONK' 1;
  pointer-events: none;
}
.il-process__scene {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  padding: 0 6vw;
}
.il-process__scene.is-active {
  opacity: 1;
  transform: translateY(0);
}
.il-process__scene-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  width: 100%;
  max-width: 1200px;
}
.il-process__copy h3 {
  font-family: var(--il-display);
  font-size: clamp(40px, 5.6vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 24px 0 20px;
  font-variation-settings: 'opsz' 144, 'wght' 500, 'SOFT' 30, 'WONK' 1;
}
.il-process__copy h3 em {
  font-style: italic;
  color: var(--il-lime);
}
.il-process__copy p {
  font-family: var(--il-sans);
  font-size: 17px;
  line-height: 1.62;
  color: rgba(244, 236, 255, 0.72);
  max-width: 480px;
}
.il-process__step {
  margin-top: 24px;
  font-family: var(--il-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
}
.il-process__visual {
  position: relative;
  height: 56vh;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(244, 236, 255, 0.03);
  border: 1px solid var(--il-line);
}

.il-process__rail {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: rgba(244, 236, 255, 0.12);
  border-radius: 1px;
  overflow: hidden;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.il-process__rail.is-on { opacity: 1; }
.il-process__rail-fill {
  height: 100%;
  width: 0%;
  background: var(--il-lime);
  transition: width 0.2s linear;
}

/* process visual variants */
.il-pv {
  position: absolute; inset: 0;
  padding: 28px;
  display: flex; flex-direction: column;
  gap: 12px;
  overflow: auto;
}
.il-pv--brief { gap: 16px; }
.il-pv__note {
  padding: 18px 22px;
  background: rgba(244, 236, 255, 0.04);
  border-left: 2px solid var(--il-violet);
  border-radius: 0 6px 6px 0;
}
.il-pv__note em {
  display: block;
  font-family: var(--il-display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.3;
  color: var(--il-paper);
  font-variation-settings: 'opsz' 96, 'SOFT' 30, 'WONK' 1;
}
.il-pv__note span {
  display: block;
  margin-top: 6px;
  font-family: var(--il-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 236, 255, 0.5);
}
.il-pv__tags {
  margin-top: auto;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.il-pv__tags span {
  padding: 6px 12px;
  border: 1px solid var(--il-line);
  border-radius: 999px;
  font-family: var(--il-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 236, 255, 0.6);
}

.il-pv--thumbs { padding: 18px; }
.il-pv__thumb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  height: 100%;
}
.il-pv__thumb {
  background: rgba(244, 236, 255, 0.03);
  border: 1px solid var(--il-line);
  border-radius: 6px;
  display: grid; place-items: center;
  position: relative;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.il-pv__thumb.is-pick {
  background: rgba(122, 92, 255, 0.12);
  border-color: var(--il-violet);
  box-shadow: 0 0 0 1px var(--il-violet);
}
.il-pv__thumb svg { width: 64%; height: 64%; color: rgba(244, 236, 255, 0.7); }
.il-pv__thumb.is-pick svg { color: var(--il-violet); }
.il-pv__thumb-num {
  position: absolute; top: 6px; left: 8px;
  font-family: var(--il-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(244, 236, 255, 0.4);
}

.il-pv--line, .il-pv--color { padding: 22px 26px; }
.il-pv__sys-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--il-line);
  align-items: center;
}
.il-pv__sys-row:last-child { border-bottom: 0; }
.il-pv__sys-row .k {
  font-family: var(--il-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 236, 255, 0.5);
}
.il-pv__sys-row .v {
  font-family: var(--il-sans);
  font-size: 14px;
  color: rgba(244, 236, 255, 0.9);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.il-pv__sys-row .v i {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(244, 236, 255, 0.18);
}

.il-pv--render {
  flex-direction: row; flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: 8px;
  padding: 28px;
}
.il-pv__chip {
  padding: 8px 14px;
  border: 1px solid var(--il-line);
  border-radius: 999px;
  font-family: var(--il-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 236, 255, 0.7);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.il-pv__chip:hover {
  background: var(--il-violet);
  color: var(--il-paper);
  border-color: var(--il-violet);
}

.il-pv--deliver { padding: 22px 26px; gap: 0; }
.il-pv__defense {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--il-line);
  align-items: baseline;
}
.il-pv__defense:last-child { border-bottom: 0; }
.il-pv__defense .k {
  font-family: var(--il-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--il-lime);
}
.il-pv__defense .v {
  font-family: var(--il-display);
  font-style: italic;
  font-size: 17px;
  color: rgba(244, 236, 255, 0.92);
  font-variation-settings: 'opsz' 96, 'SOFT' 30, 'WONK' 1;
}

/* ============================================================
 * 05 — STYLE (live illustration morph)
 * ============================================================ */
.il-style__stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}
.il-style__board {
  position: relative;
  width: min(460px, 92%);
  margin: 0 auto;
  background: #14101f;
  border: 1px solid var(--il-line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 40px 80px -20px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(244, 236, 255, 0.05);
}
.il-style__board-bar,
.il-style__board-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  font-family: var(--il-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 236, 255, 0.6);
}
.il-style__board-bar { border-bottom: 1px solid var(--il-line); }
.il-style__board-foot { border-top: 1px solid var(--il-line); }
.il-style__board-dims, .il-style__board-mood { color: rgba(244, 236, 255, 0.4); }
.il-style__canvas { position: relative; }
#il-style-svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}
.il-style__panel {
  display: flex; flex-direction: column;
  gap: 22px;
  padding: 28px;
  background: rgba(244, 236, 255, 0.03);
  border: 1px solid var(--il-line);
  border-radius: 12px;
}
.il-style__tab-row { display: flex; gap: 14px; }
.il-style__tab {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--il-line);
  border-radius: 8px;
  cursor: pointer;
  /* Specific transitions only — `transition: all` on a clickable card can
   * drop mid-click activation when the page bg-tone is also transitioning. */
  transition: border-color 0.3s ease, background-color 0.3s ease;
  position: relative;
  z-index: 1;
}
.il-style__tab.is-on {
  border-color: var(--lime);
  background: rgba(212, 255, 58, 0.05);
}
.il-style__tab-name {
  font-family: var(--il-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 236, 255, 0.7);
  margin-bottom: 4px;
}
.il-style__tab-name em {
  font-family: var(--il-display);
  font-style: italic;
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--il-paper);
  margin-left: 4px;
  font-variation-settings: 'opsz' 96, 'SOFT' 30, 'WONK' 1;
}
.il-style__tab-line {
  font-family: var(--il-sans);
  font-size: 12px;
  color: rgba(244, 236, 255, 0.55);
}
.il-style__slider-wrap { display: flex; flex-direction: column; gap: 8px; }
.il-style__slider {
  appearance: none;
  width: 100%; height: 4px;
  background: var(--il-line);
  border-radius: 2px;
  outline: none;
  cursor: ew-resize;
}
.il-style__slider::-webkit-slider-thumb {
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--lime);
  cursor: ew-resize;
  box-shadow: 0 4px 12px rgba(212, 255, 58, 0.5);
}
.il-style__slider::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--lime);
  cursor: ew-resize;
  border: 0;
  box-shadow: 0 4px 12px rgba(212, 255, 58, 0.5);
}
.il-style__slider-rail {
  display: flex; justify-content: space-between;
  font-family: var(--il-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 236, 255, 0.55);
}
.il-style__tokens {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--il-line);
  border-left: 1px solid var(--il-line);
}
.il-style__token {
  padding: 12px 14px;
  border-right: 1px solid var(--il-line);
  border-bottom: 1px solid var(--il-line);
  display: flex; flex-direction: column; gap: 4px;
}
.il-style__token .k {
  font-family: var(--il-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 236, 255, 0.5);
}
.il-style__token .v {
  font-family: var(--il-sans);
  font-size: 13px;
  color: var(--il-paper);
}

/* ============================================================
 * 06 — SYSTEM
 * ============================================================ */
.il-sys__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.il-sys__panel {
  padding: 28px;
  background: rgba(244, 236, 255, 0.03);
  border: 1px solid var(--il-line);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.il-sys__panel-head {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--il-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 236, 255, 0.55);
  margin-bottom: 22px;
}
.il-sys__panel-head .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}

.il-sys__brush-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--il-line);
  color: var(--il-paper);
}
.il-sys__brush-row:last-child { border-bottom: 0; }
.il-sys__brush-row .bn {
  font-family: var(--il-display);
  font-style: italic;
  font-size: 18px;
  font-variation-settings: 'opsz' 96, 'wght' 500, 'SOFT' 30, 'WONK' 1;
}
.il-sys__brush-row svg {
  width: 100%; height: 24px;
  color: var(--il-violet);
  overflow: visible;
}

.il-sys__sw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--il-line);
  border: 1px solid var(--il-line);
  border-radius: 8px;
  overflow: hidden;
}
.il-sys__sw {
  aspect-ratio: 2 / 1;
  padding: 12px 14px;
  display: flex; flex-direction: column;
  justify-content: space-between;
  color: var(--il-paper);
  position: relative;
}
.il-sys__sw-name {
  font-family: var(--il-display);
  font-style: italic;
  font-size: 22px;
  font-variation-settings: 'opsz' 96, 'wght' 500, 'SOFT' 30, 'WONK' 1;
}
.il-sys__sw-meta {
  font-family: var(--il-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.il-sys__rule {
  padding: 14px 0;
  border-bottom: 1px solid var(--il-line);
  font-family: var(--il-sans);
  font-size: 14px;
  line-height: 1.5;
  color: rgba(244, 236, 255, 0.78);
}
.il-sys__rule:last-child { border-bottom: 0; }
.il-sys__rule em {
  font-family: var(--il-display);
  font-style: italic;
  color: var(--il-paper);
  font-size: 15px;
  font-variation-settings: 'opsz' 96, 'SOFT' 30, 'WONK' 1;
}
.il-sys__rule .ok, .il-sys__rule .no {
  display: inline-block;
  padding: 3px 9px;
  margin-right: 10px;
  font-family: var(--il-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 999px;
}
.il-sys__rule .ok { background: var(--il-pine); color: var(--il-ink); }
.il-sys__rule .no { background: rgba(122, 92, 255, 0.15); color: var(--il-violet); border: 1px solid var(--il-violet); }

.il-sys__jar { padding: 0; }
.il-sys__jar .il-sys__panel-head {
  position: absolute; top: 18px; left: 22px;
  margin: 0;
  z-index: 2;
  /* The head + readout float over the canvas where chips pile up. Let pointer
   * events pass through so every chip stays draggable, not just the ones in
   * the clear middle band. */
  pointer-events: none;
}
.il-sys__jar-readout { pointer-events: none; }
#il-sys-jar {
  width: 100%;
  aspect-ratio: 1.4 / 1;
  display: block;
  background: rgba(244, 236, 255, 0.02);
}
.il-sys__jar-readout {
  position: absolute; bottom: 14px; left: 22px; right: 22px;
  padding: 10px 14px;
  background: rgba(10, 10, 15, 0.65);
  border: 1px solid var(--il-line);
  border-radius: 6px;
  font-family: var(--il-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  color: rgba(244, 236, 255, 0.85);
  backdrop-filter: blur(8px);
}

/* ============================================================
 * 07 — TOOLS
 * ============================================================ */
.il-tools__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--il-line);
  border: 1px solid var(--il-line);
  border-radius: 12px;
  overflow: hidden;
}
.il-tool {
  background: var(--il-ink);
  padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  /* Specific transitions only — `transition: all` collides with rich.js's
   * stagger-list animation-fill-mode: forwards. */
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 110px;
  position: relative;
}
.il-tool:hover {
  background: var(--il-violet);
  color: var(--il-paper);
}
.il-tool .cat {
  font-family: var(--il-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 236, 255, 0.45);
  margin-bottom: 6px;
}
.il-tool:hover .cat { color: rgba(244, 236, 255, 0.75); }
.il-tool .nm {
  font-family: var(--il-display);
  font-style: italic;
  font-size: 22px;
  font-variation-settings: 'opsz' 96, 'wght' 500, 'SOFT' 30, 'WONK' 1;
}
.il-tool .glyph svg {
  width: 28px; height: 28px;
  fill: none;
  stroke: var(--lime);
  stroke-width: 1.4;
  transition: stroke 0.3s ease, transform 0.3s ease;
}
.il-tool:hover .glyph svg {
  stroke: var(--il-paper);
  transform: rotate(8deg);
}

/* ============================================================
 * 08 — CTA
 * ============================================================ */
.il-cta {
  position: relative;
  padding: 160px 6vw 200px;
  text-align: center;
  overflow: hidden;
}
.il-cta canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}
.il-cta__inner {
  position: relative; z-index: 1;
  max-width: 880px;
  margin: 0 auto;
}
.il-cta__title {
  font-family: var(--il-display);
  font-weight: 400;
  font-size: clamp(48px, 7vw, 112px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 24px 0 24px;
  font-variation-settings: 'opsz' 144, 'wght' 400, 'SOFT' 30, 'WONK' 1;
}
.il-cta__title em {
  font-style: italic;
  color: var(--il-lime);
}
.il-cta__lede {
  font-family: var(--il-sans);
  font-size: 18px;
  line-height: 1.6;
  color: rgba(244, 236, 255, 0.7);
  max-width: 580px;
  margin: 0 auto 36px;
}

/* ============================================================
 * Tweaks panel + sound toggle — hidden on production-facing pages.
 * ============================================================ */
.il-page .v2-tweaks,
.il-page .v2-sound { display: none !important; }

/* ============================================================
 * Responsive
 * ============================================================ */
@media (max-width: 1024px) {
  .il-hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .il-hero__three { display: none; }
  .il-hero__metrics { grid-template-columns: repeat(2, 1fr); }
  .il-hero__metric { border-bottom: 1px solid var(--il-line); }
  .il-hero__metric:nth-child(2) { border-right: 0; }
  .il-process__scene-inner { grid-template-columns: 1fr; gap: 30px; }
  .il-process__visual { height: 38vh; }
  .il-style__stage { grid-template-columns: 1fr; gap: 30px; }
  .il-tools__grid { grid-template-columns: repeat(2, 1fr); }
  .il-sys__grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .il-section { padding: 80px 5vw 100px; }
  .il-hero { padding: 100px 5vw 40px; }
  .il-ledger__row { grid-template-columns: 1fr; gap: 8px; padding: 18px 12px; }
  .il-ledger__metric { text-align: left; }
  .il-pv__thumb-grid { grid-template-columns: repeat(3, 1fr); }
  .il-pass__pin { height: auto; }
  .il-pass__sticky { position: static; height: auto; padding: 40px 0; }
  .il-process__inner { height: auto; }
  .il-process__sticky { position: static; height: auto; padding: 60px 0; }
  .il-process__scene { position: relative; opacity: 1; transform: none; padding: 30px 5vw; height: auto; }
  .il-process__visual { height: 40vh; }
  .il-style__tokens { grid-template-columns: 1fr; }
  .il-process__rail { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .il-process__scene { transition: none; }
  .il-layer { transition: none; }
  .il-pad__pulse, .il-eyebrow .dot { animation: none; }
}
