/* «Параллель» v2, арт-дирекшн «Линия прибытия» (docs/ARTDIRECTION-66.md).
   Одна синяя контрольная параллель ведёт через страницу: широта → город → Пермякова, 15 → номер → заявка.
   Форма: кнопки — капсулы (геометрия круглого знака 66°32′), фото, поля и рамки — прямые углы. */

:root {
  --bg: #F3F5F2;
  --panel: #FFFFFF;
  --ink: #161D22;
  --muted: #4A555E;
  --line: #C8D1D3;
  --line-strong: #8E9AA0;
  --accent: #294CB0;
  --accent-ink: #FFFFFF;
  --bad: #B4322A;
  --photo-filter: none;

  --f-sans: "Commissioner", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gut: 16px;
  --top-h: 60px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  color-scheme: light;
}
@media (min-width: 768px) { :root { --gut: clamp(24px, 3.4vw, 48px); --top-h: 68px; } }
@media (min-width: 1024px) { :root { --gut: 56px; } }

:root[data-theme="night"] {
  --bg: #0D1420;
  --panel: #182332;
  --ink: #EDF1F6;
  --muted: #A9B5C4;
  --line: #304052;
  --line-strong: #56687D;
  --accent: #B9CBFF;
  --accent-ink: #0D1420;
  --bad: #FF8F86;
  --photo-filter: brightness(.82) saturate(.86);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--f-sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
figure { margin: 0; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: inherit; }
.wrap { width: 100%; max-width: 1520px; margin: 0 auto; padding: 0 var(--gut); }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .02em; font-style: normal; font-weight: 400; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--ink); color: var(--bg); text-decoration: none; border-radius: 999px; }
.skip:focus { top: 8px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid var(--accent); border-radius: 999px;
  font: 500 15.5px/1 var(--f-sans); letter-spacing: .005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .18s var(--ease), background-color .25s, color .25s, border-color .25s;
}
.btn .ph { font-size: 18px; }
@media (hover: hover) { .btn:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); } }
.btn:active { transform: scale(.98); }
.btn--line { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 14.5px; }
.btn--big { min-height: 56px; padding: 0 32px; font-size: 16.5px; }

/* ---------- фото ---------- */
.pic { position: relative; overflow: hidden; background: var(--line); }
.pic img { width: 100%; height: 100%; object-fit: cover; filter: var(--photo-filter); transition: filter .6s var(--ease); }
figcaption.mono { color: var(--muted); }

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom: 1px solid var(--line);
  transition: background-color .5s var(--ease);
}
@supports (backdrop-filter: blur(4px)) { .top { backdrop-filter: blur(10px); } }
.top__in { display: flex; align-items: center; gap: 32px; height: var(--top-h); }
.logo { display: flex; flex-direction: column; gap: 5px; text-decoration: none; line-height: 1; flex: none; }
.logo__word { font: 300 18px/1 var(--f-sans); text-transform: uppercase; letter-spacing: .3em; margin-right: -.3em; }
.logo__lat { font: 400 10.5px/1 var(--f-mono); color: var(--muted); letter-spacing: .04em; }
.nav { display: flex; gap: 28px; }
.nav a { font-size: 15px; text-decoration: none; color: var(--muted); white-space: nowrap; transition: color .2s; }
.nav a:hover { color: var(--ink); }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.top__phone { display: inline-flex; align-items: center; gap: 8px; font: 500 15.5px/1 var(--f-sans); text-decoration: none; white-space: nowrap; }
.top__phone .ph { display: none; font-size: 19px; }

.theme { display: inline-flex; padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px; }
.theme button {
  border: 0; background: transparent; cursor: pointer;
  min-height: 30px; padding: 0 12px; border-radius: 999px;
  font: 500 13px/1 var(--f-sans); color: var(--muted);
  transition: background-color .25s, color .25s;
}
.theme button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---------- первый экран ---------- */
.hero { position: relative; padding: 18px 0 0; }
.hero__rules {
  position: absolute; left: 0; right: 0; top: 0; height: 100%; pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 39px, var(--line) 39px 40px);
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 35%, transparent 70%);
          mask-image: linear-gradient(180deg, #000 0, #000 35%, transparent 70%);
  opacity: .55;
}
.hero > .wrap { position: relative; }
.hero__meta { display: flex; justify-content: space-between; gap: 24px; color: var(--muted); }
.hero__meta span { background: var(--bg); padding-right: 8px; transition: background-color .5s var(--ease); }
.hero__meta .hero__now { padding: 0 0 0 8px; text-align: right; }
.hero__title { margin-top: clamp(6px, 1.2vw, 16px); }
.hero__word {
  display: flex; justify-content: space-between;
  font: 100 clamp(56px, 11.4vw, 172px)/.84 var(--f-sans);
  text-transform: uppercase;
}
.hero__word b { font-weight: inherit; }

.hero__grid {
  display: grid; gap: 28px 32px;
  grid-template-columns: minmax(0, 7fr) minmax(0, 10fr) minmax(0, 8fr);
  grid-template-areas: "lead house rates";
  align-items: start;
  margin-top: clamp(36px, 4.4vw, 60px);
}
.hero__lead span { display: block; }
.hero__lead { grid-area: lead; font: 300 clamp(22px, 1.95vw, 28px)/1.3 var(--f-sans); letter-spacing: -.005em; }
.hero__house { grid-area: house; position: relative; }
.hero__house figcaption { padding: 0 0 10px 0; text-align: right; color: var(--ink); }
.hero__house .pic { aspect-ratio: 4 / 4.6; }
.hero__house img { object-position: 50% 38%; }

.rates { grid-area: rates; position: relative; display: grid; border-top: 1px solid var(--ink); background: var(--bg); transition: background-color .5s var(--ease); }
.rate {
  position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name price" "meta price";
  gap: 4px 16px; align-items: end;
  padding: 18px 0 18px 20px; border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.rate::before { content: ""; position: absolute; left: 0; top: 0; bottom: -1px; width: 1px; background: var(--accent); }
.rate::after { content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 1px; background: var(--accent); }
.rate__name { grid-area: name; font: 500 19px/1.15 var(--f-sans); }
.rate__meta { grid-area: meta; font-size: 14.5px; color: var(--muted); }
.rate__price { grid-area: price; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font: 200 clamp(34px, 2.8vw, 44px)/.95 var(--f-sans); letter-spacing: -.01em; white-space: nowrap; }
.rate__price small { font: 400 12px/1 var(--f-mono); color: var(--muted); letter-spacing: .02em; }
@media (hover: hover) { .rate:hover .rate__name { color: var(--accent); } }
.rates__act { display: grid; gap: 14px; padding-top: 22px; }
.rates__act .btn { width: 100%; }
.rates__phone { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; text-decoration: none; font: 400 19px/1.2 var(--f-sans); white-space: nowrap; }
.rates__phone .mono { color: var(--muted); }

/* контрольная параллель первого экрана: координаты считает script.js */
.ctrl { position: absolute; inset: 0; pointer-events: none; display: none; }
.ctrl.is-set { display: block; }
.ctrl__line { position: absolute; left: 0; top: var(--ly); width: var(--lx); height: 2px; margin-top: -1px; background: var(--accent); transform-origin: left center; }
.ctrl__tick { position: absolute; left: var(--lx); top: var(--ly); width: 2px; height: 22px; margin: -11px 0 0 -1px; background: var(--accent); }
.ctrl__lead { position: absolute; left: var(--lx); top: var(--ly); width: 1px; height: var(--lh); margin-left: -.5px; background: var(--accent); transform-origin: top center; }
.ctrl__label { position: absolute; top: var(--lby, calc(var(--ly) + 10px)); left: var(--lx); padding: 2px 6px; transform: translateX(var(--label-x, 8px)); background: var(--bg); color: var(--accent); white-space: nowrap; transition: background-color .5s var(--ease); }
.ctrl--right .ctrl__label { --label-x: calc(-100% - 8px); }

.now-line { display: none; }

/* ---------- разделы ---------- */
.sec { margin-top: clamp(88px, 10vw, 152px); }
.h2 { font: 200 clamp(36px, 4.4vw, 64px)/1.02 var(--f-sans); letter-spacing: -.015em; }
.sec__head { display: grid; gap: 14px; margin-bottom: clamp(28px, 3.4vw, 48px); }
.sec__sub { font: 400 clamp(18px, 1.5vw, 21px)/1.4 var(--f-sans); color: var(--muted); }

/* номера */
.rooms__line { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); height: 44px; }
.rooms__line::before { content: ""; position: absolute; left: calc(var(--gut) * -1); right: calc(var(--gut) * -1); top: 22px; height: 1px; background: var(--line-strong); }
.mark { position: relative; display: flex; align-items: center; gap: 10px; height: 44px; font: 400 12px/1 var(--f-mono); color: var(--muted); transition: color .3s; }
.mark > span { position: relative; padding: 4px 8px 4px 0; background: var(--bg); transition: background-color .5s var(--ease); }
.mark i { position: relative; flex: none; width: 13px; height: 13px; }
.mark i::before { content: ""; position: absolute; left: 6px; top: -4px; width: 1px; height: 21px; background: var(--accent); }
.mark i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .45s var(--ease); }
.mark.is-on { color: var(--accent); }
.mark.is-on i::after { transform: scale(1); }

.rooms__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); }
.room { display: flex; flex-direction: column; align-items: stretch; border-top: 1px solid var(--ink); padding-top: 14px; }
.room__pics { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; aspect-ratio: 16 / 9; }
.room__pics > .pic { min-height: 0; min-width: 0; }
.room__pics img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } /* картинка не растягивает сетку: пропорция 16:9 держится */
.room__big { grid-row: 1 / 3; }
.room__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.room__name { font: 400 clamp(24px, 2.1vw, 30px)/1.1 var(--f-sans); }
.room__price { font: 200 clamp(40px, 3.6vw, 56px)/1 var(--f-sans); letter-spacing: -.015em; white-space: nowrap; }
.room__price span { font: 400 12px/1 var(--f-mono); letter-spacing: .02em; color: var(--muted); }
.room__spec { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 6px 36px; margin: 20px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); }
.room__spec div { display: contents; }
.room__spec dt { grid-row: 1; font: 400 12px/1.2 var(--f-mono); color: var(--muted); }
.room__spec dd { grid-row: 2; margin: 0; font: 500 18px/1.2 var(--f-sans); }
.room__text { margin: 18px 0 24px; color: var(--muted); max-width: 46ch; }
.room .btn { align-self: flex-start; margin-top: auto; }

.extra { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 12px clamp(24px, 4vw, 64px); margin-top: clamp(40px, 4vw, 56px); padding-top: 22px; border-top: 1px solid var(--line-strong); }
.extra__big { font: 300 clamp(22px, 2vw, 28px)/1.25 var(--f-sans); }
.extra__text { color: var(--muted); max-width: 52ch; }

/* ---------- пересечение Полярного круга ---------- */
.cross { margin-top: clamp(88px, 10vw, 152px); }
.cross__stage {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 8px;
  height: clamp(460px, 74vh, 760px);
}
.cross__ph--house img { object-position: 50% 30%; }
.cross__ph--city img { object-position: 50% 62%; }
.cross__lid { position: absolute; left: 0; right: 0; height: 50%; z-index: 2; background: var(--bg); display: none; transition: background-color .5s var(--ease); }
.cross__lid::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 39px, var(--line) 39px 40px); opacity: .7; }
.cross__lid--top { top: 0; }
.cross__lid--bot { bottom: 0; }
.cross__lid--bot::before { background: repeating-linear-gradient(0deg, transparent 0 39px, var(--line) 39px 40px); }
.cross__msg { position: absolute; left: 0; right: 0; bottom: 18px; width: max-content; max-width: calc(100% - 32px); margin: 0 auto; padding: 4px 24px 8px; background: var(--bg); text-align: center; font: 200 clamp(30px, 4.4vw, 64px)/1.05 var(--f-sans); letter-spacing: -.015em; opacity: 0; transform: translateY(10px); }
.cross__line { position: absolute; z-index: 3; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--accent); display: none; }
.cross__mid { position: absolute; left: 0; top: 50%; width: 1px; height: 2px; pointer-events: none; }
.cross__cap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 32px; align-items: baseline; padding-top: 18px; }
.cross__title { font: 300 clamp(22px, 2vw, 28px)/1.2 var(--f-sans); }
.cross__note { color: var(--muted); }

/* состояния анимации (script.js): armed → playing → done */
.cross.is-armed .cross__lid, .cross.is-armed .cross__line { display: block; }
.cross.is-play .cross__lid, .cross.is-play .cross__line { display: block; }
.cross.is-play .cross__msg { animation: msg-in .7s var(--ease) both; }
.cross.is-play .cross__lid--top .cross__msg { animation: msg-in .7s var(--ease) both; }
.cross.is-play .cross__lid--top { animation: lid-up .52s var(--ease-io) .18s both; }
.cross.is-play .cross__lid--bot { animation: lid-down .52s var(--ease-io) .18s both; }
.cross.is-play .cross__line { animation: line-close .48s var(--ease-io) .22s both; }
.cross.is-play .cross__ph img { animation: settle 1s var(--ease) .18s both; }
.cross.is-armed .cross__cap, .cross.is-play .cross__cap { opacity: 0; }
.cross.is-play .cross__cap { animation: fade-in .5s var(--ease) .6s both; }
@keyframes msg-in { 0% { opacity: 0; transform: translateY(10px); } 26%, 100% { opacity: 1; transform: none; } }
@keyframes lid-up { from { transform: none; } to { transform: translateY(-101%); } }
@keyframes lid-down { from { transform: none; } to { transform: translateY(101%); } }
@keyframes line-close { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes settle { from { transform: scale(1.04); } to { transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- атлас: дом изнутри ---------- */
.atlas__head { display: grid; gap: 22px; max-width: 980px; }
.atlas__lead { font: 200 clamp(36px, 4.6vw, 70px)/1.04 var(--f-sans); letter-spacing: -.02em; }
.atlas__text { font-size: clamp(17px, 1.3vw, 19px); color: var(--muted); max-width: 58ch; }
.atlas__grid {
  display: grid; gap: 28px 12px; margin-top: clamp(36px, 4vw, 56px);
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.atlas__grid figure { display: grid; gap: 10px; align-content: start; }
.atlas__a { grid-column: 1 / 8; }
.atlas__a .pic, .atlas__b .pic { height: clamp(300px, 34vw, 500px); }
.atlas__b { grid-column: 8 / 13; }
.atlas__b img { object-position: 50% 60%; }
.atlas__c { grid-column: 1 / 6; }
.atlas__c .pic, .atlas__d .pic, .atlas__e .pic { height: clamp(240px, 27vw, 400px); }
.atlas__d { grid-column: 6 / 10; }
.atlas__e { grid-column: 10 / 13; }
.atlas__e img { object-position: 50% 40%; }

/* ---------- в каждом номере ---------- */
.amen__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 88px); align-items: start; }
.amen__note { margin: 16px 0 28px; color: var(--muted); }
.amen__list { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--ink); display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; }
.amen__list li { position: relative; padding-left: 22px; }
.amen__list li::before { content: ""; position: absolute; left: 0; top: .78em; width: 12px; height: 1px; background: var(--accent); }
.amen__list b { font: 400 19px/1.3 var(--f-sans); }
.amen__pics { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: start; }
.amen__pics figure { display: grid; gap: 10px; align-content: start; }
.amen__pics .pic { aspect-ratio: 3 / 4; }
.amen__p2 { margin-top: 48px; }
.amen__p3 { margin-top: 96px; }

/* ---------- откуда вы едете ---------- */
.route__box { border-top: 1px solid var(--ink); }
.route__sum { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: baseline; padding-top: 18px; cursor: default; }
.route__sum::-webkit-details-marker { display: none; }
.route__sum-hint { grid-column: 1; color: var(--muted); }
.route__sum-ico { display: none; }
.route__in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 64px); margin-top: clamp(28px, 3vw, 44px); align-items: start; }
.route__ctl { display: grid; gap: 14px; }
.route__label { font-size: 14px; color: var(--muted); }
.route__field input {
  width: 100%; min-height: 52px; padding: 12px 16px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 0;
  font-size: 18px; color: var(--ink);
}
.route__field input:focus { outline: none; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.route__field input::placeholder { color: var(--muted); opacity: .8; }
.route__quick { display: flex; flex-wrap: wrap; gap: 8px; }
.route__quick button {
  min-height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent;
  font-size: 14px; color: var(--ink);
  transition: background-color .2s, color .2s, border-color .2s;
}
.route__quick button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (hover: hover) { .route__quick button:hover { border-color: var(--ink); } }
.route__out { display: grid; gap: 4px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.route__km { font: 200 clamp(40px, 4.2vw, 64px)/1 var(--f-sans); letter-spacing: -.02em; white-space: nowrap; }
.route__out.is-empty .route__km { font-size: clamp(26px, 2.4vw, 34px); font-weight: 300; }
.route__to { color: var(--muted); }
.route__note { font-size: 14px; color: var(--muted); }
/* карта маршрута — map.css */

/* ---------- заявка ---------- */
.book__in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 88px); align-items: start; }
.book__side { position: sticky; top: calc(var(--top-h) + 32px); display: grid; gap: 18px; }
.book__lead { font: 300 clamp(22px, 2vw, 28px)/1.3 var(--f-sans); max-width: 22ch; }
.book__text { color: var(--muted); max-width: 42ch; }
.book__phones { display: grid; gap: 6px; margin-top: 8px; }
.book__phones .mono { color: var(--muted); }
.book__phones a { font: 300 clamp(22px, 2vw, 28px)/1.2 var(--f-sans); text-decoration: none; white-space: nowrap; }
.book__phones a:hover { color: var(--accent); }

.form[hidden] { display: none; }
.form { display: grid; gap: 20px; padding: clamp(20px, 3vw, 40px); background: var(--panel); border: 1px solid var(--line-strong); transition: background-color .5s var(--ease); }
.form__room { position: relative; border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form__room legend { font-size: 14px; color: var(--muted); margin-bottom: 10px; padding: 0; }
.form__room label { position: relative; cursor: pointer; }
.form__room input { position: absolute; opacity: 0; }
.form__room label > span { position: relative; display: grid; gap: 6px; padding: 16px 18px 16px 40px; border: 1px solid var(--line-strong); transition: border-color .2s, box-shadow .2s; }
.form__room b { font: 500 18px/1.15 var(--f-sans); }
.form__room em { font-style: normal; font-size: 14px; color: var(--muted); }
.tick { position: absolute; left: 16px; top: 21px; width: 12px; height: 12px; }
.tick::before { content: ""; position: absolute; left: -4px; right: -4px; top: 5.5px; height: 1px; background: var(--line-strong); }
.tick::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--panel); transition: background-color .3s, border-color .3s, transform .45s var(--ease); }
.form__room input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.form__room input:checked + span .tick::after { background: var(--accent); border-color: var(--accent); }
.form__room input:checked + span .tick::before { background: var(--accent); }
.form__room input:checked + span em { color: var(--accent); }
.form__room input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.form__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.form__row--3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 104px; }
.form > *, .field { min-width: 0; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 14px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 0;
  font-size: 16px; color: var(--ink);
  transition: border-color .2s, background-color .5s var(--ease);
}
.field select { -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field textarea { resize: vertical; min-height: 96px; }
.field input[type="date"] { min-width: 0; display: block; -webkit-appearance: none; appearance: none; }
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.field input::placeholder { color: var(--muted); }
.field.is-bad input, .field.is-bad select { border-color: var(--bad); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.check a { color: var(--ink); }
.check.is-bad { color: var(--bad); }
.form__error { color: var(--bad); font-size: 15px; }
.form__foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form__hint { font-size: 14px; color: var(--muted); }

/* открытка после заявки */
.card { display: grid; gap: 18px; outline: none; }
.card[hidden] { display: none; }
.card__frame { position: relative; }
.card__canvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; background: var(--panel); box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px color-mix(in srgb, var(--ink) 45%, transparent); }
.card__hit {
  position: absolute; left: 50%; top: 50%; width: 132px; height: 132px; margin: -66px 0 0 -66px;
  display: grid; place-items: center; border-radius: 50%;
  border: 2px solid var(--accent); color: var(--accent);
  box-shadow: inset 0 0 0 5px var(--panel), inset 0 0 0 6px var(--accent);
  background: var(--panel);
  font: 500 22px/1 var(--f-mono);
  opacity: 0; pointer-events: none;
}
.card.is-hit .card__canvas { animation: card-in .5s var(--ease) .42s both; }
.card.is-hit .card__hit { animation: hit .78s var(--ease) both; }
@keyframes hit {
  0% { opacity: 0; transform: scale(1.6) rotate(-14deg); }
  22% { opacity: 1; transform: scale(.94) rotate(-8deg); }
  32% { transform: scale(1) rotate(-8deg); }
  70% { opacity: 1; transform: scale(1) rotate(-8deg); }
  100% { opacity: 0; transform: scale(1) rotate(-8deg); }
}
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.card__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.card__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.card__text { color: var(--muted); max-width: 60ch; }
.card__text a { color: var(--ink); white-space: nowrap; }
.check--inline { align-items: center; font-size: 15px; color: var(--ink); }

/* ---------- где мы ---------- */
.contacts__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 88px); align-items: start; }
.contacts__facts { display: flex; flex-direction: column; align-items: flex-start; gap: 30px; }
.facts { margin: 0; display: grid; gap: 22px; width: 100%; border-top: 1px solid var(--ink); padding-top: 20px; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; }
.facts dt { color: var(--muted); padding-top: 4px; }
.facts dd { margin: 0; font-size: 19px; line-height: 1.45; }
.facts a { text-decoration: none; }
.facts a:hover { color: var(--accent); }
.map { border: 1px solid var(--line-strong); padding: 10px; background: var(--panel); transition: background-color .5s var(--ease); }
.map__box { position: relative; height: clamp(320px, 32vw, 460px); background: repeating-linear-gradient(180deg, transparent 0 39px, var(--line) 39px 40px); }
.map__fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); text-decoration: none; }
.map iframe { position: relative; display: block; width: 100%; height: 100%; border: 0; filter: var(--photo-filter); }
.map figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px 0; flex-wrap: wrap; }

/* ---------- подвал: линия завершает маршрут ---------- */
.foot { margin-top: clamp(96px, 11vw, 160px); padding-bottom: 36px; }
.foot__route { position: relative; height: 120px; }
.foot__line { position: absolute; left: calc(var(--gut) * -1); right: 60px; top: 50%; height: 2px; margin-top: -1px; background: var(--accent); }
.foot__mark { position: absolute; top: calc(50% + 12px); color: var(--muted); white-space: nowrap; }
.foot__mark::before { content: ""; position: absolute; left: 0; top: -23px; width: 1px; height: 22px; background: var(--accent); }
.foot__mark--a { left: 22%; padding-left: 8px; }
.foot__mark--b { right: 140px; padding-left: 8px; color: var(--ink); }
.sign {
  position: absolute; right: 0; top: 50%; width: 120px; height: 120px; margin-top: -60px;
  display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid var(--accent); color: var(--accent); background: var(--bg);
  box-shadow: inset 0 0 0 6px var(--bg), inset 0 0 0 7px var(--accent);
  font: 500 19px/1 var(--f-mono); letter-spacing: -.02em;
  transition: background-color .5s var(--ease), box-shadow .5s var(--ease);
}
.foot__cta { display: flex; justify-content: space-between; align-items: center; gap: 24px 48px; flex-wrap: wrap; margin-top: 36px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.foot__big { font: 200 clamp(30px, 3.6vw, 52px)/1.1 var(--f-sans); letter-spacing: -.015em; max-width: 20ch; }
.foot__cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; margin-top: 28px; font-size: 15px; color: var(--muted); }
.foot__cols a { text-decoration: none; }
.foot__cols a:hover { color: var(--ink); }
.foot__cols p:last-child { text-align: right; }

/* ---------- шкала широты (только десктоп) ---------- */
.lat { display: none; }
@media (min-width: 1024px) {
  .lat { display: block; position: fixed; z-index: 20; right: 18px; top: calc(var(--top-h) + 120px); bottom: 48px; width: 36px; pointer-events: none; }
  .lat__rail { position: absolute; right: 0; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
  .lat__tick { position: absolute; right: 0; top: calc(var(--p) * 100%); width: 7px; height: 1px; background: var(--line-strong); }
  .lat__tick--circle { width: 14px; height: 2px; margin-top: -.5px; background: var(--accent); }
  .lat__read { position: absolute; right: 8px; top: 0; display: grid; justify-items: end; gap: 1px; font-size: 10.5px; line-height: 1.15; color: var(--muted); padding: 2px 3px; background: var(--bg); transform: translateY(calc(var(--lp, 0) * (100vh - var(--top-h) - 168px) - 50%)); will-change: transform; transition: color .3s; }
  .lat__read::after { content: ""; position: absolute; right: -11px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--ink); }
  .lat.is-north .lat__read { color: var(--accent); }
  .lat.is-north .lat__read::after { background: var(--accent); }
}

/* ---------- нижняя полоса (телефон) ---------- */
.dock { display: none; }

/* ---------- анимация первого экрана ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.seen) .ctrl.is-set .ctrl__line { animation: draw-x 1.05s var(--ease-io) .15s both; }
  .js:not(.seen) .ctrl.is-set .ctrl__tick { animation: pop .35s var(--ease) 1.15s both; }
  .js:not(.seen) .ctrl.is-set .ctrl__lead { animation: draw-y .45s var(--ease-io) 1.3s both; }
  .js:not(.seen) .ctrl.is-set .ctrl__label { animation: fade-in .4s var(--ease) 1.25s both; }
  .js:not(.seen) .hero__house figcaption { animation: fade-in .4s var(--ease) 1.6s both; }
}
@keyframes draw-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes draw-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes pop { from { opacity: 0; transform: scaleY(.2); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* ---------- планшет ---------- */
@media (max-width: 1199px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "lead lead" "house rates"; }
  .nav { gap: 22px; }
}
@media (max-width: 1023px) {
  .nav { display: none; }
  .top__phone-num { display: none; }
  .top__phone .ph { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 50%; }
  .rooms__grid, .rooms__line { gap: 20px; }
  .amen__in, .book__in, .contacts__in, .route__in { grid-template-columns: minmax(0, 1fr); }
  .book__side { position: static; }
  .amen__p2, .amen__p3 { margin-top: 0; }
}

/* ---------- телефон ---------- */
@media (max-width: 767px) {
  body { font-size: 16px; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .top__in { gap: 12px; }
  .logo__word { font-size: 15px; letter-spacing: .24em; margin-right: -.24em; }
  .logo__lat { font-size: 10px; }
  .top__cta { display: none; }
  .top__right { gap: 10px; }
  .theme button { padding: 0 10px; min-height: 30px; font-size: 13px; }

  .hero { padding-top: 12px; }
  .hero__rules { opacity: .45; }
  .hero__meta { font-size: 11.5px; }
  .hero__meta .hero__now { display: none; }
  .hero__title { margin-top: 8px; }
  .hero__word { font-size: calc((100vw - 2 * var(--gut)) / 7.1); font-weight: 200; line-height: .9; }
  .hero__grid { grid-template-columns: minmax(0, 1fr) 36%; grid-template-areas: "lead house" "rates rates"; gap: 18px 16px; margin-top: 30px; align-items: end; }
  .hero__lead { align-self: start; padding-top: 24px; font-size: 19px; line-height: 1.3; font-weight: 300; }
  .hero__lead span { display: block; }
  .hero__house figcaption { padding-bottom: 6px; font-size: 11px; }
  .hero__house .pic { aspect-ratio: 1 / 1.08; }
  .hero__house img { object-position: 50% 30%; }
  .rate { padding: 11px 0 11px 20px; }
  .rate__name { font-size: 17px; }
  .rate__meta { font-size: 13.5px; }
  .rate__price { font-size: 30px; gap: 3px; }
  .rate__price small { font-size: 11px; }
  .rates__act { padding-top: 14px; gap: 12px; }
  .rates__phone { font-size: 17px; }

  .now-line { display: block; margin-top: 20px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }

  .sec, .cross { margin-top: 72px; }
  .rooms__line { display: none; }
  .rooms__grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .room__pics { aspect-ratio: auto; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto; gap: 6px; }
  .room__big { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 3 / 2; }
  .room__pics > .pic:not(.room__big) { aspect-ratio: 4 / 3; }
  .room .btn { align-self: stretch; }
  .room__spec { gap: 6px 22px; }
  .extra { grid-template-columns: minmax(0, 1fr); }

  .cross__stage { grid-template-columns: minmax(0, 1fr); height: auto; aspect-ratio: 4 / 5; }
  .cross__ph--city { display: none; }
  .cross__msg { font-size: 30px; padding: 0 16px; bottom: 18px; }
  .cross__cap { grid-template-columns: minmax(0, 1fr); }

  .atlas__grid { gap: 20px 8px; }
  .atlas__grid .pic { height: auto; }
  .atlas__a { grid-column: 1 / -1; grid-row: 1; }
  .atlas__a .pic { aspect-ratio: 3 / 2; }
  .atlas__b { grid-column: 1 / 7; grid-row: 2; }
  .atlas__e { grid-column: 7 / 13; grid-row: 2; }
  .atlas__b .pic, .atlas__e .pic { aspect-ratio: 3 / 4; }
  .atlas__c { grid-column: 1 / 7; grid-row: 3; }
  .atlas__d { grid-column: 7 / 13; grid-row: 3; }
  .atlas__c .pic, .atlas__d .pic { aspect-ratio: 4 / 3; }
  .atlas__grid figcaption { font-size: 11px; }

  .amen__list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .amen__list b { font-size: 17.5px; }
  .amen__pics { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 70%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--gut)); padding: 0 var(--gut) 6px; scrollbar-width: none; }
  .amen__pics::-webkit-scrollbar { display: none; }
  .amen__pics figure { scroll-snap-align: start; }
  .amen__pics figcaption { font-size: 11.5px; }

  .route__sum { grid-template-columns: minmax(0, 1fr) auto; cursor: pointer; padding: 16px 0 4px; }
  .route__sum .h2 { font-size: 30px; font-weight: 300; }
  .route__sum-ico { display: inline-grid; place-items: center; grid-row: 1 / 3; grid-column: 2; align-self: center; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 18px; transition: transform .3s var(--ease); }
  .route__box[open] .route__sum-ico { transform: rotate(45deg); }
  .route__sum-hint { font-size: 14.5px; }
  .route__in { margin-top: 20px; gap: 20px; }

  .form { padding: 18px 16px; }
  .form__room { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .form__row, .form__row--3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .form__row--3 .field:last-child { grid-column: 1 / -1; }
  .form__row:not(.form__row--3) { grid-template-columns: minmax(0, 1fr); }
  .form__foot .btn { width: 100%; }
  .card__actions, .card__actions .btn { width: 100%; }

  .facts div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .facts dd { font-size: 17.5px; }
  .map__box { height: 300px; }

  .foot__route { height: 96px; }
  .foot__line { right: 46px; }
  .foot__mark--a { left: 8%; }
  .foot__mark--b { right: 108px; }
  .sign { width: 92px; height: 92px; margin-top: -46px; font-size: 15px; }
  .foot__cta .btn { width: 100%; }
  .foot__cols { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .foot__cols p:last-child { text-align: left; }

  .dock {
    display: grid; grid-template-columns: 1fr 1fr; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    padding: 8px var(--gut) calc(8px + env(safe-area-inset-bottom)); gap: 8px;
    background: color-mix(in srgb, var(--bg) 94%, transparent); border-top: 1px solid var(--line);
    transition: transform .3s var(--ease), background-color .5s var(--ease);
  }
  @supports (backdrop-filter: blur(4px)) { .dock { backdrop-filter: blur(10px); } }
  .dock a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none; font: 500 16px/1 var(--f-sans); }
  .dock a .ph { font-size: 19px; }
  .dock .dock__main { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  .dock.is-away { transform: translateY(110%); }
}
@media (max-width: 359px) {
  .theme button { padding: 0 8px; }
  .logo__word { letter-spacing: .18em; margin-right: -.18em; }
}

/* иконки: свой SVG-спрайт /p66/icons.svg вместо шрифта Phosphor */
.ph { display: inline-flex; align-items: center; justify-content: center; font-style: normal; line-height: 1; }
.ph > .ic { width: 1em; height: 1em; fill: currentColor; flex: none; }
