/* ==========================================================================
   MOTION: helpers for assets/stage/motion.js, shared by both designs.
   ========================================================================== */
/* Lenis (from lenis 1.3.11's stylesheet) */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }
html.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* GSAP owns these: no CSS transition may chase its inline values */
html.gsap .m { transition-property: none !important; }
html.gsap .sweep.m { transition-property: -webkit-mask-position, mask-position, opacity !important; }

/* split headings: each word rises inside its own line box. The box is
   padded so ascenders, descenders and accents are never clipped. */
.mw { display: inline-block; vertical-align: top; overflow: hidden; padding: .1em .06em .24em; margin: -.1em -.06em -.24em; }
.mw__i { display: inline-block; }
/* read-along words */
.sw { transition: none; }

/* -------------------------------------------------------------- slides
   A small slideshow: one picture at a time, a label and timed dots. */
.slides { position: relative; }
.slides__view { position: relative; aspect-ratio: 1.6; border-radius: var(--slides-rad, 16px); overflow: hidden; background: #06070b; box-shadow: var(--slides-shadow, 0 0 0 1px rgba(255, 255, 255, .08), 0 60px 140px -60px rgba(0, 0, 0, .9)); isolation: isolate; }
.slides__item { position: absolute; inset: 0; margin: 0; opacity: 0; transform: scale(1.035); transition: opacity 1s cubic-bezier(.25, .1, .25, 1), transform 6s cubic-bezier(.16, 1, .3, 1); }
.slides__item.is-current { opacity: 1; transform: none; z-index: 1; }
.slides__item img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.slides__ctl { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 26px; }
.slides__label { min-width: 11ch; text-align: right; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.slides__dots { display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 18px; border-radius: 999px; }
.slides__dots .dot { width: 8px; height: 8px; }
.slides__dots .dot.is-current { width: 36px; }
.slides__play { width: 44px; height: 44px; }
.slides .i-pause { display: none; }
.slides__play[data-state="playing"] .i-pause { display: block; }
.slides__play[data-state="playing"] .i-play { display: none; }
@media (max-width: 734px) { .slides__label { display: none; } .slides__ctl { gap: 10px; } }
@media (prefers-reduced-motion: reduce) { .slides__item { transition: opacity .3s linear; transform: none; } }

/* ------------------------------------------------- Horizon and Eclipse
   The two buttons at either end of the top bar, as small as the Discord
   pill: a glass pill with the design's glyph. The design you are in is
   filled (champagne daylight for Horizon, moonlit indigo for Eclipse);
   the other stays glass until it is pointed at, then shows its own fill
   over the page's preview of that design (lookbtn.js). */
.look-btn {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 9px; border: 0; border-radius: 999px;
  font: 600 13px/1 "Instrument Sans", ui-sans-serif, system-ui, -apple-system, sans-serif; letter-spacing: -.004em; text-decoration: none; white-space: nowrap; cursor: pointer;
  color: rgba(241, 244, 247, .88); background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  transition: background-color .25s ease, box-shadow .25s ease, color .25s ease, transform .35s cubic-bezier(.16, 1, .3, 1);
}
.look-btn__i { display: grid; place-items: center; width: 16px; height: 16px; }
.look-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.look-btn--horizon .look-btn__i { color: #f3c98b; }
.look-btn--eclipse .look-btn__i { color: #b8c6ff; }
.look-btn:active { transform: scale(.96); transition-duration: .1s; }
.look-btn:focus-visible { outline: 2px solid #8fb0ff; outline-offset: 2px; }
.look-btn[aria-current="page"], .look-btn[aria-pressed="true"] { cursor: default; transform: none; }
.look-btn--horizon:hover, .look-btn--horizon[aria-current="page"], .look-btn--horizon[aria-pressed="true"] {
  color: #211a10; background: linear-gradient(180deg, #fffaf1 0%, #f7e7cf 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 236, 205, .7), 0 6px 18px -8px rgba(246, 190, 112, .6);
}
.look-btn--horizon:hover .look-btn__i, .look-btn--horizon[aria-current="page"] .look-btn__i, .look-btn--horizon[aria-pressed="true"] .look-btn__i { color: #c0731a; }
.look-btn--eclipse:hover, .look-btn--eclipse[aria-current="page"], .look-btn--eclipse[aria-pressed="true"] {
  color: #f4f6ff; background: linear-gradient(180deg, #283052 0%, #12162a 100%);
  box-shadow: inset 0 0 0 1px rgba(184, 198, 255, .36), inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 18px -8px rgba(110, 140, 255, .7);
}
.look-btn--eclipse:hover .look-btn__i, .look-btn--eclipse[aria-current="page"] .look-btn__i, .look-btn--eclipse[aria-pressed="true"] .look-btn__i { color: #d3dcff; }
.gbar__in > .look-btn--horizon + .brand { margin-left: 4px; }
.gbar__links + .look-btn--eclipse { margin-left: clamp(18px, 2.4vw, 32px); }
@media (max-width: 900px) { .gbar__in > .look-btn--eclipse { margin-left: auto; } }
@media (max-width: 600px) { .look-btn { padding: 0; width: 32px; height: 32px; justify-content: center; } .look-btn__t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .look-btn { transition: none; } .look-btn:active { transform: none; } }

/* pointing at the other design shows the page in its light or its dark */
.look-veil { position: fixed; inset: 0; z-index: 25; pointer-events: none; opacity: 0; transition: opacity .5s ease; }
html.look-preview .look-veil { opacity: 1; }
.look-veil[data-tone="light"] { background: radial-gradient(140% 100% at var(--px, 50%) 0%, rgba(255, 255, 255, .92), rgba(245, 247, 249, .78) 55%, rgba(236, 240, 247, .7)); }
.look-veil[data-tone="dark"] { background: radial-gradient(140% 100% at var(--px, 50%) 0%, rgba(0, 0, 0, .55), rgba(2, 3, 6, .86) 60%); }
@media (prefers-reduced-motion: reduce) { .look-veil { transition: none; } }

/* arriving through the dissolve: the page starts under the new colour */
html.dissolve-in-light::after, html.dissolve-in-dark::after { content: ""; position: fixed; inset: 0; z-index: 2147483000; }
html.dissolve-in-light::after { background: #f5f7f9; }
html.dissolve-in-dark::after { background: #030407; }

/* a reload mid-page waits under the colour of the band that was in view
   until stage.js has the reader back in place (stage.js, Return) */
html.at-return::before { content: ""; position: fixed; inset: 0; z-index: 2147483000; background: var(--at-bg, #000); }
/* state set while booting lands as it is (stage.js, Scrolly) */
.is-instant, .is-instant * { transition: none !important; }
