/* ============================================================
   CYPHER CORE — Editorial Layout, Interactive Stages & Craft
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  background: var(--ink);
}

body {
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
svg,
canvas {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--lav);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--grape);
  outline-offset: 3px;
  border-radius: 5px;
}

.on-ink :focus-visible {
  outline-color: var(--butter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip {
  position: fixed;
  top: 14px;
  left: 16px;
  z-index: var(--z-skip);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  border: var(--line-w) solid var(--paper);
  border-radius: var(--pill);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transform: translateY(-140%);
  transition: transform var(--dur-fast) var(--ease-out);
}

.skip:focus {
  transform: translateY(0);
}

/* Scroll progress bar (GPU scaleX driven by js/core.js) */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3.5px;
  z-index: var(--z-progress);
  background: linear-gradient(90deg, var(--grape) 0%, var(--lav) 35%, var(--sage) 68%, var(--butter) 100%);
  transform-origin: left center;
  transform: scaleX(0);
  pointer-events: none;
  will-change: transform;
}

/* Layout container */
.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--wrap-pad);
}

section {
  position: relative;
}

/* ---------- Editorial Type Utilities ---------- */
.mono-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
}

.display {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-wrap: balance;
}

.h2 {
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 0.98;
  text-wrap: balance;
}

/* ---------- Buttons & Tactile Controls ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  line-height: 1.2;
  min-height: 48px;
  padding: 13px 22px;
  border: var(--line-w) solid var(--ink);
  border-radius: var(--pill);
  background: var(--paper-hi);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--sh-sm);
  transition:
    transform var(--dur-press) var(--ease-out),
    box-shadow var(--dur-press) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
  will-change: transform;
}

.btn svg {
  flex: none;
}

.btn:active {
  transform: scale(0.97) translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn--ink {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 4px 4px 0 var(--butter);
}

.btn--ink:active {
  box-shadow: 1px 1px 0 var(--butter);
}

.btn--sm {
  min-height: 40px;
  padding: 9px 16px;
  font-size: 13.5px;
}

.on-ink .btn {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
  box-shadow: 4px 4px 0 var(--lav);
}

.on-ink .btn:active {
  box-shadow: 1px 1px 0 var(--lav);
}

.on-ink .btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--cream-60);
  box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--ink);
  }
  .btn--ink:hover {
    box-shadow: 6px 6px 0 var(--butter);
  }
  .on-ink .btn:hover {
    box-shadow: 6px 6px 0 var(--lav);
  }
  .on-ink .btn--ghost:hover {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--paper);
    box-shadow: 4px 4px 0 var(--butter);
  }
}

/* ---------- Pills / Metadata Badges ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: var(--line-w) solid var(--ink);
  border-radius: var(--pill);
  background: var(--paper-hi);
  color: var(--ink);
  line-height: 1.1;
}

.pill--soft {
  background: var(--paper-2);
  border-color: var(--ink-14);
}

.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  flex: none;
}

/* ============================================================
   STICKY HEADER & MOBILE DRAWER
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(247, 243, 234, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: var(--line-w) solid var(--ink);
  transition: box-shadow var(--dur-med) var(--ease-out);
}

.nav.scrolled {
  box-shadow: 0 4px 0 rgba(20, 21, 32, 0.14);
}

.nav-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
}

.brand .mark {
  width: 34px;
  height: 34px;
  flex: none;
  transition: transform var(--dur-med) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .brand:hover .mark {
    transform: rotate(45deg);
  }
}

.brand .name {
  font-size: 15.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.015em;
  padding: 8px 14px;
  border-radius: var(--pill);
  border: 2px solid transparent;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-press) var(--ease-out);
}

.nav-links a:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover {
    border-color: var(--ink);
    background: var(--paper-hi);
  }
}

.nav-links a[aria-current="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: var(--line-w) solid var(--ink);
  border-radius: var(--pill);
  background: var(--paper-hi);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sh-xs);
  transition: transform var(--dur-press) var(--ease-out), box-shadow var(--dur-press) var(--ease-out);
}

.menu-btn:active {
  transform: scale(0.95);
  box-shadow: 0 0 0 var(--ink);
}

.menu-btn .ic-close {
  display: none;
}

.menu-btn[aria-expanded="true"] .ic-menu {
  display: none;
}

.menu-btn[aria-expanded="true"] .ic-close {
  display: block;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  background: var(--paper);
  background-image: radial-gradient(rgba(20, 21, 32, 0.06) 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 28px) clamp(24px, 7vw, 48px) 48px;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px) scale(0.98);
  visibility: hidden;
  transition:
    opacity var(--dur-med) var(--ease-drawer),
    transform var(--dur-med) var(--ease-drawer),
    visibility 0s linear var(--dur-med);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  visibility: visible;
  transition:
    opacity var(--dur-med) var(--ease-drawer),
    transform var(--dur-med) var(--ease-drawer),
    visibility 0s linear 0s;
}

.mobile-menu a {
  text-decoration: none;
  font-weight: 800;
  font-size: clamp(30px, 8.5vw, 46px);
  letter-spacing: -0.025em;
  line-height: 1.2;
  border-bottom: var(--line-w) solid var(--ink);
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-menu a:active {
  transform: scale(0.98);
}

.mobile-menu .mono-tag {
  color: var(--ink-75);
}

/* ============================================================
   HERO — IMMEDIATE FRAME-0 VISIBILITY (ZERO OPACITY:0 LCP PENALTY)
   ============================================================ */
.hero {
  background-color: var(--lav);
  background-image:
    radial-gradient(rgba(20, 21, 32, 0.085) 1.25px, transparent 1.25px);
  background-size: 26px 26px;
  border-bottom: var(--line-w) solid var(--ink);
  padding: clamp(44px, 5.5vw, 76px) 0 clamp(52px, 6.5vw, 84px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(32px, 4.5vw, 68px);
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: var(--z-above);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 22px;
}

.hero-eyebrow .dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 2px;
}

.hero h1 {
  font-size: clamp(46px, 6.2vw, 88px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  color: var(--ink);
}

.hero h1 .hl {
  display: inline-block;
  background: var(--butter);
  border: var(--line-w) solid var(--ink);
  border-radius: 12px;
  padding: 0.02em 0.16em 0.05em;
  box-shadow: 4px 4px 0 var(--ink);
  vertical-align: baseline;
  line-height: 1.02;
  margin-top: 0.06em;
}

.hero-sub {
  font-size: clamp(18px, 1.7vw, 22px);
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: -0.01em;
  color: var(--ink-90);
  max-width: 28ch;
  margin-bottom: 32px;
  text-wrap: pretty;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* Interactive Cypher Core Stage */
.cipher-shell {
  position: relative;
  width: 100%;
  max-width: 548px;
  margin-inline: auto;
}

.cipher-stage {
  position: relative;
  background: var(--paper-hi);
  border: var(--line-w) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--sh-lg);
  padding: 18px 18px 16px;
  user-select: none;
  touch-action: pan-y;
}

.cipher-stage.is-dragging,
.cipher-stage.is-dragging .cipher-dial-wrap {
  cursor: grabbing;
}

.cipher-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--ink-14);
  margin-bottom: 12px;
}

.cipher-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-75);
}

.cipher-hint::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grape);
  flex: none;
}

.cipher-dial-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 410px;
  margin-inline: auto;
  cursor: grab;
}

.cipher-dial-wrap:active {
  cursor: grabbing;
}

#cipher-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* 4 Interactive Quadrant Focus Nodes */
.cipher-node {
  position: absolute;
  z-index: var(--z-above);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 11px;
  border: var(--line-w) solid var(--ink);
  border-radius: var(--pill);
  background: var(--paper-hi);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--sh-xs);
  transition:
    transform var(--dur-press) var(--ease-out),
    box-shadow var(--dur-press) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.cipher-node .cn-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  flex: none;
}

.cipher-node--clinkx   { top: 4%; right: 2%; }
.cipher-node--hedwig   { bottom: 4%; right: 2%; }
.cipher-node--upora    { bottom: 4%; left: 2%; }
.cipher-node--hematine { top: 4%; left: 2%; }

.cipher-node--clinkx .cn-dot   { background: var(--sage); }
.cipher-node--hedwig .cn-dot   { background: var(--blush); }
.cipher-node--upora .cn-dot    { background: var(--butter); }
.cipher-node--hematine .cn-dot { background: var(--lav); }

.cipher-node:active {
  transform: scale(0.95);
  box-shadow: 0 0 0 var(--ink);
}

.cipher-node.is-active,
.cipher-node[aria-current="true"] {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 3px 3px 0 var(--grape);
}

.cipher-node.is-active .cn-dot,
.cipher-node[aria-current="true"] .cn-dot {
  border-color: var(--paper);
}

@media (hover: hover) and (pointer: fine) {
  .cipher-node:hover {
    transform: translate(-1.5px, -1.5px);
    box-shadow: 4px 4px 0 var(--ink);
  }
  .cipher-node.is-active:hover {
    box-shadow: 4px 4px 0 var(--grape);
  }
}

/* Live Cypher Core Readout Strip */
.cipher-readout {
  margin-top: 12px;
  padding: 12px 14px;
  border: var(--line-w) solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
}

.cipher-readout-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.cipher-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--paper);
  background: var(--sage);
  flex: none;
  transition: background-color var(--dur-fast) var(--ease-out);
}

.cipher-readout-name {
  font-weight: 800;
  font-size: 15.5px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.cipher-readout-desc,
.cipher-readout-line {
  font-size: 13.5px;
  color: var(--cream-80);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cipher-readout-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--pill);
  background: var(--cream-18);
  color: var(--paper);
  white-space: nowrap;
  flex: none;
}

/* ============================================================
   MARQUEE RIBBON
   ============================================================ */
.mq {
  display: flex;
  align-items: stretch;
  background: var(--ink);
  color: var(--paper);
  border-bottom: var(--line-w) solid var(--ink);
}

.mq-view {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.mq-track {
  display: flex;
  width: max-content;
  animation: mq-scroll 34s linear infinite;
  will-change: transform;
}

.mq-view:focus-within .mq-track,
.paused .mq-track {
  animation-play-state: paused;
}

@media (hover: hover) and (pointer: fine) {
  .mq-view:hover .mq-track {
    animation-play-state: paused;
  }
}

@keyframes mq-scroll {
  to {
    transform: translateX(-50%);
  }
}

.mq-group {
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 16px 36px 16px 0;
  flex: none;
}

.mq-item {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  flex: none;
}

.mq-item .p {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.mq-item .d {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-80);
}

.mq-star {
  width: 14px;
  height: 14px;
  flex: none;
}

.mq-pause {
  flex: none;
  width: 58px;
  min-height: 50px;
  border: none;
  border-left: var(--line-w) solid var(--cream-18);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-press) var(--ease-out);
}

.mq-pause:active {
  transform: scale(0.94);
}

@media (hover: hover) and (pointer: fine) {
  .mq-pause:hover {
    background: rgba(247, 243, 234, 0.12);
  }
}

.mq-pause svg {
  width: 15px;
  height: 15px;
}

.mq-pause .ic-play {
  display: none;
}

.mq-pause[aria-pressed="true"] .ic-pause {
  display: none;
}

.mq-pause[aria-pressed="true"] .ic-play {
  display: block;
}

/* ============================================================
   CHAPTER HEADER BANDS (WITH BESPOKE HD EDITORIAL PLATES)
   ============================================================ */
.chapter-band {
  border-bottom: var(--line-w) solid var(--ink);
  padding-block: clamp(44px, 5vw, 68px);
}

.chapter-band--1 {
  background-color: var(--lav-soft);
  background-image: radial-gradient(rgba(20, 21, 32, 0.055) 1.1px, transparent 1.1px);
  background-size: 24px 24px;
}

.chapter-band--2 {
  background-color: var(--blush-soft);
  background-image: radial-gradient(rgba(20, 21, 32, 0.055) 1.1px, transparent 1.1px);
  background-size: 24px 24px;
}

.chapter-spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.96fr);
  gap: clamp(28px, 4.5vw, 64px);
  align-items: center;
}

.chapter-meta {
  display: flex;
  align-items: flex-end;
  gap: clamp(18px, 2.8vw, 34px);
}

.chapter-num {
  font-weight: 800;
  font-size: clamp(78px, 10vw, 148px);
  line-height: 0.78;
  letter-spacing: -0.04em;
  paint-order: stroke fill;
  color: var(--lav-soft);
  -webkit-text-stroke: 4px var(--ink);
  flex: none;
  user-select: none;
}

.chapter-band--1 .chapter-num {
  color: var(--lav-soft);
}

.chapter-band--2 .chapter-num {
  color: var(--blush-soft);
}

.chapter-title-col .chapter-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--ink-75);
}

.chapter-title-col .chapter-kicker::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--ink);
}

.chapter-title-col h2 {
  font-size: clamp(38px, 4.8vw, 66px);
  margin-bottom: 10px;
}

.chapter-caption {
  font-size: clamp(16px, 1.4vw, 18.5px);
  font-weight: 600;
  color: var(--ink-75);
}

.chapter-plate {
  position: relative;
  border: var(--line-w) solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--sh);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .chapter-plate:hover {
    transform: translate(-3px, -3px);
    box-shadow: var(--sh-lg);
  }
}

.chapter-plate img {
  width: 100%;
  height: auto;
  aspect-ratio: 1376 / 768;
  object-fit: cover;
}

/* ============================================================
   PRODUCTS — ASYMMETRIC STUDIO LAYOUT + LARGE INTERACTIVE STAGES
   ============================================================ */
.products {
  padding-block: clamp(64px, 7.5vw, 108px);
}

.product {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.product + .product {
  margin-top: clamp(76px, 9vw, 128px);
  padding-top: clamp(64px, 7vw, 104px);
  border-top: 2px dashed var(--ink-14);
}

.product--flip {
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 0.78fr);
}

.product--flip .p-stage {
  order: -1;
}

.p-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.p-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.p-glyph {
  width: 52px;
  height: 52px;
  flex: none;
  border: var(--line-w) solid var(--ink);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sh-sm);
  background: var(--paper);
}

.p-glyph svg {
  width: 28px;
  height: 28px;
}

.p-name {
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
}

.p-headline {
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1.14;
  color: var(--ink);
  max-width: 16ch;
  margin-bottom: 22px;
  text-wrap: balance;
}

.p-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.p-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* ============================================================
   SHARED INTERACTIVE STAGE SHELL
   ============================================================ */
.p-stage {
  min-width: 0;
  width: 100%;
}

.stage-card {
  border: var(--line-w) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--sh);
  overflow: hidden;
  background: var(--paper-hi);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}

.stage-card--dark {
  background: var(--ink);
  color: var(--paper);
}

.stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: var(--line-w) solid var(--ink);
  background: var(--paper-2);
  flex-wrap: wrap;
}

.stage-card--dark .stage-bar {
  background: rgba(247, 243, 234, 0.04);
  border-bottom-color: var(--cream-18);
}

.stage-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.stage-dots {
  display: inline-flex;
  gap: 6px;
  flex: none;
}

.stage-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: block;
}

.stage-card--dark .stage-dots i {
  border-color: transparent;
}

.stage-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-card--dark .stage-title {
  color: var(--cream-80);
}

.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--pill);
  border: 1.5px solid var(--ink);
  background: var(--paper-hi);
  color: var(--ink);
  white-space: nowrap;
}

.stage-badge--ok {
  background: var(--ok-bg);
  color: var(--ok-ink);
  border-color: var(--ok-ink);
}

.stage-card--dark .stage-badge {
  background: rgba(156, 224, 185, 0.14);
  color: var(--ok-on-dark);
  border-color: var(--ok-on-dark);
}

.stage-canvas-box {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.stage-canvas-box canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ============================================================
   DEMO 1 — CLINKX CONVERGENCE CONSOLE (#demo-clinkx)
   ============================================================ */
.stage-canvas-box--clinkx {
  height: 280px;
  background:
    radial-gradient(circle at 84% 50%, rgba(203, 185, 240, 0.14) 0%, transparent 48%),
    var(--ink);
}

.cx-footer {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--cream-18);
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(247, 243, 234, 0.03);
}

.cx-lanes {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.cx-lane {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: var(--pill);
  border: 1.5px solid var(--cream-18);
  background: transparent;
  color: var(--cream-80);
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-press) var(--ease-out);
}

.cx-lane:active {
  transform: scale(0.96);
}

@media (hover: hover) and (pointer: fine) {
  .cx-lane:hover {
    border-color: var(--paper);
    color: var(--paper);
  }
}

.cx-lane.is-active,
.cx-lane[aria-pressed="true"] {
  background: var(--sage);
  color: var(--ink);
  border-color: var(--sage);
}

.cx-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cx-pulse-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--pill);
  border: var(--line-w) solid var(--butter);
  background: var(--butter);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(250, 228, 201, 0.35);
  transition: transform var(--dur-press) var(--ease-out), box-shadow var(--dur-press) var(--ease-out);
}

.cx-pulse-btn:active {
  transform: scale(0.96);
  box-shadow: 1px 1px 0 rgba(250, 228, 201, 0.35);
}

@media (hover: hover) and (pointer: fine) {
  .cx-pulse-btn:hover {
    transform: translate(-1.5px, -1.5px);
    box-shadow: 5px 5px 0 rgba(250, 228, 201, 0.42);
  }
}

.cx-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 7px 14px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--cream-18);
  background: rgba(247, 243, 234, 0.07);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-press) var(--ease-out);
}

.cx-copy-btn .prompt {
  color: var(--butter);
}

.cx-copy-btn .copy-pill {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--pill);
  background: var(--cream-18);
  color: var(--paper);
}

.cx-copy-btn .lbl2,
.cx-copy-btn .ic-check {
  display: none;
}

.cx-copy-btn.copied {
  border-color: var(--ok-on-dark);
  background: rgba(156, 224, 185, 0.14);
}

.cx-copy-btn.copied .copy-pill {
  background: var(--ok-on-dark);
  color: var(--ink);
}

.cx-copy-btn.copied .lbl1,
.cx-copy-btn.copied .ic-copy {
  display: none;
}

.cx-copy-btn.copied .lbl2,
.cx-copy-btn.copied .ic-check {
  display: inline;
}

.cx-copy-btn:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .cx-copy-btn:hover {
    border-color: var(--paper);
    background: rgba(247, 243, 234, 0.13);
  }
}

/* ============================================================
   DEMO 2 — HEDWIG LOCAL MESSAGES FIREWALL (#demo-hedwig)
   ============================================================ */
.hw-conduit {
  position: relative;
  padding: 20px 18px;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(20, 21, 32, 0.06) 1.1px, transparent 1.1px);
  background-size: 18px 18px;
  border-bottom: var(--line-w) solid var(--ink);
}

.hw-endpoints {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.hw-endpoint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  border: var(--line-w) solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--paper-hi);
  box-shadow: var(--sh-xs);
  min-width: 84px;
  text-align: center;
}

.hw-endpoint strong {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

.hw-endpoint span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-60);
}

.hw-track {
  position: relative;
  height: 92px;
  border: 1.5px dashed var(--ink-60);
  border-radius: var(--radius-sm);
  background: rgba(247, 243, 234, 0.72);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hw-shield {
  position: relative;
  z-index: 4;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 12px;
  border: var(--line-w) solid var(--ink);
  border-radius: var(--radius-xs);
  background: var(--blush);
  color: var(--ink);
  box-shadow: var(--sh-xs);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}

.hw-shield.is-pass {
  background: var(--ok-bg);
  transform: scale(1.06);
}

.hw-shield.is-block {
  background: var(--deny-bg);
  transform: scale(0.95);
}

/* Animated envelope packets spawned by js/demos.js inside #hw-track */
.hw-packet {
  z-index: 6;
}

.hw-toggles {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hw-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: var(--line-w) solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--paper);
  cursor: pointer;
  text-align: left;
  box-shadow: var(--sh-xs);
  transition:
    transform var(--dur-press) var(--ease-out),
    box-shadow var(--dur-press) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.hw-toggle:active {
  transform: scale(0.985);
  box-shadow: 0 0 0 var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .hw-toggle:hover {
    transform: translate(-1.5px, -1.5px);
    box-shadow: 4px 4px 0 var(--ink);
  }
}

.hw-toggle[aria-pressed="true"] {
  background: var(--sage-soft);
}

.hw-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hw-toggle-name {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
}

.hw-toggle-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-60);
}

.hw-toggle-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.hw-state-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--pill);
  border: 1.5px solid var(--deny-ink);
  background: var(--deny-bg);
  color: var(--deny-ink);
}

.hw-toggle[aria-pressed="true"] .hw-state-pill {
  border-color: var(--ok-ink);
  background: var(--ok-bg);
  color: var(--ok-ink);
}

.hw-switch {
  width: 40px;
  height: 22px;
  border-radius: var(--pill);
  border: var(--line-w) solid var(--ink);
  background: var(--paper-2);
  position: relative;
  flex: none;
  transition: background-color var(--dur-fast) var(--ease-out);
}

.hw-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform var(--dur-fast) var(--ease-out);
}

.hw-toggle[aria-pressed="true"] .hw-switch {
  background: var(--ok-bg);
}

.hw-toggle[aria-pressed="true"] .hw-switch::after {
  transform: translateX(18px);
}

/* ============================================================
   DEMO 3 — UPORA MANHATTAN ASP CURB MAP (#demo-upora)
   ============================================================ */
.stage-canvas-box--upora {
  height: 270px;
  background: var(--paper);
}

.upora-footer {
  padding: 16px 18px 18px;
  border-top: var(--line-w) solid var(--ink);
  background: var(--butter-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upora-shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.upora-proof-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 9px 11px;
  min-height: 48px;
  border: var(--line-w) solid var(--ink);
  border-radius: var(--radius-xs);
  background: var(--paper-hi);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  box-shadow: var(--sh-xs);
  transition:
    transform var(--dur-press) var(--ease-out),
    box-shadow var(--dur-press) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.upora-proof-btn:active {
  transform: scale(0.97);
  box-shadow: 0 0 0 var(--ink);
}

.upora-proof-btn .shot-time {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-60);
}

.upora-proof-btn .shot-label {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
}

.upora-proof-btn.is-active,
.upora-proof-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 3px 3px 0 var(--butter);
}

.upora-proof-btn.is-active .shot-time,
.upora-proof-btn[aria-pressed="true"] .shot-time {
  color: var(--butter);
}

@media (hover: hover) and (pointer: fine) {
  .upora-proof-btn:hover {
    transform: translate(-1.5px, -1.5px);
    box-shadow: 4px 4px 0 var(--ink);
  }
}

.upora-proof-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: var(--line-w) solid var(--ink);
  border-radius: var(--radius-xs);
  background: var(--paper-hi);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.upora-proof-meta::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok-ink);
  border: 1.5px solid var(--ink);
  flex: none;
}

/* ============================================================
   DEMO 4 — HEMATINE 4-ROLE CLAIM ROOM (#demo-hematine)
   Emil Kowalski clip-path segmented tabs + morphing board
   ============================================================ */
.hm-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--paper);
}

.hm-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: var(--line-w) solid var(--ink);
  border-radius: 12px;
  background: var(--paper-2);
  padding: 0;
  overflow: hidden;
}

.hm-tab {
  position: relative;
  z-index: 1;
  min-height: 44px;
  padding: 10px 6px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform var(--dur-press) var(--ease-out);
}

.hm-tab:active {
  transform: scale(0.97);
}

.hm-tabs-active {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--ink);
  color: var(--paper);
  border-radius: 9px;
  pointer-events: none;
  clip-path: inset(0px 75% 0px 0px round 9px);
  transition: clip-path 260ms var(--ease-in-out);
  will-change: clip-path;
}

.hm-tabs-active span {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  padding: 10px 6px;
}

.hm-stage-view {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 18px;
  border: var(--line-w) solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--paper-hi);
}

.hm-stage-view.hm-morph-in {
  animation: hm-morph 240ms var(--ease-out);
}

@keyframes hm-morph {
  from {
    opacity: 0.72;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hm-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.hm-role-pill {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 800;
  padding: 4px 12px;
  border: var(--line-w) solid var(--ink);
  border-radius: var(--pill);
  color: var(--ink);
}

.hm-role-scope {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-75);
}

.hm-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.hm-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 9px 10px;
  border: 1.5px solid var(--ink-14);
  border-radius: var(--radius-xs);
  background: var(--paper);
}

.hm-step.is-done {
  border-color: var(--ink);
  background: var(--paper-2);
}

.hm-step.is-current {
  border-color: var(--ink);
  background: var(--lav-soft);
  box-shadow: 2px 2px 0 var(--ink);
}

.hm-step-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--paper-hi);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hm-step.is-done .hm-step-dot {
  background: var(--ink);
  color: var(--paper);
}

.hm-step.is-current .hm-step-dot {
  background: var(--grape);
  color: var(--paper);
}

.hm-step-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-60);
  line-height: 1.2;
}

.hm-step.is-done .hm-step-label,
.hm-step.is-current .hm-step-label {
  color: var(--ink);
}

.hm-status-line {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.hm-perms {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.hm-perm {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: var(--pill);
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.hm-doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1.5px solid var(--ink-14);
  font-family: var(--font-mono);
  font-size: 11px;
}

.hm-doc-name {
  font-weight: 600;
  color: var(--ink);
}

.hm-scan-stamp {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--pill);
  border: 1.5px solid var(--ok-ink);
  background: var(--ok-bg);
  color: var(--ok-ink);
  white-space: nowrap;
}

/* ============================================================
   PRINCIPLES — EDITORIAL MANIFESTO LEDGER
   ============================================================ */
.principles {
  background-color: var(--butter);
  background-image: radial-gradient(rgba(20, 21, 32, 0.065) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  border-block: var(--line-w) solid var(--ink);
  padding-block: clamp(64px, 7.5vw, 104px);
}

.principles-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(36px, 4.5vw, 52px);
  flex-wrap: wrap;
}

.principles-head h2 {
  font-size: clamp(34px, 4.4vw, 58px);
}

.pr-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: var(--line-w) solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-hi);
  box-shadow: var(--sh);
  overflow: hidden;
}

.pr-item {
  padding: clamp(26px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-right: var(--line-w) solid var(--ink);
}

.pr-item:last-child {
  border-right: none;
}

.pr-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pr-ic {
  width: 46px;
  height: 46px;
  border: var(--line-w) solid var(--ink);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lav-soft);
}

.pr-item:nth-child(2) .pr-ic {
  background: var(--sage-soft);
}

.pr-item:nth-child(3) .pr-ic {
  background: var(--blush-soft);
}

.pr-idx {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-60);
}

.pr-item h3 {
  font-size: clamp(21px, 2vw, 25px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.pr-item p {
  font-size: 15px;
  color: var(--ink-75);
  line-height: 1.5;
  max-width: 30ch;
}

/* ============================================================
   DARK FINALE + PRODUCT DIRECTORY + FOOTER
   ============================================================ */
.finale {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(72px, 8vw, 112px) clamp(56px, 6vw, 84px);
}

.finale-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 5vw, 76px);
  align-items: center;
  margin-bottom: clamp(56px, 6.5vw, 84px);
}

.finale h2 {
  font-size: clamp(42px, 5.2vw, 74px);
  color: var(--paper);
  margin-bottom: 16px;
}

.finale-line {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--cream-80);
  margin-bottom: 30px;
  max-width: 30ch;
}

.finale-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.mailto-link {
  font-family: var(--font-mono);
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 600;
  color: var(--butter);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: color var(--dur-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .mailto-link:hover {
    color: var(--lav);
  }
}

.finale-art {
  border: var(--line-w) solid var(--cream-80);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  box-shadow: 10px 10px 0 var(--lav);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .finale-art:hover {
    transform: translate(-3px, -3px);
    box-shadow: 13px 13px 0 var(--lav);
  }
}

.finale-art img {
  width: 100%;
  height: auto;
  aspect-ratio: 1376 / 768;
  object-fit: cover;
}

/* Directory Index */
.plist {
  border-top: 1.5px solid var(--cream-18);
}

.pl-row {
  display: grid;
  grid-template-columns: 50px 1fr auto 28px;
  gap: clamp(14px, 3vw, 32px);
  align-items: center;
  padding: 22px 12px;
  border-bottom: 1.5px solid var(--cream-18);
  text-decoration: none;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-press) var(--ease-out);
}

.pl-row:active {
  transform: scale(0.99);
}

.pl-row .g {
  width: 42px;
  height: 42px;
  border: 2px solid var(--cream-80);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.pl-row .g svg {
  width: 22px;
  height: 22px;
}

.pl-row .n {
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.pl-row .d {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-80);
}

.pl-row .arr {
  width: 24px;
  height: 24px;
  justify-self: end;
  transition: transform var(--dur-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .pl-row:hover {
    background: var(--paper);
    color: var(--ink);
  }
  .pl-row:hover .d {
    color: var(--ink-75);
  }
  .pl-row:hover .g {
    border-color: var(--ink);
  }
  .pl-row:hover .arr {
    transform: translate(4px, -4px);
  }
}

/* Footer — Cinematic Engraved Panorama */
.footer {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid rgba(247, 243, 234, 0.14);
  overflow: hidden;
}

.footer-sky {
  position: relative;
  z-index: 2;
  padding-top: clamp(44px, 5vw, 72px);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(0, 1.65fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
  padding-bottom: clamp(34px, 4vw, 52px);
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.footer-brand {
  color: var(--paper);
}

.footer-brand .name {
  font-size: 18px;
  letter-spacing: 0.09em;
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(247, 243, 234, 0.72);
  max-width: 38ch;
}

.footer-mail-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 8px 14px;
  border: 1.5px solid rgba(247, 243, 234, 0.24);
  border-radius: var(--pill);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--butter);
  text-decoration: none;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-press) var(--ease-out);
}

.footer-mail-pill:active {
  transform: scale(0.97);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 56px);
}

.footer-col-title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--paper);
  margin-bottom: 16px;
}

.footer-col-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer-col-list a {
  display: inline-block;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: rgba(247, 243, 234, 0.68);
  transition:
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.footer-col-list a:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .footer-mail-pill:hover {
    border-color: var(--butter);
    background-color: rgba(250, 228, 201, 0.1);
    color: var(--paper);
  }

  .footer-col-list a:hover {
    color: var(--paper);
    transform: translateX(3px);
  }
}

.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 0 8px;
  border-top: 1px solid rgba(247, 243, 234, 0.14);
}

.footer-copy,
.footer-note {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(247, 243, 234, 0.64);
}

.footer-vista {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: clamp(-200px, -13.5vw, -56px);
  pointer-events: none;
  user-select: none;
  line-height: 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 100%);
}

.footer-vista img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center bottom;
}

/* Floating Back-to-Top */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: var(--z-floating);
  width: 50px;
  height: 50px;
  border-radius: var(--pill);
  border: var(--line-w) solid var(--ink);
  background: var(--paper-hi);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sh-sm);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.94);
  transition:
    opacity var(--dur-med) var(--ease-out),
    transform var(--dur-med) var(--ease-out),
    box-shadow var(--dur-press) var(--ease-out);
}

.to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.to-top:active {
  transform: scale(0.95);
  box-shadow: 1px 1px 0 var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .to-top:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--ink);
  }
}

/* ============================================================
   SCROLL REVEAL (BELOW-THE-FOLD ONLY, VISIBLE-DEFAULT SAFE)
   ============================================================ */
.rv {
  opacity: 0.92;
  transform: translateY(14px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}

.rv.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE BREAKPOINTS (1024px / 768px / 390px ZERO OVERFLOW)
   ============================================================ */
@media (max-width: 1023px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .cipher-shell {
    max-width: 520px;
  }

  .chapter-spread {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .product,
  .product--flip {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .product--flip .p-stage {
    order: 0;
  }

  .p-headline {
    max-width: 24ch;
  }

  .pr-ledger {
    grid-template-columns: 1fr;
  }

  .pr-item {
    border-right: none;
    border-bottom: var(--line-w) solid var(--ink);
  }

  .pr-item:last-child {
    border-bottom: none;
  }

  .finale-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 767px) {
  .nav-links,
  .nav-cta .btn {
    display: none;
  }

  .menu-btn {
    display: flex;
  }

  .hero {
    padding: 36px 0 48px;
  }

  .hero h1 {
    font-size: clamp(40px, 11vw, 56px);
  }

  .cipher-stage {
    padding: 14px 12px 12px;
  }

  .cipher-stage-top {
    gap: 8px;
    padding-bottom: 10px;
    margin-bottom: 10px;
  }

  .cipher-stage-top .mono-tag,
  .cipher-hint {
    font-size: 10px;
    letter-spacing: 0.05em;
    white-space: nowrap;
  }

  .cipher-dial-wrap {
    max-height: 360px;
    padding-block: 14px;
  }

  .cipher-node {
    padding: 4px 9px;
    font-size: 10px;
    min-height: 30px;
  }

  .cipher-node--clinkx   { top: 0; right: 0; }
  .cipher-node--hedwig   { bottom: 0; right: 0; }
  .cipher-node--upora    { bottom: 0; left: 0; }
  .cipher-node--hematine { top: 0; left: 0; }

  .cipher-readout {
    flex-wrap: wrap;
    padding: 10px 12px;
  }

  .cipher-readout-desc,
  .cipher-readout-line {
    white-space: normal;
  }

  .chapter-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .stage-canvas-box--clinkx {
    height: 230px;
  }

  .stage-canvas-box--upora {
    height: 225px;
  }

  .hw-endpoints {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hw-endpoint {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }

  .hw-track {
    height: 76px;
  }

  .upora-shots {
    grid-template-columns: 1fr;
  }

  .hm-tab,
  .hm-tabs-active span {
    font-size: 11.5px;
    padding: 8px 2px;
  }

  .hm-stepper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pl-row {
    grid-template-columns: 42px 1fr 24px;
    gap: 14px;
    padding: 18px 8px;
  }

  .pl-row .d {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-bottom: 32px;
  }

  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
  }

  .footer-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px 0 12px;
  }

  .footer-vista {
    margin-top: -12px;
  }

  .footer-vista img {
    min-height: 240px;
    object-position: 36% bottom;
  }

  .to-top {
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 560px) {
  .hm-tab,
  .hm-tabs-active span {
    font-size: 10.75px;
    padding: 9px 4px;
    letter-spacing: -0.015em;
  }
}

/* ============================================================
   GLOBAL PAUSE & REDUCED MOTION
   ============================================================ */
html.paused *,
html.paused *::before,
html.paused *::after {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .mq-track {
    animation: none;
  }

  .rv {
    opacity: 1;
    transform: none;
  }
}
