/* Galaxy whales — component styles. Only the three canvases the component adds are styled; nothing global. */
.gw-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;   /* clicks, text selection and scrolling go to the page */
  z-index: 1;             /* put the section's own content at z-index 2 or higher */
}
/* stardust, nebula, spout, bubbles and songs add light to whatever is behind them */
.gw-bg,
.gw-fx { mix-blend-mode: screen; }

/* ------------------------------------------------------------------------------------------
   Love Vlog About page: chapter 05 (about-whales-init.js). The stage exists only while the script
   runs the whales, and every rule that touches page elements needs html[data-about-whales], which
   the script sets with it; without JavaScript or after any failure the page is unchanged.
   ------------------------------------------------------------------------------------------ */
/* The middle row includes the two flowing edges and the sticky track. Only the track contributes
   to ocean depth and sticky dwell. Both outside ends match the night zone's #07040f. */
html[data-about-whales] .about-night-bg-footer, html[data-about-whales] .about-night > .about-footer { grid-row: 3; }
html[data-about-whales] .about-night-fx { grid-row: 1 / 4; }
html[data-about-whales] .about-night > .about-ending { padding-bottom: clamp(62px, 6vw, 86px); }
/* A performance stage that holds still for a while (scrollytelling with a plain CSS sticky; nothing
   intercepts the wheel or touch, nothing snaps). The track is the stage's height plus a dwell
   distance; the stage inside it sticks just below the header (centred in the room left under it)
   while the reader scrolls through the dwell, then moves on with the page. --gw-header is the fixed
   header's height, measured by the script. */
html[data-about-whales] {
  --gw-h: max(1px, calc(100dvh - var(--gw-header, 72px)));
  --gw-top: var(--gw-header, 72px);
  --gw-dwell: var(--ocean-desktop-travel, 460svh);
}
.about-night > .about-whale-stage {
  grid-row: 2; position: relative; z-index: 0; pointer-events: none; background: #07040f;
  --gw-entry-join: #0c2436;
  --gw-exit-join: #11192e;
  --gw-edge-scale: 1;
}
.about-whale-stage__track {
  position: relative;
  height: calc(var(--gw-h) + var(--gw-dwell));
  background:
    linear-gradient(var(--gw-entry-join), #07040f) top / 100% min(38svh, 290px) no-repeat,
    linear-gradient(#07040f, var(--gw-exit-join)) bottom / 100% min(48svh, 400px) no-repeat;
}
.about-whale-stage__edge {
  position: relative;
  overflow: hidden;
  overflow: clip;
}
.about-whale-stage__entry {
  height: calc(var(--gw-entry-distance, 50svh) * var(--gw-edge-scale));
  background: linear-gradient(#07040f, #131025 22%, #111e31 68%, var(--gw-entry-join));
}
.about-whale-stage__exit {
  height: calc(var(--gw-exit-distance, 32svh) * var(--gw-edge-scale));
  background: linear-gradient(var(--gw-exit-join), #151528 33%, #100a1e 67%, #07040f);
}
.about-whale-stage__light, .about-whale-stage__dust {
  position: absolute;
  inset: 0;
}
.about-whale-stage__light {
  opacity: calc(var(--edge-glow, 1) * var(--gw-edge-light, 1));
  mask-image: linear-gradient(transparent, #000 24%, #000 74%, transparent);
}
.about-whale-stage__light::before {
  content: "";
  position: absolute;
  inset: -8%;
  animation: about-ocean-light 27s ease-in-out infinite alternate paused;
}
.about-whale-stage__entry .about-whale-stage__light::before {
  background:
    radial-gradient(ellipse 38% 10% at 56% 75%, #49bcce45, transparent 83%),
    radial-gradient(ellipse 29% 9% at 31% 66%, #60b6de30, transparent 85%),
    radial-gradient(ellipse 52% 44% at 48% 78%, #2b8aaf41, transparent 83%),
    radial-gradient(ellipse 30% 38% at 77% 41%, #8a60bd37, transparent 85%),
    radial-gradient(ellipse 37% 42% at 17% 48%, #7255a522, transparent 77%);
}
.about-whale-stage__exit .about-whale-stage__light::before {
  background:
    radial-gradient(ellipse 45% 24% at 53% 25%, #327fa235, transparent 77%),
    radial-gradient(ellipse 49% 28% at 76% 41%, #6c5ba52f, transparent 79%),
    radial-gradient(ellipse 46% 34% at 22% 37%, #30588a32, transparent 80%);
  animation-direction: alternate-reverse;
}
.about-whale-stage__dust {
  mask-image: linear-gradient(transparent, #000 30%, #000 71%, transparent);
  opacity: calc(.60 * var(--edge-glow, 1));
}
.about-whale-stage__spark {
  position: absolute;
  inset: var(--spark-y) auto auto var(--spark-x);
  width: 2px;
  height: 2px;
  border-radius: 50%;
  color: #9bd5ff;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
  animation: about-ocean-drift var(--spark-time) ease-in-out var(--spark-delay) infinite alternate paused;
}
.about-whale-stage__spark:nth-child(3n+1) { color: #ffd49f; }
.about-whale-stage__spark:nth-child(3n+2) { color: #b8a8fa; width: 1px; height: 1px; }
.about-whale-stage__spark:nth-child(7n+1) { width: 3px; height: 3px; }
.about-whale-stage[data-edge-running] [data-edge-visible] .about-whale-stage__light::before,
.about-whale-stage[data-edge-running] [data-edge-visible] .about-whale-stage__spark {
  animation-play-state: running;
}
@keyframes about-ocean-drift {
  from { transform: translate(-5px, 8px); opacity: .25; }
  to { transform: translate(8px, -13px); opacity: .85; }
}
@keyframes about-ocean-light {
  from { transform: translate(-2%, 3%) skewY(-2deg); }
  to { transform: translate(2%, -2%) skewY(1deg); }
}
.about-whale-pin {
  position: sticky; top: var(--gw-top); height: var(--gw-h); overflow: hidden; pointer-events: none; isolation: isolate;
  background:
    radial-gradient(ellipse 62% 46% at 50% 50%, rgba(86, 46, 128, 0.2), rgba(86, 46, 128, 0) 72%),
    #07040f;
}
.about-whale-pin[data-ocean-feather] {
  mask-image: linear-gradient(to bottom, transparent, #000 var(--gw-entry-feather, 0px),
    #000 calc(100% - var(--gw-exit-feather, 0px)), transparent);
  opacity: var(--gw-edge-alpha, 1);
}
/* Sticky makes the stage its own stacking context: the whales' light blends onto the stage's sky
   (its background is part of that context), and the stage stays under the header (20) and the
   side navigation (12). The canvases keep pointer-events: none. */
.about-whale-pin > .gw-canvas { z-index: 1; }
.about-whale-pin::before, .about-whale-pin::after {
  content: ""; position: absolute; left: 0; top: 0; width: 2px; height: 2px; border-radius: 50%;
}
.about-whale-pin::before { box-shadow: 6vw 90px rgba(255,240,250,.7), 19vw 300px rgba(255,240,250,.45), 31vw 160px rgba(255,240,250,.6), 44vw 560px rgba(255,240,250,.5), 58vw 70px rgba(255,240,250,.55), 67vw 420px rgba(255,240,250,.7), 79vw 230px rgba(255,240,250,.5), 91vw 520px rgba(255,240,250,.65), 12vw 640px rgba(255,240,250,.45), 86vw 120px rgba(255,240,250,.6); }
.about-whale-pin::after { box-shadow: 9vw 380px rgba(255,214,229,.6), 25vw 600px rgba(255,214,229,.5), 37vw 40px rgba(255,214,229,.55), 52vw 300px rgba(255,214,229,.45), 72vw 620px rgba(255,214,229,.6), 95vw 330px rgba(255,214,229,.5), 63vw 190px rgba(255,214,229,.45); }
html[data-about-motion="on"] .about-whale-pin::after { animation: about-twinkle 5.5s ease-in-out infinite alternate; }
@media (max-width: 720px) {
  /* Phones leave room for the header and browser chrome. */
  html[data-about-whales] { --gw-dwell: var(--ocean-mobile-travel, 405svh); }
  .about-night > .about-whale-stage { --gw-edge-scale: .84; }
  .about-whale-stage__spark:nth-child(3n) { display: none; }
}
html:not([data-about-whales]) .about-whale-stage { display: none; }
@media (prefers-reduced-motion: reduce) {
  /* A shorter descent with static environmental motion. */
  html[data-about-whales] { --gw-dwell: 240svh; }
  .about-whale-pin::after { animation: none; }
  .about-whale-stage__light::before, .about-whale-stage__spark { animation: none; }
}

/* The procedural volume owns the sky; retain the original projected whale trail above it. */
html[data-about-whales] .about-whale-pin > .gw-bg { z-index: 2; }
html[data-about-whales] .about-whale-pin > .gw-fx { z-index: 3; }
.about-whale-pin::before, .about-whale-pin::after { display: none; }

html[data-about-whales] .about-ocean-tour {
  position: fixed;
  right: max(10px, env(safe-area-inset-right));
  bottom: calc(44px + env(safe-area-inset-bottom));
  z-index: 5;
  pointer-events: auto;
  padding: 6px 11px;
  border: 1px solid #b4c6ec59;
  border-radius: 999px;
  color: #e1e9ff;
  background: #0a102bd9;
  font: 12px/1.4 system-ui, sans-serif;
  cursor: pointer;
}
html[data-about-whales] .about-ocean-tour:focus-visible { outline: 2px solid #dce7ff; outline-offset: 2px; }

.about-whale-pin[data-ocean-fullscreen-ready] { pointer-events: auto; }
html[data-about-whales][data-ocean-immersive] { overflow: hidden; overscroll-behavior: none; }
.about-whale-stage:is(:fullscreen, :-webkit-full-screen) {
  --gw-h: 100dvh;
  --gw-top: 0px;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  overflow: hidden auto;
  scrollbar-width: none;
  overscroll-behavior: none;
  background: #07040f;
  outline: none;
  pointer-events: auto;
}
.about-whale-stage::backdrop { background: #07040f; }
.about-whale-stage:is(:fullscreen, :-webkit-full-screen)::-webkit-scrollbar { display: none; }
.about-whale-stage:is(:fullscreen, :-webkit-full-screen) .about-whale-stage__edge { display: none; }
.about-whale-stage:is(:fullscreen, :-webkit-full-screen) .about-whale-pin {
  mask-image: none;
  opacity: 1;
}
.about-ocean-fullscreen-toggle,
.about-ocean-fullscreen-hint {
  position: fixed;
  z-index: 5;
  color: #e1e9ff;
  background: #0a102bd9;
  font: 12px/1.4 system-ui, sans-serif;
}
.about-ocean-fullscreen-toggle {
  right: max(10px, env(safe-area-inset-right));
  bottom: calc(78px + env(safe-area-inset-bottom));
  padding: 6px 11px;
  border: 1px solid #b4c6ec59;
  border-radius: 999px;
  pointer-events: auto;
  cursor: pointer;
}
.about-ocean-fullscreen-toggle[hidden] { display: none; }
/* registered 2026-11-21: V1.0 shows the ocean without on-screen controls, on desktop and on phones alike. The two controls
   stay in the page for their logic (the triple-click checks the fullscreen control's own `hidden` flag; the tour keeps its
   state), but take no space, receive no pointer or keyboard focus and cover nothing. Fullscreen: triple-click and Esc. */
html[data-about-whales] :is(.about-ocean-tour, .about-ocean-fullscreen-toggle) { display: none; }
/* end registered controls */
.about-ocean-fullscreen-toggle:focus-visible { outline: 2px solid #dce7ff; outline-offset: 2px; }
.about-ocean-fullscreen-hint {
  left: 50%;
  top: max(13%, calc(18px + env(safe-area-inset-top)));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 28px);
  padding: 8px 14px;
  border-radius: 999px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .24s ease;
}
.about-whale-stage[data-ocean-fullscreen-hint] .about-ocean-fullscreen-hint { opacity: 1; }
.about-whale-stage:is(:fullscreen, :-webkit-full-screen) .about-ocean-fullscreen-toggle {
  bottom: calc(10px + env(safe-area-inset-bottom));
}
.about-whale-stage:is(:fullscreen, :-webkit-full-screen) :is(.about-ocean-fullscreen-toggle, .about-ocean-tour) {
  transition: opacity .24s ease;
}
.about-whale-stage[data-ocean-controls-hidden],
.about-whale-stage[data-ocean-controls-hidden] * { cursor: none; }
.about-whale-stage[data-ocean-controls-hidden] :is(.about-ocean-fullscreen-toggle, .about-ocean-tour):not(:focus-visible) {
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .about-whale-stage .about-ocean-fullscreen-hint,
  .about-whale-stage:is(:fullscreen, :-webkit-full-screen) :is(.about-ocean-fullscreen-toggle, .about-ocean-tour) {
    transition: none;
  }
}

/* registered V1.1: the cold-start loading veil. about-whales-init.js sets data-ocean-loading on the stage until the ocean
   has drawn its first frames (and again while it is rebuilt): the aurora sea's own colours, breathing slowly, instead of
   an empty dark stage. It sits under the canvases and fades out beneath the first frames; nothing else changes. */
html[data-about-whales] .about-whale-pin::before {
  display: block; inset: 0; width: auto; height: auto; border-radius: 0; box-shadow: none; z-index: 0;
  background:
    radial-gradient(ellipse 95% 34% at 50% 0%, rgba(72, 178, 186, .3), rgba(72, 178, 186, 0) 72%),
    radial-gradient(ellipse 80% 26% at 42% 60%, rgba(96, 210, 182, .1), rgba(96, 210, 182, 0) 70%),
    radial-gradient(ellipse 60% 24% at 64% 70%, rgba(150, 110, 220, .09), rgba(150, 110, 220, 0) 70%),
    linear-gradient(#0f3a48, #0b2735 34%, #0a1c2c 68%, #08121f);
  opacity: 0; transition: opacity .9s ease;
}
html[data-about-whales] .about-whale-pin[data-ocean-loading]::before { opacity: 1; animation: about-ocean-veil 3.4s ease-in-out infinite alternate; }
@keyframes about-ocean-veil { from { filter: brightness(.84); } to { filter: brightness(1.05); } }
@media (prefers-reduced-motion: reduce) {
  html[data-about-whales] .about-whale-pin[data-ocean-loading]::before { animation: none; }
}
/* end registered loading veil */
