/*
 * Scroll-directed cinematic layer.
 * The semantic document remains intact; this file turns its chapters into a
 * continuous sequence while JavaScript supplies only normalized scroll values.
 */

body {
  background: var(--ink);
}

main {
  position: relative;
  z-index: 1;
}

.film-texture {
  position: fixed;
  z-index: 90;
  inset: -40%;
  pointer-events: none;
  opacity: .055;
  background-image:
    repeating-radial-gradient(circle at 17% 32%, rgba(255,255,255,.48) 0 .7px, transparent .8px 3px),
    repeating-radial-gradient(circle at 78% 64%, rgba(0,0,0,.55) 0 .7px, transparent .8px 4px);
  background-size: 8px 9px, 11px 13px;
  mix-blend-mode: soft-light;
  animation: film-grain .32s steps(2, end) infinite;
}

@keyframes film-grain {
  0% { transform: translate3d(-1.2%, .8%, 0); }
  25% { transform: translate3d(.9%, -1.1%, 0); }
  50% { transform: translate3d(-.4%, 1.3%, 0); }
  75% { transform: translate3d(1.1%, -.3%, 0); }
  100% { transform: translate3d(-.8%, -.9%, 0); }
}

.film-meter {
  position: fixed;
  z-index: 101;
  right: 0;
  top: 0;
  width: 2px;
  height: 100svh;
  background: rgba(255,255,255,.12);
  pointer-events: none;
}

.film-meter i {
  display: block;
  width: 100%;
  height: var(--film-progress, 0%);
  background: var(--sun);
  box-shadow: 0 0 1rem rgba(243,240,0,.35);
}

.site-header.is-scrolled {
  color: var(--white);
  background: rgba(5,9,7,.68);
  border-color: rgba(255,255,255,.14);
  backdrop-filter: blur(18px) saturate(120%);
}

.site-header.is-scrolled .brand__sun {
  color: var(--sun);
}

/* Opening shot ------------------------------------------------------------ */

.hero {
  display: block;
  height: 185svh;
  min-height: 0;
  background: var(--ink);
}

.hero__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 42rem;
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
  isolation: isolate;
}

.hero__media img {
  scale: var(--hero-scale, 1.04);
  translate: var(--hero-x, 0) var(--hero-y, 0);
  filter: blur(var(--hero-blur, 0px)) brightness(var(--hero-brightness, 1));
  transition: none;
}

.hero__shade {
  opacity: var(--hero-shade-opacity, 1);
}

.hero__content {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 0;
  padding-bottom: clamp(6.5rem, 10vh, 8.5rem);
  opacity: var(--hero-content-opacity, 1);
  filter: blur(var(--hero-content-blur, 0px));
  transform: translate3d(-50%, var(--hero-content-y, 0), 0) scale(var(--hero-content-scale, 1));
  transform-origin: left bottom;
  will-change: transform, opacity, filter;
}

.hero h1 span,
.hero h1 em {
  display: inline-block;
}

.hero h1 span {
  transform: translateX(var(--hero-title-a-x, 0));
}

.hero h1 em {
  transform: translateX(var(--hero-title-b-x, 0));
}

.hero__note,
.scroll-cue {
  z-index: 4;
  opacity: var(--hero-ui-opacity, 1);
}

.hero__timecode {
  position: absolute;
  z-index: 4;
  top: 8rem;
  right: 3rem;
  display: grid;
  justify-items: end;
  gap: .15rem;
  opacity: var(--hero-ui-opacity, .72);
  font-size: .6rem;
  line-height: 1.2;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero__timecode span { color: rgba(255,255,255,.52); }
.hero__timecode b { color: var(--sun); font-variant-numeric: tabular-nums; }

.hero .proof-band {
  position: absolute;
  z-index: 5;
  inset: auto 0 0;
  opacity: var(--proof-opacity, 0);
  transform: translate3d(0, var(--proof-y, 110%), 0);
  will-change: transform, opacity;
}

.hero__paper-wipe {
  position: absolute;
  z-index: 7;
  inset: -8% -4%;
  background: var(--paper);
  transform: translate3d(0, var(--hero-wipe-y, 108%), 0) rotate(var(--hero-wipe-rotate, -1.5deg));
  transform-origin: center bottom;
  will-change: transform;
}

/* Light chapter ----------------------------------------------------------- */

.paper-reel {
  position: relative;
  overflow: clip;
  color: var(--ink);
  background: var(--paper);
  isolation: isolate;
}

.paper-reel__ghost {
  position: sticky;
  z-index: 0;
  top: 14vh;
  height: 0;
  overflow: visible;
  color: rgba(8,47,36,.042);
  font-size: clamp(10rem, 27vw, 34rem);
  font-weight: 800;
  letter-spacing: -.1em;
  line-height: .7;
  white-space: nowrap;
  transform: translate3d(var(--paper-ghost-x, -9%), 0, 0);
  pointer-events: none;
  will-change: transform;
}

.paper-reel .intro,
.paper-reel .services {
  position: relative;
  z-index: 1;
  background: transparent;
}

.paper-reel .intro {
  padding-top: clamp(9rem, 17vw, 17rem);
}

.paper-reel .display,
.paper-reel .section-head h2 {
  text-wrap: balance;
}

.reveal {
  opacity: 0;
  filter: blur(12px);
  clip-path: inset(0 0 100% 0);
  transform: translate3d(0, 5rem, 0) scale(.985);
  transition:
    opacity 1s var(--ease),
    transform 1.15s var(--ease),
    filter 1.1s var(--ease),
    clip-path 1.25s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  filter: none;
  clip-path: inset(-4% -2% -4% -2%);
  transform: none;
}

.service-row.reveal.is-visible {
  opacity: var(--row-opacity, 1);
  transform: translate3d(var(--row-x, 0), 0, 0);
}

.service-row::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: var(--row-line, 0%);
  height: 2px;
  background: var(--forest);
}

.paper-reel__exit {
  position: relative;
  z-index: 3;
  height: 125svh;
  margin-top: -1px;
  background: var(--paper);
}

.paper-reel__exit span {
  position: sticky;
  top: 0;
  display: block;
  width: 100%;
  height: 100svh;
  background: var(--ink);
  clip-path: circle(var(--paper-iris, 0vmax) at 50% 58%);
  will-change: clip-path;
}

/* Three-act textile sequence --------------------------------------------- */

.story {
  height: 430svh;
  margin-top: -1px;
  background: var(--ink);
}

.story__sticky {
  background: var(--ink);
  clip-path: inset(var(--story-frame-y, 7vh) var(--story-frame-x, 7vw) round var(--story-radius, 1.5rem));
  transform: scale(var(--story-stage-scale, .93));
  will-change: clip-path, transform;
}

.story__scene {
  opacity: var(--scene-opacity, 0);
  clip-path: inset(0 var(--scene-clip, 0%) 0 0);
  transform: none;
  transition: none;
  will-change: opacity, clip-path;
}

.story__scene:first-child { --scene-opacity: 1; }

.story__scene img,
.story__scene.is-active img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate3d(var(--scene-x, 0), var(--scene-y, 0), 0) scale(var(--scene-scale-local, 1.08));
  filter: blur(var(--scene-blur, 0px)) brightness(var(--scene-brightness, 1));
  transform-origin: var(--scene-origin, center);
  transition: none;
  will-change: transform, filter;
}

.story__veil {
  opacity: var(--story-veil-opacity, 1);
}

.story__light {
  position: absolute;
  z-index: 1;
  inset: -20%;
  opacity: var(--story-light-opacity, 0);
  background: linear-gradient(108deg, transparent 35%, rgba(255,249,207,.32) 49%, transparent 63%);
  transform: translate3d(var(--story-light-x, -45%), 0, 0) skewX(-8deg);
  mix-blend-mode: screen;
  pointer-events: none;
}

.story__letterbox i {
  position: absolute;
  z-index: 5;
  left: 0;
  width: 100%;
  height: var(--story-bar, 6vh);
  background: #030504;
  pointer-events: none;
}

.story__letterbox i:first-child { top: 0; }
.story__letterbox i:last-child { bottom: 0; }

.story__hud {
  position: absolute;
  z-index: 6;
  top: max(1.2rem, calc(var(--story-bar, 0vh) + .8rem));
  right: 3rem;
  display: flex;
  gap: 1.2rem;
  color: rgba(255,255,255,.52);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.story__hud b { color: var(--sun); font-variant-numeric: tabular-nums; }

.story__step {
  opacity: var(--step-opacity, 0);
  filter: blur(var(--step-blur, 12px));
  transform: translate3d(var(--step-x, 0), var(--step-y, 3rem), 0) scale(var(--step-scale, .96));
  transition: none;
  will-change: opacity, filter, transform;
}

.story__step.is-active {
  opacity: var(--step-opacity, 1);
  transform: translate3d(var(--step-x, 0), var(--step-y, 0), 0) scale(var(--step-scale, 1));
}

.story__rail i {
  height: var(--story-progress, 0%);
}

.story__exit {
  position: absolute;
  z-index: 10;
  inset: 0;
  background: var(--sun);
  clip-path: circle(var(--story-exit, 0vmax) at 82% 88%);
  pointer-events: none;
  will-change: clip-path;
}

/* Yellow frame to intertitle --------------------------------------------- */

.business {
  position: relative;
  height: 285svh;
  margin-top: -1px;
  color: var(--ink);
  background: var(--ink);
}

.business__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 42rem;
  overflow: hidden;
  background: var(--sun);
}

.business__frame,
.statement,
.business__iris {
  position: absolute;
  inset: 0;
}

.business__frame {
  z-index: 1;
  display: grid;
  align-items: center;
  padding: 7rem 0 4rem;
  opacity: var(--business-opacity, 1);
  filter: blur(var(--business-blur, 0px));
  transform: translate3d(0, var(--business-y, 0), 0) scale(var(--business-scale, 1));
  background: var(--sun);
}

.business__grid {
  width: var(--wrap);
}

.business__grid > div:first-child,
.business__body > p,
.business__body .text-link {
  opacity: var(--business-copy-opacity, 1);
  transform: translate3d(0, var(--business-copy-y, 0), 0);
}

.sector-list li {
  opacity: var(--sector-opacity, 1);
  transform: translate3d(var(--sector-x, 0), 0, 0);
  will-change: transform, opacity;
}

.business__iris {
  z-index: 2;
  background: var(--ink);
  clip-path: circle(var(--business-iris, 0vmax) at 50% 52%);
  will-change: clip-path;
}

.statement {
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 6rem 0;
  color: var(--white);
  background: transparent;
  opacity: var(--statement-opacity, 0);
  filter: blur(var(--statement-blur, 12px));
  transform: scale(var(--statement-scale, .88));
  pointer-events: none;
  will-change: opacity, filter, transform;
}

.statement__quote {
  text-wrap: balance;
}

.statement__caption {
  color: var(--sun);
}

.business__timecode {
  position: absolute;
  z-index: 4;
  right: 3rem;
  bottom: 2rem;
  display: flex;
  gap: 1rem;
  color: rgba(255,255,255,.44);
  opacity: var(--statement-opacity, 0);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.business__timecode b { color: var(--sun); }

/* Location montage ------------------------------------------------------- */

.locations {
  position: relative;
  height: 330svh;
  margin-top: -1px;
  padding: 0;
  background: var(--ink);
}

.locations__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 42rem;
  overflow: hidden;
  background: var(--ink);
}

.locations__backdrop {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  color: rgba(255,255,255,var(--locations-word-opacity, .035));
  font-size: min(38vw, 38rem);
  font-weight: 800;
  letter-spacing: -.11em;
  line-height: .7;
  transform: translate3d(calc(-50% + var(--locations-word-x, 0px)), -50%, 0) scale(var(--locations-word-scale, 1));
  white-space: nowrap;
  pointer-events: none;
}

.locations__stage {
  position: relative;
  z-index: 2;
  height: 100%;
}

.locations__head {
  position: absolute;
  inset: 15vh 0 auto;
  margin: 0;
  opacity: var(--locations-head-opacity, 1);
  filter: blur(var(--locations-head-blur, 0px));
  transform: translate3d(0, var(--locations-head-y, 0), 0) scale(var(--locations-head-scale, 1));
  will-change: opacity, filter, transform;
}

.locations .location-list {
  position: absolute;
  inset: 50% 0 auto;
  height: 17rem;
  border: 0;
  transform: translateY(-42%);
}

.locations .location {
  position: absolute;
  inset: 0;
  min-height: 0;
  padding: 2.5rem;
  border: 1px solid rgba(255,255,255,.21);
  background: rgba(255,255,255,.035);
  box-shadow: 0 2rem 8rem rgba(0,0,0,.32);
  opacity: var(--location-opacity, 0);
  filter: blur(var(--location-blur, 14px));
  transform: translate3d(var(--location-x, 8vw), var(--location-y, 0), 0) scale(var(--location-scale, .92));
  pointer-events: none;
  will-change: opacity, filter, transform;
}

.locations .location.is-film-active {
  pointer-events: auto;
}

.locations .hours-note {
  position: absolute;
  right: 0;
  bottom: 2rem;
  max-width: 39rem;
  margin: 0;
  opacity: var(--locations-note-opacity, 0);
}

.locations__counter {
  position: absolute;
  z-index: 4;
  left: 3rem;
  bottom: 2rem;
  display: flex;
  gap: 1rem;
  color: rgba(255,255,255,.44);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.locations__counter b { color: var(--sun); font-variant-numeric: tabular-nums; }

.locations__exit {
  position: absolute;
  z-index: 5;
  inset: 0;
  background: var(--forest);
  clip-path: inset(var(--locations-exit-y, 100%) 0 0 0);
  pointer-events: none;
  will-change: clip-path;
}

/* Final shot ------------------------------------------------------------- */

.contact {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  margin-top: -1px;
  overflow: hidden;
  isolation: isolate;
}

.contact__glow {
  position: absolute;
  z-index: -1;
  inset: -30%;
  background:
    radial-gradient(circle at 76% 32%, rgba(243,240,0,.16), transparent 20%),
    radial-gradient(circle at 20% 76%, rgba(255,255,255,.08), transparent 26%);
  transform: translate3d(var(--contact-glow-x, 0), var(--contact-glow-y, 0), 0) scale(1.15);
  filter: blur(28px);
  pointer-events: none;
}

.contact::after {
  content: "KONTAKT";
  position: absolute;
  z-index: -1;
  right: -3vw;
  bottom: -.15em;
  color: rgba(255,255,255,.025);
  font-size: min(23vw, 20rem);
  font-weight: 800;
  letter-spacing: -.09em;
  line-height: .7;
  pointer-events: none;
}

/* Responsive direction -------------------------------------------------- */

@media (max-width: 980px) {
  .hero__timecode { right: 1.5rem; }
  .story__hud { right: 1.5rem; }
  .business__frame { padding-top: 6rem; }
  .business__grid { gap: 2.5rem; }
  .locations .location-list { height: 28rem; }
  .locations .location { align-content: center; }
  .locations__counter { left: 1.5rem; }
}

@media (max-width: 640px) {
  .film-texture { opacity: .035; }
  .film-meter { width: 1px; }

  .hero {
    height: 170svh;
    min-height: 0;
  }

  .hero__sticky {
    min-height: 44rem;
  }

  .hero__content {
    padding-bottom: 7rem;
  }

  .hero__timecode { display: none; }

  .hero .proof-band p {
    padding-block: .78rem;
  }

  .paper-reel__ghost {
    top: 20vh;
    font-size: 43vw;
  }

  .paper-reel__exit { height: 118svh; }

  .story {
    height: 390svh;
  }

  .story__sticky {
    clip-path: inset(var(--story-frame-y, 5vh) var(--story-frame-x, 4vw) round var(--story-radius, 1rem));
  }

  .story__hud {
    top: max(1rem, calc(var(--story-bar, 0vh) + .6rem));
    right: 1rem;
  }

  .story__hud span { display: none; }

  .story__step {
    bottom: 10vh;
  }

  .business {
    height: 270svh;
  }

  .business__sticky,
  .locations__sticky {
    min-height: 44rem;
  }

  .business__frame {
    align-items: start;
    padding: 5.8rem 0 2rem;
  }

  .business__grid {
    gap: 1.35rem;
  }

  .business .display {
    font-size: clamp(2.75rem, 13vw, 4rem);
  }

  .business .kicker { margin-bottom: 1rem; }
  .business__body > p { margin-bottom: 1.2rem; font-size: .95rem; }
  .business .sector-list { margin-bottom: 1.4rem; }
  .business .sector-list li { padding: .53rem 0; font-size: .68rem; }
  .business__timecode { right: 1rem; bottom: 1rem; }
  .statement__quote { font-size: clamp(2.6rem, 12vw, 4.25rem); }
  .statement__caption { margin-top: 2rem; }

  .locations {
    height: 310svh;
  }

  .locations__head {
    inset: 6.5rem 0 auto;
  }

  .locations__head .kicker { margin-bottom: 1rem; }
  .locations__head h2 { font-size: clamp(2.7rem, 13.5vw, 4.2rem); }

  .locations .location-list {
    inset: 51% 0 auto;
    height: 31rem;
    transform: translateY(-38%);
  }

  .locations .location {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: .8rem;
    align-content: center;
    padding: 1.5rem;
  }

  .locations .location__name,
  .locations .location address,
  .locations .location__hours,
  .locations .location__actions {
    grid-column: 2;
  }

  .locations .location__index { grid-row: 1 / span 4; }
  .locations .location__actions { grid-row: auto; }
  .locations .hours-note { right: 0; bottom: 1.1rem; left: 4rem; font-size: .65rem; }
  .locations__counter { left: 1rem; bottom: 1rem; }

  .contact {
    padding-top: 8rem;
  }
}

/* The accessible, low-motion edition is deliberately linear. */
@media (prefers-reduced-motion: reduce) {
  .film-texture,
  .film-meter,
  .hero__timecode,
  .paper-reel__ghost,
  .paper-reel__exit,
  .story__light,
  .story__letterbox,
  .story__hud,
  .story__exit,
  .business__iris,
  .business__timecode,
  .locations__backdrop,
  .locations__counter,
  .locations__exit,
  .contact__glow {
    display: none;
  }

  .site-header.is-scrolled {
    color: var(--white);
    background: rgba(5,9,7,.92);
  }

  .hero {
    height: auto;
  }

  .hero__sticky {
    position: relative;
    min-height: 100svh;
  }

  .hero__content,
  .hero__media img,
  .hero h1 span,
  .hero h1 em {
    opacity: 1;
    filter: none;
    translate: 0;
    transform: none;
  }

  .hero__content {
    transform: translateX(-50%);
  }

  .hero .proof-band {
    display: none;
  }

  .hero__paper-wipe { display: none; }

  .reveal,
  .reveal.is-visible,
  .service-row.reveal.is-visible {
    opacity: 1;
    filter: none;
    clip-path: none;
    transform: none;
  }

  .story {
    height: auto;
  }

  .story__sticky {
    position: relative;
    height: auto;
    min-height: 100svh;
    clip-path: none;
    transform: none;
  }

  .story__scene {
    clip-path: none;
  }

  .story__step,
  .story__step.is-active {
    opacity: 1;
    filter: none;
    transform: none;
  }

  .business {
    height: auto;
    background: var(--sun);
  }

  .business__sticky {
    position: relative;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .business__frame,
  .statement {
    position: relative;
    inset: auto;
    opacity: 1;
    filter: none;
    transform: none;
  }

  .business__frame { min-height: 100svh; }
  .statement { min-height: 80svh; background: var(--ink); }

  .business__grid > div:first-child,
  .business__body > p,
  .business__body .text-link,
  .sector-list li {
    opacity: 1;
    transform: none;
  }

  .locations {
    height: auto;
    padding: 7rem 0;
  }

  .locations__sticky {
    position: relative;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .locations__stage { height: auto; }

  .locations__head,
  .locations .location-list,
  .locations .location,
  .locations .hours-note {
    position: relative;
    inset: auto;
    height: auto;
    opacity: 1;
    filter: none;
    transform: none;
  }

  .locations__head { margin-bottom: 4rem; }
  .locations .location-list { display: grid; }
  .locations .location { pointer-events: auto; }
  .locations .hours-note { margin: 2rem 0 0 auto; }
}
