/* появление при скролле */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- лайтбокс ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(3,5,4,.94); z-index: 300; display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 14px; box-shadow: var(--shadow); }
.lightbox-close { position: absolute; top: 18px; right: 26px; font-size: 2.4rem; color: #fff; background: none; border: 0; cursor: pointer; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 2.4rem; color: #fff; background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 50%; width: 56px; height: 56px; cursor: pointer; transition: .25s; }
.lightbox-nav:hover { background: rgba(232,162,92,.25); }
.lightbox-prev { left: 16px; } .lightbox-next { right: 16px; }

/* ============ v3 — wow-слой ============ */
:root { --font-quote: 'Cormorant', serif; }

/* прелоадер */
#loader { position: fixed; inset: 0; z-index: 9999; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; transition: opacity .6s ease, visibility .6s; }
#loader.done { opacity: 0; visibility: hidden; }
.loader-logo svg { width: 54px; height: 54px; animation: pulse 1.6s ease infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.92); opacity: .7; } }
.loader-bar { width: 180px; height: 3px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 40%; background: var(--accent-grad); border-radius: 3px; animation: load 1.2s ease-in-out infinite; }
@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(450%); } }
.loader-text { font-family: var(--font-head); font-size: .8rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }

/* прогресс-бар */
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent-grad); z-index: 1000; border-radius: 0 3px 3px 0; }

/* (кастомный курсор убран) */
/* бегущая строка */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); padding: 18px 0; position: relative; }
.marquee-track { display: flex; gap: 34px; width: max-content; animation: marquee 26s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; white-space: nowrap; color: var(--text); opacity: .85; }
.marquee-track i { color: var(--accent); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* bento-сетка фишек */
.features.bento { grid-template-columns: 1.15fr 1fr 1fr; grid-auto-rows: 1fr; }
.bento-img { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); grid-row: span 2; min-height: 100%; }
.bento-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: transform .8s ease; }
.bento-img:hover img { transform: scale(1.06); }
.bento-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 24px 20px; background: linear-gradient(180deg, transparent, rgba(11,16,13,.9)); font-family: var(--font-quote); font-style: italic; font-size: 1.25rem; color: var(--accent2); }

/* параллакс-банд с цитатой */
.quote-band { position: relative; height: 70vh; min-height: 460px; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; }
.quote-band img { position: absolute; left: 0; top: -25%; width: 100%; height: 150%; object-fit: cover; will-change: transform; }
.quote-band::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,16,13,.75), rgba(11,16,13,.55) 50%, rgba(11,16,13,.8)); }
.quote-inner { position: relative; z-index: 2; padding: 0 24px; max-width: 900px; }
.quote-text { font-family: var(--font-quote); font-style: italic; font-weight: 500; font-size: clamp(1.7rem, 4.6vw, 3.1rem); line-height: 1.25; margin: 14px 0 18px; text-shadow: 0 4px 30px rgba(0,0,0,.6); }

/* призрачное слово за секцией */
.section-alt { position: relative; overflow: hidden; }
.ghost-word { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); font-family: var(--font-head); font-weight: 800; font-size: clamp(4rem, 14vw, 11rem); text-transform: uppercase; letter-spacing: .05em; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.05); white-space: nowrap; pointer-events: none; user-select: none; }

/* sticky-стопка шагов */
.steps-stack { max-width: 760px; margin: 0 auto; }
.step-card { position: sticky; background: linear-gradient(145deg, #18221b, #121a15); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 34px 34px 110px; margin-bottom: 22px; box-shadow: var(--shadow); min-height: 150px; }
.step-card:nth-child(1) { top: 110px; }
.step-card:nth-child(2) { top: 140px; }
.step-card:nth-child(3) { top: 170px; }
.step-num { position: absolute; left: 26px; top: 50%; transform: translateY(-50%); font-family: var(--font-head); font-weight: 800; font-size: 3.2rem; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .9; }
.step-card h3 { font-family: var(--font-head); font-size: 1.1rem; color: var(--accent2); margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: .96rem; }

/* карточка: второе фото */
.card-img { perspective: 800px; }
.card-img img { position: relative; }
img.card-alt { position: absolute; inset: 0; opacity: 0; transition: opacity .55s ease; }
.card:hover img.card-alt { opacity: 1; }
.card:hover img.card-main { opacity: 0; }
.card-img img.card-main { transition: opacity .55s ease; }



.hero-text, .trees, .hero-scroll { z-index: 3; }

@media (max-width: 900px) {
  .features.bento { grid-template-columns: 1fr; }
  .bento-img { grid-row: auto; min-height: 240px; }
  .step-card { padding: 26px; }
  .step-num { position: static; transform: none; display: block; margin-bottom: 10px; font-size: 2.2rem; }
  .quote-band { height: 56vh; }
}

/* галерея объекта: первое фото крупное */
.gallery .gallery-featured { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gallery .gallery-featured::after { font-size: 2.4rem; }
/* тёмная схема для date/time picker */
:root { color-scheme: dark; }
@media (max-width: 720px) {
  .gallery .gallery-featured { grid-column: span 1; grid-row: span 1; aspect-ratio: 4/3; }
}

/* гигантский логотип в футере */
.footer-big { font-family: var(--font-head); font-weight: 800; font-size: clamp(2.6rem, 9vw, 7rem); line-height: 1.05; text-align: center; color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.13); margin-bottom: 50px; user-select: none; }

/* прелоадер: проценты */
.loader-pct { font-family: var(--font-head); font-size: 1.9rem; font-weight: 800; color: var(--accent2); }
#to-top:hover { color: var(--accent2); }

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .h-card { width: 78vw; }
  .footer-big { -webkit-text-stroke-width: 1px; }
}

/* ============ v5 — Иммерсивный лес: сцены закат → ночь → рассвет ============ */

/* фон: статичный базовый уходит, управляют слои сцен */
body::before { background: #0b100d; }

.scene-layer { position: fixed; inset: 0; z-index: -2; opacity: 0; transition: opacity 1.4s ease; pointer-events: none; }
.scene-dusk-bg { background:
  radial-gradient(1100px 600px at 80% -10%, rgba(232,162,92,.14), transparent 60%),
  radial-gradient(900px 700px at 0% 40%, rgba(74,124,78,.14), transparent 60%),
  linear-gradient(180deg, #0d120e, #0b100d); }
.scene-night-bg { background:
  radial-gradient(1000px 600px at 70% 0%, rgba(120,160,200,.10), transparent 55%),
  radial-gradient(1200px 800px at 10% 80%, rgba(40,80,110,.14), transparent 60%),
  linear-gradient(180deg, #080d12, #0a1014 50%, #080d12); }
.scene-dawn-bg { background:
  radial-gradient(1100px 600px at 30% -10%, rgba(224,190,150,.16), transparent 60%),
  radial-gradient(900px 700px at 90% 60%, rgba(140,170,140,.12), transparent 60%),
  linear-gradient(180deg, #141b15, #10160f); }
body[data-scene="dusk"] .scene-dusk-bg { opacity: 1; }
body[data-scene="night"] .scene-night-bg { opacity: 1; }
body[data-scene="dawn"] .scene-dawn-bg { opacity: 1; }

/* акценты по сценам */
body[data-scene="night"] { --accent: #9fc3e0; --accent2: #cfe0ef; }
body[data-scene="dawn"] { --accent: #e2bd8d; --accent2: #f0d9b5; }
body[data-scene="night"] .btn-primary { background: #8fb2cf; box-shadow: 0 10px 26px rgba(127,168,201,.25); }
body[data-scene="dawn"] .btn-primary { background: #cfa069; box-shadow: 0 10px 26px rgba(211,167,107,.25); }

/* прелоадер-сценка: растут ели */
.loader-scene { width: 220px; height: 130px; }
.l-horizon { stroke-dasharray: 204; stroke-dashoffset: 204; animation: draw 1s .1s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.l-tree { transform: scaleY(0); transform-origin: bottom center; transform-box: fill-box; animation: grow .7s ease forwards; }
@keyframes grow { to { transform: scaleY(1); } }
.l-moon { opacity: 0; animation: moonIn .9s 1s ease forwards; }
@keyframes moonIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* хиро: параллакс за мышкой */
.hero-slider { will-change: transform; }
.hero-text { will-change: transform; }

/* ночные карточки — окна с огнём */
.night-block .card:hover, .night-scene .card:hover {
  box-shadow: 0 0 0 1px rgba(232,180,110,.4), 0 24px 60px rgba(232,160,80,.12), var(--shadow);
}
.night-block .card-img::before, .night-scene .card-img::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 100%, rgba(255,190,110,.35), transparent 75%);
  opacity: 0; transition: opacity .5s ease;
}
.night-block .card:hover .card-img::before, .night-scene .card:hover .card-img::before { opacity: 1; }

/* ночная сцена с паром */
.night-scene { position: relative; overflow: hidden; }
#steam { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

/* лента: счётчик кадров и прогресс */
.hscroll-ui { position: absolute; left: 6vw; right: 6vw; bottom: 60px; z-index: 5; }
.hscroll-count { font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: var(--accent2); margin-bottom: 10px; letter-spacing: .1em; }
.hscroll-progress { height: 2px; background: rgba(255,255,255,.15); border-radius: 2px; overflow: hidden; max-width: 220px; }
.hscroll-progress span { display: block; height: 100%; width: 0; background: var(--accent-grad); transition: width .15s linear; }

@media (max-width: 720px) { .loader-scene { width: 170px; } }

/* ============ v6 — типографическая система уровня awwwards ============ */
:root {
  --font-head: 'Spectral', Georgia, serif;
  --font-quote: 'Spectral', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Courier New', monospace;
}

/* волосяная сетка поверх сайта */
.hairlines { position: fixed; inset: 0; z-index: -1; pointer-events: none; display: flex; justify-content: center; }
.hairlines > div { width: 100%; max-width: 1220px; padding: 0 24px; display: flex; justify-content: space-between; height: 100%; }
.hairlines i { width: 1px; background: rgba(255,255,255,.03); }

/* заголовки: сериф, плотный набор */
.hero-text h1, .h1, .h2, .h3, .card h3 a, .step-card h3, .booking-box h3, .modal h3,
.stat b, .stat-card b, .auth-box .h1, .sec-head .h2, .logo, .footer-big {
  font-family: var(--font-head);
  letter-spacing: -.015em;
  font-weight: 600;
}
.hero-text h1 { font-weight: 600; letter-spacing: -.02em; font-size: clamp(2.6rem, 7vw, 5rem); }
.quote-text { font-family: var(--font-quote); font-style: italic; }
.step-num, .sec-num { font-family: var(--font-head); }

/* моно-этикетки: цены, даты, статусы, крошки, таблицы */
.sec-kicker, .card-type, .price, .price small, .hscroll-count, .status, .crumbs,
.hero-kicker, .table, .total, .stat span, .stat-card span, .loader-pct, .loader-text,
.bar-row, .amenities span, .chip, .contact-line, .footer, .step p, .faq-q, .faq-a > div {
  font-family: var(--font-mono);
}
.sec-kicker { letter-spacing: .22em; font-weight: 500; font-size: .74rem; }
.hero-kicker { font-family: var(--font-mono); letter-spacing: .22em; font-size: .72rem; font-weight: 500; }
.price { letter-spacing: -.02em; }
.table { font-size: .85rem; }
.step-card p { font-size: .88rem; line-height: 1.65; }
.crumbs { font-size: .78rem; letter-spacing: .04em; }

/* кнопки: плоские, моно-апперкейс, инверсия по ховеру */
.btn {
  font-family: var(--font-mono); font-size: .76rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .12em;
  border-radius: 4px; padding: 14px 26px;
  background: none; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #14100b; border-color: var(--accent); box-shadow: none; }
.btn-primary:hover { background: transparent; color: var(--accent); transform: none; box-shadow: none; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--text); border-color: var(--text); color: #14100b; transform: none; }
.btn-lg { padding: 17px 34px; }
.btn-sm { padding: 8px 14px; font-size: .7rem; }
body[data-scene="night"] .btn-primary { background: #8fb2cf; border-color: #8fb2cf; color: #0c1218; box-shadow: none; }
body[data-scene="night"] .btn-primary:hover { background: transparent; color: #8fb2cf; }
body[data-scene="dawn"] .btn-primary { background: #cfa069; border-color: #cfa069; color: #171009; box-shadow: none; }
body[data-scene="dawn"] .btn-primary:hover { background: transparent; color: #cfa069; }

/* градиентные заливки иконок/бейджей — плоские */
.feature .ico { background: var(--accent); box-shadow: none; }
.card-type.post-event, .card-type.post-promo, .card-type.post-news { background: var(--accent); }
.card-type.post-event { background: #7fae7a; }
.card-type.post-news { background: #9aa3ab; }
.step-num { background: none; -webkit-text-fill-color: var(--accent); color: var(--accent); }
.bar-fill { background: var(--accent); }
.hscroll-progress span { background: var(--accent); }

/* навигация — моно, с нижней линией */
.nav > a { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .06em; }

/* формы: моно-плейсхолдеры, чёткие рамки */
input, textarea, select { font-family: var(--font-mono); font-size: .88rem; border-radius: 4px; }

/* ссылки в тексте — подчёркивание вместо цвета */
.card-body p a, .object-grid a, .post-body a { text-decoration: underline; text-underline-offset: 3px; }

/* цитата — крупный сериф с лапками */
.quote-text { letter-spacing: -.01em; }

/* ============ v7 — финальные кинематографичные штрихи ============ */

/* заголовки — балансировка, фокус-кольца */
h1, h2, h3, .hero-text h1 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[id] { scroll-margin-top: 96px; }

/* кольцо прогресса скролла (fixed, справа внизу) */
#scrolltop {
  position: fixed; right: 26px; bottom: 26px; z-index: 900;
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(12,17,13,.75); backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; transform: translateY(14px);
  transition: opacity .35s ease, transform .35s ease, border-color .3s;
}
#scrolltop.show { opacity: 1; transform: none; }
#scrolltop:hover { border-color: var(--accent); }
#scrolltop svg { position: absolute; inset: 0; transform: rotate(-90deg); }
#scrolltop circle { fill: none; stroke-width: 2; }
#scrolltop .ring-bg { stroke: rgba(255,255,255,.12); }
#scrolltop .ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
#scrolltop .st-arrow { font-family: var(--font-mono); font-size: .8rem; color: var(--accent2); }

/* вспышка названия сцены */
#scene-flash {
  position: fixed; left: 0; right: 0; top: 42%; z-index: 800;
  text-align: center; pointer-events: none;
  font-family: var(--font-head); font-style: italic; font-weight: 500;
  font-size: clamp(3rem, 10vw, 7rem); color: var(--text);
  text-shadow: 0 6px 40px rgba(0,0,0,.6);
  opacity: 0; transform: translateY(16px); letter-spacing: -.02em;
}
#scene-flash.on { animation: sceneFlash 1.6s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes sceneFlash {
  0% { opacity: 0; transform: translateY(16px); }
  18% { opacity: .95; transform: none; }
  70% { opacity: .95; }
  100% { opacity: 0; transform: translateY(-14px); }
}

/* счётчик в лайтбоксе */
.lightbox .lb-count {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: .82rem; letter-spacing: .18em;
  color: rgba(255,255,255,.75);
}

/* выход прелоадера — мягче */
#loader.done { filter: blur(6px); transform: scale(1.03); }

/* фото в карточке постов — чуть выше */
.card-img img { height: 230px; }

@media (max-width: 720px) {
  #scrolltop { right: 16px; bottom: 16px; width: 46px; height: 46px; }
}

/* ---------- адаптив (восстановлено) ---------- */
@media (max-width: 960px) {
  .object-grid, .account-grid, .contacts-grid, .about-grid { grid-template-columns: 1fr; }
  .booking-box, .profile-box { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hscroll-ui { bottom: 40px; }
}
@media (max-width: 720px) {
  .nav { display: none; position: absolute; top: 74px; left: 0; right: 0; background: rgba(13,19,15,.97); backdrop-filter: blur(14px); flex-direction: column; align-items: stretch; padding: 20px 24px; border-bottom: 1px solid var(--line); gap: 4px; z-index: 60; }
  .nav.open { display: flex; }
  .nav > a { padding: 11px 4px; font-size: .95rem; }
  .burger { display: block; }
  .hero { height: 92vh; min-height: 560px; }
  .hero-text h1 { font-size: clamp(2.2rem, 11vw, 3rem); }
  .hero-cta-row { flex-direction: column; align-items: stretch; }
  .bar-row { grid-template-columns: 100px 1fr 70px; font-size: .78rem; }
  .section { padding: 64px 0; }
  .page { padding: 108px 0 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .grid-cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery .gallery-featured { grid-column: span 2; grid-row: span 1; aspect-ratio: 4/3; }
  .object-head { flex-direction: column; align-items: start; gap: 8px; }
  .stats-band { grid-template-columns: 1fr 1fr; }
  .admin-tabs .chip { padding: 8px 13px; font-size: .8rem; }
  .marquee-track span { font-size: .9rem; }
  .header-in { height: 66px; }
  .nav { top: 66px; }
}

/* меню на мобиле — плотнее, без просвечивания */
@media (max-width: 720px) {
  .nav { background: rgba(9,13,10,.995); }
}
