/* Gobbledeep website: pixel-art ocean theme shared by every page. */
:root {
  --surface: #3fa9d9;
  --reef: #1d6f9f;
  --deep: #0d3560;
  --abyss: #050c1c;
  --card: rgba(7, 26, 52, 0.82);
  --card-edge: #3d84bd;
  --shadow: #02101f;
  --ink: #eaf4ff;
  --muted: #a8c2de;
  --orange: #ffb02e;
  --orange-dark: #c4570f;
  --aqua: #7fe3ff;
}

* { box-sizing: border-box; }

html { background: var(--abyss); }

body {
  margin: 0;
  position: relative;
  min-height: 100vh;
  color: var(--ink);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Scrolling down the page dives from the sunlit surface into the abyss. */
  background:
    linear-gradient(180deg, var(--surface) 0, var(--reef) 420px, var(--deep) 1100px, #081f3d 1900px, var(--abyss) 100%);
  overflow-x: hidden;
}

/* Sun rays near the surface. */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 900px;
  pointer-events: none;
  background:
    repeating-linear-gradient(105deg, rgba(255,255,255,0) 0 60px, rgba(255,255,255,0.07) 60px 100px, rgba(255,255,255,0) 100px 190px);
  -webkit-mask-image: linear-gradient(180deg, #000 0, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0, transparent 100%);
}

img.px, .px { image-rendering: pixelated; image-rendering: crisp-edges; }

/* ---------- Swimming fish and bubbles (behind the content) ---------- */
#ocean {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
#ocean .fish {
  position: absolute;
  left: 0;
  image-rendering: pixelated;
  opacity: 0.9;
  will-change: transform;
}
#ocean .bubble {
  position: absolute;
  border: 2px solid rgba(200, 240, 255, 0.55);
  background: rgba(200, 240, 255, 0.12);
  animation: rise linear forwards;
}
@keyframes rise {
  from { transform: translate(0, 0); opacity: 0; }
  10%  { opacity: 1; }
  to   { transform: translate(var(--drift, 0px), var(--rise, -300px)); opacity: 0; }
}

/* ---------- Layout ---------- */
.page {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 28px 16px 0;
}

header.hero { text-align: center; padding: 8px 0 12px; }
header.hero .brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  max-width: 100%;
}
header.hero .icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  border: 3px solid var(--shadow);
  box-shadow: 4px 4px 0 var(--shadow);
  flex: none;
}
header.hero .logo { width: 420px; max-width: calc(100vw - 120px); height: auto; filter: drop-shadow(4px 4px 0 rgba(2,16,31,0.6)); }
header.hero .tagline {
  margin: 10px 0 0;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: #dff6ff;
  text-shadow: 2px 2px 0 var(--shadow);
}

nav.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 8px;
}
nav.tabs a, .btn {
  display: inline-block;
  padding: 8px 16px;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--ink);
  background: rgba(7, 26, 52, 0.7);
  border: 3px solid var(--shadow);
  border-radius: 10px;
  box-shadow: 0 4px 0 var(--shadow);
  transition: transform 0.1s, box-shadow 0.1s;
}
nav.tabs a:hover, .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--shadow); }
nav.tabs a:active, .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--shadow); }
nav.tabs a[aria-current="page"] { background: var(--orange); color: #2a1100; }
.btn.primary { background: linear-gradient(180deg, #ffc94a, var(--orange) 55%, var(--orange-dark)); color: #2a1100; font-size: 1.05rem; padding: 12px 24px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--aqua); outline-offset: 3px; }

/* ---------- Content ---------- */
h1 {
  margin: 22px 0 4px;
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  line-height: 1.2;
  color: var(--orange);
  text-shadow: 3px 3px 0 var(--shadow);
  text-align: center;
}
.meta {
  margin: 6px auto 0;
  max-width: 640px;
  text-align: center;
  color: #d4e6f7;
  font-size: 0.92rem;
  text-shadow: 1px 1px 0 var(--shadow);
}

section {
  position: relative;
  margin-top: 18px;
  padding: 6px 22px 14px;
  background: var(--card);
  border: 3px solid var(--card-edge);
  border-radius: 14px;
  box-shadow: 6px 6px 0 var(--shadow);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
}
h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 6px;
  font-size: 1.15rem;
  color: var(--orange);
}
/* A little clownfish marks every heading. */
h2::before {
  content: "";
  flex: none;
  width: 32px;
  height: 20px;
  background: url("img/clownfish_0.png") center / contain no-repeat;
  image-rendering: pixelated;
}
p, li { color: var(--ink); }
li { margin: 5px 0; }
ul, ol { padding-left: 1.4em; }
ul li::marker { color: var(--aqua); content: "\25CF  "; font-size: 0.8em; }
strong { color: #fff; }
em { color: #cfe7ff; }
a { color: var(--aqua); text-underline-offset: 3px; }
a:hover { color: #fff; }

/* Landing page */
.feature {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 18px;
  border: 3px solid var(--shadow);
  border-radius: 14px;
  box-shadow: 6px 6px 0 var(--shadow);
}
.cta { text-align: center; margin: 22px 0 6px; }
.cta p { margin: 10px 0 0; color: #d4e6f7; font-size: 0.9rem; text-shadow: 1px 1px 0 var(--shadow); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 18px; }
.facts section { margin: 0; }
.facts img { display: block; height: 44px; width: auto; margin: 12px 0 2px; image-rendering: pixelated; }
.facts h2::before { display: none; }
.facts h2 { margin-top: 6px; }

/* ---------- Seabed footer ---------- */
footer.seabed {
  position: relative;
  z-index: 1;
  margin-top: 56px;
  height: 300px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px 22px;
  background: url("img/seabed.png") center bottom / 909px 300px repeat-x;
  image-rendering: pixelated;
}
footer.seabed .small {
  margin: 0;
  padding: 8px 14px;
  text-align: center;
  font-size: 0.85rem;
  color: #e3eefa;
  background: rgba(5, 12, 28, 0.78);
  border-radius: 10px;
}
footer.seabed a { color: var(--aqua); }

@media (max-width: 520px) {
  header.hero .icon { width: 48px; height: 48px; border-radius: 11px; }
  section { padding: 4px 16px 12px; box-shadow: 4px 4px 0 var(--shadow); }
  footer.seabed { height: 240px; background-size: 727px 240px; }
}

@media (prefers-reduced-motion: reduce) {
  #ocean { display: none; }
  nav.tabs a, .btn { transition: none; }
}
