@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=IM+Fell+English:ital@0;1&family=Libre+Baskerville:wght@400;700&display=swap");

:root {
  --ink: #1d201b;
  --blue-black: #111923;
  --deep-sea: #163044;
  --harbor: #24606b;
  --storm: #5c7586;
  --parchment: #ead7ac;
  --paper: #f7ecd0;
  --paper-dark: #d9bd80;
  --brass: #c99f48;
  --red-sail: #a63b2a;
  --rope: #7a5b35;
  --shadow: 0 28px 80px rgba(17, 25, 35, 0.26);
  --soft-shadow: 0 16px 42px rgba(36, 24, 13, 0.2);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 8rem;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 17% 12%, rgba(201, 159, 72, 0.2), transparent 23rem),
    linear-gradient(115deg, rgba(22, 48, 68, 0.18) 0 1px, transparent 1px 68px),
    linear-gradient(70deg, rgba(122, 91, 53, 0.1) 0 1px, transparent 1px 84px),
    #e6cf9c;
  font-family: "Libre Baskerville", Georgia, serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55,42,22,0.05) 1px, transparent 1px);
  background-size: 5px 5px, 7px 7px;
  mix-blend-mode: multiply;
  opacity: 0.36;
}

a {
  color: inherit;
}

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

.site-shell {
  overflow: hidden;
}

.masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem clamp(1rem, 4vw, 3rem);
  color: var(--paper);
  background: rgba(17, 25, 35, 0.82);
  border-bottom: 1px solid rgba(201, 159, 72, 0.35);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-grid;
  line-height: 1;
  text-decoration: none;
}

.brand-mark {
  font-family: "IM Fell English", Georgia, serif;
  font-size: clamp(1.4rem, 2vw, 2rem);
  letter-spacing: 0;
}

.brand-sub {
  color: var(--brass);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.nav a,
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(201, 159, 72, 0.42);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0;
  background: rgba(234, 215, 172, 0.08);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.nav a:hover,
.button:hover {
  transform: translateY(-2px);
  border-color: var(--brass);
  background: rgba(234, 215, 172, 0.18);
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(22rem, 0.78fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: 7rem clamp(1rem, 5vw, 5rem) 4rem;
  color: var(--paper);
  background:
    linear-gradient(90deg, rgba(17, 25, 35, 0.95), rgba(17, 25, 35, 0.64) 46%, rgba(17, 25, 35, 0.14)),
    var(--hero-image) center / cover no-repeat;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9rem;
  background: linear-gradient(transparent, #e6cf9c);
  pointer-events: none;
}

.hero-copy,
.hero-art {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--brass);
  font-family: "IM Fell English", Georgia, serif;
  font-size: 1.05rem;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 0.94;
  font-weight: 700;
}

h1 {
  max-width: 11ch;
  font-size: clamp(4.2rem, 12vw, 10rem);
  text-shadow: 0 6px 22px rgba(0, 0, 0, 0.42);
}

.hero-lede {
  max-width: 42rem;
  margin: 1.6rem 0 0;
  font-size: clamp(1.06rem, 1.8vw, 1.34rem);
  color: #f5e8c3;
}

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

.button.primary {
  color: var(--blue-black);
  background: var(--brass);
  border-color: #f1cf75;
  font-weight: 700;
}

.button.secondary {
  color: var(--paper);
}

.hero-art {
  align-self: end;
}

.cover-plate {
  padding: 0.7rem;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.03)),
    rgba(29, 32, 27, 0.5);
  border: 1px solid rgba(234, 215, 172, 0.38);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: rotate(1.3deg);
}

.cover-plate img {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
}

.seal-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.seal {
  min-height: 72px;
  padding: 0.7rem;
  color: var(--paper);
  background: rgba(17, 25, 35, 0.76);
  border: 1px solid rgba(201, 159, 72, 0.36);
  border-radius: var(--radius);
}

.seal strong {
  display: block;
  color: var(--brass);
  font-family: "IM Fell English", Georgia, serif;
  font-size: 1.15rem;
}

.section {
  padding: clamp(4rem, 9vw, 7rem) clamp(1rem, 5vw, 5rem);
  position: relative;
  scroll-margin-top: 8rem;
}

.section.dark {
  color: var(--paper);
  background:
    linear-gradient(rgba(17,25,35,0.9), rgba(17,25,35,0.9)),
    radial-gradient(circle at 70% 30%, rgba(36, 96, 107, 0.35), transparent 30rem),
    var(--blue-black);
}

.section.paper {
  background:
    linear-gradient(90deg, rgba(122,91,53,0.12) 0 1px, transparent 1px 88px),
    linear-gradient(0deg, rgba(22,48,68,0.08) 0 1px, transparent 1px 72px),
    var(--paper);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(16rem, 0.55fr);
  gap: 2rem;
  align-items: end;
  max-width: 76rem;
  margin: 0 auto 2.5rem;
}

.section-head h2 {
  font-size: clamp(2.7rem, 7vw, 6.6rem);
}

.section-head p {
  margin: 0;
  color: rgba(29, 32, 27, 0.72);
}

.dark .section-head p {
  color: rgba(247, 236, 208, 0.76);
}

.parent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  max-width: 76rem;
  margin: 0 auto;
}

.parent-note,
.book-card,
.crew-card,
.excerpt,
.map-panel,
.route-card {
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.parent-note {
  padding: 1.15rem;
  background: rgba(255,255,255,0.42);
  border: 1px solid rgba(122, 91, 53, 0.28);
}

.parent-note h3 {
  margin-bottom: 0.55rem;
  font-size: 1.65rem;
}

.book-one-layout {
  max-width: 78rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(18rem, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.summary-ledger {
  padding: clamp(1.2rem, 3vw, 2rem);
  background: rgba(247, 236, 208, 0.94);
  border: 1px solid rgba(122, 91, 53, 0.3);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.4rem 0.72rem;
  color: var(--blue-black);
  background: var(--brass);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.summary-ledger h2 {
  margin: 1rem 0;
  font-size: clamp(2.5rem, 6vw, 5.2rem);
}

.plot-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.plot-item {
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--red-sail);
  background: rgba(201, 159, 72, 0.13);
}

.excerpt {
  max-height: 42rem;
  overflow: auto;
  padding: clamp(1rem, 3vw, 2rem);
  background: #fff7df;
  border: 1px solid rgba(122, 91, 53, 0.3);
}

.excerpt h3 {
  margin-bottom: 1rem;
  color: var(--red-sail);
  font-size: clamp(2rem, 4vw, 3.8rem);
}

.excerpt p {
  max-width: 48rem;
}

.map-wrap {
  max-width: 80rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  gap: 1.5rem;
  align-items: stretch;
}

.sea-map {
  min-height: 35rem;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(201, 159, 72, 0.36);
  background:
    radial-gradient(ellipse at 68% 38%, rgba(234, 215, 172, 0.46), transparent 18rem),
    linear-gradient(135deg, rgba(234, 215, 172, 0.25), rgba(36, 96, 107, 0.42)),
    #21485a;
  box-shadow: var(--shadow);
}

.sea-map::before {
  content: "";
  position: absolute;
  inset: 8%;
  background:
    repeating-radial-gradient(circle at 50% 52%, transparent 0 2.8rem, rgba(247,236,208,0.24) 2.9rem 3rem),
    linear-gradient(112deg, transparent 0 23%, rgba(247,236,208,0.22) 23.2% 23.5%, transparent 23.7%),
    linear-gradient(18deg, transparent 0 56%, rgba(247,236,208,0.18) 56.2% 56.5%, transparent 56.8%);
  opacity: 0.75;
}

.route-line {
  position: absolute;
  left: 18%;
  top: 48%;
  width: 62%;
  height: 18%;
  border-top: 3px dashed rgba(247, 236, 208, 0.52);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.map-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 2.6rem;
  height: 2.6rem;
  border: 2px solid var(--blue-black);
  border-radius: 50% 50% 50% 0;
  background: var(--brass);
  box-shadow: 0 8px 22px rgba(0,0,0,0.3);
  rotate: -45deg;
  cursor: pointer;
}

.map-pin span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--blue-black);
  font-weight: 700;
  rotate: 45deg;
}

.map-pin.is-active {
  background: var(--red-sail);
  color: var(--paper);
}

.map-panel {
  padding: 1.5rem;
  color: var(--paper);
  background: rgba(17, 25, 35, 0.74);
  border: 1px solid rgba(201, 159, 72, 0.36);
}

.map-panel h3 {
  margin-bottom: 0.7rem;
  color: var(--brass);
  font-size: 2.4rem;
}

.crew-grid {
  max-width: 78rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.crew-card {
  overflow: hidden;
  background: rgba(247, 236, 208, 0.9);
  border: 1px solid rgba(122, 91, 53, 0.28);
}

.crew-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.crew-card div {
  padding: 1rem;
}

.crew-card h3 {
  font-size: 1.7rem;
}

.book-card h3 {
  font-size: clamp(1.55rem, 2.1vw, 2.05rem);
  line-height: 1;
}

.crew-card p,
.book-card p {
  margin-bottom: 0;
  font-size: 0.91rem;
}

.arc {
  max-width: 82rem;
  margin: 0 auto 3rem;
}

.arc > h3 {
  margin-bottom: 1rem;
  color: var(--brass);
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  gap: 1rem;
}

.book-card {
  overflow: hidden;
  color: var(--paper);
  background: rgba(17, 25, 35, 0.76);
  border: 1px solid rgba(201, 159, 72, 0.28);
}

.book-card img {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
}

.book-card-body {
  padding: 1rem;
}

.book-num {
  display: inline-block;
  margin-bottom: 0.4rem;
  color: var(--brass);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.route-cards {
  max-width: 76rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.route-card {
  padding: 1.3rem;
  color: var(--paper);
  border: 1px solid rgba(201, 159, 72, 0.34);
  background: rgba(17, 25, 35, 0.68);
}

.route-card h3 {
  margin-bottom: 0.65rem;
  color: var(--brass);
  font-size: 2rem;
}

.site-footer {
  padding: 2rem clamp(1rem, 5vw, 5rem);
  color: rgba(247, 236, 208, 0.78);
  background: #0c1218;
  border-top: 1px solid rgba(201, 159, 72, 0.32);
}

.footer-inner {
  max-width: 82rem;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1050px) {
  .hero,
  .section-head,
  .book-one-layout,
  .map-wrap {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 8.5rem;
  }

  .hero-art {
    max-width: 32rem;
  }

  .parent-grid,
  .route-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crew-grid,
  .book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .masthead {
    position: absolute;
    align-items: flex-start;
  }

  .nav {
    gap: 0.35rem;
  }

  .nav a {
    min-height: 36px;
    padding: 0.5rem 0.62rem;
    font-size: 0.7rem;
  }

  .hero {
    min-height: auto;
    padding-top: 9.5rem;
  }

  h1 {
    font-size: clamp(3.8rem, 22vw, 6.4rem);
  }

  .seal-row,
  .parent-grid,
  .route-cards,
  .crew-grid,
  .book-grid {
    grid-template-columns: 1fr;
  }

  .sea-map {
    min-height: 28rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
