/* ═══ 28.10 МОБАЙЛ-ПОЛИРОВКА главной (только локально; копия до правок — ../_edinyi_v1_bak_mob_2810).
   Подключается последним. ПК (> 640 px) не меняется, кроме общих мелочей ниже (dvh, «О нас»). ═══ */

/* iOS: 100vh = окно БЕЗ адресной строки (на ~90 точек выше видимого) → блоки выше экрана. dvh = innerHeight, как в hero.js */
.site-shell { min-height: 100vh; min-height: 100dvh; }
.cinema-scroll { height: calc(100vh + 700px); height: calc(100dvh + 700px); }
.stage { height: 100vh; height: 100dvh; }
.sheet-card { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
html, body { touch-action: manipulation; }        /* двойной тап не зумит (iOS), щипок и прокрутка остаются */

/* контакты-иконки (телефон / WhatsApp / Telegram) — только телефон, на ПК скрыты */
.mob-ik { display: none; }

/* ── «О нас» (onas.js): лист поверх главной, контент — с боевого korenskaya_cinema (раздел «О нас») ── */
.onas {
  position: fixed; inset: 0; z-index: 48; display: grid; place-items: center; padding: 16px;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 360ms ease, visibility 0s 360ms;
}
.onas[data-открыт] { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 360ms ease; }
.onas-veil { position: absolute; inset: 0; background: rgba(9, 7, 5, 0.86); }
.onas-card {
  position: relative; width: min(620px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: clamp(24px, 3.4vh, 38px) clamp(22px, 3vw, 40px) clamp(22px, 3vh, 32px);
  background: #15110e; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5);
  color: var(--text); text-align: left;
}
.onas-card h2 { margin: 10px 0 0; font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 3vw, 2.5rem); line-height: 1; letter-spacing: 0.12em; color: var(--paper); }
.onas .persona { display: flex; gap: 16px; align-items: flex-start; margin-top: 20px; }
.onas .persona-photo { width: 88px; height: 118px; flex: none; object-fit: cover; object-position: 50% 12%; border-radius: 12px; display: block; background: #241c15; }
.onas .persona-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.onas .persona-text b { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; line-height: 1.05; color: var(--paper); }
.onas .persona-text span { font-size: 0.875rem; line-height: 1.45; color: rgba(232, 226, 216, 0.76); }
.onas .persona-text q { font-size: 0.875rem; line-height: 1.5; color: rgba(243, 239, 232, 0.86); font-style: italic; }
.onas-lead { margin: 18px 0 0; font-size: 1rem; line-height: 1.55; color: rgba(243, 239, 232, 0.86); }
.onas-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 22px 0 0; }
.onas-stats div { border-top: 1px solid var(--line); padding-top: 10px; }
.onas-stats dt { font-family: var(--serif); font-size: 1.7rem; line-height: 1; color: var(--paper); font-variant-numeric: lining-nums; }
.onas-stats dd { margin: 6px 0 0; font-size: 0.8rem; line-height: 1.35; color: rgba(232, 226, 216, 0.7); }
.onas-trust { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.onas-trust li { display: grid; gap: 2px; font-size: 0.9rem; line-height: 1.45; color: rgba(232, 226, 216, 0.76); }
.onas-trust b { font-weight: 500; color: var(--paper); }
.onas-kanaly { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.onas-kanaly a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: 0.9rem; text-decoration: none; color: var(--paper); transition: background-color 200ms ease, border-color 200ms ease; }
.onas-kanaly a:hover, .onas-kanaly a:focus-visible { border-color: var(--brass); background: rgba(176, 141, 87, 0.14); }
.onas-kanaly a:active { background: rgba(176, 141, 87, 0.28); }
.onas-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.onas-cta .btn { min-height: 48px; }
.onas-close {
  position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 999px; cursor: pointer;
  font-size: 1.4rem; line-height: 1; color: rgba(243, 239, 232, 0.75); border: 1px solid var(--line);
}
.onas-close:hover, .onas-close:focus-visible { color: var(--paper); border-color: var(--line-strong); }

/* ════════════════════════ ТЕЛЕФОН ≤ 640 px ════════════════════════ */
@media (max-width: 640px) {
  /* stage был min-height 640 → на 320×568 низ кадра уходил за экран и появлялась лишняя прокрутка */
  .stage { min-height: 0; }

  /* шапка: safe-area сверху/по бокам (вырез iPhone), меню и контакты видны сразу (hero.js nadpisi: на телефоне всегда) */
  .site-header {
    padding: max(14px, calc(env(safe-area-inset-top) + 6px)) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
    row-gap: 6px; column-gap: 8px;
  }
  /* скрытый (visibility) логотип шапки занимал ~170 px в колонке сетки и выталкивал иконки за край на 320–360 */
  .site-logo { display: none; }
  .site-header { grid-template-columns: minmax(0, 1fr) auto auto; }
  .site-nav { justify-self: center; max-width: 100%; }
  .site-contact { gap: 8px; }
  .site-contact .site-phone, .site-contact .btn { display: none; }
  .mob-ik {
    display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex: none;
    border: 1px solid rgba(214, 190, 150, 0.55); color: #f0d9ac; background: rgba(20, 15, 11, 0.46);
    box-shadow: 0 0 14px rgba(236, 200, 146, 0.16); -webkit-tap-highlight-color: transparent;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
  }
  .mob-ik svg { width: 20px; height: 20px; fill: currentColor; }
  .mob-ik:active { background: rgba(176, 141, 87, 0.5); border-color: rgba(255, 226, 176, 0.9); transform: scale(0.94); }
  .mob-ik:focus-visible { outline: 2px solid rgba(255, 231, 190, 0.8); outline-offset: 2px; }
  .noch-knopka { width: 44px; height: 44px; }
  .noch-knopka .ik { width: 20px; height: 20px; margin: -10px 0 0 -10px; }
  .noch-knopka:active { transform: scale(0.94); }

  /* меню: строкой, зона нажатия 44 px по высоте */
  .site-nav { gap: 20px; }
  .site-nav a { font-size: 0.875rem; letter-spacing: 0.07em; padding: 0 2px; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent; }
  .site-nav a + a::before { left: -13px; }
  .site-nav a:active { color: #ffe9c4; }

  /* титр ниже двух рядов шапки (на 568 px высоты 19vh = 108 px — налезал на меню) */
  .hero-title { top: max(19vh, 150px); top: max(19dvh, 150px); }
  /* KORENSKAYA: минимум 2,9rem был шире экрана на 320–380 — слово рвалось «KORENSKAY / A» */
  .hero-word { font-size: clamp(2rem, 12vw, 13.6rem); white-space: nowrap; }
  .scroll-hint { bottom: calc(16px + env(safe-area-inset-bottom)); }
  .villa-badge { bottom: calc(12px + env(safe-area-inset-bottom)); }

  /* лист заявки: снизу, высота по видимой области, отступ под «домашнюю» полоску iPhone, крестик 44 */
  .sheet-card { max-height: 92vh; max-height: 92dvh; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .sheet-close { width: 44px; height: 44px; top: 10px; right: 10px; }
  .sheet-lead { font-size: 0.95rem; }
  .sheet-or { font-size: 0.875rem; }
  .field span { font-size: 0.75rem; }
  .field input, .field textarea { font-size: 16px; min-height: 44px; }   /* < 16 px — iOS зумит страницу при фокусе */
  .sheet-note { font-size: 0.8rem; }
  .channels--лист a { min-height: 44px; display: inline-flex; align-items: center; }

  /* «О нас» на телефоне — лист снизу, как заявка */
  .onas { padding: 0; align-items: end; }
  .onas-card { width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 22px 22px 0 0;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
  .onas-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .onas-cta .btn { flex: 1 1 auto; }

  /* «Строительство»: кнопки и «Пропустить» — 44 px, отступ под домашнюю полоску */
  .st-btn { min-height: 48px; }
  .pr-skip { min-height: 44px; bottom: calc(18px + env(safe-area-inset-bottom)); }
  .st-txt { top: 36vh; top: 36dvh; }
}
@media (max-width: 360px) {
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 0.8125rem; letter-spacing: 0.05em; }
  .site-nav a + a::before { left: -10px; }
}
/* 320: меню 13 px не влезало в строку (уезжало за край вместе с иконками — overflow у .stage прятал это от проверки) */
@media (max-width: 340px) {
  .site-nav { gap: 12px; }
  .site-nav a { font-size: 0.75rem; letter-spacing: 0.02em; }
  .site-nav a + a::before { left: -8px; width: 3px; height: 3px; margin-top: -1.5px; }
  .onas-stats dt { font-size: 1.45rem; }
}
/* иконки контактов скрыты до показа шапки (как телефон/«Связаться» в villa.css); на телефоне hero.js показывает шапку сразу */
html:not([data-nadpisi]) .mob-ik { opacity: 0; }

/* ═══ 28.10 mob2 — 2-й проход (копия mob.css.bak_mob2_2810): шапка по центру (ось с KORENSKAYA), мягкая подложка под шапкой
   на светлом небе, «О нас» — ритм и кегли (текст ≥ 15, подписи ≥ 12), выезд листа снизу. ПК не меняется (всё ≤ 640). ═══ */
@media (max-width: 640px) {
  /* шапка: иконки и меню — по одной оси с титром (было: иконки прижаты вправо, меню по центру — две разные оси) */
  .site-header { grid-template-columns: 1fr auto auto 1fr; grid-template-areas: ". noch contact ." "nav nav nav nav"; row-gap: 4px; }
  .site-nav { justify-self: center; }
  .site-contact { justify-self: center; }
  /* мягкая подложка: светлое небо Усадьбы под белыми иконками/меню (только градиент, без blur) */
  .world .site-header::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(150px + env(safe-area-inset-top)); z-index: -1; pointer-events: none;
    background: linear-gradient(180deg, rgba(14, 10, 7, 0.38), rgba(14, 10, 7, 0.16) 55%, rgba(14, 10, 7, 0));
  }
  .site-nav a { text-shadow: 0 1px 10px rgba(10, 7, 4, 0.45); }
  .mob-ik, .noch-knopka { transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease, opacity 300ms ease; }

  /* «О нас»: лист выезжает снизу (transform), отступы по сетке 20 px, текст ≥ 15 px */
  .onas-card { padding: 26px 20px calc(24px + env(safe-area-inset-bottom)); transform: translateY(28px); transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1); }
  .onas[data-открыт] .onas-card { transform: none; }
  .onas-card::before { content: ""; position: absolute; left: 50%; top: 8px; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: rgba(232, 226, 216, 0.22); }
  .onas .eyebrow { font-size: 0.75rem; letter-spacing: 0.22em; }
  .onas-card h2 { margin-top: 8px; padding-right: 52px; font-size: 2rem; }
  .onas-close { top: 14px; right: 14px; }
  /* персона: фото | имя и роль, цитата — во всю ширину под ними (на 320–390 колонка текста была 180 px — 9 строк) */
  .onas .persona { display: grid; grid-template-columns: 84px minmax(0, 1fr); column-gap: 16px; row-gap: 14px; align-items: center; margin-top: 22px; }
  .onas .persona-text { display: contents; }
  .onas .persona-photo { grid-column: 1; grid-row: 1 / 3; width: 84px; height: 112px; align-self: start; }
  .onas .persona-text b { grid-column: 2; grid-row: 1; align-self: end; font-size: 1.45rem; }
  .onas .persona-text span { grid-column: 2; grid-row: 2; align-self: start; font-size: 0.9375rem; line-height: 1.45; }
  .onas .persona-text q { grid-column: 1 / -1; grid-row: 3; margin: 2px 0 0; padding-left: 14px; border-left: 1px solid rgba(176, 141, 87, 0.55);
    font-family: var(--serif); font-size: 1.125rem; line-height: 1.45; }
  .onas-lead { margin-top: 22px; font-size: 1rem; line-height: 1.6; }
  .onas-stats { gap: 16px 18px; margin-top: 24px; }
  .onas-stats dt { font-size: 1.85rem; }
  .onas-stats dd { font-size: 0.8125rem; }
  .onas-trust { gap: 14px; margin-top: 26px; }
  .onas-trust li { font-size: 0.9375rem; }
  .onas-kanaly { gap: 8px; margin-top: 26px; }
  .onas-kanaly li { flex: 1 1 calc(50% - 4px); }
  .onas-kanaly a { width: 100%; justify-content: center; min-height: 48px; font-size: 0.9375rem; -webkit-tap-highlight-color: transparent; }
  .onas-cta { margin-top: 18px; }
  .onas-cta .btn { width: 100%; justify-content: center; }
}
@media (max-width: 340px) {
  .onas .persona { grid-template-columns: 72px minmax(0, 1fr); column-gap: 14px; }
  .onas .persona-photo { width: 72px; height: 96px; }
  .onas-card h2 { font-size: 1.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .onas-card { transform: none !important; }
}
@media (max-width: 640px) {
  .villa-badge { font-size: 12px; letter-spacing: 0.12em; }   /* плашка прототипа (в пакет выкладки не идёт) */
  .st-eyebrow { font-size: 0.75rem; }                       /* «Строительство»: подпись 11,5 → 12 px */
}
