/* ARCA Garden — фильм-прокрутка, Liquid Glass */
:root {
  --bg: #04060b;
  --ink: #fff;
  --ink-2: rgba(255,255,255,.76);
  --ink-3: rgba(255,255,255,.5);
  --accent: #0a84ff;
  --font: "Geist", "SF Pro Display", system-ui, -apple-system, sans-serif;
  --gutter: clamp(14px, 2.2vw, 28px);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html.lenis, html.lenis body { height: auto; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }

/* ---------- прозрачное жидкое стекло ---------- */
.glass { position: relative; isolation: isolate; border-radius: 22px; box-shadow: 0 12px 40px rgba(0,0,0,.25), 0 2px 6px rgba(0,0,0,.15); text-shadow: 0 1px 2px rgba(0,0,0,.55), 0 0 14px rgba(0,0,0,.35); }
.glass::before {
  content: ""; position: absolute; inset: 0; z-index: -2; border-radius: inherit;
  backdrop-filter: blur(0.6px) saturate(160%) brightness(1.1) contrast(1.05);
  -webkit-backdrop-filter: blur(0.6px) saturate(160%) brightness(1.1) contrast(1.05);
  filter: url(#lg-distort);
  background: rgba(255,255,255,.015);
}
.glass::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 22%, rgba(255,255,255,0) 78%, rgba(255,255,255,.08) 100%);
  box-shadow:
    inset 1.5px 1.5px 0 -.5px rgba(255,255,255,.85),
    inset -1.5px -1.5px 0 -.5px rgba(255,255,255,.45),
    inset 0 0 0 1px rgba(255,255,255,.16),
    inset 0 0 14px 1px rgba(255,255,255,.10);
}
.glass.pill { border-radius: 999px; }
.glass.tint-accent { text-shadow: 0 1px 1px rgba(0,0,0,.25); }
.glass.tint-accent::after { background: linear-gradient(135deg, rgba(255,255,255,.35) 0%, rgba(255,255,255,0) 30%), linear-gradient(180deg, rgba(10,132,255,.62), rgba(10,100,230,.62)); }
.interactive { transition: transform .25s cubic-bezier(.2,.9,.3,1.3); }
.interactive:hover { transform: scale(1.035); }
.interactive:active { transform: scale(.97); }

/* ---------- верх ---------- */
.topbar { position: fixed; z-index: 20; top: var(--gutter); left: var(--gutter); right: var(--gutter); display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px 0 14px; font-weight: 700; font-size: 15px; }
.brand .mark { width: 22px; height: 22px; border-radius: 7px; background: conic-gradient(from 210deg, #64d2ff, #0a84ff, #5e5ce6, #64d2ff); box-shadow: inset 0 1px 1px rgba(255,255,255,.6); }
.brand span { font-weight: 400; color: var(--ink-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 20px; font-weight: 600; font-size: 14.5px; }

/* ---------- сцена фильма ---------- */
.film { position: relative; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; background: #000; }
.poster, .screen { position: absolute; inset: 0; width: 100%; height: 100%; }
.poster { object-fit: cover; }
.screen { display: block; }
.grade { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, rgba(0,0,0,0) 55%, rgba(0,0,0,.35) 100%),
    radial-gradient(60% 55% at 0% 100%, rgba(0,0,0,.55), rgba(0,0,0,0) 70%), /* под подписью — чтобы текст читался на любом кадре */
    linear-gradient(0deg, rgba(0,0,0,.4) 0%, rgba(0,0,0,0) 30%); }

.caption {
  position: absolute; z-index: 5; left: var(--gutter); bottom: calc(var(--gutter) + 22px);
  max-width: min(520px, calc(100% - 2 * var(--gutter)));
  padding: 20px 24px 22px; border-radius: 26px;
  transition: opacity .5s, transform .5s;
}
.caption.swap > * { animation: capIn .7s cubic-bezier(.2,.8,.2,1) both; }
.caption.swap > :nth-child(2) { animation-delay: .06s; }
.caption.swap > :nth-child(3) { animation-delay: .12s; }
@keyframes capIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.kicker { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.title { margin-top: 4px; font-size: clamp(30px, 4.2vw, 52px); font-weight: 650; line-height: 1.04; letter-spacing: -.035em; }
.sub { margin-top: 8px; font-size: 15px; color: var(--ink-2); max-width: 40ch; }

.chapters { position: absolute; z-index: 5; right: var(--gutter); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 24px; }
.chapters button { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 14px 0 10px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-3); text-align: left; white-space: nowrap; transition: color .2s, background .2s; }
.chapters button i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; transition: transform .2s; }
.chapters button:hover { color: #fff; }
.chapters button[aria-current] { color: #fff; background: rgba(255,255,255,.16); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.chapters button[aria-current] i { transform: scale(1.4); }

.progress { position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.1); }
.progress span { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #64d2ff, #0a84ff); }
.hint { position: absolute; z-index: 5; left: 50%; bottom: calc(var(--gutter) + 22px); transform: translateX(-50%); height: 40px; display: grid; place-items: center; padding: 0 18px; font-size: 13px; color: var(--ink-2); transition: opacity .4s; }
.loading { position: absolute; z-index: 6; right: var(--gutter); bottom: 14px; font-size: 12px; color: var(--ink-3); transition: opacity .6s; }
.loading.done { opacity: 0; }

/* ---------- финал ---------- */
.contact { min-height: 100vh; display: grid; place-items: center; padding: 120px var(--gutter);
  background: radial-gradient(80% 60% at 50% 100%, rgba(10,132,255,.25), transparent 70%), url("img/aerial.jpg") center / cover; }
.contact-card { max-width: 620px; padding: 32px; border-radius: 32px; text-align: left; }
.contact-card .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

@media (max-width: 860px) {
  .chapters { display: none; }
  .caption { bottom: calc(var(--gutter) + 12px); padding: 16px 18px 18px; }
  .hint { display: none; }
  .topbar .btn { height: 40px; padding: 0 14px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }

/* ================= выбор квартиры ================= */
.units { position: relative; padding: 110px var(--gutter) 90px; isolation: isolate;
  background: linear-gradient(180deg, rgba(4,6,11,.92), rgba(4,6,11,.78) 40%, rgba(4,6,11,.92)), url("img/aerial.jpg") center / cover fixed; }
.units-head { max-width: 1280px; margin: 0 auto 26px; }
.units-head .title { font-size: clamp(32px, 4vw, 52px); }
.units-grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; align-items: start; }
.units-left { display: grid; gap: 18px; }
.map-card, .chess-card, .unit-card { padding: 18px; border-radius: 28px; }
.arc-map { width: 100%; height: auto; display: block; }
.arc-map path { cursor: pointer; stroke: rgba(255,255,255,.55); stroke-width: 1.2; transition: fill .2s; }
.arc-map path.dis { cursor: default; fill: rgba(255,255,255,.06); stroke-dasharray: 3 3; }
.arc-map path.res { fill: rgba(255,255,255,.14); }
.arc-map path.res:hover { fill: rgba(100,210,255,.35); }
.arc-map path.on { fill: rgba(10,132,255,.75); stroke: #fff; }
.arc-map text { font: 600 13px var(--font); fill: #fff; text-anchor: middle; pointer-events: none; }
.arc-map .sub-t { font: 500 10px var(--font); fill: rgba(255,255,255,.6); }
.arc-map .garden { fill: rgba(48,209,88,.16); stroke: rgba(48,209,88,.4); }
.map-note { margin-top: 8px; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.chess-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.chess-top h3 { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.free { background: #30d158; } .dot.hold { background: #ffd60a; } .dot.sold { background: #8e8e93; }
.chess { display: grid; gap: 4px; max-height: 520px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.chess-row { display: grid; grid-template-columns: 38px repeat(var(--cols), minmax(0, 1fr)); gap: 4px; align-items: stretch; }
.chess-row .fl { display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.cell { border-radius: 10px; padding: 6px 4px; font-size: 11.5px; line-height: 1.2; text-align: center; cursor: pointer; transition: transform .15s, box-shadow .15s; color: #0b0d12; font-weight: 600; text-shadow: none; }
.cell small { display: block; font-weight: 500; opacity: .75; font-size: 10.5px; }
.cell.free { background: rgba(48,209,88,.9); } .cell.hold { background: rgba(255,214,10,.9); } .cell.sold { background: rgba(142,142,147,.55); color: rgba(255,255,255,.75); cursor: default; }
.cell:not(.sold):hover { transform: scale(1.05); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.cell.on { box-shadow: 0 0 0 2px #fff, 0 6px 18px rgba(0,0,0,.4); }
.chess-band { border-radius: 10px; padding: 9px 12px; font-size: 12.5px; color: var(--ink-2); background: rgba(255,255,255,.06); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.unit-card { position: sticky; top: 84px; }
.uc-title { font-size: clamp(24px, 2.6vw, 34px); font-weight: 650; letter-spacing: -.03em; line-height: 1.05; }
.uc-tabs { display: flex; gap: 4px; margin: 14px 0 10px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.07); width: fit-content; }
.uc-tabs button { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.uc-tabs button[aria-pressed="true"] { background: rgba(255,255,255,.18); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.uc-main { position: relative; border-radius: 18px; overflow: hidden; cursor: zoom-in; background: rgba(255,255,255,.04); }
.uc-main img { width: 100%; display: block; aspect-ratio: 16 / 10; object-fit: cover; }
.uc-main .zoom { position: absolute; right: 10px; bottom: 10px; height: 32px; display: grid; place-items: center; padding: 0 12px; font-size: 12px; }
.uc-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.uc-thumbs button { border-radius: 10px; overflow: hidden; opacity: .7; transition: opacity .2s, box-shadow .2s; }
.uc-thumbs button[aria-current] { opacity: 1; box-shadow: 0 0 0 2px #fff; }
.uc-thumbs img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.uc-specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.uc-specs div { padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.06); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.uc-specs dt { font-size: 11px; color: var(--ink-3); } .uc-specs dd { margin-top: 2px; font-size: 15.5px; font-weight: 600; }
.uc-rooms { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; font-size: 13px; color: var(--ink-2); }
.uc-rooms span { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.uc-rooms b { color: #fff; font-weight: 600; }
.uc-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(2,3,6,.94); display: grid; place-items: center; }
.lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lb-close { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; font-size: 18px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 30px; line-height: 1; }
.lb-nav.prev { left: 18px; } .lb-nav.next { right: 18px; }
.lb-cap { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); padding: 10px 18px; font-size: 14px; white-space: nowrap; }
@media (max-width: 960px) {
  .units-grid { grid-template-columns: 1fr; }
  .unit-card { position: static; }
  .uc-specs { grid-template-columns: repeat(2, 1fr); }
  .uc-rooms { grid-template-columns: 1fr; }
}
