:root {
  --void: #07080b;
  --ink: #0e1016;
  --panel: #12151d;
  --line: rgba(255, 236, 210, 0.12);
  --cream: #f3e6d0;
  --mute: #8a8174;
  --lime: #d6ff3f;
  --copper: #e08a3a;
  --paper: #f6edd9;
  --paper-ink: #1c1610;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --bar: 3.75rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--cream);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  overflow-x: hidden;
}

#bg-stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.fx-noise {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* TOPBAR */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--bar);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 clamp(1rem, 3vw, 2rem);
  background: rgba(7, 8, 11, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: "Archivo Black", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--cream);
  text-decoration: none;
}

nav {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
}

nav a {
  color: var(--mute);
  text-decoration: none;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.25s;
}

nav a:hover { color: var(--lime); }

.sound-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--mute);
  font: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.sound-btn[aria-pressed="true"] {
  color: var(--void);
  background: var(--lime);
  border-color: var(--lime);
}

/* HERO */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  padding: calc(var(--bar) + 2rem) clamp(1rem, 4vw, 3rem) 4rem;
  overflow: hidden;
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#hero-rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-monkeys {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 0.5rem;
  padding: calc(var(--bar) + 1rem) 1rem 35vh;
  opacity: 0.35;
  mask-image: linear-gradient(to bottom, black 40%, transparent 95%);
}

.mini-monk {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  gap: 0.2rem;
  animation: bob 1.4s ease-in-out infinite;
}

.mini-monk:nth-child(odd) { animation-delay: 0.2s; }
.mini-monk:nth-child(3n) { animation-delay: 0.55s; }

.mini-monk svg { width: clamp(28px, 4vw, 48px); height: auto; }

.mini-monk .keys {
  font-size: 0.55rem;
  color: var(--lime);
  letter-spacing: 0.05em;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  max-width: 6ch;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 18rem;
}

.logo-hero {
  margin: 0 0 1rem;
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(2.8rem, 10vw, 7rem);
  line-height: 0.88;
  letter-spacing: -0.03em;
  color: var(--cream);
  animation: slam 1s var(--ease) both;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.25rem, 2.8vw, 1.85rem);
  line-height: 1.25;
  color: var(--cream);
  animation: up 0.9s 0.15s var(--ease) both;
}

.hero-sub {
  margin: 0 0 1.75rem;
  color: var(--mute);
  font-size: 0.8rem;
  line-height: 1.6;
  animation: up 0.9s 0.28s var(--ease) both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  animation: up 0.9s 0.4s var(--ease) both;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.9rem 1.2rem;
  background: var(--lime);
  color: var(--void);
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  transition: transform 0.3s var(--ease), background 0.25s;
}

.btn:hover {
  transform: translateY(-3px);
  background: #e8ff7a;
}

.btn-line {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line);
}

.btn-line:hover {
  border-color: var(--copper);
  color: var(--copper);
  background: transparent;
}

.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-hint span {
  display: block;
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(to bottom, var(--lime), transparent);
  animation: drip 1.6s ease-in-out infinite;
}

@keyframes drip {
  0%, 100% { transform: scaleY(0.4); opacity: 0.3; transform-origin: top; }
  50% { transform: scaleY(1); opacity: 1; }
}

@keyframes slam {
  from { opacity: 0; transform: translateY(40px) scale(0.96); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}

@keyframes up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

/* BANDS */
.band {
  position: relative;
  z-index: 1;
  padding: clamp(4rem, 10vw, 7rem) clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

.band-intro {
  max-width: 34rem;
  margin-bottom: 2rem;
}

.tag {
  margin: 0 0 0.6rem;
  color: var(--lime);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
}

.band h2 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.15;
}

.band-note {
  margin: 0.75rem 0 0;
  color: var(--mute);
  font-size: 0.75rem;
  line-height: 1.55;
  max-width: 42ch;
}

/* TICKER */
.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--ink);
  margin: 0 calc(-1 * clamp(1rem, 4vw, 3rem)) 1.5rem;
  padding-block: 0.7rem;
}

.ticker-track {
  display: flex;
  gap: 2rem;
  width: max-content;
  animation: marquee 40s linear infinite;
  font-size: 0.72rem;
  color: var(--mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticker-track b {
  color: var(--copper);
  font-weight: 500;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* HUD */
.hud {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 1.25rem;
}

@media (min-width: 700px) {
  .hud { grid-template-columns: repeat(5, 1fr); }
}

.hud-cell {
  background: var(--panel);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.hud-cell span {
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  color: var(--mute);
}

.hud-cell strong {
  font-family: "Archivo Black", sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
}

/* UNIT SEARCH */
.unit-search {
  margin-bottom: 1rem;
}

.unit-search-label {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 0.45rem;
}

.unit-search-row {
  display: flex;
  align-items: stretch;
  max-width: 28rem;
  border: 1px solid var(--line);
  background: var(--panel);
}

.unit-prefix {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--lime);
  border-right: 1px solid var(--line);
  background: rgba(214, 255, 63, 0.06);
}

#unit-query {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--cream);
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  padding: 0.85rem 0.9rem;
  outline: none;
}

#unit-query::placeholder {
  color: #5a5348;
}

.unit-search-btn,
.unit-clear-btn {
  border: none;
  border-left: 1px solid var(--line);
  background: var(--lime);
  color: var(--void);
  font: inherit;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 1.1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.unit-search-btn:hover {
  background: #e8ff7a;
}

.unit-clear-btn {
  background: transparent;
  color: var(--mute);
}

.unit-clear-btn:hover {
  color: var(--cream);
  background: rgba(255, 236, 210, 0.06);
}

.unit-search-msg {
  margin: 0.5rem 0 0;
  min-height: 1.1em;
  font-size: 0.7rem;
  color: var(--mute);
}

.unit-search-msg.ok { color: var(--lime); }
.unit-search-msg.err { color: var(--copper); }

.unit-spotlight {
  margin-bottom: 1rem;
}

.unit-spotlight[hidden] {
  display: none;
}

.unit-spotlight .station {
  max-width: 22rem;
  border-color: var(--lime);
  box-shadow: 0 0 0 1px rgba(214, 255, 63, 0.25);
  animation: spotlight-in 0.45s var(--ease) both;
}

.unit-spotlight .badge {
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--void);
  background: var(--lime);
  padding: 0.2rem 0.45rem;
  margin-bottom: 0.35rem;
  display: inline-block;
  width: fit-content;
}

.station.found {
  border-color: var(--lime) !important;
  box-shadow: 0 0 0 1px rgba(214, 255, 63, 0.4);
  transform: translateY(-3px);
  z-index: 2;
}

@keyframes spotlight-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* COLONY — endless stream */
.colony-wrap {
  position: relative;
  max-height: 34rem;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--line);
  overscroll-behavior: contain;
}

.colony-stream {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.55rem;
  padding: 0.75rem;
}

.colony-wrap::after {
  content: "∞ STREAMING · NEW UNITS FOREVER";
  position: absolute;
  left: 50%;
  bottom: 0.85rem;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--lime);
  pointer-events: none;
  background: rgba(7, 8, 11, 0.75);
  padding: 0.35rem 0.7rem;
}

.station {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.75rem;
  min-height: 8.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: border-color 0.25s, transform 0.3s var(--ease);
  animation: up 0.45s var(--ease) both;
}

.station:hover {
  border-color: rgba(214, 255, 63, 0.35);
  transform: translateY(-3px);
}

.station-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.station-head svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.station-head .meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.station-head .id {
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: var(--lime);
}

.station-head .role {
  font-size: 0.58rem;
  color: var(--mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station .out {
  flex: 1;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #b7c4a8;
  word-break: break-all;
}

.station .out .c {
  display: inline-block;
  width: 0.45em;
  height: 1em;
  margin-left: 1px;
  background: var(--copper);
  vertical-align: text-bottom;
  animation: blink 0.65s steps(1) infinite;
}

.station .kb {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
}

.station .kb i {
  display: block;
  aspect-ratio: 1;
  background: rgba(255, 236, 210, 0.06);
  border-radius: 1px;
}

.station .kb i.on {
  background: var(--lime);
  animation: keyflash 0.12s linear;
}

@keyframes blink { 50% { opacity: 0; } }
@keyframes keyflash {
  from { transform: scale(0.85); }
  to { transform: scale(1); }
}

/* BOOK */
.book-band {
  background:
    radial-gradient(80% 60% at 70% 40%, rgba(224, 138, 58, 0.08), transparent 60%),
    var(--void);
}

.book-stage {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 960px) {
  .book-stage {
    grid-template-columns: 0.9fr 1.2fr;
    align-items: stretch;
  }
}

.detector {
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 22rem;
}

.detector-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--mute);
}

.detector-top span:last-child {
  margin-left: auto;
  color: var(--lime);
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 rgba(214, 255, 63, 0.5);
  animation: ping 1.4s ease-out infinite;
}

@keyframes ping {
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.detector-feed {
  flex: 1;
  padding: 1rem;
  overflow: hidden;
  font-size: 0.8rem;
  line-height: 1.8;
  word-break: break-word;
  mask-image: linear-gradient(#0000, #000 12%, #000 88%, #0000);
}

.detector-feed .miss { color: #5c564c; }
.detector-feed .hit {
  color: var(--void);
  background: var(--lime);
  padding: 0.05em 0.25em;
  margin: 0 0.1em;
  font-weight: 500;
}

.detector-now {
  border-top: 1px solid var(--line);
  padding: 1rem;
}

.detector-now span {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  color: var(--mute);
  margin-bottom: 0.35rem;
}

.detector-now p {
  margin: 0;
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: 0.08em;
  color: var(--cream);
  min-height: 1.2em;
}

/* TOME */
.tome {
  position: relative;
  min-height: 26rem;
  perspective: 1400px;
}

.tome-cover {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, #3a2416, #1a100c 55%, #0f0a08);
  border: 1px solid rgba(224, 138, 58, 0.35);
  display: grid;
  place-content: center;
  text-align: center;
  gap: 0.75rem;
  transition: opacity 0.6s, transform 0.8s var(--ease);
  z-index: 2;
}

.tome.open .tome-cover {
  opacity: 0;
  pointer-events: none;
  transform: rotateY(-75deg) translateX(-40%);
}

.tome-foil {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  letter-spacing: 0.12em;
  color: var(--copper);
}

.tome-sub {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--mute);
}

.tome-open {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%;
  min-height: 26rem;
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(28, 22, 16, 0.08);
  transform: rotateX(4deg);
  transition: transform 0.6s var(--ease);
}

.tome.open .tome-open {
  transform: none;
}

.page {
  padding: 1.4rem 1.2rem;
  position: relative;
}

.page-left {
  border-right: 1px solid rgba(28, 22, 16, 0.12);
  background:
    linear-gradient(90deg, rgba(0,0,0,0.06), transparent 18px),
    var(--paper);
}

.page-right {
  background:
    linear-gradient(270deg, rgba(0,0,0,0.04), transparent 14px),
    var(--paper);
}

.page-num {
  margin: 0 0 0.75rem;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a7a66;
  text-align: center;
}

.page-text {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  line-height: 1.85;
}

.page-text .w {
  display: inline;
  margin-right: 0.4em;
  animation: ink 0.4s var(--ease) both;
}

.page-text .w.fresh {
  color: #b45309;
}

@keyframes ink {
  from { opacity: 0; filter: blur(4px); transform: translateY(4px); }
  to { opacity: 1; filter: none; transform: none; }
}

/* REBUILD */
.rebuild {
  margin-bottom: 2rem;
  max-width: 40rem;
}

.rebuild-bar {
  height: 4px;
  background: rgba(255, 236, 210, 0.08);
  overflow: hidden;
}

.rebuild-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--copper), var(--lime));
  transition: width 0.35s linear;
}

.rebuild-copy {
  margin: 0.75rem 0 0;
  color: var(--mute);
  font-size: 0.75rem;
}

/* LIBRARY — book spines */
.library {
  display: flex;
  align-items: end;
  gap: 0.55rem;
  min-height: 22rem;
  padding: 1.5rem 0.5rem 0;
  overflow-x: auto;
  border-bottom: 10px solid #2a2118;
  background:
    linear-gradient(to top, rgba(42, 33, 24, 0.35), transparent 40%);
}

.spine {
  position: relative;
  width: clamp(52px, 8vw, 78px);
  height: clamp(220px, 42vh, 340px);
  border: none;
  padding: 1.1rem 0.35rem;
  cursor: pointer;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  letter-spacing: 0.06em;
  color: var(--paper);
  transition: transform 0.35s var(--ease), height 0.35s var(--ease), filter 0.35s;
  overflow: hidden;
}

.spine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), transparent 30%, transparent 70%, rgba(0,0,0,0.25));
  pointer-events: none;
}

.spine .fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--p, 0%);
  background: rgba(214, 255, 63, 0.18);
  transition: height 0.4s;
  transform: rotate(180deg);
  writing-mode: horizontal-tb;
}

.spine .label {
  position: relative;
  z-index: 1;
}

.spine.locked {
  filter: grayscale(0.7) brightness(0.55);
  cursor: default;
}

.spine:not(.locked):hover {
  height: calc(clamp(220px, 42vh, 340px) + 18px);
  transform: rotate(180deg) translateX(-4px);
}

.spine.done {
  box-shadow: 0 0 0 1px rgba(214, 255, 63, 0.35);
}

/* READER */
.reader {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(7, 8, 11, 0.82);
  backdrop-filter: blur(10px);
  animation: fade 0.3s ease both;
}

.reader[hidden] { display: none; }

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reader-x {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cream);
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
}

.reader-sheet {
  width: min(620px, 100%);
  max-height: min(86vh, 860px);
  overflow: auto;
  background: var(--paper);
  color: var(--paper-ink);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  animation: sheet 0.45s var(--ease) both;
}

@keyframes sheet {
  from { opacity: 0; transform: translateY(28px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.reader-kicker {
  margin: 0 0 0.75rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: #8a7a66;
}

#reader-title {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
}

.reader-sub {
  margin: 0.35rem 0 1.5rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  color: #6b5e4e;
}

.reader-body {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.8;
}

.reader-body .speaker {
  margin: 1.2rem 0 0.2rem;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.reader-body .line { margin: 0 0 0.3rem; }
.reader-body .stage {
  margin: 0.8rem 0;
  font-style: italic;
  color: #6b5e4e;
}

.reader-foot {
  margin: 2rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(28, 22, 16, 0.15);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a7a66;
}

.foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 2.5rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--mute);
}

.foot strong {
  font-family: "Archivo Black", sans-serif;
  color: var(--cream);
  letter-spacing: 0.14em;
}

@media (max-width: 640px) {
  nav { display: none; }
  .hero-monkeys { grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(3, 1fr); }
  .tome-open { grid-template-columns: 1fr; }
  .page-left { border-right: none; border-bottom: 1px solid rgba(28, 22, 16, 0.12); }
  .hero-content { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
