/* SkyOcean page. Rules in DESIGN.md. Colours are sampled from the swordfish icon. */

:root {
  --abyss: #092035;
  --trench: #0d2740;
  --reef: #173d5e;
  --reef-2: #1d4a70;
  --water: #00b7de;
  --shallows: #0ac2e9;
  --current: #1f9cb7;
  --current-deep: #0f6f86;
  --belly: #eee6f4;
  --fin: #c09ed8;
  --plum: #574267;
  --foam: #c5d8e9;

  --d0: #123a5a;
  --d1: #0f3150;
  --d2: #0d2a46;
  --d3: #0b243d;
  --d4: #092035;
  --d5: #081c2f;
  --d6: #071a2c;

  --f-head: "Familjen Grotesk", "Arial Narrow", sans-serif;
  --f-body: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
  --f-pixel: "Silkscreen", monospace;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;

  --s: 4px; /* corner step */
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--d6);
  color: var(--belly);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--shallows); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--belly); }
code, kbd {
  font: 400 0.86em var(--f-mono);
  background: rgba(0, 183, 222, 0.12);
  color: var(--belly);
  padding: 0.1em 0.35em;
}
kbd { border-bottom: 2px solid var(--current-deep); background: var(--reef); }
h1, h2, h3 { font-family: var(--f-head); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--fin); outline-offset: 3px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--foam); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--water); color: var(--abyss); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* stepped corners, like the edge of a 16px sprite */
.step, .btn, .frame, .bar__get, .tabs button, .cmd, .mc-pick__opts label, .yt__btn, .filter input {
  clip-path: polygon(
    0 var(--s), var(--s) var(--s), var(--s) 0,
    calc(100% - var(--s)) 0, calc(100% - var(--s)) var(--s), 100% var(--s),
    100% calc(100% - var(--s)), calc(100% - var(--s)) calc(100% - var(--s)), calc(100% - var(--s)) 100%,
    var(--s) 100%, var(--s) calc(100% - var(--s)), 0 calc(100% - var(--s))
  );
}

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--abyss);
  border-bottom: 2px solid var(--reef);
}
.bar__inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--belly); text-decoration: none; font: 700 20px var(--f-head); letter-spacing: -0.01em; }
.brand img { image-rendering: pixelated; }
.bar__nav { display: flex; gap: 22px; margin-left: auto; }
.bar__nav a { color: var(--foam); text-decoration: none; font-size: 15px; }
.bar__nav a:hover { color: var(--belly); }
.bar__get {
  background: var(--water); color: var(--abyss); text-decoration: none;
  font: 700 15px var(--f-head); padding: 8px 14px;
  box-shadow: inset 0 -3px 0 var(--current-deep);
}
.bar__get:hover { background: var(--shallows); color: var(--abyss); }

/* ---------- depth bands ---------- */
.band { padding: clamp(64px, 9vw, 112px) 0; position: relative; }
.band--0 { background: var(--d0); }
.band--1 { background: var(--d1); }
.band--2 { background: var(--d2); }
.band--3 { background: var(--d3); }
.band--4 { background: var(--d4); }
.band--5 { background: var(--d5); }
.band--6 { background: var(--d6); }
.band--3 + .band--3, .band--4 + .band--4, .band--5 + .band--5 { padding-top: 0; }

.depth {
  font: 400 12px/1 var(--f-pixel);
  color: var(--water);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.depth::before { content: ""; width: 18px; height: 2px; background: currentColor; }

.head { max-width: 640px; margin-bottom: 40px; }
.head h2 { font-size: clamp(32px, 4.6vw, 52px); margin-bottom: 16px; }
.head p { color: var(--foam); }
.head__note { font-size: 15px; }
.head--row { max-width: none; display: grid; grid-template-columns: 1fr auto; column-gap: 32px; align-items: end; }
.head--row .depth, .head--row h2 { grid-column: 1; }
.head--row .head__note, .head--row .filter { grid-column: 2; grid-row: 2; margin: 0 0 16px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--water); color: var(--abyss);
  font: 700 19px var(--f-head); text-decoration: none;
  padding: 15px 24px 19px;
  box-shadow: inset 0 -4px 0 var(--current-deep);
  transition: background .1s;
}
.btn:hover { background: var(--shallows); color: var(--abyss); }
.btn:active { padding: 17px 24px 17px; box-shadow: inset 0 -2px 0 var(--current-deep); }
.btn--quiet { background: var(--fin); color: #1d1427; box-shadow: inset 0 -4px 0 var(--plum); font-size: 16px; padding: 11px 18px 15px; }
.btn--quiet:hover { background: var(--belly); color: #1d1427; }

/* ---------- hero ---------- */
.hero { padding-bottom: 0; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.hero h1 { font-size: clamp(42px, 6.4vw, 78px); letter-spacing: -0.035em; margin-bottom: 24px; max-width: 12ch; }
.lede { font-size: 19px; color: var(--foam); max-width: 34em; }

.get { margin-top: 32px; }
.mc-pick { border: 0; padding: 0; margin: 0 0 14px; }
.mc-pick legend { font: 400 11px var(--f-pixel); color: var(--foam); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; padding: 0; }
.mc-pick__opts { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-pick__opts label {
  position: relative; cursor: pointer;
  background: var(--reef); color: var(--foam);
  font: 600 14px var(--f-mono); padding: 7px 12px;
}
.mc-pick__opts input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.mc-pick__opts label:has(input:checked) { background: var(--belly); color: var(--abyss); }
.mc-pick__opts label:has(input:focus-visible) { outline: 3px solid var(--fin); outline-offset: 2px; }
.get__file { margin: 14px 0 6px; font-size: 14px; color: var(--foam); }
.get__file code { background: none; padding: 0; color: var(--belly); }
.get__sha { display: block; font: 400 12px var(--f-mono); color: #8fa6bd; margin-top: 4px; }
.get__req { font-size: 14px; color: var(--foam); max-width: 34em; }

.hero__shot { margin: 8px 0 0; }
.hero__stack { position: relative; }
.hero__fish {
  position: absolute; width: 96px; height: 96px; right: -18px; bottom: -30px; z-index: 2;
  image-rendering: pixelated;
  border: 4px solid var(--belly);
  box-shadow: 6px 6px 0 rgba(5, 19, 31, .6);
  animation: bob 2.4s steps(2, jump-none) infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.hero__shot figcaption { font-size: 14px; color: var(--foam); margin-top: 14px; padding-right: 96px; }

.frame { background: var(--reef-2); padding: var(--s); }
.frame img { width: 100%; }
.frame--pair { display: grid; gap: var(--s); }

.facts {
  display: flex; flex-wrap: wrap; gap: 14px 48px;
  margin-top: 56px; margin-bottom: 0; padding-bottom: 40px;
}
.facts div { display: flex; flex-direction: column-reverse; }
.facts dt { font-size: 13px; color: var(--foam); }
.facts dd { margin: 0; font: 700 28px var(--f-head); letter-spacing: -0.02em; }

.waterline {
  height: 16px;
  background:
    linear-gradient(90deg, var(--water) 0 16px, #2baeca 16px 32px, var(--shallows) 32px 40px, var(--water) 40px 64px, var(--current) 64px 72px, var(--water) 72px 96px) 0 8px / 96px 8px repeat-x,
    linear-gradient(90deg, transparent 0 8px, var(--shallows) 8px 24px, transparent 24px 48px, var(--water) 48px 56px, transparent 56px 80px, #2baeca 80px 88px, transparent 88px 96px) 0 0 / 96px 8px repeat-x;
  image-rendering: pixelated;
}

/* ---------- screens ---------- */
.screens { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
.tabs { display: flex; flex-direction: column; gap: 6px; }
.tabs button {
  display: flex; align-items: center; gap: 12px;
  background: var(--reef); color: var(--foam); border: 0;
  font: 500 16px var(--f-head); text-align: left;
  padding: 12px 14px; cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25);
}
.tabs button img { width: 21px; height: 21px; image-rendering: pixelated; flex: none; }
.tabs button:hover { background: var(--reef-2); color: var(--belly); }
.tabs button[aria-selected="true"] { background: var(--belly); color: var(--abyss); box-shadow: inset 4px 0 0 var(--water); }

.panel { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.panel[hidden] { display: none; }
.panel__text h3 { font-size: 30px; margin-bottom: 10px; }
.key { font-size: 15px; color: var(--foam); }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; background: var(--water); box-shadow: 2px 2px 0 var(--current-deep); }
.ticks--cols { columns: 2 280px; column-gap: 40px; }
.ticks--cols li { break-inside: avoid; }
.ticks strong { color: var(--belly); }
.also { margin: 40px 0 0; padding-top: 24px; border-top: 2px solid var(--reef); color: var(--foam); max-width: 60em; }
.also strong { color: var(--belly); }

/* ---------- fishing ---------- */
.fishing { padding-top: 0; }
.fishing__img { max-height: 520px; overflow: hidden; border-bottom: 4px solid var(--reef-2); }
.fishing__img img { width: 100%; height: 520px; object-fit: cover; object-position: center 60%; }
.fishing__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 48px; padding-top: 64px; }
.fishing .head { margin-bottom: 0; }

/* ---------- slots ---------- */
.slots__grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.slots__art { display: flex; align-items: flex-end; gap: 16px; }
.slots__art img { image-rendering: pixelated; width: auto; height: 368px; }
.slots__art img + img { height: 276px; }
.slots .head { margin-bottom: 0; }

/* ---------- video ---------- */
.yt { max-width: 960px; }
.yt__play { display: block; width: 100%; padding: 0; border: 0; background: var(--reef-2); cursor: pointer; position: relative; aspect-ratio: 16 / 9; }
.yt__play img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.yt__play:hover img { opacity: 1; }
.yt__btn {
  position: absolute; left: 24px; bottom: 24px;
  background: var(--water); color: var(--abyss);
  font: 700 18px var(--f-head); padding: 12px 20px 15px 44px;
  box-shadow: inset 0 -4px 0 var(--current-deep);
}
.yt__btn::before { content: ""; position: absolute; left: 20px; top: 50%; margin-top: -9px; border-left: 14px solid var(--abyss); border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.yt iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; background: #000; }
.yt__note { font-size: 13px; color: var(--foam); margin-top: 10px; }

/* ---------- feature index ---------- */
.filter input {
  width: min(320px, 100%); background: var(--trench); color: var(--belly); border: 0;
  font: 400 16px var(--f-body); padding: 11px 14px;
  box-shadow: inset 0 0 0 2px var(--reef-2);
}
.filter input::placeholder { color: #8fa6bd; }
.count { font: 400 12px var(--f-pixel); color: var(--foam); text-transform: uppercase; margin: -16px 0 24px; min-height: 1em; }
.index { columns: 3 280px; column-gap: 40px; }
.group { break-inside: avoid; margin-bottom: 32px; }
.group[hidden] { display: none; }
.group h3 { font-size: 20px; color: var(--fin); padding-bottom: 8px; margin-bottom: 10px; border-bottom: 2px solid var(--reef); }
.group ul { list-style: none; margin: 0; padding: 0; }
.group li { padding: 5px 0; font-size: 16px; border-bottom: 1px solid rgba(197, 216, 233, .08); }
.group li[hidden] { display: none; }
.group mark { background: var(--water); color: var(--abyss); padding: 0 2px; }
.index__more { color: var(--foam); font-size: 15px; margin-top: 8px; }

/* ---------- commands ---------- */
.cmds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px 32px; }
.cmds li { display: grid; gap: 4px; padding: 10px 0; }
.cmd {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--trench); color: var(--belly); border: 0; cursor: pointer;
  padding: 10px 14px; text-align: left; width: 100%;
  box-shadow: inset 0 0 0 2px var(--reef);
}
.cmd code { background: none; padding: 0; font-size: 15px; }
.cmd span { font: 400 11px var(--f-pixel); color: var(--water); text-transform: uppercase; flex: none; }
.cmd:hover { box-shadow: inset 0 0 0 2px var(--water); }
.cmd.is-copied span { color: var(--fin); }
.cmds p { margin: 0; color: var(--foam); font-size: 15px; }

/* ---------- install ---------- */
.install { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 48px; align-items: start; }
.install .head { margin-bottom: 0; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 28px 64px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -4px;
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--belly); color: var(--abyss); font: 400 20px var(--f-pixel);
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 48px; bottom: 4px; width: 2px; background: var(--reef-2); }
.steps h3 { font-size: 22px; margin-bottom: 6px; }
.steps p { color: var(--foam); margin: 0; }

/* ---------- latest ---------- */
.latest .head { margin-bottom: 24px; }
.credits { margin-top: 24px; color: var(--foam); font-size: 15px; font-style: italic; }

/* ---------- team ---------- */
.team { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.team .head { margin-bottom: 0; }
.team__links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.crew { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.crew a { display: flex; align-items: center; gap: 12px; padding: 8px; color: var(--belly); text-decoration: none; background: var(--abyss); font-size: 15px; }
.crew a:hover { background: var(--reef); }
.crew img { width: 40px; height: 40px; background: var(--reef); }
.crew__more a { justify-content: center; color: var(--shallows); min-height: 56px; }

/* ---------- footer ---------- */
.foot { background: #05131f; padding: 40px 0 48px; border-top: 2px solid var(--reef); }
.foot__inner { display: grid; grid-template-columns: auto 1fr; gap: 16px 40px; align-items: center; }
.foot .brand { font-size: 17px; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: flex-end; }
.foot__nav a { color: var(--foam); font-size: 15px; }
.foot__legal { grid-column: 1 / -1; font-size: 13px; color: #8fa6bd; margin: 8px 0 0; max-width: 60em; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .bar__nav { display: none; }
  .bar__get { margin-left: auto; }
  .hero__grid, .panel, .fishing__grid, .install, .team, .slots__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__shot { margin-top: 24px; }
  .hero__fish { width: 72px; height: 72px; right: -6px; bottom: -22px; }
  .hero__shot figcaption { padding-right: 76px; }
  .screens { grid-template-columns: minmax(0, 1fr); }
  .tabs { flex-direction: row; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .tabs button { flex: none; }
  .head--row { grid-template-columns: minmax(0, 1fr); }
  .head--row .head__note, .head--row .filter { grid-column: 1; grid-row: auto; margin-top: 4px; }
  .fishing__img img { height: 280px; }
  .slots__art img { height: 230px; }
  .slots__art img + img { height: 172px; }
  .facts { gap: 18px 32px; }
  .foot__inner { grid-template-columns: minmax(0, 1fr); }
  .foot__nav { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__fish { animation: none; }
  * { transition: none !important; }
}
