/* ============================================================
   GET ME SHANE — THE EXCHANGE
   Ink, cream, brass. A private switchboard.
   ============================================================ */

:root {
  --ink: #0d0c0a;
  --ink-2: #131109;
  --ink-3: #1a1712;
  --cream: #ece4d4;
  --cream-60: rgba(236, 228, 212, 0.6);
  --cream-35: rgba(236, 228, 212, 0.35);
  --brass: #c2a05c;
  --brass-bright: #e6c98c;
  --brass-dim: rgba(194, 160, 92, 0.35);
  --line: rgba(236, 228, 212, 0.12);
  --line-soft: rgba(236, 228, 212, 0.07);
  --paper: #ece4d4;
  --paper-ink: #0d0c0a;
  --notice-accent: #8a6c33;
  --serif: "Italiana", serif;
  --body: "Newsreader", georgia, serif;
  --mono: "Spline Sans Mono", ui-monospace, monospace;
  --pad: clamp(1.25rem, 4vw, 4rem);
}

/* Day shift at the exchange — designed, not inverted */
[data-theme="light"] {
  --ink: #f0e9da;
  --ink-2: #e9e0cb;
  --ink-3: #e1d6bc;
  --cream: #1c1710;
  --cream-60: rgba(28, 23, 16, 0.66);
  --cream-35: rgba(28, 23, 16, 0.42);
  --brass: #8a6c33;
  --brass-bright: #74581e;
  --brass-dim: rgba(138, 108, 51, 0.35);
  --line: rgba(28, 23, 16, 0.16);
  --line-soft: rgba(28, 23, 16, 0.09);
  --paper: #171310;
  --paper-ink: #ece4d4;
  --notice-accent: #c2a05c;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  font-weight: 340;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

a, button { touch-action: manipulation; }

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

a { color: inherit; text-decoration: none; }

:focus-visible { outline: 1px solid var(--brass); outline-offset: 4px; }

/* ---------- Grain ---------- */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 90;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

/* ---------- Boot sequence ---------- */
.boot {
  position: fixed; inset: 0; z-index: 120;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.55s ease, visibility 0.55s;
}
.boot.done { opacity: 0; visibility: hidden; }
.boot.skip { display: none; }
.boot-inner {
  display: flex; flex-direction: column; gap: 0.9em;
  font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.3em;
  min-width: min(20rem, 76vw);
}
.boot-line { opacity: 0; animation: bootline 0.4s ease forwards; }
.boot-line.b1 { color: var(--cream); animation-delay: 0.05s; }
.boot-line.b2 { color: var(--cream-35); animation-delay: 0.22s; }
.boot-line.b3 { color: var(--brass); animation-delay: 0.4s; }
@keyframes bootline { to { opacity: 1; } }
.boot-dots { animation: bootdots 0.7s steps(4) infinite; }
@keyframes bootdots { 0% { opacity: 0.2; } 100% { opacity: 1; } }
.boot-bar {
  margin-top: 1.1em;
  height: 1px; background: var(--line);
  overflow: hidden;
}
.boot-bar i {
  display: block; height: 100%;
  background: var(--brass);
  transform-origin: left;
  transform: scaleX(0);
  animation: bootbar 1s cubic-bezier(.5,0,.2,1) 0.32s forwards;
}
@keyframes bootbar { to { transform: scaleX(1); } }

/* ---------- Custom cursor ---------- */
body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
.cursor {
  position: fixed; top: 0; left: 0; z-index: 130;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 99px;
  background: var(--brass-bright);
  pointer-events: none;
  display: none;
  transition: width 0.25s, height 0.25s, margin 0.25s, background 0.25s;
}
body.has-cursor .cursor { display: flex; align-items: center; justify-content: center; }
.cursor span {
  font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.22em;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0; transition: opacity 0.2s;
}
.cursor.grow {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  background: color-mix(in srgb, var(--brass-bright) 24%, transparent);
  backdrop-filter: blur(2px);
}
.cursor.label {
  width: auto; height: 30px;
  margin: -15px 0 0 -8px;
  padding: 0 0.9em;
  background: var(--brass-bright);
}
.cursor.label span { opacity: 1; }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; z-index: 110;
  height: 2px; width: 100%;
  background: var(--brass);
  transform-origin: left;
  transform: scaleX(0);
}

/* ---------- Live ticker ---------- */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--ink-2);
  overflow: hidden;
  padding: 0.85rem 0;
}
.ticker-track {
  display: inline-flex; align-items: baseline; gap: 3.2em;
  white-space: nowrap;
  font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.18em;
  color: var(--cream-60);
  animation: tickerscroll 46s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track .t-dot { color: var(--brass); }
.ticker-track .t-hot { color: var(--brass); }
@keyframes tickerscroll { to { transform: translateX(-50%); } }

/* ---------- Kinetic titles ---------- */
.sect-title .ch {
  display: inline-block;
  transform: translateY(112%);
  transition: transform 0.7s cubic-bezier(.16,1,.3,1);
  transition-delay: calc(var(--i) * 26ms);
}
.sect-title { overflow: hidden; }
.sect-head.in .sect-title .ch { transform: none; }

/* ---------- Finale marquee ---------- */
.finale {
  display: block;
  overflow: hidden;
  border-top: 1px solid var(--line);
  padding: clamp(2rem, 6vh, 4rem) 0;
}
.finale-track {
  display: inline-flex; gap: 0.55em;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: clamp(4.5rem, 13vw, 11rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--cream) 55%, transparent);
  animation: tickerscroll 28s linear infinite;
  will-change: transform;
  transition: color 0.45s;
}
.finale:hover .finale-track {
  color: var(--brass-bright);
  -webkit-text-stroke-color: transparent;
  font-style: italic;
  animation-play-state: paused;
}
.finale-track em { font-style: italic; color: var(--brass); -webkit-text-stroke: 0; }

/* ---------- Theme wipe (View Transitions) ---------- */
::view-transition-old(root), ::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-new(root) {
  clip-path: circle(0 at var(--vt-x, 90%) var(--vt-y, 2rem));
  animation: vtwipe 0.65s ease-in-out forwards;
}
@keyframes vtwipe {
  to { clip-path: circle(150vmax at var(--vt-x, 90%) var(--vt-y, 2rem)); }
}

/* ---------- Hero glow ---------- */
.hero::before {
  content: "";
  position: absolute;
  top: 18%; left: -12%;
  width: 60vw; height: 60vw;
  max-width: 56rem; max-height: 56rem;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brass) 9%, transparent), transparent 65%);
  pointer-events: none;
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.18); opacity: 1; }
}

/* ---------- Top bar ---------- */
.bar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--pad);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--ink) 92%, transparent), transparent);
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.bar-mark { font-weight: 500; color: var(--cream); }
.bar-dot { color: var(--brass); }
.bar-ticker { color: var(--cream-60); display: flex; gap: 0.6em; align-items: center; }
.bar-sep { color: var(--brass-dim); }
.bar-live { color: var(--brass); display: inline-flex; align-items: center; gap: 0.5em; }
.bar-live i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--brass);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--brass-dim); }
  50% { opacity: 0.5; box-shadow: 0 0 0 5px transparent; }
}
.bar-menu {
  font: inherit; letter-spacing: inherit;
  background: none; border: 1px solid var(--line);
  color: var(--cream);
  padding: 0.55em 1.1em;
  border-radius: 99px;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.bar-menu:hover { border-color: var(--brass); color: var(--brass-bright); }
.bar-actions { display: flex; align-items: center; gap: 0.55rem; }
.mode-toggle {
  width: 2.3rem; height: 2.3rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: none;
  color: var(--cream);
  display: grid; place-items: center;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, transform 0.2s;
}
.mode-toggle:hover { border-color: var(--brass); color: var(--brass-bright); }
.mode-toggle:active { transform: scale(0.9); }
.mode-toggle svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.mode-toggle .ic-moon { display: none; }
[data-theme="light"] .mode-toggle .ic-sun { display: none; }
[data-theme="light"] .mode-toggle .ic-moon { display: block; }
.bar-plus { color: var(--brass); display: inline-block; transition: transform 0.35s cubic-bezier(.6,0,.2,1); }
body.menu-open .bar-plus { transform: rotate(45deg); }
body.menu-open .bar-menu { background: var(--cream); color: var(--ink); border-color: var(--cream); }
body.menu-open .bar-menu .bar-plus { color: var(--ink); }

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed; inset: 0; z-index: 70;
  background: color-mix(in srgb, var(--ink) 97%, transparent);
  backdrop-filter: blur(8px);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--pad);
  opacity: 0; visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s;
}
body.menu-open .menu { opacity: 1; visibility: visible; }
.menu-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 6vw, 7rem);
  max-width: 70rem;
  margin: 0 auto;
  width: 100%;
}
.menu-link {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  line-height: 1.18;
  color: var(--cream);
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(.2,.8,.2,1), color 0.3s;
}
.menu-link::before {
  content: attr(data-i);
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--brass);
  vertical-align: super;
  margin-right: 1em;
  letter-spacing: 0.1em;
}
.menu-link:hover { color: var(--brass-bright); font-style: italic; }
body.menu-open .menu-link { opacity: 1; transform: none; }
body.menu-open .menu-link:nth-child(1) { transition-delay: 0.08s; }
body.menu-open .menu-link:nth-child(2) { transition-delay: 0.14s; }
body.menu-open .menu-link:nth-child(3) { transition-delay: 0.2s; }
body.menu-open .menu-link:nth-child(4) { transition-delay: 0.26s; }
body.menu-open .menu-link:nth-child(5) { transition-delay: 0.32s; }
.menu-lines { align-self: center; }
.menu-lines-head {
  display: block;
  font-family: var(--mono); font-size: 0.625rem;
  letter-spacing: 0.2em; color: var(--brass);
  margin-bottom: 1.2em;
  padding-bottom: 0.8em;
  border-bottom: 1px solid var(--line);
}
.menu-ext {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.45em 0;
  font-size: 0.95rem;
  color: var(--cream-60);
  border-bottom: 1px solid var(--line-soft);
  transition: color 0.25s, padding-left 0.25s;
}
.menu-ext:hover { color: var(--brass-bright); padding-left: 0.5em; }
.menu-ext span { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.1em; color: var(--cream-35); }
.menu-foot {
  position: absolute; bottom: var(--pad); left: var(--pad);
  font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.15em; color: var(--cream-35);
}

/* ---------- Patch-through overlay ---------- */
.patch {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.patch.on { opacity: 1; visibility: visible; }
.patch-inner { text-align: center; }
.patch-label {
  display: block;
  font-family: var(--mono); font-size: 0.625rem;
  letter-spacing: 0.35em; color: var(--brass);
  margin-bottom: 1.4em;
}
.patch-name {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  line-height: 1.1;
  color: var(--cream);
}
.patch-dots { display: inline-flex; gap: 0.55em; margin-top: 2em; }
.patch-dots i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brass);
  animation: dotrise 0.9s ease-in-out infinite;
}
.patch-dots i:nth-child(2) { animation-delay: 0.15s; }
.patch-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dotrise {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-6px); }
}

/* ---------- Sections ---------- */
main { position: relative; z-index: 1; }
section { padding: clamp(5rem, 12vh, 9rem) var(--pad); position: relative; }

.sect-head {
  display: flex; align-items: baseline; gap: 1.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.4rem;
  margin-bottom: clamp(2.5rem, 6vh, 4.5rem);
}
.sect-no {
  font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.2em; color: var(--brass);
}
.sect-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1;
  letter-spacing: 0.01em;
}
.sect-note {
  margin-left: auto;
  font-size: 0.95rem; font-style: italic;
  color: var(--cream-60);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto 1fr;   /* title row is the true vertical center */
  position: relative;
  overflow: hidden;
}
.hero-eyebrow { grid-row: 1; align-self: end; }
.hero-title { grid-row: 2; }
.hero-sub { grid-row: 3; align-self: start; }
.hero-dial {
  position: absolute;
  top: 50%; right: -12vw;
  width: clamp(24rem, 46vw, 44rem);
  transform: translateY(-50%);
  opacity: 0.5;
  pointer-events: none;
}
.hero-dial svg { width: 100%; height: auto; will-change: transform; }
.dial-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.dial-ring--in { stroke: var(--brass-dim); stroke-dasharray: 3 7; }
.dial-hub { fill: none; stroke: var(--line); stroke-width: 1; }
.dial-hole { fill: none; stroke: var(--brass-dim); stroke-width: 1; }
.dial-hole-dot { fill: var(--brass); opacity: 0.55; }

/* live dial holes = directory buttons (desktop) */
.dial-hit { fill: transparent; pointer-events: all; }
.dial-node.is-live { cursor: none; }
.dial-node .dial-hole,
.dial-node .dial-hole-dot {
  transition: stroke 0.3s, fill 0.3s, opacity 0.3s, r 0.35s cubic-bezier(.2,.8,.2,1);
}
.dial-node.is-live .dial-hole-dot { opacity: 0.85; }
.dial-node.is-live:hover .dial-hole { stroke: var(--brass-bright); stroke-width: 1.5; r: 27; }
.dial-node.is-live:hover .dial-hole-dot { fill: var(--brass-bright); opacity: 1; r: 3.4; }

/* dial preview card */
.dial-card {
  position: fixed; z-index: 85;
  width: 16rem;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--ink-3), var(--ink-2));
  padding: 1.6rem 1.6rem 1.5rem;
  pointer-events: none;
  opacity: 0; visibility: hidden;
  transform: translateY(8px) scale(0.98);
  transform-origin: center left;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(.2,.8,.2,1), visibility 0.3s;
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.72);
}
.dial-card.on { opacity: 1; visibility: visible; transform: none; }
.dial-card-no {
  font-family: var(--mono); font-size: 0.575rem; letter-spacing: 0.2em;
  color: var(--brass); display: block; margin-bottom: 1.1em;
}
.dial-card-name {
  font-family: var(--serif); font-weight: 400;
  font-size: 1.5rem; line-height: 1.05; margin-bottom: 0.35em;
}
.dial-card-tag {
  font-size: 0.92rem; font-style: italic; color: var(--cream-60);
  margin-bottom: 1.4em;
}
.dial-card-go {
  font-family: var(--mono); font-size: 0.575rem; letter-spacing: 0.22em;
  color: var(--brass-bright);
}
@media (max-width: 760px) { .dial-card { display: none; } }

.hero-eyebrow {
  font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.3em; color: var(--brass);
  margin-bottom: 2.2rem;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 12.5vw, 12rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin-left: -0.04em;
  white-space: nowrap;
}
.hero-title em { font-style: italic; color: var(--brass-bright); }
.hero-line { display: block; overflow: hidden; }
.hero-line > span {
  display: block;
  transform: translateY(110%);
  animation: riseup 1.1s cubic-bezier(.16,1,.3,1) forwards;
  animation-play-state: paused;
}
.hero-line:nth-child(2) > span { animation-delay: 0.12s; }
body.booted .hero-line > span { animation-play-state: running; }
@keyframes riseup { to { transform: translateY(0); } }

.hero-sub {
  margin-top: 3rem;
  display: flex; align-items: flex-end; gap: 3rem; flex-wrap: wrap;
  justify-content: space-between;
  max-width: 62rem;
}
.hero-sub p { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--cream-60); font-style: italic; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.18em;
  padding: 1em 1.9em;
  border-radius: 99px;
  display: inline-flex; align-items: center; gap: 0.6em;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s;
}
.btn-solid { background: var(--cream); color: var(--ink); }
.btn-solid:hover { background: var(--brass-bright); transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--line); color: var(--cream); }
.btn-ghost:hover { border-color: var(--brass); color: var(--brass-bright); transform: translateY(-2px); }
.btn-arrow { color: var(--brass); }

.hero-foot {
  position: absolute;
  left: var(--pad); right: var(--pad);
  bottom: clamp(1.5rem, 4vh, 2.5rem);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.625rem;
  letter-spacing: 0.2em; color: var(--cream-35);
}

/* ---------- Switchboard / Directory ---------- */
.switchboard {
  position: relative;
  display: grid;
  grid-template-columns: 5.5rem 1fr minmax(16rem, 24rem);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.cables {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}
.cable-path {
  fill: none;
  stroke: var(--brass);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 6px rgba(194,160,92,0.45));
}
.cable-plug { fill: var(--brass-bright); }

.operator-rail {
  position: sticky;
  top: 38vh;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  padding-top: 0.4rem;
}
.operator-node { position: relative; width: 18px; height: 18px; }
.operator-core {
  position: absolute; inset: 4px;
  border-radius: 50%;
  background: var(--brass);
}
.operator-pulse {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid var(--brass);
  animation: opulse 2.4s ease-out infinite;
}
@keyframes opulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.6); opacity: 0; }
}
.operator-label {
  font-family: var(--mono); font-size: 0.575rem;
  letter-spacing: 0.3em; color: var(--cream-35);
  writing-mode: vertical-rl;
}

.lines { border-top: 1px solid var(--line); }
.line {
  position: relative;
  display: grid;
  grid-template-columns: 3.2rem 1fr auto auto;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.35s, padding-left 0.35s;
}
.line:hover, .line:focus-visible { background: var(--ink-3); padding-left: 1.6rem; }
.line-no {
  font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.1em; color: var(--brass);
}
.line-name {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.2vw, 2.5rem);
  line-height: 1.05;
  transition: color 0.3s, font-style 0.2s;
}
.line:hover .line-name, .line:focus-visible .line-name { color: var(--brass-bright); font-style: italic; }
.line-tag {
  font-size: 0.9rem; font-style: italic;
  color: var(--cream-60);
}
.line-domain {
  font-family: var(--mono); font-size: 0.625rem;
  letter-spacing: 0.12em; color: var(--cream-35);
  transition: color 0.3s;
}
.line:hover .line-domain { color: var(--brass); }

.line-card {
  position: sticky;
  top: 30vh;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--ink-3), var(--ink-2));
  padding: 2.2rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(.2,.8,.2,1);
  z-index: 3;
}
.line-card.on { opacity: 1; transform: none; }
.line-card-no {
  font-family: var(--mono); font-size: 0.625rem;
  letter-spacing: 0.2em; color: var(--brass);
  display: block; margin-bottom: 1.2em;
}
.line-card-name {
  font-family: var(--serif); font-weight: 400;
  font-size: 1.9rem; line-height: 1.1;
  margin-bottom: 0.6em;
}
.line-card-desc { font-size: 0.98rem; color: var(--cream-60); margin-bottom: 2em; }
.line-card-go {
  font-family: var(--mono); font-size: 0.625rem;
  letter-spacing: 0.22em; color: var(--brass-bright);
}

/* ---------- The Board (bulletin) ---------- */
.bulletin { background: var(--ink-2); }
.notice-rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 1.5rem;
}
.notice {
  position: relative;
  background: var(--paper);
  color: var(--paper-ink);
  padding: 2.5rem 1.8rem 1.7rem;
  display: flex; flex-direction: column;
  min-height: 17rem;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.65);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s;
}
.notice:hover { transform: translateY(-5px) rotate(0deg); box-shadow: 0 28px 50px -20px rgba(0, 0, 0, 0.75); }
.notice:active { transform: scale(0.985); }
@media (hover: hover) and (min-width: 761px) {
  .notice:nth-child(3n+1) { rotate: -0.45deg; }
  .notice:nth-child(3n)   { rotate: 0.4deg; }
}
.notice::before {
  /* the brass pin */
  content: "";
  position: absolute; top: 0.95rem; left: 50%;
  width: 9px; height: 9px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--brass-bright), #8a6c33 70%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
}
.notice-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem;
  font-family: var(--mono); font-size: 0.575rem;
  letter-spacing: 0.18em;
  margin-bottom: 1.1rem;
}
.notice-type { color: var(--notice-accent); font-weight: 500; }
.notice-industry { color: color-mix(in srgb, var(--paper-ink) 45%, transparent); text-align: right; }
.notice-title {
  font-family: var(--serif); font-weight: 400;
  font-size: 1.65rem; line-height: 1.08;
  margin-bottom: 0.55em;
}
.notice-body {
  font-size: 0.95rem; line-height: 1.55;
  color: color-mix(in srgb, var(--paper-ink) 72%, transparent);
  margin-bottom: 1.6rem;
}
.notice-foot {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid color-mix(in srgb, var(--paper-ink) 14%, transparent);
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem;
  font-family: var(--mono); font-size: 0.575rem; letter-spacing: 0.14em;
}
.notice-who { color: color-mix(in srgb, var(--paper-ink) 50%, transparent); }
.notice-go { color: var(--notice-accent); font-weight: 500; white-space: nowrap; }
.bulletin-cta { margin-top: 2.5rem; }

/* ---------- Dispatches ---------- */
.press-list { border-top: 1px solid var(--line); }
.dispatch {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 2rem 0.8rem;
  border-bottom: 1px solid var(--line);
  background: none; border-left: 0; border-right: 0; border-top: 0;
  color: inherit; font: inherit; text-align: left;
  cursor: pointer;
  transition: background 0.35s, padding-left 0.35s;
}
.dispatch:hover { background: var(--ink-3); padding-left: 1.6rem; }
.dispatch:active { background: var(--ink-3); }
.dispatch-meta {
  font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 0.16em; color: var(--brass);
  display: flex; flex-direction: column; gap: 0.5em;
  min-width: 8.5rem;
}
.dispatch-meta .d-date { color: var(--cream-35); }
.dispatch-main { min-width: 0; }
.dispatch-title {
  display: block;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1.05;
  transition: color 0.3s;
}
.dispatch:hover .dispatch-title { color: var(--brass-bright); font-style: italic; }
.dispatch-dek {
  display: block;
  margin-top: 0.45em;
  font-style: italic; font-size: 1rem;
  color: var(--cream-60);
}
.dispatch-read {
  font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 0.18em; color: var(--cream-35);
  white-space: nowrap;
}
.dispatch:hover .dispatch-read { color: var(--brass); }

/* ---------- Reader ---------- */
.reader {
  position: fixed; inset: 0; z-index: 95;
  background: var(--ink);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0; visibility: hidden;
  transform: translateY(4vh);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(.2,.8,.2,1), visibility 0.5s;
}
.reader.on { opacity: 1; visibility: visible; transform: none; }
body.reader-open { overflow: hidden; }
.reader-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem var(--pad);
  padding-top: calc(1rem + env(safe-area-inset-top));
  background: linear-gradient(to bottom, var(--ink) 60%, transparent);
  font-family: var(--mono); font-size: 0.625rem; letter-spacing: 0.2em;
}
.reader-mast { color: var(--brass); }
.reader-close {
  font: inherit; letter-spacing: inherit;
  background: none; border: 1px solid var(--line);
  color: var(--cream);
  padding: 0.55em 1.1em; border-radius: 99px;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}
.reader-close:hover { border-color: var(--brass); color: var(--brass-bright); }
.reader-page {
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 6vh, 4rem) var(--pad) 6rem;
}
.reader-meta {
  font-family: var(--mono); font-size: 0.625rem;
  letter-spacing: 0.2em; color: var(--brass);
  display: flex; gap: 0.7em;
  margin-bottom: 1.6rem;
}
.reader-meta .bar-sep { color: var(--brass-dim); }
.reader-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  line-height: 1.02;
  margin-bottom: 0.4em;
}
.reader-dek {
  font-style: italic;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  color: var(--cream-60);
}
.reader-rule {
  height: 1px; background: var(--line);
  margin: 2.2rem 0;
  position: relative;
}
.reader-rule::after {
  content: "";
  position: absolute; left: 0; top: -1.5px;
  width: 4rem; height: 4px; background: var(--brass);
}
.reader-body p {
  margin-bottom: 1.4em;
  font-size: 1.125rem; line-height: 1.75;
  color: color-mix(in srgb, var(--cream) 88%, transparent);
}
.reader-body p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 3.4em; line-height: 0.8;
  float: left;
  padding: 0.08em 0.12em 0 0;
  color: var(--brass-bright);
}
.reader-body h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: 1.7rem;
  margin: 1.8em 0 0.7em;
  color: var(--cream);
}
.reader-body em { color: var(--brass-bright); }
.reader-foot { margin-top: 3.5rem; }

/* ---------- App tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: none;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 0.55rem 0.4rem calc(0.55rem + env(safe-area-inset-bottom));
}
.tabbar a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 0.32rem;
  font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.22em;
  color: var(--cream-35);
  padding: 0.3rem 0;
  transition: color 0.25s, transform 0.15s;
}
.tabbar a:active { transform: scale(0.92); }
.tabbar svg {
  width: 21px; height: 21px;
  fill: none; stroke: currentColor;
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}
.tabbar a.on { color: var(--brass-bright); }

/* ---------- OS ---------- */
.os { background: var(--ink-2); }
.os-statement {
  font-family: var(--body);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 300;
  line-height: 1.45;
  max-width: 56rem;
  margin-bottom: clamp(3rem, 7vh, 5rem);
}
.os-statement em { color: var(--brass-bright); }
.os-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.os-room {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2rem;
  transition: background 0.35s;
  position: relative;
}
.os-room:hover { background: var(--ink-3); }
.os-room:hover .os-room-n { color: var(--brass-bright); }
.os-room-n {
  font-family: var(--mono); font-size: 0.625rem;
  letter-spacing: 0.2em; color: var(--brass);
  transition: color 0.3s;
}
.os-room-name {
  font-family: var(--serif); font-weight: 400;
  font-size: 1.5rem;
  margin: 0.7em 0 0.45em;
}
.os-room-desc { font-size: 0.92rem; color: var(--cream-60); }
.os-cta { margin-top: 3rem; }

/* ---------- Work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.work-card {
  background: var(--ink);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2.4rem 2rem;
  display: flex; flex-direction: column; gap: 0.4rem;
  min-height: 13rem;
  position: relative;
  overflow: hidden;
  transition: background 0.35s;
}
.work-card::after {
  content: "↗";
  position: absolute; top: 1.4rem; right: 1.6rem;
  font-family: var(--mono);
  color: var(--brass);
  opacity: 0; transform: translate(-6px, 6px);
  transition: opacity 0.3s, transform 0.3s;
}
.work-card:hover { background: var(--ink-3); }
.work-card:hover::after { opacity: 1; transform: none; }
.work-card-i {
  font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 0.2em; color: var(--cream-35);
}
.work-card-name {
  font-family: var(--serif); font-weight: 400;
  font-size: 1.75rem; line-height: 1.1;
  margin-top: auto;
  transition: color 0.3s;
}
.work-card:hover .work-card-name { color: var(--brass-bright); }
.work-card-tag { font-size: 0.9rem; font-style: italic; color: var(--cream-60); }
.work-card-domain {
  font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 0.12em; color: var(--cream-35);
  margin-top: 0.8rem;
}

/* ---------- Operator (about) ---------- */
.operator { background: var(--ink-2); }
.operator-body { max-width: 60rem; }
.operator-lede {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 300;
  line-height: 1.45;
  margin-bottom: 2.5rem;
}
.operator-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  color: var(--cream-60);
  font-size: 1rem;
}
.operator-cols em { color: var(--brass-bright); }
.operator-facts {
  margin-top: 3.5rem;
  display: flex; gap: 2.5rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.625rem;
  letter-spacing: 0.22em; color: var(--brass);
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}

/* ---------- Contact ---------- */
.contact {
  min-height: 70vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
}
.contact-eyebrow {
  font-family: var(--mono); font-size: 0.6875rem;
  letter-spacing: 0.35em; color: var(--brass);
  margin-bottom: 2rem;
}
.contact-mail { display: block; overflow: hidden; }
.contact-word {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2rem, 7.5vw, 6.5rem);
  line-height: 1.1;
  transition: color 0.35s, font-style 0.2s;
}
.contact-mail:hover .contact-word { color: var(--brass-bright); font-style: italic; }
.contact-note {
  margin-top: 2.2rem;
  font-style: italic;
  color: var(--cream-60);
  max-width: 34rem;
}

/* ---------- Footer ---------- */
.foot {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 2rem var(--pad);
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 0.2em; color: var(--cream-35);
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2,.8,.2,1);
}
.reveal.in { opacity: 1; transform: none; }
body:not(.booted) .hero .reveal { opacity: 0; transform: translateY(28px); transition: none; }
body.booted .hero .reveal.in { transition-delay: 0.45s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .hero-line > span { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .switchboard { grid-template-columns: 1fr; }
  .operator-rail, .line-card, .cables { display: none; }
  .line { grid-template-columns: 2.6rem 1fr; grid-template-rows: auto auto; row-gap: 0.3rem; }
  .line-tag { grid-column: 2; }
  .line-domain { grid-column: 2; }
}
@media (max-width: 760px) {
  .bar-ticker { display: none; }
  .sect-head { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .sect-note { margin-left: 0; }
  .menu-cols { grid-template-columns: 1fr; gap: 3rem; }
  .operator-cols { grid-template-columns: 1fr; }
  .hero-dial { right: -55vw; opacity: 0.3; }
  .hero-sub { flex-direction: column; align-items: flex-start; gap: 2rem; }
  .hero-foot { display: none; }

  /* --- app shell --- */
  .tabbar { display: flex; }
  body { padding-bottom: calc(3.6rem + env(safe-area-inset-bottom)); }
  .hero { min-height: calc(100svh - 3.4rem); }
  section { padding-top: 4.5rem; padding-bottom: 4.5rem; }
  .menu { padding-bottom: calc(var(--pad) + 4rem); }

  /* --- the board becomes a swipeable deck --- */
  .notice-rail {
    display: flex;
    gap: 1rem;
    margin: 0 calc(-1 * var(--pad));
    padding: 0.6rem var(--pad) 1.4rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .notice-rail::-webkit-scrollbar { display: none; }
  .notice {
    flex: 0 0 82vw;
    max-width: 21rem;
    scroll-snap-align: center;
    min-height: 16rem;
  }
  .notice:hover { transform: none; }

  /* --- builds become a swipeable deck too --- */
  .work-grid {
    display: flex;
    gap: 1rem;
    border: 0;
    margin: 0 calc(-1 * var(--pad));
    padding: 0.2rem var(--pad) 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .work-grid::-webkit-scrollbar { display: none; }
  .work-card {
    flex: 0 0 74vw;
    max-width: 19rem;
    border: 1px solid var(--line);
    scroll-snap-align: center;
    min-height: 11.5rem;
  }
  .work-card:active { background: var(--ink-3); }

  /* --- dispatches stack --- */
  .dispatch { grid-template-columns: 1fr; gap: 0.55rem; padding: 1.7rem 0.2rem; }
  .dispatch:hover { padding-left: 0.2rem; }
  .dispatch-meta { flex-direction: row; min-width: 0; gap: 1.2em; }
  .dispatch-read { display: none; }

  /* touch feedback on lines */
  .line:active { background: var(--ink-3); }
  .line:active .line-name { color: var(--brass-bright); }
  .btn:active { transform: scale(0.97); }
}
