/* MURKY landing: the page is the water column. Colors lifted from the game's HUD, haul card and sprites. */
/* The game's own fonts, self-hosted (OFL, see fonts/OFL.txt): no request to a font CDN. */
@font-face { font-family: "Lilita One"; src: url(/fonts/lilita-one.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Nunito"; src: url(/fonts/nunito.woff2) format("woff2"); font-weight: 200 1000; font-display: swap; }
:root {
  --water-1: #2a7a70;
  --water-2: #17544d;
  --water-3: #0d3733;
  --water-4: #072320;
  --abyss: #041513;
  --mud: #2b2117;
  --paper: #fff4dc;
  --paper-edge: #e9d6ae;
  --ink: #2b1a10;
  --ink-soft: #6b5440;
  --foam: #dff4ee;
  --foam-soft: #9fc9bf;
  --rust: #c8642c;
  --red: #e3402f;
  --gold: #ffc21a;
  --slime: #8dc63f;
  --hud: #12302d;
  --hud-edge: #e9dcc0;
  --r-common: #9aa5a0;
  --r-uncommon: #5fd38d;
  --r-rare: #4fb3ff;
  --r-epic: #c76bff;
  --r-legendary: #ffb400;
  --r-ballast: #7a6a5a;
  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Nunito", system-ui, sans-serif;
  --gutter: clamp(16px, 6vw, 96px);
  --col: 34rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--abyss);
  color: var(--foam);
  font: 600 1.0625rem/1.55 var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, .haul-title, .haul-sum { font-family: var(--display); font-weight: 400; letter-spacing: .01em; margin: 0; }
h2 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.02;
  color: var(--paper);
  text-shadow: 0 4px 0 rgba(0, 0, 0, .35);
  max-width: 14ch;
}
.intro { max-width: var(--col); color: var(--foam-soft); margin: 1rem 0 0; }

/* ---------- HUD (same three pills as the dive screen) ---------- */
.hud {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) var(--gutter) 10px;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud-logo img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 2px 0 rgba(0,0,0,.4); }
.pill {
  display: flex; align-items: center; gap: 7px;
  background: color-mix(in srgb, var(--hud) 92%, transparent);
  border: 2.5px solid var(--hud-edge);
  border-radius: 14px;
  padding: 5px 12px 5px 9px;
  font: 400 1.15rem/1 var(--display);
  color: var(--paper);
  min-width: 4.6rem;
}
.pill img { width: 22px; height: 22px; object-fit: contain; }
.pill.cash b { color: var(--gold); }
.pill b { font-weight: 400; font-variant-numeric: tabular-nums; }
.hud-tools { margin-left: auto; display: flex; gap: 6px; }
.tool {
  background: rgba(0, 0, 0, .35); border: 1.5px solid rgba(255, 244, 220, .35);
  border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: .85rem;
}
.tool[aria-pressed="true"] { background: var(--paper); color: var(--ink); }

/* ---------- rope + magnet ---------- */
#rope { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 30; pointer-events: none; overflow: visible; }
#rope-path { fill: none; stroke: #b8935a; stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 2px 0 rgba(0,0,0,.35)); }
#magnet {
  position: fixed; left: 0; top: 0; z-index: 31;
  width: 96px; height: 96px; margin: -10px 0 0 -48px;
  pointer-events: none; will-change: transform;
}
#magnet-img { width: 96px; height: 96px; object-fit: contain; position: relative; z-index: 2; filter: drop-shadow(0 6px 6px rgba(0,0,0,.4)); }
#cluster { position: absolute; inset: 0; z-index: 1; }
#cluster img { position: absolute; width: 52px; height: 52px; object-fit: contain; left: 50%; top: 50%; filter: drop-shadow(0 3px 2px rgba(0,0,0,.4)); }
#magnet.clank #magnet-img { animation: clank .22s ease-out; }
@keyframes clank { 40% { transform: scale(1.14) rotate(-6deg); } }

.pop {
  position: fixed; z-index: 40; pointer-events: none;
  font: 400 1.6rem/1 var(--display); color: var(--paper);
  -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill;
  animation: pop 1s ease-out forwards;
}
@keyframes pop { from { transform: translate(-50%, 0) scale(.6); opacity: 0; } 15% { transform: translate(-50%, -10px) scale(1.1); opacity: 1; } to { transform: translate(-50%, -70px); opacity: 0; } }

/* new-find toast, like the haul list rows */
#toast {
  position: fixed; z-index: 45; left: var(--gutter); bottom: max(18px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px;
  max-width: min(26rem, calc(100vw - 32px));
  background: var(--paper); color: var(--ink);
  border: 3px solid var(--paper-edge); border-radius: 18px;
  padding: 10px 16px 10px 10px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .3);
  transform: translateY(140%); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1);
}
#toast.show { transform: none; }
#toast img { width: 52px; height: 52px; object-fit: contain; flex: none; }
#toast b { font: 400 1.15rem/1.1 var(--display); display: block; }
#toast span { font-size: .92rem; color: var(--ink-soft); line-height: 1.3; display: block; }

/* ---------- surface / hero ---------- */
.surface {
  position: relative; min-height: 100svh;
  display: grid; align-content: start; justify-items: center; text-align: center;
  padding: calc(84px + 2vh) var(--gutter) 30vh;
  overflow: hidden;
}
.surface-bg {
  position: absolute; inset: 0;
  background: url(img/s_canal.webp) center bottom / cover no-repeat;
}
.surface-bg::after { /* calm the busy town behind the copy */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 55% at 50% 30%, rgba(14, 40, 60, .55), transparent 75%);
}
.surface-copy { position: relative; z-index: 2; max-width: 44rem; }
.logo { width: min(560px, 82vw); margin: 0 auto; filter: drop-shadow(0 10px 0 rgba(0,0,0,.25)); }
h1 {
  margin-top: .4rem;
  font-size: clamp(1.7rem, 4.2vw, 2.9rem); line-height: 1.08;
  color: var(--paper);
  -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--ink);
}
.lede {
  margin: 1rem auto 0; max-width: 32rem;
  background: rgba(10, 28, 26, .72); border-radius: 16px; padding: .8rem 1.1rem;
  color: var(--foam);
}
.hint-touch { display: none; }
@media (hover: none) { .hint-desk { display: none; } .hint-touch { display: inline; } }
.angler {
  position: absolute; z-index: 3; width: clamp(120px, 15vw, 210px);
  left: clamp(4px, 9vw, 180px); bottom: calc(7vh + 10px); /* fallback; main.js puts the boots on the quay */
}
.waterline {
  position: absolute; left: 0; right: 0; bottom: 0; height: 9vh; z-index: 2;
  background: linear-gradient(to bottom, transparent, var(--water-1) 85%);
}

/* ---------- store buttons ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 1.4rem; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--paper); text-decoration: none;
  border: 3px solid var(--paper); border-radius: 16px;
  padding: 9px 18px 9px 12px; min-width: 12.5rem;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .35);
  transition: transform .12s, box-shadow .12s;
}
a.store:hover { transform: translateY(-2px); box-shadow: 0 7px 0 rgba(0, 0, 0, .35); }
a.store:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: .72rem; font-weight: 800; opacity: .75; line-height: 1.1; text-align: left; }
.store strong { display: block; font: 400 1.2rem/1.1 var(--display); text-align: left; }
.store.soon { opacity: .82; border-style: dashed; cursor: default; }

/* ---------- the water column ---------- */
.water {
  position: relative;
  background:
    radial-gradient(40% 900px at 70% 0, rgba(180, 255, 230, .12), transparent 70%),
    linear-gradient(to bottom, var(--water-1) 0, var(--water-2) 18%, var(--water-3) 45%, var(--water-4) 72%, var(--abyss) 88%, var(--mud) 100%);
}
#loot, #marks { position: absolute; inset: 0; pointer-events: none; }
.loot {
  position: absolute; width: 64px; height: 64px; object-fit: contain; z-index: 1;
  margin: -32px 0 0 -32px;
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .35)) saturate(.85);
  animation: bob 5s ease-in-out infinite alternate;
}
.loot.big { width: 96px; height: 96px; margin: -48px 0 0 -48px; }
@keyframes bob { from { translate: 0 -5px; rotate: -6deg; } to { translate: 0 6px; rotate: 5deg; } }
.mark {
  position: absolute; left: 10px; font: 400 .9rem/1 var(--display); color: rgba(223, 244, 238, .28);
  border-top: 2px solid rgba(223, 244, 238, .14); width: 46px; padding-top: 4px;
}

.block { position: relative; z-index: 2; padding: clamp(110px, 18vh, 200px) var(--gutter); }
.block > h2, .block > .intro { margin-left: 0; }

/* sequence: drop, steer, reel up */
.how .steps { list-style: none; counter-reset: step; padding: 0; margin: 2.2rem 0 0; display: grid; gap: 1.6rem; max-width: var(--col); }
.how li { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: start; counter-increment: step; }
.how li img { width: 64px; height: 64px; object-fit: contain; }
.how h3 { font-size: 1.6rem; color: var(--paper); }
.how h3::before { content: counter(step) ". "; color: var(--gold); }
.how p { margin: .2rem 0 0; color: var(--foam-soft); }

/* spots: a horizontal strip of the seven backdrops */
.spot-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 420px); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin: 2.2rem calc(-1 * var(--gutter)) 0; padding: 30px var(--gutter) 22px;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: thin; scrollbar-color: var(--water-1) transparent;
}
.spot {
  position: relative; scroll-snap-align: start;
  border-radius: 22px; overflow: visible;
  background: var(--hud); border: 3px solid var(--hud-edge);
}
.spot-pic { border-radius: 19px 19px 0 0; overflow: hidden; aspect-ratio: 16 / 9; }
.spot-pic img { width: 100%; height: 100%; object-fit: cover; }
.spot-beast {
  position: absolute; right: -6px; top: -26px; width: 42%; max-width: 170px;
  filter: drop-shadow(0 6px 4px rgba(0, 0, 0, .45));
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1);
}
.spot:hover .spot-beast, .spot:focus-within .spot-beast { transform: rotate(-8deg) scale(1.08); }
.spot-txt { padding: 14px 18px 18px; }
.spot-txt h3 { font-size: 1.55rem; color: var(--paper); }
.spot-txt p { margin: .25rem 0 0; font-size: .95rem; color: var(--foam-soft); }
.spot-txt .beast { margin-top: .6rem; color: var(--paper); font-weight: 800; }
.spot-txt .beast em { font: 400 1rem/1 var(--display); font-style: normal; color: var(--gold); margin-left: .35rem; }

/* vault */
.vault { display: grid; grid-template-columns: minmax(0, var(--col)) auto; gap: clamp(24px, 6vw, 80px); align-items: center; justify-content: start; }
.vault-copy p { color: var(--foam-soft); margin: 1rem 0 0; max-width: 28rem; }
.vault-try { font-weight: 800; color: var(--gold) !important; }
.safe {
  position: relative; background: none; border: 0; padding: 0;
  width: clamp(180px, 24vw, 260px); aspect-ratio: 1;
}
.safe img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 8px rgba(0, 0, 0, .5)); transition: transform .15s; }
.safe:active img { transform: scale(.96); }
.safe.shake img { animation: shake .3s; }
@keyframes shake { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
.safe.open img { animation: burst .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes burst { from { transform: scale(.8); } }
.loot-fly {
  position: fixed; z-index: 41; width: 64px; height: 64px; object-fit: contain; pointer-events: none;
  margin: -32px 0 0 -32px;
}
.jackpot { color: var(--gold) !important; font: 400 1.8rem/1 var(--display) !important; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }

/* crew + magnet skins */
.crew { display: flex; gap: clamp(6px, 2vw, 22px); margin-top: 2rem; align-items: flex-end; flex-wrap: wrap; }
.crew button, .skins button { background: none; border: 0; padding: 0; position: relative; }
.crew button { width: clamp(86px, 9.5vw, 140px); text-align: center; }
.crew img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; object-position: bottom; transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.crew button:hover img { transform: translateY(-4px); }
.crew span { display: block; font: 400 1.05rem/1.1 var(--display); color: var(--foam-soft); margin-top: 6px; }
.crew button[aria-pressed="true"] span { color: var(--gold); }
.crew button[aria-pressed="true"]::after {
  content: ""; position: absolute; left: 15%; right: 15%; bottom: 1.6rem; height: 10px; z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 194, 26, .55), transparent);
}
.skins { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.8rem; max-width: 40rem; }
.skins button {
  width: 64px; height: 64px; border-radius: 16px;
  background: rgba(0, 0, 0, .25); border: 2.5px solid transparent;
}
.skins button[aria-pressed="true"] { border-color: var(--gold); background: rgba(255, 194, 26, .12); }
.skins img { width: 52px; height: 52px; object-fit: contain; margin: auto; }

/* rope end + haul */
.rope-end { position: relative; z-index: 2; padding: 0 var(--gutter); }
.rope-end span {
  display: block; font: 400 1.15rem/1 var(--display); color: rgba(223, 244, 238, .5);
  border-bottom: 4px dashed rgba(223, 244, 238, .3); padding-bottom: 10px;
}
.haul { text-align: center; display: grid; justify-items: center; padding-bottom: 80px; }
.haul h2 { max-width: none; margin-top: 3.5rem; }
.haul .intro { margin-left: auto; margin-right: auto; }
.haul-card {
  width: min(100%, 34rem);
  background: var(--paper); color: var(--ink);
  border: 3px solid var(--paper-edge); border-radius: 28px;
  padding: 26px 22px 24px;
  box-shadow: 0 10px 0 rgba(0, 0, 0, .35);
}
.haul-title { font-size: clamp(3.4rem, 9vw, 5rem); line-height: .9; color: var(--gold); -webkit-text-stroke: 9px var(--ink); paint-order: stroke fill; }
.haul-sum { font-size: clamp(2.4rem, 6vw, 3.2rem); line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.haul-meta { margin: .2rem 0 0; color: var(--ink-soft); font-weight: 800; }
.haul-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; min-height: 60px; }
.haul-grid img { width: 54px; height: 54px; object-fit: contain; }
.haul-grid .empty { color: var(--ink-soft); align-self: center; }
.again {
  margin-top: 1.4rem; background: var(--slime); color: #173006;
  border: 0; border-radius: 16px; padding: 12px 26px;
  font: 400 1.3rem/1 var(--display); box-shadow: 0 5px 0 #4f7a1c;
}
.again:active { transform: translateY(3px); box-shadow: 0 2px 0 #4f7a1c; }

.foot { position: relative; z-index: 2; text-align: center; padding: 30px var(--gutter) max(30px, env(safe-area-inset-bottom)); color: rgba(223, 244, 238, .55); font-size: .9rem; }

/* ---------- layout: desktop keeps a free lane for the magnet on the right ---------- */
@media (min-width: 900px) {
  .how, .gear { padding-right: 45vw; }
  .spots .intro, .spots h2 { max-width: 40rem; }
}
@media (max-width: 899px) {
  .vault { grid-template-columns: 1fr; justify-items: start; }
  .hud { gap: 6px; }
  .pill { min-width: 0; padding: 4px 9px 4px 7px; font-size: 1rem; border-radius: 12px; }
  .pill img { width: 18px; height: 18px; }
  .hud-logo { display: none; }
  #magnet { width: 76px; height: 76px; margin-left: -38px; }
  #magnet-img { width: 76px; height: 76px; }
  #cluster img { width: 42px; height: 42px; }
  .loot { width: 54px; height: 54px; margin: -27px 0 0 -27px; }
  .loot.big { width: 66px; height: 66px; margin: -33px 0 0 -33px; }
  .surface { padding-bottom: 34vh; }
  .block { padding-top: 150px; padding-bottom: 150px; }
  .surface-bg { background-position: 30% bottom; }
}
@media (max-width: 420px) {
  .tool { padding: 5px 9px; font-size: .78rem; }
  .pill.count { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .loot { animation: none; }
  #magnet.clank #magnet-img, .safe.shake img, .safe.open img { animation: none; }
  .pop { animation-duration: .01s; }
}
