/* ==========================================================
   Gen Z Luffy ($GZL) · treasure-map landing page
   ========================================================== */

:root {
  --parch: #f3e3c3;
  --parch-2: #d9b98a;
  --ink: #3b2a1a;
  --ink-soft: #5a4330;
  --red: #b3261e;
  --red-dark: #8c1c16;
  --gold: #c9a24a;
  --gold-light: #e0bf6a;
  --table: #1b130c;

  --f-title: "Pirata One", "Georgia", serif;
  --f-body: "IM Fell English", "Georgia", serif;

  /* torn + burnt edge strips (fill = --table) */
  --edge-l: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='240' viewBox='0 0 24 240' preserveAspectRatio='none'><path d='M10 -12L10 0L7 12L12 22L6 35L9 47L4 60L11 73L7 86L13 98L6 112L9 125L5 139L11 151L6 165L10 178L4 191L9 204L12 216L7 229L10 240L10 252' fill='none' stroke='%235a3010' stroke-width='16' opacity='.3'/><path d='M10 -12L10 0L7 12L12 22L6 35L9 47L4 60L11 73L7 86L13 98L6 112L9 125L5 139L11 151L6 165L10 178L4 191L9 204L12 216L7 229L10 240L10 252' fill='none' stroke='%232a1606' stroke-width='4' opacity='.75'/><path d='M0 0H10L7 12L12 22L6 35L9 47L4 60L11 73L7 86L13 98L6 112L9 125L5 139L11 151L6 165L10 178L4 191L9 204L12 216L7 229L10 240H0Z' fill='%231b130c'/></svg>");
  --edge-r: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='240' viewBox='0 0 24 240' preserveAspectRatio='none'><g transform='translate(24 0) scale(-1 1)'><path d='M10 -12L10 0L6 10L11 24L5 36L10 49L5 61L12 72L6 88L11 99L5 110L10 126L4 138L12 150L7 166L11 177L5 190L10 203L6 217L11 228L10 240L10 252' fill='none' stroke='%235a3010' stroke-width='16' opacity='.3'/><path d='M10 -12L10 0L6 10L11 24L5 36L10 49L5 61L12 72L6 88L11 99L5 110L10 126L4 138L12 150L7 166L11 177L5 190L10 203L6 217L11 228L10 240L10 252' fill='none' stroke='%232a1606' stroke-width='4' opacity='.75'/><path d='M0 0H10L6 10L11 24L5 36L10 49L5 61L12 72L6 88L11 99L5 110L10 126L4 138L12 150L7 166L11 177L5 190L10 203L6 217L11 228L10 240H0Z' fill='%231b130c'/></g></svg>");
  --edge-t: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='24' viewBox='0 0 240 24' preserveAspectRatio='none'><g transform='matrix(0 1 1 0 0 0)'><path d='M10 -12L10 0L7 12L12 22L6 35L9 47L4 60L11 73L7 86L13 98L6 112L9 125L5 139L11 151L6 165L10 178L4 191L9 204L12 216L7 229L10 240L10 252' fill='none' stroke='%235a3010' stroke-width='16' opacity='.3'/><path d='M10 -12L10 0L7 12L12 22L6 35L9 47L4 60L11 73L7 86L13 98L6 112L9 125L5 139L11 151L6 165L10 178L4 191L9 204L12 216L7 229L10 240L10 252' fill='none' stroke='%232a1606' stroke-width='4' opacity='.75'/><path d='M0 0H10L7 12L12 22L6 35L9 47L4 60L11 73L7 86L13 98L6 112L9 125L5 139L11 151L6 165L10 178L4 191L9 204L12 216L7 229L10 240H0Z' fill='%231b130c'/></g></svg>");
  --edge-b: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='24' viewBox='0 0 240 24' preserveAspectRatio='none'><g transform='matrix(0 -1 1 0 0 24)'><path d='M10 -12L10 0L6 10L11 24L5 36L10 49L5 61L12 72L6 88L11 99L5 110L10 126L4 138L12 150L7 166L11 177L5 190L10 203L6 217L11 228L10 240L10 252' fill='none' stroke='%235a3010' stroke-width='16' opacity='.3'/><path d='M10 -12L10 0L6 10L11 24L5 36L10 49L5 61L12 72L6 88L11 99L5 110L10 126L4 138L12 150L7 166L11 177L5 190L10 203L6 217L11 228L10 240L10 252' fill='none' stroke='%232a1606' stroke-width='4' opacity='.75'/><path d='M0 0H10L6 10L11 24L5 36L10 49L5 61L12 72L6 88L11 99L5 110L10 126L4 138L12 150L7 166L11 177L5 190L10 203L6 217L11 228L10 240H0Z' fill='%231b130c'/></g></svg>");

  /* paper grain + large age blotches (self-made SVG noise) */
  --grain: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .23  0 0 0 0 .16  0 0 0 0 .1  0 0 0 .22 0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
  --blotch-a: radial-gradient(ellipse 160px 110px at 30% 35%, rgba(150, 100, 40, .16), transparent 70%), radial-gradient(ellipse 120px 90px at 72% 70%, rgba(150, 100, 40, .13), transparent 70%);
  --blotch-b: radial-gradient(ellipse 220px 150px at 60% 40%, rgba(140, 95, 35, .12), transparent 70%), radial-gradient(ellipse 140px 100px at 22% 78%, rgba(150, 100, 40, .1), transparent 70%);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--table);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.125rem;
  line-height: 1.55;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
img { display: block; height: auto; }

a { color: var(--red-dark); text-underline-offset: 3px; }
a:hover { color: var(--red); }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--ink);
  padding: 10px 16px; border-radius: 6px; font-weight: bold;
}
.skip:focus { top: 12px; }

h1, h2, h3 {
  font-family: var(--f-title);
  font-weight: 400;
  line-height: 1.05;
  margin: 0;
  letter-spacing: .01em;
}
h1 { font-size: clamp(3.1rem, 13vw, 5.6rem); }
h2 { font-size: clamp(2.3rem, 8vw, 3.4rem); margin-bottom: .5em; }
h3 { font-size: 1.55rem; }
p { margin: 0 0 1em; }

/* ---------------- The map sheet ---------------- */

.map {
  position: relative;
  width: min(1180px, calc(100% - 12px));
  margin: 6px auto;
  padding: 20px 18px 40px;
  background-color: var(--parch);
  background-image:
    var(--edge-l), var(--edge-r), var(--edge-t), var(--edge-b),
    radial-gradient(ellipse 140px 90px at 88% 14%, rgba(110, 70, 25, .16), transparent 70%),
    radial-gradient(ellipse 200px 120px at 8% 46%, rgba(110, 70, 25, .14), transparent 70%),
    radial-gradient(circle 70px at 78% 71%, rgba(59, 42, 26, .12), transparent 70%),
    radial-gradient(ellipse 260px 160px at 30% 92%, rgba(110, 70, 25, .14), transparent 70%),
    var(--grain), var(--blotch-a), var(--blotch-b),
    linear-gradient(170deg, #f6e8cb 0%, var(--parch) 30%, #ecd6ae 60%, var(--parch) 85%, #e8cfa2 100%);
  background-repeat:
    repeat-y, repeat-y, repeat-x, repeat-x,
    no-repeat, no-repeat, no-repeat, no-repeat,
    repeat, repeat, repeat, repeat, repeat, no-repeat;
  background-position:
    left top, right top, left top, left bottom,
    0 0, 0 0, 0 0, 0 0,
    0 0, 0 0, 0 0, 210px 330px, 210px 330px, 0 0;
  background-size:
    22px 240px, 22px 240px, 240px 22px, 240px 22px,
    auto, auto, auto, auto,
    220px, 530px 610px, 530px 610px, 760px 890px, 760px 890px, 100% 100%;
  box-shadow:
    inset 0 0 50px rgba(120, 72, 20, .35),
    inset 0 0 140px rgba(140, 90, 30, .22),
    0 20px 60px rgba(0, 0, 0, .55);
}

/* ink splatters */
.map::before, .map::after {
  content: "";
  position: absolute;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: .5;
}
.map::before {
  width: 90px; height: 90px; top: 26%; right: 4%;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='%233b2a1a'><path d='M50 30c9-2 18 6 17 15 4 3 8 9 3 14-3 9-14 11-22 9-9 2-19-4-18-13-6-5-4-15 4-18 3-5 10-8 16-7z' opacity='.55'/><circle cx='82' cy='26' r='4' opacity='.5'/><circle cx='20' cy='78' r='3' opacity='.45'/><circle cx='88' cy='70' r='2.4' opacity='.45'/><circle cx='14' cy='32' r='2' opacity='.4'/></g></svg>");
}
.map::after {
  width: 120px; height: 70px; bottom: 9%; left: 5%;
  transform: rotate(-12deg);
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 70'><g fill='%235a3a1a'><path d='M20 40c6-14 30-20 48-14s38 4 36 16-26 18-48 16-42-4-36-18z' opacity='.35'/><circle cx='108' cy='20' r='3' opacity='.4'/><circle cx='8' cy='58' r='2.5' opacity='.35'/></g></svg>");
}

/* ---------------- Route ---------------- */

.route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.route-ghost {
  fill: none;
  stroke: var(--ink);
  stroke-opacity: .18;
  stroke-width: 2;
  stroke-dasharray: 2 7;
  stroke-linecap: round;
}
.route-line {
  fill: none;
  stroke: var(--red);
  stroke-width: 3.5;
  stroke-dasharray: 11 8;
  stroke-linecap: round;
}
.route-pin circle { fill: var(--parch); stroke: var(--red); stroke-width: 3; transition: fill .3s; }
.route-pin.reached circle { fill: var(--red); }
.route-pin .pin-x { stroke: var(--red); stroke-width: 5; stroke-linecap: round; }
.route-ship { color: var(--ink); transition: opacity .3s; }

/* ---------------- Top bar ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -6px -4px 10px;
  padding: 10px 10px;
  background: rgba(243, 227, 195, .94);
  border-bottom: 2px solid rgba(59, 42, 26, .55);
  border-radius: 0 0 10px 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--f-title); font-size: 1.6rem;
}
.topbar .soon { display: none; }  /* the faded button already says "not yet" */
.brand img {
  flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--ink);
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.lang {
  display: inline-flex;
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}
.lang button {
  font: inherit; font-size: 1rem; font-weight: bold;
  background: transparent; color: var(--ink);
  border: 0; padding: 6px 11px; min-height: 40px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--parch); }
.lang button:focus-visible { outline-offset: -4px; outline-color: var(--gold); }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  font-family: var(--f-title);
  font-size: 1.35rem;
  letter-spacing: .02em;
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: 10px 14px 10px 16px / 14px 10px 16px 10px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s;
  box-shadow: 3px 4px 0 var(--ink);
}
.btn:hover { transform: translate(-1px, -2px); box-shadow: 4px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-light); color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--parch); }
.btn-ink:hover { background: #4d3823; color: var(--parch); }
.btn-sm { min-height: 40px; padding: 6px 14px; font-size: 1.1rem; box-shadow: 2px 3px 0 var(--ink); }
.btn-lg { min-height: 56px; padding: 12px 30px; font-size: 1.6rem; }
.btn.is-disabled, .crew-card.is-disabled {
  opacity: .55; cursor: not-allowed; box-shadow: none; transform: none;
}
.soon {
  font-family: var(--f-body); font-style: italic; font-size: .8em;
  margin-left: 4px;
}

/* ---------------- Stops (sections) ---------------- */

main { position: relative; z-index: 1; }

/* --rail: free margin on both sides where the route runs (it crosses only in the gaps between stops) */
.map { --rail: 24px; }
.stop { position: relative; padding: 34px 0 96px; }
.stop-inner {
  position: relative;
  max-width: min(760px, calc(100% - 2 * var(--rail)));
  margin: 0 auto;
}

.place {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin: 0 0 14px;
  font-style: italic;
  font-size: 1.45rem;
  color: var(--red-dark);
  transform: rotate(-2.5deg);
  transform-origin: left center;
}
.place::after {
  content: "";
  flex-basis: 100%;
  height: 2px;
  background: currentColor;
  opacity: .5;
  border-radius: 2px;
  clip-path: polygon(0 0, 100% 40%, 100% 100%, 0 100%);
}
.place-num {
  font-size: .78em;
  color: var(--ink-soft);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-style: normal;
}

.lead { font-size: 1.25rem; font-style: italic; }

/* reveal on scroll (only with JS) */
.js .stop .stop-inner > *:not(.compass):not(.gulls) {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.js .stop.in .stop-inner > *:not(.compass):not(.gulls) { opacity: 1; transform: none; }

/* ---------------- Hero ---------------- */

.hero { padding-top: 18px; }
.hero-grid { display: grid; gap: 22px; position: relative; z-index: 1; }

.hero-figure {
  margin: 0;
  position: relative;
  padding: 10px 10px 14px;
  background: #fbf2de;
  border: 1px solid rgba(59, 42, 26, .35);
  box-shadow: 4px 6px 0 rgba(59, 42, 26, .25), 0 10px 26px rgba(59, 42, 26, .25);
  transform: rotate(-1.6deg);
  max-width: 420px;
}
.hero-figure img { width: 100%; aspect-ratio: 800 / 784; object-fit: cover; filter: sepia(.12) contrast(1.03); }
/* tape */
.hero-figure::before, .hero-figure::after {
  content: "";
  position: absolute;
  width: 84px; height: 26px;
  background: rgba(217, 185, 138, .82);
  border: 1px dashed rgba(59, 42, 26, .25);
}
.hero-figure::before { top: -11px; left: 18px; transform: rotate(-8deg); }
.hero-figure::after { bottom: -10px; right: 16px; transform: rotate(6deg); }

.ticker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 6px 0 14px; }
.stamp {
  display: inline-block;
  font-family: var(--f-title);
  font-size: 1.9rem;
  color: var(--red);
  border: 3px solid var(--red);
  padding: 0 12px;
  border-radius: 8px;
  transform: rotate(-4deg);
  background: rgba(243, 227, 195, .6);
  box-shadow: inset 0 0 0 2px rgba(243, 227, 195, .8);
}
.chain { font-style: italic; color: var(--ink-soft); }
.motto { font-size: 1.35rem; line-height: 1.4; }

.ca { margin: 18px 0; }
.ca-label {
  display: block;
  font-size: .95rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 6px;
}
.ca-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 12px;
  background: rgba(255, 249, 235, .65);
  border: 2px dashed rgba(59, 42, 26, .55);
  border-radius: 10px;
}
.ca-value {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: .9rem;
  overflow-wrap: anywhere;
  color: var(--ink);
}
.ca-row .btn { flex: none; }
.ca-big .ca-value { font-size: 1rem; }

.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.cta .btn { flex: 1 1 auto; }

[hidden] { display: none !important; }

/* countdown to 31.10 */
.countdown {
  margin-top: 22px;
  padding: 14px 14px 12px;
  border: 2px solid var(--ink);
  border-radius: 12px 8px 14px 6px;
  background: rgba(255, 249, 235, .55);
  box-shadow: 3px 4px 0 rgba(59, 42, 26, .35);
}
.cd-title {
  margin: 0 0 10px;
  font-family: var(--f-title);
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--red-dark);
}
.cd-boxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cd-box {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 2px 4px;
  background: var(--ink);
  color: var(--parch);
  border-radius: 8px 5px 9px 4px;
}
.cd-box span {
  font-family: var(--f-title);
  font-size: 2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cd-box small { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.cd-sub { margin: 10px 0 0; font-size: 1rem; font-style: italic; color: var(--ink-soft); }
.cd-sub:empty { display: none; }
.countdown:not([data-state="count"]) .cd-boxes { display: none; }
.countdown[data-state="live"] { border-color: var(--red); box-shadow: 3px 4px 0 var(--red); }
.btn-live { width: 100%; background: var(--red); color: #fff; border-color: var(--red-dark); box-shadow: 3px 4px 0 var(--red-dark); }
.btn-live:hover { background: var(--red-dark); color: #fff; box-shadow: 4px 6px 0 var(--ink); }
.live-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }

.cd-crowd {
  margin: 4px 0 0;
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--red-dark);
}
.cd-crowd:empty { display: none; }

/* organizers' figures (31.10 in numbers) */
.crowd {
  margin: 6px 0 22px;
  padding: 14px 14px 12px;
  border: 2px solid var(--ink);
  border-radius: 14px 8px 12px 6px;
  background: rgba(255, 249, 235, .55);
  box-shadow: 3px 4px 0 rgba(59, 42, 26, .35);
}
.scroll-text .crowd p { font-size: 1rem; }
.scroll-text .crowd .crowd-title {
  margin: 0 0 10px;
  font-family: var(--f-title);
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--red-dark);
}
.crowd-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.crowd-item {
  display: flex; align-items: baseline; gap: 12px;
  min-width: 0;
  padding: 8px 12px;
  text-align: left;
  border: 1.5px solid rgba(59, 42, 26, .45);
  border-radius: 8px 5px 9px 4px;
  background: rgba(243, 227, 195, .6);
}
.crowd-num {
  flex: none;
  min-width: 4.6ch;
  font-family: var(--f-title);
  font-size: 1.8rem;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.crowd-label { font-size: 1rem; line-height: 1.2; color: var(--ink-soft); }
.crowd-main {
  flex-direction: column; align-items: center; gap: 4px;
  padding: 12px;
  text-align: center;
  background: var(--ink);
  border-color: var(--ink);
}
.crowd-main .crowd-num { font-size: 3.2rem; color: var(--gold-light); }
.crowd-main .crowd-label { font-size: 1.1rem; color: var(--parch); }
.scroll-text .crowd .crowd-src { margin: 10px 0 0; font-size: .85rem; line-height: 1.4; color: var(--ink-soft); }

@media (min-width: 600px) {
  .crowd-grid { grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); }
  .crowd-item { flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 6px; text-align: center; }
  .crowd-num { min-width: 0; }
  .crowd-label { font-size: .9rem; }
  .crowd-main .crowd-num { font-size: 2.6rem; }
}

/* compass rose */
.compass {
  position: absolute;
  z-index: 0;
  width: 92px; height: 92px;
  top: -6px; right: -6px;
  opacity: .85;
}
.compass { transform: rotate(8deg); filter: drop-shadow(3px 4px 0 rgba(59, 42, 26, .25)); }
/* each needle searches for its own heading */
.needle { animation: seek 7s ease-in-out infinite alternate; }
.n1 { --a: -25deg; --b: 40deg; }
.n2 { --a: 60deg;  --b: 140deg; animation-duration: 9s; animation-delay: -3s; }
.n3 { --a: -120deg; --b: -40deg; animation-duration: 5.5s; animation-delay: -1s; }
@keyframes seek {
  0%   { transform: rotate(var(--a)); }
  35%  { transform: rotate(calc(var(--b) + 12deg)); }
  50%  { transform: rotate(calc(var(--b) - 6deg)); }
  100% { transform: rotate(var(--b)); }
}

.gulls {
  position: absolute; width: 110px; top: 54px; right: 90px;
  color: var(--ink); opacity: .7;
  animation: drift 9s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(-14px, 6px); } }

.sea { position: relative; height: 70px; margin-top: 26px; color: var(--ink); }
.sea-waves { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 26px; color: #6d5235; }
.sea-waves.small { position: static; height: 20px; margin-top: 10px; opacity: .7; }
.sea-ship {
  position: absolute; width: 84px; height: 70px; bottom: 6px; left: 12%;
  animation: bob 4s ease-in-out infinite, sail 40s linear infinite alternate;
}
@keyframes bob { 50% { transform: translateY(-5px) rotate(-3deg); } }
@keyframes sail { to { left: 68%; } }

/* ---------------- Legend ---------------- */

.scroll-text p { font-size: 1.22rem; }
.scroll-text p:first-child { font-size: 1.4rem; font-style: italic; }
.peace {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 6px;
  padding: 10px 18px;
  font-size: 1.35rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 249, 235, .55);
}
.peace span { font-size: 1.5rem; }

/* ---------------- Voyage ---------------- */

.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li {
  position: relative;
  padding: 0 0 26px 52px;
  border-left: 3px dotted rgba(59, 42, 26, .5);
  margin-left: 18px;
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-mark {
  position: absolute; left: -22px; top: -4px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: 1.3rem;
  background: var(--parch);
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.timeline h3 { margin-bottom: 4px; }
.timeline p { margin: 0; }

/* ---------------- Buy ---------------- */

.buy-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.buy-head h2 { margin-bottom: .1em; }
.buy-head .lead { margin: 0; }
.big-x { flex: none; width: 92px; height: 92px; transform: rotate(-6deg); }

.steps { list-style: none; counter-reset: step; margin: 0 0 8px; padding: 0; display: grid; gap: 14px; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 14px 16px 10px 64px;
  background: rgba(255, 249, 235, .5);
  border: 1.5px solid rgba(59, 42, 26, .4);
  border-radius: 6px 12px 8px 14px;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 14px; top: 12px;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  font-family: var(--f-title); font-size: 1.5rem;
  color: var(--parch); background: var(--red);
  border-radius: 50%;
}
.steps h3 { font-size: 1.4rem; margin-bottom: 2px; }
.steps p { margin: 0 0 4px; }
.safety { margin-top: 18px; font-style: italic; color: var(--ink-soft); }

/* ---------------- Treasure ---------------- */

.chest-head { display: flex; align-items: center; gap: 14px; }
.chest { width: 96px; flex: none; }
.loot { display: grid; gap: 14px; margin: 10px 0 0; }
.loot-item {
  padding: 14px 18px;
  border: 2px solid var(--ink);
  border-radius: 12px 6px 14px 8px;
  background:
    linear-gradient(135deg, rgba(201, 162, 74, .28), rgba(201, 162, 74, .08));
}
.loot dt { font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.loot dd { margin: 4px 0 0; font-family: var(--f-title); font-size: 1.9rem; line-height: 1.15; overflow-wrap: anywhere; }
.loot dd small { display: block; font-family: var(--f-body); font-size: 1rem; font-style: italic; color: var(--ink-soft); }
.donation {
  display: flex; align-items: center; gap: 16px;
  margin-top: 16px;
  padding: 14px 18px;
  border: 2px dashed var(--red);
  border-radius: 10px 14px 8px 12px;
  background: rgba(255, 249, 235, .55);
}
.donation p { margin: 0; }
@media (max-width: 599px) {
  .donation { flex-direction: column; align-items: flex-start; gap: 6px; }
}
.donation-num {
  flex: none;
  font-family: var(--f-title);
  font-size: 2.8rem;
  line-height: 1;
  color: var(--red);
}
.donation-text { font-size: 1.15rem; font-weight: bold; }
.donation-note { margin-top: 4px !important; font-size: .95rem; font-style: italic; color: var(--ink-soft); }
.loot .tba { font-family: var(--f-body); font-style: italic; font-size: 1.3rem; color: var(--ink-soft); }

/* ---------------- Crew ---------------- */

.crew-links { display: grid; gap: 14px; }
.crew-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 14px 18px;
  color: var(--ink);
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: 14px 8px 12px 6px;
  background: rgba(255, 249, 235, .55);
  box-shadow: 3px 4px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.crew-card:hover { color: var(--ink); transform: translate(-1px, -2px); box-shadow: 4px 6px 0 var(--ink); }
.crew-card svg { grid-row: span 2; width: 40px; height: 40px; }
.crew-name { font-family: var(--f-title); font-size: 1.7rem; line-height: 1; }
.crew-handle { font-family: var(--f-body); font-weight: bold; font-size: 1.25rem; overflow-wrap: anywhere; }
.crew-sub { font-style: italic; color: var(--ink-soft); }
.crew-decor { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 26px; }
.crew-decor svg:first-child { width: 150px; }
.crew-decor svg:last-child { width: 56px; }

/* ---------------- Footer ---------------- */

.foot {
  position: relative; z-index: 1;
  max-width: min(760px, calc(100% - 2 * var(--rail)));
  margin: 0 auto;
  padding-top: 10px;
}
.place.end { color: var(--ink-soft); }
.disclaimer {
  font-size: 1rem;
  line-height: 1.5;
  padding: 16px 18px;
  border: 1.5px solid rgba(59, 42, 26, .45);
  border-radius: 8px;
  background: rgba(255, 249, 235, .45);
}
.disclaimer p:last-child { margin-bottom: 0; }
.copy { margin-top: 18px; font-size: .95rem; color: var(--ink-soft); }

/* ---------------- Unroll intro ---------------- */

.unroll {
  position: fixed; inset: 0; z-index: 90;
  background: var(--table);
  pointer-events: none;
  animation: unroll 1.5s cubic-bezier(.55, .05, .3, 1) .15s forwards;
}
.unroll-rod {
  position: absolute; top: -18px; left: 50%;
  width: min(1210px, calc(100% + 10px));
  height: 40px;
  transform: translateX(-50%);
  border-radius: 20px;
  background: linear-gradient(180deg, #8f6a3c 0%, #e6cc9c 30%, #f6e8cb 48%, #c9a46c 75%, #6b4a25 100%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .55);
}
.unroll-rod::before, .unroll-rod::after {
  content: ""; position: absolute; top: 4px; width: 22px; height: 32px; border-radius: 6px;
  background: linear-gradient(180deg, #5a3a1a, #c9a24a 45%, #5a3a1a);
}
.unroll-rod::before { left: -6px; }
.unroll-rod::after { right: -6px; }
@keyframes unroll {
  0% { transform: translateY(0); }
  100% { transform: translateY(calc(100% + 40px)); visibility: hidden; }
}

/* ---------------- Larger screens ---------------- */

@media (min-width: 600px) {
  .map { padding: 24px 34px 60px; margin: 14px auto; }
  .map { --rail: 44px; }
  .compass { width: 130px; height: 130px; top: -14px; right: -10px; }
  .loot { grid-template-columns: repeat(3, 1fr); }
  .crew-links { grid-template-columns: repeat(2, 1fr); }
  .big-x { width: 120px; height: 120px; }
  .chest { width: 130px; }
}

@media (min-width: 1000px) {
  body { font-size: 1.2rem; }
  .map { padding: 26px 60px 80px; margin: 28px auto; }
  .topbar { margin: -8px -30px 20px; padding: 12px 24px; }
  .stop { padding: 40px 0 120px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 46px; }
  .hero .stop-inner { max-width: 940px; }
  .compass { width: 160px; height: 160px; top: -36px; right: -40px; }
  .gulls { right: 60px; top: 10px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .cta .btn { flex: 0 1 auto; }
}

/* ---------------- Reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .unroll { display: none; }
  .js .stop .stop-inner > *:not(.compass):not(.gulls) { opacity: 1; transform: none; }
}
