/* ---------- base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #050506;
  --ink: #f4f4f5;
  --muted: rgba(244, 244, 245, 0.55);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Jost", system-ui, sans-serif;
  overflow-x: hidden;
}

/* the WebGL canvas sits fixed behind the UI */
#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  display: block;
  pointer-events: none;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 52px;
  mix-blend-mode: difference;
}
.nav__brand {
  font-weight: 400;
  letter-spacing: 0.55em;
  font-size: 15px;
  text-indent: 0.55em;
}
.nav__links { display: flex; gap: 44px; }
.nav__links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}
.nav__links a:hover { opacity: 1; }

/* ---------- hero UI (over the canvas) ---------- */
.hero-ui {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}
.hero-ui__content {
  position: absolute;
  bottom: 13vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  pointer-events: auto;
}
.hero-ui__tagline {
  font-weight: 300;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-size: clamp(11px, 1.3vw, 15px);
  color: var(--muted);
  text-indent: 0.42em;
}
.hero-ui__cta {
  display: inline-block;
  padding: 17px 50px;
  border: 1px solid rgba(244, 244, 245, 0.45);
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-weight: 300;
  font-size: 13px;
  text-indent: 0.34em;
  background: rgba(255, 255, 255, 0.015);
  backdrop-filter: blur(2px);
  transition: background 0.45s ease, color 0.45s ease, border-color 0.45s ease;
}
.hero-ui__cta:hover {
  background: var(--ink);
  color: #050506;
  border-color: var(--ink);
}

.hero-ui__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.hero-ui__scroll-line {
  width: 1px;
  height: 46px;
  background: linear-gradient(to bottom, var(--muted), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.7); }
  50%      { opacity: 1;   transform: scaleY(1); }
}

/* ---------- content after hero ---------- */
.spacer { height: 100vh; }   /* transparent scroll runway for the animation */

/* ---------- PAGE 2 : cabin reveal ---------- */
.reveal {
  position: relative;
  z-index: 10;
  height: 260vh;                 /* scroll runway for the pinned reveal */
  background: #050506;
}
.reveal__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #050506;
}

/* stacked cabin images */
.reveal__img {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.reveal__img .bg {
  position: absolute;
  inset: -3%;                    /* bleed so the Ken-Burns zoom never shows an edge */
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(var(--zoom, 1.06));
  will-change: transform;
}
.reveal__img--empty .bg { background-image: url("assets/interior_empty.png"); }
.reveal__img--full  .bg { background-image: url("assets/interior_full.png"); }

/* the full interior is revealed by a soft diagonal sweep */
.reveal__img--full {
  --sweep: -18%;
  -webkit-mask-image: linear-gradient(105deg,
      #000 calc(var(--sweep) - 14%), transparent calc(var(--sweep) + 14%));
          mask-image: linear-gradient(105deg,
      #000 calc(var(--sweep) - 14%), transparent calc(var(--sweep) + 14%));
}

/* darken toward the text for legibility */
.reveal__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3,3,4,0.82) 0%, rgba(3,3,4,0.42) 34%, rgba(3,3,4,0) 62%),
    linear-gradient(to top, rgba(3,3,4,0.7) 0%, rgba(3,3,4,0) 40%);
}

/* thin light streak that leads the sweep */
.reveal__glow {
  position: absolute;
  top: -12%;
  left: 0;
  width: 3px;
  height: 124%;
  background: linear-gradient(to bottom,
      transparent, rgba(240,225,200,0.9) 22%, rgba(255,244,225,1) 50%, rgba(240,225,200,0.9) 78%, transparent);
  filter: blur(3px);
  mix-blend-mode: screen;
  opacity: 0;
  transform: translateX(-120px) rotate(15deg);
  will-change: transform, opacity;
  pointer-events: none;
}

/* ---- text block ---- */
.reveal__text {
  position: absolute;
  left: 8%;
  top: 50%;
  transform: translateY(-50%);
  max-width: 40rem;
  z-index: 5;
}
.reveal__overline {
  margin: 0 0 26px;
  overflow: hidden;
}
.reveal__overline span {
  display: inline-block;
  font-family: "Jost", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  font-size: clamp(11px, 1vw, 14px);
  color: rgba(214, 200, 178, 0.9);   /* warm champagne */
}
.reveal__title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: 0.01em;
  font-size: clamp(44px, 7vw, 108px);
  color: #f3f1ec;
}
.reveal__title .lineWrap { display: block; overflow: hidden; padding: 0 0.08em; margin: 0 -0.08em; }
.reveal__title .line { display: block; will-change: transform; }
.reveal__rule {
  height: 1px;
  width: 200px;
  margin: 34px 0 26px;
  background: linear-gradient(to right, rgba(214,200,178,0.9), rgba(214,200,178,0));
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}
.reveal__sub {
  margin: 0;
  font-family: "Jost", sans-serif;
  font-weight: 300;
  font-size: clamp(15px, 1.4vw, 19px);
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: rgba(226, 226, 230, 0.72);
  max-width: 30rem;
}

/* elements animated in by reveal.js start hidden */
.reveal__overline span,
.reveal__sub { opacity: 0; transform: translateY(24px); }
.reveal__title .line { transform: translateY(115%); }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .nav { padding: 22px 24px; }
  .nav__links { gap: 20px; }
  .nav__links a { font-size: 11px; letter-spacing: 0.16em; }
  .reveal__text { left: 7%; right: 7%; }
  .reveal__scrim {
    background:
      linear-gradient(90deg, rgba(3,3,4,0.85) 0%, rgba(3,3,4,0.5) 50%, rgba(3,3,4,0.15) 100%),
      linear-gradient(to top, rgba(3,3,4,0.8) 0%, rgba(3,3,4,0) 45%);
  }
}
