/* Fishy Hollow — the game's own palette and pixel font.
   Hollow Pixel is drawn on a 10px grid, so it's only set in multiples of 10px (crisp at 1x, 2x and 3x). */

@font-face {
  font-family: "Hollow Pixel";
  src: url("../assets/fonts/HollowPixel-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Hollow Pixel";
  src: url("../assets/fonts/HollowPixel-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --cream: #fbf0d6;
  --parchment: #f2dfb4;
  --parchment-dark: #e4cc98;
  --wood: #8a5a3a;
  --wood-dark: #4a2e1e;
  --ink: #3a2418;
  --ink-soft: #7a5a44;
  --gold: #e8a820;
  --green: #5aa04a;
  --teal: #2a8a86;
  --blue: #4a86c8;
  --water: #2a6a9a;
  --water-deep: #1c4a74;
  --night: #0a0e22;
  --night-2: #1c2448;
  --pixel: "Hollow Pixel", ui-monospace, monospace;
  --text: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --notch: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--pixel);
  font-size: 20px;
  line-height: 1.5;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

img.px, .px img { image-rendering: pixelated; }
a { color: var(--teal); }
a:hover { color: var(--wood); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* A panel with stepped pixel corners and a wood border, like the game's */
.panel {
  background: var(--cream);
  border: 4px solid var(--wood-dark);
  clip-path: polygon(var(--notch) 0, calc(100% - var(--notch)) 0, calc(100% - var(--notch)) var(--notch), 100% var(--notch),
    100% calc(100% - var(--notch)), calc(100% - var(--notch)) calc(100% - var(--notch)), calc(100% - var(--notch)) 100%,
    var(--notch) 100%, var(--notch) calc(100% - var(--notch)), 0 calc(100% - var(--notch)), 0 var(--notch), var(--notch) var(--notch));
}

/* Pixel buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
  text-align: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  background: var(--teal);
  border: 4px solid var(--wood-dark);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.22), inset 0 4px 0 rgba(255, 255, 255, 0.22);
  clip-path: polygon(var(--notch) 0, calc(100% - var(--notch)) 0, calc(100% - var(--notch)) var(--notch), 100% var(--notch),
    100% calc(100% - var(--notch)), calc(100% - var(--notch)) calc(100% - var(--notch)), calc(100% - var(--notch)) 100%,
    var(--notch) 100%, var(--notch) calc(100% - var(--notch)), 0 calc(100% - var(--notch)), 0 var(--notch), var(--notch) var(--notch));
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}
.btn:hover { color: #fff; filter: brightness(1.08); }
.btn:active { transform: translateY(2px); }
.btn img { width: 30px; height: 30px; }
.btn.wood { background: var(--wood); }

/* Header */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  padding: 16px 0;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--cream); text-decoration: none; font-weight: 700;
  text-shadow: 0 2px 0 var(--wood-dark), 2px 0 0 var(--wood-dark), -2px 0 0 var(--wood-dark), 0 -2px 0 var(--wood-dark);
}
.brand img { width: 40px; height: 40px; border-radius: 22%; box-shadow: 0 0 0 3px var(--wood-dark); }
.brand:hover { color: #fff; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  color: var(--cream); text-decoration: none;
  text-shadow: 0 2px 0 var(--wood-dark), 2px 0 0 var(--wood-dark), -2px 0 0 var(--wood-dark), 0 -2px 0 var(--wood-dark);
}
.nav a:hover { color: var(--gold); }
@media (max-width: 640px) { .nav .wide-only { display: none; } .brand span { display: none; } }

/* Hero */
.hero {
  position: relative;
  min-height: max(560px, 86vh);
  display: grid;
  place-items: center;
  padding: 110px 16px 64px;
  background: var(--water) url("../assets/img/hero-hollow.png") center / cover no-repeat;
  image-rendering: pixelated;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 34, 0.35) 0%, rgba(10, 14, 34, 0) 30%, rgba(10, 14, 34, 0) 70%, rgba(28, 74, 116, 0.55) 100%);
}
.hero-card {
  position: relative;
  max-width: 620px;
  padding: 30px 30px 26px;
  text-align: center;
  image-rendering: auto;
}
.hero-card .icon { width: 120px; height: 120px; border-radius: 22%; box-shadow: 0 0 0 4px var(--wood-dark); }
.hero-card h1 {
  margin: 16px 0 6px;
  font-size: 60px; line-height: 1.1; font-weight: 700;
  color: var(--wood);
  text-shadow: 0 4px 0 var(--parchment-dark);
}
.hero-card .tagline { margin: 0 0 20px; color: var(--ink-soft); }
.hero-card .platforms { margin: 14px 0 0; color: var(--ink-soft); }
@media (max-width: 520px) {
  .hero-card { padding: 22px 16px 20px; }
  .hero-card h1 { font-size: 40px; }
  .hero-card .icon { width: 96px; height: 96px; }
}

/* The fish parade: a strip of water with the game's fish swimming across */
.parade {
  position: relative;
  height: 120px;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 20px, rgba(255, 255, 255, 0) 20px 60px),
    linear-gradient(180deg, var(--water) 0%, var(--water-deep) 100%);
  border-block: 4px solid var(--wood-dark);
}
.parade img {
  position: absolute;
  height: auto;
  image-rendering: pixelated;
  animation: swim linear infinite;
  will-change: transform;
}
.parade img.left { animation-name: swim-left; }
@keyframes swim { from { transform: translateX(-160px); } to { transform: translateX(calc(100vw + 160px)); } }
@keyframes swim-left { from { transform: translateX(calc(100vw + 160px)) scaleX(-1); } to { transform: translateX(-160px) scaleX(-1); } }
@media (prefers-reduced-motion: reduce) {
  .parade { display: flex; justify-content: space-evenly; align-items: center; }
  .parade img { position: static; animation: none; }
  .parade img:nth-child(n + 8) { display: none; }
}

/* Sections */
section { padding: 70px 0; }
.section-title {
  margin: 0 0 10px;
  font-size: 40px; line-height: 1.2; font-weight: 700;
  color: var(--wood);
  text-align: center;
  text-shadow: 0 4px 0 var(--parchment-dark);
}
.section-lead { margin: 0 auto 40px; max-width: 760px; text-align: center; color: var(--ink-soft); }
@media (max-width: 520px) { .section-title { font-size: 30px; } section { padding: 50px 0; } }

.intro { background: var(--cream); border-bottom: 4px solid var(--parchment-dark); }
.intro p { max-width: 760px; margin: 0 auto; text-align: center; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feature { padding: 20px; }
.feature .head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.feature .head img { width: 40px; height: 40px; image-rendering: pixelated; flex: none; }
.feature h3 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 700; color: var(--wood); }
.feature p { margin: 0; color: var(--ink-soft); font-family: var(--text); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: auto; }

/* Screenshots */
.shots-section { background: var(--night-2); color: var(--cream); }
.shots-section .section-title { color: var(--gold); text-shadow: 0 4px 0 var(--night); }
.shots-section .section-lead { color: var(--parchment-dark); }
/* A strip of screenshots, all the same height, each its own shape (phones upright and sideways, iPad, Mac) */
.shots {
  --h: 440px;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 6px 16px 20px;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 16px;
  scrollbar-color: var(--wood) var(--night);
  /* Centred when the strip fits; otherwise it scrolls from its start (centring an overflowing strip hides its first shots) */
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
}
@media (max-width: 640px) { .shots { --h: 340px; gap: 16px; } }
.shot { flex: none; margin: 0; scroll-snap-align: start; }
.shot .frame {
  display: block;
  padding: 8px;
  border: 0;
  background: var(--wood-dark);
  cursor: zoom-in;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, calc(100% - 8px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) calc(100% - 8px),
    calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 8px), 0 calc(100% - 8px), 0 8px, 8px 8px);
  transition: transform 0.15s ease-out;
}
.shot .frame:hover { transform: translateY(-3px); }
.shot .frame:focus-visible { outline: none; background: var(--gold); }
@media (prefers-reduced-motion: reduce) { .shot .frame { transition: none; } .shot .frame:hover { transform: none; } }
.shot img { display: block; height: var(--h); width: auto; aspect-ratio: var(--ar); }
/* Captions wrap to the width of their shot rather than stretching it */
.shot figcaption { width: 0; min-width: 100%; margin-top: 10px; text-align: center; color: var(--parchment); }
.device {
  display: block;
  margin-bottom: 2px;
  font: 700 12px/1.2 var(--text);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  -webkit-font-smoothing: auto;
}

/* The lightbox: a screenshot at full size over the page */
html.lb-open { overflow: hidden; }
dialog.lightbox {
  width: 100vw; height: 100vh; height: 100dvh;
  max-width: 100vw; max-height: 100vh; max-height: 100dvh;
  margin: 0; padding: 0; border: 0;
  background: transparent;
  color: var(--cream);
  overflow: hidden;
}
dialog.lightbox[open] { display: grid; place-items: center; }
dialog.lightbox::backdrop { background: rgba(10, 14, 34, 0.97); }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 12px; padding: 60px 76px 24px; }
.lightbox img {
  display: block;
  max-width: calc(100vw - 152px);
  max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px);
  width: auto; height: auto;
  border: 6px solid var(--wood-dark);
  background: var(--night);
}
.lightbox figcaption { text-align: center; }
.lightbox .caption { margin-right: 14px; }
.lightbox .count { color: var(--parchment-dark); }
.lightbox button {
  position: absolute;
  display: grid; place-items: center;
  width: 50px; height: 50px;
  font: 700 30px/1 var(--pixel);
  color: var(--cream);
  background: var(--wood);
  border: 4px solid var(--wood-dark);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.22), inset 0 4px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
  clip-path: polygon(var(--notch) 0, calc(100% - var(--notch)) 0, calc(100% - var(--notch)) var(--notch), 100% var(--notch),
    100% calc(100% - var(--notch)), calc(100% - var(--notch)) calc(100% - var(--notch)), calc(100% - var(--notch)) 100%,
    var(--notch) 100%, var(--notch) calc(100% - var(--notch)), 0 calc(100% - var(--notch)), 0 var(--notch), var(--notch) var(--notch));
}
.lightbox button:hover { background: var(--teal); }
.lightbox button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.lightbox .lb-close { top: 14px; right: 14px; font-size: 20px; }
.lightbox .lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  /* Phones: the picture takes the width, the arrows sit below it (and a swipe works too) */
  .lightbox figure { padding: 64px 10px 84px; }
  .lightbox img { max-width: calc(100vw - 20px); max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 18px; transform: none; }
  .lightbox .lb-prev { left: calc(50% - 64px); }
  .lightbox .lb-next { right: calc(50% - 64px); }
}

/* A night banner over Port Lumen */
.night-banner {
  position: relative;
  padding: 120px 16px;
  text-align: center;
  background: var(--night) url("../assets/img/hero-city-night.png") center / cover no-repeat;
  image-rendering: pixelated;
}
.night-banner::before { content: ""; position: absolute; inset: 0; background: rgba(10, 14, 34, 0.45); }
.night-banner .panel { position: relative; display: inline-block; max-width: 640px; padding: 26px 30px; background: rgba(28, 36, 72, 0.92); border-color: var(--gold); image-rendering: auto; }
.night-banner h2 { margin: 0 0 10px; font-size: 30px; line-height: 1.3; color: var(--gold); }
.night-banner p { margin: 0; color: var(--cream); }

/* Play anywhere */
.platforms-band { background: var(--cream); text-align: center; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0 0 30px; padding: 0; list-style: none; }
.badges li { padding: 8px 14px; background: var(--parchment); border: 3px solid var(--parchment-dark); color: var(--ink); }

/* Footer */
.site-footer { background: var(--wood-dark); color: var(--parchment); padding: 36px 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--gold); }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* Text pages: support and the privacy policy */
.page-hero {
  position: relative;
  padding: 110px 16px 50px;
  text-align: center;
  background: var(--night) url("../assets/img/hero-fair-dusk.png") center / cover no-repeat;
  image-rendering: pixelated;
}
.page-hero::before { content: ""; position: absolute; inset: 0; background: rgba(10, 14, 34, 0.5); }
.page-hero h1 { position: relative; margin: 0; font-size: 40px; color: var(--cream); text-shadow: 0 4px 0 var(--wood-dark); }
.page-hero p { position: relative; margin: 6px 0 0; color: var(--parchment); }
.doc { padding: 50px 0 70px; }
.doc .wrap { width: min(820px, 100% - 32px); }
.doc .panel { padding: 30px; }
@media (max-width: 520px) { .doc .panel { padding: 20px 16px; } .page-hero h1 { font-size: 30px; } }
.doc h2 { margin: 34px 0 10px; font-size: 20px; line-height: 1.3; font-weight: 700; color: var(--wood); }
.doc h2:first-child { margin-top: 0; }
.doc p, .doc li { font-family: var(--text); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: auto; }
.doc ul { padding-left: 22px; }
.doc .updated { color: var(--ink-soft); }
.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; margin-bottom: 30px; background: var(--parchment); }
.contact-card p { margin: 0; }
details { border-top: 3px solid var(--parchment-dark); padding: 14px 0; }
details:last-of-type { border-bottom: 3px solid var(--parchment-dark); }
summary { cursor: pointer; font-weight: 700; color: var(--wood); list-style: none; padding-left: 22px; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "▸"; position: absolute; left: 0; color: var(--teal); }
details[open] > summary::before { content: "▾"; }
summary:hover { color: var(--teal); }
details p, details ul { margin: 10px 0 0; }
