:root {
  --paper: #f4efe4;
  --paper-2: #e9e1d2;
  --sheet: #fbf7ee;
  --white: #fffdf8;
  --ink: #1b1714;
  --ink-2: #4a433c;
  --ink-3: #7a7268;
  --line: #d6cdbe;
  --line-2: #c4baa8;
  --sky: #d5e3ed;
  --sky-ink: #2f4d5e;
  --wood: #a56a3a;
  --brick: #b44732;
  --band: #c43b2a;
  --wax: #7a1f1c;
  --gold: #c4a028;
  --navy: #2c5270;
  --moss: #3f6a4c;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 2px 2px 0 var(--ink);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  min-height: 100vh;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: auto;
}
.intro-curtain {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: var(--paper);
  transition: bottom 0.95s cubic-bezier(0.76, 0, 0.24, 1);
}
.intro.is-out .intro-curtain { bottom: 100%; }
.intro-mark {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 28px);
}
.intro-mark img {
  width: min(18vw, 140px);
  height: min(18vw, 140px);
  object-fit: cover;
  border: 1px solid var(--ink);
  opacity: 0;
  filter: blur(36px);
  transform: translateY(48px);
  transition: opacity 0.7s ease, filter 0.7s ease, transform 0.7s ease;
}
.intro-word {
  display: flex;
  gap: 0.04em;
}
.intro-word span {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
  font-size: clamp(42px, calc((100vw - 200px) / 7), 140px);
  letter-spacing: 0.04em;
  line-height: 0.9;
  color: var(--ink);
  opacity: 0;
  filter: blur(36px);
  transform: translateY(48px);
  transition: opacity 0.7s ease, filter 0.7s ease, transform 0.7s ease;
}
.intro-word span:nth-child(1) { transition-delay: 0.08s; }
.intro-word span:nth-child(2) { transition-delay: 0.16s; }
.intro-word span:nth-child(3) { transition-delay: 0.24s; }
.intro-word span:nth-child(4) { transition-delay: 0.32s; }
.intro-word span:nth-child(5) { transition-delay: 0.4s; }
.intro-word span:nth-child(6) { transition-delay: 0.48s; }
.intro.is-in img,
.intro.is-in .intro-word span {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}
.intro.is-out .intro-mark {
  opacity: 0;
  transition: opacity 0.35s ease;
}

@media (max-width: 720px) {
  .intro-mark { flex-direction: column; }
  .intro-mark img { width: 96px; height: 96px; }
}

img { max-width: 100%; display: block; }
button, input, select { font-family: inherit; }
a { color: inherit; }

.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.serif { font-family: "Newsreader", Georgia, serif; }

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.kicker {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Header */
.mast {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--sheet);
  border-bottom: 1px solid var(--ink);
}

.mast-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border: 1px solid var(--ink);
}

.nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  font-size: 14px;
}

.nav a {
  text-decoration: none;
  color: var(--ink-2);
  border-bottom: 1px solid transparent;
}

.nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }



.ca-chip {
  display: none;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  border: 1px solid var(--ink);
  padding: 6px 8px;
  background: var(--white);
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.btn:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow); }
.btn:active { transform: translate(1px, 1px); box-shadow: none; }
.btn[disabled], .btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-band { background: var(--band); color: var(--white); }
.btn-ink { background: var(--ink); color: var(--sheet); }
.btn-sky { background: var(--sky); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  padding: 36px 0 28px;
  align-items: stretch;
}

.hero-copy h1 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 12px 0 16px;
}

.lede {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 46ch;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }

.meta-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--ink);
  background: var(--white);
}

.meta-row div {
  padding: 12px 14px;
  border-right: 1px solid var(--line);
}

.meta-row div:last-child { border-right: none; }
.meta-row dt {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.meta-row dd { font-size: 15px; font-weight: 600; margin-top: 4px; }

.hero-frame {
  border: 1px solid var(--ink);
  background: var(--sky);
  box-shadow: var(--shadow);
  position: relative;
  min-height: 340px;
  overflow: hidden;
}

.hero-frame img,
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 340px;
  display: block;
  background: var(--sky);
}

.hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--sheet);
  border-top: 1px solid var(--ink);
  padding: 8px 12px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--band);
  display: inline-block;
  margin-right: 6px;
  animation: blink 1.4s steps(2, jump-end) infinite;
}

@keyframes blink { 50% { background: var(--ink); } }

/* Ticker */
.wire-strip {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--white);
  overflow: hidden;
  padding: 8px 0;
}

.wire-track {
  display: flex;
  gap: 40px;
  width: max-content;
  animation: marquee 42s linear infinite;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
}

.wire-track span { white-space: nowrap; }
.wire-track b { color: var(--band); font-weight: 600; }

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

/* Sections */
section { padding: 72px 0; }
.section-head { margin-bottom: 28px; max-width: 62ch; }
.section-head h2 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-top: 8px;
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.rule { height: 1px; background: var(--ink); border: 0; }

/* Loop cards */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.step {
  background: var(--white);
  border: 1px solid var(--ink);
  padding: 18px;
  min-height: 210px;
}

.step .num {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--band);
}
.step h3 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  margin: 10px 0 8px;
}
.step p { color: var(--ink-2); font-size: 14px; }

/* Loft board */
.loft-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
}

.panel {
  background: var(--white);
  border: 1px solid var(--ink);
}

.panel-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--ink);
  background: var(--paper-2);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.flock { display: flex; flex-direction: column; }
.bird {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  background: var(--white);
  text-align: left;
  width: 100%;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}

.bird:last-child { border-bottom: none; }
.bird.is-on { background: var(--sky); }
.bird.is-air { opacity: 0.72; }
.bird img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.bird-name { font-weight: 600; font-size: 14px; }
.bird-meta { font-size: 12px; color: var(--ink-3); font-family: "IBM Plex Mono", ui-monospace, monospace; }
.band {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--white);
  background: var(--band);
  border: 1px solid var(--ink);
  padding: 3px 6px;
}
.band.navy { background: var(--navy); }
.band.gold { background: var(--gold); color: var(--ink); }
.band.moss { background: var(--moss); }
.band.wood { background: var(--wood); }

.map-wrap {
  position: relative;
  height: 620px;
  background: var(--paper-2);
  overflow: hidden;
}
#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.map-h-tools { display: flex; gap: 6px; }
.map-h-tools button {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--white);
  border: 1px solid var(--ink);
  padding: 3px 8px;
  cursor: pointer;
}
.map-h-tools button:hover { background: var(--sky); }
.map-h-tools button.is-on { background: var(--band); color: var(--white); }

.follow-tag {
  position: absolute;
  left: 10px;
  bottom: 28px;
  z-index: 2;
  background: var(--sheet);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-sm);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  padding: 6px 8px;
  pointer-events: none;
}

.map-pin {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-sm);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  cursor: pointer;
  white-space: nowrap;
}
.map-pin.loft { background: var(--sheet); cursor: default; }
.map-pin.is-pick { background: var(--band); color: var(--white); }

.map-bird {
  pointer-events: none;
  line-height: 1;
}
.map-bird .emoji {
  display: block;
  font-size: 22px;
  transform-origin: 50% 50%;
  filter: drop-shadow(1px 2px 0 #1b1714);
}
.map-bird.is-lead .emoji {
  font-size: 42px;
  filter: drop-shadow(2px 3px 0 #1b1714);
}

.maplibregl-ctrl-group {
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: var(--shadow-sm);
}
.maplibregl-ctrl-group button {
  background: var(--white);
  border-radius: 0;
}
.maplibregl-ctrl-attrib {
  background: var(--sheet);
  font-size: 10px;
  color: var(--ink-3);
}
.maplibregl-canvas { outline: none; }

.detail { display: flex; flex-direction: column; }
.detail-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.stat {
  border: 1px solid var(--line);
  padding: 8px 10px;
  background: var(--sheet);
}
.stat b { display: block; font-size: 16px; }
.stat span {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.bag-row { display: flex; flex-direction: column; gap: 6px; }
.bag-row input[type="range"] {
  appearance: none;
  height: 8px;
  background: var(--paper-2);
  border: 1px solid var(--ink);
}
.bag-row input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--band);
  border: 1px solid var(--ink);
}

.hint { font-size: 12px; color: var(--ink-3); }

/* Drawer / wire */
.two-col { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 14px; }

.letters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.letter {
  border: 1px solid var(--ink);
  background: var(--sheet);
  padding: 14px;
  cursor: pointer;
  min-height: 150px;
}
.letter:hover { background: var(--white); }
.letter h4 { font-family: "Newsreader", Georgia, serif; font-size: 18px; font-weight: 500; }
.letter p { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.letter .crumb { margin-top: 12px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; color: var(--band); }

.log {
  max-height: 520px;
  overflow: auto;
}
.log-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.log-row time {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-3);
}

/* Story */
.story-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: start;
}

.plate {
  border: 1px solid var(--ink);
  background: var(--white);
  box-shadow: var(--shadow);
}
.plate img { width: 100%; }
.plate figcaption {
  padding: 10px 12px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  border-top: 1px solid var(--ink);
}

.prose p { margin-bottom: 14px; color: var(--ink-2); font-size: 16px; }
.prose p.lead { color: var(--ink); font-size: 18px; }

blockquote {
  border-left: 3px solid var(--band);
  padding: 4px 0 4px 16px;
  font-family: "Newsreader", Georgia, serif;
  font-size: 22px;
  font-style: italic;
  margin: 18px 0;
}

/* Token */
.token-box {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  border: 1px solid var(--ink);
  background: var(--white);
  padding: 22px;
}

.token-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.token-table th {
  text-align: left;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  width: 42%;
}
.token-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.launch-card {
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 18px;
}
.launch-card h3 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  margin: 6px 0 10px;
}

/* Honest */
.honest {
  background: var(--white);
  border: 1px solid var(--ink);
  padding: 8px 0;
}
.honest li {
  list-style: none;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  font-size: 14px;
}
.honest li:last-child { border-bottom: none; }
.honest strong {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* FAQ */
.faq details {
  border: 1px solid var(--ink);
  background: var(--white);
  margin-bottom: 8px;
  padding: 12px 16px;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin-top: 8px; color: var(--ink-2); font-size: 14px; }

/* Footer */
.foot {
  border-top: 1px solid var(--ink);
  background: var(--paper-2);
  padding: 28px 0 40px;
  font-size: 13px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 20px;
}
.foot a { color: var(--ink-2); }
.legal { margin-top: 22px; color: var(--ink-3); font-size: 12px; max-width: 80ch; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgb(244 239 228 / 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 20px;
}
.modal.is-open { display: flex; }
.envelope {
  width: min(520px, 100%);
  background: var(--sheet);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 28px 28px 22px;
  position: relative;
}
.wax {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--wax);
  border: 1px solid var(--ink);
  color: var(--sheet);
  font-family: "Newsreader", Georgia, serif;
  font-size: 18px;
  display: grid;
  place-items: center;
  position: absolute;
  right: 22px;
  top: 22px;
}
.envelope h3 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  margin: 8px 0 12px;
  max-width: 80%;
}
.envelope .body { color: var(--ink-2); font-size: 15px; }
.envelope .pay {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px dashed var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
}

.empty {
  padding: 28px;
  color: var(--ink-3);
  font-size: 14px;
}

.toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  background: var(--ink);
  color: var(--sheet);
  padding: 10px 14px;
  font-size: 13px;
  z-index: 90;
  display: none;
}
.toast.is-on { display: block; }

@media (prefers-reduced-motion: reduce) {
  .wire-track, .live-dot { animation: none; }
  .intro { display: none; }
}

@media (max-width: 980px) {
  .hero, .split, .story-grid, .token-box, .two-col, .foot-grid, .steps {
    grid-template-columns: 1fr;
  }
  .map-wrap { height: 420px; }
  .mast-inner { flex-wrap: wrap; }
  .nav {
    display: flex;
    order: 3;
    width: 100%;
    margin-left: 0;
    padding-bottom: 10px;
    overflow-x: auto;
  }
  .meta-row { grid-template-columns: 1fr 1fr; }
  .meta-row div:nth-child(2) { border-right: none; }
  .letters { grid-template-columns: 1fr; }
  .honest li { grid-template-columns: 1fr; gap: 4px; }
  .ca-chip { display: none; }
}
