/* ============================================================
   KESTREL — bunker scroll journey
   Palette + typography verbatim from brand-spec.md
   ============================================================ */

:root {
  --night:        #08070a;
  --cinder:       #15101a;
  --ash:          #2a1f28;
  --parchment:    #f0e8dc;
  --parchment-2:  #e3d9c7;
  --stone:        #a39689;
  --mist:         #6b5e58;
  --cherry:       #a01b3a;
  --cherry-deep:  #7a1029;
  --cherry-glow:  #d83a5e;
  --amber:        #d18b3a;
  --ok-green:     #7ad19a;

  --screen:       #0a0408;

  /* terminal authoring width (design px). Each terminal is laid out at
     this size, then scaled down (k) to glue onto its monitor. */
  --term-w: 480px;
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--night);
  color: var(--parchment-2);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- scroll driver: tall container, sticky stage ---------- */
.journey {
  position: relative;
  /* ~80vh of scroll per monitor across the 10-stop journey */
  height: 820vh;
}

.bunker-viewport {
  position: sticky;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--night);
  perspective: 1200px;
}

.bunker-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 1376px;
  height: 768px;
  transform-origin: 0 0;
  background-image: url('assets/bunker-still.png');
  background-size: 1376px 768px;
  background-repeat: no-repeat;
  will-change: transform;
  transform-style: preserve-3d;
}

/* faint breathing of the room itself (atmospheric life) */
@media (prefers-reduced-motion: no-preference) {
  .bunker-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 50% 42%,
      rgba(216,58,94,0.05), transparent 60%);
    animation: breathe 13s ease-in-out infinite;
    pointer-events: none;
  }
}
@keyframes breathe {
  0%,100% { opacity: 0.4; }
  50%     { opacity: 0.9; }
}

/* a darkening wash so the live terminals read against the photo */
.bunker-stage__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(140% 120% at 50% 55%, transparent 38%, rgba(8,7,10,0.55) 100%),
    linear-gradient(180deg, rgba(8,7,10,0.35), rgba(8,7,10,0.10) 30%, rgba(8,7,10,0.45));
  pointer-events: none;
}

/* ---- a monitor = black rect + tilted terminal -------------- */
.monitor {
  position: absolute;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
  opacity: 0;
  transition: opacity 700ms ease;
}
.monitor.is-active { opacity: 1; }

/* the black rectangle drawn over the photo's monitor */
.monitor__rect {
  position: absolute;
  inset: -28% -16%;
  background: #050205;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.6);
}

.monitor__tilt {
  position: relative;
  transform-origin: center center;
  /* per-monitor rotateY/rotateX set inline; this just holds scale */
}

/* ---- terminal window -------------------------------------- */
.term {
  width: var(--term-w);
  background: rgba(9,4,7,0.95);
  border: 1px solid var(--cherry-deep);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,0.6);
}
.monitor.is-active .term {
  border-width: 2px;
  box-shadow:
    0 0 80px 15px rgba(216,58,94,0.45),
    0 18px 50px rgba(0,0,0,0.6);
}

.term__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 34px;
  padding: 0 14px;
  background: #0a0408;
  border-bottom: 1px solid #1c0c14;
}
.term__dots { display: flex; gap: 7px; }
.term__dot { width: 11px; height: 11px; border-radius: 50%; }
.term__dot--c { background: var(--cherry); }
.term__dot--a { background: var(--amber); }
.term__dot--g { background: var(--ok-green); }
.term__title {
  font-size: 13px;
  color: var(--stone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.term__body {
  padding: 20px 22px 22px;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--parchment-2);
  white-space: pre-wrap;
  background: rgba(9,4,7,0.96);
}
.term__body .cmd-line { margin-bottom: 2px; }
.prompt { color: var(--cherry-glow); }
.cmd    { color: var(--parchment-2); }
.txt    { color: var(--parchment-2); display: block; }
.lead   { color: var(--parchment); }
.note   { color: var(--mist); }
.rule {
  color: var(--ash);
  letter-spacing: 0.04em;
  user-select: none;
}
.meta   { color: var(--mist); letter-spacing: 0.04em; }

/* one terminal line; spaces preserved for column alignment */
.line   { display: block; }
.ok     { color: var(--ok-green); }
.warn   { color: var(--amber); }
.crit   { color: var(--cherry-glow); }
.head   { color: var(--parchment); }
.label  { color: var(--mist); }
.accent { color: var(--cherry-glow); }
.term__body .reco { color: var(--cherry-glow); }
.term__body .findbtn {
  color: var(--cherry-glow);
  border: 1px solid var(--cherry-deep);
  padding: 1px 8px;
  border-radius: 3px;
  display: inline-block;
  margin-top: 2px;
}
.term__body .box { color: var(--cherry); }
.term__body .box .head { color: var(--parchment); }

.spacer { display: block; height: 0.86em; }

/* check-list rows (Monitor 04) — grid keeps the · column aligned */
.chk { display: grid; grid-template-columns: 30px 188px 1fr; align-items: baseline; }
.chk__name { color: var(--parchment-2); }
.chk .note { white-space: normal; }

/* pricing table (Monitor 08) */
.ptab { display: grid; grid-template-columns: 120px 92px 1fr; row-gap: 5px; }
.ptab .h { color: var(--mist); }
.ptab .pname { color: var(--parchment); }
.ptab .pprice { color: var(--cherry-glow); }
.ptab .pfor { color: var(--stone); }
.ptab__div { grid-column: 1 / -1; color: var(--ash); letter-spacing: 0; overflow: hidden; white-space: nowrap; }
.ptab .reco-row .pname,
.ptab .reco-row .pfor { color: var(--parchment); }

/* alert email (Monitor 05) */
.eml__h { display: grid; grid-template-columns: 64px 1fr; }
.eml__h .label { color: var(--mist); }
.eml__h .val { color: var(--parchment-2); }
.eml__h .subj { color: var(--cherry-glow); }

/* keep ascii boxes intact (Monitor 10) */
.nowrap { white-space: pre; overflow: hidden; }

/* Monitor 10's box is also a click target — opens the signup modal. */
.signup-box {
  cursor: pointer;
  transition: filter 200ms ease;
  outline: 0;
}
.signup-box:hover { filter: brightness(1.15); }
.signup-box:focus-visible {
  filter: brightness(1.15);
  box-shadow: 0 0 0 1px var(--cherry-glow);
  border-radius: 3px;
}

/* scanlines on the active terminal only */
.term__scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(216,58,94,0.05) 3px,
    rgba(0,0,0,0) 4px);
  transition: opacity 500ms ease;
}
.term { position: relative; }
.monitor.is-active .term__scan { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .monitor.is-active .term__sweep {
    position: absolute;
    left: 0; right: 0; height: 64px;
    background: linear-gradient(180deg, transparent, rgba(216,58,94,0.07), transparent);
    pointer-events: none;
    animation: sweep 5.5s linear infinite;
  }
}
@keyframes sweep {
  0%   { top: -64px; }
  100% { top: 100%; }
}

/* placeholder body for monitors 02-10 (not yet built) */
.term__pending {
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--mist);
}
.term__pending .prompt { color: var(--cherry-deep); }

/* ============================================================
   STATIC CHROME (outside the bunker): nav + sticky CTA
   ============================================================ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  background: rgba(8,7,10,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--cherry-deep);
}
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__shield { width: 26px; height: 26px; object-fit: contain; display: block; }
.nav__wordmark {
  font-family: 'Share Tech Mono', monospace;
  font-size: 21px;
  line-height: 1;
  color: var(--parchment);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding-top: 1px;
}
.nav__sub {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mist);
  padding-top: 4px;
}
.nav__links { display: flex; align-items: center; gap: 26px; }
.nav__link {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: color 220ms ease;
}
.nav__link:hover { color: var(--parchment); }

/* sticky CTA floating lower-left during the Monitor-01 read */
.cta {
  position: fixed;
  left: 40px;
  bottom: 44px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 600ms ease, transform 600ms ease;
  pointer-events: none;
}
.cta.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.cta__btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--cherry);
  color: var(--parchment);
  border: 1px solid var(--cherry-glow);
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 13px 22px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 200ms ease, box-shadow 200ms ease, transform 120ms ease;
}
.cta__btn:hover {
  background: #b51f43;
  box-shadow: 0 0 36px rgba(216,58,94,0.5);
}
.cta__btn:active { transform: translateY(1px); }
.cta__btn .arr { transition: transform 200ms ease; }
.cta__btn:hover .arr { transform: translateX(4px); }
.cta__micro {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--stone);
  text-transform: lowercase;
}

/* scroll hint at very top of journey */
.hint {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 30;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--stone);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 500ms ease;
}
.hint .bar {
  display: inline-block;
  width: 1px; height: 22px;
  background: linear-gradient(var(--cherry-glow), transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .hint .bar { animation: drop 1.8s ease-in-out infinite; transform-origin: top; }
}
@keyframes drop {
  0%,100% { transform: scaleY(0.4); opacity: 0.5; }
  50%     { transform: scaleY(1); opacity: 1; }
}

/* ---- two-phase intro overlay -----------------------------
   phase 1 ("typing"):   full-screen terminal, alert lines reveal
   phase 2 ("exiting"):  bunker still cross-dissolves IN, terminal
                         shrinks + slides toward Monitor 05
   phase 3 ("done"):     overlay opacity → 0, scroll journey live
   ------------------------------------------------------------ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--night);
  overflow: hidden;
  transition: opacity 900ms ease;
}
.intro--done { opacity: 0; pointer-events: none; }

/* bunker still — hidden in phase 1, fades in during phase 2 */
.intro__bg {
  position: absolute; inset: 0;
  background-image: url('assets/bunker-still.png');
  background-size: cover;
  background-position: center 42%;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1200ms ease, transform 1200ms ease;
}
.intro__bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(140% 120% at 50% 55%, transparent 38%, rgba(8,7,10,0.55) 100%),
    linear-gradient(180deg, rgba(8,7,10,0.35), rgba(8,7,10,0.10) 30%, rgba(8,7,10,0.45));
  pointer-events: none;
}
.intro--exiting .intro__bg,
.intro--done .intro__bg {
  opacity: 0.92;
  transform: scale(1.0);
}

/* terminal wrapper centers the term in phase 1; phase 2 shrinks
   + nudges toward the bunker's Monitor-05 position (top-center). */
.intro__term-wrap {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform 1400ms cubic-bezier(0.55, 0.08, 0.18, 0.92),
              opacity 1100ms ease;
  will-change: transform, opacity;
}
.intro--exiting .intro__term-wrap,
.intro--done .intro__term-wrap {
  transform: translate(0, -18vh) scale(0.16);
  opacity: 0;
}

.intro__term {
  position: relative;
  width: 640px; max-width: 90vw;
  background: rgba(9,4,7,0.97);
  border: 1px solid var(--cherry-deep);
  border-radius: 5px;
  box-shadow:
    0 0 80px 10px rgba(216,58,94,0.35),
    0 18px 60px rgba(0,0,0,0.7);
  overflow: hidden;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.intro__term-bar {
  display: flex; align-items: center; gap: 12px;
  height: 36px; padding: 0 14px;
  background: #0a0408;
  border-bottom: 1px solid #1c0c14;
}
.intro__term-dots { display: flex; gap: 7px; }
.intro__term-dot { width: 11px; height: 11px; border-radius: 50%; }
.intro__term-dot--c { background: var(--cherry); }
.intro__term-dot--a { background: var(--amber); }
.intro__term-dot--g { background: var(--ok-green); }
.intro__term-title {
  font-size: 13px; color: var(--stone);
  letter-spacing: 0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.intro__term-body {
  padding: 22px 26px 26px;
  font-size: 15px;
  line-height: 1.78;
  color: var(--parchment-2);
}
.intro__term-body .label { color: var(--mist); }
.intro__term-body .val   { color: var(--parchment-2); }
.intro__term-body .subj  { color: var(--cherry-glow); }
.intro__term-body .lead  { color: var(--parchment); }
.intro__term-body .findbtn {
  color: var(--cherry-glow);
  border: 1px solid var(--cherry-deep);
  padding: 1px 8px;
  border-radius: 3px;
  display: inline-block;
  margin-top: 2px;
}

/* a thin scanline overlay on the intro terminal, matches the bunker style */
.intro__term-scan {
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px,
    rgba(216,58,94,0.05) 3px, rgba(0,0,0,0) 4px);
  opacity: 0.6;
}

/* per-line stagger — fakes a typed reveal without char-by-char timing */
.intro__line {
  opacity: 0;
  transform: translateX(-6px);
  animation: introLineIn 0.45s ease forwards;
}
@keyframes introLineIn {
  0%   { opacity: 0; transform: translateX(-6px); }
  100% { opacity: 1; transform: translateX(0); }
}
.intro__line.i1  { animation-delay: 0.10s; }
.intro__line.i2  { animation-delay: 0.30s; }
.intro__line.i3  { animation-delay: 0.55s; }
.intro__line.i4  { animation-delay: 0.80s; }
.intro__line.i5  { animation-delay: 0.90s; }
.intro__line.i6  { animation-delay: 1.05s; }
.intro__line.i7  { animation-delay: 1.15s; }
.intro__line.i8  { animation-delay: 1.30s; }
.intro__line.i9  { animation-delay: 1.55s; }
.intro__line.i10 { animation-delay: 1.70s; }
.intro__line.i11 { animation-delay: 1.90s; }

@media (prefers-reduced-motion: reduce) {
  .intro__line { opacity: 1; transform: none; animation: none; }
  .intro__bg   { opacity: 0.92; transform: none; transition: none; }
  .intro__term-wrap { transition: none; }
}

.intro__skip {
  position: absolute;
  right: 22px; bottom: 20px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone);
  background: none; border: 0;
  cursor: pointer;
  font-family: inherit;
  z-index: 2;
}
.intro__skip:hover { color: var(--parchment); }

/* ====================================================================
   INTRO VARIANTS — used by preview.jsx for side-by-side A/B/C/D demos.
   The default rules above are Variant A (zoom-out shrink + bunker fade).
   Variants B/C/D below override phase-2 behavior via an extra class.
   ==================================================================== */

/* Variant A — fix: keep the terminal VISIBLE as it shrinks so it
   visually "becomes" Monitor 05, instead of fading away. */
.intro--variant-A.intro--exiting .intro__term-wrap,
.intro--variant-A.intro--done    .intro__term-wrap {
  transform: translate(0, -22vh) scale(0.10);
  opacity: 1;
  transition: transform 1500ms cubic-bezier(0.55, 0.08, 0.18, 0.92),
              opacity 700ms ease 1100ms;
}
.intro--variant-A.intro--done .intro__term-wrap { opacity: 0; }

/* Variant B — bunker switches on: terminal STAYS put; bunker fades in
   behind it; then terminal dissolves last. */
.intro--variant-B.intro--exiting .intro__term-wrap,
.intro--variant-B.intro--done    .intro__term-wrap {
  transform: none;
  opacity: 0;
  transition: opacity 1000ms ease 700ms;
}
.intro--variant-B.intro--exiting .intro__bg,
.intro--variant-B.intro--done    .intro__bg {
  opacity: 0.92;
  transform: scale(1.0);
  transition: opacity 1100ms ease, transform 1100ms ease;
}

/* Variant C — hard cut: brief black flash, terminal vanishes, bunker
   is just there. Cinematic scene change. */
.intro--variant-C.intro--exiting .intro__term-wrap,
.intro--variant-C.intro--done    .intro__term-wrap {
  transform: none;
  opacity: 0;
  transition: opacity 0ms 220ms;
}
.intro--variant-C.intro--exiting .intro__bg,
.intro--variant-C.intro--done    .intro__bg {
  opacity: 0.92;
  transform: scale(1.0);
  transition: opacity 0ms 220ms;
}
.intro--variant-C.intro--exiting::before {
  content: ""; position: absolute; inset: 0;
  background: var(--night);
  pointer-events: none; z-index: 6;
  animation: introHardCut 480ms ease forwards;
}
@keyframes introHardCut {
  0%   { opacity: 0; }
  25%  { opacity: 1; }
  75%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Variant D — monitor cascade: terminal lands fast at Monitor 05's
   spot, then cherry pings ripple across the other 9 monitor positions. */
.intro--variant-D.intro--exiting .intro__term-wrap,
.intro--variant-D.intro--done    .intro__term-wrap {
  transform: translate(0, -22vh) scale(0.10);
  opacity: 1;
  transition: transform 800ms cubic-bezier(0.55, 0.08, 0.18, 0.92),
              opacity 600ms ease 1500ms;
}
.intro--variant-D.intro--done .intro__term-wrap { opacity: 0; }
.intro--variant-D.intro--exiting .intro__bg,
.intro--variant-D.intro--done    .intro__bg {
  opacity: 0.92;
  transform: scale(1.0);
  transition: opacity 900ms ease 200ms;
}
.intro__cascade {
  position: absolute; inset: 0;
  pointer-events: none; opacity: 0;
}
.intro--variant-D.intro--exiting .intro__cascade,
.intro--variant-D.intro--done    .intro__cascade { opacity: 1; }
.intro__ping {
  position: absolute;
  width: 60px; height: 38px;
  transform: translate(-50%, -50%) scale(0.3);
  border-radius: 3px;
  background: rgba(216,58,94,0.35);
  box-shadow: 0 0 28px 8px rgba(216,58,94,0.55);
  opacity: 0;
}
.intro--variant-D.intro--exiting .intro__ping {
  animation: introPing 800ms ease-out forwards;
}
@keyframes introPing {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  25%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.4); }
}
.intro__ping.p1 { animation-delay: 850ms; }
.intro__ping.p2 { animation-delay: 930ms; }
.intro__ping.p3 { animation-delay: 1010ms; }
.intro__ping.p4 { animation-delay: 1090ms; }
.intro__ping.p5 { animation-delay: 1170ms; }
.intro__ping.p6 { animation-delay: 1250ms; }
.intro__ping.p7 { animation-delay: 1330ms; }
.intro__ping.p8 { animation-delay: 1410ms; }
.intro__ping.p9 { animation-delay: 1490ms; }

/* ====================================================================
   SIGNUP MODAL — "begin a watch" form, posts to Formspree.
   Visual: a centered terminal window matching the bunker's term style.
   ==================================================================== */
.sm-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(8, 7, 10, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: smFade 240ms ease forwards;
}
@keyframes smFade {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

.sm-modal {
  width: 520px; max-width: 100%;
  background: rgba(9, 4, 7, 0.98);
  border: 1px solid var(--cherry-deep);
  border-radius: 5px;
  box-shadow:
    0 0 80px 10px rgba(216, 58, 94, 0.35),
    0 24px 70px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  animation: smRise 260ms cubic-bezier(0.55, 0.08, 0.18, 0.92) forwards;
}
@keyframes smRise {
  0%   { transform: translateY(14px) scale(0.985); opacity: 0; }
  100% { transform: none; opacity: 1; }
}

.sm-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 0 14px;
  background: #0a0408;
  border-bottom: 1px solid #1c0c14;
}
.sm-dots { display: flex; gap: 7px; }
.sm-dot { width: 11px; height: 11px; border-radius: 50%; }
.sm-dot--c { background: var(--cherry); }
.sm-dot--a { background: var(--amber); }
.sm-dot--g { background: var(--ok-green); }
.sm-title {
  flex: 1;
  font-size: 13px;
  color: var(--stone);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sm-close {
  background: none;
  border: 0;
  color: var(--stone);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  padding: 0 4px;
  transition: color 180ms ease;
}
.sm-close:hover { color: var(--parchment); }

.sm-body {
  padding: 22px 26px 26px;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--parchment-2);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sm-line { display: block; }
.sm-line--note { color: var(--mist); font-size: 13.5px; }
.sm-em { color: var(--parchment); }

.sm-field {
  display: flex;
  align-items: stretch;
  gap: 12px;
  border: 1px solid var(--cherry-deep);
  border-radius: 3px;
  background: rgba(15, 7, 12, 0.7);
  transition: border-color 200ms ease;
}
.sm-field:focus-within { border-color: var(--cherry-glow); }
.sm-label {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mist);
  background: rgba(8, 7, 10, 0.6);
  border-right: 1px solid var(--cherry-deep);
  white-space: nowrap;
}
.sm-field input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  font-family: inherit;
  font-size: 14px;
  color: var(--parchment);
  padding: 12px 12px;
  letter-spacing: 0.01em;
}
.sm-field input::placeholder { color: var(--mist); }
.sm-field input:disabled { opacity: 0.55; }

.sm-microcopy {
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--stone);
  margin-top: -2px;
}

.sm-err {
  font-size: 12.5px;
  color: var(--cherry-glow);
  background: rgba(122, 16, 41, 0.18);
  border: 1px solid var(--cherry-deep);
  border-radius: 3px;
  padding: 9px 12px;
  line-height: 1.55;
}

.sm-cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--cherry);
  color: var(--parchment);
  border: 1px solid var(--cherry-glow);
  font-family: inherit;
  font-size: 14.5px;
  letter-spacing: 0.02em;
  padding: 11px 20px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 4px;
  transition: background 200ms ease, box-shadow 200ms ease, transform 120ms ease;
}
.sm-cta:hover {
  background: #b51f43;
  box-shadow: 0 0 36px rgba(216, 58, 94, 0.45);
}
.sm-cta:active { transform: translateY(1px); }
.sm-cta:disabled {
  background: var(--ash);
  border-color: var(--mist);
  color: var(--stone);
  cursor: progress;
  box-shadow: none;
}

.sm-body--done .sm-cta {
  background: transparent;
  color: var(--cherry-glow);
  border-color: var(--cherry-deep);
}
.sm-body--done .sm-cta:hover {
  color: var(--parchment);
  border-color: var(--cherry-glow);
}

@media (max-width: 560px) {
  .sm-modal { width: 100%; }
  .sm-field { flex-direction: column; }
  .sm-label { border-right: 0; border-bottom: 1px solid var(--cherry-deep); padding: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .sm-overlay, .sm-modal { animation: none; }
}

/* operator rack status LED, lower-right of the room */
.led {
  position: fixed;
  right: 18px; bottom: 16px;
  z-index: 35;
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--mist);
}
.led__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok-green);
  box-shadow: 0 0 8px var(--ok-green);
}
@media (prefers-reduced-motion: no-preference) {
  .led__dot { animation: blink 2.4s steps(1) infinite; }
}
@keyframes blink { 0%,82%{opacity:1;} 86%,100%{opacity:0.25;} }

/* ============================================================
   FOOTER — operator status panel after the journey
   ============================================================ */
.footer {
  position: relative;
  z-index: 2;
  background: var(--night);
  border-top: 1px solid var(--cherry-deep);
  padding: 64px 48px 40px;
  color: var(--stone);
}
.footer__status {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--mist);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--ash);
}
.footer__status .led__dot { box-shadow: 0 0 8px var(--ok-green); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding: 44px 0;
}
.footer__brand { display: flex; flex-direction: column; gap: 14px; max-width: 360px; }
.footer__mark { display: flex; align-items: center; gap: 12px; }
.footer__mark img { width: 30px; height: 30px; object-fit: contain; }
.footer__word {
  font-family: 'Share Tech Mono', monospace;
  font-size: 26px; color: var(--parchment); line-height: 1;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.footer__sub {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--mist); padding-top: 5px;
}
.footer__tag {
  font-size: 13px; line-height: 1.7; color: var(--stone);
}
.footer__col h4 {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--mist); margin: 0 0 16px; font-weight: 500;
}
.footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer__col a {
  font-size: 13px; color: var(--stone); text-decoration: none;
  transition: color 200ms ease;
}
.footer__col a:hover { color: var(--parchment); }
.footer__rule {
  border-top: 1px solid var(--ash);
  padding-top: 22px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mist);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
@media (max-width: 760px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer { padding: 48px 24px 32px; }
}
