/* ============================================================
   PORTAL — Fullscreen scroll prototype
   Sticky-pinned hero · 4-layer parallax zoom · UI fade
   ============================================================ */

html, body {
  margin: 0;
  padding: 0;
  background: #050714;
  color: #fff;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  scroll-behavior: auto;
  overscroll-behavior: none;
}
body { overflow-x: hidden; }

* { box-sizing: border-box; }

/* ─────────────  global sky (lives forever)  ───────────── */

.sky-fixed {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #0c0f28;
  pointer-events: none;
}
.sky-fixed::before {
  content: "";
  position: absolute;
  inset: -3%;
  /* 4K/retina screens load the 3840px UHD plate; standard screens stay light */
  background-image: -webkit-image-set(url("../assets/layer-sky.webp") 1x, url("../assets/layer-sky@2x.webp") 2x);
  background-image: image-set(url("../assets/layer-sky.webp") 1x, url("../assets/layer-sky@2x.webp") 2x);
  background-size: cover;
  background-position: center;
  /* zoom toward the portal opening (the transparent oval in the arch),
     which sits at ~50% x / 38% y — NOT the geometric centre. */
  transform-origin: 50% 38%;
  transform: scale(var(--sky-scale, 1));
  transition: none;
  will-change: transform;
}
/* faint depth gradient on top of the sky */
.sky-fixed::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 50% 40%, rgba(255,180,150,0.05) 0%, transparent 60%),
    linear-gradient(180deg, rgba(8,10,30,0.12) 0%, rgba(8,10,30,0) 30%, rgba(8,10,30,0) 70%, rgba(8,10,30,0.4) 100%);
}

/* ─────────────  pin shell  ───────────── */

.pin-shell {
  position: relative;
  /* One tall pinned scene: fly through the arch → reveal CREATE BEYOND REALITY →
     long hold → cards sink into the cloud. The page never visibly scrolls during it. */
  height: 360vh;
  z-index: 1;
}
.pin-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* ─────────────  parallax layers  ───────────── */

.layer {
  position: absolute;
  pointer-events: none;
  will-change: transform, opacity;
  background-repeat: no-repeat;
}

.layer-arche {
  /* overscan past the viewport on every side so the mouse-parallax shift
     never drags the layer edge inward and exposes the sky behind (esp. top). */
  inset: -4%;
  /* 4K/retina screens load the 3840px UHD arch; standard screens stay light */
  background-image: -webkit-image-set(url("../assets/layer-arche.webp") 1x, url("../assets/layer-arche@2x.webp") 2x);
  background-image: image-set(url("../assets/layer-arche.webp") 1x, url("../assets/layer-arche@2x.webp") 2x);
  background-size: cover;
  background-position: center center;
  /* same portal origin: the foliage frame rushes outward past the camera
     while its transparent oval expands to reveal the FIXED sky behind.
     Outer translate = mouse parallax (screen px), inner scale = scroll zoom. */
  transform-origin: 50% 38%;
  transform: translate(var(--arche-mx, 0px), var(--arche-my, 0px)) scale(var(--arche-scale, 1));
  opacity: var(--layer-opacity, 1);
  z-index: 2;
}

.layer-fg-left {
  /* Pushed out toward the LEFT extremity so it frames the edge and tucks into
     the arch foliage (clears the sky opening ~25%). Inner edge now ~20%. */
  left: calc(-56px - 18%);
  bottom: 0;
  width: calc(38% + 56px);
  aspect-ratio: 2228 / 4592;
  background-image: -webkit-image-set(url("../assets/layer-fg-left.webp") 1x, url("../assets/layer-fg-left@2x.webp") 2x);
  background-image: image-set(url("../assets/layer-fg-left.webp") 1x, url("../assets/layer-fg-left@2x.webp") 2x);
  background-size: 100% 100%;
  background-position: left bottom;
  transform-origin: 0% 100%;
  /* outer translate = mouse parallax (near plane, moves most) · inner = scroll spread */
  transform: translate(var(--fg-l-mx, 0px), var(--fg-l-my, 0px)) scale(var(--fg-l-scale, 1)) translate(var(--fg-l-x, 0), var(--fg-l-y, 0));
  opacity: var(--fg-opacity, 1);
  z-index: 3;
}

.layer-fg-right {
  /* Pushed out toward the RIGHT extremity (inner edge ~89%) so it only grazes
     the right edge of the Aurora card — the Watch-demo button stays clear —
     while still giving a foreground-depth frame. Tuned for a 16" (1728px). */
  right: calc(-56px - 21%);
  bottom: 0;
  width: calc(32% + 56px);
  aspect-ratio: 1904 / 4592;
  background-image: -webkit-image-set(url("../assets/layer-fg-right.webp") 1x, url("../assets/layer-fg-right@2x.webp") 2x);
  background-image: image-set(url("../assets/layer-fg-right.webp") 1x, url("../assets/layer-fg-right@2x.webp") 2x);
  background-size: 100% 100%;
  background-position: right bottom;
  transform-origin: 100% 100%;
  /* outer translate = mouse parallax (near plane, moves most) · inner = scroll spread */
  transform: translate(var(--fg-r-mx, 0px), var(--fg-r-my, 0px)) scale(var(--fg-r-scale, 1)) translate(var(--fg-r-x, 0), var(--fg-r-y, 0));
  opacity: var(--fg-opacity, 1);
  /* raised ABOVE the UI overlay (z 10) so the foreground daisies drape in
     front of the Aurora card — the "depth/dimension" layering. */
  z-index: 12;
}

/* atmospheric vignettes that tint the scene */
.pin-sticky::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 60%, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 55%, rgba(8,10,30,0.4) 100%),
    linear-gradient(180deg, rgba(8,10,30,0.15) 0%, rgba(8,10,30,0) 18%, rgba(8,10,30,0) 65%, rgba(8,10,30,0.55) 100%);
  opacity: calc(1 - 0.6 * var(--ui-out, 0));
  transition: opacity 80ms linear;
}

/* ─────────────  UI overlay container  ───────────── */

.ui-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  opacity: var(--ui-opacity, 1);
  transform: translateY(var(--ui-y, 0));
  pointer-events: var(--ui-pe, auto);
  transition: none;
  will-change: opacity, transform;
}

/* ─────────────  emergence content (post-portal)  ───────────── */

.post-portal {
  position: relative;
  z-index: 5;
  /* sits beneath fixed sky in stacking? No — z-index 5 > sky's 0, so it sits ABOVE sky. */
}

/* the first post-section is the "you've arrived" moment */
.emerge {
  min-height: 100vh;
  padding: 18vh 8vw 12vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 80px;
  color: #fff;
}
.emerge-eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  margin-bottom: 28px;
}
.emerge-eyebrow span:first-child {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--peach, #FFB89A);
  box-shadow: 0 0 10px var(--peach, #FFB89A);
}
.emerge h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: clamp(56px, 7vw, 112px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
  color: rgba(255,255,255,0.96);
  text-wrap: pretty;
}
.emerge h2 em {
  font-style: italic;
  background: linear-gradient(96deg, #fff 0%, var(--peach, #FFB89A) 70%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.emerge-body {
  align-self: end;
  max-width: 480px;
  padding-bottom: 16px;
}
.emerge-body p {
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255,255,255,0.78);
  margin: 0 0 20px;
  font-weight: 300;
}
.emerge-stats {
  display: flex;
  gap: 36px;
  margin-top: 28px;
}
.emerge-stat-num {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
  display: block;
}
.emerge-stat-label {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-top: 8px;
  display: block;
}

/* a follow-up section that's more "concrete" — gradually opaque */
.beyond {
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(10,12,30,0) 0%, rgba(10,12,30,0.4) 30%, rgba(10,12,30,0.78) 60%, rgba(8,10,24,0.94) 100%);
  padding: 12vh 8vw;
  display: flex;
  flex-direction: column;
  gap: 64px;
}
.beyond-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}
.beyond-head h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 760px;
}
.beyond-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.beyond-card {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--c1, #FFCDB6), var(--c2, #8A6BB0));
  border: 1px solid rgba(255,255,255,0.12);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  cursor: pointer;
  transition: transform 420ms cubic-bezier(.22,.61,.36,1), box-shadow 420ms;
}
.beyond-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.5);
}
.beyond-card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(70% 50% at 30% 20%, rgba(255,255,255,0.5) 0%, transparent 60%);
  mix-blend-mode: overlay;
}
.beyond-card-meta {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  position: relative;
}
.beyond-card-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.02em;
  position: relative;
}
.beyond-card-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 500;
  color: rgba(255,255,255,0.95);
  position: relative;
}

/* ═════════════  premium footer  ═════════════ */
.outro {
  position: relative;
  z-index: 6;
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(255,184,154,0.07) 0%, transparent 55%),
    linear-gradient(180deg, #070a1a 0%, #05060f 100%);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: clamp(56px, 7vw, 104px) clamp(24px, 6vw, 96px) clamp(28px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 6vw, 88px);
  color: rgba(255,255,255,0.6);
  overflow: hidden;
}
.outro::before { /* faint hairline grid glow at the very top */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,184,154,0.35), transparent);
}

/* top row: brand wordmark + contact CTA */
.outro-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 48px;
  flex-wrap: wrap;
}
.outro-brand { max-width: 640px; }
.outro-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.72);
}
.outro-dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--peach, #FFB89A);
  box-shadow: 0 0 10px var(--peach, #FFB89A), 0 0 20px var(--peach, #FFB89A);
}
.outro-wm {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(64px, 10vw, 168px);
  line-height: 0.86;
  letter-spacing: -0.035em;
  margin: 18px 0 0;
  display: flex;
  align-items: baseline;
  gap: 0.28em;
  white-space: nowrap;
}
/* reuse the exact hero title treatment for Studio (italic) + Vesper. (gradient) */
.outro-wm .ov-h1-line--studio {
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.9);
}
.outro-wm .ov-h1-line--vesper {
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(96deg, #fff 0%, #FFE8DA 30%, var(--peach, #FFB89A) 75%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.outro-tag {
  margin: 22px 0 0;
  max-width: 440px;
  font-size: clamp(14px, 1.1vw, 17px);
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255,255,255,0.62);
}

/* contact CTA — glass pill that lifts on hover */
.outro-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 20px 24px;
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 18px 48px -24px rgba(0,0,0,0.7);
  transition: transform 320ms cubic-bezier(.22,.61,.36,1), background 240ms, border-color 240ms;
}
.outro-cta:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,184,154,0.45);
}
.outro-cta .ov-eyebrow { color: rgba(255,255,255,0.55); }
.outro-cta-mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: rgba(255,255,255,0.96);
}
.outro-cta-arrow {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 999px;
  background: var(--coral, #FF6B35);
  color: #fff;
  font-size: 14px;
  transition: transform 320ms cubic-bezier(.22,.61,.36,1);
}
.outro-cta:hover .outro-cta-arrow { transform: rotate(45deg); }

/* link columns */
.outro-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding-top: clamp(32px, 4vw, 56px);
  border-top: 1px solid rgba(255,255,255,0.07);
}
.outro-col { display: flex; flex-direction: column; gap: 14px; }
.outro-col-h {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
  margin-bottom: 4px;
}
.outro-link {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.74);
  text-decoration: none;
  width: fit-content;
  position: relative;
  transition: color 200ms;
}
.outro-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--peach, #FFB89A);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 320ms cubic-bezier(.22,.61,.36,1);
}
.outro-link:hover { color: #fff; }
.outro-link:hover::after { transform: scaleX(1); }
.outro-col--meta .outro-loc,
.outro-col--meta .outro-clock {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.74);
}
.outro-col--meta .outro-clock {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.92);
}

/* bottom bar */
.outro-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.5);
}
.outro-totop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.82);
  font-family: inherit;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 200ms, border-color 200ms, transform 200ms;
}
.outro-totop:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,184,154,0.4);
  transform: translateY(-1px);
}
.outro-totop-arrow { transition: transform 280ms cubic-bezier(.22,.61,.36,1); }
.outro-totop:hover .outro-totop-arrow { transform: translateY(-3px); }

@media (max-width: 860px) {
  .outro-top { flex-direction: column; align-items: flex-start; gap: 36px; }
  .outro-wm { font-size: 64px; white-space: normal; }
  .outro-cols { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .outro-bar { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ─────────────  progress HUD (top right)  ───────────── */

.progress-hud {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: rgba(8,10,24,0.45);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  opacity: var(--hud-opacity, 0);
  transform: translateY(var(--hud-y, -8px));
  transition: opacity 240ms cubic-bezier(.22,.61,.36,1), transform 240ms cubic-bezier(.22,.61,.36,1);
  pointer-events: none;
}
.progress-hud-bar {
  width: 60px; height: 4px; border-radius: 999px;
  background: rgba(255,255,255,0.18);
  overflow: hidden;
  position: relative;
}
.progress-hud-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #fff, var(--peach, #FFB89A));
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
}
.progress-hud-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* override v1 .ov-frame styles when used as overlay */
.ui-overlay.ov-frame {
  background: transparent !important;
  overflow: visible;
}
.ui-overlay.ov-frame::after {
  display: none;
}

/* keep the noise filter from v1 */
.pin-sticky::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.55;
  mix-blend-mode: overlay;
}

/* ─────────────  scroll-time performance  ───────────── */
/* While the user is actively scrolling, drop the two most expensive
   effects — every backdrop-filter blur and the full-screen grain. They
   re-evaluate against the moving backdrop each frame, so killing them
   during motion keeps the portal animation buttery; they return ~150ms
   after scrolling stops (JS toggles [data-scrolling] on <html>). */
html[data-scrolling] .ov-frame {
  --glass-blur: none;
  --glass-blur-heavy: none;
}
html[data-scrolling] .pin-sticky::after { display: none; }
html[data-scrolling] .emerge-eyebrow {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ─────────────  custom cursor (modern · fluid)  ───────────── */
/* A precise dot + a lagging ring that eases toward the pointer.
   `mix-blend-mode: difference` keeps it legible over any artwork.
   Only active on fine pointers; native cursor hidden via .has-cursor. */
html.has-cursor, html.has-cursor * { cursor: none !important; }

.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
  pointer-events: none;
  border-radius: 999px;
  mix-blend-mode: difference;
  will-change: transform;
}
.cursor-dot {
  width: 7px; height: 7px;
  margin: -3.5px 0 0 -3.5px;
  background: #fff;
}
.cursor-ring {
  width: 38px; height: 38px;
  margin: -19px 0 0 -19px;
  border: 1px solid rgba(255,255,255,0.85);
  transition: width .3s cubic-bezier(.22,.61,.36,1),
              height .3s cubic-bezier(.22,.61,.36,1),
              margin .3s cubic-bezier(.22,.61,.36,1),
              background-color .3s, border-color .3s, opacity .3s;
}
/* grows + fills when hovering an interactive element */
.cursor-ring[data-hover="true"] {
  width: 64px; height: 64px;
  margin: -32px 0 0 -32px;
  background: rgba(255,255,255,0.6);
  border-color: rgba(255,255,255,0.2);
}
/* shrinks the dot away on press */
.cursor-dot[data-down="true"] { transform-origin: center; opacity: 0.4; }

@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* ============================================================
   02 · CREATE BEYOND REALITY — fanned card carousel over the sky
   ============================================================ */
.reality {
  position: relative;
  z-index: 5;
  min-height: 112vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 6vw;
  --u2: clamp(0.78px, 100vw / 1920, 1px);
  --u: clamp(0.75px, 100vw / 1920, 1px); /* so inherited .ov-nav/.ov-link sizing works */
}

/* Revealed in-place inside the pinned stage, materialising over the fixed sky
   once the arch has flown past. Opacity/pointer-events scrubbed by scroll (JS
   writes --reality-in / --reality-pe). No spatial page scroll — it just appears. */
.pin-sticky .reality {
  position: absolute;
  inset: 0;
  height: 100vh;
  min-height: 0;
  z-index: 14;
  opacity: var(--reality-in, 0);
  pointer-events: var(--reality-pe, none);
  will-change: opacity;
}

/* section nav (with the star logo) */
.rl-nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  height: calc(96 * var(--u2));
  padding: 0 calc(72 * var(--u2));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: calc(32 * var(--u2));
}
.rl-logo {
  width: calc(50 * var(--u2));
  height: calc(50 * var(--u2));
  border-radius: 999px;
  background: var(--glass-bg, rgba(255,255,255,0.09));
  border: 1px solid var(--glass-border, rgba(255,255,255,0.22));
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.32), 0 8px 24px -6px rgba(8,10,30,0.4);
  display: grid; place-items: center;
  justify-self: center;
  transition: transform 600ms cubic-bezier(.22,.61,.36,1);
}
.rl-logo:hover { transform: rotate(72deg); }
.rl-nav .ov-nav--right { justify-content: flex-end; }

/* heading */
.rl-head {
  /* centred on the page as the focal point, above the floating cards */
  position: absolute;
  top: 33%;
  left: 50%;
  width: min(1100px, 90vw);
  z-index: 6;
  text-align: center;
  /* scrubbed reveal: rises + fades in; on exit it fades + drifts down */
  opacity: calc(var(--reality-in, 0) * (1 - var(--reality-out, 0)));
  transform: translate(-50%, calc(-50% + 28px * (1 - var(--reality-in, 0)) + 64px * var(--reality-out, 0)));
}
.rl-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  text-transform: uppercase;
  font-size: clamp(40px, 5.2vw, 92px);
  line-height: 1;
  letter-spacing: 0.01em;
  margin: 0;
  white-space: nowrap;
  color: rgba(255,255,255,0.96);
  text-shadow: 0 2px 30px rgba(20,20,60,0.25);
}
.rl-beyond {
  font-style: italic;
  background: linear-gradient(96deg, #fff 0%, #FFE8DA 35%, var(--peach, #FFB89A) 80%, #fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rl-sub {
  margin: calc(20 * var(--u2)) auto 0;
  max-width: 560px;
  font-size: clamp(14px, 1.05vw, 17px);
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255,255,255,0.78);
}

/* stage holding the floating fan of cards */
.rl-stage {
  position: relative;
  z-index: 6;
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin-top: auto;
  perspective: 1600px;
}

/* continuous foreground cloud bank IN FRONT of the cards (z above the fan). Several
   copies at varied heights/sizes/flips overlap into one natural band with no gaps, so
   every card rises out from UNDER it and sinks back INTO it. The whole band drifts. */
.rl-clouds {
  position: absolute;
  inset: 0;
  z-index: 15;                 /* above the cards (≤z6 stage), below the nav (z20) */
  pointer-events: none;
  overflow: hidden;
  will-change: transform;
  animation: clouds-drift 64s ease-in-out infinite alternate;
}
@keyframes clouds-drift {
  from { transform: translate3d(-1.4%, 0.5%, 0); }
  to   { transform: translate3d(1.4%, -0.5%, 0); }
}
.rl-cloud-front {
  position: absolute;
  bottom: -6vh;
  /* sized by HEIGHT so the cloud band is a consistent thickness on any aspect ratio
     (vw sizing made it huge + card-burying on wide/short screens like a 16" MBP) */
  aspect-ratio: 2752 / 1536;
  height: clamp(360px, 52vh, 680px);
  background-image: -webkit-image-set(url("../assets/layer-cloud-front.webp") 1x, url("../assets/layer-cloud-front@2x.webp") 2x);
  background-image: image-set(url("../assets/layer-cloud-front.webp") 1x, url("../assets/layer-cloud-front@2x.webp") 2x);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom left;
  /* only a gentle BOTTOM feather — no side mask (that made the cloud edges
     semi-transparent and let the cards show through). The dense body stays opaque. */
  -webkit-mask-image: linear-gradient(to top, transparent 0, #000 12%);
  mask-image: linear-gradient(to top, transparent 0, #000 12%);
}
/* two clouds at the ends of the arc — cards emerge from under the LEFT one and
   disappear INTO the RIGHT one as the carousel rotates. The dense opaque body sits
   on-screen over each bottom corner; only the straight cut edge bleeds off-screen. */
.rl-cloud-left  { left: -7vw; }
.rl-cloud-right { right: -7vw; transform: scaleX(-1); }

/* the fan — cards are positioned by JS along a shallow horizontal arc.
   .rl-fan is a single anchor point (the pedestal top); each card hangs from it. */
.rl-fan {
  position: absolute;
  left: 50%;
  bottom: 22vh;
  width: 0; height: 0;
  transform-style: preserve-3d;
  /* the cards RISE UP OUT of the bottom cloud as reality materialises, then on
     exit they sink back DOWN into it — the cloud stays in front and swallows them */
  opacity: calc(var(--reality-in, 0) * (1 - var(--reality-out, 0)));
  transform: translateY(calc(185px * (1 - var(--reality-in, 0)) + 205px * var(--reality-out, 0))) scale(calc(0.92 + 0.08 * var(--reality-in, 0)));
}

.rl-card {
  position: absolute;
  left: 0; top: 0;
  width: calc(244 * var(--u2));
  height: calc(322 * var(--u2));
  margin-left: calc(-122 * var(--u2));  /* centre horizontally on the anchor */
  margin-top: calc(-322 * var(--u2));   /* card bottom sits on the anchor */
  border-radius: calc(30 * var(--u2));
  padding: calc(26 * var(--u2));
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--tone) 88%, #fff) 0%, var(--tone) 60%, var(--tone-2) 100%);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    0 30px 60px -24px rgba(40,28,60,0.55);
  transform-origin: 50% 88%;             /* tilt around a point near the card's base */
  will-change: transform, opacity;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  /* JS sets transform/opacity/z-index; this transition smooths nudges */
  transition: box-shadow 300ms ease, filter 300ms ease;
}
.rl-card:hover { filter: brightness(1.04); }

.rl-badge {
  position: absolute;
  top: calc(16 * var(--u2));
  right: calc(16 * var(--u2));
  width: calc(40 * var(--u2));
  height: calc(40 * var(--u2));
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.35);
  color: rgba(40,30,55,0.85);
  font-size: calc(17 * var(--u2));
  cursor: pointer;
  display: grid; place-items: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 320ms cubic-bezier(.22,.61,.36,1), background 200ms;
}
.rl-card:hover .rl-badge { transform: rotate(45deg); background: rgba(255,255,255,0.55); }

.rl-card-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: calc(31 * var(--u2));
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: auto 0 calc(10 * var(--u2));
  color: rgba(38,28,50,0.86);
}
.rl-card-desc {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: calc(13.5 * var(--u2));
  line-height: 1.5;
  font-weight: 400;
  color: rgba(40,30,55,0.62);
  margin: 0;
  max-width: 90%;
}

/* prev / next controls */
.rl-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  width: calc(46 * var(--u2));
  height: calc(46 * var(--u2));
  border-radius: 999px;
  border: 1px solid var(--glass-border, rgba(255,255,255,0.22));
  background: var(--glass-bg, rgba(255,255,255,0.10));
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.32), 0 8px 24px -6px rgba(8,10,30,0.4);
  color: #fff;
  font-size: calc(20 * var(--u2));
  cursor: pointer;
  transition: background 200ms, transform 200ms, border-color 200ms;
}
.rl-nav-btn:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.4); }
.rl-nav-btn:active { transform: translateY(-50%) scale(0.94); }
.rl-nav-btn--prev { left: calc(8 * var(--u2)); }
.rl-nav-btn--next { right: calc(8 * var(--u2)); }

/* while scrolling, drop the card backdrop/blur on this section too */
html[data-scrolling] .rl-logo,
html[data-scrolling] .rl-nav-btn,
html[data-scrolling] .rl-badge {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
