/* ==========================================================================
   ELIOS — motion layer. Loaded after styles.css and the page stylesheet.
   Everything here is progressive: it only applies when animations.js adds
   `html.gsap` (and is skipped for prefers-reduced-motion).
   ========================================================================== */

:root { --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-io: cubic-bezier(.7, 0, .2, 1); }
html { scrollbar-gutter: stable; }

/* ---------- Lenis ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

/* ---------- Loading state ---------- */
html.is-loading, html.is-loading body { overflow: hidden; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 1000; background: var(--ink); color: var(--white);
  display: grid; place-items: center; overflow: hidden; clip-path: inset(0 0 0 0);
  animation: preloader-failsafe .01s 10s forwards; /* if scripts never run, never trap the visitor */
}
@keyframes preloader-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }
.preloader__bar { position: absolute; left: 0; right: 0; top: 0; height: 0.1875rem; background: rgba(255, 255, 255, .08); }
.preloader__bar i { position: absolute; inset: 0; background: var(--yellow); transform-origin: 0 50%; transform: scaleX(0); }
.preloader__meta { position: absolute; left: var(--gutter); right: var(--gutter); top: 2.5rem; display: flex; justify-content: space-between; gap: 1.5rem; font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: -.02em; text-transform: uppercase; }
.preloader__meta span:last-child { opacity: .5; text-align: right; }
.preloader__logo { width: clamp(84px, 8.2vw, 140px); }
.preloader__logo .logo__mark, .preloader__logo svg, .preloader__logo img { display: block; width: 100%; height: auto; overflow: visible; }
.preloader__num { display: inline-block; min-width: 3ch; text-align: right; }
/* nothing but the ink shows until the script has put the logo in and starts the sequence (no stray "0%" first) */
.preloader:not(.is-ready) .preloader__count, .preloader:not(.is-ready) .preloader__meta { visibility: hidden; }
.preloader__count { position: absolute; left: var(--gutter); bottom: 1.75rem; display: flex; align-items: flex-start; gap: .08em; font-family: var(--font-mono); font-size: clamp(88px, 15vw, 260px); line-height: .78; letter-spacing: -.06em; overflow: hidden; padding-top: .06em; }
@media (min-width: 1025px) { .preloader__count { font-size: 200px; } }
.preloader__count em { font-style: normal; font-size: .32em; line-height: 1; margin-top: .12em; color: var(--yellow); letter-spacing: 0; }
@media (prefers-reduced-motion: reduce) { .preloader { display: none; } }
.no-motion .preloader, .no-motion .pt, .no-motion .scroll-progress { display: none !important; }
@media (max-width: 760px) { .preloader__meta span:last-child { display: none; } .preloader__meta { top: 24px; } }

/* ---------- Page transition curtain ---------- */
.pt { position: fixed; inset: 0; z-index: 990; display: flex; pointer-events: none; visibility: hidden; }
.pt.is-active { pointer-events: all; visibility: visible; }
.pt__col { flex: 1; background: var(--ink); border-top: 2px solid var(--yellow); transform: translateY(101%); }

/* ---------- Scroll progress ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 0.1875rem; z-index: 900; background: var(--yellow); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

/* ---------- Cursor halo (the native cursor always stays visible) ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 2000; pointer-events: none; opacity: 0; width: 20px; height: 20px; margin: -10px 0 0 -10px; border: 1px solid #fff; border-radius: 50%; mix-blend-mode: difference; }   /* a quiet ring that inverts against whatever is under it */
.cursor.is-dot { background: #fff; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Header: one fixed size. Only the tone (light/dark colours) changes, and it slides away on scroll down / back on scroll up ---------- */
/* --hy is set by animations.js: it lifts the bar from its resting spot under the announcement bar to 18px from the top, in step with the scroll (no easing, so nothing lags).
   Hiding uses the separate `translate` property so the two never fight. */
.gsap .site-header { position: fixed; top: 2.5rem; transform: translate3d(0, var(--hy, 0px), 0); translate: 0 0; transition: translate .5s var(--ease-out); }
.gsap .site-header.is-hidden { translate: 0 calc(-100% - 8rem); }
.gsap .site-header:focus-within { translate: 0 0; }   /* never hide a focused control */
.gsap .site-header .logo, .gsap .site-header .nav, .gsap .site-header .header__cta, .gsap .site-header .menu-toggle { transition: background-color .45s ease, color .45s ease, box-shadow .45s ease; }
.gsap .site-header.is-scrolled[data-tone="light"] .nav { background: rgba(244, 244, 242, .94); box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 0.5rem 1.5rem -0.75rem rgba(0, 0, 0, .25); }
.gsap .site-header.is-scrolled[data-tone="dark"] .nav { background: rgba(22, 22, 22, .9); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 0.5rem 1.5rem -0.75rem rgba(0, 0, 0, .5); }
.gsap .site-header[data-tone="dark"] { color: var(--white); }
.gsap .site-header[data-tone="dark"] .nav { background: rgba(255, 255, 255, .12); }
.gsap .site-header[data-tone="dark"] .header__cta { background: var(--white); color: var(--black); }
.gsap .site-header[data-tone="dark"] .menu-toggle { background: var(--white); color: var(--black); }
.gsap .site-header[data-tone="light"] { color: var(--black); }
.gsap .site-header[data-tone="light"] .nav { background: rgba(236, 236, 234, .94); }
.gsap .site-header[data-tone="light"] .header__cta { background: var(--ink); color: var(--white); }
.gsap .site-header[data-tone="light"] .menu-toggle { background: var(--ink); color: var(--white); }
.gsap.menu-open .site-header { color: var(--white); }
.gsap.menu-open .site-header .menu-toggle { background: var(--white); color: var(--black); }

/* ---------- Cheaper glass: blur re-renders every frame over moving photos, so use tints instead ---------- */
.gsap *, .gsap *::before, .gsap *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.gsap .stat-glass { background: rgba(58, 58, 58, .56); }
.gsap .about-hero .btn--shade, .gsap .btn--shade { background: rgba(0, 0, 0, .34); }

/* ---------- Old reveal system off: GSAP drives everything ---------- */
.gsap [data-reveal] { transition: none !important; }
/* GSAP owns opacity/transform on these; a CSS opacity transition would make `from()` read a mid-fade value as its end state */
.gsap .btn { transition: background-color .25s ease, color .35s ease; }
.gsap .tag, .gsap .feature, .gsap .field, .gsap .logo-card, .gsap .standard-card, .gsap .advantage__card { transition: none; }
.gsap .icon-btn { transition: background-color .25s ease, color .35s ease; }

/* ---------- Buttons: fill wipe + rolling label ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn:not(.btn--plain)::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fill, #fff); transform: translateY(101%); transition: transform .55s var(--ease-io); }
@media (hover: hover) { .btn:not(.btn--plain):hover::after { transform: none; } }
@media (hover: hover) { .btn:not(.btn--plain):hover { color: var(--fill-ink, #000); } }
.btn--dark, .btn--black, .btn--white { --fill: var(--yellow); --fill-ink: var(--ink); }
.btn--yellow, .btn--glass, .btn--shade { --fill: #fff; --fill-ink: var(--ink); }
.btn--light { --fill: var(--ink); --fill-ink: #fff; }
.icon-btn { position: relative; overflow: hidden; isolation: isolate; }
.icon-btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--yellow); transform: translateY(101%); transition: transform .5s var(--ease-io); }
@media (hover: hover) { .icon-btn:not(:disabled):hover::after { transform: none; } }
@media (hover: hover) { .icon-btn:not(:disabled):hover { color: var(--ink); } }

.roll { display: inline-grid; overflow: hidden; vertical-align: top; }
.roll > span { grid-area: 1 / 1; display: block; transition: transform .55s var(--ease-io); }
.roll > span + span { transform: translateY(110%); }
@media (hover: hover) { a:hover > .roll > span:first-child, button:hover > .roll > span:first-child { transform: translateY(-110%); } }
@media (hover: hover) { a:hover > .roll > span + span, button:hover > .roll > span + span { transform: none; } }
.btn--plain .roll > span { transition-duration: .45s; }

/* ---------- Testimonial progress pauses while held ---------- */
.testimonial__card.is-held .testimonial__progress button.is-active i { animation-play-state: paused; }

/* ---------- Focus + skip link ---------- */
html { scroll-padding-top: 7.5rem; scroll-padding-bottom: 3rem; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 0.1875rem; box-shadow: 0 0 0 0.3125rem rgba(255, 255, 255, .92); }
.skip-link { position: fixed; left: 1rem; top: 0.75rem; z-index: 2100; padding: 0.75rem 1.125rem; background: var(--white); color: var(--ink); font-family: var(--font-mono); font-size: var(--fs-mono); text-transform: uppercase; transform: translateY(-200%); transition: transform .25s ease; }
.skip-link:focus { transform: none; }
a:focus-visible > .roll > span:first-child, button:focus-visible > .roll > span:first-child { transform: translateY(-110%); }
a:focus-visible > .roll > span + span, button:focus-visible > .roll > span + span { transform: none; }

/* ---------- Background video pause (WCAG 2.2.2) ---------- */
.video-toggle { position: absolute; z-index: 5; right: var(--gutter); top: 7rem; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .38); color: var(--white); }
@media (hover: hover) { .video-toggle:hover { background: rgba(0, 0, 0, .6); } }
.video-toggle svg { width: 0.875rem; height: 0.875rem; fill: currentColor; }
@media (max-width: 1024px), (pointer: coarse) { .video-toggle { width: 2.75rem; height: 2.75rem; } }   /* 44px target */
.video-toggle[hidden] { display: none; }
.video-toggle .i-play { display: none; }
.video-toggle[aria-pressed="true"] .i-play { display: block; }
.video-toggle[aria-pressed="true"] .i-pause { display: none; }

/* ---------- Split text ---------- */
.gsap .split-ready { visibility: visible; }
[data-split-hide] { visibility: hidden; }

/* ---------- Media: clip reveal + parallax image ---------- */

/* ---------- Tilt cards ---------- */
@media (min-width: 1025px) { :where(.tilt) { position: relative; } }   /* only where the element has no position of its own (:where keeps specificity at 0, so a collage tile stays absolutely placed); the script never writes a position */
.tilt__glare { position: absolute; inset: 0; pointer-events: none; z-index: 3; opacity: 0; background: radial-gradient(22.5rem circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .13), transparent 62%); transition: opacity .3s ease; }
@media (hover: hover) and (min-width: 1025px) { .tilt:hover > .tilt__glare { opacity: 1; } }
.stat-tile.tilt { overflow: hidden; }

/* ---------- Home hero: layered 3D scene (desktop) ---------- */
.hero__bg { container-type: inline-size; }   /* the scene is measured against the 1728 design stage, not the window */
.hero__scene { display: none; }
@media (min-width: 1025px) {
  .hero { --sc: .82; }   /* the scene's bottom edge lands on the hero's bottom edge (hero height = 59.14vw, capped at 1047px, = 1047 x stage/1728 at this scale), so the stack runs into the next section with no gap */
  @media (max-width: 1500px) { .gsap .hero--layered .hero__scene { margin-left: 4cqw; } }
  @media (max-width: 1360px) { .gsap .hero--layered .hero__scene { margin-left: 9cqw; } }   /* fixed-size type needs more air on smaller windows: the art moves right of the headline (the aside drops under the proof row, see styles.css) */
  .gsap .hero--layered .hero__flat { display: none; }
  .gsap .hero--layered .hero__scene { display: block; position: absolute; width: calc(1849 / 1728 * 100cqw * var(--sc)); left: calc(50cqw - 1849 / 1728 * 50cqw * var(--sc) - 2.75cqw); top: calc(-315.3 / 1728 * 100cqw * var(--sc) - .2cqw); aspect-ratio: 1536 / 1327; }
  .hero__layer { position: absolute; left: 0; width: 100%; }
  .hero--live .hero__layer, .hero--live .hero__swing { will-change: transform; }
  .hero__layer--container { top: 0; height: calc(1010 / 1327 * 100%); z-index: 2; }
  .hero__layer--stack { top: calc(1010 / 1327 * 100%); height: calc(317 / 1327 * 100%); z-index: 1; }
  .hero__swing { width: 100%; height: 100%; transform-origin: 53% 0; }
  .hero__layer img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
}

.site-footer__inner, .site-footer__corners { position: relative; z-index: 1; }

/* ---------- Footer wordmark 3D flip ---------- */
.site-footer__wordmark { perspective: 56.25rem; }
.site-footer__wordmark .char { display: inline-block; transform-origin: 50% 100%; }

/* ---------- Marquee driven by GSAP ---------- */
.marquee__row { will-change: transform; }
@media (min-width: 1025px) { .gsap .marquee__row { animation: none; } }   /* desktop: moved by the GSAP ticker (speeds up with scroll). Tablet and phone keep the CSS loop (runs on the compositor), paused while off screen by animations.js */
.marquee__row.is-off { animation-play-state: paused; }

/* ---------- Mobile: lighter ---------- */
@media (max-width: 1024px) {
  /* The header keeps its size and shape at every scroll position: main.js lifts it with --hy (transform only), the tone and the scrim come from styles.css, and it
     slides away / back with `translate` (above). No padding change, no solid bar that grows, no jump. */
  .gsap .site-header { top: 24px; transition: translate .5s var(--ease-out); }
  .gsap .site-header.is-hidden { translate: 0 calc(-100% - 6rem); }
}
@media (prefers-reduced-motion: reduce) {
  .cursor, .scroll-progress, .pt { display: none; }
}

/* ---------- Desktop: the hero stays put and the next section lifts over it (curtain), dimmed by a veil ---------- */
@media (min-width: 1025px) {
  .gsap .hero, .gsap .svc-hero, .gsap .about-hero { position: sticky; top: 0; z-index: 0; }
  .gsap main > section:not(.hero):not(.svc-hero):not(.about-hero) { position: relative; z-index: 1; }
  .gsap .hero::after, .gsap .svc-hero::after, .gsap .about-hero::after { content: ""; position: absolute; inset: 0; background: #0a0908; opacity: var(--veil, 0); pointer-events: none; z-index: 8; }
}
.split-word { display: inline-block; }

/* ---------- Signature: the route (Numbers block, route.js) ----------
   A shipping route drawn by scroll through a hub on every number tile. The path sits between the photo and the tiles
   (it runs under a tile: the tile is the terminal); the hub rings sit above the tiles. Decorative, aria-hidden. */
.stats .route, .stats .route-map { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.stats .route { overflow: visible; }
.stats .route-map {
  top: -3.75rem; height: calc(100% + 7.5rem);
  background-image: radial-gradient(circle, color-mix(in srgb, var(--ink) 22%, transparent) 1px, transparent 1.5px);
  background-size: 1.5rem 1.5rem;
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 66% 50%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 58% at 66% 50%, #000 30%, transparent 100%);
}
.route__plan { fill: none; stroke: var(--ink); stroke-opacity: .32; stroke-width: 1.5; stroke-dasharray: 1 7; stroke-linecap: round; }
.route__glow { fill: none; stroke: #fff; stroke-opacity: .7; stroke-width: 18; }
.route--sm .route__glow { stroke-width: 11; }
.route__case { fill: none; stroke: var(--ink); stroke-width: 10; }
.route__line { fill: none; stroke: var(--yellow); stroke-width: 7; }
.route__wake { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.route--sm .route__case { stroke-width: 6.5; }
.route--sm .route__line { stroke-width: 4.5; }
.route--sm .route__wake { stroke-width: 1; }
.route--sm .route__plan { stroke-dasharray: 1 5; }
.route__marker { opacity: 0; }
.route__halo { fill: var(--yellow); opacity: .32; }
.route__box { fill: var(--ink); }
.route__ribs { fill: none; stroke: #fff; stroke-opacity: .28; stroke-width: 1.2; }
.route__nose { fill: var(--yellow); }
.route__ring { fill: #fff; stroke: var(--ink); stroke-width: 2; transform-box: fill-box; transform-origin: center; transition: fill .35s ease, transform .5s var(--ease-out); }
.route__dot { fill: var(--ink); }
.route__pulse { fill: none; stroke: var(--yellow); stroke-width: 2.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.route__hub.is-on .route__ring { fill: var(--yellow); transform: scale(1.2); }
.route__hub.is-pulse .route__pulse { animation: route-pulse 1s var(--ease-out) both; }
@keyframes route-pulse { 0% { opacity: .95; transform: scale(1); stroke-width: 3; } 100% { opacity: 0; transform: scale(3.6); stroke-width: .6; } }
.route--sm .route__ring { stroke-width: 1.6; }
@media (prefers-reduced-motion: reduce) { .route__hub.is-pulse .route__pulse { animation: none; } .route__ring { transition: none; } }
