/* ─────────────────────────────────────────────────────────────────
   LEVR — Flagship site. Light-architectural cinematic.
   Adapted from the aircenter.space motion language onto the LEVR
   house brand (Geist + JetBrains Mono, white canvas, black ink).
   ───────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --maxw: 1560px;
  --gut: clamp(20px, 4.5vw, 72px);
}

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", system-ui, sans-serif;
  overflow-x: hidden;
  cursor: none;
}
@media (hover: none) {
  body {
    cursor: auto;
  }
}

body.is-loading {
  overflow: hidden;
  height: 100vh;
}

img,
video {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}
::selection {
  background: var(--ink);
  color: #fff;
}

/* ── shared type ── */
.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(10px, 0.78vw, 12px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.kicker .num {
  color: var(--ink);
}
.kicker--invert,
.kicker--invert .num {
  color: rgba(255, 255, 255, 0.86);
}
.subhead {
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.6;
  color: var(--ink-soft);
  font-weight: 400;
}

/* ───────────────────────── PRELOADER ───────────────────────── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--bg);
  display: grid;
  place-items: center;
}
.preloader__inner {
  width: min(80vw, 520px);
  text-align: center;
}
.preloader__mark {
  font-size: clamp(40px, 9vw, 96px);
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 28px;
}
.preloader__bar {
  height: 1.5px;
  width: 100%;
  background: var(--line);
  overflow: hidden;
}
.preloader__fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--ink);
}
.preloader__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
body:not(.is-loading) .preloader {
  pointer-events: none;
}

/* ───────────────────────── CURSOR ───────────────────────── */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition:
    width 0.35s var(--ease),
    height 0.35s var(--ease),
    background 0.35s var(--ease),
    opacity 0.3s;
  mix-blend-mode: difference;
}
.cursor.is-hover {
  width: 64px;
  height: 64px;
  background: #fff;
}
@media (hover: none) {
  .cursor {
    display: none;
  }
}

/* ───────────────────────── TOP CHROME ───────────────────────── */
.chrome {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 800;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px var(--gut);
  gap: 16px;
  transition:
    transform 0.5s var(--ease),
    opacity 0.5s var(--ease);
}
.chrome.is-hidden {
  transform: translateY(-130%);
  opacity: 0;
}
.chrome__left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.chrome__right {
  display: flex;
  justify-content: flex-end;
}
.chrome__center {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.brandmark {
  display: flex;
  align-items: center;
  gap: 9px;
}
.brandmark__sq {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--ink);
  display: grid;
  place-items: center;
}
.brandmark__wm {
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  font-weight: 500;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  background: var(--ink);
  color: #fff;
  border: none;
  cursor: none;
  transition:
    transform 0.4s var(--ease),
    background 0.3s;
}
.pill--icon {
  width: 38px;
  padding: 0;
  justify-content: center;
}
.pill--cta:hover {
  transform: translateY(-1px);
}

/* ───────────────────────── HERO (scroll-scrub stage) ───────────────────────── */
.hero {
  position: relative;
  height: 340vh; /* tall scroll stage; sticky inner scrubs the video */
  width: 100%;
}
.hero__sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  width: 100%;
  overflow: hidden;
}
.hero__stage {
  position: absolute;
  inset: 0;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
  transform: scale(1.04);
  will-change: transform;
  /* full-bleed studio space, edges feathered seamlessly into the white canvas */
  -webkit-mask-image: radial-gradient(
    125% 125% at 50% 50%,
    #000 50%,
    transparent 84%
  );
  mask-image: radial-gradient(125% 125% at 50% 50%, #000 50%, transparent 84%);
}
.hero__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      130% 100% at 50% 44%,
      transparent 42%,
      rgba(255, 255, 255, 0.72) 100%
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.55) 0%,
      transparent 14%,
      transparent 86%,
      rgba(255, 255, 255, 0.55) 100%
    );
  pointer-events: none;
}
.hero__word {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 calc(var(--gut) - 0.4vw);
  font-weight: 400;
}
.hero__l {
  font-size: clamp(80px, 23vw, 360px);
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: var(--ink);
  display: inline-block;
  opacity: 0; /* JS owns the entry + scroll-spread + magnetic transforms */
  will-change: transform, opacity;
}
.hero__l:nth-child(2),
.hero__l:nth-child(3) {
  font-size: clamp(60px, 17vw, 280px);
}
.hero__tagline {
  position: absolute;
  top: clamp(78px, 11vh, 132px);
  left: 0;
  right: 0;
  z-index: 4;
  text-align: center;
  pointer-events: none;
}
.hero__tagline span.reveal-line {
  display: block;
  overflow: hidden;
  font-size: clamp(20px, 2.5vw, 38px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.reveal-line > span {
  display: block;
  transform: translateY(105%);
}
.hero__label {
  position: absolute;
  z-index: 4;
  right: var(--gut);
  top: 52%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: right;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}
.hero__scrollcue {
  position: absolute;
  left: calc(var(--gut) - 2px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  font-size: 9.5px;
  letter-spacing: 0.28em;
}
.hero__scrollcue .mono {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
.hero__scrollcue svg {
  animation: cuebob 2.2s var(--ease-io) infinite;
}
@keyframes cuebob {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(5px);
    opacity: 1;
  }
}

/* ───────────────────────── MOMENTUM ───────────────────────── */
.momentum {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(120px, 18vh, 220px) var(--gut);
  text-align: center;
}
.momentum .kicker {
  margin-bottom: clamp(36px, 6vh, 64px);
}
.momentum__statement {
  font-size: clamp(28px, 5vw, 76px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: 18ch;
  margin: 0 auto;
}
.momentum__statement .word {
  display: inline-block;
}
.momentum__statement .dim {
  color: var(--line-strong);
}
.momentum__sub {
  max-width: 56ch;
  margin: clamp(40px, 6vh, 68px) auto 0;
}

/* ───────────────────────── CHAPTERS ───────────────────────── */
.chapter {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(60px, 9vh, 120px) var(--gut);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 96px);
  align-items: center;
}
.chapter[data-align="left"] .chapter__media {
  order: 2;
}
.chapter__media {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #f4f4f5;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
}
.chapter__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
}
.chapter__index {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  padding: 5px 10px;
  border-radius: 999px;
}
.chapter__title {
  font-size: clamp(26px, 3.2vw, 50px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin: 22px 0 24px;
}
.chapter__body {
  max-width: 46ch;
}
.chapter__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 30px;
}
.chapter__meta li {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 12px;
}

/* ───────────────────────── PROOF ───────────────────────── */
.proof {
  position: relative;
  padding: clamp(120px, 20vh, 240px) var(--gut);
  overflow: hidden;
  color: #fff;
}
.proof__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.proof__bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.proof__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 12, 0.62),
    rgba(10, 10, 12, 0.78)
  );
}
.proof__inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
}
.proof__grid {
  margin-top: clamp(48px, 8vh, 90px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stat__n {
  font-size: clamp(44px, 6vw, 104px);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.9;
}
.stat__l {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.62);
}

/* ───────────────────────── FINALE ───────────────────────── */
.finale {
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
.finale__stage {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.finale__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.96;
}
.finale__veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    100% 80% at 50% 50%,
    transparent 50%,
    rgba(255, 255, 255, 0.7) 100%
  );
}
.finale__inner {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px var(--gut) 80px;
}
.finale__title {
  margin: 26px 0 22px;
}
.finale__title span.reveal-line {
  display: block;
  overflow: hidden;
  font-size: clamp(56px, 13vw, 200px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.92;
}
.finale__sub {
  max-width: 44ch;
}
.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 42px;
  height: 56px;
  padding: 0 30px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: none;
  transition: transform 0.4s var(--ease);
}
.btn-hero:hover {
  transform: translateY(-2px);
}
.finale__archimedes {
  margin-top: clamp(60px, 12vh, 140px);
  max-width: 40ch;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  line-height: 1.9;
}

/* ───────────────────────── FOOTER ───────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px var(--gut) 34px;
  border-top: 1px solid var(--line);
}
.footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer__wm {
  font-size: 22px;
}
.footer__nav {
  display: flex;
  gap: 22px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}
.footer__nav a {
  transition: color 0.25s;
}
.footer__nav a:hover {
  color: var(--ink);
}
.footer__row--fine {
  margin-top: 26px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ─────────────────────────────────────────────────────────────────
   REVEAL SYSTEM — CSS-driven (transition-based, no JS-ticker reliance)
   Hero intro fires on body.ready; sections reveal when .in is added
   by an IntersectionObserver.
   ───────────────────────────────────────────────────────────────── */

/* preloader exit */
.preloader {
  transition: transform 1s cubic-bezier(0.76, 0, 0.24, 1);
}
.preloader.is-done {
  transform: translateY(-100%);
}

/* hero letters — entry + scroll-spread + magnetic are all driven by JS
   (see heroScrub in main.js). CSS only sets the resting opacity. */

/* hero tagline lines */
.reveal-line > span {
  transition: transform 1.05s cubic-bezier(0.22, 1, 0.36, 1);
}
body.ready .hero__tagline .reveal-line:nth-child(1) > span {
  transform: translateY(0);
  transition-delay: 0.32s;
}
body.ready .hero__tagline .reveal-line:nth-child(2) > span {
  transform: translateY(0);
  transition-delay: 0.44s;
}

/* hero label + scroll cue */
.hero__label {
  opacity: 0;
  transition: opacity 0.9s ease 0.65s;
}
.hero__scrollcue {
  opacity: 0;
  transition: opacity 0.9s ease 0.8s;
}
body.ready .hero__label,
body.ready .hero__scrollcue {
  opacity: 1;
}

/* momentum statement */
.momentum__statement .word {
  opacity: 0;
  transform: translateY(58px);
  transition:
    opacity 0.8s ease,
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.momentum.in .momentum__statement .word {
  opacity: 1;
  transform: none;
}
.momentum.in .momentum__statement .word:nth-child(1) {
  transition-delay: 0.02s;
}
.momentum.in .momentum__statement .word:nth-child(2) {
  transition-delay: 0.06s;
}
.momentum.in .momentum__statement .word:nth-child(3) {
  transition-delay: 0.1s;
}
.momentum.in .momentum__statement .word:nth-child(4) {
  transition-delay: 0.14s;
}
.momentum.in .momentum__statement .word:nth-child(5) {
  transition-delay: 0.18s;
}
.momentum.in .momentum__statement .word:nth-child(6) {
  transition-delay: 0.22s;
}
.momentum.in .momentum__statement .word:nth-child(7) {
  transition-delay: 0.26s;
}
.momentum.in .momentum__statement .word:nth-child(8) {
  transition-delay: 0.3s;
}
.momentum.in .momentum__statement .word:nth-child(9) {
  transition-delay: 0.34s;
}
.momentum.in .momentum__statement .word:nth-child(10) {
  transition-delay: 0.38s;
}
.momentum.in .momentum__statement .word:nth-child(11) {
  transition-delay: 0.42s;
}
.momentum.in .momentum__statement .word:nth-child(12) {
  transition-delay: 0.46s;
}
.momentum.in .momentum__statement .word:nth-child(n + 13) {
  transition-delay: 0.5s;
}
.momentum .kicker,
.momentum__sub {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
}
.momentum.in .kicker {
  opacity: 1;
  transform: none;
}
.momentum.in .momentum__sub {
  opacity: 1;
  transform: none;
  transition-delay: 0.45s;
}

/* chapters */
[data-chapter] .chapter__media {
  opacity: 0;
  transform: translateY(42px) scale(0.985);
  transition:
    opacity 1.1s ease,
    transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-chapter].in .chapter__media {
  opacity: 1;
  transform: none;
}
[data-chapter] .chapter__text > * {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.9s ease,
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-chapter].in .chapter__text > * {
  opacity: 1;
  transform: none;
}
[data-chapter].in .chapter__text > *:nth-child(1) {
  transition-delay: 0.12s;
}
[data-chapter].in .chapter__text > *:nth-child(2) {
  transition-delay: 0.2s;
}
[data-chapter].in .chapter__text > *:nth-child(3) {
  transition-delay: 0.28s;
}
[data-chapter].in .chapter__text > *:nth-child(4) {
  transition-delay: 0.36s;
}

/* proof */
.proof .kicker {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 1s ease,
    transform 1s ease;
}
.proof.in .kicker {
  opacity: 1;
  transform: none;
}
.proof .stat {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 1s ease,
    transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.proof.in .stat {
  opacity: 1;
  transform: none;
}
.proof.in .stat:nth-child(1) {
  transition-delay: 0.1s;
}
.proof.in .stat:nth-child(2) {
  transition-delay: 0.2s;
}
.proof.in .stat:nth-child(3) {
  transition-delay: 0.3s;
}
.proof.in .stat:nth-child(4) {
  transition-delay: 0.4s;
}

/* finale */
.finale.in .finale__title .reveal-line:nth-child(1) > span {
  transform: translateY(0);
  transition-delay: 0.05s;
}
.finale.in .finale__title .reveal-line:nth-child(2) > span {
  transform: translateY(0);
  transition-delay: 0.15s;
}
.finale__inner .kicker,
.finale__sub,
.btn-hero,
.finale__archimedes {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
}
.finale.in .kicker {
  opacity: 1;
  transform: none;
}
.finale.in .finale__sub {
  opacity: 1;
  transform: none;
  transition-delay: 0.25s;
}
.finale.in .btn-hero {
  opacity: 1;
  transform: none;
  transition-delay: 0.4s;
}
.finale.in .finale__archimedes {
  opacity: 1;
  transform: none;
  transition-delay: 0.55s;
}

/* ───────────────────────── RESPONSIVE ───────────────────────── */
@media (max-width: 880px) {
  .chrome {
    grid-template-columns: auto 1fr;
  }
  .chrome__center {
    display: none;
  }
  .chapter {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 70px;
    padding-bottom: 70px;
  }
  .chapter[data-align="left"] .chapter__media {
    order: 0;
  }
  .hero__video {
    width: 96%;
    height: 70%;
  }
  .hero__label {
    top: auto;
    bottom: 84px;
  }
  .proof__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 24px;
  }
  .hero__tagline {
    top: 84px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .reveal-line > span,
  .hero__l {
    transform: none !important;
  }
  [data-chapter] .chapter__media,
  [data-chapter] .chapter__text > *,
  .momentum__statement .word,
  .momentum .kicker,
  .momentum__sub,
  .proof .kicker,
  .proof .stat,
  .finale__inner .kicker,
  .finale__sub,
  .btn-hero,
  .finale__archimedes,
  .hero__label,
  .hero__scrollcue {
    opacity: 1 !important;
    transform: none !important;
  }
}
