/* © 2026 Devello Inc. osmo.website: the way in (round 4; the glass eggs). Two
 * eggs of glass on a clean, simple starfield, and a choice in osmo's voice: watch the film, or visit the gallery. Amber
 * and starlight on the night. Words, no icons; the eggs are drawn by js/eggs.js under their buttons, which stay the
 * controls. */

/* Instrument Serif (SIL OFL 1.1, assets/fonts/OFL-instrument-serif.txt), served from this site. */
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/instrument-serif-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/instrument-serif-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/instrument-serif-italic-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/instrument-serif-italic-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --night: #040407;
  --ink: #f6efe8;
  --muted: rgba(243, 235, 227, 0.52);
  --amber: rgb(255, 176, 104);
  --serif: "Instrument Serif", "New York", Baskerville, Georgia, serif;
  --rise: cubic-bezier(0.22, 1, 0.36, 1);
  /* the egg's box: 0.78 of this wide and 1.08 tall; the glass egg all but fills it (js/eggs.js, measure) */
  --egg: clamp(140px, min(44vw, 29vh), 250px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { background: var(--night); color: var(--ink); font-family: var(--serif);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.way { position: fixed; inset: 0; overflow: hidden; user-select: none; -webkit-user-select: none;
  display: grid; grid-template-rows: 1fr auto auto 1.25fr; justify-items: center; padding: 0 16px 64px; }
.sky, .eggs-gl, .veil { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.sky { z-index: 0; opacity: 0; transition: opacity 2.4s ease; }
.way.sky-in .sky { opacity: 1; }
.eggs-gl { z-index: 2; opacity: 0; transition: opacity 0.9s ease; }
.way.gl-ready .eggs-gl { opacity: 1; }

/* osmo's words: the line, then the choice */
.say { grid-row: 2; z-index: 2; text-align: center; max-width: 34em; margin-bottom: clamp(18px, 4.5vh, 48px); }
.say h1 { margin: 0; font: 400 clamp(30px, 4.6vw, 54px)/1.08 var(--serif); letter-spacing: 0.005em; }
.say p { margin: 0.6em 0 0; font: italic clamp(17px, 1.7vw, 21px)/1.4 var(--serif); color: var(--muted); letter-spacing: 0.01em; }
.say > * { animation: arrive 1.6s var(--rise) backwards; }
.say p { animation-delay: 0.5s; }

.eggs { grid-row: 3; z-index: 2; display: flex; justify-content: center; gap: clamp(8px, 6vw, 96px); }
.egg { display: grid; justify-items: center; gap: 2px; margin: 0; padding: 0; border: 0; background: none; color: var(--ink);
  font: inherit; cursor: pointer; animation: arrive 1.6s var(--rise) 0.9s backwards; touch-action: manipulation; }
.egg + .egg { animation-delay: 1.15s; }
.shell { position: relative; display: block; width: calc(var(--egg) * 0.78); height: calc(var(--egg) * 1.08); }
/* without WebGL2 the eggs are a still of the same glass: a faint rim of starlight and the ember inside */
.way.no-gl .shell::before { content: ""; position: absolute; inset: 4% 5%; border-radius: 50% 50% 50% 50% / 56% 56% 44% 44%;
  background: radial-gradient(ellipse 34% 26% at 50% 56%, rgba(255, 150, 80, 0.9), rgba(255, 56, 10, 0.32) 48%, rgba(255, 56, 10, 0) 100%);
  box-shadow: inset 0 0 0 1px rgba(246, 239, 232, 0.16), inset 5px 0 10px -6px rgba(246, 239, 232, 0.5); }
.label { position: relative; padding: 4px 2px 6px; font: italic clamp(19px, 1.9vw, 23px)/1.2 var(--serif); letter-spacing: 0.02em;
  color: rgba(246, 239, 232, 0.82); transition: color 0.4s ease; }
/* the bespoke focus: an amber hairline under the words, never a ring */
.label::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: 0; height: 1px; background: var(--amber);
  opacity: 0; transform: scaleX(0.4); transition: opacity 0.4s ease, transform 0.6s var(--rise); }
.egg:hover .label, .egg:focus-visible .label { color: var(--ink); }
.egg:focus-visible { outline: none; }
.egg:focus-visible .label::after { opacity: 0.8; transform: none; }
.egg:disabled { cursor: default; }

/* the film: its frame laid out as the film's own shape, as large as the screen allows, centred. --fw and --fh are its
 * size; --pm is how far the night around it reaches, deepening to the film's own black (the pad, below) */
.way { --fw: min(100vw, 100vh * 16 / 9); --fh: calc(var(--fw) * 9 / 16); --pm: clamp(64px, 16vmin, 160px); }
.way[data-shape="tall"] { --fw: min(100vw, 100vh * 4 / 5); --fh: calc(var(--fw) * 5 / 4); }
@supports (height: 100dvh) {
  .way { --fw: min(100vw, 100dvh * 16 / 9); }
  .way[data-shape="tall"] { --fw: min(100vw, 100dvh * 4 / 5); }
}
.frame { position: absolute; left: 50%; top: 50%; z-index: 3; width: var(--fw); height: var(--fh);
  transform: translate(-50%, -50%); transform-origin: 50% 50%; opacity: 0; visibility: hidden; pointer-events: none; }
/* the film is feathered into the night on all four sides, with no mask on it (a mask on the video, masks composited,
 * or a shadow inside the growing frame each stalled the GPU for seconds at the tap): the edge, a still layer over the
 * frame's place, is an inset shadow of the film's own black, solid at the very edge and easing to nothing inward, so
 * the film's edge becomes the pad's colour, and the pad carries it on. It comes in as the film grows. */
.way { --film-night: #010105; --feather: clamp(36px, 8vmin, 96px); }
.way[data-shape="tall"] { --film-night: #070605; }
.film, .still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; display: block; background: transparent; }
/* the door film plays as it was made, with no grade: sepia strong enough to clear its magenta shadows (0.86) made it
 * near-monochrome, and a blue-pulling matrix that keeps the seams' orange (B' = 0.6 B + 0.3 G) left 0.93% of its pixels
 * purple over 650 frames of cut 9 (design/frames/film-grade/). Its shadows are the film's own: a known hold. */
.edge { position: absolute; left: 50%; top: 50%; z-index: 3; width: calc(var(--fw) + 2px); height: calc(var(--fh) + 2px);
  transform: translate(-50%, -50%); pointer-events: none; opacity: 0; transition: opacity 0.9s ease;
  box-shadow: inset 0 0 var(--feather) calc(var(--feather) * 0.3) var(--film-night); }
.way[data-scene="film"] .edge { opacity: 1; }
.still { transition: opacity 0.25s linear; }

/* the pad: behind the film, the night deepens to the film's own black at its edges, over the frame, then eases back
 * into the page's night past it (a soft shadow of the same black, no mask), so the stars thin out toward the film
 * instead of stopping at a line. It comes in as the film grows. --film-night is cut 4's night at its edges, as Chrome
 * draws it (the darker 60% of the frame's outer ring, read from its poster and its playing frames on 2026-11-28:
 * 1,1,5 wide, 7,4,9 tall); a new cut is measured again. (A live read of the playing film was tried and dropped: a
 * pixel read from a GPU frame stalled the page's thread for seconds under load.) */
.pad { position: absolute; left: 50%; top: 50%; z-index: 1; width: var(--fw); height: var(--fh); transform: translate(-50%, -50%);
  pointer-events: none; opacity: 0; background-color: var(--film-night); transition: opacity 0.9s ease;
  box-shadow: 0 0 var(--pm) calc(var(--pm) * 0.35) var(--film-night); }
.way[data-scene="film"] .pad { opacity: 1; }
.way[data-rolling] .still { opacity: 0; }
.way[data-scene="film"] .frame { visibility: visible; pointer-events: auto; cursor: pointer; }

/* pause and close: two words under the film, there when the visitor moves or the film rests */
.film-bar { position: absolute; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom, 0px)); z-index: 4;
  display: flex; justify-content: center; gap: 36px; opacity: 0; visibility: hidden; transition: opacity 0.6s ease, visibility 0s linear 0.6s; }
.way[data-scene="film"][data-bar] .film-bar, .way[data-scene="film"][data-paused] .film-bar, .way[data-scene="film"][data-muted] .film-bar { opacity: 1; visibility: visible; transition: opacity 0.4s ease; }
.film-bar button { position: relative; margin: 0; padding: 8px 4px; border: 0; background: none; color: rgba(246, 239, 232, 0.78);
  font: italic 18px/1 var(--serif); letter-spacing: 0.04em; cursor: pointer; transition: color 0.3s ease; }
.film-bar button:hover, .film-bar button:focus-visible { color: var(--ink); outline: none; }
.film-bar button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--amber); opacity: 0; transition: opacity 0.3s ease; }
.film-bar button:focus-visible::after { opacity: 0.8; }

/* the words and the eggs step aside for the film, and come back after it */
.say, .eggs { transition: opacity 0.9s ease, filter 0.9s ease; }
.way:not([data-scene="choose"]) :is(.say, .eggs) { opacity: 0; filter: blur(6px); pointer-events: none; }
.way[data-scene="film"] .say, .way[data-scene="film"] .eggs { transition-duration: 0.6s; }

/* the gallery egg's way out: the glass breaks, the night closes over, and the east door's public room comes up on that
 * same night (its first paint is --night, eastdoor/public/room.css) */
.veil { z-index: 5; background: var(--night); opacity: 0; transition: opacity 0.55s cubic-bezier(0.4, 0, 0.6, 1); }
.way[data-scene="leaving"] .veil { opacity: 1; }
/* if the door is late: one calm line on the closed night, honest about the wait (js/way-in.js) */
.late { position: absolute; left: 16px; right: 16px; top: 50%; z-index: 6; margin: 0; transform: translateY(-50%); text-align: center;
  font: italic clamp(17px, 1.7vw, 21px)/1.4 var(--serif); color: var(--muted); letter-spacing: 0.01em; opacity: 0;
  transition: opacity 1.2s ease; pointer-events: none; }
.way[data-scene="leaving"][data-late] .late { opacity: 1; }

/* the cosmos (eastdoor/public/cosmos.js): the east door's sky, waiting behind the page in this same document, warm and
 * still, and hidden until the doors part over it. The choice screen sits in front of it; when the glass egg is chosen
 * the page's own night, stars and words part like theatre doors (css/choices.css's .doors) and the cosmos is already
 * there. The glass egg stays in front: its canvas is clear round the egg. */
.way { z-index: 1; }
.cosmos { position: fixed; inset: 0; z-index: 0; background: var(--night); opacity: 0; visibility: hidden; pointer-events: none; }
.cosmos.is-shown { opacity: 1; visibility: visible; transition: opacity var(--cosmos-in, 0.9s) ease; }
.cosmos-host { position: absolute; inset: 0; }
/* the egg-open's own canvas (the door scene puts it right after the host): over the sky, under the way in's eggs */
.cosmos .entrance-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; pointer-events: none; }

footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center;
  align-items: baseline; gap: 4px 20px; padding: 10px 16px max(14px, env(safe-area-inset-bottom, 0px));
  font-size: 13px; letter-spacing: 0.04em; color: var(--muted);
  animation: arrive 1.4s ease 1.6s backwards; transition: transform 1.1s cubic-bezier(.6, 0, .2, 1), opacity 1.1s ease; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
footer a { color: var(--muted); text-decoration: none; transition: color .3s ease; }
footer a:hover, footer a:focus-visible { color: var(--ink); }
footer a:focus-visible { outline: none; text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 4px; }
footer small { font-size: inherit; opacity: .75; }
footer a.first { font-style: italic; font-size: 14px; letter-spacing: 0.03em; }
/* a press: the footer leaves in place, by its opacity alone (it slid 75 px down before: a jump at the press) */
.way:not([data-scene="choose"]) ~ footer { opacity: 0; pointer-events: none; visibility: hidden;
  transition: opacity 1.1s ease, visibility 0s linear 1.1s; }
/* a touch screen: each link is a 44 px target (the words stay 13 px), its rows 44 px apart so no two targets meet; the
 * line sits clear of the home indicator. The choice keeps its words above this (css/choices.css, --foot-room). */
@media (pointer: coarse) {
  footer { row-gap: 0; padding-top: 0; padding-bottom: max(6px, env(safe-area-inset-bottom, 0px)); }
  footer nav { gap: 0 4px; }
  footer a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 6px; }
}

@keyframes arrive { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: none; } }

/* a short screen: the words a little smaller, the eggs a little closer */
@media (max-height: 640px) { :root { --egg: clamp(112px, min(36vw, 30vh), 200px); } .way { grid-template-rows: 0.6fr auto auto 1fr; } }

/* the record hook (/?record=egg): the film egg alone, full frame, on the night; nothing else */
.way.record { display: block; padding: 0; }
.way.record :is(.say, .label, .egg[data-way="gallery"], .frame, .pad, .edge, .film-bar, .veil, .late) { display: none; }
.way.record ~ footer { display: none; }
.way.record .eggs { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.way.record .egg { animation: none; cursor: default; }
.way.record .shell { width: calc(var(--rec-egg) * 0.75); height: var(--rec-egg); }
.way.record :is(.sky, .eggs-gl) { opacity: 1; transition: none; }

@media (prefers-reduced-motion: reduce) {
  .say > *, .egg, footer { animation-duration: 0.01s; animation-delay: 0s; }
  .say, .eggs, .veil, .eggs-gl, .sky { transition-duration: 0.2s; }
}

/* the footer waits for the end of an experience (js/footer.js): in the DOM for crawlers and
   readers, invisible and out of the tab order until window.osmoFooter.show() or the 'osmo:experience-end' event */
html.footer-gated:not([data-footer]) body > footer { opacity: 0; visibility: hidden; pointer-events: none; }
/* earned (the director's sheet, E6 and H6): it comes to 45%, and still leaves at a press and through every experience */
html.footer-gated[data-footer] body > footer { opacity: 0.45; visibility: visible; transition: opacity 1.2s ease, visibility 0s; }
html.footer-gated[data-footer] body > :is(.way:not([data-scene="choose"]), .way[data-leaving], .way[data-veil="night"]) ~ footer {
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 1.1s ease, visibility 0s linear 1.1s; }
