/* COREVERSE V42 + V45 opening
   The original V42 storefront remains untouched after the opening sequence. */
:root {
  --opening-gutter: clamp(18px, 3.5vw, 62px);
  --opening-ink: #090a0b;
}

.boot { display: none !important; }
body.is-booting { overflow: auto !important; }

/* V45 framed, full-screen video hero. */
.hero-v44 {
  position: relative;
  z-index: 3;
  min-height: 100svh;
  padding: clamp(9px, 1.25vw, 22px);
  overflow: hidden;
  isolation: isolate;
  background: #e9e8e6;
  color: #fff;
}

.hero-v44__video,
.hero-v44__veil {
  position: absolute;
  inset: clamp(9px, 1.25vw, 22px);
  width: calc(100% - clamp(18px, 2.5vw, 44px));
  height: calc(100% - clamp(18px, 2.5vw, 44px));
  border-radius: clamp(18px, 2vw, 30px);
}

.hero-v44__video {
  z-index: -3;
  display: block;
  border: clamp(3px, .34vw, 6px) solid #111216;
  object-fit: cover;
  object-position: center;
  filter: saturate(.88) contrast(1.035) brightness(.96);
  transform: scale(var(--v44-hero-scale, 1.025));
  box-shadow: 0 24px 72px rgba(0,0,0,.24);
  will-change: transform;
}

.hero-v44__veil {
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 42% 27% at 50% 50%, rgba(255,255,255,.72), rgba(255,255,255,.2) 55%, transparent 78%),
    linear-gradient(180deg, rgba(0,0,0,.11), transparent 25%, transparent 76%, rgba(0,0,0,.18));
}

.hero-v44::after {
  content: "";
  position: absolute;
  inset: clamp(9px, 1.25vw, 22px);
  z-index: 1;
  border-radius: clamp(18px, 2vw, 30px);
  pointer-events: none;
  opacity: .24;
  background-image: radial-gradient(rgba(255,255,255,.22) .55px, transparent .55px);
  background-size: 4px 4px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45), inset 0 0 82px rgba(0,0,0,.2);
  mix-blend-mode: overlay;
}

.hero-v44__identity {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: min(610px, 45vw);
  color: #09090b;
  text-align: center;
  transform: translate(-50%, -50%);
}

.hero-v44__identity::before {
  content: "";
  position: absolute;
  inset: -38% -20%;
  z-index: -1;
  background: radial-gradient(ellipse, rgba(255,255,255,.9), rgba(255,255,255,.38) 48%, transparent 74%);
  filter: blur(8px);
}

.hero-v44__logo {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  opacity: .97;
  filter: brightness(0);
}

.hero-v44__kicker,
.hero-v44__tag,
.hero-v44__scroll,
.hero-v44__play {
  font-family: "Space Mono", monospace;
  font-style: normal;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.hero-v44__kicker,
.hero-v44__tag {
  color: #09090b;
  text-shadow: 0 1px 0 rgba(255,255,255,.8);
}

.hero-v44__kicker {
  margin: 0 0 18px;
  font-size: clamp(9px, .78vw, 12px);
  font-weight: 700;
}

.hero-v44__tag {
  margin: 16px 0 0;
  font-size: clamp(10px, 1vw, 14px);
  font-weight: 700;
  line-height: 1.35;
}

.hero-v44__scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-decoration: none;
  font-size: 9px;
  font-weight: 700;
  transform: translateX(-50%);
  mix-blend-mode: difference;
}

.hero-v44__scroll i {
  position: relative;
  display: block;
  width: 56px;
  height: 1px;
  overflow: hidden;
  background: currentColor;
}

.hero-v44__scroll i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  animation: openingScan 2s ease-in-out infinite;
  transform: translateX(-100%);
}

@keyframes openingScan { 60%, 100% { transform: translateX(100%); } }

.hero-v44__play {
  position: absolute;
  right: var(--opening-gutter);
  top: 110px;
  z-index: 4;
  display: none;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 999px;
  background: rgba(0,0,0,.26);
  color: #fff;
  font-size: 9px;
}

.hero-v44.is-paused .hero-v44__play { display: block; }

/* V45 navigation treatment is limited to the video viewport. */
.nav:not(.nav--solid) {
  top: 0 !important;
  width: 100% !important;
  min-height: 76px !important;
  padding-inline: var(--opening-gutter) !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255,255,255,.28) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  color: #fff !important;
}

.nav:not(.nav--solid) .nav__logo { filter: brightness(0) invert(1); mix-blend-mode: normal; }
.nav:not(.nav--solid) .nav__link,
.nav:not(.nav--solid) .nav__language,
.nav:not(.nav--solid) .nav__icon,
.nav:not(.nav--solid) .nav__burger { color: #fff !important; }
.nav:not(.nav--solid) .nav__language,
.nav:not(.nav--solid) .nav__icon,
.nav:not(.nav--solid) .nav__burger {
  border-color: rgba(255,255,255,.35) !important;
  background: rgba(0,0,0,.08) !important;
}

/* V45 Scene 1 + Scene 2 scroll collage. */
.story-v45 {
  --pointer-x: 0;
  --pointer-y: 0;
  position: relative;
  z-index: 2;
  height: 265svh;
  margin: 0;
  padding: 0;
  overflow: clip;
  background: #fff;
}

.story-v45__sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  background: #fff;
}

.story-v45__canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(100vw, calc(100svh * 1.77778));
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
  contain: layout paint;
}

.story-v45__scene,
.story-v45__layer {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.story-v45__scene {
  inset: 0;
  transform-origin: center;
  will-change: opacity, transform;
}

.story-v45__scene--one {
  opacity: var(--scene-one-opacity, 1);
  transform:
    translate(calc(var(--pointer-x) * 4px), calc(var(--pointer-y) * 3px))
    scale(var(--scene-one-scale, 1));
}

.story-v45__scene--two {
  opacity: var(--scene-two-opacity, 0);
  transform: scale(var(--scene-two-scale, .97));
}

.story-v45__layer {
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  object-fit: contain;
  transform-origin: center;
}

.story-v45__layer--float {
  --fx: 6px;
  --fy: 9px;
  --fr: .35deg;
  animation: openingFloat 7s ease-in-out infinite alternate;
  animation-delay: calc(var(--motion) * -.63s);
  will-change: transform;
}

.story-v45__layer--float:nth-child(2n) { --fx: -8px; --fy: 6px; --fr: -.42deg; animation-duration: 8.6s; }
.story-v45__layer--float:nth-child(3n) { --fx: 4px; --fy: -8px; --fr: .25deg; animation-duration: 6.8s; }
.story-v45__layer--float:nth-child(5n) { --fx: -5px; --fy: -5px; --fr: -.3deg; animation-duration: 9.4s; }

@keyframes openingFloat {
  from { transform: translate3d(calc(var(--fx) * -.5), calc(var(--fy) * -.5), 0) rotate(calc(var(--fr) * -.6)); }
  to { transform: translate3d(var(--fx), var(--fy), 0) rotate(var(--fr)); }
}

.story-v45__layer--base {
  opacity: .72;
  filter: contrast(.96);
}

.story-v45__layer--reveal {
  --enter: 0;
  opacity: var(--enter);
  transform:
    translate3d(0, calc((1 - var(--enter)) * -18vh), 0)
    rotate(calc((1 - var(--enter)) * -2deg))
    scale(calc(.92 + var(--enter) * .08));
  filter: blur(calc((1 - var(--enter)) * 7px));
  will-change: opacity, transform, filter;
}

.story-v45__hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 4;
  margin: 0;
  transform: translateX(-50%);
  opacity: calc(1 - min(1, var(--story-progress, 0) * 8));
  font: 700 9px/1 "Space Mono", monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .hero-v44 { min-height: 100svh; padding: 7px; }
  .hero-v44__video,
  .hero-v44__veil,
  .hero-v44::after { inset: 7px; border-radius: 21px; }
  .hero-v44__video {
    width: calc(100% - 14px);
    height: calc(100% - 14px);
    object-position: center;
    filter: saturate(.82) contrast(1.01) brightness(.99);
  }
  .hero-v44__identity { width: min(76vw, 330px); }
  .hero-v44__kicker { margin-bottom: 12px; font-size: 8px; letter-spacing: .13em; }
  .hero-v44__tag { max-width: 270px; margin: 11px auto 0; font-size: 9px; letter-spacing: .12em; }
  .hero-v44__veil {
    background: radial-gradient(ellipse 64% 24% at 50% 50%, rgba(255,255,255,.86), rgba(255,255,255,.2) 58%, transparent 80%);
  }
  .hero-v44__scroll { bottom: 18px; font-size: 7px; }
  .hero-v44__scroll i { width: 32px; }
  .hero-v44__play { right: 16px; top: 78px; }

  .nav:not(.nav--solid) { min-height: 62px !important; padding-inline: 13px !important; }

  .story-v45 { height: 230svh; }
  .story-v45__canvas {
    width: min(100vw, calc(100svh * .5625));
    aspect-ratio: 9 / 16;
  }
  .story-v45__layer--float { animation-duration: 7.8s; }
  .story-v45__hint { bottom: 14px; font-size: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-v44__video { transform: none; filter: saturate(.86) contrast(1.02); }
  .hero-v44__scroll i::after,
  .story-v45__layer--float { animation: none !important; }
  .story-v45 { height: 100svh; }
  .story-v45__layer--reveal { filter: none !important; transform: none !important; }
}
