/* Ocean theme (owner 2026-10-11: "theme should be ocean or water like only for
   modules related to aquarium game path /aquarium"). Worn only by pages whose
   <html> has class theme-ocean -- the build gives it to /aquarium/ and every
   page under it; nothing here can reach another game or the home page.
   Lettering: Pixelify Sans (SIL Open Font License 1.1, PixelifySans-OFL.txt),
   served from this site (the CSP allows no font host), styled like the game's
   store captions: ice-white, thick blue rim, deep drop shadow. */

@font-face {
  font-family: "Pixelify Sans";
  src: url(/static/themes/ocean/PixelifySans.9ba86cd010.ttf) format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

/* The site's palette, retinted to water. Every rule in site.css reads these,
   so cards, tables, borders and links follow without being restated. */
html.theme-ocean {
  --night: #062238;
  --deep: #0b3656;
  --dirt: #1c5a82;
  --edge: #2f7fae;
  --gold: #8fe6ff;
  --hi: #e6fbff;
  --text: #e8f6ff;
  --muted: #94bdd6;
  --rim: #145aaa;
  --shadow: rgba(4, 18, 38, 0.85);
  /* Sunlit surface at the top, the deep below. */
  background:
    linear-gradient(180deg, #3b9fcf 0, #1d6fa3 18rem, #0d4672 42rem, #082c4b 70rem, #061d33 100%);
  background-color: #061d33;
  min-height: 100%;
}

/* Light from the surface: soft slanted shafts over the top of the page. */
html.theme-ocean body { position: relative; }
html.theme-ocean body::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 48rem; pointer-events: none; z-index: -1;
  background: repeating-linear-gradient(105deg,
    rgba(210, 240, 255, 0) 0 6rem, rgba(210, 240, 255, 0.07) 6rem 8.5rem, rgba(210, 240, 255, 0) 8.5rem 14rem);
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 40%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0, #000 40%, transparent 100%);
}

/* The lettering. */
html.theme-ocean .brand,
html.theme-ocean h1,
html.theme-ocean h2,
html.theme-ocean h3 {
  font-family: "Pixelify Sans", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}
html.theme-ocean .brand {
  color: #fafdff;
  -webkit-text-stroke: 0.14em var(--rim);
  paint-order: stroke fill;
  text-shadow: 0.08em 0.08em 0 var(--shadow);
}
html.theme-ocean h2, html.theme-ocean h3 { color: var(--gold); text-shadow: 0.06em 0.06em 0 var(--shadow); }
html.theme-ocean .top { border-bottom-color: rgba(143, 230, 255, 0.25); }

/* The game's name as the store captions' "Bubble" lettering. */
html.theme-ocean .game-hero .title-text {
  margin: 0 auto 0.75rem;
  max-width: 14ch;
  font-size: clamp(2.6rem, 9vw, 5rem);
  line-height: 1.12;
  color: #fafdff;
  -webkit-text-stroke: 0.17em var(--rim);
  paint-order: stroke fill;
  text-shadow: 0.1em 0.1em 0 var(--shadow), 0 0 0.6em rgba(120, 220, 255, 0.35);
  text-wrap: balance;
}

/* Bubbles rising behind the hero: rings drawn by gradients, no images. */
html.theme-ocean .game-hero { position: relative; isolation: isolate; }
html.theme-ocean .game-hero::before,
html.theme-ocean .game-hero::after {
  content: ""; position: absolute; inset: -2rem 0 0 0; z-index: -1; pointer-events: none;
  background-repeat: repeat-y;
  animation: rise 14s linear infinite;
}
html.theme-ocean .game-hero::before {
  background-image:
    radial-gradient(circle at 12% 30%, transparent 7px, rgba(200, 235, 255, 0.55) 8px 10px, transparent 11px),
    radial-gradient(circle at 86% 55%, transparent 10px, rgba(200, 235, 255, 0.45) 11px 13px, transparent 14px),
    radial-gradient(circle at 22% 80%, transparent 4px, rgba(200, 235, 255, 0.5) 5px 6px, transparent 7px),
    radial-gradient(circle at 75% 15%, transparent 5px, rgba(200, 235, 255, 0.5) 6px 8px, transparent 9px);
  background-size: 100% 26rem;
}
html.theme-ocean .game-hero::after {
  background-image:
    radial-gradient(circle at 6% 60%, transparent 5px, rgba(200, 235, 255, 0.4) 6px 7px, transparent 8px),
    radial-gradient(circle at 93% 25%, transparent 6px, rgba(200, 235, 255, 0.45) 7px 9px, transparent 10px),
    radial-gradient(circle at 64% 85%, transparent 3px, rgba(200, 235, 255, 0.5) 4px 5px, transparent 6px);
  background-size: 100% 19rem;
  animation-duration: 9s;
}
@keyframes rise { from { background-position: 0 0; } to { background-position: 0 -26rem; } }
@media (prefers-reduced-motion: reduce) {
  html.theme-ocean .game-hero::before, html.theme-ocean .game-hero::after { animation: none; }
}

/* Buttons and panels as glass in the water. */
html.theme-ocean .play {
  background: linear-gradient(180deg, #8fe6ff, #3fb4e6); color: #06263f;
  border-color: #e6fbff; box-shadow: 0 4px 0 var(--rim), 0 8px 20px rgba(0, 0, 0, 0.3);
}
html.theme-ocean .play:hover { color: #06263f; }
html.theme-ocean .play.soon {
  background: rgba(11, 54, 86, 0.75); color: var(--text);
  border-color: rgba(143, 230, 255, 0.5); box-shadow: none;
}
html.theme-ocean .story video { box-shadow: 0 0 0 3px rgba(143, 230, 255, 0.35), 0 10px 34px rgba(0, 0, 0, 0.5); }
html.theme-ocean .gallery img { border-color: rgba(143, 230, 255, 0.35); }
html.theme-ocean .legal th { color: var(--gold); }
html.theme-ocean .legal blockquote { border-left-color: var(--gold); }

/* A strip of sand under the footer. */
html.theme-ocean footer {
  border-top: 0;
  background: linear-gradient(180deg, rgba(214, 190, 140, 0.18), rgba(214, 190, 140, 0) 70%);
  border-radius: 14px 14px 0 0; padding-inline: 1rem;
}

/* The parade swims (2026-10-11: a clownfish parent and two fry above the
   trailer): each fish also bobs on its own slow wave, out of step with the
   others, on top of the shared frame-stepping and the crossing. */
html.theme-ocean .parade { height: 110px; margin-top: 0.5rem; }
html.theme-ocean .parade .train { gap: 1.5rem; align-items: center; animation-duration: 22s; }
html.theme-ocean .parade .walker {
  animation: walk var(--cycle) steps(var(--steps)) infinite, bob 2.6s ease-in-out infinite;
}
html.theme-ocean .parade .walker:nth-child(2) { animation-delay: 0s, -0.9s; }
html.theme-ocean .parade .walker:nth-child(3) { animation-delay: 0s, -1.7s; }
@keyframes bob { 0%, 100% { transform: translateY(-6px); } 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  html.theme-ocean .parade .walker { animation: none; }
}
