/* Sidewave — brand site styles. Self-contained with shell.css (header/footer). Navy · white · silver. No green. */
:root {
  --sw-abyss: #030916;
  --sw-navy: #040b18;
  --sw-ink: #071d43;
  --sw-text: #f3f6fa;
  --sw-text-2: #b4c1d3;
  --sw-text-3: #8494ab;
  --sw-line: rgba(255, 255, 255, .12);
  --sw-spray: #a7d6ed;
  --sw-horizon: #5d8bd0;
  --sw-black: #000;
  --sw-red: #e0271b;
  --sw-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --sw-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sw-gutter: clamp(16px, 3.4vw, 48px);
  --sw-max: 1440px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100svh; background: var(--sw-navy); color: var(--sw-text);
  font: 400 16px/1.6 var(--sw-font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-synthesis: none; text-rendering: optimizeLegibility; overflow-x: clip;
}
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
::selection { background: var(--sw-spray); color: var(--sw-ink); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--sw-spray); outline-offset: 4px; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 10px 14px; background: var(--sw-text); color: var(--sw-ink); border-radius: 999px; font-weight: 600; }
.skip:focus { top: 16px; }
.wrap { max-width: var(--sw-max); margin: 0 auto; padding-left: var(--sw-gutter); padding-right: var(--sw-gutter); }

/* ── The home is one screen: the sea, the wordmark, and the projects floating on it. ── */
.hero { position: relative; height: 100svh; min-height: 520px; isolation: isolate; overflow: hidden; touch-action: pan-y pinch-zoom; }   /* sideways: the carousel's */
/* The sea itself (.ocean, .ocean-canvas, fallback) lives in brand.css, shared with the sign-in page. */
.hero-in::before { content: ""; position: absolute; inset: -30% -10%; z-index: -1; background: radial-gradient(50% 55% at 50% 50%, rgba(4, 11, 24, .42) 0%, rgba(4, 11, 24, .16) 45%, rgba(4, 11, 24, 0) 72%); pointer-events: none; }
/* The lockup is anchored to the horizon (37% of the screen): its bottom edge sits 28px above the sky line, so no sprite ever runs under the text. */
.hero-in { position: absolute; left: 50%; bottom: calc(63% + 28px); transform: translateX(-50%); z-index: 1; width: 100%; max-width: var(--sw-max); padding: 0 var(--sw-gutter); display: grid; justify-items: center; text-align: center; }
/* The wordmark runs the full width of the page and stands on the horizon; the cut shears its lower half sideways (cut.js, swell),
   kept clear of the header on short screens. */
.hero-mark { position: relative; z-index: 2; width: min(100%, calc((37svh - 100px) * 5.24)); filter: drop-shadow(0 6px 40px rgba(4, 11, 24, .55)); }
.hero-mark img { width: 100%; height: auto; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ── The horizon: one squall out on the sea (squall.js, in the sea's own WebGL world), the projects projected onto its rain one
   at a time (tuner.js; a canvas over it carries the television snow of going in). The project names ride over the cloud
   (founder, 2026-11-04) as a tuner's band: a hairline under them, a tick for each, a needle that springs to the one on the
   rain; the one on air is lit, the others wait. ── */
.tuner-band { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }
.tuner { position: absolute; left: 0; right: 0; top: 12%; z-index: 4; display: flex; justify-content: center; align-items: flex-start; gap: 30px; padding-bottom: 15px; }
.tuner { pointer-events: none; } .tuner > * { pointer-events: auto; }   /* the band spans the page: only its channels take a click, not the empty band (it lay over the buoy's first flag and swallowed its click, 2026-11-12) */
.tuner::before { content: ""; position: absolute; left: 50%; bottom: 5px; width: min(640px, 72vw); height: 1px; transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(90deg, rgba(243, 246, 250, 0), rgba(243, 246, 250, .26) 22%, rgba(243, 246, 250, .26) 78%, rgba(243, 246, 250, 0)); }
.ch { position: relative; display: grid; grid-template-columns: auto auto auto; column-gap: 8px; align-items: baseline; justify-items: center; padding: 4px 8px; color: rgba(243, 246, 250, .42); transition: color .6s ease, text-shadow .6s ease; white-space: nowrap; background: none; border: 0; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; text-shadow: 0 1px 14px rgba(3, 9, 22, .85); }
.ch::after { content: ""; position: absolute; left: 50%; bottom: -10px; width: 1px; height: 5px; background: rgba(243, 246, 250, .34); pointer-events: none; }
.ch-no { font-family: var(--sw-mono); font-size: 10px; letter-spacing: .14em; opacity: .8; }
.ch-name { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.ch-note { font-family: var(--sw-mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: rgba(243, 246, 250, .38); }
.ch[data-on], .ch:hover, .ch:focus-visible { color: var(--sw-text); }
.ch[data-on] { text-shadow: 0 1px 14px rgba(3, 9, 22, .85), 0 0 22px rgba(167, 214, 237, .35); }
.tn-needle { position: absolute; left: 0; bottom: 2px; width: 1.5px; height: 12px; margin-left: -.75px; border-radius: 1px; background: #fff; pointer-events: none;
  box-shadow: 0 0 6px rgba(167, 214, 237, .95), 0 0 16px rgba(167, 214, 237, .5); }
.tn-needle.live { transition: transform .62s cubic-bezier(.3, 1.5, .45, 1); }
@media (prefers-reduced-motion: reduce) { .tn-needle.live { transition: none; } }
@media (pointer: coarse) { .tuner { gap: 6px; } .ch { min-height: 44px; padding: 10px 14px; align-content: center; } }   /* finger-sized */
/* A phone held upright (tuner.js, the same query): the names under the thumb, above the footer; only the one on air is named,
   the rest are their numbers. A finger held on the storm brings it on, so no selection or callout there. */
@media (pointer: coarse) and (max-width: 820px), (pointer: coarse) and (max-height: 500px) {
  .tuner { top: auto !important; bottom: calc(64px + env(safe-area-inset-bottom)); gap: 0; padding-bottom: 0; }
  .tuner::before, .ch::after, .tn-needle { display: none; }                     /* the band is the computer's */
  .ch { grid-template-columns: auto auto; }
  .ch-note { grid-column: 1 / -1; margin-top: 3px; }
  .hero { touch-action: pinch-zoom; }                              /* every drag is the storm's; no double-tap zoom delay */
  .sw-dark { display: none; }                                         /* the darker night is the computer's */
  .ch { color: rgba(243, 246, 250, .5); text-shadow: 0 1px 10px rgba(3, 9, 22, .9), 0 0 2px rgba(3, 9, 22, .8); }   /* readable over a bright sea */
  .ch:not([data-on]) .ch-name, .ch:not([data-on]) .ch-note { display: none; }
  .hero { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
}

body[data-page="sidewave"] .sh-in { grid-template-columns: auto 1fr; }
/* The home page never moves as a page: no rubber band on a trackpad (Safari drags the whole page otherwise), no pull-to-refresh;
   the wheel changes nothing (tuner.js); on a phone the finger is the tuner's. */
html:has(body[data-page="sidewave"]), body[data-page="sidewave"] { overscroll-behavior: none; }


/* ── Footer: on the water, at the foot of the screen ── */
.sh-foot--sea { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; border-top: 0; background: linear-gradient(180deg, rgba(3, 9, 22, 0) 0%, rgba(3, 9, 22, .7) 100%); padding-top: 48px; }
/* the home's header and footer are see-through bands over the sea: only what is in them takes a click, so a flag or a channel that
   comes to lie under their empty parts can still be pressed (the phone's channels were under the footer's fade, 2026-11-12) */
body[data-page="sidewave"] > .sh[data-float], body[data-page="sidewave"] > .sh-foot--sea { pointer-events: none; }
body[data-page="sidewave"] > .sh[data-float] a, body[data-page="sidewave"] > .sh[data-float] button, body[data-page="sidewave"] > .sh-foot--sea a, body[data-page="sidewave"] > .sh-foot--sea button { pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
.sh[data-mark-hidden] .sh-brand { opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s .3s; }
.sh .sh-brand { transition: opacity .3s ease, visibility 0s; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Lightning (tuner.js): the whole screen flashes, then the night is blacker for a moment (.sw-dark). Only light: no project
   page shows in it (2026-11-04). */
.sw-flash, .sw-dark { position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0; mix-blend-mode: screen; }
.sw-dark { background: #000; mix-blend-mode: normal; }
.sw-flash { background: radial-gradient(ellipse 70% 90% at var(--fx, 50%) var(--fy, 30%), #f4f7ff 0, rgba(220, 230, 255, .6) 40%, rgba(190, 205, 240, .14) 100%); }
@media (prefers-reduced-motion: reduce) { .sw-flash, .sw-dark { display: none; } }
/* A phone: the flash stays with the storm, a glow round where it struck. */
.sw-flash--near { background: radial-gradient(circle at var(--fx, 50%) var(--fy, 30%), rgba(244, 247, 255, .85) 0, rgba(220, 230, 255, .3) 22vmax, rgba(200, 215, 250, 0) 55vmax); }

/* ── Random (2026-11-05): the easter egg. A fairway buoy out on the sea, drawn by three.js inside the sea's own scene
   (random.js); here only the hand's target over it and, still beside it, a tiny note: random. ── */
.rnd-mark { position: absolute; left: 0; top: 0; z-index: 2; width: 0; height: 0; padding: 0; border: 0; background: none; cursor: pointer; will-change: transform; overflow: visible; }
.rnd-mark::before { content: ""; position: absolute; left: calc(var(--dx, 0px) - 40px); top: calc(var(--top, -90px) - 12px); width: 80px; height: calc(var(--bottom, 0px) - var(--top, -90px) + 24px); }   /* the hand's target: the buoy's own height, wherever it drifted */
.rnd-mark[hidden] { display: none; }
.buoy-note { position: absolute; left: 36px; top: calc(var(--top, -90px) - 24px); font: 500 10px/1 var(--sw-mono); letter-spacing: .3em; text-transform: uppercase; color: var(--sw-text-2); white-space: nowrap; text-shadow: 0 1px 8px rgba(3, 9, 22, .9), 0 0 3px rgba(3, 9, 22, .9); transition: color .25s; }
.buoy-note::before { content: ""; position: absolute; left: -16px; top: 10px; width: 1px; height: 28px; background: linear-gradient(rgba(243, 246, 250, .6), rgba(243, 246, 250, 0)); transform: rotate(32deg); transform-origin: 0 0; }
.rnd-mark:hover .buoy-note, .rnd-mark:focus-visible .buoy-note { color: var(--sw-text); }
.rnd-mark[aria-expanded="true"] .buoy-note { color: var(--sw-text-3); }
html[data-random] .rnd-mark:has(+ .rnd-flags--low) .buoy-note, .rnd-mark[aria-expanded="true"]:has(~ .rnd-flags--low) .buoy-note { opacity: 0; }   /* a phone: the flags take the note's place */
.rnd-mark:focus-visible { outline: none; } .rnd-mark:focus-visible .buoy-note { text-decoration: underline; text-underline-offset: 3px; }
@media (pointer: coarse) and (max-width: 820px) {   /* a phone: the note on a dark chip, over the spray */
  .buoy-note { padding: 5px 7px 4px; background: rgba(3, 9, 22, .62); }
}
/* the flags: a line up from the topmark with a light at its head; each idea a pennant off it, dark glass cut at 11°, the number
   in the footer's mono and the name in the display face; hover turns a pennant to ice, like the ribbon. They ride with the buoy. */
.rnd-flags { position: absolute; left: 0; top: 0; z-index: 3; width: 0; height: 0; will-change: transform; }
.rnd-flags.open { z-index: 5; }   /* raised, the flags are over the tuner band */
.rnd-flags[hidden] { display: none; }
.rnd-line { position: absolute; left: 0; bottom: 0; width: 1px; height: var(--line, 158px); background: linear-gradient(rgba(243, 246, 250, .95), rgba(243, 246, 250, .3)); transform: scaleY(0); transform-origin: 0 100%; transition: transform .5s var(--ease); }
.rnd-line::after { content: ""; position: absolute; left: -2px; top: -2px; width: 5px; height: 5px; border-radius: 50%; background: #f3f6fa; box-shadow: 0 0 12px 2px rgba(243, 246, 250, .7); }
.rnd-flags.open .rnd-line { transform: none; }
.rnd-list { position: absolute; left: 0; bottom: 0; }
.rnd-list li { position: absolute; left: 0; bottom: var(--h, 0px); white-space: nowrap; }
.rnd-it { position: relative; display: grid; justify-items: start; row-gap: 6px; margin-left: 20px; padding: 9px 16px 9px 12px; color: var(--sw-text); text-decoration: none; background: none; border: 1px solid rgba(243, 246, 250, .5); text-shadow: 0 0 2px rgba(4, 11, 24, .95), 0 1px 12px rgba(4, 11, 24, .9); opacity: 0; transform: translateX(-14px); transition: opacity .3s, transform .5s var(--ease), border-color .25s, box-shadow .25s, color .25s; }   /* a flag: a hairline frame, no ground (founder, 11-05) */
.rnd-it::before { content: ""; position: absolute; left: -21px; top: 50%; width: 20px; height: 1px; background: rgba(243, 246, 250, .7); }
.rnd-flags.open .rnd-it { opacity: 1; transform: none; }
.rnd-flags.open li:nth-child(2) .rnd-it { transition-delay: .08s; } .rnd-flags.open li:nth-child(3) .rnd-it { transition-delay: .16s; }
.rnd-it b { font: 700 17px/1.1 var(--sw-font); letter-spacing: -.02em; }
.rnd-b--mk { display: block; width: var(--mw, 63px); height: var(--mh, 31px); line-height: 0; } .rnd-mk { display: block; width: var(--mw, 63px); height: var(--mh, 31px); overflow: visible; filter: drop-shadow(0 0 2px rgba(4, 11, 24, .9)); }   /* sized outright: Safari gives an SVG no width in a shrink-to-fit grid */   /* an idea's own name: its face, its colours */
a.rnd-it:hover, a.rnd-it:focus-visible { border-color: #f3f6fa; box-shadow: 0 0 16px rgba(243, 246, 250, .22); outline: none; }
.rnd-it--soon { border-style: dashed; border-color: rgba(243, 246, 250, .34); color: var(--sw-text-2); } .rnd-it--soon b { font-weight: 600; }
.rnd-it--soon small { font: 500 9px/1 var(--sw-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--sw-text-2); }
@media (prefers-reduced-motion: reduce) { .rnd-line, .rnd-it, .buoy-note { transition: none; } }
