:root {
  --raven: #121014;
  --oak: #1e1915;
  --oak-2: #3a322b;
  --iron: #2b2b2e;
  --granite: #5b6470;
  --linen: #d9cdb0;
  --bone: #e8e0cc;
  --oat: #a39a86;
  --gold: #b08d4a;
  --crimson: #7a1420;
  --oxblood: #9b2a2e;
  --moss: #5e7044;
  --straw: #b9a46a;
  --ash: #4a4744;
  --sea-0: #07090c;
  --sea-1: #101820;
  --sea-2: #1a2c38;
  --line: rgba(176, 141, 74, 0.45);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --display: "Cinzel", "Times New Roman", serif;
  --sans: "Alegreya Sans", "Avenir Next", "Segoe UI", sans-serif;
  --measure: 72rem;
  --pad: clamp(1.25rem, 4vw, 4rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(91, 100, 112, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(122, 20, 32, 0.16), transparent 55%),
    var(--raven);
  color: var(--bone);
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.55;
  font-weight: 500;
}

body.gate {
  min-height: 100vh;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

::selection {
  background: var(--crimson);
  color: var(--bone);
}

.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.14;
  z-index: 8;
  mix-blend-mode: overlay;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--gold);
  color: var(--raven);
  padding: 0.5rem 0.8rem;
  z-index: 20;
}

.skip:focus {
  top: 1rem;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--pad);
  background: rgba(18, 16, 20, 0.55);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(10px);
}

.nav.is-scrolled {
  border-bottom-color: rgba(176, 141, 74, 0.28);
  background: rgba(18, 16, 20, 0.88);
}

.wordmark {
  font-family: var(--display);
  letter-spacing: 0.22em;
  text-decoration: none;
  font-size: 0.78rem;
  color: var(--linen);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  align-items: center;
  justify-content: flex-end;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--oat);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--gold);
}

.nav-links a.nav-enter {
  color: var(--bone);
  border: 1px solid var(--crimson);
  padding: 0.35rem 0.7rem;
}

.nav-links a.nav-enter:hover {
  background: var(--crimson);
  color: var(--bone);
}

.hero {
  min-height: calc(100vh - 4.2rem);
  display: grid;
  align-items: center;
  padding: 4.5rem var(--pad) 16rem;
  position: relative;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 46rem;
}

.kicker,
.dossier-kicker,
.door-kicker,
.fleet-kicker {
  font-family: var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 0.82rem;
  margin: 0 0 0.8rem;
}

h1,
h2,
h3 {
  font-weight: 500;
  line-height: 0.95;
  margin: 0;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(3.1rem, 9vw, 6.6rem);
  letter-spacing: 0.14em;
  font-weight: 500;
  line-height: 0.9;
}

.lede {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  color: var(--linen);
  max-width: 38rem;
  margin: 1.4rem 0 0;
}

.lede em {
  font-style: italic;
  color: var(--bone);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.3rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone);
  background: transparent;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--crimson);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--oxblood);
  border-color: var(--gold);
  transform: scale(1.02);
}

.btn-ghost {
  border-color: var(--oak-2);
  color: var(--linen);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--gold);
  transform: scale(1.02);
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible,
.isle:focus-visible,
a:focus-visible,
input:focus-visible,
label:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: min(46vh, 28rem);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%);
  mask-image: linear-gradient(to bottom, transparent, #000 22%);
}

.mark {
  width: 4.2rem;
  height: 1.35rem;
  display: block;
  margin-bottom: 0.85rem;
  color: var(--linen);
}

.wrap {
  width: min(var(--measure), calc(100% - var(--pad) * 2));
  margin: 0 auto;
}

section {
  padding: 5.5rem 0;
  scroll-margin-top: 4.5rem;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.4rem;
}

.section-head h2,
.throne-copy h2,
.enter-head h2 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  letter-spacing: -0.02em;
}

.section-head p,
.throne-copy p,
.door p,
.relic p,
.beast p,
.other p {
  color: var(--linen);
  margin: 0.9rem 0 0;
}

.rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(var(--measure), calc(100% - var(--pad) * 2));
  margin: 0 auto;
  color: var(--gold);
}

.rule::before,
.rule::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.pillar {
  background: linear-gradient(180deg, rgba(30, 25, 21, 0.92), rgba(18, 16, 20, 0.4));
  border: 1px solid rgba(43, 43, 46, 0.9);
  padding: 1.4rem 1.3rem 1.5rem;
  min-height: 100%;
}

.pillar h3,
.beast h3,
.relic h3,
.other h3,
.door h3 {
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--linen);
}

.pillar p {
  margin: 0.7rem 0 0;
  color: var(--oat);
  font-size: 1.15rem;
}

.atlas {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.75fr);
  gap: 1.2rem;
  align-items: stretch;
}

.chart {
  background:
    radial-gradient(80% 70% at 50% 48%, var(--sea-2), var(--sea-1) 42%, var(--sea-0) 78%);
  border: 1px solid rgba(176, 141, 74, 0.35);
  padding: 0.6rem;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.45);
}

.sea-map {
  width: 100%;
  height: auto;
  display: block;
}

.isle {
  cursor: pointer;
}

.isle .land {
  stroke: rgba(232, 224, 204, 0.18);
  stroke-width: 1.4;
  transition: stroke 0.15s ease, filter 0.15s ease;
}

.isle:hover .land,
.isle:focus-visible .land,
.isle.is-on .land {
  stroke: var(--gold);
  stroke-width: 2.4;
}

.isle.is-on .land {
  filter: brightness(1.12);
}

.map-label {
  font-family: var(--sans);
  font-size: 22px;
  letter-spacing: 0.04em;
  fill: var(--bone);
  pointer-events: none;
}

.isle.is-on .map-label {
  fill: var(--gold);
}

.tiny-label {
  font-family: var(--sans);
  font-size: 16px;
  letter-spacing: 0.08em;
  fill: var(--straw);
  pointer-events: none;
}

.dossier {
  background: var(--oak);
  border: 1px solid var(--iron);
  padding: 1.4rem 1.3rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
}

.dossier::before,
.dossier::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--gold);
}

.dossier::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.dossier::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

.swatch {
  height: 6px;
  margin-bottom: 1.1rem;
  background: var(--granite);
}

.dossier[data-tone="stone"] .swatch { background: linear-gradient(90deg, #8a8172, #3e4650); }
.dossier[data-tone="iron"] .swatch { background: linear-gradient(90deg, #8d97a3, #2b2b2e); }
.dossier[data-tone="pine"] .swatch { background: linear-gradient(90deg, #1d3324, #5e7044); }
.dossier[data-tone="field"] .swatch { background: linear-gradient(90deg, #6a6244, #b9a46a); }
.dossier[data-tone="peat"] .swatch { background: linear-gradient(90deg, #243028, #4d5a3d); }
.dossier[data-tone="relic"] .swatch { background: linear-gradient(90deg, #7a1420, #b08d4a); }
.dossier[data-tone="sea"] .swatch { background: linear-gradient(90deg, #1a2c38, #5b6470); }

.dossier h3 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3rem);
  margin-top: 0.2rem;
}

.dossier-lead {
  color: var(--linen);
  margin: 0.9rem 0 1.2rem;
  font-size: 1.18rem;
}

.facts {
  margin: auto 0 0;
  display: grid;
  gap: 0.75rem;
}

.facts div {
  border-top: 1px solid rgba(176, 141, 74, 0.25);
  padding-top: 0.55rem;
}

.facts dt {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.facts dd {
  margin: 0.2rem 0 0;
  color: var(--bone);
}

.legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-top: 1rem;
}

.legend article,
.other article,
.beast,
.relic,
.door,
.spec {
  background: rgba(30, 25, 21, 0.72);
  border: 1px solid rgba(43, 43, 46, 0.95);
  padding: 1rem 1rem 1.1rem;
}

.legend h3 {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.legend p,
.ship p,
.spec p,
.quiet {
  margin: 0;
  color: var(--oat);
  font-size: 1.05rem;
}

.others {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.other h3 {
  font-size: 1.5rem;
}

.fleet {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-left: 1px solid var(--line);
}

.fleet li {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0 0.85rem 1.2rem;
  position: relative;
}

.fleet li::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--gold);
  position: absolute;
  left: -4px;
  top: 1.25rem;
}

.fleet strong {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--linen);
}

.fleet span {
  color: var(--oat);
  align-self: center;
}

.beasts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.beast h3 {
  font-size: 1.45rem;
}

.throne {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: start;
}

.relics {
  display: grid;
  gap: 0.8rem;
}

.quote {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-style: italic;
  color: var(--linen);
  margin: 1rem 0 0;
  line-height: 1.25;
}

.doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.door {
  padding: 1.6rem 1.4rem 1.5rem;
  min-height: 18rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.door .btn {
  margin-top: 1.3rem;
}

.door-web {
  background:
    linear-gradient(180deg, rgba(122, 20, 32, 0.28), rgba(30, 25, 21, 0.9));
}

.spec {
  margin-top: 1rem;
  width: 100%;
}

.spec h3 {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.8rem;
}

.spec h4 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
}

.spec ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--linen);
  font-family: var(--sans);
  font-size: 0.95rem;
}

.note {
  margin-top: 0.9rem;
  color: var(--oat);
  font-size: 1rem;
}

.site-footer {
  padding: 2rem var(--pad) 2.6rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(176, 141, 74, 0.25);
  color: var(--oat);
  font-family: var(--sans);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
}

.gate-main {
  width: min(52rem, calc(100% - var(--pad) * 2));
  margin: 0 auto;
  padding: 3.5rem 0 4rem;
}

.gate-card,
.shore {
  background: rgba(30, 25, 21, 0.88);
  border: 1px solid rgba(176, 141, 74, 0.35);
  padding: clamp(1.3rem, 3vw, 2.2rem);
}

.gate-card h1,
.shore h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  margin: 0.2rem 0 0.8rem;
}

.beaches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin: 1rem 0 1.2rem;
}

.beaches label {
  border: 1px solid var(--iron);
  padding: 1rem;
  cursor: pointer;
  display: block;
}

.beaches label:has(input:checked) {
  border-color: var(--gold);
  background: rgba(176, 141, 74, 0.08);
}

.beaches input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.beaches strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 500;
}

.beaches span {
  color: var(--oat);
  font-size: 1.02rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field span {
  font-family: var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold);
}

input[type="text"] {
  background: #121014;
  border: 1px solid var(--iron);
  color: var(--bone);
  font-family: var(--serif);
  font-size: 1.4rem;
  padding: 0.55rem 0.7rem;
}

.gate-error {
  min-height: 1.4rem;
  color: #d7b4b4;
  font-family: var(--sans);
  font-size: 0.95rem;
}

.who {
  font-family: var(--display);
  letter-spacing: 0.16em;
  color: var(--gold);
  margin: 0;
  font-size: 0.85rem;
}

.routes {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.4rem;
}

.routes h2 {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.routes ul {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.routes button {
  width: 100%;
  text-align: left;
  background: rgba(18, 16, 20, 0.65);
  color: var(--bone);
  border: 1px solid var(--iron);
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  font-family: var(--serif);
}

.routes button:hover,
.routes button:focus-visible {
  border-color: var(--gold);
}

.routes strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 500;
}

.routes span {
  color: var(--oat);
  font-size: 1rem;
}

.shore-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.3rem;
}

.shore[data-tone="field"] { box-shadow: inset 0 4px 0 #b9a46a; }
.shore[data-tone="pine"] { box-shadow: inset 0 4px 0 #5e7044; }
.shore[data-tone="stone"] { box-shadow: inset 0 4px 0 #8a8172; }
.shore[data-tone="iron"] { box-shadow: inset 0 4px 0 #8d97a3; }
.shore[data-tone="peat"] { box-shadow: inset 0 4px 0 #4d5a3d; }
.shore[data-tone="relic"] { box-shadow: inset 0 4px 0 #7a1420; }
.shore[data-tone="sea"] { box-shadow: inset 0 4px 0 #5b6470; }

@media (max-width: 800px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero {
    padding-bottom: 13rem;
    align-items: end;
  }

  .hero h1 {
    font-size: 2.15rem;
    letter-spacing: 0.06em;
  }
}

@media (max-width: 980px) {
  .pillars,
  .legend,
  .beasts,
  .atlas,
  .throne,
  .doors,
  .beaches,
  .spec-grid {
    grid-template-columns: 1fr;
  }

  .fleet li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
