/* =====================================================================
   strawhat.gr: a night voyage on the Grand Line
   Plain CSS. No build step. Tokens first, then sections top to bottom.
   ===================================================================== */

:root {
  color-scheme: dark;

  /* night sea */
  --night: #070b16;
  --night-2: #0a1122;
  --sea: #0d1a35;
  --sea-2: #12284d;
  --sea-3: #1a3a6b;
  --line: rgba(160, 185, 230, 0.14);

  /* text */
  --ink: #e9edf6;
  --muted: #8f9bb8;

  /* straw hat palette */
  --straw: #f6c94c;
  --straw-2: #e0a232;
  --band: #e5484d;
  --teal: #4fd8c8;
  --violet: #9b8cff;

  /* parchment (posters) */
  --paper: #efe1bd;
  --paper-2: #e3cf9e;
  --paper-ink: #2c1d0f;
  --paper-muted: #6b5434;

  --f-display: "Pirata One", "Georgia", serif;
  --f-body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
b { color: var(--straw); font-weight: 600; }
code { font-family: var(--f-mono); font-size: .88em; }
::selection { background: var(--straw); color: var(--night); }

.ico {
  width: 1.15em; height: 1.15em;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  flex: none; vertical-align: -0.2em;
}

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--straw); color: var(--night); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 2px dashed var(--straw); outline-offset: 3px; border-radius: 6px; }

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

/* ============================== NAV ============================== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  background: linear-gradient(to bottom, rgba(7, 11, 22, .85), rgba(7, 11, 22, 0));
  backdrop-filter: blur(6px);
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-family: var(--f-mono); font-weight: 600; font-size: 15px;
}
.nav__brand .ico { width: 30px; height: 30px; color: var(--straw); transition: transform .5s var(--ease-bounce); }
.nav__brand:hover .ico { transform: rotate(-14deg) scale(1.1); }
.nav__brand .dot { color: var(--band); }
.nav__brand .me { color: var(--straw); }
.nav__links { display: flex; gap: clamp(10px, 2.4vw, 28px); }
.nav__links a {
  position: relative; text-decoration: none; color: var(--muted);
  font-size: 15px; transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--straw); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }

/* ============================== HERO ============================== */
.hero {
  position: relative; min-height: 100svh;
  display: grid; align-items: center;
  padding: 110px var(--gutter) 160px;
  background:
    radial-gradient(1200px 600px at 75% 15%, rgba(155, 140, 255, .14), transparent 60%),
    radial-gradient(900px 500px at 10% 90%, rgba(79, 216, 200, .10), transparent 60%),
    linear-gradient(to bottom, var(--night) 0%, var(--night-2) 55%, var(--sea) 100%);
  overflow: hidden;
  isolation: isolate;
}

/* starfield: two layers of tiny radial dots that twinkle at different speeds */
.sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.stars {
  position: absolute; inset: -50px;
  background-image:
    radial-gradient(1.2px 1.2px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 120px 80px, #cfd8ff, transparent),
    radial-gradient(1.4px 1.4px at 200px 160px, #fff, transparent),
    radial-gradient(1px 1px at 60px 210px, #ffe9a8, transparent),
    radial-gradient(1px 1px at 260px 40px, #fff, transparent),
    radial-gradient(1.2px 1.2px at 300px 240px, #cfd8ff, transparent);
  background-size: 320px 280px;
  opacity: .7;
  animation: twinkle 5s ease-in-out infinite alternate;
}
.stars--slow {
  background-size: 470px 390px; background-position: 90px 60px;
  opacity: .45; animation-duration: 8s; animation-delay: -3s;
}
@keyframes twinkle { from { opacity: .25; } to { opacity: .8; } }

.moon {
  position: absolute; top: 12%; right: 9%;
  width: clamp(70px, 9vw, 120px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8df, #f4e3a7 55%, #d9c27a);
  box-shadow: 0 0 60px 10px rgba(246, 201, 76, .18), 0 0 160px 40px rgba(246, 201, 76, .08);
  opacity: .9;
}
.moon::after { /* a couple of craters */
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 62% 40%, rgba(160, 130, 60, .25) 0 8%, transparent 9%),
    radial-gradient(circle at 40% 66%, rgba(160, 130, 60, .2) 0 6%, transparent 7%),
    radial-gradient(circle at 70% 70%, rgba(160, 130, 60, .18) 0 4%, transparent 5%);
}

.hero__inner {
  width: min(1120px, 100%); margin-inline: auto;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 6px;
  font-family: var(--f-mono); font-size: 14px; color: var(--teal);
  letter-spacing: .04em;
}
.hero__name {
  margin: 0; font-family: var(--f-display); font-weight: 400;
  font-size: clamp(56px, 10vw, 128px); line-height: .9; letter-spacing: .01em;
}
.hero__name .line { display: block; animation: rise .9s var(--ease-bounce) both; }
.hero__name .line--alt {
  animation-delay: .12s;
  color: transparent;
  background: linear-gradient(100deg, var(--straw) 0%, #ffe29a 40%, var(--straw-2) 70%, var(--band) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  animation: rise .9s .12s var(--ease-bounce) both, shimmer 7s 1s linear infinite;
}
@keyframes rise { from { opacity: 0; transform: translateY(40px) rotate(-2deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }

.hero__tag {
  max-width: 54ch; margin: 22px 0 26px; color: #c2cbe0; font-size: clamp(16px, 1.6vw, 19px);
  animation: rise .9s .25s ease both;
}

/* terminal */
.term {
  max-width: 520px; border-radius: 12px; overflow: hidden;
  background: rgba(10, 17, 34, .85);
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(246, 201, 76, .05) inset;
  animation: rise .9s .35s ease both;
}
.term__bar {
  display: flex; align-items: center; gap: 7px; padding: 10px 14px;
  background: rgba(255, 255, 255, .03); border-bottom: 1px solid var(--line);
  font-family: var(--f-mono); font-size: 12px; color: var(--muted);
}
.term__bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term__bar i:nth-child(2) { background: #febc2e; }
.term__bar i:nth-child(3) { background: #28c840; margin-right: 8px; }
.term__body {
  margin: 0; padding: 14px 16px 16px; min-height: 9.6em;
  font-family: var(--f-mono); font-size: 14px; line-height: 1.6; white-space: pre-wrap;
  color: #d5dcef;
}
.term__body .p { color: var(--teal); }
.t-out { color: var(--muted); }
.t-out.ok { color: #7ee2a0; }
.caret {
  display: inline-block; width: .55em; height: 1.1em; margin-left: 3px;
  background: var(--straw); vertical-align: -0.2em;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.js .term[data-typing] .t-out { visibility: hidden; }
.js .term[data-typing] .t-out.show { visibility: visible; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; animation: rise .9s .45s ease both; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 20px; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 15px;
  transition: transform .25s var(--ease-bounce), box-shadow .25s, background .25s;
}
.btn--gold { background: var(--straw); color: #1b1305; box-shadow: 0 8px 24px -8px rgba(246, 201, 76, .6); }
.btn--gold:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 14px 30px -8px rgba(246, 201, 76, .7); }
.btn--ghost { border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.btn--ghost:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .07); }

/* the hat */
.hero__art { position: relative; display: grid; place-items: center; }
.hat {
  all: unset; cursor: pointer; position: relative;
  width: min(420px, 100%);
  animation: bob 5s ease-in-out infinite;
  transform-origin: 50% 80%;
  -webkit-tap-highlight-color: transparent;
}
.hat:focus-visible { outline: 2px dashed var(--straw); outline-offset: 10px; border-radius: 20px; }
.hat svg { width: 100%; overflow: visible; filter: drop-shadow(0 0 30px rgba(246, 201, 76, .25)); }
.hat__brim, .hat__crown {
  fill: url(#straw); stroke: #3b2608; stroke-width: 3; stroke-linejoin: round;
}
.hat__band { fill: var(--band); stroke: #3b0d0f; stroke-width: 3; stroke-linejoin: round; }
.hat__weave path { fill: none; stroke: rgba(80, 50, 10, .45); stroke-width: 2; stroke-linecap: round; }
.hat__shadow { fill: rgba(0, 0, 0, .45); filter: blur(4px); animation: shadow 5s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.hat__hint {
  position: absolute; right: 2%; top: 4%;
  font-family: var(--f-mono); font-size: 12px; color: var(--muted);
  transform: rotate(8deg); opacity: .8;
}
.hat__hint::before { content: "↙ "; color: var(--straw); }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}
@keyframes shadow { 50% { transform: scaleX(.85); opacity: .7; } }

/* a rubbery poke */
.hat.boing { animation: boing .9s var(--ease-bounce), bob 5s .9s ease-in-out infinite; }
@keyframes boing {
  0% { transform: scale(1, 1); }
  20% { transform: scale(1.45, .6) translateY(30px); }
  40% { transform: scale(.75, 1.35) translateY(-40px) rotate(-6deg); }
  60% { transform: scale(1.12, .9) rotate(4deg); }
  80% { transform: scale(.97, 1.04); }
  100% { transform: scale(1, 1); }
}

.sparkles i {
  position: absolute; width: 10px; height: 10px;
  background: var(--straw);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: sparkle 3s ease-in-out infinite;
}
.sparkles i:nth-child(1) { top: 10%; left: 12%; }
.sparkles i:nth-child(2) { top: 22%; right: 6%; animation-delay: .8s; background: var(--teal); }
.sparkles i:nth-child(3) { bottom: 18%; left: 4%; animation-delay: 1.6s; background: var(--violet); }
.sparkles i:nth-child(4) { bottom: 8%; right: 18%; animation-delay: 2.2s; }
@keyframes sparkle { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(1.4) rotate(90deg); opacity: 1; } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 110px; z-index: 2;
  translate: -50% 0; color: var(--muted);
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  animation: cue 2.2s ease-in-out infinite;
}
.scroll-cue:hover { color: var(--straw); }
@keyframes cue { 50% { transform: translateY(8px); } }

/* waves */
.sea { position: absolute; left: 0; right: 0; bottom: -1px; height: 120px; pointer-events: none; }
.wave { position: absolute; bottom: 0; left: 0; width: 200%; height: 100%; }
.wave path { stroke: none; }
.wave--3 { height: 110px; opacity: .5; animation: drift 26s linear infinite; }
.wave--3 path { fill: var(--sea-3); }
.wave--2 { height: 95px; opacity: .75; animation: drift 18s linear infinite reverse; }
.wave--2 path { fill: var(--sea-2); }
.wave--1 { height: 80px; animation: drift 12s linear infinite; }
.wave--1 path { fill: var(--sea); }
@keyframes drift { to { transform: translateX(-50%); } }

/* ============================== SECTIONS ============================== */
.section { position: relative; padding: clamp(80px, 11vw, 140px) 0; }
.captain, .voyage { background: var(--sea); }
.voyage {
  background:
    radial-gradient(700px 400px at 90% 10%, rgba(79, 216, 200, .06), transparent 70%),
    linear-gradient(var(--sea), #0b1730 40%, var(--night-2));
}
.kicker { margin: 0 0 6px; font-family: var(--f-mono); font-size: 14px; color: var(--teal); }
.title {
  margin: 0 0 18px; font-family: var(--f-display); font-weight: 400;
  font-size: clamp(38px, 6vw, 68px); line-height: 1; color: var(--ink);
}
.title::after {
  content: ""; display: block; width: 90px; height: 10px; margin-top: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 10'%3E%3Cpath d='M0 5 Q7.5 0 15 5 T30 5 T45 5 T60 5 T75 5 T90 5' fill='none' stroke='%23f6c94c' stroke-width='2.5'/%3E%3C/svg%3E") no-repeat;
}
.lede { max-width: 60ch; color: var(--muted); margin: 0 0 40px; }

/* captain */
.captain__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 5vw, 70px); align-items: start; margin-top: 24px; }
.captain__text p { margin: 0 0 18px; color: #c9d1e4; font-size: 18px; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stats li {
  padding: 20px 18px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  border: 1px solid var(--line);
  transition: transform .3s var(--ease-bounce), border-color .3s;
}
.stats li:hover { transform: translateY(-4px) rotate(-1deg); border-color: rgba(246, 201, 76, .4); }
.stats b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 52px; line-height: 1; color: var(--straw); }
.stats span { font-size: 14px; color: var(--muted); }

/* ============================== VOYAGE ============================== */
.route {
  --marker: 64px;
  position: relative; list-style: none; margin: 30px 0 0; padding: 0;
  display: grid; gap: clamp(50px, 8vw, 90px);
}
/* the dashed sea route down the middle, with a ship that rides it */
.route__track {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 0;
}
.route__track::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -1.5px; width: 3px;
  background: repeating-linear-gradient(to bottom, rgba(246, 201, 76, .55) 0 12px, transparent 12px 24px);
  border-radius: 3px;
}
.ship {
  position: sticky; top: 48vh;
  display: grid; place-items: center;
  width: 44px; height: 44px; margin-left: -22px; z-index: 3;
  border-radius: 50%; background: var(--band); color: #fff;
  box-shadow: 0 0 0 6px rgba(229, 72, 77, .18), 0 10px 24px -6px rgba(0, 0, 0, .6);
  animation: rock 3s ease-in-out infinite;
}
.ship .ico { width: 24px; height: 24px; }
@keyframes rock { 0%, 100% { rotate: -8deg; } 50% { rotate: 8deg; } }

.stop {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--marker) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px);
  align-items: center; position: relative;
}
.stop__marker {
  grid-column: 2; grid-row: 1;
  width: var(--marker); height: var(--marker); border-radius: 50%;
  display: grid; place-items: center; z-index: 2;
  background: var(--night-2); color: var(--straw);
  border: 2px solid rgba(246, 201, 76, .5);
  box-shadow: 0 0 0 8px var(--sea);
}
.stop__marker .ico { width: 28px; height: 28px; }
.stop__marker--x { font-family: var(--f-display); font-size: 34px; color: var(--band); border-color: rgba(229, 72, 77, .6); }

.stop:nth-child(even) .poster { grid-column: 1; grid-row: 1; }
.stop:nth-child(even) .stop__note { grid-column: 3; grid-row: 1; }
.stop:nth-child(odd) .poster { grid-column: 3; grid-row: 1; }
.stop:nth-child(odd) .stop__note { grid-column: 1; grid-row: 1; text-align: right; }

.stop > * { min-width: 0; }
.stop__note { color: var(--muted); font-size: 15px; }
.stop__note p { margin: 8px 0 0; max-width: 40ch; display: inline-block; }
.stop__note .island {
  display: block; font-family: var(--f-display); font-size: 28px; line-height: 1.1; color: var(--ink);
}
.stop__note code { color: var(--teal); }

.stop--end { justify-items: center; }
.horizon {
  grid-column: 1 / -1; grid-row: 2; margin: 0; text-align: center;
  position: relative; z-index: 2; padding: 10px 22px; border-radius: 14px; background: var(--night-2);
  font-family: var(--f-display); font-size: clamp(26px, 3.5vw, 36px);
}
.horizon span { display: block; font-family: var(--f-mono); font-size: 14px; color: var(--muted); }

/* ---------- the wanted poster ---------- */
.poster {
  position: relative;
  padding: 22px 22px 24px;
  color: var(--paper-ink);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, .35), transparent 60%),
    radial-gradient(60% 40% at 10% 100%, rgba(140, 95, 40, .18), transparent 70%),
    radial-gradient(50% 30% at 95% 80%, rgba(140, 95, 40, .14), transparent 70%),
    linear-gradient(var(--paper), var(--paper-2));
  border-radius: 4px;
  box-shadow:
    0 0 0 1px rgba(80, 55, 20, .35) inset,
    0 0 40px rgba(120, 80, 30, .25) inset,
    0 30px 60px -25px rgba(0, 0, 0, .85),
    0 10px 20px -10px rgba(0, 0, 0, .6);
  transform: rotate(var(--tilt, 0deg));
  transition: transform .5s var(--ease-bounce), box-shadow .4s;
}
/* subtle paper grain */
.poster::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .2 0 0 0 0 .1 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply; opacity: .8;
}
.poster > * { position: relative; }
.poster:hover {
  transform: rotate(0deg) translateY(-8px) scale(1.015);
  box-shadow:
    0 0 0 1px rgba(80, 55, 20, .35) inset,
    0 0 40px rgba(120, 80, 30, .2) inset,
    0 40px 70px -25px rgba(0, 0, 0, .9),
    0 0 0 6px rgba(246, 201, 76, .12);
}
.pin {
  position: absolute; top: -9px; left: 50%; z-index: 2; translate: -50% 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff9a9d, var(--band) 45%, #8f1d22);
  box-shadow: 0 4px 6px rgba(0, 0, 0, .5);
}
.stamp {
  position: absolute; top: 74px; right: -12px; z-index: 3;
  padding: 6px 12px; border: 3px double var(--band); border-radius: 6px;
  font-family: var(--f-mono); font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--band); background: rgba(239, 225, 189, .85);
  transform: rotate(9deg);
}
.stamp--green { border-color: #2e7d4f; color: #2e7d4f; }

.poster__head { text-align: center; line-height: 1; }
.poster__wanted {
  display: block; font-family: var(--f-display); font-size: clamp(54px, 6.5vw, 76px);
  letter-spacing: .06em; text-transform: uppercase; color: var(--paper-ink);
}
.poster__sub {
  display: block; margin-top: 2px;
  font-family: var(--f-mono); font-weight: 600; font-size: 12px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--paper-muted);
}
.poster__photo {
  margin: 14px 0 12px; aspect-ratio: 16 / 10; overflow: hidden;
  border: 3px solid var(--paper-ink); border-radius: 2px;
  background: #1c140b;
  box-shadow: 0 0 0 4px rgba(239, 225, 189, .6), 0 0 0 5px rgba(44, 29, 15, .5);
}
.poster__photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: top left;
  filter: sepia(.55) contrast(1.05) saturate(.85);
  transition: filter .6s ease, transform .8s ease;
}
.poster:hover .poster__photo img { filter: none; transform: scale(1.04); }

.poster__photo--dock {
  display: grid; place-items: center; padding: 0 6%;
  background:
    radial-gradient(80% 90% at 30% 20%, #1c6b52, transparent 70%),
    radial-gradient(80% 80% at 90% 90%, #0f4a3a, transparent 70%),
    #0b2b24;
}
.poster__photo--dock img { height: auto; object-fit: contain; border-radius: 6px; }
.poster:hover .poster__photo--dock img { transform: scale(1.08); }

.poster__photo--phones {
  display: flex; justify-content: center; align-items: flex-start; gap: 6%;
  padding-top: 7%;
  background: radial-gradient(90% 90% at 50% 10%, #2b4d2b, #142414);
}
.poster__photo--phones .phone {
  width: 34%; height: auto; border-radius: 12px; object-fit: contain;
  border: 3px solid #0e0e0e; box-shadow: 0 12px 26px -8px rgba(0, 0, 0, .7);
}
.phone--a { rotate: -6deg; }
.phone--b { rotate: 5deg; margin-top: 6%; }
.poster:hover .phone--a { transform: translateY(-6px) rotate(-2deg); }
.poster:hover .phone--b { transform: translateY(-10px) rotate(3deg); }

.poster__photo--term {
  position: relative; padding: 14px 16px; background: #0b0f17; color: #c8d0e0;
  font-family: var(--f-mono); font-size: 12px;
}
.term-logo {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  width: 44px !important; height: 44px !important; border-radius: 10px;
  filter: none !important; transform: none !important;
}
.logtail { height: 100%; overflow: hidden; mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); }
.logtail__roll { animation: tail 14s linear infinite; }
.poster:hover .logtail__roll { animation-duration: 5s; }
.logtail p { margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logtail i { font-style: normal; color: #5d6a85; }
.logtail u { text-decoration: none; font-weight: 600; }
.c1 { color: #7ee2a0; } .c2 { color: #6cb6ff; } .c3 { color: #c7a1ff; } .c4 { color: #f6c94c; } .c5 { color: #ff8a8d; }
@keyframes tail { to { transform: translateY(-50%); } }

.poster__name {
  margin: 4px 0 0; text-align: center;
  font-family: var(--f-display); font-weight: 400; font-size: clamp(36px, 4.2vw, 48px); line-height: 1;
}
.poster__bounty {
  margin: 4px 0 6px; text-align: center;
  font-family: var(--f-display); font-size: clamp(28px, 3.2vw, 36px); letter-spacing: .04em;
}
.berry { margin-right: 6px; color: var(--band); }
.dash { margin-left: 4px; }
.poster__crime {
  margin: 0 0 12px; text-align: center; font-style: italic; font-size: 15px; color: var(--paper-muted);
}
.poster__crime::before { content: "Wanted "; font-style: normal; font-weight: 700; color: var(--paper-ink); }
.poster__desc { margin: 0 0 14px; font-size: 15px; line-height: 1.55; }
.poster__desc code { background: rgba(44, 29, 15, .1); padding: 1px 5px; border-radius: 4px; }

.tags { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  padding: 3px 10px; border-radius: 999px; font-family: var(--f-mono); font-size: 12px;
  border: 1.5px solid rgba(44, 29, 15, .45); color: var(--paper-ink);
}
.poster__links { display: flex; flex-wrap: wrap; gap: 10px; }
.ink-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 8px; text-decoration: none;
  font-weight: 700; font-size: 14px;
  background: var(--paper-ink); color: var(--paper);
  box-shadow: 3px 3px 0 var(--band);
  transition: transform .2s var(--ease-bounce), box-shadow .2s;
}
.ink-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--band); }
.ink-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--band); }
.ink-btn--soft { background: transparent; color: var(--paper-ink); border: 2px solid var(--paper-ink); box-shadow: 3px 3px 0 rgba(44, 29, 15, .35); }
.ink-btn--soft:hover { box-shadow: 5px 5px 0 rgba(44, 29, 15, .35); }
.ink-btn--play { box-shadow: 3px 3px 0 #2e7d4f; }
.ink-btn--play:hover { box-shadow: 5px 5px 0 #2e7d4f; }

/* ============================== ARSENAL ============================== */
.arsenal { background: var(--night-2); }
.crates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.crate {
  padding: 24px; border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .018) 0 2px, transparent 2px 60px),
    linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .01));
  transition: transform .35s var(--ease-bounce), border-color .3s;
}
.crate:hover { transform: translateY(-6px) rotate(.6deg); border-color: rgba(79, 216, 200, .45); }
.crate h3 {
  display: flex; align-items: center; gap: 10px; margin: 0 0 16px;
  font-family: var(--f-display); font-weight: 400; font-size: 30px;
}
.crate h3 .ico { color: var(--teal); width: 26px; height: 26px; }
.crate ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.crate li {
  padding: 6px 12px; border-radius: 8px; font-family: var(--f-mono); font-size: 13px;
  background: rgba(255, 255, 255, .04); border: 1px dashed rgba(160, 185, 230, .25);
  transition: background .2s, color .2s, border-color .2s;
}
.crate li:hover { background: rgba(246, 201, 76, .12); color: var(--straw); border-color: rgba(246, 201, 76, .5); }

/* ============================== BOTTLE ============================== */
.bottle { background: linear-gradient(var(--night-2), var(--sea)); text-align: center; padding-bottom: 180px; }
.bottle__inner { display: grid; justify-items: center; }
.bottle__inner .title::after { margin-inline: auto; }
.bottle__inner .lede { margin-bottom: 8px; }
.bottle .hero__cta { justify-content: center; }
.bottle__icon {
  width: 72px; height: 72px; margin-bottom: 12px;
  fill: none; stroke: var(--straw); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
  animation: float 4s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-14deg); } 50% { transform: translateY(-10px) rotate(10deg); } }

/* ============================== FOOTER ============================== */
.footer { position: relative; background: var(--night); padding: 40px var(--gutter) 50px; text-align: center; }
.sea--footer { top: -118px; bottom: auto; }
.sea--footer .wave--1 path { fill: var(--night); }
.sea--footer .wave--2 path { fill: var(--night-2); }
.footer__inner p { margin: 4px 0; font-size: 14px; }
.footer .muted { color: var(--muted); }
.jolly {
  font-family: var(--f-mono); font-weight: 600; font-size: 28px !important; color: var(--straw);
  text-shadow: 0 0 20px rgba(246, 201, 76, .4);
}

/* ============================== LOG POSE ============================== */
.logpose {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  width: 58px; height: 58px; border-radius: 50%;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .55));
  transition: transform .3s var(--ease-bounce), opacity .3s;
  opacity: 0; pointer-events: none;
}
.logpose.on { opacity: 1; pointer-events: auto; }
.logpose:hover { transform: scale(1.12); }
.logpose svg { width: 100%; height: 100%; }
.lp-ring { fill: #3a2a12; stroke: var(--straw); stroke-width: 3; }
.lp-face { fill: #0d1a35; stroke: rgba(246, 201, 76, .35); stroke-width: 1; }
.lp-ticks path { stroke: var(--straw); stroke-width: 2; stroke-linecap: round; }
.lp-needle {
  transform-origin: 32px 32px;
  transform: rotate(var(--needle, 0deg));
  transition: transform .5s var(--ease-bounce);
}
.lp-needle .n { fill: var(--band); }
.lp-needle .s { fill: #e9edf6; }
.lp-needle circle { fill: var(--straw); }

/* ============================== TOAST ============================== */
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 60;
  translate: -50% 20px; opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 999px;
  background: var(--paper); color: var(--paper-ink); font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .7);
  transition: opacity .3s, translate .4s var(--ease-bounce);
}
.toast.show { opacity: 1; translate: -50% 0; }

/* ============================== REVEAL ============================== */
.js .reveal { opacity: 0; translate: 0 40px; transition: opacity .8s ease, translate .8s var(--ease-bounce); }
.js .reveal.seen { opacity: 1; translate: 0 0; }

/* ============================== RESPONSIVE ============================== */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { order: -1; width: min(300px, 70%); margin: 0 auto -10px; }
  .hat__hint { display: none; }
  .moon { top: 9%; right: 6%; }
  .captain__grid { grid-template-columns: 1fr; }
  .crates { grid-template-columns: 1fr; }

  .route { --marker: 46px; gap: 56px; }
  .route__track { left: calc(var(--marker) / 2); }
  .stop { grid-template-columns: var(--marker) minmax(0, 1fr); gap: 14px 16px; align-items: start; }
  .stop__marker { grid-column: 1; grid-row: 1; }
  .stop__marker .ico { width: 22px; height: 22px; }
  .stop:nth-child(n) .poster { grid-column: 2; grid-row: 1; }
  .stop:nth-child(n) .stop__note { grid-column: 2; grid-row: 2; text-align: left; }
  .stop--end { justify-items: start; }
  .stop--end .horizon { grid-column: 2; grid-row: 1; text-align: left; align-self: center; }
  .ship { width: 36px; height: 36px; margin-left: -18px; }
  .ship .ico { width: 20px; height: 20px; }
  .stamp { right: -8px; top: 8px; font-size: 11px; }
}
@media (max-width: 560px) {
  .nav__links a:not([href="#voyage"]):not([href="#bottle"]) { display: none; }
  .hero { padding-top: 90px; }
  .term__body { font-size: 12.5px; }
  .poster { padding: 18px 14px 20px; }
  .poster__desc { font-size: 14.5px; }
  .stats b { font-size: 42px; }
  .logpose { width: 48px; height: 48px; right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; translate: none; }
}
