/* Big Catch Mania — the app's own parts, in CSS: anodized plates with a
   keyline and a flat drop, the orange thumb bar in its dark slot, decal
   lettering in Kanit 900 italic with an abyss keyline, night decal bars. */

@font-face {
  font-family: "Kanit";
  src: url("../fonts/Kanit-BlackItalic.ttf") format("truetype");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Kanit";
  src: url("../fonts/Kanit-ExtraBoldItalic.ttf") format("truetype");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/Nunito-Variable.ttf") format("truetype");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --abyss: #020c2d;
  --night: #03194a;
  --trench: #062b61;
  --deep: #0f417e;
  --open: #14599b;
  --lake: #1370ba;
  --surface: #36a1d1;
  --lagoon: #1cd2d7;
  --shallows: #91e2ec;
  --spray: #ccf2f7;
  --sail: #f9fcfe;
  --mist: #edf5f9;
  --mist-shade: #d9e5ec;
  --slate300: #a6b3c1;
  --slate500: #617083;
  --slate900: #0d1a2c;
  --bobber: #f66c0f;
  --bobber-lit: #ffa05c;
  --bobber-deep: #d35721;
  --trophy: #f4b306;
  --trophy-deep: #da8a11;
  --sun: #fdee52;
  --kelp: #00b28b;
  --contact: rgba(2, 12, 45, 0.55);
  --r-plate: 30px 12px 30px 12px;
  --r-mid: 22px 9px 22px 9px;
  --r-small: 16px 6px 16px 6px;
  --r-decal: 3px 10px 3px 10px;
  --ease-snap: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: "Nunito", system-ui, sans-serif;
  background: var(--night);
  color: var(--sail);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--sun); color: var(--abyss); }

a { color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }

/* ---------- Decal lettering ---------- */
.decal {
  font-family: "Kanit", sans-serif;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--sail);
  -webkit-text-stroke: 0.14em var(--abyss);
  paint-order: stroke fill;
  filter: drop-shadow(0 0.09em 0 var(--abyss));
  line-height: 1.02;
}
.decal-sun { color: var(--sun); }
.decal-gold { color: var(--trophy); }
.decal-bobber { color: var(--bobber-lit); }
.decal-thin { -webkit-text-stroke-width: 0.1em; filter: drop-shadow(0 0.07em 0 var(--abyss)); }

.lift { text-shadow: 0 2px 0 rgba(2, 12, 45, 0.7); }

/* ---------- Plates ---------- */
.plate {
  position: relative;
  border-radius: var(--r-plate);
  background: linear-gradient(165deg, var(--surface) 0%, var(--lake) 38%, var(--open) 100%);
  box-shadow: 0 0 0 3px var(--abyss), 0 6px 0 3px var(--contact);
  overflow: hidden;
  isolation: isolate;
}
.plate::after {
  /* lit top edge, shaded bottom edge */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 2px 0 rgba(249, 252, 254, 0.45), inset 0 -3px 0 var(--deep);
  pointer-events: none;
  z-index: 2;
}
.plate-mid { border-radius: var(--r-mid); }
.plate-small { border-radius: var(--r-small); }
.plate-night { background: var(--night); }
.plate-night::after { box-shadow: inset 0 2px 0 var(--deep), inset 0 -3px 0 var(--abyss); }
.plate-trench { background: var(--trench); }
.plate-trench::after { box-shadow: inset 0 2px 0 var(--deep), inset 0 -3px 0 var(--abyss); }
.plate-gold { background: linear-gradient(165deg, #fef4ce 0%, var(--trophy) 40%, var(--trophy-deep) 100%); color: var(--abyss); }
.plate-gold::after { box-shadow: inset 0 2px 0 rgba(249, 252, 254, 0.55), inset 0 -3px 0 #7a4c18; }
.plate-paper { background: var(--sail); color: var(--slate900); }
.plate-paper::after { box-shadow: inset 0 2px 0 #fff, inset 0 -3px 0 var(--mist-shade); }

/* speed stripes: three slanted decals on the right */
.stripes::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 62%, rgba(54, 161, 209, 0.38) 62%, rgba(54, 161, 209, 0.38) 70%, transparent 70%),
    linear-gradient(112deg, transparent 72.5%, rgba(145, 226, 236, 0.28) 72.5%, rgba(145, 226, 236, 0.28) 76%, transparent 76%),
    linear-gradient(112deg, transparent 78.5%, rgba(54, 161, 209, 0.38) 78.5%, rgba(54, 161, 209, 0.38) 80.5%, transparent 80.5%);
}
.plate > * { position: relative; z-index: 1; }

/* slotted screws in a plate's corners */
.screw {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e7eef4, #a6b3c1 60%, #617083);
  box-shadow: 0 0 0 2px var(--abyss);
  z-index: 3;
}
.screw::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 5px;
  height: 2px;
  background: var(--abyss);
  border-radius: 1px;
  transform: rotate(var(--turn, 25deg));
}
.screw.tl { left: 9px; top: 9px; --turn: 23deg; }
.screw.tr { right: 9px; top: 9px; --turn: -40deg; }
.screw.bl { left: 9px; bottom: 9px; --turn: -11deg; }
.screw.br { right: 9px; bottom: 9px; --turn: 63deg; }

/* ---------- Night decal bar (chips, tags) ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  background: var(--night);
  border-radius: var(--r-decal);
  box-shadow: 0 0 0 2px var(--abyss), 0 3px 0 2px var(--contact);
  padding: 0.32em 0.8em 0.38em;
  font-weight: 800;
  font-size: 0.9rem;
  line-height: 1.2;
  color: var(--sail);
  white-space: nowrap;
}
.chip i { color: var(--shallows); }

/* rarity badges, from RarityColors */
.rarity { display: inline-flex; align-items: center; gap: 0.35em; border-radius: var(--r-decal); padding: 0.2em 0.65em 0.24em; font-family: "Kanit", sans-serif; font-weight: 900; font-style: italic; font-size: 0.74rem; letter-spacing: 0.02em; text-transform: uppercase; box-shadow: 0 0 0 2px var(--abyss); }
.rarity::before { content: ""; width: 0.5em; height: 0.5em; border-radius: 50%; background: currentColor; }
.r-common { background: #e9edf2; color: #4c5969; }
.r-uncommon { background: #e1f8dc; color: #1c5c23; }
.r-rare { background: #e0efff; color: #175198; }
.r-epic { background: #f0e9ff; color: #471e86; }
.r-legendary { background: #fef4ce; color: #7a4c18; }

/* ---------- The thumb bar: the orange primary button in its dark slot ---------- */
.thumb {
  --bar-h: 52px;
  position: relative;
  display: inline-flex;
  max-width: 100%;
  background: var(--night);
  border-radius: 18px 18px 22px 22px / 12px 12px 18px 18px;
  box-shadow: 0 0 0 3px var(--abyss), 0 6px 0 3px var(--contact);
  padding: 6px 8px 12px;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  -webkit-tap-highlight-color: transparent;
}
.thumb::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: var(--abyss);
  border-radius: 18px 18px 0 0 / 12px 12px 0 0;
}
.thumb .bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  width: 100%;
  min-height: var(--bar-h);
  padding: 8px 40px 10px;
  border-radius: 50% 50% 14px 14px / 11px 11px 14px 14px;
  background: linear-gradient(var(--bobber-lit) 0 4px, var(--bobber) 4px calc(100% - 5px), var(--bobber-deep) calc(100% - 5px));
  box-shadow: 0 0 0 3px var(--abyss);
  transition: transform 0.18s var(--ease-snap), filter 0.18s ease;
  transform-origin: 18% 100%;
}
.thumb .bar::before,
.thumb .bar::after {
  /* rubber grips at both ends */
  content: "";
  position: absolute;
  top: 28%;
  height: 42%;
  width: 16px;
  background: repeating-linear-gradient(90deg, var(--bobber-deep) 0 2px, transparent 2px 6px);
}
.thumb .bar::before { left: 12px; }
.thumb .bar::after { right: 10px; }
.thumb .label {
  font-family: "Kanit", sans-serif;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  font-size: clamp(0.95rem, 0.8rem + 0.9vw, 1.35rem);
  line-height: 1.05;
  text-align: center;
  color: var(--sail);
  -webkit-text-stroke: 0.14em var(--abyss);
  paint-order: stroke fill;
  filter: drop-shadow(0 0.09em 0 var(--abyss));
}
.thumb .label i { -webkit-text-stroke: 0; }
.thumb .bar > i { font-size: 1.35em; color: var(--sail); filter: drop-shadow(0 2px 0 var(--abyss)); }
.thumb:hover .bar { filter: brightness(1.06) saturate(1.05); transform: translateY(-1px); }
.thumb:active .bar { transform: translateY(5px) rotate(1deg); filter: brightness(0.97); }
.thumb.small { --bar-h: 40px; padding: 5px 6px 9px; }
.thumb.small .bar { padding: 5px 28px 7px; }
.thumb.small .label { font-size: 0.95rem; }
.thumb.small .bar::before, .thumb.small .bar::after { width: 10px; }
.thumb.small .bar::before { left: 8px; }
.thumb.small .bar::after { right: 6px; }

/* the dark secondary bar of the same family */
.slotbar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  max-width: 100%;
  min-height: 52px;
  padding: 10px 26px 12px;
  border-radius: 18px 18px 22px 22px / 12px 12px 18px 18px;
  background: linear-gradient(var(--deep) 0 3px, var(--trench) 3px calc(100% - 4px), var(--abyss) calc(100% - 4px));
  box-shadow: 0 0 0 3px var(--abyss), 0 6px 0 3px var(--contact);
  font-family: "Kanit", sans-serif;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  font-size: clamp(0.92rem, 0.8rem + 0.6vw, 1.15rem);
  color: var(--sail);
  text-decoration: none;
  transition: transform 0.18s var(--ease-snap), background 0.2s ease;
  border: 0;
  cursor: pointer;
}
.slotbar:hover { transform: translateY(-1px); background: linear-gradient(var(--open) 0 3px, var(--deep) 3px calc(100% - 4px), var(--abyss) calc(100% - 4px)); }
.slotbar:active { transform: translateY(4px); }
.slotbar i { color: var(--shallows); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(3, 25, 74, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--abyss);
}
.nav-link {
  position: relative;
  font-family: "Kanit", sans-serif;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: var(--mist-shade);
  text-decoration: none;
  padding: 0.4rem 0.2rem;
  transition: color 0.2s ease;
}
.nav-link::after {
  /* the level-wind guide: a kelp line under the page on show */
  content: "";
  position: absolute;
  left: 0.2rem;
  right: 0.2rem;
  bottom: -2px;
  height: 3px;
  border-radius: 2px;
  background: var(--kelp);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease-snap);
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--sail); }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }

.knurl {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  color: var(--sail);
  background:
    radial-gradient(circle, var(--trench) 0 58%, transparent 59%),
    repeating-conic-gradient(var(--slate500) 0 6deg, var(--mist-shade) 6deg 12deg);
  box-shadow: 0 0 0 3px var(--abyss), 0 4px 0 3px var(--contact);
}
.knurl:hover { filter: brightness(1.1); }

.mobile-menu { display: none; }
.mobile-menu.open { display: block; }

/* ---------- World backgrounds ---------- */
.lake-world {
  background:
    linear-gradient(180deg, rgba(3, 25, 74, 0) 0%, rgba(3, 25, 74, 0) 55%, var(--night) 100%),
    linear-gradient(180deg, #a3daf7 0%, #f9f2d8 36%, #64bcb9 36.2%, #126e83 100%);
}
.water {
  background: linear-gradient(180deg, var(--lake) 0%, var(--deep) 45%, var(--trench) 100%);
}
.water-ripples {
  position: relative;
}
.water-ripples::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 38px 4px at 12% 18%, rgba(249, 252, 254, 0.18), transparent 70%),
    radial-gradient(ellipse 52px 5px at 78% 32%, rgba(249, 252, 254, 0.14), transparent 70%),
    radial-gradient(ellipse 30px 3px at 40% 64%, rgba(249, 252, 254, 0.16), transparent 70%),
    radial-gradient(ellipse 44px 4px at 88% 82%, rgba(249, 252, 254, 0.12), transparent 70%),
    radial-gradient(ellipse 36px 4px at 22% 90%, rgba(249, 252, 254, 0.12), transparent 70%);
}
.painted {
  position: relative;
  background-size: cover;
  background-position: center;
}
.painted::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 25, 74, 0.92) 0%, rgba(3, 25, 74, 0.55) 45%, rgba(3, 25, 74, 0.86) 100%);
}
.painted > * { position: relative; }

.wave-edge {
  height: 26px;
  background:
    radial-gradient(18px 14px at 18px 0, var(--night) 98%, transparent 100%) 0 0 / 36px 26px repeat-x;
}

/* ---------- Phones and fish ---------- */
.phone {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 26px 30px rgba(2, 12, 45, 0.55)) drop-shadow(0 6px 8px rgba(2, 12, 45, 0.45));
}
@keyframes sway {
  0%, 100% { transform: translateY(0) rotate(-2deg) scaleX(1); }
  50% { transform: translateY(-8px) rotate(2deg) scaleX(0.97); }
}
.sway { animation: sway 4.8s ease-in-out infinite; }
.sway-slow { animation: sway 6.4s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.bob { animation: bob 3.2s ease-in-out infinite; }

.fish-card img { filter: drop-shadow(0 4px 0 rgba(2, 12, 45, 0.35)); }

/* gallery strip */
.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 260px);
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 4px 26px;
  scrollbar-width: thin;
  scrollbar-color: var(--surface) transparent;
}
.gallery > figure { scroll-snap-align: start; margin: 0; }
.gallery img { width: 100%; height: auto; display: block; border-radius: 22px; box-shadow: 0 0 0 3px var(--abyss), 0 8px 0 3px var(--contact); }

/* ---------- Text pages ---------- */
.prose-legal { color: var(--slate900); font-size: 1rem; line-height: 1.7; overflow-wrap: anywhere; }
.prose-legal h1 { font-family: "Kanit", sans-serif; font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); color: var(--night); line-height: 1.1; margin-bottom: 0.4rem; }
.prose-legal h2 { font-family: "Kanit", sans-serif; font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem); color: var(--night); margin: 2rem 0 0.6rem; padding-top: 1.2rem; border-top: 2px solid var(--mist-shade); line-height: 1.25; }
.prose-legal h3 { font-weight: 900; font-size: 1.04rem; color: var(--deep); margin: 1.3rem 0 0.4rem; }
.prose-legal p { margin: 0.55rem 0; }
.prose-legal ul { list-style: none; margin: 0.4rem 0 0.8rem; padding: 0; }
.prose-legal li { position: relative; padding-left: 1.4rem; margin: 0.28rem 0; }
.prose-legal li::before { content: ""; position: absolute; left: 0.25rem; top: 0.62em; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--bobber); box-shadow: 0 0 0 2px var(--abyss); }
.prose-legal a { color: var(--lake); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.prose-legal .meta { font-weight: 800; color: var(--slate500); }
.prose-legal .table-wrap { overflow-x: auto; margin: 1rem 0; border-radius: 12px; box-shadow: 0 0 0 2px var(--abyss); }
.prose-legal table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.92rem; }
.prose-legal th { background: var(--night); color: var(--sail); text-align: left; padding: 0.6rem 0.75rem; font-weight: 900; }
.prose-legal td { padding: 0.6rem 0.75rem; border-top: 1px solid var(--mist-shade); vertical-align: top; }
.prose-legal tr:nth-child(even) td { background: var(--mist); }

/* ---------- FAQ ---------- */
.faq-item summary { list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .chev { transition: transform 0.3s var(--ease-snap); }
.faq-item[open] .chev { transform: rotate(180deg); }

/* ---------- Forms ---------- */
.field {
  width: 100%;
  background: var(--abyss);
  color: var(--sail);
  border: 0;
  border-radius: var(--r-small);
  box-shadow: inset 0 0 0 2px var(--deep);
  padding: 0.85rem 1rem;
  font: inherit;
  font-weight: 700;
  transition: box-shadow 0.2s ease;
}
.field::placeholder { color: var(--slate300); font-weight: 600; }
.field:focus { outline: none; box-shadow: inset 0 0 0 2px var(--surface), 0 0 0 3px rgba(145, 226, 236, 0.35); }
.field.invalid { box-shadow: inset 0 0 0 2px #ff6b74; }
.field-error { color: #ffb3b8; font-weight: 800; font-size: 0.88rem; min-height: 1.2em; }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--shallows) 50%), linear-gradient(135deg, var(--shallows) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.4rem; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 80;
  max-width: 980px;
  margin: 0 auto;
  transform: translateY(140%);
  transition: transform 0.45s var(--ease-snap);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner[hidden] { display: none; }

/* small screens down to 250px */
@media (max-width: 360px) {
  .thumb .bar { padding: 8px 26px 10px; }
  .thumb .bar::before { left: 8px; width: 10px; }
  .thumb .bar::after { right: 6px; width: 10px; }
  .chip { white-space: normal; }
  .slotbar { padding: 10px 16px 12px; }
}
@media (max-width: 280px) {
  .thumb .bar { padding: 8px 18px 10px; }
  .thumb .bar::before, .thumb .bar::after { display: none; }
}
