/* Премиальные эффекты: первый экран, сториттеллинг, фототур, конструктор отдыха, панель брони, FAQ.
   Анимации только через transform и opacity. При prefers-reduced-motion всё показывается сразу. */
:root { --ease: cubic-bezier(.2, .7, .2, 1); }

/* ---------- первый экран ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: #1d261f; }
.hero-media { position: absolute; inset: -4% 0; will-change: transform; transform: translate3d(0, var(--py, 0px), 0); }
.hero-depth { position: absolute; inset: 0; transform: translate3d(var(--mx, 0px), var(--my, 0px), 0) scale(1.05); transition: transform .4s var(--ease); }
.hero-depth img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 24s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.09); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(10 18 14 / .5) 0%, rgb(10 18 14 / .08) 38%, rgb(10 18 14 / .78) 100%); pointer-events: none; }
.hero-copy { position: relative; z-index: 1; width: 100%; max-width: 1160px; margin: 0 auto; padding: 120px 20px 96px; display: flex; flex-direction: column; gap: 22px; }
.hero h1 { max-width: 12ch; font-size: clamp(46px, 9vw, 104px); text-shadow: 0 2px 28px rgb(0 0 0 / .3); }
.hero .sub { font-size: clamp(16px, 2vw, 20px); max-width: 46ch; opacity: .95; }
.hero .eyebrow { color: rgb(255 255 255 / .85); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; margin-top: 6px; }
.cta-ghost { display: inline-block; color: #fff; text-decoration: none; border: 1px solid rgb(255 255 255 / .6); border-radius: 999px; padding: 13px 24px; font-weight: 600; font-size: 15px; backdrop-filter: blur(6px); transition: background-color .25s, border-color .25s; }
.cta-ghost:hover { background: rgb(255 255 255 / .16); border-color: #fff; }
.credit { position: absolute; right: 20px; bottom: 14px; z-index: 1; font-size: 11px; color: rgb(255 255 255 / .7); }
.scroll-hint { position: absolute; left: 50%; bottom: 22px; z-index: 1; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; color: rgb(255 255 255 / .85); text-decoration: none; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.scroll-hint i { display: block; width: 1px; height: 38px; background: rgb(255 255 255 / .35); position: relative; overflow: hidden; }
.scroll-hint i::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 14px; background: #fff; animation: drip 1.8s var(--ease) infinite; }
@keyframes drip { from { transform: translateY(-14px); } to { transform: translateY(40px); } }
@media (max-width: 720px) { .scroll-hint { display: none; } .hero-copy { padding-bottom: 64px; } }

/* слова заголовка появляются по очереди */
.js .hero h1 .w { display: inline-block; opacity: 0; transform: translateY(.45em); animation: rise .95s var(--ease) forwards; animation-delay: calc(var(--i) * 110ms + 250ms); }
.js .hero .eyebrow, .js .hero .sub, .js .hero-actions { opacity: 0; transform: translateY(14px); animation: rise .9s var(--ease) forwards; }
.js .hero .eyebrow { animation-delay: .1s; } .js .hero .sub { animation-delay: .9s; } .js .hero-actions { animation-delay: 1.1s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* кнопки с «магнитом» */
.magnetic { position: relative; transition: transform .25s var(--ease), box-shadow .25s; will-change: transform; }
.magnetic span { display: inline-block; transition: transform .25s var(--ease); }
.hero .cta, .story .cta, .final .cta { background: var(--surface); color: var(--accent); }
.hero .cta:hover, .story .cta:hover, .final .cta:hover { box-shadow: 0 10px 30px rgb(0 0 0 / .3); }

/* ---------- сториттеллинг ---------- */
.story { position: relative; height: 420svh; margin-top: 88px; }
.story-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; color: #fff; background: #111613; }
.story-imgs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.12); transition: opacity 1.1s var(--ease), transform 5s var(--ease); }
.story-imgs img.on { opacity: 1; transform: scale(1); }
.story-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgb(10 18 14 / .72) 0%, rgb(10 18 14 / .2) 55%, rgb(10 18 14 / .1) 100%), linear-gradient(0deg, rgb(10 18 14 / .45), transparent 40%); }
.story-copy { position: absolute; inset: 0; max-width: 1160px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; }
.scene { position: absolute; max-width: 560px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); pointer-events: none; }
.scene.on { opacity: 1; transform: none; pointer-events: auto; transition-delay: .25s; }
.scene .eyebrow { color: rgb(255 255 255 / .8); }
.scene h2 { font-size: clamp(38px, 6.4vw, 78px); }
.story-dots { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 12px; list-style: none; margin: 0; padding: 0; }
.story-dots li { width: 7px; height: 7px; border-radius: 50%; background: rgb(255 255 255 / .4); transition: background-color .4s, transform .4s var(--ease); }
.story-dots li.on { background: #fff; transform: scale(1.5); }
@media (max-width: 720px) { .story { height: 360svh; margin-top: 64px; } .story-dots { right: 12px; } .story-shade { background: linear-gradient(0deg, rgb(10 18 14 / .8) 0%, rgb(10 18 14 / .15) 60%); } .story-copy { align-items: flex-end; padding-bottom: 104px; } .scene { position: absolute; bottom: 104px; left: 20px; right: 40px; } }

/* ---------- фототур ---------- */
.tour { display: flex; flex-direction: column; gap: 16px; }
.tour-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tour-tabs::-webkit-scrollbar { display: none; }
.tour-tabs button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 9px 18px; font-size: 14px; font-weight: 500; white-space: nowrap; transition: background-color .2s, color .2s, border-color .2s; }
.tour-tabs button[aria-selected="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.tour-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--sunk); box-shadow: var(--lift); }
@media (max-width: 720px) { .tour-stage { aspect-ratio: 4 / 3; } }
.tour-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s var(--ease); }
.tour-stage > img.on { opacity: 1; }
.spots { position: absolute; inset: 0; }
.spot { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border: 0; padding: 0; background: transparent; }
.spot .dot { position: absolute; inset: 7px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgb(0 0 0 / .4); }
.spot .dot::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .75); animation: ping 2.2s var(--ease) infinite; }
@keyframes ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.spot .tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translate(-50%, 6px); width: max-content; max-width: 220px; background: rgb(255 253 249 / .96); color: var(--fg); border-radius: 10px; padding: 10px 13px; font-size: 13px; line-height: 1.4; text-align: left; box-shadow: 0 10px 30px rgb(0 0 0 / .3); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); }
.spot .tip b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.spot[hidden] { display: none; }
.spot.below .tip { bottom: auto; top: calc(100% + 6px); transform: translate(-50%, -6px); }
.spot.below.open .tip { transform: translate(-50%, 0); }
.spot.below.edge-l .tip { transform: translate(-10px, -6px); } .spot.below.edge-l.open .tip { transform: translate(-10px, 0); }
.spot.below.edge-r .tip { transform: translate(10px, -6px); } .spot.below.edge-r.open .tip { transform: translate(10px, 0); }
.spot.open { z-index: 3; }
.spot.open .tip { opacity: 1; transform: translate(-50%, 0); }
.spot.edge-l .tip { left: 0; transform: translate(-10px, 6px); } .spot.edge-l.open .tip { transform: translate(-10px, 0); }
.spot.edge-r .tip { left: auto; right: 0; transform: translate(10px, 6px); } .spot.edge-r.open .tip { transform: translate(10px, 0); }
.tour-tools { position: absolute; right: 12px; top: 12px; display: flex; gap: 8px; }
.tool-btn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgb(255 255 255 / .9); font-size: 18px; line-height: 1; box-shadow: 0 4px 14px rgb(0 0 0 / .25); }
.daynight { display: flex; background: rgb(255 255 255 / .9); border-radius: 999px; padding: 3px; box-shadow: 0 4px 14px rgb(0 0 0 / .25); }
.daynight[hidden] { display: none; }
.daynight button { border: 0; background: transparent; border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; }
.daynight button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.tour-info { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; }
.tour-info h3 { font-family: var(--f-serif); font-size: 30px; font-weight: 500; }
.tour-info p { max-width: 60ch; }
.tour-info .cta { background: var(--accent); color: var(--accent-fg); }

/* ---------- конструктор отдыха ---------- */
.builder { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 22px; box-shadow: var(--lift); }
@media (max-width: 720px) { .builder { padding: 20px 16px; } }
.b-progress { display: flex; align-items: center; gap: 8px; }
.b-progress i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); position: relative; overflow: hidden; }
.b-progress i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.b-progress i.done::after { transform: scaleX(1); }
.b-progress span { font-size: 12px; color: var(--muted); white-space: nowrap; margin-left: 4px; }
.b-step { display: flex; flex-direction: column; gap: 18px; animation: stepin .5s var(--ease); }
@keyframes stepin { from { opacity: 0; transform: translateX(18px); } }
.b-step h3 { font-family: var(--f-serif); font-size: clamp(26px, 4vw, 36px); font-weight: 500; line-height: 1.1; }
.b-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .b-grid { grid-template-columns: minmax(0, 1fr); } }
.b-card { text-align: left; border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 18px 18px; display: flex; flex-direction: column; gap: 4px; transition: transform .25s var(--ease), border-color .2s, background-color .2s, box-shadow .25s; }
.b-card b { font-size: 16px; font-weight: 600; }
.b-card span { font-size: 13.5px; color: var(--muted); }
@media (hover: hover) { .b-card:hover { transform: translateY(-3px); box-shadow: var(--lift); } }
.b-card[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.b-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.b-nav .ghost[hidden] { display: none; }
.b-result { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; animation: stepin .6s var(--ease); }
@media (max-width: 720px) { .b-result { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
.b-result img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; box-shadow: var(--lift); }
.b-result .txt { display: flex; flex-direction: column; gap: 14px; }
.b-result h3 { font-family: var(--f-serif); font-size: clamp(28px, 4vw, 40px); font-weight: 500; line-height: 1.1; }
.b-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.b-tags span { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 500; }
.b-result .cta { align-self: flex-start; background: var(--accent); color: var(--accent-fg); }

/* ---------- закреплённая панель брони ---------- */
.book-bar { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 30; transform: translate(-50%, 140%); display: flex; align-items: center; gap: 22px; background: rgb(29 34 30 / .94); color: #fff; backdrop-filter: blur(10px); border-radius: 999px; padding: 8px 8px 8px 26px; box-shadow: 0 14px 40px rgb(0 0 0 / .35); transition: transform .5s var(--ease); }
.book-bar.show { transform: translate(-50%, 0); }
.book-bar div { display: flex; flex-direction: column; line-height: 1.25; }
.book-bar b { font-size: 14px; font-weight: 600; } .book-bar span { font-size: 12.5px; opacity: .8; }
.book-bar .cta { background: #fff; color: var(--fg); padding: 11px 22px; white-space: nowrap; }
@media (max-width: 720px) { .book-bar { left: 0; right: 0; bottom: 0; transform: translateY(110%); border-radius: 16px 16px 0 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); justify-content: space-between; gap: 12px; } .book-bar.show { transform: none; } body { padding-bottom: 0; } footer { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); } }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; font-size: 18px; font-weight: 500; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 300; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details > div { overflow: hidden; animation: faqopen .35s var(--ease); }
.faq details p { padding: 0 40px 22px 0; color: var(--muted); max-width: 64ch; }
@keyframes faqopen { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- финальный призыв ---------- */
.final { position: relative; margin-top: 96px; min-height: 70svh; display: grid; place-items: center; overflow: hidden; color: #fff; text-align: center; }
.final img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.final::after { content: ""; position: absolute; inset: 0; background: rgb(10 18 14 / .55); }
.final-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 20px; padding-top: 80px; padding-bottom: 80px; }
.final h2 { font-size: clamp(40px, 7vw, 84px); max-width: 14ch; }
.final p { max-width: 40ch; opacity: .92; font-size: 18px; }
.final + footer, main + footer { margin-top: 0; }

/* ---------- мелочи ---------- */
.topbar nav a { position: relative; }
.topbar nav a:not(.btn-nav)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.topbar nav a:not(.btn-nav):hover::after { transform: scaleX(1); }
.topbar nav a:hover { text-decoration: none; }
.sum .total b { display: inline-block; min-width: 3ch; text-align: right; }

/* без анимаций, если так настроено в системе */
@media (prefers-reduced-motion: reduce) {
  .hero-depth img, .scroll-hint i::after, .spot .dot::after { animation: none; }
  .js .hero h1 .w, .js .hero .eyebrow, .js .hero .sub, .js .hero-actions { opacity: 1; transform: none; animation: none; }
  .hero-media, .hero-depth { transform: none !important; }
  .story-imgs img, .scene, .tour-stage > img { transition: none; }
  .story-imgs img { transform: none; }
  .b-step, .b-result, .faq details > div { animation: none; }
}
