/* Lume Stands, stage 2: the sky world.
   Type (Seb's option B): Fraunces, a soft storybook serif, for display headlines, headings and stand names; Figtree
   (OFL) for the interface, body text, buttons, prices and small text. Headlines are "Sunlit": filled with the sky's
   own light by day, moonlit silver-blue at night (deeper sunset ink on pale pages, for contrast). Floating controls
   share one Liquid Glass material (the --lg tokens below).
   Phones are laid out first; the desktop rules widen it. */
@font-face {
  font-family: 'Figtree';
  src: url('../assets/fonts/figtree-var.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
/* Fraunces (OFL, assets/fonts/OFL-fraunces.txt): a Latin subset with SOFT 100 and WONK 1 set in the file, weight
   500 to 560, optical size 24 to 144; its default is the headline (144, 500), so even a browser that ignores the
   font's axes draws the headlines right */
@font-face {
  font-family: 'Fraunces';
  src: url('../assets/fonts/fraunces-var.woff2') format('woff2');
  font-weight: 500 560;
  font-style: normal;
  font-display: swap;
}
/* until Fraunces is in, a local serif sized to its widths, so a late font moves nothing (display and text sizes) */
@font-face { font-family: 'Fraunces Display Fallback'; src: local('Georgia'), local('Times New Roman'), local('Noto Serif'); size-adjust: 88.9%; ascent-override: 110%; descent-override: 28.7%; line-gap-override: 0%; }
@font-face { font-family: 'Fraunces Text Fallback'; src: local('Georgia'), local('Times New Roman'), local('Noto Serif'); size-adjust: 105.8%; ascent-override: 92.5%; descent-override: 24.1%; line-gap-override: 0%; }
/* the headline's fill, registered so day and night cross over smoothly */
@property --hl-1 { syntax: '<color>'; inherits: true; initial-value: #9E4129; }
@property --hl-2 { syntax: '<color>'; inherits: true; initial-value: #8F3653; }
@property --hl-3 { syntax: '<color>'; inherits: true; initial-value: #3B3F78; }
@property --hl-4 { syntax: '<color>'; inherits: true; initial-value: #1B2740; }

:root {
  --ink: #16263A;
  --ink-soft: #3E4D60;
  --night-ink: #F3EFE5;
  --night-soft: #C9CFE3;
  --sun: #EE9A2F;
  --moon: #F3EDDD;
  --focus: #2F6FD6;
  --rule: rgba(22, 38, 58, .16);
  --chip: rgba(255, 255, 255, .62);
  --chip-line: rgba(22, 38, 58, .14);
  --card: rgba(248, 250, 252, .94);
  --fg: var(--ink);
  --fg-soft: var(--ink-soft);
  --gut: 16px;
  --nav-h: 56px;
  color-scheme: light;
}
html.night {
  --fg: var(--night-ink);
  --fg-soft: var(--night-soft);
  --chip: rgba(20, 28, 58, .5);
  --chip-line: rgba(243, 239, 229, .2);
  --card: rgba(22, 30, 60, .94);
  --rule: rgba(243, 239, 229, .2);
}
/* ---- type tokens. The headline fill runs top to bottom over each line: by default a deeper sunset (ember, wine, dusk
   navy) that keeps 3:1 over the shop pages' sky and the loader; the island words in the sky world take the brighter
   Sunlit sky (#isl-copy below); at night every headline is moonlit silver-blue with a soft glow */
:root {
  --serif: 'Fraunces', 'Fraunces Display Fallback', Georgia, 'Times New Roman', serif;
  --serif-text: 'Fraunces', 'Fraunces Text Fallback', Georgia, 'Times New Roman', serif;
  --hl-1: #9E4129; --hl-2: #8F3653; --hl-3: #3B3F78; --hl-4: #1B2740;
  --hl-rim: drop-shadow(0 1px 0 rgba(255, 255, 255, .6)) drop-shadow(0 6px 14px rgba(40, 30, 70, .12));
  /* Liquid Glass: one material for every floating control. Layers: a sky-tinted fill under a light sheen, the
     backdrop blurred with a saturation lift, a bright specular rim at the top left, a soft inner shade at the foot.
     --lg-fill-flat is the same glass without the blur (for chips that move every frame, the footer, text panels) */
  --lg-fill: rgba(232, 240, 250, .52);
  --lg-fill-up: rgba(244, 248, 253, .7);
  --lg-fill-flat: rgba(238, 244, 251, .84);
  --lg-hi: rgba(255, 255, 255, .95);
  --lg-lo: rgba(255, 255, 255, .32);
  --lg-in: rgba(18, 36, 74, .2);
  --lg-drop: 0 10px 24px -14px rgba(16, 30, 60, .42);
  --lg-sheen: linear-gradient(150deg, rgba(255, 255, 255, .62) 0%, rgba(255, 255, 255, .16) 34%, rgba(255, 255, 255, 0) 56%, rgba(255, 255, 255, .16) 100%);
  --lg-blur: blur(12px) saturate(1.8);
  --lg-solid: #EEF3F9;
  --lg-press: rgba(18, 36, 74, .07);
}
html.night {
  --hl-1: #F4F6FF; --hl-2: #D7E0F6; --hl-3: #ABBEE6; --hl-4: #90A6D8;
  --hl-rim: drop-shadow(0 0 .32em rgba(138, 168, 255, .34)) drop-shadow(0 2px 5px rgba(4, 8, 28, .45));
  --lg-fill: rgba(26, 35, 76, .6);
  --lg-fill-up: rgba(40, 52, 104, .64);
  --lg-fill-flat: rgba(24, 32, 70, .86);
  --lg-hi: rgba(206, 218, 255, .55);
  --lg-lo: rgba(206, 218, 255, .14);
  --lg-in: rgba(0, 4, 20, .4);
  --lg-drop: 0 10px 24px -14px rgba(0, 0, 0, .6);
  --lg-sheen: linear-gradient(150deg, rgba(196, 210, 255, .26) 0%, rgba(196, 210, 255, .06) 36%, rgba(196, 210, 255, 0) 58%, rgba(196, 210, 255, .08) 100%);
  --lg-solid: #1D2752;
  --lg-press: rgba(0, 4, 20, .2);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #bcd3ea; }
html.night { background: #1c2550; }
body {
  margin: 0; color: var(--fg); background: transparent;
  font-family: Figtree, 'Helvetica Neue', Arial, sans-serif; font-size: 16px; line-height: 1.45;
  overflow-x: hidden; transition: color 1s ease;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- display headlines: Fraunces at optical size 144. js/ui/type.js splits each into letters for the Landing (a
   word stays whole, the heading keeps its words as aria-label); each letter carries the fill, so it can move alone.
   Its box reaches past the glyph (padding taken back by margin) so ascenders and tails keep their colour. */
.hl {
  font-family: var(--serif); font-variation-settings: 'opsz' 144; font-weight: 500; letter-spacing: -.03em; line-height: 1;
  color: var(--hl-4); filter: var(--hl-rim); text-shadow: none;   /* a text shadow would paint over the fill */
}
/* day and night cross over with the page (type.js sets html.hl-fade for the second it takes); at any other time
   the fill changes at once: a transition repaints every letter each frame, and an island's arrival must not pay that */
html.hl-fade .hl { transition: filter 1s ease, --hl-1 1s ease, --hl-2 1s ease, --hl-3 1s ease, --hl-4 1s ease; }
.hl .w { display: inline-block; white-space: nowrap; }
.hl .ch {
  display: inline-block; padding: .14em .08em .26em; margin: -.14em -.08em -.26em calc(var(--k, 0em) - .08em);
  background: linear-gradient(180deg, var(--hl-1) 10%, var(--hl-2) 34%, var(--hl-3) 58%, var(--hl-4) 78%);
  -webkit-background-clip: text; background-clip: text; color: transparent; transform-origin: 50% 80%;
}
.hl .hl-probe { position: absolute; left: 0; top: 0; visibility: hidden; white-space: pre; pointer-events: none; }   /* type.js measures kerning here */
.hl .hl-probe > span { display: inline-block; }
/* a page headline waits for its Landing (type.js); if the script is late or missing it shows by itself */
html.js .hl[data-land]:not(.landed) { visibility: hidden; animation: hl-show 0s linear 1.6s forwards; }
html.vt .hl[data-land] { visibility: visible; animation: none; }
@keyframes hl-show { to { visibility: visible; } }

/* ---- Liquid Glass (one material; the tokens are at the top). Applied to: .lg (any element), the island dots and
   the hint, the cart pill; the Shop island's chips take the flat version (they move every frame: no blur) */
.lg, .dots, .hint, .cart-btn, .rail-label {
  background: var(--lg-sheen) 0 0 / 220% 220% no-repeat, var(--lg-fill);
  box-shadow: inset 1px 1px 0 var(--lg-hi), inset -1px -1px 0 var(--lg-lo), inset 0 -10px 14px -12px var(--lg-in), var(--lg-drop);
  -webkit-backdrop-filter: var(--lg-blur); backdrop-filter: var(--lg-blur);
  border: 0;
}
/* the light shifts across the glass under a pointer, and dims a touch when pressed */
:is(a, button).lg, .cart-btn, .rail-label {
  transition: background-position .55s cubic-bezier(.33, 1, .68, 1), background-color .3s ease, box-shadow .2s ease, transform .16s cubic-bezier(.33, 1, .68, 1), color 1s ease;
}
:is(a, button).lg:hover, .cart-btn:hover, .rail-label:hover { background-position: 80% 80%, 0 0; background-color: var(--lg-fill-up); }
:is(a, button).lg:active, .cart-btn:active, .rail-label:active {
  transform: scale(.97);
  box-shadow: inset 1px 1px 0 var(--lg-lo), inset -1px -1px 0 var(--lg-lo), inset 0 3px 10px var(--lg-press), var(--lg-drop);
}
/* focus rings keep the control's own shape (the global ring rounds square things to 6px) */
.cart-btn:focus-visible, .nav-pair .icon-btn:focus-visible { border-radius: 999px; }
.rail-label:focus-visible { border-radius: 14px; }

/* ---- the stage: one fixed canvas behind everything; the page only scrolls into the footer */
.stage { position: relative; height: 100vh; height: 100svh; }
#gl, #xfade { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100svh; display: block; }
#gl { z-index: 0; opacity: 0; transition: opacity 1.1s ease; touch-action: none; }
html.ready #gl { opacity: 1; }
#xfade { z-index: 1; pointer-events: none; opacity: 0; transition: opacity .45s ease; }
#xfade.hold { opacity: 1; transition: none; }
/* ---- the loader (gate 3e): the sky photo, softened a little, and a watch bezel whose 60 ticks fill clockwise as the
   world loads, "Lume" across its middle and "stands" under it like the dial logo. It shows only after a beat, so a fast
   load never flashes it; it fades as the 3D fades in under it (world.js) */
#loader {
  position: fixed; inset: 0; z-index: 2; pointer-events: none; display: grid; place-items: center;
  background: #bcd3ea url('../assets/sky/sky-day-1200.jpg') center 47% / cover no-repeat;
  transition: opacity 1s cubic-bezier(.4, 0, .2, 1);
}
#loader::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 45% at 50% 46%, rgba(255,255,255,.28), rgba(255,255,255,0) 70%); }
html.night #loader { background-color: #1c2550; background-blend-mode: multiply; }
html.night #loader::before { background: radial-gradient(60% 45% at 50% 46%, rgba(12,20,52,.35), rgba(12,20,52,0) 70%); }
#loader.gone { opacity: 0; }
.ld-dial { --p: 0; position: relative; width: min(38vw, 168px); aspect-ratio: 1; margin-top: -6vh; opacity: 0; animation: ld-in .7s ease .35s forwards; }
#loader.gone .ld-dial { transform: scale(1.04); transition: transform 1s cubic-bezier(.4, 0, .2, 1); }
.ld-dial svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ld-dial circle { fill: none; stroke-width: 5; stroke-dasharray: 1.1 4.3454; }          /* 60 ticks round r = 52 */
.ld-dial circle.ld-hr { stroke-width: 9; stroke-dasharray: 1.8 25.427; }                /* 12 hour marks */
.ld-track { stroke: rgba(22, 38, 58, .2); }
.ld-fill circle { stroke: rgba(22, 38, 58, .78); }
.ld-fill { -webkit-mask: conic-gradient(#000 calc(var(--p) * 360deg), transparent 0); mask: conic-gradient(#000 calc(var(--p) * 360deg), transparent 0); }
html.night .ld-track { stroke: rgba(243, 239, 229, .22); }
html.night .ld-fill circle { stroke: #EFE3C4; }
.ld-word { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-58%); margin: 0; text-align: center; color: var(--ink);
  font-size: min(9.5vw, 40px); font-weight: 600; letter-spacing: -.02em; line-height: 1; }
/* "Lume" is set in Fraunces and lands in the dial once the font is in (js/ui/type.js); "stands" stays Figtree */
.ld-word .ld-name { display: block; font-size: 1.18em; font-weight: 520; letter-spacing: -.035em; }
.ld-word .ld-sub { display: block; margin-top: .3em; font-size: .3em; font-weight: 500; letter-spacing: .04em; color: var(--ink-soft); }
html.night .ld-word { color: var(--night-ink); }
html.night .ld-word .ld-sub { color: var(--night-soft); }
html.js #loader .ld-name:not(.landed) { opacity: 0; animation: ld-name-show .5s ease 1.6s forwards; }
@keyframes ld-name-show { to { opacity: 1; } }
@keyframes ld-in { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ld-dial { animation-duration: .01s; } #loader.gone .ld-dial { transform: none; } }

/* ---- nav */
.nav {
  position: fixed; z-index: 10; left: 0; right: 0; top: 0; height: var(--nav-h);
  display: flex; align-items: center; gap: 4px; padding: 0 calc(var(--gut) - 8px) 0 var(--gut);
  padding-top: env(safe-area-inset-top);
}
.nav-logo { width: 104px; flex: 0 1 104px; min-width: 0; opacity: 0; transform: translateY(-4px); transition: opacity .5s ease, transform .5s ease; }
html.past-start .nav-logo, html.inspecting .nav-logo, html:not(.gl3d) .nav-logo { opacity: 1; transform: none; }
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a + a { display: none; }   /* phones: Islands in the bar, All stands on its own row */
.nav-links a.nav-all { display: none; }
.nav-all svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 760px) {
  html.shop { --nav-h: 104px; }
  html.shop .nav { height: calc(var(--nav-h) + env(safe-area-inset-top)); padding-bottom: 48px; }
  .nav-links a.nav-all {
    display: inline-flex; position: absolute; top: calc(56px + env(safe-area-inset-top)); left: var(--gut);
    gap: 12px; padding: 0 16px; min-height: 44px; background-color: var(--lg-fill-flat);
  }
}
/* A soft veil under the desktop Pilates links, without changing the baked view's framing. */
@media (min-width: 761px) {
  html:not(.shop) .nav::before {
    content: ''; position: absolute; inset: 0 0 -44px; z-index: -1; pointer-events: none;
    background: linear-gradient(rgba(var(--line-glow), .96), rgba(var(--line-glow), .9) 40px, rgba(var(--line-glow), .4) 70px, rgba(var(--line-glow), 0));
    -webkit-mask-image: linear-gradient(90deg, transparent 54%, #000 70%);
    mask-image: linear-gradient(90deg, transparent 54%, #000 70%);
    opacity: 0; transition: opacity .45s ease;
  }
  html.past-start:not(.shop):has(#isl-copy[data-isle="pilates"]) .nav::before { opacity: 1; }
}
.nav-links a, .icon-btn, .cart-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px;
  padding: 0 12px; border-radius: 999px; text-decoration: none; font-size: 15px; font-weight: 500; color: var(--fg); cursor: pointer;
}
.nav-links a, .icon-btn { background: transparent; border: 0; transition: background-color .2s ease, transform .16s cubic-bezier(.33, 1, .68, 1), color 1s ease; }
.nav-links a:hover, .icon-btn:hover { background-color: var(--chip); }
.nav-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-links + .nav-tools { margin-left: 4px; }
/* night and sound share one glass capsule; the cart is a glass pill of its own */
.nav-pair { display: inline-flex; align-items: center; border-radius: 999px; padding: 0 1px; }
.nav-pair .icon-btn:hover { background-color: rgba(255, 255, 255, .36); }
html.night .nav-pair .icon-btn:hover { background-color: rgba(206, 218, 255, .14); }
.nav-pair .icon-btn:active { transform: scale(.9); }
.icon-btn { padding: 0; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.night-btn .moon-i { display: block; } .night-btn .sun-i { display: none; }
html.night .night-btn .moon-i { display: none; } html.night .night-btn .sun-i { display: block; }
.sound-btn .on-i { display: none; } .sound-btn[aria-pressed="true"] .on-i { display: block; } .sound-btn[aria-pressed="true"] .off-i { display: none; }
/* first visit: the sound button pulses twice once the header is in (it waits under the loader with the header) */
html.sound-hint.ready .sound-btn { animation: hint 1.2s ease 1.9s 2; }
@keyframes hint { 50% { background-color: var(--lg-fill-up); } }
.cart-btn { gap: 6px; padding: 0 14px; }
.cart-btn b { font-weight: 600; font-variant-numeric: tabular-nums; }
/* the header and the island hint wait under the loader; they come in just after the first island's words settle (the
   reveal, html.ready). Hidden means hidden: no focus, no taps. Each control fades itself, not the bar: a fading parent
   would cut its glass off from the sky behind it */
html.gl3d:not(.shop):not(.ready) :is(.nav, .hud) { visibility: hidden; }
html.gl3d.ready :is(.nav, .hud) > * { animation: chrome-in .7s cubic-bezier(.33, 1, .68, 1) .9s backwards; }
@keyframes chrome-in { from { opacity: 0; visibility: hidden; } }
/* gate 3a: narrow phones (360 px and under) fit Stands, night, sound and Cart without clipping the Cart */
@media (max-width: 400px) {
  .nav-links a { padding: 0 8px; }
  .cart-btn { padding: 0 10px; }
}

/* ---- logo B */
.logo-host { display: block; width: 100%; cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: 8px; }
.logo-host svg { display: block; width: 100%; height: auto; overflow: visible; }
.lume { --l-ink: var(--ink); --l-tick: rgba(22,38,58,.5); --l-arc: rgba(22,38,58,.42); --l-band: #FFFFFF; --l-wisp: rgba(255,255,255,.6); --l-face: rgba(255,255,255,.34); --l-plot: rgba(22,38,58,.62); --l-cloud: #FFFFFF; --l-cloud-o: .72; }
.lume.is-night { --l-ink: var(--night-ink); --l-tick: rgba(243,239,229,.55); --l-arc: rgba(243,239,229,.5); --l-band: #B9C4E4; --l-wisp: rgba(196,208,240,.24); --l-face: rgba(8,14,40,.34); --l-plot: #EFE3C4; --l-cloud: #96A4D6; --l-cloud-o: .24; }
.lume .face { fill: var(--l-face); transition: fill 1s ease; }
.lume .plots * { fill: var(--l-plot); transition: fill 1s ease; }
.lume .clouds { fill: var(--l-cloud); opacity: var(--l-cloud-o); transition: fill 1s ease, opacity 1s ease; }
.lume .word text { fill: var(--l-ink); transition: fill 1s ease; }
.lume .arc { fill: none; stroke: var(--l-arc); transition: stroke 1s ease; }
.lume .ticks line { stroke: var(--l-tick); stroke-linecap: round; transition: stroke 1s ease; }
.lume .sun { fill: var(--sun); }
.lume .moon-base { fill: var(--moon); opacity: .17; }
.lume .moon-lit { fill: var(--moon); }
.lume .band { fill: var(--l-band); }
.lume .wisp { fill: var(--l-wisp); animation: wisp 46s linear infinite; }
.lume .stars circle { fill: var(--night-ink); opacity: 0; transition: opacity 1.2s ease; }
.lume.is-night .stars circle { animation: twinkle var(--tw, 5s) ease-in-out infinite; animation-delay: var(--td, 0s); }
@keyframes wisp { from { transform: translateX(var(--w0)); } to { transform: translateX(var(--w1)); } }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: .9; } }

/* ---- island copy */
.copy { position: fixed; z-index: 5; left: var(--gut); right: var(--gut); top: calc(var(--nav-h) + env(safe-area-inset-top) + 4px); pointer-events: none; }
.copy a, .copy .logo-host { pointer-events: auto; }
.copy { opacity: 0; transform: translateY(8px); transition: opacity .6s ease, transform .6s ease, visibility 0s linear .6s; visibility: hidden; }
.copy.on { opacity: 1; transform: none; transition: opacity .7s ease .1s, transform .7s ease .1s, visibility 0s; visibility: visible; }
#start-copy .logo-host { width: min(38vw, 148px); }
.line { margin: 4px 0 0 2px; font-size: 15.5px; font-weight: 450; color: var(--fg); transition: color 1s ease; max-width: 17ch; }   /* on a phone the line wraps, so the next island on the right stays clear */
/* sharp island review (Seb's 375 x 667 iPhone: "Charging stands for Garmin watches." sat on the stone arch and the
   lantern; a phone browser's bars leave a view about 552 px tall, so the court rises under the words). The words get a
   soft rim of light, as the headlines do (--hl-rim): a glow hugging each letter, pale by day and deep blue at night, so
   the stone behind them steps back while the bear, the arch and the sky stay as they are. A veil or a glass panel
   behind the line read as a box over the bear's ear and the open sky, and a backdrop blur would pop in as the copy's
   fade ends (a fading parent cuts a blur off from the page behind). Phones only: a desktop's line is one row in open
   sky. Contrast over the arch: proof/sharp-island/RESUME.md. */
:root { --line-glow: 246, 249, 253; }
html.night { --line-glow: 14, 20, 48; }
@media (max-width: 760px) {
  #start-copy .line {
    text-shadow: 0 0 1px rgba(var(--line-glow), .95), 0 0 3px rgba(var(--line-glow), .95), 0 0 8px rgba(var(--line-glow), .85), 0 0 16px rgba(var(--line-glow), .6);
    transition: color 1s ease, text-shadow 1s ease;
  }
}
/* the island's words: their letters land (js/ui/type.js), so the block only fades in, without a slide of its own.
   By day the headline is Sunlit (the sky's sunset at the top to dusk navy at the foot, a soft light rim) */
#isl-copy { transform: none; }
#isl-copy.on { transition: opacity .25s ease, visibility 0s; }
#isl-copy h2 { margin: 0; font-size: clamp(40px, 11.4vw, 50px); max-width: 14ch; }
html:not(.night) #isl-copy .hl {
  --hl-1: #EF9A60; --hl-2: #BC5A73;
  --hl-rim: drop-shadow(0 1px 0 rgba(255, 240, 225, .7)) drop-shadow(0 6px 14px rgba(40, 30, 70, .18));
  font-weight: 520;
}
/* where the sky behind the words is a deeper blue (the Shop island's teal; on wider screens the words sit higher, in
   bluer sky, on every island) the light runs deeper, ember and plum over the navy, so the words keep 3:1 */
html:not(.night) #isl-copy[data-isle="shop"] .hl { --hl-1: #6A2E22; --hl-2: #582848; }
@media (min-width: 761px) { html:not(.night) #isl-copy .hl { --hl-1: #733326; --hl-2: #5C2A4A; } }
html.night #isl-copy .hl { font-weight: 500; }
.fact { display: inline-flex; align-items: center; min-height: 44px; margin-top: 2px; font-size: 16px; font-weight: 450; color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--rule); }
.fact:hover { border-bottom-color: currentColor; }

/* ---- HUD: dots and the one hint */
.hud { position: fixed; z-index: 6; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
/* the dots and the hint fade one by one (a fading .hud would be a parent cutting their glass off the sky) */
html.inspecting .hud > * { opacity: 0; }
.dots { display: flex; gap: 0; pointer-events: auto; padding: 0 6px; border-radius: 999px; transition: opacity .4s ease; }
.dot { width: 36px; height: 44px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--fg); opacity: .32; transition: opacity .3s ease, transform .3s ease, background 1s ease; }
.dot:hover i { opacity: .6; }
.dot[aria-current] i { opacity: 1; transform: scale(1.35); }
.dot[aria-disabled="true"] { cursor: default; }
.dot[aria-disabled="true"] i { opacity: .16; }
.hint { margin: 0; padding: 5px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--fg-soft); letter-spacing: .01em; transition: opacity .5s ease, color 1s ease; }
.here { display: inline-block; font-weight: 600; color: var(--fg); }   /* inline-block: the island's name settles in (type.js) */
html.past-start .hint .go { display: none; }
.hint .go-touch { display: none; }
@media (pointer: coarse) { .hint .go-mouse { display: none; } .hint .go-touch { display: inline; } }

/* ---- inspect card */
#inspect {
  position: fixed; z-index: 12; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom));
  padding: 16px 16px 14px; border-radius: 22px; color: var(--fg); border: 0;
  /* a glass panel: the material with more body under its words */
  background: var(--lg-sheen) 0 0 / 220% 220% no-repeat, var(--lg-fill-flat);
  box-shadow: inset 1px 1px 0 var(--lg-hi), inset -1px -1px 0 var(--lg-lo), inset 0 -16px 22px -18px var(--lg-in), 0 18px 44px -18px rgba(16, 30, 60, .45);
  -webkit-backdrop-filter: blur(20px) saturate(1.7); backdrop-filter: blur(20px) saturate(1.7);
  opacity: 0; transform: translateY(16px); transition: opacity .45s ease, transform .45s cubic-bezier(.16, 1, .3, 1);
}
#inspect.on { opacity: 1; transform: none; }
#inspect h3 { margin: 0; font-family: var(--serif-text); font-variation-settings: 'opsz' 60; font-size: 25px; font-weight: 540; letter-spacing: -.012em; line-height: 1.1; }
#inspect .row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-right: 40px; }
#inspect .price { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
#inspect .fits { margin: 2px 0 0; font-size: 15px; color: var(--fg-soft); }
#inspect .turn { margin: 8px 0 0; font-size: 13.5px; color: var(--fg-soft); }
#inspect .trust, #inspect .ship { margin: 6px 0 0; font-size: 13.5px; color: var(--fg-soft); }
#inspect .ship { margin-top: 2px; }
#inspect .go {
  display: flex; align-items: center; justify-content: center; margin-top: 12px; min-height: 48px; border-radius: 999px;
  background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; font-size: 16px;
}
html.night #inspect .go { background: var(--night-ink); color: var(--ink); }
#inspect .close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; }
#inspect .close:hover { background: var(--chip); }
#inspect .close svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; fill: none; }

/* ---- footer (reached by one more step after the last island) */
/* a slab of the same glass (the flat kind: it is wide, so no blur), its top edge catching the light */
.foot {
  position: relative; z-index: 8; color: var(--ink); padding: 40px var(--gut) calc(32px + env(safe-area-inset-bottom));
  --rule: rgba(22, 38, 58, .16); --focus: #2F6FD6;
  background: linear-gradient(180deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 96px), rgba(243, 245, 248, .95);
  border-radius: 26px 26px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(255, 255, 255, .4), 0 -14px 34px -22px rgba(16, 30, 60, .38);
}
.foot-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; }
.foot-brand { margin: 0; font-family: var(--serif-text); font-variation-settings: 'opsz' 48; font-weight: 540; font-size: 21px; letter-spacing: -.01em; }
.foot-end { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; }
.foot-credits { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-underline-offset: 3px; text-decoration-color: rgba(22, 38, 58, .35); }
.foot-credits:hover { text-decoration-color: currentColor; }
.foot-nav { display: flex; gap: 4px 16px; flex-wrap: wrap; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; border-bottom: 1px solid var(--rule); }
.foot-fine { margin: 0 0 8px; font-size: 13.5px; color: var(--ink-soft); max-width: 78ch; }

/* ---- no 3D: the same words as a plain page */
.static { display: none; }
html:not(.gl3d) .static { display: block; }
html:not(.gl3d) .copy, html:not(.gl3d) .hud, html:not(.gl3d) #gl, html:not(.gl3d) #xfade { display: none; }
html:not(.gl3d) .stage { height: auto; }
html:not(.gl3d) #loader { display: none; }
.static { position: relative; z-index: 4; padding: calc(var(--nav-h) + 24px) var(--gut) 40px; background: linear-gradient(#cfe0f2, #f3f5f8 70%); color: var(--ink); min-height: 100vh; }
.static h1 { font-size: 42px; margin: 0 0 10px; }
.static ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; max-width: 640px; }
.static li { background: #fff; border-radius: 14px; padding: 14px 16px; border: 1px solid var(--rule); }
.static li a { font-family: var(--serif-text); font-variation-settings: 'opsz' 48; font-weight: 540; font-size: 19px; text-decoration: none; }
.static li span { display: block; color: var(--ink-soft); font-size: 15px; }

/* ---- the Shop island's rail: a link under each stand (its group and its name); world.js places them every frame */
.rail-labels { position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s; }
.rail-labels.on { opacity: 1; visibility: visible; transition: opacity .42s ease, visibility 0s; }   /* in by the time the camera settles (world.js RAIL_LEAD) */
.rail-label {
  position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; min-width: 44px; min-height: 44px;
  padding: 5px 13px 6px; border-radius: 16px; text-decoration: none; color: var(--fg); text-align: center; white-space: nowrap;
  pointer-events: auto;
  /* the glass of the dots and the hint, the flat kind: world.js moves the chips every frame, so no blur behind them;
     the fill has the body to keep the words readable over any rock, by day and night */
  -webkit-backdrop-filter: none; backdrop-filter: none; background-color: var(--lg-fill-flat);
}
.rail-labels:not(.on) .rail-label { pointer-events: none; }
/* they settle in with their island, one after another (translate: world.js owns their transform) */
.rail-labels.on .rail-label { animation: chip-in .55s cubic-bezier(.33, 1, .68, 1) backwards; }
.rail-labels.on .rail-label:nth-child(2) { animation-delay: .07s; }
.rail-labels.on .rail-label:nth-child(3) { animation-delay: .14s; }
.rail-labels.on .rail-label:nth-child(n+4) { animation-delay: .2s; }
@keyframes chip-in { from { translate: 0 8px; opacity: 0; } }
.rail-label .g { font-size: 12.5px; font-weight: 500; letter-spacing: .01em; color: var(--fg-soft); transition: color 1s ease; }
.rail-label .n { font-family: var(--serif-text); font-variation-settings: 'opsz' 30; font-size: 15.5px; font-weight: 540; letter-spacing: -.003em; line-height: 1.2; text-underline-offset: 3px; }
.rail-label:hover .n, .rail-label:focus-visible .n { text-decoration: underline; text-decoration-thickness: 1px; }
.rail-label:hover, .rail-label:focus-visible { background-color: var(--lg-fill-flat); background-position: 80% 80%, 0 0; }   /* the light moves, the body stays */
/* gate 3i (Seb: on a 360 px phone the chips were only 4 px apart): narrow phones get a slimmer chip (the words and
   their size unchanged), so each stays under its stand with a clear gap */
@media (max-width: 400px) { .rail-label { padding: 4px 8px 6px; } }

/* phones: a calmer logo (no drifting wisp, still stars, lighter dial ticks) */
html.is-phone #start-copy .lume .wisp { display: none; }
html.is-phone #start-copy .lume.is-night .stars circle { animation: none; opacity: .55; }
html.is-phone #start-copy .lume .ticks line { opacity: .6; }

@media (min-width: 761px) {
  :root { --gut: clamp(24px, 4.2vw, 64px); --nav-h: 68px; }
  .nav-links a + a { display: inline-flex; }
  .nav-logo { width: 116px; }
  .copy { right: auto; width: min(36vw, 560px); top: calc(var(--nav-h) + 2vh); }
  #start-copy .logo-host { width: min(16vw, 250px); }
  .line { font-size: clamp(17px, 1.45vw, 23px); margin-left: .4vw; max-width: 30ch; }
  #isl-copy h2 { font-size: clamp(42px, 4.5vw, 70px); }
  .fact { font-size: clamp(16px, 1.15vw, 19px); }
  .rail-label .g { font-size: clamp(12.5px, .92vw, 15px); }
  .rail-label .n { font-size: clamp(15.5px, 1.18vw, 19px); }
  #inspect { left: auto; right: var(--gut); bottom: auto; top: 50%; width: 340px; transform: translate(16px, -50%); }
  #inspect.on { transform: translate(0, -50%); }
  .hud { bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html:not(.shop) .nav::before { transition: none; }
  .lume .wisp { animation: none; opacity: 0; }
  .lume.is-night .stars circle { animation: none; opacity: .6; }
  .copy, .copy.on, #inspect, #gl { transition-duration: .01s; }
  /* the header and hint appear at the reveal at once; the chips just appear; nothing slides between pages */
  html.gl3d.ready :is(.nav, .hud) > *, .rail-labels.on .rail-label, html.sound-hint.ready .sound-btn { animation: none; }
  :is(a, button).lg, .cart-btn, .rail-label, .nav-links a, .icon-btn, .nav-logo { transition: none; }
  :is(a, button).lg:active, .cart-btn:active, .rail-label:active, .nav-pair .icon-btn:active { transform: none; }
}

/* ---- between pages (cross-document view transitions, Chrome and Safari 18.2+; others just load the page): the
   page crossfades and the stand name flies into the next page's title (js/ui/type.js names the one it leaves through,
   the next page's head script the one it arrives at). Each page's head script switches them on (and not with reduced
   motion); these are their timings. */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .36s; animation-timing-function: cubic-bezier(.33, 1, .68, 1); }
::view-transition-group(stand-name) { animation-duration: .56s; animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
::view-transition-old(stand-name), ::view-transition-new(stand-name) { animation-duration: .56s; }

/* ---- reduced transparency: the glass turns solid, nothing blurs behind it */
@media (prefers-reduced-transparency: reduce) {
  .lg, .dots, .hint, .cart-btn, .rail-label, #inspect { background: var(--lg-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .foot { background: #F3F5F8; }
}
/* ---- forced colours (Windows contrast themes): headlines in the system's text colour */
@media (forced-colors: active) {
  .hl { filter: none; }
  .hl .ch { background: none; color: CanvasText; }
}
#inspect s.was { font-weight: 400; opacity: 0.6; margin-right: 0.2em; }
/* the watch question on a first visit (Seb 2026-11-23) */
.ld-pick { position: absolute; left: 0; right: 0; top: calc(50% + min(19vw, 84px) + 2vh); display: grid; justify-items: center; gap: 12px;
  pointer-events: auto; opacity: 0; animation: ld-in .6s ease .9s forwards; transition: opacity .4s ease; }
.ld-pick.chosen { opacity: 0 !important; animation: none; pointer-events: none; }
.ld-q { margin: 0; font-size: 15px; font-weight: 500; color: var(--ink); letter-spacing: .01em; }
.ld-btns { display: flex; gap: 10px; }
.ld-btns button { font: inherit; font-size: 15px; font-weight: 600; min-width: 132px; min-height: 46px; padding: 0 20px; border-radius: 999px; cursor: pointer;
  color: var(--ink); background: rgba(255, 255, 255, .72); border: 1px solid rgba(22, 38, 58, .18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background .2s ease, transform .2s ease; }
.ld-btns button:hover { background: rgba(255, 255, 255, .92); }
.ld-btns button:active { transform: scale(.97); }
.ld-btns button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
html.night .ld-q { color: var(--night-ink); }
html.night .ld-btns button { color: var(--night-ink); background: rgba(20, 28, 60, .55); border-color: rgba(243, 239, 229, .25); }
#loader.leaving { transition-duration: .3s; }
#loader.leaving .ld-pick { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .ld-pick { animation-duration: .01s; animation-delay: 0s; } }
