/* Letter of Marque — letterofmarque.space
   Maritime lettering over a ship's console: brass and parchment on deep navy,
   with the game's own teal instrument light and hull orange. */

@font-face { font-family: "Pirata One"; src: url("/assets/fonts/PirataOne-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IM Fell English"; src: url("/assets/fonts/IMFellEnglish-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IM Fell English"; src: url("/assets/fonts/IMFellEnglish-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IM Fell English SC"; src: url("/assets/fonts/IMFellEnglishSC-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Michroma"; src: url("/assets/fonts/Michroma-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Share Tech Mono"; src: url("/assets/fonts/ShareTechMono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/Barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/Barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/Barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #070d12;
  --deep: #0b151c;
  --panel: #101e27;
  --panel-hi: #152733;
  --line: #21404b;
  --teal: #62d6c6;
  --teal-dim: #2f8a82;
  --brass: #c9a25a;
  --brass-hi: #f3dca0;
  --brass-lo: #8a6a2f;
  --signal: #e4642f;
  --paper: #eadfc3;
  --paper-shade: #d9c9a3;
  --paper-ink: #2b2115;
  --text: #d3dde0;
  --muted: #8fa1a9;
  --display: "Pirata One", "IM Fell English SC", Georgia, serif;
  --fell: "IM Fell English", Georgia, serif;
  --fell-sc: "IM Fell English SC", "IM Fell English", Georgia, serif;
  --tech: "Michroma", "Share Tech Mono", ui-monospace, monospace;
  --mono: "Share Tech Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: .2em; }
a:hover { color: var(--brass-hi); }
:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.skip { position: absolute; left: -999px; top: 0; background: var(--brass); color: var(--ink); padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: min(1180px, 100% - 3rem); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 2rem); }

/* ---------- navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem clamp(1rem, 3vw, 2.2rem);
  background: linear-gradient(to bottom, rgba(7,13,18,.92), rgba(7,13,18,.62));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(98,214,198,.14);
}
.nav-mark { font: 400 1.7rem/1 var(--display); color: var(--brass-hi); text-decoration: none; letter-spacing: .02em; }
.nav-mark span { font: italic 400 .95rem/1 var(--fell); color: var(--teal); margin: 0 .12em; }
.nav ul { display: flex; gap: clamp(.7rem, 2.2vw, 1.9rem); overflow-x: auto; scrollbar-width: none; }
.nav ul::-webkit-scrollbar { display: none; }
.nav li a {
  font: 400 .7rem/1 var(--tech); letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; white-space: nowrap; padding: .5rem 0; display: block;
}
.nav li a:hover, .nav li a[aria-current="true"] { color: var(--teal); }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(100svh, 62rem);
  display: grid; align-items: center;
  padding: 7rem clamp(1.2rem, 5vw, 5rem) 5rem;
  background:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,.75) 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 68%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 14%, rgba(243,220,160,.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 61% 41%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 73% 82%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 86% 18%, rgba(98,214,198,.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 93% 58%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 86%, rgba(255,255,255,.45) 50%, transparent 51%),
    radial-gradient(120% 90% at 78% 30%, #10303a 0%, transparent 55%),
    radial-gradient(90% 80% at 10% 100%, #24150f 0%, transparent 60%),
    var(--ink);
}
.hero-plate {
  position: absolute; inset: 0; z-index: -2;
  background: url("/assets/img/hero.webp") center / cover no-repeat;
  opacity: .2; filter: saturate(.7) contrast(1.05);
  mask-image: linear-gradient(to bottom, transparent 2%, #000 28%, #000 62%, transparent 98%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(98,214,198,.035) 0 1px, transparent 1px 4px);
}
.rose {
  position: absolute; z-index: -1; color: rgba(201,162,90,.22);
  width: min(86vh, 78vw); aspect-ratio: 1; right: -8%; top: 50%; translate: 0 -50%;
  animation: turn 240s linear infinite;
}
@keyframes turn { to { rotate: 360deg; } }

.hud {
  position: absolute; font: 400 .68rem/1 var(--mono); letter-spacing: .16em; color: var(--teal-dim);
  padding: .55rem .7rem;
}
.hud::before { content: ""; position: absolute; width: 14px; height: 14px; border: 1px solid var(--teal-dim); }
.hud-tl { left: clamp(.8rem, 2.5vw, 2rem); top: 4.6rem; }
.hud-tl::before { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.hud-tr { right: clamp(.8rem, 2.5vw, 2rem); top: 4.6rem; }
.hud-tr::before { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.hud-bl { left: clamp(.8rem, 2.5vw, 2rem); bottom: 1.2rem; }
.hud-bl::before { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.hud-br { right: clamp(.8rem, 2.5vw, 2rem); bottom: 1.2rem; }
.hud-br::before { right: 0; bottom: 0; border-left: 0; border-top: 0; }

.lockup { max-width: 46rem; position: relative; }
.licence {
  font: 400 .72rem/1.4 var(--tech); letter-spacing: .26em; text-transform: uppercase; color: var(--teal);
  display: inline-flex; align-items: center; gap: .9rem; margin-bottom: 1.1rem;
}
.licence::before { content: ""; width: 2.6rem; height: 1px; background: var(--teal); }

.title {
  font: 400 clamp(4.4rem, 15vw, 11.5rem)/.82 var(--display);
  letter-spacing: -.005em; margin: 0 0 1.4rem -.04em;
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .16em;
}
.t-word { position: relative; display: inline-block; color: transparent; }
/* Instrument-light ghost: the same word in teal, slipped behind the brass in scan bands. */
.t-word::before {
  content: attr(data-text); position: absolute; inset: 0;
  color: var(--teal); opacity: .6; translate: .04em .045em;
  clip-path: polygon(0 0, 100% 0, 100% 30%, 0 34%, 0 42%, 100% 38%, 100% 62%, 0 66%, 0 74%, 100% 70%, 100% 100%, 0 100%);
}
.t-word::after {
  content: attr(data-text); position: absolute; inset: 0;
  background: linear-gradient(176deg, #fff3cf 6%, var(--brass-hi) 30%, var(--brass) 55%, var(--brass-lo) 82%, #5d431a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.55)) drop-shadow(0 0 28px rgba(201,162,90,.2));
}
.t-of {
  font: italic 400 .3em/1 var(--fell); color: var(--paper);
  translate: 0 -.42em; padding: 0 .08em;
}
.strap {
  font: 400 clamp(.6rem, 1.3vw, .76rem)/1.6 var(--tech); letter-spacing: .22em; text-transform: uppercase;
  color: var(--paper); margin-bottom: 1.5rem;
}
.strap i { color: var(--signal); font-style: normal; margin: 0 .35em; }
.pitch { font-size: clamp(1.05rem, 1.7vw, 1.3rem); line-height: 1.55; max-width: 34rem; color: var(--text); margin-bottom: 2rem; }

.cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 1.6rem; }
.btn {
  font: 400 .74rem/1 var(--tech); letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  padding: 1.05rem 1.5rem; border: 1px solid; display: inline-block; transition: background .2s, color .2s, border-color .2s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.btn-brass { background: var(--brass); border-color: var(--brass); color: #15100a; }
.btn-brass:hover { background: var(--brass-hi); border-color: var(--brass-hi); color: #15100a; }
.btn-line { border-color: var(--teal-dim); color: var(--teal); background: rgba(98,214,198,.05); }
.btn-line:hover { border-color: var(--teal); color: var(--ink); background: var(--teal); }

.status { font: 400 .74rem/1 var(--mono); letter-spacing: .1em; color: var(--muted); display: flex; align-items: center; gap: .6rem; }
.dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 0 rgba(228,100,47,.6); animation: ping 2.4s ease-out infinite; flex: none; }
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 .6rem rgba(228,100,47,0); } }

/* The Wayfarer sets down, runs out her ramp, and the crew musters at its foot.
   Coordinates are percentages of a 481 by 314 stage; the ship art is 341 by 244. */
.landing {
  position: absolute; z-index: -1; right: clamp(.5rem, 3vw, 3.5rem); bottom: 8%;
  width: min(50vw, 41rem); aspect-ratio: 481 / 314;
}
.landing-shadow {
  position: absolute; left: 33%; top: 50%; width: 64%; height: 30%;
  background: radial-gradient(closest-side, rgba(0,0,0,.6), transparent);
  animation: shadow-in 1s ease-out both;
}
.landing-ship {
  position: absolute; left: 29.1%; top: 0; width: 70.9%; aspect-ratio: 341 / 244;
  filter: drop-shadow(0 18px 16px rgba(0,0,0,.45));
  animation: settle 1s cubic-bezier(.2,.7,.3,1) both;
}
.hull, .ramp img { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
/* The ramp is only visible past the door sill, so it appears to slide out of the hull. */
.ramp { position: absolute; inset: 0; clip-path: polygon(18.2% 64.3%, 30.5% 70.5%, 14.7% 100%, 0 100%, 0 88.5%, 14.7% 60.2%); }
.ramp img { animation: ramp-out .9s ease-in-out 1s both; }
.crew {
  position: absolute; width: 5.4%; height: auto; left: var(--x); top: var(--y); z-index: var(--z, 1);
  transform: translate(-50%, -100%);
  filter: drop-shadow(0 3px 2px rgba(0,0,0,.55));
  animation: disembark 2.1s linear var(--d) both, hop .23s ease-in-out var(--d) 9;
}
.crew-1 { --x: 24.5%; --y: 83.4%; --d: 2s; --z: 2; }
.crew-2 { --x: 14.6%; --y: 78.3%; --d: 2.35s; --z: 1; }
.crew-3 { --x: 31.2%; --y: 94.3%; --d: 2.7s; --z: 4; }
.crew-4 { --x: 6.2%; --y: 89.2%; --d: 3.05s; --z: 3; }
.crew-5 { --x: 20%; --y: 97.5%; --d: 3.4s; --z: 5; }
/* Hold the first frame until the ship is on screen (site.js adds .play). */
.js .landing:not(.play) :is(.landing-shadow, .landing-ship, .ramp img, .crew) { animation-play-state: paused; }
@keyframes settle { from { translate: 0 -11%; } to { translate: 0 0; } }
@keyframes shadow-in { from { opacity: .25; scale: .7; } to { opacity: 1; scale: 1; } }
@keyframes ramp-out { from { translate: 17.3% -28.3%; } to { translate: 0 0; } }
@keyframes disembark {
  0% { left: 45.7%; top: 52.9%; opacity: 0; }
  8% { opacity: 1; }
  45% { left: 33.5%; top: 75.2%; }
  100% { left: var(--x); top: var(--y); opacity: 1; }
}
@keyframes hop { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -9%; rotate: -6deg; } }

/* ---------- bands ---------- */
.band { padding: clamp(4rem, 9vw, 7.5rem) 0; position: relative; }
.band-alt { background: linear-gradient(to bottom, var(--deep), #0d1920); border-block: 1px solid rgba(33,64,75,.55); }
.eyebrow {
  font: 400 .7rem/1 var(--tech); letter-spacing: .28em; text-transform: uppercase; color: var(--teal);
  margin-bottom: 1.2rem; display: flex; align-items: center; gap: .9rem;
}
.eyebrow::after { content: ""; flex: 0 1 6rem; height: 1px; background: linear-gradient(to right, var(--teal-dim), transparent); }
.head {
  font: 400 clamp(2rem, 4.6vw, 3.4rem)/1.08 var(--fell-sc); color: var(--paper);
  max-width: 22ch; margin-bottom: 1.1rem; text-wrap: balance;
}
.head-second { margin-top: clamp(3.5rem, 7vw, 5.5rem); }
.sub { max-width: 44rem; color: var(--muted); font-size: 1.1rem; margin-bottom: 2.6rem; }
.quiet { color: var(--muted); font-size: .95rem; }

/* ---------- the letter ---------- */
.commission { background: radial-gradient(70% 50% at 50% 0%, #142a33 0%, transparent 70%); }
.commission .eyebrow { justify-content: center; }
.commission .eyebrow::after { display: none; }
.letter {
  position: relative; color: var(--paper-ink);
  font: 400 1.22rem/1.62 var(--fell);
  padding: clamp(2rem, 6vw, 4.2rem) clamp(1.4rem, 6vw, 4.6rem) clamp(4.5rem, 9vw, 6rem);
  background:
    radial-gradient(60% 40% at 18% 12%, rgba(255,255,255,.5), transparent 70%),
    radial-gradient(50% 40% at 85% 90%, rgba(132,96,44,.28), transparent 70%),
    radial-gradient(30% 20% at 70% 20%, rgba(132,96,44,.14), transparent 70%),
    linear-gradient(135deg, var(--paper) 0%, #e3d5b2 55%, var(--paper-shade) 100%);
  box-shadow: 0 0 0 1px rgba(90,64,26,.5), 0 0 0 7px var(--paper), 0 0 0 8px rgba(90,64,26,.55), 0 40px 80px -20px rgba(0,0,0,.8);
  rotate: -.35deg;
}
.letter h2 { font: 400 clamp(1.55rem, 3.4vw, 2.3rem)/1.15 var(--fell-sc); margin-bottom: 1.4rem; max-width: 24ch; }
.letter h2 em { font-family: var(--fell); font-style: italic; }
.letter h3 { font: 400 1.35rem/1.2 var(--fell-sc); margin: 0 0 .7rem; letter-spacing: .03em; }
.letter p + p { margin-top: .95rem; }
.letter .lede::first-letter {
  font: 400 4.6em/.72 var(--display); float: left; margin: .09em .1em 0 -.03em; color: #7c2b12;
}
.letter hr { border: 0; height: 1px; margin: 2rem 0 1.7rem; background: linear-gradient(to right, transparent, rgba(90,64,26,.7) 20%, rgba(90,64,26,.7) 80%, transparent); }
.letter .sign { font-style: italic; margin-top: 2rem; }
.seal {
  position: absolute; right: clamp(1.4rem, 6vw, 4rem); bottom: clamp(1.2rem, 3vw, 2rem);
  width: 5.6rem; aspect-ratio: 1; border-radius: 47% 53% 50% 50% / 52% 48% 52% 48%;
  background: radial-gradient(circle at 34% 30%, #e0603a 0%, #a8321a 45%, #6c1a0c 100%);
  box-shadow: inset 0 0 0 .5rem rgba(0,0,0,.14), inset 0 -6px 10px rgba(0,0,0,.35), 0 6px 12px rgba(40,20,8,.5);
  display: grid; place-items: center; rotate: 9deg;
}
.seal span { font: 400 1.9rem/1 var(--display); color: rgba(60,12,4,.75); text-shadow: 0 1px 0 rgba(255,160,120,.35); }
.stamp {
  position: absolute; right: clamp(.8rem, 4vw, 2.6rem); top: clamp(.9rem, 3vw, 2rem);
  font: 400 .62rem/1.5 var(--mono); letter-spacing: .2em; text-transform: uppercase; text-align: center;
  color: rgba(23,104,98,.8); border: 2px solid rgba(23,104,98,.7); padding: .55rem .8rem; rotate: 7deg;
  mask-image: radial-gradient(circle at 30% 40%, #000 55%, rgba(0,0,0,.55) 100%);
}
.stamp b { font-size: 1.15rem; letter-spacing: .3em; }

/* ---------- flags ---------- */
.flags { display: grid; grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr)); gap: 1.2rem; }
.flag {
  --hue: var(--teal);
  background: linear-gradient(to bottom, var(--panel-hi), var(--panel));
  border: 1px solid var(--line); border-top: 3px solid var(--hue);
  padding: 1.7rem 1.5rem 1.5rem; position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}
.flag-te { --hue: var(--brass); }
.flag-eu { --hue: var(--signal); }
.flag-ti { --hue: var(--teal); }
.flag-fp { --hue: #b9434f; }
.flag-kind { font: 400 .64rem/1.5 var(--tech); letter-spacing: .22em; text-transform: uppercase; color: var(--hue); margin-bottom: .8rem; }
.flag h3 { font: 400 1.75rem/1.1 var(--fell-sc); color: var(--paper); margin-bottom: .8rem; }
.flag p { font-size: .98rem; }
.flag dl { margin: 1.2rem 0 0; padding-top: 1rem; border-top: 1px dashed var(--line); font-size: .9rem; }
.flag dt { font: 400 .62rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.flag dd { margin: 0 0 .85rem; color: var(--text); }
.flag dd:last-child { margin-bottom: 0; }

/* ---------- creeds and record ---------- */
#sail .head { max-width: 28ch; }
.creeds { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0; border: 1px solid var(--line); margin: 2.4rem 0 3rem; }
.creed { padding: 1.8rem 1.6rem; border-right: 1px solid var(--line); background: rgba(16,30,39,.5); }
.creed:last-child { border-right: 0; }
.creed h3 { font: 400 2.2rem/1 var(--display); color: var(--brass-hi); margin-bottom: .7rem; letter-spacing: .01em; }
.creed:nth-child(2) h3 { color: var(--teal); }
.creed:nth-child(3) h3 { color: var(--signal); }
.record { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.record h3 { font: 400 1.9rem/1.15 var(--fell-sc); color: var(--paper); margin-bottom: .9rem; }
.record p + p { margin-top: .9rem; }
.tenets li { padding: 1rem 0 1rem 1.6rem; border-bottom: 1px solid var(--line); position: relative; }
.tenets li:first-child { padding-top: 0; }
.tenets li::before { content: "⚓"; position: absolute; left: 0; color: var(--brass); font-size: .9rem; }
.tenets b { color: var(--paper); font-weight: 600; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .9rem; }
.shot {
  appearance: none; border: 1px solid var(--line); background: var(--panel); padding: 0; cursor: zoom-in;
  color: inherit; text-align: left; position: relative; overflow: hidden; font: inherit;
}
.shot-wide { grid-column: span 2; grid-row: span 2; }
.shot img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1100 / 720; transition: scale .5s ease, filter .3s; }
.shot:hover img, .shot:focus-visible img { scale: 1.035; filter: brightness(1.1); }
.shot span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem .9rem .7rem;
  font: 400 .66rem/1.3 var(--tech); letter-spacing: .14em; text-transform: uppercase; color: var(--paper);
  background: linear-gradient(to top, rgba(7,13,18,.94), transparent);
}
.shot::after { content: ""; position: absolute; left: 8px; top: 8px; width: 12px; height: 12px; border: 1px solid var(--teal); border-right: 0; border-bottom: 0; opacity: .8; }

.lightbox {
  border: 1px solid var(--line); background: var(--ink); color: var(--text); padding: 1rem;
  max-width: min(1180px, 96vw); width: 100%;
}
.lightbox::backdrop { background: rgba(3,6,9,.88); backdrop-filter: blur(4px); }
.lightbox img { width: 100%; }
.lightbox p { margin-top: .8rem; font-size: .98rem; color: var(--paper); }
.lightbox form { display: flex; justify-content: flex-end; margin-bottom: .6rem; }
.lightbox-close {
  font: 400 .66rem/1 var(--tech); letter-spacing: .16em; text-transform: uppercase;
  background: none; border: 1px solid var(--teal-dim); color: var(--teal); padding: .6rem .9rem; cursor: pointer;
}
.lightbox-close:hover { background: var(--teal); color: var(--ink); }

/* ---------- chart ---------- */
.chart { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 5vw, 4rem); margin-top: 2.4rem; }
.chart h3 { font: 400 1.7rem/1.15 var(--fell-sc); color: var(--paper); margin-bottom: .8rem; }
.chart table { width: 100%; border-collapse: collapse; margin: 1.6rem 0 1.2rem; font-size: .98rem; }
.chart caption { text-align: left; font: 400 .64rem/1 var(--tech); letter-spacing: .22em; text-transform: uppercase; color: var(--teal); padding-bottom: .8rem; }
.chart th { text-align: left; font: 400 .62rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding: .55rem .6rem .55rem 0; border-bottom: 1px solid var(--teal-dim); }
.chart td { padding: .62rem .6rem .62rem 0; border-bottom: 1px solid var(--line); }
.chart td:first-child { color: var(--paper); font-weight: 500; }
.systems { background: var(--panel); border: 1px solid var(--line); padding: 1.7rem 1.5rem; position: relative; }
.systems::before, .systems::after { content: ""; position: absolute; width: 16px; height: 16px; border: 1px solid var(--teal); }
.systems::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.systems::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.systems p { font-size: .95rem; color: var(--muted); }
.systems ol { margin-top: 1.2rem; counter-reset: sys; }
.systems li {
  counter-increment: sys; display: flex; align-items: baseline; gap: .8rem;
  padding: .5rem 0; border-bottom: 1px dotted var(--line); font: 400 .88rem/1.3 var(--mono); color: var(--text);
}
.systems li::before { content: counter(sys, decimal-leading-zero); color: var(--teal-dim); }
.systems li span { flex: 1; }
.systems li i { font-style: normal; color: var(--muted); }
.systems li.open span { color: var(--brass-hi); }
.systems li.open::after { content: "BERTH"; font-size: .6rem; letter-spacing: .16em; color: var(--ink); background: var(--brass); padding: .2rem .4rem; order: 3; }

/* ---------- armory and bestiary ---------- */
.rack { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.rack figure, .bestiary figure { margin: 0; }
.rack figure {
  background: radial-gradient(80% 70% at 50% 45%, #183340 0%, var(--panel) 70%);
  border: 1px solid var(--line); padding: 1.6rem 1.2rem 1.1rem; display: grid; gap: 1rem; align-content: space-between;
}
.rack img { width: 100%; image-rendering: pixelated; filter: drop-shadow(0 16px 14px rgba(0,0,0,.55)); transition: translate .4s ease; }
.rack figure:hover img { translate: 0 -6px; }
.rack figcaption, .bestiary figcaption { font: 400 .68rem/1.5 var(--tech); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.rack b, .bestiary b { color: var(--brass-hi); font-weight: 400; }
.bestiary { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1.6rem 1rem; align-items: end; }
.bestiary img { image-rendering: pixelated; height: 11rem; width: auto; margin: 0 auto 1rem; object-fit: contain; filter: drop-shadow(0 16px 14px rgba(0,0,0,.6)); }
.bestiary figcaption { text-align: center; font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: .92rem; }
.bestiary b { display: block; font: 400 .68rem/1.5 var(--tech); letter-spacing: .14em; text-transform: uppercase; margin-bottom: .3rem; }

/* ---------- build log ---------- */
#log .head { max-width: 26ch; }
.logs { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1.4rem; margin-top: 2.4rem; }
.logbook { border: 1px solid var(--line); background: var(--panel); padding: 1.8rem 1.6rem; }
.logbook h3 { font: 400 .8rem/1 var(--tech); letter-spacing: .2em; text-transform: uppercase; color: var(--paper); display: flex; align-items: center; gap: .7rem; margin-bottom: 1.3rem; }
.dot-on { background: var(--teal); animation: none; box-shadow: 0 0 10px var(--teal); }
.dot-ahead { background: none; border: 1px solid var(--brass); animation: none; }
.logbook li { padding: .55rem 0 .55rem 1.5rem; border-bottom: 1px solid rgba(33,64,75,.6); position: relative; font-size: .98rem; }
.logbook li::before { content: "›"; position: absolute; left: .2rem; color: var(--teal); font-family: var(--mono); }
.logbook-ahead { background: transparent; border-style: dashed; }
.logbook-ahead li::before { content: "·"; color: var(--brass); font-size: 1.4rem; line-height: 1; top: .5rem; }
.logbook .quiet { margin-top: 1.2rem; }

/* ---------- footer ---------- */
.foot { padding: 3.5rem 0 4rem; border-top: 1px solid var(--line); text-align: center; background: var(--ink); }
.foot-in { display: grid; gap: .6rem; justify-items: center; }
.foot-title { font: 400 2.6rem/1 var(--display); color: var(--brass); }
.foot-title span { font: italic 400 .45em/1 var(--fell); color: var(--teal); }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; translate: 0 18px; transition: opacity .7s ease, translate .7s ease; }
.js .reveal.in { opacity: 1; translate: 0 0; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .landing { position: relative; right: auto; bottom: auto; width: min(100%, 30rem); margin: 2.5rem auto 0; }
  .hero { padding-bottom: 4rem; }
  .rose { right: -40%; opacity: .7; }
  .hud-tr, .hud-br { display: none; }
  .record, .chart { grid-template-columns: 1fr; }
  .creed { border-right: 0; border-bottom: 1px solid var(--line); }
  .creed:last-child { border-bottom: 0; }
  .shot-wide { grid-column: span 1; grid-row: span 1; }
  .letter { rotate: 0deg; font-size: 1.1rem; padding-bottom: 8rem; }
  .stamp { position: static; display: inline-block; margin-bottom: 1.4rem; }
}
@media (max-width: 520px) {
  .nav ul li:nth-child(n+5) { display: none; }
  .hud { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rose, .dot, .landing-shadow, .landing-ship, .ramp img, .crew { animation: none; }
  .js .reveal { opacity: 1; translate: none; transition: none; }
  .shot img, .rack img { transition: none; }
}
