:root {
  --void: #0a1624;
  --ink: #ede8e3;
  --muted: #9a958c;
  --signal: #ff6a3d;
  --safe: #3d9b7a;
  --warn: #e6b84d;
  --field: #1c120e;
  --fill: #121a26;
  --edge: #2c313c;
  --spine: 5.5rem;
  --serif: "Fraunces", "Iowan Old Style", Palatino, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.45;
}

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

a { color: var(--warn); }

.rail-shell {
  display: grid;
  grid-template-columns: var(--spine) minmax(0, 1fr);
  min-height: 100vh;
}

.spine {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem 0.7rem;
  background: var(--field);
  border-right: 4px solid var(--signal);
}

.spine a {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.spine-mark {
  color: var(--signal) !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.18em !important;
}

main {
  padding: 2.5rem 6vw 4rem;
  max-width: 980px;
}

.kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warn);
  margin: 0 0 0.75rem;
}

.kicker-left { text-align: left; }
.kicker-center { text-align: center; }
.kicker-right { text-align: right; }

h1 {
  font-weight: 680;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 0.92;
  margin: 0 0 1rem;
  max-width: 12ch;
}

h1 span {
  display: block;
  font-weight: 520;
  font-style: italic;
  color: var(--signal);
}

.tagline, .lede {
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.lede-center { margin-inline: auto; text-align: center; }
.lede-right { margin-left: auto; text-align: right; }

.window-frame {
  margin: 2rem 0 0;
  padding: 0.7rem 0.7rem 0.85rem;
  background: var(--fill);
  border: 1px solid var(--edge);
  box-shadow: 12px 16px 0 var(--field);
}

.window-frame img {
  width: 100%;
  height: min(52vw, 420px);
  object-fit: cover;
}

.window-frame figcaption,
.pair figcaption {
  margin-top: 0.55rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.board { margin-top: 5rem; }

.cork {
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.25rem 1rem;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(224, 90, 40, 0.18), transparent 40%),
    var(--field);
}

.note {
  background: var(--ink);
  color: #1c120e;
  padding: 1.1rem 1.15rem 1.2rem;
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.25);
}

.note h2 {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.55rem;
}

.note p { margin: 0; }

.note-ember { transform: rotate(-1.6deg); border-top: 6px solid var(--signal); }
.note-tide { transform: rotate(1.4deg); border-top: 6px solid var(--safe); margin-top: 1.5rem; }
.note-amber { transform: rotate(0.8deg); border-top: 6px solid var(--warn); }
.note-ink {
  transform: rotate(-0.6deg);
  background: #121a26;
  color: var(--ink);
  border-top: 6px solid var(--safe);
}

.note-ink img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  margin-bottom: 0.75rem;
}

.scenes { margin-top: 5rem; }

.pair {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: end;
}

.pair figure { margin: 0; }

.pair img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border: 4px solid var(--edge);
}

.pair figure:last-child { transform: translateY(1.5rem); }
.pair figure:last-child img { border-color: var(--signal); }

.notice { margin-top: 6rem; max-width: 40rem; }

.expand {
  border-bottom: 1px solid var(--edge);
  padding: 0.4rem 0 1rem;
}

.expand summary {
  cursor: pointer;
  font-family: var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--signal);
  list-style: none;
}

.expand summary::-webkit-details-marker { display: none; }

.prose { color: var(--ink); }
.prose p { margin: 0.8rem 0 0; }

.colophon {
  margin-top: 3rem;
  display: flex;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 800px) {
  .rail-shell { grid-template-columns: 1fr; }

  .spine {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
    border-right: 0;
    border-top: 4px solid var(--signal);
    padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  }

  .spine a {
    writing-mode: horizontal-tb;
    transform: none;
  }

  main { padding: 1.5rem 1.15rem 6.5rem; }

  .cork, .pair { grid-template-columns: 1fr; }
  .note-tide, .pair figure:last-child { margin-top: 0; transform: none; }
  .lede-right, .kicker-right { text-align: left; margin-left: 0; }
  h1 { max-width: none; }
}
