/* FishCraft site. Colours are the game's own "Laut Dalam" tokens (autoload/UIStyle.gd)
   and the title screen's sky and sea bands; the font is the game's Noto Sans subset. */

@font-face {
  font-family: "FishCraft Sans";
  src: url("/fonts/NotoSans-SemiBold-ui.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "FishCraft Sans";
  src: url("/fonts/NotoSans-Bold-ui.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --abyss: #061e34;      /* UIStyle.GLASS_DEEP */
  --glass: #08243e;      /* UIStyle.GLASS */
  --glass-row: rgba(79, 209, 224, 0.10);
  --edge: #4fd1e0;       /* UIStyle.EDGE */
  --edge-soft: rgba(79, 209, 224, 0.35);
  --text: #dff7fb;       /* UIStyle.TEXT */
  --text-soft: #9cc9d6;  /* UIStyle.TEXT_SOFT */
  --btn: #30b6cb;        /* UIStyle.BTN */
  --btn-hover: #4dccde;
  --btn-text: #06243b;   /* UIStyle.BTN_TEXT */
  --gold: #ffd166;       /* UIStyle.GOLD: focus and rewards */
  --mutant: #bfff3d;     /* UIStyle.MUTANT */
  --font: "FishCraft Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--abyss);
  color: var(--text);
  font: 600 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--edge); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  padding: 8px 14px; background: var(--gold); color: var(--btn-text); border-radius: 8px; font-weight: 700;
}
.skip:focus { top: 12px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }

h2 {
  font-weight: 700;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.section-lead { color: var(--text-soft); max-width: 62ch; margin: 0 0 36px; font-size: 1.06rem; }

/* --- hero: the game's title screen ------------------------------------------ */

.hero {
  position: relative;
  min-height: min(100svh, 860px);
  display: grid;
  place-items: center;
  padding: 56px 16px 72px;
  overflow: hidden;
  /* The title screen's bands: ten of sky down to the horizon, six of sea. */
  background: linear-gradient(to bottom,
    #0c1d32 0 6%, #102236 6% 12%, #13283c 12% 18%, #183042 18% 23%, #1b3446 23% 27%,
    #1f3c4c 27% 33%, #244353 33% 39%, #284b59 39% 46%, #2d5360 46% 52%, #315a67 52% 58%,
    #36626e 58% 62%,
    #294b56 62% 70%, #254450 70% 78%, #203c49 78% 85%, #1c3542 85% 92%, #172c3b 92% 100%);
}
.hero-sky { position: absolute; inset: 0; pointer-events: none; }
.isle {
  position: absolute;
  left: 6%;
  bottom: 38%;
  width: clamp(150px, 22vw, 300px);
  height: auto;
}
.moon {
  position: absolute;
  right: 12%;
  bottom: 39%;
  width: clamp(48px, 6vw, 84px);
  aspect-ratio: 1;
  background: #b8b198;
  border: clamp(5px, 0.6vw, 8px) solid #a19562;
  opacity: 0.85;
}
.fish {
  position: absolute;
  width: 26px; height: 10px;
  background: var(--c);
  opacity: 0.8;
  animation: swim var(--t) linear infinite;
  animation-delay: var(--d);
}
.fish::after {              /* the tail: one block behind the body */
  content: "";
  position: absolute;
  left: -9px; top: 1px;
  width: 7px; height: 8px;
  background: var(--c);
}
.fish::before {             /* the eye */
  content: "";
  position: absolute;
  right: 4px; top: 3px;
  width: 3px; height: 3px;
  background: #0c1d32;
}
.f1 { top: 67%; --c: #4f8f74; --t: 46s; --d: -8s; }
.f2 { top: 76%; --c: #b39b52; --t: 62s; --d: -30s; transform: scale(0.8); }
.f3 { top: 85%; --c: #5a86a8; --t: 54s; --d: -18s; }
.f4 { top: 92%; --c: #a8627a; --t: 70s; --d: -50s; transform: scale(0.7); }
@keyframes swim {
  from { left: -40px; }
  to   { left: calc(100% + 40px); }
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 640px;
}
.app-icon {
  width: 88px; height: 88px;
  margin: 0 auto 18px;
  border-radius: 22px;
  box-shadow: 0 0 0 3px var(--edge), 0 10px 28px rgba(0, 0, 0, 0.45);
}
.wordmark {
  margin: 0;
  font-weight: 700;
  font-size: clamp(3.4rem, 1.5rem + 9vw, 7.25rem);
  line-height: 1;
  letter-spacing: -0.015em;
  color: #eefbfd;
  -webkit-text-stroke: 0.11em #1d6a79;
  paint-order: stroke fill;
  text-shadow: 0 0.06em 0 #06243b, 0 0 0.5em rgba(79, 209, 224, 0.35);
}
.subtitle {
  margin: 14px 0 0;
  font-weight: 700;
  font-size: clamp(1.1rem, 0.9rem + 1vw, 1.6rem);
  text-shadow: 0 2px 0 #06243b;
}
.lead {
  margin: 10px auto 0;
  max-width: 44ch;
  color: var(--text);
  text-shadow: 0 1px 0 #06243b;
}
.menu-panel {
  margin: 28px auto 0;
  width: min(100%, 460px);
  padding: 18px;
  display: grid;
  gap: 12px;
  background: rgba(15, 42, 68, 0.92);
  border: 3px solid var(--edge);
  border-radius: 20px;
  box-shadow: 0 0 22px rgba(79, 209, 224, 0.35);
}
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn {
  display: block;
  padding: 13px 16px;
  border: 2px solid var(--edge-soft);
  border-radius: 12px;
  background: #1f3d55;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  text-align: center;
}
.btn:hover { border-color: var(--edge); color: var(--text); }
.btn-primary {
  background: var(--btn);
  border-color: var(--btn);
  color: var(--btn-text);
  font-size: 1.25rem;
  padding: 16px;
}
.btn-primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--btn-text); }

/* --- islands ----------------------------------------------------------------- */

main section { padding: 88px 0; }
.islands { background: var(--abyss); }
.islands-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.map { margin: 0; }
.map-frame {
  position: relative;
  border: 3px solid var(--edge);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 22px rgba(79, 209, 224, 0.25);
}
.map-frame img {
  width: 100%;
  image-rendering: pixelated;
}
.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  padding: 2px 9px;
  background: rgba(6, 30, 52, 0.86);
  border: 1px solid var(--edge-soft);
  border-radius: 999px;
  font-size: clamp(0.72rem, 0.6rem + 0.45vw, 0.88rem);
  font-weight: 700;
  white-space: nowrap;
}
.pin-left { transform: translate(-12%, -50%); }
.pin-right { transform: translate(-88%, -50%); }
.pin-deep { border-color: rgba(79, 209, 224, 0.6); color: var(--edge); }
.map figcaption { margin-top: 10px; color: var(--text-soft); font-size: 0.9rem; }

.isle-list { margin: 0; display: grid; gap: 4px; }
.isle-list > div {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--glass-row);
}
.isle-list dt { font-weight: 700; font-size: 1.08rem; }
.isle-list dd { margin: 2px 0 0; color: var(--text-soft); }
.isle-list .deep { background: rgba(79, 209, 224, 0.18); }
.mutant {
  display: inline-block;
  margin-left: 4px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(191, 255, 61, 0.12);
  color: var(--mutant);
  font-size: 0.88rem;
}

/* --- screenshots ------------------------------------------------------------- */

.shots { background: #072640; }
.shot-grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 24px;
}
.shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
}
.shot img {
  border: 2px solid var(--edge-soft);
  border-radius: 12px;
  aspect-ratio: 640 / 356;
  object-fit: cover;
}
.shot:hover img { border-color: var(--edge); }
.shot-title { display: block; margin-top: 12px; font-weight: 700; font-size: 1.1rem; }
.shot-sub { display: block; color: var(--text-soft); }

.viewer {
  width: min(96vw, 1280px);
  max-height: 94vh;
  padding: 0;
  border: 3px solid var(--edge);
  border-radius: 16px;
  background: var(--abyss);
  color: var(--text);
}
.viewer::backdrop { background: rgba(3, 14, 26, 0.85); }
.viewer img { width: 100%; }
.viewer-caption { margin: 0; padding: 12px 16px 16px; color: var(--text-soft); }
.viewer-close {
  position: absolute; right: 10px; top: 10px;
  width: 44px; height: 44px;
  border: 2px solid var(--edge);
  border-radius: 50%;
  background: rgba(6, 30, 52, 0.9);
  color: var(--text);
  font: 700 1.1rem var(--font);
  cursor: pointer;
}

/* --- rarity ladder: the deeper the row, the darker the water ------------------ */

.rarity { background: linear-gradient(to bottom, #072640, #020c17); }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ladder li {
  display: grid;
  grid-template-columns: 9.5rem 7rem 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-left: 6px solid var(--tier);
  border-radius: 6px 12px 12px 6px;
  background: rgba(79, 209, 224, 0.09);
}
.ladder li:nth-child(n+3) { background: rgba(79, 209, 224, 0.07); }
.ladder li:nth-child(n+5) { background: rgba(79, 209, 224, 0.05); }
.ladder li:nth-child(n+7) { background: rgba(89, 255, 224, 0.06); }
.tier { color: var(--tier); font-weight: 700; font-size: 1.12rem; }
.odds { font-variant-numeric: tabular-nums; }
.example { color: var(--text-soft); }
.note { margin: 24px 0 0; color: var(--text-soft); max-width: 62ch; }

/* --- free to play ------------------------------------------------------------ */

.free { background: #020c17; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.facts li {
  padding: 16px 20px;
  border: 2px solid var(--edge-soft);
  border-radius: 14px;
  background: var(--glass);
}
.facts strong { display: block; font-weight: 700; font-size: 1.08rem; }
.facts li { color: var(--text-soft); }
.facts strong { color: var(--text); }

.site-foot {
  padding: 36px 0 48px;
  background: #020c17;
  border-top: 1px solid rgba(79, 209, 224, 0.2);
  color: var(--text-soft);
  font-size: 0.92rem;
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 10px; font-size: 1rem; }
.site-foot p { margin: 0; }

/* --- narrow screens ---------------------------------------------------------- */

@media (max-width: 860px) {
  .islands-grid { grid-template-columns: 1fr; gap: 32px; }
  main section { padding: 64px 0; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .ladder li { grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; }
  .ladder .example { grid-column: 1 / -1; }
  .pin { padding: 1px 6px; }
  .isle { left: 2%; }
  .moon { right: 6%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fish { animation: none; left: 20%; }
  .f2 { left: 64%; } .f3 { left: 38%; } .f4 { left: 80%; }
}
