/* NOCTIS — Dark Cinematic. Mobile-first. Анимируются только transform и opacity. */
:root {
  --bg: #050505;
  --bg-2: #0b0a09;
  --ink: #ece6dc;
  --muted: #8f8a82;
  --amber: #d9a35b;
  --amber-soft: #e4bd84;
  --line: rgba(236, 230, 220, .14);
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pad: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  font: 400 15px/1.6 var(--sans);
  letter-spacing: .01em;
  background: var(--bg);
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--amber-soft); }
::selection { background: var(--amber); color: var(--bg); }
:focus-visible { outline: 1px solid var(--amber); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sep { color: var(--amber); margin: 0 .35em; }
.skip { position: fixed; left: 12px; top: 12px; z-index: 300; padding: 8px 14px; background: var(--ink); color: var(--bg); transform: translateY(-160%); }
.skip:focus { transform: none; }

/* ---------- Плёнка: зерно и виньетка ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  background: url(img/grain.png);
  opacity: .55; mix-blend-mode: overlay;
}
.motion .grain { animation: grain .9s steps(6) infinite; }
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); } 40% { transform: translate(5%, -7%); }
  60% { transform: translate(-3%, 8%); } 80% { transform: translate(7%, 2%); } 100% { transform: translate(0, 0); }
}
.vignette {
  position: fixed; inset: 0; z-index: 89; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, .55) 100%);
}

/* ---------- Интро: кинорамка ---------- */
.intro { position: fixed; inset: 0; z-index: 200; pointer-events: none; visibility: hidden; }
.motion .intro { visibility: visible; }
.lb { position: absolute; left: 0; right: 0; height: 50.5%; background: #000; }
.lb--top { top: 0; transform-origin: top; }
.lb--bottom { bottom: 0; transform-origin: bottom; }
.intro__credit {
  position: absolute; left: 0; right: 0; top: 50%; margin: 0; transform: translateY(-50%);
  text-align: center; font: 400 clamp(1.2rem, 3vw, 1.8rem)/1 var(--serif); letter-spacing: .02em;
}
.intro__credit span { display: inline-block; opacity: 0; }

/* ---------- Курсор и превью (только мышь) ---------- */
.cursor, .preview { display: none; }
@media (hover: hover) and (pointer: fine) {
  .motion body, .motion a, .motion button { cursor: none; }
  .motion input { cursor: text; }
  .motion .cursor {
    display: block; position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none;
    width: 0; height: 0;
  }
  .cursor__ring {
    position: absolute; width: 34px; height: 34px; left: -17px; top: -17px; border-radius: 50%;
    border: 1px solid rgba(236, 230, 220, .7); transition: transform .5s var(--ease), opacity .3s;
  }
  .cursor__label {
    position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(.6); opacity: 0;
    font: 500 10px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--bg);
    transition: transform .5s var(--ease), opacity .3s; white-space: nowrap;
  }
  .cursor.is-link .cursor__ring { transform: scale(1.7); }
  .cursor.is-view .cursor__ring { transform: scale(2.6); background: var(--ink); border-color: var(--ink); }
  .cursor.is-view .cursor__label { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  .cursor.is-hidden .cursor__ring { opacity: 0; }

  .motion .preview {
    display: block; position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none;
    width: 22vw; max-width: 340px; aspect-ratio: 4 / 5; overflow: hidden; opacity: 0;
  }
  .preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.15); transition: opacity .5s, transform 1s var(--ease); }
  .preview img.is-on { opacity: 1; transform: scale(1); }
}

/* ---------- Навигация ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--pad);
  transition: transform .8s var(--ease);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav__logo { font: 500 13px/1 var(--sans); letter-spacing: .42em; display: inline-flex; align-items: center; gap: 2px; }
.nav__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); margin-left: 6px; }
.nav__links { display: none; gap: 34px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.nav__links a { position: relative; transition: color .3s; }
.nav__links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); }
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; }
@media (min-width: 760px) { .nav__links { display: flex; } }

/* ---------- Кнопки и ссылки ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 17px 30px; border-radius: 999px; border: 1px solid rgba(236, 230, 220, .45);
  font: 500 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; overflow: hidden;
  background: none; color: var(--ink); isolation: isolate;
}
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink);
  transform: translateY(101%); transition: transform .7s var(--ease);
}
.btn span { display: inline-block; transition: color .4s; }
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover span, .btn:focus-visible span { color: var(--bg); }
.btn--solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--solid::before { background: var(--amber); }
.btn--solid span { color: var(--bg); }
.link { position: relative; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding: 6px 0; }
.link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(.3); transform-origin: left; transition: transform .7s var(--ease); }
.link:hover { color: var(--ink); }
.link:hover::after { transform: scaleX(1); }

/* ---------- Типографика ---------- */
.eyebrow, .chapter {
  margin: 0 0 22px; font: 500 11px/1.4 var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--muted);
}
.chapter::before { content: ''; display: inline-block; width: 28px; height: 1px; background: var(--amber); vertical-align: middle; margin-right: 14px; }
h1, h2 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.015em; }
.l { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.li { display: inline-block; }

/* Стартовые состояния — только при включённой анимации. JS доводит их до нормы. */
.motion .l > .li { transform: translateY(115%); }
.motion [data-fade], .motion [data-fade-in] { opacity: 0; transform: translateY(26px); }
.motion .hero__img { opacity: 0; transform: scale(1.18); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  padding: clamp(104px, 15vh, 150px) var(--pad) 24px; overflow: hidden;
}
/* Кадр как постер: заголовок в тёмном небе, полоса горизонта ниже середины, текст под ней. */
.hero__media { position: absolute; inset: 0; z-index: 0; }
@media (min-width: 760px) { .hero__media { inset: 16% 0 -16%; } }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(5, 5, 5, .7) 0%, rgba(5, 5, 5, 0) 30%, rgba(5, 5, 5, 0) 55%, rgba(5, 5, 5, .92) 100%);
}
.stars { position: absolute; left: 0; right: 0; top: -20%; height: 90%; z-index: 1; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 85%); mask-image: linear-gradient(to bottom, #000 40%, transparent 85%); }
.stars--a { background: url(img/stars-a.png) 0 0 / 512px; opacity: .7; }
.stars--b { background: url(img/stars-b.png) 120px 60px / 640px; opacity: .9; }
.motion .stars--b { animation: twinkle 6s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }
.hero__content { position: relative; z-index: 2; max-width: 1100px; flex: 1; display: flex; flex-direction: column; }
.hero__title { font-size: clamp(3.4rem, 14.5vw, 11.5rem); line-height: .9; margin-bottom: 26px; }
.hero__lede { max-width: 30ch; margin: auto 0 28px; text-shadow: 0 1px 18px rgba(0, 0, 0, .8); font-size: clamp(15px, 1.4vw, 18px); color: rgba(236, 230, 220, .82); font-weight: 300; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.hero__meta {
  position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 56px; padding-top: 16px;
  border-top: 1px solid var(--line); font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
}
.tc { display: none; font-variant-numeric: tabular-nums; }
@media (min-width: 760px) { .tc { display: inline; } }

/* ---------- Ascent ---------- */
.ascent { position: relative; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; text-align: center; padding: 0 var(--pad); }
.ascent__media { position: absolute; inset: 0; }
.ascent__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.motion .ascent__img { transform: scale(1.35); }
.ascent__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(5, 5, 5, .9), rgba(5, 5, 5, .25) 40%, rgba(5, 5, 5, .35) 60%, rgba(5, 5, 5, .95)); }
.ascent__inner { position: relative; z-index: 1; }
.ascent__title { font-size: clamp(3rem, 11vw, 8.5rem); line-height: .95; margin-bottom: 14px; }
.altimeter { display: flex; align-items: baseline; justify-content: center; gap: 16px; margin: 8px 0 18px; }
.altimeter__label, .altimeter__unit { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.ascent__text { max-width: 34ch; margin: 0 auto; color: rgba(236, 230, 220, .8); font-weight: 300; font-size: clamp(15px, 1.4vw, 18px); }
.motion [data-asc] { opacity: 0; transform: translateY(24px); }

/* Крутящиеся цифры: каждая цифра — лента 0–9, двигаем transform. */
.roller { display: inline-flex; line-height: 1; font-variant-numeric: tabular-nums; }
.roller__col { display: inline-block; height: 1em; overflow: hidden; }
.roller__strip { display: flex; flex-direction: column; transition: transform .9s var(--ease); }
.roller__strip > span { display: block; height: 1em; text-align: center; }
.roller--xl { font: 400 clamp(5.5rem, 24vw, 16rem)/1 var(--serif); color: var(--ink); }
.roller--xl .roller__strip { transition-duration: .35s; }

/* ---------- Statement ---------- */
.statement { padding: clamp(110px, 18vw, 240px) var(--pad); display: flex; justify-content: center; }
.statement__text { margin: 0; max-width: 20ch; font: 400 clamp(2.1rem, 6.4vw, 5.6rem)/1.06 var(--serif); letter-spacing: -.01em; text-align: center; }
.statement__text .w { display: inline-block; white-space: pre; }

/* ---------- Windows ---------- */
.windows { position: relative; padding: 40px 0 90px; overflow: hidden; }
.windows__head { padding: 0 var(--pad); margin-bottom: 40px; }
.windows__title { font-size: clamp(2.8rem, 9vw, 7rem); line-height: .95; margin-bottom: 14px; }
.windows__intro { margin: 0; color: var(--muted); max-width: 32ch; }
.windows__track { display: grid; gap: 56px; padding: 0 var(--pad); }
.frame { margin: 0; }
.frame__media { overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-2); }
.frame__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.frame figcaption { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: baseline; padding-top: 14px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.frame__name { font: 400 clamp(1.1rem, 2vw, 1.5rem)/1.2 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); }
.frame__no { color: var(--amber); }
.windows__progress { display: none; }
.motion .frame { opacity: 0; transform: translateY(40px); }

@media (min-width: 900px) {
  .windows__track { grid-template-columns: 1fr 1fr; }
  .motion .windows { height: 100vh; padding: 0; display: flex; flex-direction: column; justify-content: center; }
  .motion .windows__head { position: absolute; top: 12vh; left: 0; margin: 0; z-index: 2; pointer-events: none; }
  .motion .windows__track { display: flex; gap: 6vw; padding: 0 var(--pad) 0 44vw; width: max-content; align-items: flex-end; margin-top: 10vh; }
  .motion .frame { width: 52vw; flex: none; opacity: 1; transform: none; }
  .motion .frame:nth-child(even) { width: 30vw; margin-bottom: 8vh; }
  .motion .frame__media { aspect-ratio: 16 / 10; }
  .motion .frame:nth-child(even) .frame__media { aspect-ratio: 4 / 5; }
  .motion .frame__media img { width: 118%; max-width: none; margin-left: -9%; }
  .motion .windows__progress { display: block; position: absolute; left: var(--pad); right: var(--pad); bottom: 6vh; height: 1px; background: var(--line); }
  .windows__progress span { display: block; height: 100%; background: var(--amber); transform: scaleX(0); transform-origin: left; }
}

/* ---------- Lodge ---------- */
.lodge { display: grid; gap: 48px; padding: clamp(80px, 12vw, 160px) var(--pad); align-items: center; }
.lodge__media { overflow: hidden; aspect-ratio: 4 / 5; background: var(--bg-2); }
.lodge__img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.14); }
.lodge__title { font-size: clamp(2.6rem, 7vw, 5.6rem); line-height: .98; margin-bottom: 26px; }
.lodge__text { color: rgba(236, 230, 220, .78); font-weight: 300; max-width: 40ch; margin: 0 0 40px; font-size: clamp(15px, 1.3vw, 17px); }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.spec { padding: 22px 0; border-bottom: 1px solid var(--line); }
.spec:nth-child(odd) { padding-right: 16px; border-right: 1px solid var(--line); }
.spec:nth-child(even) { padding-left: 22px; }
.spec dt { font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.spec dd { margin: 0; font: 400 clamp(2.8rem, 6vw, 4.4rem)/1 var(--serif); }
@media (min-width: 900px) {
  .lodge { grid-template-columns: 1.05fr 1fr; gap: 7vw; }
  .lodge__media { aspect-ratio: 5 / 6; }
}

/* ---------- Itinerary ---------- */
.itinerary { padding: clamp(60px, 9vw, 120px) var(--pad) clamp(100px, 14vw, 180px); }
.itinerary__head { margin-bottom: 40px; }
.itinerary__title { font-size: clamp(2.8rem, 9vw, 7rem); line-height: .95; }
.nights { list-style: none; margin: 0; padding: 0; }
.night {
  position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 4px 16px; padding: 22px 0;
}
.night::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); transform-origin: left; }
.motion .night::before { transform: scaleX(0); transition: transform 1.4s var(--ease); }
.motion .night.is-in::before { transform: scaleX(1); }
.night__no { font: 500 11px/2.4 var(--sans); letter-spacing: .2em; color: var(--amber); }
.night__name { font: 400 clamp(1.6rem, 4.4vw, 3.4rem)/1.05 var(--serif); transition: transform .8s var(--ease), color .4s; }
.night__note { grid-column: 2; color: var(--muted); font-size: 14px; font-weight: 300; transition: opacity .5s; }
.motion .night > span { opacity: 0; transform: translateY(18px); }
@media (min-width: 900px) {
  .night { grid-template-columns: 90px 1fr auto; align-items: baseline; padding: 30px 0; }
  .night__note { grid-column: 3; text-align: right; }
}
@media (hover: hover) {
  .nights:hover .night__name { color: rgba(236, 230, 220, .35); }
  .nights .night:hover .night__name { color: var(--ink); transform: translateX(24px); }
}

/* ---------- Earthlight ---------- */
.earthlight { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 0 var(--pad); overflow: hidden; }
.earthlight__media { position: absolute; inset: -12% 0; }
.earthlight__img { width: 100%; height: 100%; object-fit: cover; }
.earthlight__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, rgba(5, 5, 5, .85), rgba(5, 5, 5, .2) 70%), linear-gradient(to bottom, var(--bg), transparent 25%, transparent 75%, var(--bg)); }
.earthlight__inner { position: relative; z-index: 1; }
.earthlight__title { font-size: clamp(2.6rem, 8vw, 7rem); line-height: .98; max-width: 12ch; margin-bottom: 22px; }
.earthlight__text { color: rgba(236, 230, 220, .8); margin: 0; font-weight: 300; }

/* ---------- Reserve ---------- */
.reserve { padding: clamp(120px, 16vw, 220px) var(--pad); text-align: center; display: flex; flex-direction: column; align-items: center; }
.reserve .chapter::before { display: none; }
.reserve__title { font-size: clamp(3.2rem, 12vw, 10rem); line-height: .92; margin-bottom: 26px; }
.reserve__text { color: rgba(236, 230, 220, .8); margin: 0 0 40px; max-width: 34ch; font-weight: 300; }
.waitlist { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 520px; }
.waitlist input {
  width: 100%; padding: 17px 24px; border-radius: 999px; border: 1px solid rgba(236, 230, 220, .3); background: rgba(236, 230, 220, .04);
  color: var(--ink); font: 400 15px var(--sans); outline: none; transition: border-color .3s;
}
.waitlist input:focus { border-color: var(--amber); }
.waitlist input::placeholder { color: rgba(236, 230, 220, .4); }
.waitlist__msg { margin: 6px 0 0; min-height: 1.6em; font-size: 13px; color: var(--amber-soft); }
.waitlist.is-done input, .waitlist.is-done button { opacity: .35; pointer-events: none; }
.reserve__fine { margin: 40px 0 0; font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); max-width: 60ch; }
@media (min-width: 640px) {
  .waitlist { flex-direction: row; flex-wrap: wrap; }
  .waitlist input { flex: 1; }
  .waitlist__msg { flex-basis: 100%; }
}

/* ---------- Footer ---------- */
.footer { padding: 0 var(--pad) 28px; border-top: 1px solid var(--line); overflow: hidden; }
.footer__mark { display: flex; justify-content: space-between; font: 400 clamp(5rem, 27vw, 26rem)/.8 var(--serif); letter-spacing: -.02em; padding-top: 30px; overflow: hidden; }
.footer__mark span { display: inline-block; }
.motion .footer__mark span { transform: translateY(100%); }
.footer__row { display: grid; gap: 8px; margin-top: 24px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.footer__row p { margin: 0; }
.footer__row a { color: var(--ink); border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .footer__row { grid-template-columns: 1fr 1fr 1.4fr; } .footer__row p:last-child { text-align: right; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
