/* Главная «Волга» (ветка design-volga): панорама Самары с Волги + колода на первом экране.
   Всё ограничено #view-home, остальные экраны не затрагиваются. Цвета текста первого экрана
   меняет js/volga.js вместе с небом: --vh-fg, --vh-fg2, --vh-veil (днём тёмный текст, ночью светлый). */

/* --vh-va: сила подложки под текстом. Днём слабее, чтобы панорама не выцветала, ночью сильнее (её задаёт js/volga.js) */
#view-home { --vh-fg: var(--text); --vh-fg2: var(--text-2); --vh-veil: 245 249 252; --vh-va: .6; }

/* до первого кадра панорамы подложка уже в цвет темы, без вспышки */
:root[data-theme="night"] #view-home { --vh-fg: #F3F6F8; --vh-fg2: #C3CED7; --vh-veil: 12 20 32; --vh-va: .88; }
:root[data-theme="night"] .vh-hero { background: #0B1424; }
:root[data-theme="eve"] .vh-hero { background: #E9C3B4; }

/* ---------- первый экран ---------- */
.vh-hero { position: relative; overflow: hidden; background: #BFD9EC; }
.vh-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vh-veil { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgb(var(--vh-veil) / calc(var(--vh-va) * 1.02)) 0%, rgb(var(--vh-veil) / calc(var(--vh-va) * .8)) 24%, rgb(var(--vh-veil) / 0) 44%); }
.vh-in { position: relative; max-width: 1120px; margin: 0 auto; display: grid; gap: 16px;
  padding: 20px max(16px, env(safe-area-inset-right, 0px)) 170px max(16px, env(safe-area-inset-left, 0px)); }
.vh-text { display: grid; gap: 10px; color: var(--vh-fg); }
.vh-text .hero-city { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--vh-fg2); font-weight: 700; font-size: 13px; }
.vh-dot { width: 8px; height: 8px; border-radius: 50%; background: #E3714F; flex: none; }
.vh-clock { font-variant-numeric: tabular-nums; }
.vh-clock:not(:empty)::before { content: "·"; margin-right: 8px; }
.vh-text h1 { font-size: clamp(30px, 5.4vw, 58px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 800; color: var(--vh-fg); text-wrap: balance; }
.vh-text h1 em { font-style: normal; color: var(--brand); }
.vh-text .hero-sub { color: var(--vh-fg2); font-size: clamp(15px, 1.5vw, 18px); max-width: 44ch; }
.vh-text .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.vh-text .hero-cta .btn-ghost { background: var(--glass-2); border-color: transparent; }
/* пока панорама «пролистывается» к началу, кнопка подбора мягко подсвечивается (js/volga.js nudge) */
.vh-text .hero-cta .btn-primary { transition: box-shadow .6s ease, transform .6s cubic-bezier(.2,.7,.3,1); }
.vh-text .hero-cta .btn-primary.is-nudge { box-shadow: 0 0 0 6px rgba(201, 79, 52, .18), 0 10px 28px rgba(201, 79, 52, .35); transform: translateY(-1px) scale(1.03); }
@media (prefers-reduced-motion: reduce) { .vh-text .hero-cta .btn-primary.is-nudge { transform: none; } }

.vh-deck-col { display: grid; gap: 14px; justify-items: center; }
.vh-deck { position: relative; width: 100%; max-width: 290px; height: 390px; margin-top: 4px; }
.vh-card { position: absolute; inset: 0; border-radius: 24px; overflow: hidden; color: #fff; background: #6E5F51;
  box-shadow: 0 28px 56px -22px rgba(10, 16, 22, .6); touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; will-change: transform; }
.vh-card:active { cursor: grabbing; }
.vh-card.is-under { transform: translateY(10px) rotate(3.5deg) scale(.96); cursor: default; pointer-events: none; }
.vh-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.vh-card::after { content: ""; position: absolute; inset: auto 0 0; height: 62%; background: linear-gradient(to top, rgba(20, 28, 34, .94), rgba(20, 28, 34, 0)); pointer-events: none; }
.vh-ok { position: absolute; z-index: 1; left: 14px; top: 14px; background: rgba(255, 255, 255, .94); color: #1F6B4F; font-size: 12px; font-weight: 800; padding: 5px 9px; border-radius: 8px; }
.vh-ok.is-demo { color: #5E7083; }
.vh-pos { position: absolute; z-index: 1; right: 14px; top: 14px; background: rgba(20, 28, 34, .5); font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 8px; }
.vh-stamp { position: absolute; z-index: 2; top: 62px; border: 3px solid #fff; font-weight: 800; font-size: 22px; padding: 2px 12px; border-radius: 10px; opacity: 0; }
.vh-stamp.is-yes { left: 18px; transform: rotate(-12deg); }
.vh-stamp.is-no { right: 18px; transform: rotate(12deg); }
.vh-info { position: absolute; z-index: 1; left: 18px; right: 18px; bottom: 18px; display: grid; gap: 3px; justify-items: start; pointer-events: none; }
.vh-info b { font-size: 28px; letter-spacing: -.03em; font-weight: 800; font-variant-numeric: tabular-nums; }
.vh-info small { font-size: 13px; opacity: .85; }
.vh-t { font-size: 16px; font-weight: 700; }
.vh-a { font-size: 14px; opacity: .9; }
.vh-v { margin-top: 6px; background: rgba(242, 176, 143, .22); color: #FFD9C5; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 8px; }
.vh-panel { position: absolute; inset: 0; background: var(--paper); color: var(--text); border-radius: 24px; padding: 24px 20px; display: grid; align-content: center; gap: 12px;
  box-shadow: 0 28px 56px -24px rgba(10, 16, 22, .5); animation: vh-pop .45s var(--spring); }
@keyframes vh-pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.vh-panel b { font-size: 21px; letter-spacing: -.02em; }
.vh-panel p { color: var(--text-2); }
.vh-controls { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; width: 100%; max-width: 330px; }
.vh-controls[hidden] { display: none; }
.vh-controls .btn { min-height: 56px; border-radius: 16px; font-weight: 800; font-size: 16px; gap: 8px; }
.vh-controls .btn svg { width: 18px; height: 18px; }
.vh-no { background: var(--paper); color: var(--text); border-color: transparent; box-shadow: 0 8px 20px rgba(10, 16, 22, .14); }
.vh-yes { box-shadow: 0 10px 24px rgba(185, 74, 46, .3); }


/* ---------- блоки ниже ---------- */
.vh-main { max-width: 1120px; margin: 0 auto; display: grid; gap: 48px;
  padding: 44px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.vh-sec { display: grid; gap: 16px; align-content: start; min-width: 0; }
.vh-sec[hidden], .vh-split[hidden] { display: none; }
.vh-sec h2 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; letter-spacing: -.03em; }
.vh-facts { display: grid; gap: 10px; }
.vh-fact { background: var(--paper); border-radius: 18px; padding: 20px; box-shadow: 0 6px 20px rgba(22, 32, 40, .06); display: grid; gap: 6px; align-content: start; }
.vh-fact h3 { margin: 0; font-size: 19px; line-height: 1.25; letter-spacing: -.02em; font-weight: 800; color: var(--text); }
.vh-fact p { color: var(--text-2); font-size: 15px; }
.vh-split { display: grid; gap: 36px; }
.vh-prices { background: var(--paper); border-radius: 22px; padding: 18px 16px; display: grid; gap: 12px; box-shadow: 0 6px 20px rgba(22, 32, 40, .06); }
.vh-cap { font-size: 14px; color: var(--text-2); }
#vh-prices { display: grid; gap: 12px; }
.vh-row { display: grid; grid-template-columns: max-content minmax(40px, 1fr) max-content; gap: 10px; align-items: center; font-size: 14px; }
.vh-row span:first-child { font-weight: 700; }
.vh-bar { height: 8px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.vh-bar i { display: block; height: 100%; border-radius: 4px; background: var(--brand); }
.vh-row b { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vh-feed { display: grid; gap: 10px; }
.vh-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--paper); border-radius: 18px; padding: 10px;
  text-decoration: none; color: var(--text); box-shadow: 0 6px 20px rgba(22, 32, 40, .05); }
.vh-item img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--bg-raise); }
.vh-item b { font-size: 16px; display: block; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vh-item span span { display: block; font-size: 13px; color: var(--text-2); text-wrap: pretty; }
.vh-item em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--text-2); background: var(--surface); padding: 4px 9px; border-radius: 8px; white-space: nowrap; }
.vh-all { width: 100%; }
/* Мини-карта и приглашение собственникам */
.vh-mapsec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.vh-more { padding: 0; color: var(--brand-text); font-weight: 700; white-space: nowrap; }
.vh-mapgrid { display: grid; gap: 12px; }
.vh-map { position: relative; display: block; height: 260px; border-radius: 22px; overflow: hidden; background: var(--bg-raise);
  box-shadow: 0 6px 20px rgba(22, 32, 40, .06); isolation: isolate; }
.vh-map-canvas { position: absolute; inset: 0; pointer-events: none; }
.vh-map-canvas .leaflet-control-container { display: none; }
.vh-map .pin-dot { display: block; transform: translate(-50%, -50%); width: 14px; height: 14px; border-radius: 50%; background: var(--brand-fill); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.vh-map .pin-dot.is-verified { background: #1F6B4F; }
.vh-map-badge { position: absolute; z-index: 500; left: 12px; bottom: 12px; padding: 6px 11px; border-radius: 10px; background: var(--paper);
  color: var(--text); font-size: 13px; font-weight: 700; box-shadow: var(--shadow-pop); }
.vh-map:hover .vh-map-badge { color: var(--brand-text); }
.vh-owner { display: grid; gap: 8px; align-content: center; justify-items: start; padding: 20px; border-radius: 22px; background: var(--brand-soft); }
.vh-owner b { font-size: 19px; letter-spacing: -.02em; }
.vh-owner p { color: var(--text-2); font-size: 14px; max-width: 42ch; }
.vh-owner .btn { margin-top: 6px; }
.vh-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: vh; }
.vh-steps li { counter-increment: vh; display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto 1fr; gap: 2px 14px; align-content: start; }
.vh-steps li::before { content: counter(vh); grid-row: 1 / 3; font-size: 38px; line-height: .95; font-weight: 800; color: var(--brand); letter-spacing: -.04em; }
.vh-steps b { font-size: 16px; }
.vh-steps span { color: var(--text-2); font-size: 14px; }
.vh-steps-btn { justify-self: start; }

.vh-bottom { margin-top: 56px; background: var(--surface); }
.vh-bottom-in { max-width: 1120px; margin: 0 auto; display: grid; gap: 24px;
  padding: 28px max(16px, env(safe-area-inset-right, 0px)) 28px max(16px, env(safe-area-inset-left, 0px)); }
.vh-faq h2 { font-size: 17px; color: var(--text-2); letter-spacing: 0; margin-bottom: 4px; }
.vh-faq .faq-item { border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; background: none; }
.vh-faq .faq-item summary { padding: 13px 0; font-size: 14px; font-weight: 600; }
.vh-faq .faq-item p { padding: 0 0 14px; color: var(--text-2); font-size: 14px; max-width: 65ch; }
.vh-aside { display: grid; gap: 16px; align-content: start; font-size: 14px; }
.vh-safe { display: grid; gap: 4px; justify-items: start; }
.vh-safe p { color: var(--text-2); }
.vh-safe .link-btn { padding: 0; color: var(--brand-text); font-weight: 700; }
.vh-aside .home-links { padding: 0; display: grid; gap: 10px; }

@media (max-width: 899px) {
  .vh-in { gap: 20px; padding-top: 16px; padding-bottom: 110px; }
  .vh-text { gap: 10px; }
  .vh-text h1 { font-size: clamp(27px, 4.6vw, 38px); line-height: 1.12; }
  .vh-text .hero-sub { font-size: 14px; line-height: 1.55; }
  /* на телефоне «Подобрать» и «Сдать» уже есть в нижнем меню: первый экран чище (18.10.2026) */
  .vh-text .hero-cta { display: none; }
  .vh-deck-col { gap: 12px; }
  .vh-deck { max-width: 280px; height: clamp(280px, 41svh, 350px); }
  .vh-info { left: 16px; right: 16px; bottom: 16px; }
  .vh-info b { font-size: 25px; }
  .vh-t { font-size: 14px; }
  .vh-a { font-size: 13px; }
  .vh-ok { left: 10px; right: 70px; top: 10px; width: fit-content; font-size: 11px; }
  .vh-pos { right: 10px; top: 10px; font-size: 11px; }
  .vh-controls { max-width: 300px; gap: 8px; }
  .vh-controls .btn { min-height: 48px; font-size: 14px; border-radius: 14px; }
  .vh-main { gap: 32px; padding-top: 32px; }
  .vh-sec h2 { font-size: 21px; }
  .vh-fact { padding: 16px; }
  .vh-fact h3 { font-size: 17px; }
  .vh-fact p { font-size: 14px; }
  .vh-bottom { margin-top: 36px; }
  .vh-owner .btn { width: 100%; }
}
@media (min-width: 900px) {
  .vh-veil { background: linear-gradient(to right, rgb(var(--vh-veil) / var(--vh-va)) 0%, rgb(var(--vh-veil) / calc(var(--vh-va) * .55)) 30%, rgb(var(--vh-veil) / 0) 50%); }
  .vh-in { grid-template-columns: 1.1fr .9fr; column-gap: 40px; padding-top: 40px; padding-bottom: 150px; min-height: 720px; }
  .vh-text { align-self: start; gap: 16px; padding-top: 30px; }
  .vh-deck { height: 440px; max-width: 340px; margin-top: 0; }
  .vh-controls { max-width: 340px; }
  .vh-main { gap: 72px; padding-top: 72px; }
  .vh-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .vh-fact { padding: 24px; }
  .vh-split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
  .vh-mapgrid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
  .vh-map { height: 340px; }
  .vh-owner { padding: 28px; }
  .vh-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .vh-bottom-in { grid-template-columns: 2fr 1fr; gap: 48px; }
}
@media (max-width: 600px) {
  .vh-item { grid-template-columns: 56px minmax(0, 1fr); row-gap: 4px; }
  .vh-item img { grid-row: span 2; }
  .vh-item em { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .vh-panel { animation: none; } }
