:root {
  --bg: #050505;
  --ink: #efe8da;
  --muted: #a39a8a;
  --gold: #d4b06a;
  --gold-hi: #f3dca4;
  --line: rgba(212, 176, 106, .38);
  --head: 'Oswald', 'Arial Narrow', sans-serif;
  --text: 'Manrope', system-ui, sans-serif;
  --pad: clamp(16px, 4vw, 64px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color-scheme: dark; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--text); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, canvas { display: block; }

/* ---------- загрузка ---------- */
.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; gap: 22px; background: var(--bg); transition: opacity .9s ease, visibility .9s; }
.loader.done { opacity: 0; visibility: hidden; }
.loader-mark { font: 200 clamp(26px, 4vw, 44px)/1 var(--head); letter-spacing: .38em; text-transform: uppercase; color: var(--gold); text-align: center; padding-left: .38em; }
.loader-bar { width: min(280px, 60vw); height: 1px; background: rgba(255,255,255,.1); margin: 0 auto; }
.loader-bar span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .3s ease; }

/* ---------- шапка ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px var(--pad); transition: background .4s, padding .4s, border-color .4s; border-bottom: 1px solid transparent; }
.nav.solid { background: rgba(5,5,5,.9); padding-top: 12px; padding-bottom: 12px; border-color: rgba(212,176,106,.14); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--gold); min-width: 0; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font: 300 19px/1.1 var(--head); letter-spacing: .26em; text-transform: uppercase; white-space: nowrap; }
.brand-text small { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.nav-info { display: flex; align-items: center; gap: 26px; font-size: 13.5px; }
.nav-addr { color: var(--muted); letter-spacing: .02em; }
.nav-phone { text-decoration: none; font-weight: 500; letter-spacing: .04em; white-space: nowrap; }
.nav-phone:hover { color: var(--gold-hi); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 26px; font: 500 12.5px/1 var(--text); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--gold); color: var(--gold); transition: background .25s, color .25s; white-space: nowrap; }
.btn-gold { background: var(--gold); color: #120d04; }
.btn-gold:hover { background: var(--gold-hi); border-color: var(--gold-hi); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 4px; }

/* ---------- сцены ---------- */
.scene { position: relative; height: var(--len); }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--bg); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s; }
.poster.hide { opacity: 0; }
.shade { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(90deg, rgba(5,5,5,.86) 0%, rgba(5,5,5,.5) 30%, rgba(5,5,5,0) 50%, rgba(5,5,5,0) 62%, rgba(5,5,5,.55) 100%),
  linear-gradient(180deg, rgba(5,5,5,.55) 0%, rgba(5,5,5,0) 18%, rgba(5,5,5,0) 70%, rgba(5,5,5,.75) 100%); }
.shade-left { background:
  linear-gradient(90deg, rgba(5,5,5,.78) 0%, rgba(5,5,5,.35) 34%, rgba(5,5,5,0) 55%),
  linear-gradient(180deg, rgba(5,5,5,.5) 0%, rgba(5,5,5,0) 20%, rgba(5,5,5,0) 72%, rgba(5,5,5,.7) 100%); }

/* ---------- тексты поверх видео ---------- */
.txt { position: absolute; z-index: 3; opacity: 0; will-change: opacity, transform; pointer-events: none; }
.txt.on { pointer-events: auto; }
.txt-hero { left: var(--pad); bottom: 11vh; max-width: 640px; }
.txt-left { left: var(--pad); top: 50%; translate: 0 -50%; max-width: 480px; }
.txt-low { top: auto; bottom: 9vh; translate: none; }
.txt-right { right: var(--pad); top: 50%; translate: 0 -50%; max-width: 440px; text-align: right; }
.txt-right .lead { margin-left: auto; }
.txt-center { left: 0; right: 0; top: 50%; translate: 0 -50%; text-align: center; }

.eyebrow { font-size: 11.5px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
h1, h2 { font-family: var(--head); font-weight: 200; text-transform: uppercase; letter-spacing: .04em; line-height: 1.02; color: var(--ink); text-shadow: 0 2px 30px rgba(0,0,0,.6); }
h1 { font-size: clamp(44px, 6.4vw, 104px); }
h2 { font-size: clamp(36px, 4.6vw, 76px); }
h2.big { font-size: clamp(52px, 9vw, 150px); letter-spacing: .08em; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 60%, #9c7a3b); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.lead { margin-top: 22px; max-width: 400px; color: #d4ccbd; font-size: 15.5px; font-weight: 300; text-shadow: 0 1px 18px rgba(0,0,0,.8); }

.scroll-hint { display: flex; align-items: center; gap: 14px; margin-top: 38px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.scroll-hint span { width: 1px; height: 44px; background: linear-gradient(var(--gold), transparent); animation: drip 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

.quote { max-width: 520px; }
.quote p { font: 200 clamp(24px, 2.5vw, 38px)/1.25 var(--head); letter-spacing: .02em; text-shadow: 0 2px 24px rgba(0,0,0,.7); }
.quote cite { display: block; margin-top: 22px; font-style: normal; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }

.final { left: var(--pad); top: 50%; translate: 0 -50%; max-width: 620px; }
.final-phone { display: inline-block; margin-top: 30px; font: 200 clamp(30px, 3.4vw, 52px)/1 var(--head); letter-spacing: .06em; text-decoration: none; color: var(--gold-hi); }
.final-phone:hover { color: #fff; }
.final-row { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 28px; margin-top: 30px; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* навигация по главам */
.rail { position: absolute; z-index: 3; right: var(--pad); bottom: 7vh; list-style: none; display: flex; gap: 22px; font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: rgba(239,232,218,.35); }
.rail li { position: relative; padding-top: 12px; transition: color .4s; }
.rail li::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 1px; background: currentColor; }
.rail li.on { color: var(--gold); }

/* ---------- подписи деталей ---------- */
.spots { position: absolute; inset: 0; z-index: 4; opacity: 0; pointer-events: none; }
.spot { position: absolute; left: 0; top: 0; }
.spot i { position: absolute; left: 0; top: 0; width: 1px; background: var(--line); transform-origin: top; }
.spot i::before { content: ''; position: absolute; left: -4px; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--gold); background: rgba(5,5,5,.6); box-shadow: 0 0 14px rgba(243,220,164,.6); }
.spot.up i::before { bottom: -4px; }
.spot.dn i::before { top: -4px; }
.spot span { position: absolute; width: 270px; font-size: 12px; line-height: 1.45; color: #cfc6b6; text-shadow: 0 1px 10px #000; }
.spot b { display: block; font: 300 15px/1.25 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin-bottom: 3px; }
.spot em { display: block; font-style: normal; font-size: 10px; letter-spacing: .3em; color: var(--gold); margin-bottom: 4px; }
.spot.r span { right: 8px; text-align: right; }
.spot.l span { left: 8px; }
.spot.side i { width: 34px; height: 1px !important; transform-origin: left; }
.spot.side i::before { left: -4px; top: -4px; }
.spot.side span { left: 46px; top: -22px; }

/* ---------- подвал ---------- */
.foot { position: relative; z-index: 5; background: var(--bg); border-top: 1px solid rgba(212,176,106,.16); padding: 44px var(--pad) 28px; color: var(--muted); font-size: 13px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 40px; }
.foot-row a { text-decoration: none; color: var(--ink); }
.foot-note { max-width: 340px; font-size: 12px; opacity: .75; }

/* ---------- мобильная версия ---------- */
@media (max-width: 1080px) {
  .nav-addr { display: none; }
}
@media (max-width: 760px) {
  .nav { padding: 12px 16px; }
  .nav-phone, .nav-btn { display: none; }
  .nav-info { gap: 0; }
  .nav-info .nav-call { display: inline-flex; }
  .brand-text b { font-size: 16px; letter-spacing: .2em; }
  .brand-text small { font-size: 9.5px; }
  .brand-mark { width: 30px; height: 30px; }

  .shade { background: linear-gradient(180deg, rgba(5,5,5,.6) 0%, rgba(5,5,5,0) 16%, rgba(5,5,5,0) 58%, rgba(5,5,5,.9) 80%); }
  .shade-left { background: linear-gradient(180deg, rgba(5,5,5,.6) 0%, rgba(5,5,5,0) 16%, rgba(5,5,5,0) 58%, rgba(5,5,5,.9) 80%); }

  .txt-hero, .txt-left, .txt-right, .txt-low, .final { left: 16px; right: 16px; top: auto; bottom: calc(26px + env(safe-area-inset-bottom)); translate: none; max-width: none; text-align: left; }
  .txt-right .lead { margin-left: 0; }
  .txt-center { top: auto; bottom: 18vh; translate: none; }
  .eyebrow { font-size: 10.5px; margin-bottom: 12px; }
  h1 { font-size: clamp(36px, 11vw, 52px); }
  h2 { font-size: clamp(30px, 9vw, 44px); }
  h1 br, h2:not(.big) br { display: none; }
  .lead { font-size: 14px; margin-top: 14px; }
  .scroll-hint { margin-top: 22px; }
  .quote p { font-size: 23px; }
  h2.big { font-size: clamp(40px, 12vw, 56px); }
  .final .lead { font-size: 13.5px; }
  .final-phone { font-size: 30px; margin-top: 18px; }
  .final-row { margin-top: 18px; }
  .final-row .btn { width: 100%; }
  .rail { left: 16px; right: auto; top: 76px; bottom: auto; gap: 14px; font-size: 9.5px; }

  /* подписи деталей превращаются в список под часами */
  .spots { inset: auto 16px calc(18px + env(safe-area-inset-bottom)) 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
  .spot { position: static; transform: none !important; }
  .spot i { display: none; }
  .spot span, .spot.r span, .spot.l span, .spot.side span { position: static; width: auto; text-align: left; font-size: 11px; line-height: 1.35; }
  .spot b { font-size: 12.5px; letter-spacing: .1em; }
  .spot em { margin-bottom: 2px; }
  .spot:nth-child(n+7) { grid-column: 1 / -1; }

  .foot-row { flex-direction: column; align-items: flex-start; }
}

.nav-call { display: none; width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid var(--gold); color: var(--gold); text-decoration: none; }
.nav-call svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  .scroll-hint span { animation: none; }
}

.rail { transition: opacity .4s; }
.spots.on ~ .rail { opacity: 0; }

