/* KX Studio scroll preview shell · round 5, lane shell
   HUD text is Roboto Flex (OFL, licence beside the font), colours are the KORTEKX tokens (brand_v1 / landing_v1).
   Geist stays declared below only because the canvas screens (siteScreen, storyA, final) still draw with it. Remove when they stop. */
@font-face { font-family: 'Roboto Flex'; src: url(../assets/fonts/roboto-flex-latin-wght-normal.woff2) format('woff2'); font-weight: 100 1000; font-style: normal; font-display: swap; }
@font-face { font-family: Geist; src: url(../assets/fonts/Geist-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Geist; src: url(../assets/fonts/Geist-Medium.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Geist; src: url(../assets/fonts/Geist-SemiBold.woff2) format('woff2'); font-weight: 600; font-display: swap; }

/* brand tokens. --light, --amber and --gold are read by the other lanes' files, so they stay. */
:root {
  --bg: #0A0E12; --surface: #121A21; --ink: #0A0E12; --light: #EEF2F4; --text: #EEF2F4; --muted: #93A1AC; --line: #22303A;
  --accent: #3FC1B0; --error: #FF4D4D; --amber: #FFB347; --gold: #C9AD7A; --mute: #93A1AC;
  --ease: cubic-bezier(.2, .8, .2, 1); --t: 250ms;
  --edge: clamp(1.25rem, 6vw, 6rem);
  --hud: 'Roboto Flex', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
html, body { margin: 0; background: #0A0E12; color: var(--text); font-family: var(--hud); }
html, body { touch-action: pan-x pan-y; } /* U-NOZOOM (Tech COS 17o): no pinch, no double-tap zoom */
#stage { position: fixed; inset: 0; }
#stage canvas { width: 100%; height: 100%; display: block; }
#track { position: relative; width: 1px; }
#captions { position: fixed; inset: 0; pointer-events: none; }

/* ---- the heading: "We Provide" (still) over the service name (slides up). One block for the whole page. ---- */
.headwrap { position: absolute; inset: 0; --hs: clamp(2.5rem, 4.5vw, 4.75rem); }
.cap.head { position: absolute; bottom: 11vh; width: min(62rem, calc(100vw - 2 * var(--edge))); }
.headwrap.left .cap.head { left: var(--edge); text-align: left; }
.headwrap.right .cap.head { right: var(--edge); text-align: right; }
.cap.head .hi { opacity: 0; filter: drop-shadow(0 1px 1px rgba(10, 14, 18, .4)) drop-shadow(0 2px 26px rgba(10, 14, 18, .55)); }
.cap.head h2 { margin: 0; font-family: var(--hud); font-size: var(--hs); line-height: 1.12; letter-spacing: -.028em; font-weight: 300; font-variation-settings: 'opsz' 144; }
.cap.head .lead { display: block; color: rgba(238, 242, 244, .78); }
.cap.head .name { display: block; position: relative; height: 1.16em; overflow: hidden; -webkit-mask-image: linear-gradient(#0000, #000 7%, #000 93%, #0000); mask-image: linear-gradient(#0000, #000 7%, #000 93%, #0000); color: var(--text); font-weight: 520; white-space: nowrap; }
.cap.head .name .w { position: absolute; top: 0; will-change: transform, opacity; }
.headwrap.left .name .w { left: 0; }
.headwrap.right .name .w { right: 0; }
.cap.head .sr, .sr-live { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* arrival (first load only) and the side change both use the same fade */
.headwrap.on .hi, .headwrap.on .scrim { opacity: 1; }
.headwrap .hi, .headwrap .scrim { transition: opacity .9s var(--ease); }
.headwrap.still .hi, .headwrap.still .scrim { transition: none; }
.headwrap.swap .hi, .headwrap.swap .scrim { opacity: 0; transition: opacity .2s linear; }
/* one soft shade along the bottom edge behind the heading, fading to nothing to the right and upward: no edge, no box.
   The darkness is only what the words need on a bright scene; on the night scenes it is hardly noticed. */
.headwrap .scrim { position: absolute; bottom: 0; width: min(100%, 92rem); height: 58vh; pointer-events: none; opacity: 0;
  background: linear-gradient(to top, rgba(10, 14, 18, var(--sa, .74)) 0%, rgba(10, 14, 18, calc(var(--sa, .74) * .8)) 34%, rgba(10, 14, 18, calc(var(--sa, .74) * .38)) 68%, rgba(10, 14, 18, 0) 100%);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 48%, rgba(0, 0, 0, .5) 74%, transparent 100%); mask-image: linear-gradient(to right, #000 0%, #000 48%, rgba(0, 0, 0, .5) 74%, transparent 100%); }
.headwrap.left .scrim { left: 0; }
.headwrap.right .scrim { right: 0; -webkit-mask-image: linear-gradient(to left, #000 0%, #000 48%, rgba(0, 0, 0, .5) 74%, transparent 100%); mask-image: linear-gradient(to left, #000 0%, #000 48%, rgba(0, 0, 0, .5) 74%, transparent 100%); }

/* ---- brand, progress rail, loading ---- */
#brand { position: fixed; top: 1.4rem; left: var(--edge); margin: 0; font: 600 1rem/32px var(--hud); letter-spacing: .01em; text-shadow: 0 1px 12px rgba(10, 14, 18, .6); }
#brand span { color: rgba(238, 242, 244, .72); font-weight: 400; }
#rail { position: fixed; right: 1.4rem; top: 20vh; height: 60vh; width: 2px; background: rgba(238, 242, 244, .12); }
#rail-fill { position: absolute; inset: 0; background: var(--text); opacity: .8; transform-origin: top; transform: scaleY(0); }
#loading { position: fixed; inset: 0; display: grid; place-items: center; background: #0A0E12; color: var(--muted); font: 400 .9rem var(--hud); z-index: 9; transition: opacity .8s; }

/* ---- pause button: 32 px icon, top right. Quiet until hovered or focused. ---- */
#pause { position: fixed; top: 1.4rem; right: 1.4rem; z-index: 7; /* above final.js's form layer (z-index 4), so its gradient never dims the button */ width: 32px; height: 32px; padding: 0; display: grid; place-items: center;
  color: var(--text); background: rgba(10, 14, 18, .55); border: 1px solid rgba(238, 242, 244, .3); border-radius: 999px; cursor: pointer; opacity: .4;
  transition: opacity var(--t) var(--ease), background-color var(--t) var(--ease); -webkit-tap-highlight-color: transparent; }
#pause::after { content: ''; position: absolute; inset: -6px; border-radius: 999px; } /* 44 px touch target */
#pause svg { width: 14px; height: 14px; display: block; fill: currentColor; }
#pause .i-play { display: none; }
#pause[data-paused="true"] .i-play { display: block; }
#pause[data-paused="true"] .i-pause { display: none; }
#pause:hover, #pause:focus-visible { opacity: 1; background: rgba(10, 14, 18, .75); }
/* focus ring in two tones (dark inside, light outside) so it shows on the night scenes and on the bright morning ones */
#pause:focus-visible { outline: none; box-shadow: 0 0 0 2px #0A0E12, 0 0 0 4px #EEF2F4; }
.final-form :focus-visible { outline: 2px solid var(--text); outline-offset: 3px; box-shadow: none; }

/* ---- scroll cue: bottom right, on the same axis as the progress rail. A 1 px line keeps drawing downward. ---- */
#cue { position: fixed; z-index: 7; right: 1.4rem; bottom: 1.5rem; display: flex; flex-direction: column; align-items: flex-end; gap: .75rem; pointer-events: none;
  font: 400 .72rem/1 var(--hud); letter-spacing: .18em; text-transform: uppercase; color: rgba(238, 242, 244, .72); text-shadow: 0 1px 10px rgba(10, 14, 18, .7);
  opacity: 0; animation: cue-in .9s var(--ease) 1.6s forwards; transition: opacity .6s var(--ease); }
#cue span { margin-right: -.18em; }
#cue .ln { position: relative; width: 1px; height: 56px; margin-right: .5px; background: rgba(238, 242, 244, .16); overflow: hidden; }
#cue .ln i { position: absolute; inset: 0; background: var(--text); transform-origin: top; transform: scaleY(0); animation: cue-draw 2.6s var(--ease) 1.6s infinite; }
#cue.gone { opacity: 0 !important; animation: none; }
.is-paused #cue .ln i { animation-play-state: paused; }
@keyframes cue-in { to { opacity: 1; } }
@keyframes cue-draw { 0% { transform: scaleY(0); transform-origin: top; } 48% { transform: scaleY(1); transform-origin: top; } 52% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

@media (max-width: 700px) {
  .cap.head { bottom: 9vh; }
  .headwrap { --hs: 2rem; }
  .cap.head .name { white-space: normal; height: 2.3em; }
  .headwrap .scrim { height: 52vh; width: 100%; }
  #rail { right: .7rem; } #cue { right: .7rem; } #pause { right: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  #cue { animation: none; opacity: 1; } #cue .ln i { animation: none; transform: scaleY(1); opacity: .6; }
  .headwrap .hi, .headwrap .scrim { transition: none; }
  #pause { transition: none; }
}
