/* Blenny website. One page, one dive: the page depth drives colour and light. */

:root {
  --ink: #f2fbff;
  --muted: rgba(242, 251, 255, 0.74);
  --faint: rgba(242, 251, 255, 0.14);
  --navy: #032a42;
  --navy-muted: rgba(3, 42, 66, 0.8);
  --accent: #8aeeff;
  --orange: #ff8b35;
  --orange-deep: #e8601f;
  --sand: #f1ddb1;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --gutter: clamp(16px, 7vw, 120px);
  color-scheme: light dark;
}

* { box-sizing: border-box; }
html {
  background: linear-gradient(180deg, #8fe6f2 0%, #1fa4cf 18%, #0b6f9f 45%, #07426f 75%, #062d55 100%);
  scroll-padding-top: 48px;
}
body {
  margin: 0;
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  background: transparent;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img, svg { display: block; }
img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
::selection { background: var(--orange); color: #fff; }

.skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: #fff; color: var(--navy); font-weight: 600; text-decoration: none; }
.skip:focus { top: 40px; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

#sea, #life { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; pointer-events: none; }
#sea { z-index: -2; }
#life { z-index: -1; }

/* ---------- Menu bar: the water surface and the site navigation ---------- */
.menubar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 32px;
  display: flex; align-items: center; gap: 4px; padding: 0 10px;
  color: #0b1d2a; font: 500 13.5px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--sans);
  background: rgba(248, 253, 255, 0.52);
  backdrop-filter: blur(24px) saturate(1.7); -webkit-backdrop-filter: blur(24px) saturate(1.7);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45), 0 10px 40px rgba(0, 50, 80, 0.12);
  transition: background 0.8s, color 0.8s;
}
body:not(.is-bright) .menubar { background: rgba(10, 44, 72, 0.5); color: #e6f7ff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 40px rgba(0, 20, 40, 0.25); }
.menubar a, .menubar button { color: inherit; font: inherit; }
.menubar button { border: 0; background: none; cursor: pointer; }
.appmenu { position: relative; }
.app { display: flex; align-items: center; gap: 7px; height: 24px; padding: 0 9px; border-radius: 6px; font-weight: 700 !important; }
.app .mark { color: var(--orange-deep); }
.app:hover, .app[aria-expanded="true"] { background: rgba(255, 255, 255, 0.35); }
body:not(.is-bright) .app:hover, body:not(.is-bright) .app[aria-expanded="true"] { background: rgba(255, 255, 255, 0.12); }
.dropdown {
  position: absolute; left: 0; top: 30px; min-width: 230px; padding: 6px; border-radius: 12px;
  background: rgba(246, 251, 253, 0.8); color: #0b1d2a;
  backdrop-filter: blur(30px) saturate(1.8); -webkit-backdrop-filter: blur(30px) saturate(1.8);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.18), 0 18px 50px rgba(0, 30, 60, 0.3);
  transform-origin: 12px 0; animation: menu-in 0.18s var(--ease-out);
}
.dropdown[hidden] { display: none; }
.dropdown a { display: block; padding: 6px 10px; border-radius: 6px; text-decoration: none; font-weight: 500; }
.dropdown a:hover, .dropdown a:focus-visible { background: #1f7ae0; color: #fff; outline: none; }
.dropdown hr { border: 0; height: 1px; margin: 5px 8px; background: rgba(0, 0, 0, 0.12); }
@keyframes menu-in { from { opacity: 0; transform: scale(0.96) translateY(-4px); } }
.menus { display: flex; gap: 2px; }
.menus a { padding: 5px 9px; border-radius: 6px; text-decoration: none; opacity: 0.88; }
.menus a:hover { background: rgba(255, 255, 255, 0.32); opacity: 1; }
body:not(.is-bright) .menus a:hover { background: rgba(255, 255, 255, 0.12); }
.tray { display: flex; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; overflow: hidden; }
.tray .slot { width: var(--w, 28px); height: 100%; flex: none; display: grid; place-items: center; transition: width 0.7s cubic-bezier(.6, 0, .2, 1), opacity 0.4s; }
.tray .slot.is-gone { width: 0; opacity: 0; }
.tray { pointer-events: none; }
.tray .slot.is-link { pointer-events: auto; cursor: pointer; border-radius: 6px; }
.tray .slot.is-link:hover { background: rgba(255, 255, 255, 0.35); }
.glyph-mask { display: block; background: currentColor; -webkit-mask: var(--mask) center / contain no-repeat; mask: var(--mask) center / contain no-repeat; }
.tray .slot.has-text { display: flex; justify-content: center; gap: 4px; overflow: hidden; white-space: nowrap; }
.tray .slot-text { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
/* Left of the arrow: the area Blenny conceals. It opens and closes as briskly as the real menu bar. */
.concealed { margin-left: auto; }
.concealed.is-snappy .slot { transition: width 0.16s cubic-bezier(.2, 0, 0, 1), opacity 0.12s; }
.fish { width: 34px; height: 24px; display: grid; place-items: center; border-radius: 6px; color: var(--orange-deep) !important; flex: none; }
.fish:hover { background: rgba(255, 255, 255, 0.35); }
.fish.is-hinting { animation: hint 1.3s ease-in-out infinite; }
.fish.is-active { background: rgba(255, 139, 53, 0.35); }
@keyframes hint { 50% { background: rgba(255, 139, 53, 0.5); box-shadow: 0 0 0 4px rgba(255, 139, 53, 0.2); } }
.chev { width: 26px; height: 24px; display: grid; place-items: center; border-radius: 6px; flex: none; }
.chev:hover { background: rgba(255, 255, 255, 0.35); }
body:not(.is-bright) .chev:hover, body:not(.is-bright) .fish:hover { background: rgba(255, 255, 255, 0.12); }
.chev svg { transition: transform 0.45s var(--spring); }
.chev.is-open svg { transform: scaleX(-1); }
/* The system-style sound item: muted by default; it suggests itself once, quietly. */
.soundmenu { position: relative; flex: none; }
.sound { width: 32px; height: 24px; display: grid; place-items: center; border-radius: 6px; }
.sound:hover { background: rgba(255, 255, 255, 0.35); }
body:not(.is-bright) .sound:hover { background: rgba(255, 255, 255, 0.12); }
.sound .waves { opacity: 0; transition: opacity 0.25s; }
.sound .mute { transition: opacity 0.25s; }
.sound[aria-pressed="true"] .waves { opacity: 1; }
.sound[aria-pressed="true"] .mute { opacity: 0; }
.sound[aria-pressed="true"] .waves path { animation: wave-out 1.6s ease-in-out infinite; }
.sound[aria-pressed="true"] .waves path:last-child { animation-delay: 0.2s; }
@keyframes wave-out { 50% { opacity: 0.45; } }
.sound.is-hinting { animation: hint 1.6s ease-in-out 3; }
.sound-hint {
  position: absolute; right: -6px; top: 34px; width: 248px; padding: 11px 14px 12px; border-radius: 12px;
  color: #10222e; font: 400 12.5px/1.4 -apple-system, BlinkMacSystemFont, var(--sans);
  background: rgba(246, 251, 253, 0.86); backdrop-filter: blur(30px) saturate(1.8); -webkit-backdrop-filter: blur(30px) saturate(1.8);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.16), 0 16px 44px rgba(0, 30, 60, 0.28);
  transform-origin: calc(100% - 22px) 0; animation: menu-in 0.25s var(--ease-out); cursor: pointer;
}
.sound-hint::before { content: ""; position: absolute; right: 16px; top: -6px; width: 12px; height: 12px; background: inherit; transform: rotate(45deg); box-shadow: -0.5px -0.5px 0 rgba(0, 0, 0, 0.1); }
.sound-hint b { display: block; margin-bottom: 2px; font-weight: 600; font-size: 13px; }
.sound-hint span { color: #4c6372; }
.sound-hint[hidden] { display: none; }
.sound-hint.is-leaving { opacity: 0; transform: translateY(-4px) scale(0.97); transition: opacity 0.3s, transform 0.3s; }
.clock { padding: 0 8px 0 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Sinking icons ---------- */
/* No z-index here: each icon picks its own layer (behind text while sinking, above the menu bar while revealed). */
#fallers { position: absolute; top: 0; left: 0; width: 100%; height: 0; pointer-events: none; }
/* Icons are drawn at 40 px and scaled down, so they stay crisp at their largest. */
.faller { position: absolute; left: 0; top: 0; width: 40px; height: 40px; margin: -20px 0 0 -20px; color: #0b1d2a; will-change: transform; }
.faller svg { position: relative; }
/* Settled in its home, the menu bar glyph gives way to the app's own icon. */
.faller svg { transition: opacity 0.5s; }
.faller .app-icon { position: absolute; left: -4px; top: -4px; width: 48px; height: 48px; border-radius: 23%; box-shadow: 0 3px 9px rgba(0, 14, 30, 0.45); opacity: 0; transform: scale(0.8); transition: opacity 0.5s, transform 0.6s var(--spring); }
.faller.is-housed .app-icon, .faller.is-sleeping .app-icon { opacity: 1; transform: none; }
.faller.is-housed svg, .faller.is-sleeping svg { opacity: 0; }
.faller.is-sleeping .app-icon { filter: saturate(0.75) brightness(0.85); }
.faller.is-reef { transition: opacity 0.2s; }
.faller.is-up { opacity: 0; transition-duration: 0.12s; }
.faller.is-housed { color: #0d2a3c !important; }
.egg-card {
  position: fixed; z-index: 80; display: flex; gap: 14px; align-items: flex-start; width: min(320px, calc(100vw - 24px)); padding: 16px 18px 16px 16px; border-radius: 18px;
  color: #10222e; text-decoration: none; font-size: 13.5px; line-height: 1.45;
  background: rgba(250, 253, 255, 0.86); backdrop-filter: blur(24px) saturate(1.7); -webkit-backdrop-filter: blur(24px) saturate(1.7);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.16), 0 24px 60px rgba(0, 20, 45, 0.45);
  opacity: 0; transform: translateY(14px) scale(0.92); transform-origin: 50% 100%; transition: opacity 0.3s, transform 0.5s var(--spring);
}
.egg-card.is-on { opacity: 1; transform: none; }
.egg-card img { flex: none; border-radius: 11px; box-shadow: 0 4px 12px rgba(200, 90, 50, 0.35); }
.egg-card small { display: block; font: 500 9.5px var(--mono); font-stretch: 87.5%; letter-spacing: 0.18em; text-transform: uppercase; color: #c8613f; }
.egg-card b { display: block; margin: 2px 0 3px; font: 400 21px/1.1 var(--serif); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -0.02em; }
.egg-card em { display: block; margin-top: 8px; font-style: normal; font-weight: 650; color: #1f6fd0; }
.egg-card:hover em { text-decoration: underline; }
.faller.is-sleeping { color: rgba(205, 232, 246, 0.6) !important; }
/* Sleeping Deep apps breathe out a slow trail of tiny bubbles. */
.faller .breath { position: absolute; left: 26px; top: -4px; width: 0; height: 0; opacity: 0; transition: opacity 0.8s; }
.faller.is-sleeping .breath { opacity: 1; }
.faller .breath i { position: absolute; left: 0; top: 0; width: 9px; height: 9px; border-radius: 50%; border: 1.6px solid rgba(215, 240, 255, 0.7); opacity: 0; }
.faller.is-sleeping .breath i { animation: breathe-out 3.6s ease-in infinite; }
.faller .breath i:nth-child(2) { width: 6px; height: 6px; animation-delay: 1.2s; }
.faller .breath i:nth-child(3) { width: 11px; height: 11px; animation-delay: 2.4s; }
@keyframes breathe-out { 0% { transform: translate(0, 0) scale(0.4); opacity: 0; } 15% { opacity: 0.9; } 100% { transform: translate(8px, -58px) scale(1); opacity: 0; } }

/* ---------- Depth gauge ---------- */
.gauge { position: fixed; right: 22px; top: 50%; z-index: 45; transform: translateY(-50%); display: flex; align-items: center; gap: 16px; font-family: var(--mono); color: var(--ink); pointer-events: none; transition: color 0.6s; }
body.is-bright .gauge { color: var(--navy); }
.gauge .readout { text-align: right; }
.gauge .num { filter: blur(var(--speed-blur, 0px)); }
.gauge .num { font-size: 36px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.gauge .unit { font-size: 13px; opacity: 0.7; }
.gauge .zone-name { font-size: 10.5px; letter-spacing: 0.2em; opacity: 0.85; max-width: 190px; }
.gauge .rail { position: relative; width: 2px; height: 52vh; border-radius: 2px; background: currentColor; }
.gauge .range { position: absolute; left: -3px; top: 0; width: 8px; height: 50%; border-radius: 4px; background: rgba(255, 139, 53, 0.6); }
.gauge .range b { position: absolute; right: 14px; top: 50%; transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl; font: 500 9px var(--mono); letter-spacing: 0.24em; text-transform: uppercase; color: var(--orange); white-space: nowrap; }
.gauge .tick { position: absolute; left: 10px; transform: translateY(-50%); font-size: 9px; opacity: 0.6; }
.gauge .tick::before { content: ""; position: absolute; left: -14px; top: 50%; width: 8px; height: 1px; background: currentColor; }
.gauge .ping { position: absolute; left: 1px; width: 0; height: 0; pointer-events: none; }
.gauge .ping::before, .gauge .ping::after { content: ""; position: absolute; left: -40px; top: -40px; width: 80px; height: 80px; border-radius: 50%; border: 1.5px solid var(--orange); animation: ping 1.3s var(--ease-out) forwards; }
.gauge .ping::after { animation-delay: 0.18s; opacity: 0; }
@keyframes ping { from { transform: scale(0.15); opacity: 0.9; } to { transform: scale(1.6); opacity: 0; } }
.gauge .bob { position: absolute; left: -7px; width: 16px; height: 16px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255, 139, 53, 0.25), 0 0 18px var(--orange); transform: translateY(-50%); }

/* ---------- Sections & type ---------- */
/* Material canvases reach past their hosts for shadows; never let that widen the page. */
main { position: relative; overflow-x: clip; }
.zone { position: relative; min-height: 100vh; padding: 18vh var(--gutter) 12vh; padding-right: max(var(--gutter), 220px); }
.eyebrow { margin: 0 0 22px; font: 500 12px/1.4 var(--mono); letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }
.eyebrow b { font-weight: 500; color: var(--orange); white-space: nowrap; }
h1, h2 { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: clamp(60px, 11.5vw, 188px); line-height: 0.85; max-width: 9ch; }
h2 { font-size: clamp(46px, 7.4vw, 120px); line-height: 0.9; max-width: 12ch; }
h1 em, h2 em { font-style: italic; }
.lede { max-width: 33em; margin: 28px 0 0; font-size: clamp(17px, 1.45vw, 21px); color: var(--muted); text-wrap: pretty; }
.bright { color: var(--navy); }
.bright h1 em, .bright h2 em { color: #fff; text-shadow: 0 0 44px rgba(255, 255, 255, 0.65); }
.bright .lede, .bright .points { color: var(--navy-muted); }
.bright .eyebrow { color: #045683; }

.depthmark {
  position: absolute; right: 4vw; top: 6vh; z-index: -1; pointer-events: none;
  font: italic 400 clamp(140px, 24vw, 380px)/0.8 var(--serif); letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1.2px rgba(255, 255, 255, 0.22);
  transform: translateY(calc(var(--p, 0) * -18vh));
}
.bright .depthmark { -webkit-text-stroke-color: rgba(3, 42, 66, 0.14); }

/* Word-by-word headline entrance. */
/* No clipping box: Fraunces' italic and WONK shapes overhang their advance width and would be cut off. */
.split .w { display: inline-block; vertical-align: top; }
.split .w > span { display: inline-block; transform: translateY(0.45em) rotate(3deg); filter: blur(6px); opacity: 0; transition: transform 1.1s var(--ease-out), filter 1.1s var(--ease-out), opacity 0.8s; transition-delay: calc(var(--i) * 70ms); }
.split.in .w > span { transform: none; filter: none; opacity: 1; }
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
/* If the scripts never run, show the content anyway instead of leaving it hidden. */
html:not(.motion) .reveal { animation: failsafe 0.8s 2.5s forwards; }
@keyframes failsafe { to { opacity: 1; transform: none; } }

.points { max-width: 36em; margin: 40px 0 0; padding: 0; list-style: none; display: grid; gap: 16px; color: var(--muted); }
.points li { position: relative; padding-left: 30px; }
.points li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid currentColor; box-shadow: inset -2px -2px 0 rgba(255, 255, 255, 0.4); opacity: 0.7; }
.points b { color: var(--ink); font-weight: 600; }
.bright .points b { color: var(--navy); }

.note { position: relative; max-width: 340px; margin: 9vh 0 0; padding: 15px 18px 15px 46px; border-radius: 16px; font-size: 14px; line-height: 1.55; color: var(--muted); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.note::before { content: ""; position: absolute; left: 17px; top: 15px; width: 17px; height: 17px; background: var(--orange); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3.5h10.5a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H6z'/%3E%3Cpath d='M6 3.5v17M3.5 7.5H6M3.5 12H6M3.5 16.5H6M9.5 8.5h5.5M9.5 12h5.5M9.5 15.5h3.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3.5h10.5a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H6z'/%3E%3Cpath d='M6 3.5v17M3.5 7.5H6M3.5 12H6M3.5 16.5H6M9.5 8.5h5.5M9.5 12h5.5M9.5 15.5h3.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.note b { display: block; margin-bottom: 4px; font: 500 10px var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--orange); }
.bright .note { color: var(--navy-muted); background: rgba(255, 255, 255, 0.38); border-color: rgba(255, 255, 255, 0.6); }

/* ---------- Buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 26px; border-radius: 999px; font: 600 16px var(--sans); text-decoration: none; cursor: pointer; border: 0; transition: box-shadow 0.3s, background 0.3s; will-change: transform; }
.btn.primary { color: #fff; background: linear-gradient(180deg, #ff9a4a, var(--orange-deep)); box-shadow: 0 12px 30px rgba(232, 96, 31, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.btn.primary:hover { box-shadow: 0 18px 44px rgba(232, 96, 31, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.btn.ghost { color: var(--navy); background: rgba(255, 255, 255, 0.45); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.7); }
.btn.glass { margin-top: 34px; height: 48px; color: var(--ink); background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn.glass:hover { background: rgba(255, 255, 255, 0.22); }
.btn.glass [data-mark] { color: var(--orange); }

/* ---------- Hero ---------- */
.hero { display: flex; flex-direction: column; justify-content: center; min-height: 100svh; padding-top: 14vh; overflow: hidden; }
.hero-copy { position: relative; z-index: 2; max-width: 780px; }
/* Keep the lede clear of the perch rock on the right. */
.hero .lede { max-width: 26em; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.meta { margin: 22px 0 0; font: 500 12px var(--mono); letter-spacing: 0.1em; color: rgba(3, 42, 66, 0.7); }
.scroll-cue { position: absolute; z-index: 2; left: var(--gutter); bottom: 5vh; display: flex; align-items: center; gap: 14px; font: 500 12px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(3, 42, 66, 0.7); text-decoration: none; }
.scroll-cue i { position: relative; width: 22px; height: 34px; border-radius: 12px; border: 1.5px solid currentColor; }
.scroll-cue i::after { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; background: currentColor; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 60% { transform: translateY(10px); opacity: 0; } 61% { transform: none; opacity: 0; } }

/* The hero scene is layered like a stage: cave interior, the blenny, the
   overhang's shadow, then the rock with a transparent hole in front. */
.perch { position: absolute; right: max(2vw, 170px); bottom: clamp(44px, 8vh, 88px); z-index: 2; width: min(560px, 40vw); aspect-ratio: 2400 / 1502; cursor: pointer; }
.perch > * { position: absolute; will-change: transform; }
.perch-cave { left: 30.2%; top: 32%; width: 46.75%; height: 51.2%; object-fit: cover; object-position: 50% 70%; }
.perch-pocket { left: 31.2%; top: 9.1%; width: 44.75%; height: 73.1%; overflow: hidden; }
/* Sits just above the pocket floor, so its chin rests on the hole's lower rim. */
.perch-pocket .sprite-blenny { left: 9%; width: 82%; bottom: 2.5%; }
.perch-shade { left: 31.2%; top: 32.9%; width: 44.75%; height: 49.35%; pointer-events: none; background: linear-gradient(180deg, rgba(2, 14, 26, 0.5), rgba(2, 14, 26, 0) 38%), radial-gradient(120% 70% at 50% 100%, transparent 55%, rgba(2, 14, 26, 0.4)); }
.perch-rock { inset: 0; width: 100%; height: 100%; }
/* Caustics on the rock's own sand heap, continuous with the bank's. */
.perch-light { inset: 0; width: 100%; height: 100%; pointer-events: none; -webkit-mask: url(../img/scene/rock-hero-sandmask.webp) 0 0 / 100% 100% no-repeat; mask: url(../img/scene/rock-hero-sandmask.webp) 0 0 / 100% 100% no-repeat; }
.perch.is-shy .sprite-blenny { transform: translateY(80%); transition-duration: 0.22s; transition-timing-function: cubic-bezier(.5, 0, .75, 0); }
.perch.is-out .sprite-blenny { transform: translateY(-20%); }
.perch.is-out .sprite-blenny .shade { opacity: 0.35; }
/* A sand bank across the bottom of the hero; it rises under the perch rock. */
.hero-sand { position: absolute; left: 0; right: 0; bottom: 0; height: clamp(90px, 15vh, 170px); z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(247, 230, 191, 0), #f3dfb3 45%, #ead09a); }

/* ---------- Reef ledge: the same layering, with one crevice per Reef app ---------- */
.ledge { position: relative; width: min(1180px, calc(100% + var(--gutter))); aspect-ratio: 3200 / 1450; margin: 10vh 0 0 calc(var(--gutter) * -0.5); }
.ledge > * { position: absolute; }
.ledge-back { z-index: 1; border-radius: 50%; background: radial-gradient(closest-side, #020a13 45%, #06182a 80%, #0d2a44); }
.ledge-cave { z-index: 1; object-fit: cover; object-position: 50% 70%; }
.ledge-pocket { z-index: 2; overflow: hidden; }
.ledge-pocket .sprite-blenny { left: 7%; width: 86%; bottom: 0; transform: translateY(45%); }
.ledge-pocket.is-peeking .sprite-blenny { transform: none; }
.ledge-pocket.is-out .sprite-blenny { transform: translateY(-18%); }
.ledge-pocket.is-out .sprite-blenny .shade { opacity: 0.35; }
.ledge-shade { z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(2, 14, 26, 0.5), rgba(2, 14, 26, 0) 40%), radial-gradient(120% 70% at 50% 100%, transparent 55%, rgba(2, 14, 26, 0.4)); }
/* Easter egg resident: peeks from behind the rim, and leaps over the rock when clicked. */
.ledge-egg { z-index: 2; overflow: hidden; }
.ledge-egg img, .egg-jump img { position: absolute; left: 50%; bottom: 5%; height: 78%; aspect-ratio: 1; border-radius: 22%; box-shadow: 0 3px 10px rgba(0, 10, 25, 0.55); transform: translate(-50%, 125%); transition: transform 0.6s var(--spring); }
.ledge-egg[data-state="peek"] img { transform: translate(-50%, 50%); }
.ledge-egg[data-state="peek-left"] img { transform: translate(-60%, 44%) rotate(-15deg); }
.ledge-egg[data-state="peek-right"] img { transform: translate(-40%, 44%) rotate(13deg); }
.ledge-egg[data-state="up"] img { transform: translate(-50%, 0); }
.ledge-egg[data-state="bob"] img { transform: translate(-50%, 0); animation: egg-bob 2.2s ease-in-out; }
.ledge-egg[data-state="duck"] img { transform: translate(-50%, 130%); transition-duration: 0.2s; transition-timing-function: cubic-bezier(.5, 0, .75, 0); }
@keyframes egg-bob { 20% { transform: translate(-50%, -6%) rotate(-8deg); } 45% { transform: translate(-50%, 2%) rotate(7deg) scale(1.04); } 70% { transform: translate(-50%, -3%) rotate(-3deg); } }
.egg-jump { z-index: 4; pointer-events: none; overflow: visible; }
.egg-jump img { opacity: 0; transition: none; }
.egg-jump.is-jumping img { animation: egg-leap 1.25s cubic-bezier(.3, .7, .4, 1) forwards; }
@keyframes egg-leap {
  0% { opacity: 1; transform: translate(-50%, 40%) scale(0.9); }
  42% { transform: translate(-50%, -175%) rotate(250deg) scale(1.35); }
  55% { transform: translate(-50%, -185%) rotate(360deg) scale(1.35); }
  90% { opacity: 1; transform: translate(-50%, 0) rotate(360deg) scale(1); }
  100% { opacity: 0; transform: translate(-50%, 0) rotate(360deg) scale(1); }
}
.ledge-rock { z-index: 3; inset: 0; width: 100%; height: 100%; }
/* Kelp grows from the ledge's upper ridges, rooted behind the rock. */
.ledge > .kelp { z-index: 0; left: 62%; bottom: 63%; width: 20%; height: 96%; }
.ledge > .kelp-small { left: 14%; bottom: 57%; width: 12%; height: 62%; }
.kelp svg { width: 100%; height: 100%; overflow: visible; }
.kelp .strand { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 6s ease-in-out infinite; }
.kelp .leaf { transform-box: fill-box; transform-origin: 0% 50%; animation: flutter 3s ease-in-out infinite; }
.kelp .rib { fill: none; stroke: rgba(214, 240, 170, 0.35); stroke-width: 0.8; }
@keyframes sway { 50% { transform: rotate(5deg) skewX(-3deg); } }
@keyframes flutter { 50% { transform: rotate(9deg) scaleY(0.88); } }

/* ---------- Organize demo: mirrors the app's Organize window ---------- */
.organize-grid { display: grid; grid-template-columns: 1fr; gap: 40px; margin-top: 48px; }
.organize-grid .points { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); max-width: 1000px; }
.mac-window {
  position: relative; max-width: 980px; border-radius: 12px; overflow: visible; color: #1d1d1f; background: #fff;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.25), 0 40px 90px rgba(0, 20, 45, 0.45);
  font: 400 13px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif; letter-spacing: -0.005em;
}
.mac-window button { font: inherit; color: inherit; }
.mac-titlebar { display: flex; align-items: center; gap: 14px; height: 32px; padding: 0 12px; border-bottom: 1px solid #ececec; }
.mac-lights { display: flex; gap: 8px; }
.mac-lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.18); }
.mac-lights i:nth-child(2) { background: #febc2e; }
.mac-lights i:nth-child(3) { background: #28c840; }
.mac-title { font-weight: 700; font-size: 13.5px; }
.mac-nav { display: flex; justify-content: center; gap: 2px; width: max-content; margin: 6px auto; padding: 3px; border-radius: 14px; background: #f1f1f3; }
.mac-segment { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 16px; border-radius: 11px; color: #55565a; font-size: 13.5px; }
.mac-segment.is-selected { color: #1e3a5c; font-weight: 600; background: #dbe8f8; box-shadow: inset 0 0 0 1px #b9d0ee; }
.mac-body { padding: 0 12px; border-top: 1px solid #e3e3e3; }
.mac-strip { display: flex; align-items: center; gap: 9px; min-height: 31px; padding: 10px 8px 4px; }
.mac-strip b { font-weight: 600; white-space: nowrap; }
.mac-secondary { color: #6e6e73; }
.mac-strip .mac-secondary { font-size: 12px; }
.mac-spacer { flex: 1; }
.mac-button { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 11px; border: 0; border-radius: 6px; background: #ebebed; cursor: pointer; white-space: nowrap; }
.mac-button:hover:not(:disabled) { background: #e0e0e3; }
.mac-button:disabled { color: #b4b4b8; cursor: default; }
.mac-button.mac-default { color: #fff; background: #1f7ae0; }
.mac-button[hidden] { display: none; }
.mac-boardhead { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 6px; }
.mac-board { position: relative; border-radius: 10px; background: #f6f6f7; }
.mac-board .mac-row:first-of-type { border-radius: 10px 10px 0 0; }
.mac-board .mac-row:last-of-type { border-radius: 0 0 10px 10px; }
.mac-row { display: grid; grid-template-columns: 170px 1fr; align-items: center; min-height: 60px; padding: 8px 10px 8px 12px; transition: background 0.15s; }
.mac-row + .mac-row { box-shadow: inset 0 1px 0 #e6e6e8; }
.mac-row.is-target { background: #e4eefa; }
.mac-rowlabel { display: grid; gap: 2px; }
.mac-dot { display: inline-block; width: 6px; height: 6px; margin: 0 7px 2px 0; border-radius: 50%; vertical-align: middle; }
.mac-rowtitle { font-size: 14.5px; font-weight: 500; }
.mac-count { margin-left: 7px; color: #8e8e93; font-size: 11.5px; }
.mac-rowsub { color: #6e6e73; font-size: 12px; padding-left: 13px; }
.mac-release { display: inline-flex; align-items: center; gap: 6px; margin-left: -13px; color: #1f7ae0; font-weight: 500; }
.mac-items { display: flex; flex-wrap: wrap; gap: 4px 6px; min-height: 46px; align-items: center; }
.mac-item { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: none; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; color: #1d1d1f; }
.mac-item img { width: 30px; height: 30px; border-radius: 7px; }
.mac-item.is-selected { background: #dce8f8; }
.mac-item .mac-name { display: none; position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%); padding: 2px 9px; border-radius: 8px; background: #ececee; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.1); font-size: 12px; white-space: nowrap; z-index: 2; }
.mac-item.is-selected .mac-name { display: block; }
.mac-item.is-placeholder { opacity: 0.35; outline: 1.5px dashed #6aa4ea; outline-offset: -2px; background: #eaf2fc; }
.mac-item .mac-appicon { border-radius: 23%; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18); }
.mac-badge { position: absolute; top: 1px; right: 1px; line-height: 0; }
.mac-ghost { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; background: #fff; box-shadow: 0 14px 30px rgba(0, 30, 50, 0.3); cursor: grabbing; }
.mac-ghost .mac-name { display: none; }
.mac-watermark { position: absolute; right: 70px; bottom: 26px; display: flex; align-items: center; gap: 10px; color: rgba(0, 0, 0, 0.12); transform: rotate(-8deg); pointer-events: none; font: 400 22px/1 "Bradley Hand", "Segoe Print", cursive; }
.mac-order { margin: 10px 0 12px; padding: 10px 12px 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px #e8e8ea; }
.mac-orderhead { display: flex; align-items: center; gap: 9px; color: #6e6e73; }
.mac-orderhead b { color: #1d1d1f; font-weight: 600; }
.mac-ordermsg { margin-top: 8px; color: #6e6e73; font-size: 13.5px; }
.mac-footer { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid #e3e3e3; color: #6e6e73; }
.mac-splash { position: absolute; z-index: 4; width: 0; height: 0; pointer-events: none; }
.mac-splash i { position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(31, 122, 224, 0.55); opacity: 0; animation: splash-ring 0.85s var(--ease-out) forwards; }
.mac-splash i:nth-child(2) { animation-delay: 0.1s; border-width: 1.5px; }
.mac-splash i:nth-child(3) { animation-delay: 0.2s; border-width: 1px; }
@keyframes splash-ring { from { transform: scale(0.35, 0.25); opacity: 0.95; } to { transform: scale(2, 1.2); opacity: 0; } }
.mac-splash b { position: absolute; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: #4f9df0; animation: splash-drop 0.6s cubic-bezier(.2, .7, .4, 1) forwards; }
@keyframes splash-drop { from { transform: rotate(var(--a)) translateX(12px) scale(1); opacity: 1; } to { transform: rotate(var(--a)) translateX(var(--d)) scale(0.3); opacity: 0; } }
.mac-popover {
  position: absolute; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.18), 0 16px 40px rgba(0, 20, 45, 0.25); animation: menu-in 0.15s var(--ease-out);
}
.mac-popover::before { content: ""; position: absolute; top: -7px; right: 70px; width: 14px; height: 14px; background: inherit; transform: rotate(45deg); box-shadow: -0.5px -0.5px 0 rgba(0, 0, 0, 0.12); }
.mac-popicon { line-height: 0; }
.mac-popicon img { width: 30px; height: 30px; }
.mac-poptext { display: grid; gap: 1px; margin-right: 18px; color: #6e6e73; font-size: 12px; white-space: nowrap; }
.mac-poptext b { color: #1d1d1f; font-size: 13.5px; font-weight: 600; }
@media (max-width: 760px) {
  .mac-row { grid-template-columns: 1fr; gap: 6px; }
  .mac-strip .mac-secondary, .mac-watermark { display: none; }
  .mac-splash { position: absolute; z-index: 4; width: 0; height: 0; pointer-events: none; }
.mac-splash i { position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(31, 122, 224, 0.55); opacity: 0; animation: splash-ring 0.85s var(--ease-out) forwards; }
.mac-splash i:nth-child(2) { animation-delay: 0.1s; border-width: 1.5px; }
.mac-splash i:nth-child(3) { animation-delay: 0.2s; border-width: 1px; }
@keyframes splash-ring { from { transform: scale(0.35, 0.25); opacity: 0.95; } to { transform: scale(2, 1.2); opacity: 0; } }
.mac-splash b { position: absolute; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: #4f9df0; animation: splash-drop 0.6s cubic-bezier(.2, .7, .4, 1) forwards; }
@keyframes splash-drop { from { transform: rotate(var(--a)) translateX(12px) scale(1); opacity: 1; } to { transform: rotate(var(--a)) translateX(var(--d)) scale(0.3); opacity: 0; } }
.mac-popover { flex-wrap: wrap; left: 8px; right: 8px !important; }
}
.ctx { position: fixed; z-index: 95; min-width: 200px; padding: 5px; border-radius: 10px; background: rgba(246, 251, 253, 0.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.2), 0 14px 40px rgba(0, 30, 60, 0.3); color: #10222e; font: 500 13px -apple-system, BlinkMacSystemFont, var(--sans); animation: menu-in 0.15s var(--ease-out); }
.ctx button { display: block; width: 100%; padding: 6px 10px; border: 0; border-radius: 5px; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ctx button:hover, .ctx button:focus-visible { background: #1f7ae0; color: #fff; outline: none; }
.ctx button:disabled { opacity: 0.4; background: none; color: inherit; cursor: default; }
.ctx .label { padding: 4px 10px 6px; font-size: 11px; color: #6b8594; }

/* ---------- Deep ---------- */
.bed { height: 46vh; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; margin-top: 56px; max-width: 1100px; }
.card { position: relative; padding: 26px 24px 24px; border-radius: 20px; background: linear-gradient(160deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)); border: 1px solid rgba(255, 255, 255, 0.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow: hidden; }
.card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 0%), rgba(138, 238, 255, 0.16), transparent 60%); opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.card:hover::after { opacity: 1; }
.card .icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 13px; color: var(--accent); background: rgba(138, 238, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(138, 238, 255, 0.25); }
.card h3 { margin: 0 0 8px; font: 600 18px/1.3 var(--sans); }
.card p { margin: 0; font-size: 15px; color: var(--muted); }

.limits { max-width: 820px; margin: 48px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.limits li { padding: 20px 0 20px 44px; position: relative; color: var(--muted); border-top: 1px solid var(--faint); }
.limits li:last-child { border-bottom: 1px solid var(--faint); }
.limits li::before { content: "~"; position: absolute; left: 8px; top: 18px; font: italic 28px/1 var(--serif); color: var(--orange); }
.limits b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }

.install-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: center; margin-top: 48px; max-width: 1160px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 22px; }
.steps li { counter-increment: s; position: relative; padding-left: 58px; color: var(--muted); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -4px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; font: italic 22px var(--serif); color: var(--navy); background: var(--accent); box-shadow: 0 0 24px rgba(138, 238, 255, 0.35); }
.steps b { color: var(--ink); font-weight: 600; }
.steps a { color: var(--accent); }
.dmg { border-radius: 14px; overflow: hidden; background: rgba(247, 251, 253, 0.9); box-shadow: 0 40px 80px rgba(0, 15, 35, 0.45); color: #10222e; }
.dmg-bar { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-bottom: 1px solid rgba(0, 0, 0, 0.08); font: 600 12.5px -apple-system, var(--sans); }
.dmg-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dmg-bar i:nth-child(2) { background: #febc2e; }
.dmg-bar i:nth-child(3) { background: #28c840; }
.dmg-bar span { margin: 0 auto; transform: translateX(-20px); }
.dmg-body { display: flex; align-items: center; justify-content: space-around; padding: 40px 20px 34px; background: radial-gradient(80% 90% at 50% 100%, #e3f3f8, #fafdff); }
.dmg figure { margin: 0; display: grid; justify-items: center; gap: 8px; font: 500 12.5px -apple-system, var(--sans); }
.dmg-app img { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 12px 24px rgba(0, 30, 50, 0.3); }
.in .dmg-app img, .dmg.in .dmg-app img { animation: drag 3.6s var(--ease-out) 0.8s infinite; }
@keyframes drag { 0%, 12% { transform: none; } 45%, 62% { transform: translateX(calc(min(22vw, 250px))) scale(0.8); opacity: 0.2; } 63% { transform: none; opacity: 0; } 80%, 100% { opacity: 1; } }
.dmg-arrow { width: 90px; fill: none; stroke: #7a95a5; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 6 8; animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -14; } }
.dmg-folder svg { width: 96px; height: 80px; }
.dmg-folder path { fill: #5cb5f0; }
.dmg-folder .tab { fill: none; stroke: #3a95d8; stroke-width: 2; }
.dmg-folder .a { fill: none; stroke: #e8f6ff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }

.faq { max-width: 860px; margin-top: 48px; display: grid; gap: 10px; }
.faq details { border-radius: 16px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); transition: background 0.3s; }
.faq details[open] { background: rgba(255, 255, 255, 0.12); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 56px 18px 22px; position: relative; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -7px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform 0.3s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq p { margin: 0; padding: 0 22px 20px; color: var(--muted); }
.faq a { color: var(--accent); }

/* ---------- Ascent ---------- */
.ascent { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100svh; padding-right: var(--gutter); text-align: center; }
.breath { display: grid; justify-items: center; gap: 30px; }
.bubble-cta {
  position: relative; width: clamp(200px, 22vw, 260px); aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; gap: 6px;
  color: #fff; text-decoration: none; font: 600 20px/1.1 var(--sans);
  background: radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.95) 0 3.5%, rgba(255, 255, 255, 0.18) 11%, rgba(150, 230, 255, 0.1) 55%, rgba(255, 255, 255, 0.35) 71%, rgba(255, 255, 255, 0.06) 73%);
  box-shadow: inset 0 0 36px rgba(255, 255, 255, 0.3), 0 0 70px rgba(138, 238, 255, 0.28);
  animation: breathe 4.2s ease-in-out infinite;
  will-change: transform;
}
.bubble-cta small { font: 500 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.8; }
.bubble-cta.is-popping { animation: bubble-pop 0.6s var(--ease-out); }
@keyframes bubble-pop { 0% { scale: 1; } 25% { scale: 1.16 0.9; opacity: 0.4; } 26% { scale: 0.4; opacity: 0; } 100% { scale: 1; opacity: 1; } }
.bubble-cta:hover { box-shadow: inset 0 0 46px rgba(255, 255, 255, 0.5), 0 0 110px rgba(138, 238, 255, 0.55); }
@keyframes breathe { 50% { scale: 0.96 1.04; translate: 0 -12px; } }
.support { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.support a { padding: 10px 18px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 15px; background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); transition: background 0.25s; }
.support a:hover { background: rgba(255, 255, 255, 0.2); }
.up { border: 0; background: none; cursor: pointer; font: 500 12px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); padding: 10px; }
.footer { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 24px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font: 400 12px var(--mono); color: rgba(242, 251, 255, 0.5); }

.breach { position: fixed; inset: 0; z-index: 70; width: 100vw; height: 100vh; pointer-events: none; }
.fx-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.toast { position: fixed; left: 50%; bottom: 32px; z-index: 60; padding: 12px 18px; border-radius: 14px; font-size: 14px; color: var(--ink); background: rgba(4, 40, 64, 0.76); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(138, 238, 255, 0.25); transform: translate(-50%, 30px); opacity: 0; transition: transform 0.45s var(--ease-out), opacity 0.4s; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .organize-grid, .install-grid { grid-template-columns: 1fr; }
  .menus a:nth-child(n + 4) { display: none; }
}
@media (max-width: 820px) {
  .menus { display: none; }
  .zone { padding-right: var(--gutter); padding-top: 14vh; }
  .gauge { right: 10px; top: auto; bottom: 18px; transform: none; flex-direction: row-reverse; align-items: flex-end; gap: 10px; }
  .gauge .rail, .gauge .zone-name { display: none; }
  .gauge .num { font-size: 22px; }
  .perch { right: -4vw; width: 92vw; }
  .ledge { width: calc(100% + 2 * var(--gutter)); margin-left: calc(var(--gutter) * -1); }
  .hero-sand { height: 78px; }
  .hero-copy { padding-bottom: 52vw; }
  .hero .lede { max-width: none; }
  .scroll-cue { display: none; }
  .depthmark { right: 2vw; }
  .clock { display: none; }
  .tray .slot { width: var(--w, 24px); }
  .dmg-body { padding: 28px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .split .w > span, .reveal { transform: none; filter: none; opacity: 1; }
}

/* ---------- Rendered Blenny (sprite-blenny.js) ---------- */
.sprite-blenny { position: absolute; aspect-ratio: 1677 / 1145; transition: transform 0.5s var(--spring); }
.sprite-blenny .frame, .sprite-blenny .pupils, .sprite-blenny .shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.sprite-blenny .frame { user-select: none; -webkit-user-select: none; }
.sprite-blenny .shade { pointer-events: none; background: linear-gradient(to top, rgba(3, 14, 26, 0.72), rgba(3, 14, 26, 0.3) 24%, rgba(3, 14, 26, 0) 46%); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; transition: opacity 0.5s; }
.sprite-blenny .pupils { z-index: 1; }
.sprite-blenny .pupil { transition: transform 140ms ease-out; }
.sprite-blenny:not(.is-ready) .pupils, .sprite-blenny.is-blinking .pupils { visibility: hidden; }



/* Illustrated sand bank; dive.js sizes it so the perch rock's base sinks behind the mound. */
.hero-sand { overflow: hidden; background: none; }
.hero-sand .sand-img, .hero-sand .sand-light { position: absolute; bottom: 0; max-width: none; }
/* Caustic light, masked to the sand so it only falls on sand. */
.hero-sand .sand-light { -webkit-mask: url(../img/scene/sand-2000.webp) 0 0 / 100% 100% no-repeat; mask: url(../img/scene/sand-2000.webp) 0 0 / 100% 100% no-repeat; pointer-events: none; }

/* ---------- Type personality ----------
   Fraunces at its softest and most playful for display type, Bricolage Grotesque
   for text, Martian Mono (slightly condensed) for instrument-style labels. */
body { font-optical-sizing: auto; }
h1, h2, .depthmark, .steps li::before, .limits li::before { font-variation-settings: "SOFT" 100, "WONK" 1; }
h1, h2 { font-weight: 360; letter-spacing: -0.035em; }
h1 em, h2 em { font-weight: 300; }
.depthmark { font-weight: 300; }
.lede { letter-spacing: -0.005em; }
.points b, .card h3, .limits b, .steps b, .faq summary { font-weight: 650; letter-spacing: -0.01em; }
.eyebrow, .gauge, .meta, .note b, .up, .scroll-cue, .footer, .bubble-cta small { font-stretch: 87.5%; }
.eyebrow { letter-spacing: 0.16em; }
.gauge .num { font-stretch: 100%; font-weight: 400; letter-spacing: -0.04em; }
