/* Ordova landing page v2 styles */

:root {
  --ink: #1a1611;
  --ink-soft: #221d16;
  --ink-deep: #14110d;
  --ink-line: rgba(236, 228, 212, 0.16);
  --cream-on-ink: #ece4d2;
  --cream-dim: rgba(236, 228, 212, 0.6);
  --paper: #f3edde;
  --paper-deep: #ece4cf;
  --manila: #ddc99e;
  --ink-on-paper: #241f17;
  --ink-dim: rgba(36, 31, 23, 0.62);
  --rule: rgba(36, 31, 23, 0.16);
  --line-mid: rgba(36, 31, 23, 0.4);
  --amber: #b9750c;
  --amber-bright: #e3a13a;
  --oxide: #8e3d28;
  --oxide-bright: #c2603f;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", Helvetica, sans-serif;
  --mono: "Spline Sans Mono", "SF Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-padding-top: 72px; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ink-on-paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin: 0; }

a { color: inherit; }

::selection { background: rgba(185, 117, 12, 0.28); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
}

/* ---------- identity marks ---------- */

.monogram {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  flex: none;
}

.monogram::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 9px;
  background: var(--amber-bright);
}

.cursor {
  display: inline-block;
  width: 0.45ch;
  height: 0.74em;
  background: var(--amber-bright);
  margin-left: 0.14em;
  transform: translateY(0.04em);
}

@media (prefers-reduced-motion: no-preference) {
  .cursor { animation: blink 1.2s step-end infinite; }
}

@keyframes blink {
  0%, 54% { opacity: 1; }
  55%, 100% { opacity: 0; }
}

/* ---------- reveal utility ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.21, 1), transform 0.9s cubic-bezier(0.22, 0.61, 0.21, 1);
  transition-delay: var(--rd, 0ms);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- first-run band ---------- */

.first-run {
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 13px 64px;
  background: var(--ink-soft);
  border-bottom: 1px solid var(--ink-line);
  color: var(--cream-dim);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

.first-run.is-active { display: flex; }

.first-run.is-dismissing { opacity: 0; }

.first-run.is-dismissed { display: none; }

.first-run-link {
  color: var(--amber-bright);
  text-decoration: none;
  border-bottom: 1px solid rgba(227, 161, 58, 0.4);
  padding-bottom: 1px;
  white-space: nowrap;
  transition: border-color 0.25s ease;
}

.first-run-link:hover { border-color: var(--amber-bright); }

.first-run-dismiss {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  appearance: none;
  background: none;
  border: none;
  color: var(--cream-dim);
  font-size: 0.85rem;
  line-height: 1;
  padding: 8px;
  cursor: pointer;
  transition: color 0.25s ease;
}

.first-run-dismiss:hover { color: var(--cream-on-ink); }

/* ---------- sticky header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 clamp(20px, 4vw, 48px);
  height: 60px;
  background: rgba(26, 22, 17, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ink-line);
  color: var(--cream-on-ink);
  transform: translateY(-100%);
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.21, 1);
}

.site-header.is-on { transform: translateY(0); }

.header-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.header-word {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
}

.header-word .cursor {
  width: 0.4ch;
  height: 0.68em;
}

.header-nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
}

.header-nav a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream-dim);
  transition: color 0.25s ease;
}

.header-nav a:hover { color: var(--cream-on-ink); }

@media (max-width: 640px) {
  .header-nav { gap: 16px; }
  .header-nav a { font-size: 0.66rem; letter-spacing: 0.1em; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--ink);
  color: var(--cream-on-ink);
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 120px clamp(24px, 5vw, 64px);
}

.hero-name {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(2.7rem, 8.4vw, 7.4rem);
  line-height: 1;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.hero-name .cursor {
  width: 0.42ch;
  height: 0.76em;
  margin-left: 0.16em;
}

.hero-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.3;
  margin-top: clamp(22px, 3vw, 36px);
  max-width: 24ch;
}

.hero-support {
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
  line-height: 1.7;
  color: var(--cream-dim);
  max-width: 52ch;
  margin-top: clamp(20px, 2.6vw, 30px);
  text-wrap: pretty;
}

.hero-rule {
  width: 64px;
  height: 1px;
  background: var(--amber);
  margin-top: clamp(28px, 3.4vw, 44px);
}

/* hero schematic */

.hero-plan {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: clamp(-120px, -4vw, -24px);
  transform: translateY(-50%);
  width: min(54vw, 760px);
  height: auto;
  opacity: 0.9;
}

.hero-plan .wall {
  fill: none;
  stroke: rgba(227, 161, 58, 0.34);
  stroke-width: 1.5;
}

.hero-plan .wall-faint {
  fill: none;
  stroke: rgba(236, 228, 212, 0.14);
  stroke-width: 1;
}

.hero-plan .door {
  fill: none;
  stroke: rgba(236, 228, 212, 0.22);
  stroke-width: 1;
}

.hero-plan .door-closed {
  fill: none;
  stroke: rgba(236, 228, 212, 0.3);
  stroke-width: 1.5;
}

.hero-plan .route {
  fill: none;
  stroke: rgba(227, 161, 58, 0.3);
  stroke-width: 1;
  stroke-dasharray: 3 6;
}

.hero-plan .plan-label {
  font-family: var(--serif);
  font-size: 26px;
  fill: rgba(236, 228, 212, 0.4);
}

.hero-plan .plan-label.sm { font-size: 17px; fill: rgba(236, 228, 212, 0.28); }

.hero-plan .tick {
  stroke: rgba(236, 228, 212, 0.2);
  stroke-width: 1;
}

.hero-plan .node { fill: var(--amber-bright); }

.hero-plan .pulse-ring {
  fill: none;
  stroke: var(--amber-bright);
  stroke-width: 1;
  opacity: 0;
}

.js .hero-plan .route,
.js .hero-plan .tick,
.js .hero-plan .plan-label,
.js .hero-plan .node { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .js .hero-plan .draw {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 2.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: var(--dd, 0s);
  }

  .js .hero-plan .plan-label,
  .js .hero-plan .route,
  .js .hero-plan .tick,
  .js .hero-plan .node {
    opacity: 0;
    animation: plan-fade 1.4s ease forwards;
    animation-delay: var(--dd, 2.6s);
  }

  .hero-plan .route { animation: march 16s linear infinite; }

  .hero-plan .pulse-ring { animation: pulse-ring 3.6s cubic-bezier(0.2, 0.6, 0.4, 1) infinite; }
  .hero-plan .pulse-ring.ring-2 { animation-delay: 1.8s; }

  .hero-plan .node {
    animation: plan-fade 1.4s ease forwards, breathe 3.6s ease-in-out 4s infinite;
    animation-delay: var(--dd, 2.6s), 4s;
  }
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes plan-fade { to { opacity: 1; } }
@keyframes march { to { stroke-dashoffset: -180; } }
@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@keyframes pulse-ring {
  0% { r: 6px; opacity: 0.7; }
  100% { r: 52px; opacity: 0; }
}

.hero-cue {
  position: absolute;
  z-index: 2;
  left: clamp(24px, 5vw, 64px);
  bottom: 0;
  width: 1px;
  height: 84px;
  background: linear-gradient(to bottom, transparent, var(--amber));
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-cue::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--ink);
    animation: cue-drip 3.2s cubic-bezier(0.6, 0, 0.3, 1) infinite;
  }
}

@keyframes cue-drip {
  0% { transform: translateY(0); }
  60%, 100% { transform: translateY(100%); }
}

@media (max-width: 880px) {
  .hero-plan {
    width: 120vw;
    right: -30vw;
    opacity: 0.32;
  }
  .hero-tagline { max-width: 20ch; }
}

/* ---------- philosophy ---------- */

.philosophy {
  background: var(--paper);
  padding: clamp(120px, 20vh, 220px) clamp(24px, 5vw, 64px);
}

.philosophy-inner {
  width: min(880px, 100%);
  margin: 0 auto;
}

.philosophy blockquote {
  margin: clamp(36px, 5vh, 56px) 0 0 0;
  position: relative;
}

.philosophy blockquote::before {
  content: "\201C";
  position: absolute;
  top: -0.12em;
  left: -0.55em;
  font-family: var(--serif);
  font-size: clamp(3.4rem, 6.8vw, 6rem);
  line-height: 1;
  color: var(--amber);
  opacity: 0.55;
}

@media (max-width: 1100px) {
  .philosophy blockquote { padding-top: clamp(2.4rem, 4.5vw, 3.2rem); }
  .philosophy blockquote::before {
    top: -0.16em;
    left: -0.04em;
  }
}

.philosophy-text {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(1.65rem, 3.2vw, 2.85rem);
  line-height: 1.42;
  letter-spacing: 0.002em;
  text-wrap: pretty;
}

.rule-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.rule-row::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.rule-row.on-ink::after { background: var(--ink-line); }

/* ---------- drift barrier ---------- */

.barrier {
  background: var(--ink);
  color: var(--cream-on-ink);
  padding: clamp(110px, 16vh, 190px) clamp(24px, 5vw, 64px);
}

.barrier-inner {
  width: min(880px, 100%);
  margin: 0 auto;
}

.barrier-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 4.6vw, 3.7rem);
  line-height: 1.1;
  margin-top: clamp(28px, 4vh, 44px);
}

.barrier-line {
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
  line-height: 1.7;
  color: var(--cream-dim);
  max-width: 54ch;
  margin-top: 18px;
  text-wrap: pretty;
}

.terminal {
  margin-top: clamp(44px, 7vh, 70px);
  width: min(760px, 100%);
  border: 1px solid var(--ink-line);
  background: var(--ink-deep);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.terminal-chrome {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  background: var(--ink-soft);
  border-bottom: 1px solid var(--ink-line);
}

.terminal-dots {
  display: flex;
  gap: 7px;
}

.terminal-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(236, 228, 212, 0.14);
}

.terminal-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.terminal-live {
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber-bright);
}

@media (prefers-reduced-motion: no-preference) {
  .terminal-live { animation: breathe 2.8s ease-in-out infinite; }
}

.terminal-slot {
  position: relative;
  height: clamp(300px, 44vw, 420px);
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(45deg, rgba(236, 228, 212, 0.025) 0 1px, transparent 1px 14px);
}

.terminal-slot-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(236, 228, 212, 0.3);
}

/* ---------- rooms ---------- */

.rooms-intro {
  background: var(--ink);
  color: var(--cream-on-ink);
  padding: clamp(70px, 10vh, 110px) clamp(24px, 5vw, 64px);
}

.rooms-intro-inner {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.room {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 -28px 60px rgba(15, 12, 8, 0.28);
}

.room-inner {
  position: relative;
  z-index: 2;
  width: min(1020px, 90vw);
  text-align: center;
  padding: clamp(90px, 12vh, 130px) 0;
}

.room-decor {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(240px, 52vh, 460px);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

.room-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.room-name {
  font-weight: 500;
  line-height: 1;
  margin-top: 30px;
}

.room-desc {
  margin-top: 16px;
  font-size: 0.95rem;
}

.room-enter {
  display: inline-block;
  margin-top: clamp(36px, 5vh, 54px);
}

.exhibit {
  margin-top: clamp(44px, 7vh, 72px);
  text-align: left;
}

.exhibit-caption {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-align: center;
}

.exhibit-body { margin-top: clamp(26px, 4vh, 40px); }

/* ---- canon ---- */

.room-canon {
  background: var(--paper);
  color: var(--ink-on-paper);
}

.room-canon .room-decor {
  font-family: var(--serif);
  color: rgba(36, 31, 23, 0.05);
}

.room-canon .room-eyebrow { color: var(--ink-dim); }

.room-canon .room-name {
  font-family: var(--serif);
  font-size: clamp(3.2rem, 7vw, 5.6rem);
}

.room-canon .room-desc {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-dim);
}

.room-canon .room-rule {
  width: 120px;
  margin: 30px auto 0;
  border-top: 1px solid var(--ink-on-paper);
  border-bottom: 1px solid var(--ink-on-paper);
  height: 4px;
}

.enter-canon {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-on-paper);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.3s ease, letter-spacing 0.4s cubic-bezier(0.22, 0.61, 0.21, 1);
}

.enter-canon:hover {
  border-color: var(--amber);
  letter-spacing: 0.38em;
}

/* canon exhibit: pipeline */

.pipeline {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 0.9fr) 1fr minmax(120px, 0.9fr) 1fr;
  gap: 0 14px;
  align-items: stretch;
}

.pipe-doc {
  position: relative;
  background: rgba(255, 252, 244, 0.8);
  border: 1px solid var(--line-mid);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.pipe-doc::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 14px;
  background: rgba(36, 31, 23, 0.12);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.pipe-doc-kind {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

.pipe-doc-desc {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--ink-on-paper);
  text-wrap: pretty;
}

.pipe-arrow {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 44px 4px 0;
}

.arrow-line {
  position: relative;
  width: 100%;
  height: 1px;
  background: var(--line-mid);
}

.arrow-line::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -3.5px;
  border-left: 7px solid var(--line-mid);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.pipe-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-dim);
  text-align: center;
  text-wrap: pretty;
}

.pipe-chip {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border: 1px dashed var(--line-mid);
  padding: 4px 9px;
  background: var(--paper);
  white-space: nowrap;
}

.pipe-chip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 12px;
  background: var(--line-mid);
}

.pipe-return {
  margin-top: 6px;
  text-align: center;
}

.pipe-return svg {
  display: block;
  width: 92%;
  margin: 0 auto;
  height: 58px;
  overflow: visible;
}

.pipe-return path {
  fill: none;
  stroke: rgba(36, 31, 23, 0.45);
  stroke-dasharray: 4 6;
}

.pipe-return-label {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--ink-dim);
}

@media (max-width: 860px) {
  .pipeline { grid-template-columns: 1fr; gap: 0; }
  .pipe-arrow { padding: 14px 0; gap: 8px; }
  .pipe-chip {
    position: static;
    transform: none;
    margin-bottom: 4px;
  }
  .pipe-chip::after { display: none; }
  .arrow-line {
    width: 1px;
    height: 44px;
    background: var(--line-mid);
  }
  .arrow-line::after {
    right: auto;
    top: auto;
    left: -3.5px;
    bottom: -1px;
    border-top: 7px solid var(--line-mid);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: none;
  }
  .pipe-return svg { display: none; }
  .pipe-return-label::before { content: "\21BA\00A0\00A0"; font-style: normal; }
}

/* ---- executor ---- */

.room-executor {
  background:
    repeating-linear-gradient(0deg, rgba(36, 31, 23, 0.05) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(36, 31, 23, 0.05) 0 1px, transparent 1px 28px),
    var(--paper-deep);
  color: var(--ink-on-paper);
}

.room-executor .room-decor {
  font-family: var(--mono);
  color: rgba(36, 31, 23, 0.05);
}

.room-executor .room-inner {
  border: 1px solid rgba(36, 31, 23, 0.35);
  padding: clamp(56px, 8vh, 84px) clamp(20px, 4vw, 56px);
  background: rgba(243, 237, 222, 0.6);
}

.room-executor .corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--amber);
  border-style: solid;
  border-width: 0;
}

.room-executor .corner.tl { top: -7px; left: -7px; border-top-width: 2px; border-left-width: 2px; }
.room-executor .corner.tr { top: -7px; right: -7px; border-top-width: 2px; border-right-width: 2px; }
.room-executor .corner.bl { bottom: -7px; left: -7px; border-bottom-width: 2px; border-left-width: 2px; }
.room-executor .corner.br { bottom: -7px; right: -7px; border-bottom-width: 2px; border-right-width: 2px; }

.room-executor .room-eyebrow { color: var(--amber); }

.room-executor .room-name {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(2.3rem, 5.6vw, 4.4rem);
  letter-spacing: 0.04em;
}

.room-executor .room-desc {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-dim);
}

.live-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  margin-right: 14px;
  vertical-align: 0.45em;
}

@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: breathe 2.4s ease-in-out infinite; }
}

.enter-executor {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-on-paper);
  border: 1px solid rgba(36, 31, 23, 0.45);
  padding: 14px 34px;
  background: transparent;
  transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.21, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.enter-executor:hover {
  transform: translateY(-3px);
  border-color: var(--amber);
  box-shadow: 0 12px 24px -12px rgba(26, 22, 17, 0.45);
}

.enter-executor:active {
  transform: translateY(0);
  box-shadow: none;
}

/* executor exhibit: tiers */

.tiers-note {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  text-align: center;
}

.tiers-wrap {
  position: relative;
  padding-left: 34px;
}

.tiers-axis {
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: rgba(36, 31, 23, 0.35);
}

.tiers-axis::after {
  content: "";
  position: absolute;
  top: -1px;
  left: -3.5px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 7px solid rgba(36, 31, 23, 0.5);
}

.tiers {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.tier {
  border: 1px solid var(--line-mid);
  background: rgba(250, 246, 236, 0.75);
  padding: 16px 24px;
  text-align: left;
  display: grid;
  grid-template-columns: 84px 130px 1fr;
  gap: 20px;
  align-items: baseline;
}

.tier-3 { width: 84%; }
.tier-2 { width: 92%; }
.tier-1 { width: 100%; }

.tier-tag {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  white-space: nowrap;
}

.tier-name {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tier-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-dim);
  text-wrap: pretty;
}

@media (max-width: 760px) {
  .tiers-wrap { padding-left: 0; }
  .tiers-axis { display: none; }
  .tier-3, .tier-2, .tier-1 { width: 100%; }
  .tier {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px 18px;
  }
}

/* ---- archive ---- */

.room-archive {
  background: var(--manila);
  color: var(--ink-on-paper);
}

.room-archive .room-decor {
  font-family: var(--mono);
  color: rgba(36, 31, 23, 0.06);
}

.room-archive .room-eyebrow { color: rgba(36, 31, 23, 0.55); }

.room-archive .room-name {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(2.1rem, 5.2vw, 4rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-indent: 0.22em;
}

.room-archive .room-desc {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: rgba(36, 31, 23, 0.55);
}

.room-archive .room-rule {
  width: min(420px, 70vw);
  margin: 28px auto 0;
  border-top: 1px dashed rgba(36, 31, 23, 0.4);
}

.enter-archive {
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink-on-paper);
  padding: 10px 16px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.enter-archive:hover {
  background: var(--ink);
  color: var(--manila);
}

/* archive exhibit: frontmatter markers */

.fm {
  width: min(820px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(36, 31, 23, 0.35);
  background: rgba(255, 250, 235, 0.45);
  padding: 22px 28px;
}

.fm-delim {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: rgba(36, 31, 23, 0.4);
  letter-spacing: 0.1em;
}

.fm-row {
  display: grid;
  grid-template-columns: minmax(150px, max-content) 1fr 46%;
  gap: 16px;
  align-items: baseline;
  padding: 9px 0;
}

.fm-key {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-on-paper);
}

.fm-leader {
  border-bottom: 1px dotted rgba(36, 31, 23, 0.4);
  transform: translateY(-4px);
}

.fm-desc {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--ink-dim);
  text-wrap: pretty;
}

@media (max-width: 720px) {
  .fm { padding: 18px 18px; }
  .fm-row {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 10px 0;
  }
  .fm-leader { display: none; }
}

/* ---- sealed rooms ---- */

.room-sealed {
  background: var(--ink);
  color: var(--cream-on-ink);
}

.room-sealed .room-inner { width: min(900px, 90vw); }

.sealed-doors {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 330px));
  gap: clamp(24px, 4vw, 56px);
  justify-content: center;
  margin-top: clamp(40px, 6vh, 64px);
}

.sealed-door {
  position: relative;
  border: 1px dashed rgba(236, 228, 212, 0.26);
  background: rgba(236, 228, 212, 0.02);
  padding: clamp(48px, 7vh, 72px) 28px clamp(72px, 9vh, 96px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.sealed-door .room-eyebrow { color: var(--cream-dim); }

.sealed-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  line-height: 1;
  margin-top: 10px;
  color: var(--cream-on-ink);
  opacity: 0.85;
}

.sealed-desc {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--cream-dim);
}

.stamp {
  position: absolute;
  bottom: 26px;
  left: 50%;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--oxide-bright);
  border: 2px solid currentColor;
  padding: 7px 12px 7px 16px;
  transform: translateX(-50%) rotate(-6deg);
  opacity: 0.9;
}

@media (prefers-reduced-motion: no-preference) {
  .js .sealed-door .stamp {
    opacity: 0;
    transform: translateX(-50%) rotate(-6deg) scale(1.7);
  }
  .js .sealed-door.is-in .stamp {
    animation: stamp-in 0.42s cubic-bezier(0.2, 1.1, 0.45, 1) 0.6s forwards;
  }
}

@keyframes stamp-in {
  0% { opacity: 0; transform: translateX(-50%) rotate(-6deg) scale(1.7); }
  72% { opacity: 1; transform: translateX(-50%) rotate(-6deg) scale(0.96); }
  100% { opacity: 0.9; transform: translateX(-50%) rotate(-6deg) scale(1); }
}

@media (max-width: 640px) {
  .sealed-doors { grid-template-columns: minmax(0, 330px); }
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--cream-on-ink);
  padding: clamp(100px, 16vh, 170px) clamp(24px, 5vw, 64px);
  text-align: center;
  position: relative;
  z-index: 3;
}

.footer-line {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
}

.footer-link {
  color: var(--amber-bright);
  text-decoration: none;
  border-bottom: 1px solid rgba(227, 161, 58, 0.4);
  padding-bottom: 2px;
  transition: border-color 0.25s ease;
}

.footer-link:hover { border-color: var(--amber-bright); }

.footer-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 56px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-dim);
  white-space: nowrap;
}

.mark-square {
  width: 12px;
  height: 12px;
  border: 1px solid var(--cream-dim);
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .site-header,
  .first-run { transition: none; }
  .hero-plan .pulse-ring { opacity: 0.25; r: 26px; }
  .card-arrow,
  .enter-canon,
  .enter-executor,
  .enter-archive { transition: none; }
}

/* ---------- drift-gate terminal replay (fills the embed slot) ---------- */

.terminal-slot.has-replay {
  display: block;
  place-items: initial;
  padding: 16px 22px 18px;
  background: none;
  text-align: left;
  font-family: var(--mono);
  font-size: clamp(0.62rem, 1.35vw, 0.74rem);
  line-height: 1.72;
  color: var(--cream-on-ink);
  overflow: hidden;
}

.r-ln {
  opacity: 0;
  transform: translateY(4px);
}

.r-ln.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.34s ease, transform 0.34s ease;
}

.r-gap { height: 0.7em; }

.r-indent { display: block; padding-left: 1.5em; }

.r-dim { color: var(--cream-dim); }

.r-amber { color: var(--amber-bright); }

.r-b { font-weight: 500; color: #f5efe1; }

.r-ok { color: var(--cream-on-ink); }

.r-wrong {
  color: var(--amber-bright);
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.r-ln.is-in .r-wrong.lit { opacity: 1; }

.r-halt {
  display: inline-block;
  margin-top: 5px;
  padding: 5px 12px;
  border: 1px solid rgba(194, 96, 63, 0.6);
  border-radius: 5px;
  color: var(--oxide-bright);
  font-weight: 500;
  background: rgba(142, 61, 40, 0.14);
  opacity: 0;
  transform: scale(1.05);
}

.r-ln.is-in .r-halt {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.3s ease, transform 0.42s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.r-cursor {
  display: inline-block;
  width: 0.45ch;
  height: 0.74em;
  background: var(--cream-on-ink);
  vertical-align: -1px;
}

@media (prefers-reduced-motion: no-preference) {
  .r-cursor { animation: blink 1.2s step-end infinite; }
}

@media (prefers-reduced-motion: reduce) {
  .r-ln,
  .r-ln.is-in { opacity: 1; transform: none; transition: none; }
  .r-wrong,
  .r-ln.is-in .r-wrong { opacity: 1; transition: none; }
  .r-halt,
  .r-ln.is-in .r-halt { opacity: 1; transform: none; transition: none; }
}

/* ---------- barrier anatomy: the halt, read room by room ---------- */

.barrier-anatomy {
  max-width: 760px;
  margin: 26px auto 0;
}

.anatomy-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin: 0 0 14px;
  text-align: center;
}

.anatomy-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.anatomy-cell {
  display: block;
  padding: 14px 16px 16px;
  border: 1px solid var(--ink-line);
  text-decoration: none;
  transition: border-color 0.25s ease;
}

.anatomy-cell:hover { border-color: rgba(227, 161, 58, 0.55); }

.anatomy-kicker {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber-bright);
}

.anatomy-text {
  margin: 9px 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.65;
  color: var(--cream-dim);
}

@media (max-width: 720px) {
  .anatomy-row { grid-template-columns: 1fr; }
}

/* ---------- room relation lines: how each room joins the circuit ---------- */

.room-relation {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.6;
  letter-spacing: 0.04em;
  max-width: 380px;
  opacity: 0.8;
}
