/* «Крыша без снега». Направление: спокойная служба безопасности зимой. Ночной графит, лёд, сигнальный жёлтый как на каске.
   Фирменная деталь: «снеговая линейка», деления как на измерительном шесте (под заголовками, на первом экране, в квизе). */
@font-face { font-family: "Inter"; src: url("fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --brand: #0f1f2b;
  --brand-dark: #0a1620;
  --brand-soft: #f1f5f8;
  --white: #ffffff;
  --hv: #ffc400;
  --btn-bg: #ffc400;
  --btn-bg-hover: #ffd23d;
  --btn-fg: #0f1f2b;
  --ice: #cfe3f2;
  --ice-2: #9ec3de;
  --signal: #c8321a;
  --text: #14202a;
  --muted: #4f6071;
  --line: #d9e2ea;
  --radius: 6px;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --tick: #14202a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--body); font-size: 17px; line-height: 1.55; color: var(--text); background: var(--white); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 600; line-height: 1.15; letter-spacing: -.015em; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
:focus-visible { outline: 3px solid var(--hv); outline-offset: 2px; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border: 2px solid transparent;
  border-radius: var(--radius); font: 600 16px/1 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn-call { background: var(--btn-bg); color: var(--btn-fg); }
.btn-call:hover { background: var(--btn-bg-hover); }
.btn-max { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .55); }
.btn-max:hover { border-color: var(--hv); }
.btn-max-dark { background: var(--brand); color: var(--white); }
.btn-max-dark:hover { background: #1b3243; }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: var(--white); }
.btn-small { min-height: 42px; padding: 0 16px; font-size: 15px; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* шапка: телефон всегда на виду */
.header { position: sticky; top: 0; z-index: 10; background: var(--brand); color: var(--white); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.header .container { width: min(1320px, calc(100% - 32px)); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 68px; }
.brand { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.brand img { height: 46px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-item { color: var(--ice); text-decoration: none; font-size: 15px; font-weight: 600; padding: 8px 10px; border-bottom: 2px solid transparent; }
.nav-item:hover { color: var(--white); }
.nav-item[aria-current="page"] { color: var(--white); border-bottom-color: var(--hv); }
.nav-contact { display: none; }
.header-contacts { display: flex; align-items: center; gap: 16px; }
.header-phone { color: var(--white); font-weight: 600; font-size: 19px; text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.header-phone:hover { color: var(--hv); }
.menu-btn { display: none; align-items: center; gap: 10px; height: 44px; padding: 0 14px; background: transparent; color: var(--white); border: 2px solid rgba(255, 255, 255, .35);
  border-radius: var(--radius); font: 600 15px var(--body); cursor: pointer; }
.menu-icon { width: 18px; height: 2px; background: currentColor; box-shadow: 0 -6px currentColor, 0 6px currentColor; }

/* первый экран */
.hero { position: relative; background: var(--brand); color: var(--white); padding: 52px 0 92px; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 20px;
  background: repeating-linear-gradient(90deg, var(--hv) 0 3px, transparent 3px 10px) left bottom / 100% 9px no-repeat,
              repeating-linear-gradient(90deg, var(--hv) 0 3px, transparent 3px 50px) left bottom / 100% 20px no-repeat; }
.hero-row { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.06; letter-spacing: -.025em; max-width: 14em; }
.hero .lead { margin-top: 20px; font-size: 19px; color: var(--ice); max-width: 32em; }
.hero-price { margin-top: 22px; padding-left: 14px; border-left: 4px solid var(--hv); font-weight: 600; font-size: 16px; color: var(--hv); font-variant-numeric: tabular-nums; max-width: 34em; }
.hero-media { position: relative; padding-left: 30px; }
.hero-media::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 22px;
  background: repeating-linear-gradient(0deg, var(--hv) 0 3px, transparent 3px 12px) right center / 11px 100% no-repeat,
              repeating-linear-gradient(0deg, var(--hv) 0 3px, transparent 3px 60px) right center / 22px 100% no-repeat; }
.hero-photo { width: 100%; height: auto; aspect-ratio: 4 / 5; max-height: 560px; object-fit: cover; border-radius: 4px; }
.page-hero { padding: 40px 0 84px; }

/* блоки */
.section { padding: 76px 0; }
.section-soft { background: var(--brand-soft); }
.section h2, .cta h2 { font-size: clamp(25px, 3vw, 36px); max-width: 24em; }
.section h2::after, .cta h2::after { content: ""; display: block; width: 120px; height: 16px; margin-top: 16px;
  background: repeating-linear-gradient(90deg, var(--tick) 0 3px, transparent 3px 8px) left bottom / 100% 8px no-repeat,
              repeating-linear-gradient(90deg, var(--tick) 0 3px, transparent 3px 40px) left bottom / 100% 16px no-repeat; }
.lead-dark { margin-top: 14px; font-size: 19px; color: var(--muted); max-width: 40em; }
.note { margin-top: 20px; color: var(--muted); max-width: 46em; }
.small { font-size: 14px; color: var(--muted); }
.soft-cta { margin-top: 26px; color: var(--muted); }
.soft-cta a, .note a, .prose a, details a { color: var(--brand); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--ice-2); }
.soft-cta a:hover, .note a:hover, .prose a:hover, details a:hover { border-bottom-color: var(--brand); }
.prose { max-width: 720px; }
.prose p { margin-top: 14px; }

.cards { display: grid; gap: 16px; margin-top: 30px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: var(--radius); padding: 22px; }
.card-accent { border-top-color: var(--hv); }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--muted); }
.card p a { color: var(--brand); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--ice-2); }

.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 30px; }
.steps li { border-top: 4px solid var(--brand); padding-top: 18px; }
.steps b { display: block; font-size: 34px; line-height: 1; font-weight: 600; color: var(--brand); margin-bottom: 12px; }
.steps h3 { font-size: 20px; margin-bottom: 8px; }
.steps p { color: var(--muted); }

.why { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 30px; }
.why li { border-left: 4px solid var(--hv); padding: 2px 0 2px 16px; }
.why b { display: block; font-size: 19px; line-height: 1.25; margin-bottom: 4px; }
.why span { color: var(--muted); font-size: 16px; }

.price-list { list-style: none; margin-top: 26px; max-width: 860px; }
.price-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.price-list span { flex: 1; }
.price-list b { white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }

.check-list { list-style: none; margin-top: 18px; }
.check-list li { position: relative; padding-left: 30px; margin: 12px 0; }
.check-list li::before { content: ""; position: absolute; left: 5px; top: .5em; width: 10px; height: 10px; background: var(--hv); border: 2px solid var(--brand); transform: rotate(45deg); }
.num-list { list-style: none; counter-reset: n; margin-top: 18px; }
.num-list li { counter-increment: n; position: relative; padding-left: 46px; margin: 16px 0; }
.num-list li::before { content: counter(n); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; display: grid; place-items: center; background: var(--brand); color: var(--white); border-radius: 4px; font-weight: 600; }
.page-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }

details { border-bottom: 1px solid var(--line); max-width: 860px; }
details:first-of-type { margin-top: 26px; border-top: 1px solid var(--line); }
summary { position: relative; list-style: none; cursor: pointer; padding: 19px 40px 19px 0; font-weight: 600; font-size: 18px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 28px; font-weight: 400; line-height: 1; transition: transform .2s; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { padding: 0 0 20px; color: var(--muted); max-width: 46em; }

/* калькулятор: тёмный блок захвата, прогресс как линейка */
.calc-row { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.quiz.card { background: var(--brand); color: var(--white); border: 0; border-top: 4px solid var(--hv); padding: 28px; }
.quiz p { color: var(--ice); }
.quiz h3 { font-size: 23px; margin: 6px 0 12px; }
.quiz-progress { height: 10px; background: rgba(255, 255, 255, .12); border-radius: 2px; overflow: hidden; }
.quiz-progress span { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--hv) 0 6px, #e6af00 6px 8px); transition: width .25s; }
.quiz-step { margin-top: 16px; font-size: 14px; color: var(--ice-2); }
.quiz-hint { margin-bottom: 14px; font-size: 15px; color: #b9cfe0; }
.quiz-options { display: grid; gap: 10px; }
.quiz-opt { min-height: 54px; padding: 12px 16px; text-align: left; border: 2px solid rgba(255, 255, 255, .28); border-radius: var(--radius); background: transparent; color: var(--white); font: 600 16px/1.3 var(--body); cursor: pointer; }
.quiz-opt:hover, .quiz-opt:focus-visible { border-color: var(--hv); background: rgba(255, 196, 0, .1); }
.quiz-nav { margin-top: 18px; }
.quiz-back { background: none; border: 0; padding: 8px 0; color: #b9cfe0; font: 15px var(--body); cursor: pointer; }
.quiz-back:hover { color: var(--white); }
.quiz-slider { display: grid; gap: 12px; margin: 20px 0 6px; }
.quiz-slider input { width: 100%; accent-color: var(--hv); height: 28px; }
.quiz-slider output { font-size: 32px; font-weight: 600; color: var(--hv); font-variant-numeric: tabular-nums; }
.quiz-price { margin: 8px 0; font-size: 46px; font-weight: 600; color: var(--hv); font-variant-numeric: tabular-nums; line-height: 1.1; }
.quiz .btn-max-dark { background: transparent; border-color: rgba(255, 255, 255, .55); }
.quiz .btn-max-dark:hover { border-color: var(--hv); }

/* призыв и контакты */
.cta { position: relative; background: var(--brand); color: var(--white); padding: 72px 0; text-align: center; }
.cta h2 { margin: 0 auto; --tick: var(--hv); }
.cta h2::after { margin-left: auto; margin-right: auto; }
.cta .cta-note { margin-top: 14px; font-size: 18px; color: var(--ice); }
.cta .buttons { justify-content: center; }
.contacts-row { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.contacts-phone { display: inline-block; margin: 14px 0 4px; font-size: clamp(30px, 4.2vw, 46px); font-weight: 600; letter-spacing: -.02em; color: var(--brand); text-decoration: none; font-variant-numeric: tabular-nums; }
.contacts-logo { width: 240px; height: auto; }
.zone-text p { margin-top: 14px; max-width: 46em; }
.zone-text a { color: var(--brand); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--ice-2); }

/* подвал */
.footer { background: var(--brand-dark); color: #b9cfe0; padding: 44px 0 28px; }
.footer-row { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; }
.footer-logo { height: 72px; width: auto; }
.footer-name { color: var(--white); font-weight: 600; font-size: 19px; margin-bottom: 4px; }
.footer-nav { margin-top: 10px; font-size: 15px; }
.footer-nav a, .footer-legal a { color: var(--ice); text-decoration: none; }
.footer-nav a:hover, .footer-legal a:hover { color: var(--hv); }
.footer-actions { display: grid; gap: 10px; min-width: 270px; }
.foot-btn { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; border: 2px solid rgba(255, 255, 255, .22); border-radius: var(--radius); color: var(--white); font-weight: 600; text-decoration: none; }
.foot-btn:hover { border-color: var(--hv); }
.foot-ico { width: 20px; height: 20px; fill: currentColor; flex: none; }
.footer-legal { display: grid; gap: 4px; margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; color: #8fa7ba; }

/* нижняя панель на телефоне */
.mobile-bar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--brand); box-shadow: 0 -8px 24px rgba(0, 0, 0, .28); }
.mobile-bar .btn { flex: 1; }
.mobile-bar .btn-max { flex: .6; }

/* окно «Отправить фото крыши» */
.photo-dialog { border: 0; border-radius: 10px; padding: 26px; width: min(460px, calc(100% - 24px)); max-height: calc(100% - 24px); margin: auto; overflow: auto; color: var(--text); }
.photo-dialog::backdrop { background: rgba(10, 22, 32, .72); }
.photo-dialog form { display: grid; gap: 14px; position: relative; }
.photo-dialog h3 { font-size: 22px; padding-right: 30px; }
.dialog-close { position: absolute; right: -6px; top: -10px; width: 40px; height: 40px; border: 0; background: none; font-size: 30px; line-height: 1; color: var(--muted); cursor: pointer; }
.photo-dialog label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.photo-dialog input[type="text"], .photo-dialog input[type="tel"], .photo-dialog textarea { width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius); font: 400 16px var(--body); }
.photo-dialog input:focus, .photo-dialog textarea:focus { border-color: var(--brand); outline: none; }
.file-pick { position: relative; padding: 16px; text-align: center; border: 2px dashed var(--ice-2); border-radius: 8px; cursor: pointer; background: var(--brand-soft); }
.file-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.form-preview { display: flex; flex-wrap: wrap; gap: 8px; }
.form-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.photo-dialog .consent { grid-template-columns: 22px 1fr; align-items: start; gap: 10px; font-weight: 400; font-size: 14px; color: var(--muted); }
.photo-dialog .consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); }
.photo-dialog .btn { width: 100%; }
.form-status { min-height: 1.3em; font-size: 14px; }
.form-status.ok { color: #1b7a3d; }
.form-status.err { color: var(--signal); }

/* служебные страницы (политика, согласие, 404, спасибо) */
main.container, .legal { padding-top: 48px; padding-bottom: 72px; }
main.container h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 18px; }
main.container h2 { font-size: 22px; margin-top: 28px; }
main.container p, main.container ul { margin-top: 12px; max-width: 760px; }
main.container ul { padding-left: 22px; }

/* куки (показывается только когда у сайта есть свой счётчик) */
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 640px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  background: var(--white); color: var(--text); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 34px rgba(0, 0, 0, .22); padding: 16px 18px; }
.cookie-bar p { flex: 1 1 260px; font-size: 14px; }
.cookie-buttons { display: flex; gap: 10px; }

/* планшет и телефон */
@media (max-width: 1180px) {
  .site-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .header-contacts { margin-left: auto; }
  body.menu-open { overflow: hidden; }
  body.menu-open .site-nav { display: flex; position: fixed; inset: 0; z-index: 30; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    padding: 90px 24px 120px; overflow-y: auto; background: var(--brand-dark); animation: nav-in .2s ease-out; }
  body.menu-open .nav-item { font-size: 22px; padding: 10px 14px; }
  body.menu-open .nav-contact { display: grid; gap: 12px; justify-items: center; margin-top: 22px; }
  body.menu-open .nav-small { color: var(--ice); }
  body.menu-open .nav-phone { color: var(--hv); font-weight: 600; text-decoration: none; }
  body.menu-open .brand, body.menu-open .menu-btn, body.menu-open .header-contacts { position: relative; z-index: 31; }
  body.menu-open .mobile-bar { display: none; }
}
@keyframes nav-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 960px) {
  .hero { padding: 36px 0 76px; }
  .hero-row, .calc-row, .page-split, .contacts-row { grid-template-columns: 1fr; gap: 32px; }
  .hero-media { padding-left: 24px; max-width: 460px; }
  .hero-photo { max-height: 380px; }
  .cards-3, .cards-2, .steps, .why { grid-template-columns: 1fr 1fr; }
  .footer-row { grid-template-columns: 1fr; }
  .contacts-logo { width: 200px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; padding-bottom: 76px; }
  .mobile-bar { display: flex; }
  .header-row { min-height: 60px; gap: 10px; }
  .brand img { height: 38px; }
  .header-phone { font-size: 16px; }
  .header-contacts .btn { display: none; }
  .menu-label { display: none; }
  .menu-btn { padding: 0 12px; }
  .section { padding: 56px 0; }
  .hero h1 { font-size: 32px; }
  .hero .lead { font-size: 17px; }
  .lead-dark { font-size: 17px; }
  .cards-3, .cards-2, .steps, .why { grid-template-columns: 1fr; }
  .buttons .btn { flex: 1 1 100%; }
  .price-list li { flex-direction: column; gap: 2px; align-items: flex-start; }
  .price-list b { text-align: left; }
  .quiz.card { padding: 20px; }
  .quiz-price { font-size: 38px; }
  .cookie-bar { bottom: 88px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* структурные метки */
.hero-text { min-width: 0; }
.zone { display: block; }
.contacts { background: var(--brand-soft); }
