/* ═══════════════════════════════════════════════════════
   YUNJIAN MOUNTAIN RETREAT
   Cinematic parallax study. Layers, mist, calligraphy.
   ═══════════════════════════════════════════════════════ */

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

:root {
  --ivory: #f5f0e4;
  --pine: #13201d;
  --moss: #8fa28c;
  --ease: cubic-bezier(.2, .78, .22, 1);

  --pad: clamp(22px, 5vw, 88px);
  --gutter: max(var(--pad), 96px);
  --rail: 32px;
  --nav-h: 84px;

  --serif: "Newsreader", "Noto Serif SC", serif;
  --sans: "Manrope", system-ui, sans-serif;
  --script: "WindSong", cursive;
  --cn: "Noto Serif SC", serif;
}

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

html {
  background: var(--pine);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--pine);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-loading,
body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--moss); color: var(--pine); }

:focus-visible {
  outline: 1px solid var(--moss);
  outline-offset: 4px;
}

/* ═══ LOADER ═══════════════════════════════════════════ */

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #d9ded8;
  color: var(--pine);
  transition: opacity 1s var(--ease), visibility 1s var(--ease);
}
.loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: min(320px, 76vw);
  text-align: center;
}
.loader__seal {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(19, 32, 29, .35);
  color: var(--pine);
}
.loader__seal::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px solid rgba(19, 32, 29, .16);
  border-top-color: var(--pine);
  animation: sealSpin 3.4s linear infinite;
}
.loader__seal span {
  font-family: var(--cn);
  font-size: 34px;
  font-weight: 300;
  line-height: 1;
}
.loader__label {
  font-size: 9px;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: rgba(19, 32, 29, .62);
}
.loader__bar {
  width: 100%;
  height: 1px;
  background: rgba(19, 32, 29, .16);
  overflow: hidden;
}
.loader__bar i {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  background: var(--pine);
  transition: width .4s var(--ease);
}
.loader__counter {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 10px;
  letter-spacing: .3em;
  color: rgba(19, 32, 29, .7);
  font-variant-numeric: tabular-nums;
}
.loader__counter span { font-size: 13px; letter-spacing: .18em; }
.loader__counter em { font-style: normal; opacity: .5; }

@keyframes sealSpin { to { transform: rotate(360deg); } }

/* ═══ STAGE ════════════════════════════════════════════ */

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  isolation: isolate;
  background: var(--pine);
}

.scene-stack { position: absolute; inset: 0; z-index: 0; }

.scene-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.15s var(--ease);
  pointer-events: none;
}
.scene-layer.is-active { opacity: 1; }

.media {
  position: absolute;
  inset: -7%;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  backface-visibility: hidden;
}
.media--depth {
  inset: -14%;
  will-change: transform;
  filter: saturate(.92) contrast(1.04);
}

/* depth masks: mist windows over the base frame */
.scene-layer[data-scene="0"] .media--depth img {
  -webkit-mask-image: linear-gradient(90deg, transparent 57%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 57%, #000 100%);
}
.scene-layer[data-scene="1"] .media--depth img {
  -webkit-mask-image: radial-gradient(110% 92% at 68% 42%, #000 22%, transparent 74%);
  mask-image: radial-gradient(110% 92% at 68% 42%, #000 22%, transparent 74%);
}
.scene-layer[data-scene="2"] .media--depth img {
  -webkit-mask-image: radial-gradient(120% 100% at 30% 30%, #000 18%, transparent 72%);
  mask-image: radial-gradient(120% 100% at 30% 30%, #000 18%, transparent 72%);
}
.scene-layer[data-scene="3"] .media--depth img {
  -webkit-mask-image: radial-gradient(100% 88% at 58% 58%, #000 24%, transparent 78%);
  mask-image: radial-gradient(100% 88% at 58% 58%, #000 24%, transparent 78%);
}
.scene-layer[data-scene="4"] .media--depth img {
  -webkit-mask-image: radial-gradient(130% 110% at 50% 20%, #000 16%, transparent 76%);
  mask-image: radial-gradient(130% 110% at 50% 20%, #000 16%, transparent 76%);
}

.scene-layer__mist {
  position: absolute;
  inset: -14% -22%;
  background:
    radial-gradient(52% 40% at 22% 62%, rgba(245, 240, 228, .30), rgba(245, 240, 228, 0) 70%),
    radial-gradient(48% 36% at 78% 34%, rgba(245, 240, 228, .20), rgba(245, 240, 228, 0) 72%),
    radial-gradient(70% 52% at 48% 92%, rgba(19, 32, 29, .55), rgba(19, 32, 29, 0) 72%);
  filter: blur(16px);
  animation: mistDrift 38s ease-in-out infinite alternate;
  will-change: transform, opacity;
}
.scene-layer[data-scene="3"] .scene-layer__mist {
  background:
    radial-gradient(50% 38% at 24% 58%, rgba(245, 240, 228, .22), rgba(245, 240, 228, 0) 70%),
    radial-gradient(52% 40% at 76% 38%, rgba(143, 162, 140, .18), rgba(143, 162, 140, 0) 72%),
    radial-gradient(72% 52% at 50% 94%, rgba(19, 32, 29, .6), rgba(19, 32, 29, 0) 72%);
}
.scene-layer[data-scene="4"] .scene-layer__mist {
  opacity: .6;
}

@keyframes mistDrift {
  0%   { transform: translate3d(-2.4%, 1.2%, 0) scale(1.04); opacity: .75; }
  100% { transform: translate3d(2.6%, -1.8%, 0) scale(1.12); opacity: 1; }
}

.scene-layer__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 15, 14, .52) 0%, rgba(9, 15, 14, 0) 26%, rgba(9, 15, 14, 0) 58%, rgba(9, 15, 14, .66) 100%),
    linear-gradient(90deg, rgba(9, 15, 14, .5) 0%, rgba(9, 15, 14, .12) 46%, rgba(9, 15, 14, 0) 70%);
}

.wash {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #1d2b26;
  mix-blend-mode: multiply;
  opacity: .5;
  transition: background-color 1.4s var(--ease);
  pointer-events: none;
}

.webgl {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  opacity: .7;
  pointer-events: none;
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 4;
  background:
    radial-gradient(120% 100% at 50% 44%, rgba(9, 15, 14, 0) 38%, rgba(9, 15, 14, .58) 100%),
    linear-gradient(180deg, rgba(9, 15, 14, .35), rgba(9, 15, 14, 0) 22%);
  pointer-events: none;
}

.grain {
  position: absolute;
  inset: 0;
  z-index: 5;
  background-image: url("https://hoirqrkdgbmvpwutwuwj.supabase.co/storage/v1/object/public/assets/assets/f63e71b5-9326-47b7-a950-3d727aca76a4_original.svg");
  background-repeat: repeat;
  background-size: 260px 260px;
  mix-blend-mode: soft-light;
  opacity: .55;
  pointer-events: none;
}

/* ═══ MAIN ═════════════════════════════════════════════ */

.main {
  position: relative;
  z-index: 6;
  isolation: isolate;
}

.scene-section {
  position: relative;
  height: 185vh;
}

.copy-frame {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  padding:
    clamp(90px, 15vh, 170px)
    var(--pad)
    clamp(56px, 10vh, 110px)
    var(--gutter);
}
.copy-frame--right { justify-content: flex-end; }

.copy {
  width: min(620px, 100%);
  will-change: transform, opacity;
}
.copy--hero { width: min(760px, 100%); }

/* staged copy reveal */
.copy > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
.copy.is-in > * { opacity: 1; transform: none; }
.copy > *:nth-child(1) { transition-delay: .05s; }
.copy > *:nth-child(2) { transition-delay: .14s; }
.copy > *:nth-child(3) { transition-delay: .24s; }
.copy > *:nth-child(4) { transition-delay: .34s; }
.copy > *:nth-child(5) { transition-delay: .42s; }
.copy > *:nth-child(6) { transition-delay: .5s; }
.copy > *:nth-child(7) { transition-delay: .58s; }

/* ═══ TYPE ═════════════════════════════════════════════ */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: rgba(245, 240, 228, .68);
}
.eyebrow .cn {
  font-family: var(--cn);
  letter-spacing: .3em;
  font-weight: 300;
  color: var(--ivory);
}
.eyebrow__rule {
  width: 28px;
  height: 1px;
  background: rgba(245, 240, 228, .35);
  display: inline-block;
}

h2 {
  margin: .42em 0 .5em;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(34px, 4.6vw, 62px);
  line-height: 1.02;
  letter-spacing: -.015em;
}
h2 em {
  font-style: italic;
  color: var(--moss);
}

h3 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.1;
  margin-bottom: .5em;
}
h3 em { font-style: italic; color: var(--moss); }

.lede {
  max-width: 48ch;
  font-family: var(--serif);
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 300;
  line-height: 1.64;
  color: rgba(245, 240, 228, .82);
}

/* hero */
.hero-title {
  margin: 16px 0 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 8.6vw, 118px);
  line-height: .92;
  letter-spacing: -.025em;
}
.hero-title__line { display: block; }

.calligraphy {
  display: block;
  width: min(680px, 100%);
  height: auto;
  margin-top: -.22em;
  overflow: visible;
}
.calligraphy text {
  font-family: var(--script);
  font-size: 128px;
  font-weight: 400;
  fill: var(--ivory);
  letter-spacing: .005em;
}
.calligraphy tspan {
  opacity: 0;
  animation: glyphIn 1.2s var(--ease) forwards;
  animation-delay: calc(var(--glyph) * 95ms + 900ms);
  will-change: transform, opacity, filter;
}
.glyph-space { opacity: 0 !important; animation: none !important; }
.calligraphy .ink {
  fill: none;
  stroke: var(--ivory);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 660;
  stroke-dashoffset: 660;
  animation: inkDraw 2.6s var(--ease) 1.7s forwards;
  opacity: .85;
}
@keyframes glyphIn {
  from { opacity: 0; transform: translateY(14px); filter: blur(7px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes inkDraw { to { stroke-dashoffset: 0; } }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 46px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(245, 240, 228, .5);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 26px; }
.hero-meta span + span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: .6;
  margin-right: 2px;
}

.altitude {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-top: 40px;
  max-width: 430px;
}
.altitude svg { width: min(300px, 70vw); height: auto; flex: none; }
.altitude__label {
  font-size: 9px;
  letter-spacing: .2em;
  line-height: 1.9;
  text-transform: uppercase;
  color: rgba(245, 240, 228, .46);
}

/* ═══ BUTTONS ══════════════════════════════════════════ */

.reserve-button {
  --angle: 0deg;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 9px 10px 9px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ivory);
  background:
    linear-gradient(180deg, rgba(19, 32, 29, .9), rgba(19, 32, 29, .9)) padding-box,
    conic-gradient(from var(--angle),
      rgba(245, 240, 228, .12),
      var(--moss) 18%,
      var(--ivory) 30%,
      rgba(245, 240, 228, .1) 46%,
      rgba(245, 240, 228, .1) 100%) border-box;
  animation: borderSpin 7s linear infinite;
  transition: transform .6s var(--ease), color .6s var(--ease);
  will-change: transform;
}
.reserve-button:hover { transform: scale(1.03); }
.reserve-button:active { transform: scale(.99); }

.reserve-button--sm {
  padding: 8px 8px 8px 18px;
  font-size: 9px;
  letter-spacing: .2em;
}
.reserve-button--sm .button-orb { width: 24px; height: 24px; }

.button-orb {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(245, 240, 228, .38);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.button-orb svg { width: 11px; height: 11px; }
.reserve-button:hover .button-orb {
  transform: rotate(45deg);
  box-shadow: inset 0 0 0 1px rgba(245, 240, 228, .8);
}
.reserve-button.magnetic { transition: transform .5s var(--ease); }

@keyframes borderSpin { to { --angle: 360deg; } }

.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(245, 240, 228, .9);
  box-shadow: inset 0 0 0 1px rgba(245, 240, 228, .28);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease), color .6s var(--ease);
}
.ghost-button:hover {
  transform: scale(1.03);
  box-shadow: inset 0 0 0 1px rgba(245, 240, 228, .62);
  color: var(--ivory);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 38px;
  padding-bottom: 6px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ivory);
  box-shadow: inset 0 -1px 0 rgba(245, 240, 228, .28);
  transition: box-shadow .6s var(--ease), transform .6s var(--ease);
}
.text-link span { transition: transform .6s var(--ease); }
.text-link:hover { box-shadow: inset 0 -1px 0 rgba(245, 240, 228, .75); }
.text-link:hover span { transform: translateX(4px); }

/* ═══ SPEC / TIMELINE ══════════════════════════════════ */

.spec-list {
  display: flex;
  max-width: 540px;
  margin-top: 40px;
  border-top: 1px solid rgba(245, 240, 228, .16);
}
.spec-list li {
  flex: 1;
  padding: 18px 18px 0 0;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(245, 240, 228, .55);
}
.spec-list b {
  display: block;
  margin-bottom: 6px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 300;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ivory);
}

.pull-quote {
  max-width: 24ch;
  margin-top: 34px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 300;
  line-height: 1.25;
  color: var(--ivory);
}
.byline {
  margin-top: 16px;
  font-size: 9px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(245, 240, 228, .45);
}

.timeline { margin-top: 36px; max-width: 440px; border-top: 1px solid rgba(245, 240, 228, .16); }
.timeline > div {
  display: flex;
  gap: 26px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(245, 240, 228, .1);
}
.timeline dt {
  font-family: var(--serif);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--moss);
  min-width: 54px;
}
.timeline dd {
  font-size: 11px;
  letter-spacing: .12em;
  color: rgba(245, 240, 228, .72);
}

/* ═══ HEADER ═══════════════════════════════════════════ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--pad);
  color: var(--ivory);
  transition: background-color .6s var(--ease), backdrop-filter .6s var(--ease), padding .6s var(--ease);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(245, 240, 228, .14);
  opacity: 0;
  transition: opacity .6s var(--ease);
}
.site-header.is-scrolled {
  padding-top: 14px;
  padding-bottom: 14px;
  background: rgba(19, 32, 29, .42);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
}
.site-header.is-scrolled::after { opacity: 1; }

.brand { display: inline-flex; flex-direction: column; gap: 3px; }
.brand__cn {
  font-family: var(--cn);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .3em;
  line-height: 1;
}
.brand__en {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .46em;
  text-transform: uppercase;
  color: rgba(245, 240, 228, .55);
}

.site-nav { display: flex; gap: clamp(18px, 2.6vw, 42px); }
.site-nav a {
  position: relative;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(245, 240, 228, .68);
  transition: color .5s var(--ease);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .55s var(--ease);
}
.site-nav a:hover { color: var(--ivory); }
.site-nav a:hover::after { transform: scaleX(1); }

/* ═══ CHAPTER RAIL ═════════════════════════════════════ */

.chapter-rail {
  position: fixed;
  left: clamp(14px, 2.2vw, 30px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
}
.chapter-rail ol { display: flex; flex-direction: column; gap: 15px; }
.chapter-rail a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(245, 240, 228, .38);
  transition: color .5s var(--ease);
}
.rail-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .75;
  flex: none;
  transition: transform .55s var(--ease), background-color .55s var(--ease), opacity .55s var(--ease);
}
.chapter-rail a.is-active { color: var(--ivory); }
.chapter-rail a.is-active .rail-dot {
  background: var(--moss);
  opacity: 1;
  transform: scale(1.9);
}
.rail-index { font-variant-numeric: tabular-nums; opacity: .55; }
.rail-label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-6px);
  transition: max-width .65s var(--ease), opacity .55s var(--ease), transform .65s var(--ease);
}
.chapter-rail a:hover .rail-label,
.chapter-rail a.is-active .rail-label,
.chapter-rail a:focus-visible .rail-label {
  max-width: 120px;
  opacity: 1;
  transform: none;
}

/* ═══ SCROLL CUE ═══════════════════════════════════════ */

.scroll-cue {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .44em;
  text-transform: uppercase;
  color: rgba(245, 240, 228, .55);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.scroll-cue i {
  position: relative;
  width: 1px;
  height: 46px;
  overflow: hidden;
  background: rgba(245, 240, 228, .2);
}
.scroll-cue i::after {
  content: "";
  position: absolute;
  left: 0;
  top: -60%;
  width: 1px;
  height: 60%;
  background: var(--ivory);
  animation: cueDrop 2.4s var(--ease) infinite;
}
.scroll-cue.is-hidden { opacity: 0; transform: translate(-50%, 12px); pointer-events: none; }
@keyframes cueDrop {
  0% { top: -60%; }
  70%, 100% { top: 110%; }
}

/* ═══ CHAPTER SECTIONS ═════════════════════════════════ */

.chapter {
  position: relative;
  z-index: 1;
  background: var(--pine);
  padding: clamp(80px, 13vh, 160px) var(--pad) clamp(80px, 13vh, 150px) var(--gutter);
  isolation: isolate;
}
.chapter::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("https://hoirqrkdgbmvpwutwuwj.supabase.co/storage/v1/object/public/assets/assets/11b5eb91-8c40-41a4-a650-e1b0bf855afd_original.svg") no-repeat -8% 108%;
  background-size: min(760px, 90vw);
  opacity: .085;
  pointer-events: none;
}
.chapter--passage::before {
  background-position: 108% -10%;
  opacity: .07;
}

.chapter-head { position: relative; z-index: 1; max-width: 780px; margin-bottom: clamp(42px, 7vh, 78px); }
.chapter-note {
  margin-top: 18px;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(245, 240, 228, .42);
}

/* ═══ GALLERY ══════════════════════════════════════════ */

.chapter--gallery { padding-top: clamp(96px, 15vh, 170px); overflow: hidden; }

.gallery-mist {
  position: absolute;
  top: auto;
  bottom: 0;
  height: 62%;
  width: 56%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  filter: blur(24px);
  transition: transform 1.8s var(--ease), opacity 1.6s var(--ease);
  will-change: transform, opacity;
  -webkit-mask-image: radial-gradient(90% 78% at 50% 55%, #000 30%, transparent 82%);
  mask-image: radial-gradient(90% 78% at 50% 55%, #000 30%, transparent 82%);
}
.gallery-mist svg { width: 100%; height: 100%; opacity: .3; }
.gallery-mist--left {
  left: 0;
  transform: translateX(-72%);
}
.gallery-mist--right {
  right: 0;
  transform: translateX(72%) scaleX(-1);
}
.chapter--gallery.is-visible .gallery-mist--left { transform: translateX(-14%); opacity: .7; }
.chapter--gallery.is-visible .gallery-mist--right { transform: translateX(14%) scaleX(-1); opacity: .7; }

.gallery {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  height: clamp(340px, 58vh, 560px);
  perspective: 1400px;
}

.gallery-item {
  position: relative;
  flex: 1 1 0%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  perspective: 1300px;
  transition: flex .95s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.gallery:hover .gallery-item { flex: .78 1 0%; }
.gallery:hover .gallery-item:hover { flex: 2.15 1 0%; }
.gallery-item:focus-visible { outline-offset: 2px; }

.gallery-card {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transform: rotateY(0deg);
  transition: transform 1s var(--ease);
}
.gallery-item.is-flipped .gallery-card { transform: rotateY(180deg); }

.gallery-face {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: 2px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: inset 0 0 0 1px rgba(245, 240, 228, .14);
  background: #0d1715;
}
.gallery-face img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.5s var(--ease), opacity 1s var(--ease);
}
.gallery-item:hover .gallery-face--front img { transform: scale(1.05); }

.gallery-face--back {
  transform: rotateY(180deg);
  background: #0b1312;
}
.gallery-face--back img { opacity: .48; }
.gallery-face--back .gallery-caption { color: var(--ivory); }

.gallery-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ivory);
  text-shadow: 0 1px 12px rgba(9, 15, 14, .7);
}
.gallery-caption em {
  font-family: var(--serif);
  font-style: normal;
  font-size: 12px;
  color: var(--moss);
  letter-spacing: .06em;
}
.gallery-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 15, 14, 0) 46%, rgba(9, 15, 14, .72) 100%);
  pointer-events: none;
}

/* ═══ PASSAGE ══════════════════════════════════════════ */

.passage-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.6vw, 40px);
}

.passage {
  position: relative;
  padding-top: 20px;
  border-top: 1px solid rgba(245, 240, 228, .18);
  outline: none;
}

.passage-media {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  margin-bottom: 22px;
  background: #0b1312;
}
.passage-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) sepia(.16);
  transform: scale(1.02);
  transition: filter 1.1s var(--ease), transform 1.5s var(--ease);
  will-change: filter, transform;
}
.passage:hover .passage-media img,
.passage:focus-within .passage-media img,
.passage:focus .passage-media img {
  filter: none;
  transform: scale(1.06);
}

.passage-night {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 10px;
}
.passage h3 { margin-bottom: 12px; }
.passage p:not(.passage-night) {
  max-width: 34ch;
  font-size: 12px;
  line-height: 1.75;
  letter-spacing: .04em;
  color: rgba(245, 240, 228, .62);
}

.passage-seal {
  position: absolute;
  top: 30px;
  right: 10px;
  z-index: 2;
  width: 62px;
  height: 62px;
  color: var(--ivory);
  opacity: 0;
  transform: rotate(13deg) scale(.8);
  will-change: transform, opacity;
}
.passage-seal svg { width: 100%; height: 100%; }
.passage-seal text { font-family: var(--cn); }

.passage.is-active .passage-seal { animation: passageSeal 1.3s var(--ease) forwards; }
.passage:nth-child(1).is-active .passage-seal { animation-delay: .05s; }
.passage:nth-child(2).is-active .passage-seal { animation-delay: .16s; }
.passage:nth-child(3).is-active .passage-seal { animation-delay: .27s; }

@keyframes passageSeal {
  from { opacity: 0; transform: rotate(13deg) scale(.8); }
  to   { opacity: .92; transform: rotate(3deg) scale(1); }
}

/* ═══ FOOTER ═══════════════════════════════════════════ */

.site-footer {
  position: relative;
  z-index: 1;
  background: var(--pine);
  padding: clamp(80px, 14vh, 160px) var(--pad) 40px var(--gutter);
  border-top: 1px solid rgba(245, 240, 228, .1);
  isolation: isolate;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(80% 60% at 70% 0%, rgba(143, 162, 140, .1), transparent 70%);
  pointer-events: none;
}

.footer-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-top h2 { font-size: clamp(40px, 6vw, 84px); margin-bottom: 0; }

.footer-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: clamp(50px, 9vh, 96px);
  padding-top: 26px;
  border-top: 1px solid rgba(245, 240, 228, .14);
  font-size: 11px;
  line-height: 1.75;
  letter-spacing: .04em;
  color: rgba(245, 240, 228, .62);
}
.footer-meta span {
  display: block;
  margin-bottom: 10px;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: rgba(245, 240, 228, .4);
}

.footer-signature {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin-top: clamp(46px, 8vh, 90px);
}
.footer-signature svg { width: min(280px, 52vw); height: auto; overflow: visible; }
.footer-signature .sig {
  fill: none;
  stroke: rgba(245, 240, 228, .55);
  stroke-width: 1.1;
  stroke-linecap: round;
}
.footer-seal {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(245, 240, 228, .3);
  font-family: var(--cn);
  font-size: 15px;
  color: rgba(245, 240, 228, .8);
}

.footer-legal {
  margin-top: 44px;
  font-size: 9px;
  letter-spacing: .16em;
  color: rgba(245, 240, 228, .3);
}

/* ═══ BOOKING ══════════════════════════════════════════ */

.booking {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}
.booking[hidden] { display: none; }

.booking__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 11, 10, .62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity .7s var(--ease);
}
.booking.is-open .booking__backdrop { opacity: 1; }

.booking__panel {
  position: relative;
  z-index: 61;
  width: min(580px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: clamp(26px, 4.4vw, 52px);
  border-radius: 3px;
  background: #101b18;
  color: var(--ivory);
  box-shadow: inset 0 0 0 1px rgba(245, 240, 228, .18);
  opacity: 0;
  transform: translateY(22px) scale(.985);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.booking.is-open .booking__panel { opacity: 1; transform: none; }

.booking__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://hoirqrkdgbmvpwutwuwj.supabase.co/storage/v1/object/public/assets/assets/f63e71b5-9326-47b7-a950-3d727aca76a4_original.svg");
  background-size: 240px;
  mix-blend-mode: soft-light;
  opacity: .35;
  pointer-events: none;
}

.booking__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(245, 240, 228, .22);
  color: var(--ivory);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.booking__close svg { width: 11px; height: 11px; }
.booking__close:hover { transform: rotate(90deg); box-shadow: inset 0 0 0 1px rgba(245, 240, 228, .6); }

.booking__panel h2 { margin: .3em 0 .35em; }
.booking__intro {
  max-width: 44ch;
  margin-bottom: 26px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.6;
  color: rgba(245, 240, 228, .7);
}

.booking__form {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field > span {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(245, 240, 228, .45);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 0;
  border-radius: 2px;
  background: rgba(245, 240, 228, .05);
  box-shadow: inset 0 0 0 1px rgba(245, 240, 228, .16);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: .04em;
  transition: box-shadow .4s var(--ease), background-color .4s var(--ease);
}
.field textarea { resize: vertical; min-height: 62px; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(245, 240, 228, .3); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: rgba(245, 240, 228, .07);
  box-shadow: inset 0 0 0 1px rgba(143, 162, 140, .8);
}
.field select option { background: #101b18; color: var(--ivory); }
.field input[type="date"] { color-scheme: dark; }

.booking__submit {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 8px;
  padding-left: 28px;
}
.booking__fineprint {
  grid-column: 1 / -1;
  font-size: 9px;
  letter-spacing: .12em;
  color: rgba(245, 240, 228, .32);
}

.booking__confirm { position: relative; padding: 26px 0 8px; }
.booking__confirm h3 { margin: .4em 0 .6em; }
.booking__confirm p { max-width: 40ch; font-size: 13px; line-height: 1.7; color: rgba(245, 240, 228, .7); }
.booking__confirm .ghost-button { margin-top: 26px; }

/* ═══ RESPONSIVE ═══════════════════════════════════════ */

@media (max-width: 1100px) {
  .chapter-rail { display: none; }
  .copy-frame { padding-left: var(--pad); }
  .chapter,
  .site-footer { padding-left: var(--pad); }
}

@media (max-width: 820px) {
  :root { --nav-h: 72px; }

  .site-nav { display: none; }
  .site-header { padding-top: 16px; padding-bottom: 16px; }
  .brand__cn { font-size: 13px; }

  .scene-section { height: 165vh; }
  .copy-frame {
    align-items: flex-end;
    padding: clamp(96px, 15vh, 150px) var(--pad) clamp(88px, 13vh, 120px);
  }
  .copy-frame--right { justify-content: flex-start; }

  .hero-title { font-size: clamp(44px, 12.5vw, 76px); }
  .calligraphy text { font-size: 120px; }
  .altitude { display: none; }
  .hero-meta { margin-top: 34px; gap: 8px 16px; }
  .hero-meta span { gap: 16px; }

  .lede { font-size: 15px; }
  h2 { font-size: clamp(30px, 7.2vw, 46px); }
  .spec-list { flex-wrap: wrap; }
  .spec-list li { flex: 1 1 40%; }

  .scroll-cue { left: auto; right: 20px; transform: none; bottom: 18px; }
  .scroll-cue.is-hidden { transform: translateY(12px); }
  .scroll-cue i { height: 34px; }

  /* mobile focal points */
  .scene-layer[data-scene="0"] .media img { object-position: 82% 50%; }
  .scene-layer[data-scene="1"] .media img { object-position: 62% 46%; }
  .scene-layer[data-scene="2"] .media img { object-position: 42% 38%; }
  .scene-layer[data-scene="3"] .media img { object-position: 55% 52%; }
  .scene-layer[data-scene="4"] .media img { object-position: 60% 58%; }
  .media--depth { inset: -10%; }

  .chapter--gallery { padding-left: var(--pad); }
  .gallery {
    flex-direction: column;
    height: auto;
    gap: 10px;
  }
  .gallery-item { flex: none; height: min(62vh, 460px); }
  .gallery:hover .gallery-item,
  .gallery:hover .gallery-item:hover { flex: none; }
  .gallery-mist { display: none; }

  .passage-list { grid-template-columns: 1fr; gap: 42px; }
  .passage-media { aspect-ratio: 16 / 10; }
  .passage p:not(.passage-night) { max-width: 46ch; }

  .footer-meta { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-top { align-items: flex-start; flex-direction: column; }
  .booking__form { grid-template-columns: 1fr; }
  .field--full { grid-column: auto; }
  .booking__submit, .booking__fineprint { grid-column: auto; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .reserve-button,
  .hero-actions .ghost-button { justify-content: center; }
  .hero-actions .reserve-button { justify-content: space-between; }

  .spec-list { border-top: 0; margin-top: 28px; gap: 10px; }
  .spec-list li { flex: 1 1 100%; padding: 0; border-top: 1px solid rgba(245, 240, 228, .14); padding-top: 10px; display: flex; justify-content: space-between; align-items: baseline; }
  .spec-list b { margin: 0; font-size: 22px; order: 2; }

  .timeline > div { flex-direction: column; gap: 4px; }
  .footer-meta { grid-template-columns: 1fr; }
  .gallery-item { height: min(54vh, 380px); }
  .passage-seal { width: 52px; height: 52px; }
}

/* ═══ MOTION PREFERENCES ═══════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene-layer__mist,
  .reserve-button,
  .scroll-cue i::after { animation: none; }
  .copy > *,
  .copy.is-in > * { transition-duration: .01ms; transform: none; opacity: 1; }
  .calligraphy tspan { animation: none; opacity: 1; }
  .calligraphy .ink { animation: none; stroke-dashoffset: 0; }
  .gallery-mist { transition-duration: .01ms; }
}
