@font-face {
  font-family: "Onest";
  src: url("/fonts/onest-cyrillic.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  src: url("/fonts/onest-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  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: #ffffff;
  --bg-alt: #f2f6f9;
  --ink: #0c1a28;
  --muted: #4a5a6a;
  --line: #d9e2ea;
  --accent: #1458c6;
  --accent-hover: #0f479f;
  --accent-soft: #e6eefb;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(12 26 40 / 6%), 0 8px 24px -12px rgb(12 26 40 / 18%);
  --header-h: 68px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 "Onest", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 650; }
h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

.icon { width: 1.15em; height: 1.15em; flex: none; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.skip { position: absolute; left: 12px; top: -100px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: var(--radius-sm); }
.skip:focus { top: 12px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font-family: inherit; font-size: 16px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--ink); }
.btn .icon:last-child:not(:first-child) { transition: transform .2s var(--ease); }
.btn:hover .icon:last-child:not(:first-child) { transform: translateX(3px); }

/* ---------- шапка ---------- */
.header { position: sticky; top: 0; z-index: 20; background: rgb(255 255 255 / 96%); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 32px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; }
.logo-mark { width: 28px; height: 28px; color: var(--accent); }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; transition: color .2s; }
.nav a:hover { color: var(--ink); }
.header-phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.header-phone .icon { color: var(--accent); }
.menu-toggle { display: none; }

/* ---------- первый экран ---------- */
.hero { position: relative; isolation: isolate; min-height: min(calc(100svh - var(--header-h)), 760px); display: flex; align-items: center; overflow: hidden; }
.hero-image, .hero-image img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { z-index: -2; }
.hero-image img { object-fit: cover; object-position: 70% 40%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgb(255 255 255 / 94%) 0%, rgb(255 255 255 / 82%) 34%, rgb(255 255 255 / 0%) 62%);
}
.hero-content { padding-block: 64px; }
.hero h1 { font-size: clamp(40px, 5.6vw, 72px); font-weight: 700; letter-spacing: -0.035em; max-width: 11ch; }
.hero-lead { margin-top: 20px; font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 30ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.facts { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 10px; font-size: 16px; font-weight: 500; }
.facts li { display: flex; align-items: center; gap: 10px; }
.facts .icon { color: var(--accent); }

/* ---------- разделы ---------- */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 48px; margin-bottom: 36px; }
.section-head p { color: var(--muted); max-width: 46ch; }
.note { margin-top: 24px; font-size: 15px; color: var(--muted); max-width: 70ch; }

/* ---------- каталог ---------- */
.area-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.area-filter button {
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 500; line-height: 1; color: var(--ink); background: #fff; border: 1.5px solid var(--line);
  transition: border-color .2s, background-color .2s, color .2s;
}
.area-filter button:hover { border-color: var(--ink); }
.area-filter button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.product { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .25s var(--ease), border-color .25s; }
.product:hover { box-shadow: var(--shadow); border-color: #c8d4df; }
.product[hidden] { display: none; }
.product-photo { aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 20px 28px; background: linear-gradient(180deg, #f7fafc, #edf3f8); }
.product-photo img { max-height: 100%; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.product-nophoto .logo-mark { width: 48px; height: 48px; color: #b9c8d6; }
.product-body { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 22px; flex: 1; }
.product-desc { color: var(--muted); font-size: 15px; }
.variants { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.variants legend { padding: 0; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.variants label { position: relative; }
.variants input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.variants span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); font-size: 15px; font-weight: 500; transition: border-color .15s, background-color .15s;
}
.variants label:hover span { border-color: #9fb0c0; }
.variants input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); }
.variants input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.product-buy { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.btn-order { min-height: 46px; padding: 0 20px; }

/* ---------- монтаж ---------- */
.service { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; }
.service-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 18px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; color: var(--muted); }
.steps li p { padding-top: 6px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.steps b { display: block; color: var(--ink); font-weight: 600; }
.service-block .note { margin-top: 0; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.ticks li { display: flex; gap: 12px; }
.ticks .icon { color: var(--accent); margin-top: 3px; }
.service-block .btn { margin-top: 4px; }

/* ---------- работы ---------- */
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.work { padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 5; background: var(--bg-alt); }
.work img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.work:hover img { transform: scale(1.03); }

.lightbox { padding: 0; border: 0; background: transparent; max-width: min(92vw, 900px); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgb(8 16 26 / 88%); }
.lightbox img { max-height: 88vh; width: auto; margin: 0 auto; border-radius: var(--radius-sm); }
.lightbox-close { position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 0; background: #fff; color: var(--ink); cursor: pointer; }
.lightbox-close .icon { width: 22px; height: 22px; }

/* ---------- вопросы ---------- */
.faq { margin-top: 28px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; font-size: 18px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; margin-top: 6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: translateY(5px) rotate(225deg); }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 66ch; }

/* ---------- контакты ---------- */
.contacts { background: var(--ink); color: #fff; }
.contacts p { color: #b7c4d1; margin-top: 16px; max-width: 42ch; }
.contacts-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px 64px; align-items: end; }
.contact-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.contact-phone { font-size: clamp(30px, 4vw, 44px); font-weight: 700; letter-spacing: -0.02em; text-decoration: none; }
.contact-phone:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.contacts .btn-primary { background: #fff; color: var(--ink); }
.contacts .btn-primary:hover { background: #dfe8f1; }
.socials { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.socials a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #d6e0ea; text-decoration: none; }
.socials a:hover { color: #fff; text-decoration: underline; }
.contacts :focus-visible { outline-color: #fff; }

.footer { background: var(--ink); color: #8a9bab; border-top: 1px solid rgb(255 255 255 / 10%); font-size: 15px; }
.footer-row { display: flex; justify-content: space-between; gap: 16px; padding-block: 24px; }
.footer a { text-decoration: none; }
.callbar { display: none; }

/* ---------- планшет и телефон ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .header-phone { margin-left: auto; }
  .service { grid-template-columns: minmax(0, 1fr); }
  .contacts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --header-h: 60px; }
  body { font-size: 16px; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .header-row { gap: 12px; }
  .header-phone { display: none; }
  .menu-toggle {
    display: grid; place-items: center; margin-left: auto; width: 44px; height: 44px;
    border: 1.5px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer;
  }
  .menu-toggle .icon { width: 20px; height: 20px; }
  .nav.open {
    display: flex; flex-direction: column; gap: 0; position: absolute; left: 0; right: 0; top: var(--header-h);
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 16px; box-shadow: var(--shadow);
  }
  .nav.open a { padding: 14px 0; font-size: 18px; color: var(--ink); border-bottom: 1px solid var(--line); }
  .nav.open a:last-child { border-bottom: 0; }

  .hero { flex-direction: column-reverse; align-items: stretch; min-height: 0; }
  .hero::before { display: none; }
  .hero-image { position: relative; inset: auto; height: auto; aspect-ratio: 4 / 3; z-index: 0; }
  .hero-image img { object-position: 68% 45%; }
  .hero-content { padding-block: 28px 32px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .facts { font-size: 15px; margin-top: 28px; }

  .section-head { margin-bottom: 24px; }
  .area-filter { flex-wrap: nowrap; overflow-x: auto; margin-inline: -20px; padding-inline: 20px; scrollbar-width: none; }
  .area-filter button { flex: none; }
  .products { grid-template-columns: 1fr; }
  .works { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .faq summary { font-size: 17px; }
  .contact-actions .btn { align-self: stretch; }
  .footer-row { flex-direction: column; }

  .callbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid var(--line);
  }
  .callbar a {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px;
    border-radius: 999px; font-weight: 600; text-decoration: none; border: 1.5px solid var(--line);
  }
  .callbar a:last-child { background: var(--accent); border-color: var(--accent); color: #fff; }
}
