@font-face {
  font-family: "Zilla Slab";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/zilla-slab-600-latin.woff2) format("woff2");
}

@font-face {
  font-family: "Zilla Slab";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/zilla-slab-700-latin.woff2) format("woff2");
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/nunito-sans-latin.woff2) format("woff2");
}

:root {
  --stone: #E7E4DD;
  --surface: #F7F5F0;
  --ink: #1F2A24;
  --brick: #B5482F;
  --sea: #2F7F9D;
  --brass: #C99A2E;
  --rope: #CFCAC0;
  --brick-ink: color-mix(in srgb, var(--brick) 78%, #000);
  --sea-ink: color-mix(in srgb, var(--sea) 68%, #000);
  --slat: color-mix(in srgb, var(--ink) 35%, var(--surface));
  --slab: "Zilla Slab", Rockwell, "Roboto Slab", Georgia, serif;
  --sans: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
}

a {
  touch-action: manipulation;
  color: var(--sea-ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brick-ink);
}

a:focus-visible,
.ledger-wrap:focus-visible {
  outline: 3px solid var(--sea-ink);
  outline-offset: 3px;
}

.shell {
  width: min(100% - 2 * var(--gutter), 1180px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--surface);
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

.harbour {
  padding-block: 14px 12px;
}

.harbour-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-name {
  font: 700 1.5rem/1 var(--slab);
}

.brand-note {
  margin: 0;
  font-size: .95rem;
}

.route {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--surface);
  border-block: 2px solid var(--ink);
}

.route-line {
  display: flex;
  position: relative;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.route-line::-webkit-scrollbar {
  display: none;
}

.leg {
  position: relative;
  flex: 1 0 104px;
  scroll-snap-align: center;
}

.leg::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  border-top: 3px dashed var(--sea);
}

.leg:first-child::before {
  left: 50%;
}

.leg:last-child::before {
  right: 50%;
}

.port {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-height: 64px;
  padding: 12px 6px 8px;
  color: var(--ink);
  font: 600 .95rem/1.2 var(--slab);
  text-align: center;
  text-decoration: none;
}

.port:focus-visible {
  outline-offset: -3px;
}

.buoy {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
}

.port:hover {
  color: var(--ink);
}

.port:hover .buoy {
  background: var(--brass);
}

.port[aria-current="page"] {
  color: var(--brick-ink);
  font-weight: 700;
}

.port[aria-current="page"] .port-name {
  text-decoration: underline 3px var(--brass);
  text-underline-offset: 4px;
}

.port[aria-current="page"] .buoy {
  background: var(--brick);
}

main {
  padding-block: clamp(24px, 5vw, 56px) clamp(48px, 7vw, 96px);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--slab);
  line-height: 1.12;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 1.2rem + 4.4vw, 4.1rem);
  font-weight: 700;
}

h2 {
  margin-top: 1.7em;
  margin-bottom: .5em;
  font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.1rem);
  font-weight: 600;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

.prose {
  max-width: 66ch;
}

.prose > h2:first-child {
  margin-top: 0;
}

.page-head {
  margin-bottom: clamp(28px, 4vw, 48px);
  padding-bottom: clamp(22px, 3vw, 34px);
  border-bottom: 3px dashed var(--slat);
}

.page-head h1 {
  max-width: 20ch;
}

.lede {
  max-width: 60ch;
  margin: 18px 0 0;
  font-size: 1.25rem;
  line-height: 1.55;
}

.spread {
  margin-bottom: clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.spread.flip {
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
}

.spread.pairs {
  grid-template-columns: minmax(300px, 450px) minmax(0, 1fr);
}

.spread.flip .figcol {
  grid-column: 1;
  grid-row: 1;
}

.figcol {
  position: sticky;
  top: 96px;
}

.stamp {
  display: inline-block;
  margin: 0 4px 2px 2px;
  padding: .2em .6em;
  border: 2px solid currentColor;
  outline: 1px solid currentColor;
  outline-offset: 2px;
  background: var(--surface);
  color: var(--brick-ink);
  font: 600 .95rem/1.15 var(--slab);
  transform: rotate(-2deg);
}

.arch {
  margin: 0;
}

.arch-frame {
  padding: 8px;
  border: 2px solid var(--ink);
  border-radius: 50% 50% 3px 3px / 19% 19% 3px 3px;
  background: var(--surface);
}

.arch img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 13;
  object-fit: cover;
  border-radius: 50% 50% 0 0 / 19% 19% 0 0;
}

.arch figcaption {
  margin-top: 14px;
  font-size: .95rem;
  line-height: 1.5;
}

.arch figcaption .stamp {
  display: block;
  width: fit-content;
  margin-bottom: 8px;
}

.arch-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 32px);
  max-width: 720px;
}

.crate {
  position: relative;
  padding: 18px 18px 20px;
  border: 2px solid var(--ink);
  background: var(--surface);
}

.crate::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed var(--slat);
  pointer-events: none;
}

.crate .stamp {
  margin-bottom: 10px;
}

.crate > :last-child {
  margin-bottom: 0;
}

.icon-crate {
  margin: 0;
  max-width: 280px;
}

.icon-crate img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 14px;
  border: 2px solid var(--ink);
}

.icon-crate figcaption {
  font-size: .95rem;
  line-height: 1.5;
}

.crate-big {
  font: 700 1.9rem/1 var(--slab);
  margin: 0 0 6px;
}

.chain {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 28px 0 32px;
}

.chain .crate {
  flex: 1;
}

.rope-link {
  align-self: center;
  width: 0;
  height: 34px;
  border-left: 3px dashed var(--ink);
}

.ledger-wrap {
  margin: 28px 0 8px;
  overflow-x: auto;
  border: 2px solid var(--ink);
  background: var(--surface);
}

.ledger {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: .98rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.ledger caption {
  padding: 12px 16px;
  border-bottom: 2px solid var(--ink);
  font: 600 1.1rem/1.3 var(--slab);
  text-align: left;
}

.ledger th,
.ledger td {
  padding: 11px 16px;
  text-align: left;
  vertical-align: top;
}

.ledger thead th {
  border-bottom: 2px solid var(--ink);
  font: 600 .95rem/1.3 var(--slab);
}

.ledger tbody tr + tr > * {
  border-top: 2px dashed var(--rope);
}

.ledger tbody th {
  font: 600 1rem/1.4 var(--slab);
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: .55em 1.3em;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
  font: 700 1rem/1.2 var(--sans);
  text-decoration: none;
}

.btn:hover {
  background: var(--brass);
  color: var(--ink);
}

.btn-play {
  background: var(--brick);
  color: var(--surface);
}

.btn-play:hover {
  background: var(--brick-ink);
  color: var(--surface);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.sea {
  padding: clamp(18px, 4vw, 48px);
  border: 2px solid var(--ink);
  background: color-mix(in srgb, var(--sea) 15%, var(--surface)) url(../img/wave-tile.svg);
}

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 56px);
  align-items: end;
}

.hero-top h1 {
  font-size: clamp(2.1rem, 1rem + 3.6vw, 3.5rem);
}

.hero-top .lede {
  margin-top: 0;
  font-size: 1.15rem;
}

.hero-top .actions {
  margin-top: 18px;
}

.defs {
  position: absolute;
  width: 0;
  height: 0;
}

.isles {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2.4vw, 32px);
  margin-top: clamp(24px, 4vw, 44px);
}

.sea-route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sea-route path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 4;
  stroke-dasharray: 1 11;
  stroke-linecap: round;
}

.isle {
  position: relative;
  display: block;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
}

.isle:nth-of-type(odd) {
  margin-top: clamp(0px, 7vw, 96px);
}

.isle:hover {
  color: var(--ink);
}

.isle-art {
  position: relative;
  width: min(100%, 220px);
  margin: 10px auto 22px;
  aspect-ratio: 1;
}

.isle-art::before {
  content: "";
  position: absolute;
  inset: -10px;
  background: var(--brass);
}

.isle-art img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.isle:hover .isle-art::before {
  background: var(--brick);
}

.isle-a img,
.isle-a .isle-art::before {
  clip-path: url(#blob-a);
}

.isle-b img,
.isle-b .isle-art::before {
  clip-path: url(#blob-b);
}

.isle-c img,
.isle-c .isle-art::before {
  clip-path: url(#blob-c);
}

.isle-d img,
.isle-d .isle-art::before {
  clip-path: url(#blob-d);
}

.isle-note {
  display: block;
  margin-top: 8px;
  font-size: .95rem;
  line-height: 1.45;
}

.isle:focus-visible {
  outline-offset: 6px;
}

.tide {
  margin-top: 52px;
}

.wall-grid,
.quay-wall {
  color: var(--surface);
}

.quay-wall {
  margin-top: 0;
  padding-block: 44px 40px;
  border-top: 6px dashed var(--brass);
  background: var(--ink);
  font-size: .98rem;
  line-height: 1.6;
}

.wall-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 28px clamp(24px, 6vw, 80px);
}

.wall-name {
  margin-bottom: 8px;
  font: 700 1.4rem/1.2 var(--slab);
}

.quay-wall a {
  color: var(--surface);
}

.quay-wall a:hover {
  color: var(--brass);
}

.quay-wall a:focus-visible {
  outline-color: var(--brass);
}

.wall-play {
  font-weight: 700;
}

.wall-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wall-links a {
  display: inline-block;
  padding-block: 7px;
  font-weight: 600;
}

.wall-mail {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 20px;
  border-top: 2px dashed var(--slat);
}

.wall-mail a {
  color: var(--brass);
  font-weight: 700;
}

.lost {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px var(--gutter);
}

.lost-box {
  max-width: 34rem;
}

.lost-box .brand-mark {
  margin-bottom: 20px;
}

.lost-box p {
  margin-top: 16px;
  font-size: 1.2rem;
}

.fine-print h2 {
  margin-top: 1.6em;
  font-size: 1.4rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .buoy,
  .btn,
  .isle-art::before {
    transition: background-color .18s ease;
  }
}

@media (min-width: 1000px) {
  .isle:nth-of-type(even) {
    margin-top: 0;
  }
}

@media (max-width: 999px) {
  .sea-route {
    display: none;
  }

  .isles {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .isles::before {
    content: "";
    position: absolute;
    top: 30px;
    bottom: 30px;
    left: 66px;
    border-left: 3px dotted var(--ink);
  }

  .isle,
  .isle:nth-of-type(odd) {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    column-gap: 18px;
    align-items: center;
    margin-top: 0;
    text-align: left;
  }

  .isle-art {
    grid-row: 1 / span 2;
    width: 132px;
    margin: 0;
  }

  .isle-art::before {
    inset: -6px;
  }

  .isle .stamp {
    justify-self: start;
    align-self: end;
  }

  .isle-note {
    align-self: start;
  }
}

@media (max-width: 820px) {
  .hero-top,
  .spread,
  .spread.flip,
  .spread.pairs,
  .wall-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .spread.flip .figcol {
    grid-column: auto;
    grid-row: auto;
  }

  .figcol {
    position: static;
    width: min(100%, 320px);
    margin-inline: auto;
  }

  .spread.pairs .figcol {
    width: min(100%, 460px);
  }

  .harbour-row {
    justify-content: flex-start;
  }
}

@media (min-width: 700px) {
  .chain {
    flex-direction: row;
    align-items: stretch;
  }

  .rope-link {
    align-self: center;
    width: 52px;
    height: 0;
    border-left: 0;
    border-top: 3px dashed var(--ink);
  }
}

@media (max-width: 339px) {
  .arch-pair {
    grid-template-columns: minmax(0, 1fr);
    max-width: 300px;
  }
}
