/* ==========================================================================
   Awaryjne otwieranie drzwi — styles
   Flat, mobile-first. Палитра: фон #F4F4F1, графит #24262B, серый #6B6E75, акцент #F2B705
   ========================================================================== */
/* Шрифт Inter — локально (assets/fonts), без Google Fonts */
@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/inter-cyrillic-ext-wght-normal.woff2) format('woff2-variations'), url(fonts/inter-cyrillic-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/inter-cyrillic-wght-normal.woff2) format('woff2-variations'), url(fonts/inter-cyrillic-wght-normal.woff2) format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations'), url(fonts/inter-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/inter-latin-wght-normal.woff2) format('woff2-variations'), url(fonts/inter-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --bg: #F4F4F1;
  --ink: #24262B;
  --muted: #6B6E75;
  --accent: #F2B705;
  --accent-hover: #E0A800;
  --line: #DEDED8;
  --plate: #E8E8E2;
  --on-ink-muted: #C3C5CA;
  --ok: #1E9E57;
  --white: #FFFFFF;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter Variable", Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
svg { display: block; flex: 0 0 auto; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

/* ---------- Первый экран ---------- */
.wrap { max-width: 560px; margin: 0 auto; padding: 16px 20px 0; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px;
  border-radius: 999px; background: var(--white); border: 1px solid var(--line);
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px #D7F0E1; }

/* Переключатель языка: мобильный — выпадающий список, десктоп — сегменты */
.lang { position: relative; z-index: 40; }
.lang-seg { display: none; }
.lang-drop summary {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  height: 44px; min-width: 64px; padding: 0 10px 0 12px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--muted);
  font-size: 13px; font-weight: 600; letter-spacing: .04em; cursor: pointer;
  list-style: none; user-select: none;
}
.lang-drop summary::-webkit-details-marker { display: none; }
.lang-menu {
  position: absolute; top: 50px; right: 0; width: 212px; padding: 6px;
  background: var(--white); border: 1px solid var(--ink); border-radius: 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.lang-menu a { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.lang-menu a:hover { background: var(--bg); }
.lang-menu .code { width: 24px; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.lang-menu .name { flex: 1 1 auto; }
.lang-menu a[aria-current="page"] { background: var(--ink); color: var(--white); }
.lang-menu a[aria-current="page"] .code { color: var(--white); }

main h1 { margin-top: 16px; font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.sub { margin-top: 12px; font-size: 16px; line-height: 1.45; color: var(--muted); }

.phone-card { margin-top: 22px; background: var(--ink); border-radius: 18px; padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.phone-card p { font-size: 14px; line-height: 1.4; color: var(--on-ink-muted); }
.phone-num { color: var(--accent); font-size: clamp(26px, 8.6vw, 36px); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.phone-num:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.btn-call {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 60px; padding: 0 14px; border-radius: 12px;
  background: var(--accent); color: var(--ink); font-size: 18px; font-weight: 700; text-align: center;
}
.btn-call:hover { background: var(--accent-hover); }
.btn-call--hero { margin-top: 12px; }

.write { margin: 22px 0 10px; font-size: 15px; font-weight: 600; }
.msgs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.msg {
  min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 52px; border-radius: 12px; background: var(--white); border: 1px solid var(--ink);
  font-size: 14px; font-weight: 600;
}
.msg svg { width: 20px; height: 20px; }
.msg:hover { background: var(--bg); }

/* SMS — только на телефонах и планшетах (класс ставит скрипт в <head>). Viber есть и на ПК (Viber Desktop). */
.dev-desktop .mobile-only { display: none !important; }

.trust { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.trust li { display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.3; font-weight: 600; }

/* ---------- Услуги ---------- */
.services { padding: 56px 20px; }
.services-inner { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: 72px; }
.svc { display: flex; flex-wrap: wrap; align-items: stretch; gap: 28px 48px; }
.svc--rev { flex-direction: row-reverse; }
.svc-art {
  flex: 1 1 340px; min-height: 180px; padding: 16px; border-radius: 20px; background: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.svc-art svg { width: 80%; max-width: 360px; height: auto; }
.svc-body { flex: 1.4 1 420px; min-width: 0; display: flex; flex-direction: column; }
.svc h2 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.svc-desc { margin-top: 12px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.svc-lists { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px 28px; }
.svc-lists h3 { margin-bottom: 12px; font-size: 13px; line-height: 1.3; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.checks { display: flex; flex-direction: column; gap: 10px; }
.checks li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.4; font-weight: 500; }
.tick { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: var(--ink); display: flex; align-items: center; justify-content: center; }

.svc-actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.price { display: inline-flex; align-items: baseline; gap: 6px; padding: 12px 18px; border-radius: 12px; background: var(--plate); white-space: nowrap; }
.price-from { font-size: 15px; font-weight: 600; }
.price-num { font-size: 28px; line-height: 1.1; font-weight: 800; letter-spacing: -.01em; }
.price-cur { font-size: 17px; font-weight: 700; }
.svc-cta { flex: 1 1 360px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn-call--svc { flex: 1 1 200px; min-height: 56px; font-size: 17px; white-space: nowrap; }
.btn-call--svc svg { width: 20px; height: 20px; }
.round-msgs { display: flex; gap: 6px; }
.round { color: var(--ink); width: 44px; height: 44px; border-radius: 50%; background: var(--white); border: 1px solid var(--ink); display: flex; align-items: center; justify-content: center; }
.round:hover { background: var(--bg); }

/* ---------- Зона выезда (карта) ---------- */
.area { max-width: 1040px; margin: 0 auto; padding: 0 20px 56px; }
.area-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.area h2 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.area-text { font-size: 16px; line-height: 1.5; color: var(--muted); }
.map { position: relative; height: 300px; border-radius: 20px; overflow: hidden; background: var(--plate); border: 1px solid var(--line); z-index: 0; }
.map-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.map.is-ready .map-fallback { display: none; }
.map .leaflet-tile-pane { filter: grayscale(1) contrast(.92) brightness(1.03); }
.map .leaflet-control-attribution { font-size: 11px; background: rgba(255,255,255,.85); }
.map .leaflet-control-zoom a { color: var(--ink); }
@media (min-width: 641px) { .map { height: 420px; } }

/* ---------- FAQ ---------- */
.faq { max-width: 1040px; margin: 0 auto; padding: 0 20px 56px; }
.faq h2 { margin-bottom: 20px; font-size: clamp(26px, 3.2vw, 36px); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 14px 16px; font-size: 16px; line-height: 1.35; font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary svg { color: var(--muted); transition: transform .15s; }
.faq-item[open] summary svg { transform: rotate(180deg); }
.faq-item p { padding: 0 16px 16px; font-size: 15px; line-height: 1.55; color: var(--muted); }
@media (min-width: 641px) { .faq-item summary { padding: 16px 20px; font-size: 17px; } .faq-item p { padding: 0 20px 18px; font-size: 16px; } }

/* ---------- Футер ---------- */
.footer { max-width: 1040px; margin: 0 auto; padding: 24px 20px 40px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.footer strong { font-weight: 600; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.footer-row a { color: var(--ink); font-weight: 600; }
.footer-links a { text-decoration: underline; text-underline-offset: 3px; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Sticky-кнопка (только телефон) ---------- */
.sticky { display: none; }
@media (max-width: 640px) {
  body { padding-bottom: 80px; }
  .sticky {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; align-items: center; gap: 12px;
    padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--line);
  }
  .js .sticky:not(.is-visible) { display: none; }
  .sticky-num { flex: 1 1 auto; min-width: 0; font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sticky-btn { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 16px; border-radius: 12px; background: var(--accent); font-size: 17px; font-weight: 700; }
  .sticky-btn svg { width: 20px; height: 20px; }
}

/* ---------- Узкие телефоны ---------- */
@media (max-width: 389px) {
  main h1 { font-size: 31px; }
  .msg { font-size: 13px; }
  .sticky { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .sticky-num { font-size: 15px; }
  .sticky-btn { padding: 0 12px; gap: 6px; font-size: 15px; }
  .sticky-btn svg { width: 18px; height: 18px; }
}

/* ---------- Десктоп ---------- */
@media (min-width: 641px) {
  .wrap { padding-top: 64px; }
  .lang-drop { display: none; }
  .lang-seg { display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
  .lang-seg a { display: flex; align-items: center; justify-content: center; min-width: 40px; height: 32px; padding: 0 8px; border-radius: 7px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .04em; }
  .lang-seg a:hover { color: var(--ink); background: #E9E9E4; }
  .lang-seg a[aria-current="page"] { background: var(--ink); color: var(--white); font-weight: 700; }
  .badge { height: 34px; padding: 0 14px; }
  main h1 { margin-top: 24px; font-size: 52px; line-height: 1.06; letter-spacing: -.025em; }
  .sub { margin-top: 16px; font-size: 18px; line-height: 1.5; }
  .phone-card { margin-top: 32px; padding: 28px 28px 24px; border-radius: 20px; gap: 8px; }
  .phone-card p { font-size: 15px; }
  .phone-num { font-size: 48px; line-height: 1.08; letter-spacing: -.015em; }
  .btn-call--hero { margin-top: 14px; min-height: 64px; font-size: 19px; gap: 12px; }
  .write { margin: 28px 0 12px; font-size: 16px; }
  .msgs { gap: 12px; }
  .dev-desktop .msgs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .msg { height: 56px; font-size: 16px; gap: 10px; }
  .msg svg { width: 24px; height: 24px; }
  .trust { margin-top: 36px; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 16px 24px; }
  .trust li { flex: 1 1 140px; flex-direction: row; align-items: center; gap: 10px; font-size: 15px; }
  .services { padding-top: 96px; }
}

/* ---------- 404 ---------- */
.notfound { padding-top: 64px; padding-bottom: 64px; }
.notfound h1 { font-size: 52px; font-weight: 800; }
.nf-links { margin: 24px 0; display: flex; flex-wrap: wrap; gap: 8px 16px; font-weight: 600; }
.nf-links a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Политика конфиденциальности ---------- */
.legal { padding-top: 32px; padding-bottom: 64px; }
.legal h1 { font-size: 32px; line-height: 1.15; font-weight: 800; margin: 16px 0 8px; }
.legal h2 { font-size: 19px; font-weight: 700; margin: 28px 0 8px; }
.legal p, .legal li { font-size: 15px; line-height: 1.6; color: var(--ink); }
.legal ul { list-style: disc; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal .back { font-weight: 600; }
.legal mark { background: #FFE58A; padding: 0 3px; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
