/* Офис страхования 24/7 — стиль сайта */
:root {
  --black: #000;
  --white: #fff;
  --concrete: #E7E6E2;
  --board: #F4F4F2;
  --line: #D3D2CC;
  --orange: #F2661F;
  --graphite: #4A4A44;
  --f-display: "Fira Sans Extra Condensed", "Arial Narrow", sans-serif;
  --f-text: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1200px;
  --gut: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--black); font: 400 17px/1.55 var(--f-text); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--black); color: var(--white); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: calc(var(--wrap) + var(--gut) * 2); margin: 0 auto; padding: 0 var(--gut); }

/* Кнопки — мягкие, как кресла в офисе */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 22px; border-radius: 999px; border: 2px solid transparent; font: 600 16px/1.2 var(--f-text); text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; white-space: nowrap; }
.btn--lg { min-height: 54px; padding: 14px 28px; font-size: 17px; }
.btn--orange { background: var(--orange); color: var(--white); }
.btn--orange:hover { background: var(--black); color: var(--white); }
.btn--dark { background: var(--black); color: var(--white); }
.btn--dark:hover { background: var(--orange); color: var(--black); }
.btn--line { border-color: var(--black); color: var(--black); background: transparent; }
.btn--line:hover { background: var(--black); color: var(--white); }

/* Шапка */
.top { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo__mark { width: 38px; height: 38px; }
.logo__txt { font: 700 22px/1 var(--f-display); letter-spacing: .01em; }
.logo__txt b { margin-left: 6px; color: var(--orange); font-weight: 800; }
.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; font-size: 16px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--orange); }
.nav__tel { font-weight: 600 !important; }
.burger { display: none; }

/* Hero: стена-постер */
.hero { background: var(--concrete); padding: clamp(20px, 4vw, 48px) 0 clamp(36px, 5vw, 64px); }
.wall {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  column-gap: clamp(8px, 1.2vw, 18px);
  row-gap: 0;
  background: var(--board);
  border: 1px solid var(--line);
  padding: clamp(20px, 3vw, 44px) clamp(20px, 3.4vw, 52px);
  overflow: hidden;
}
.w { font-family: var(--f-display); font-weight: 700; line-height: .92; color: var(--black); text-transform: uppercase; text-decoration: none; letter-spacing: -.005em; }
a.w { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: .07em; text-underline-offset: .1em; transition: color .15s; }
a.w:hover { color: var(--orange); }
.w-col { display: flex; flex-direction: column; gap: .18em; writing-mode: vertical-rl; transform: rotate(180deg); justify-self: center; font-size: clamp(18px, 2.2vw, 30px); }
.w-small { font-family: var(--f-display); font-weight: 600; text-transform: uppercase; font-size: clamp(12px, 1.15vw, 16px); line-height: 1.25; color: var(--black); }

.w-dom     { grid-column: 1 / 4;  grid-row: 1; font-size: clamp(40px, 6vw, 84px); justify-self: end; }
.w-sport   { grid-column: 4 / 5;  grid-row: 1 / 3; }
.w-kasko   { grid-column: 5 / 8;  grid-row: 1; font-size: clamp(30px, 3.6vw, 52px); }
.w-osago   { grid-column: 5 / 9;  grid-row: 2; font-size: clamp(48px, 6.6vw, 96px); }
.w-rel     { grid-column: 9 / 10; grid-row: 1 / 3; font-size: clamp(16px, 1.8vw, 24px); }
.w-care    { grid-column: 10 / 13; grid-row: 1; }
.w-strah   { grid-column: 1 / 4;  grid-row: 2; font-size: clamp(20px, 2.5vw, 36px); justify-self: end; }
.w-zhizn   { grid-column: 1 / 4;  grid-row: 3 / 5; font-size: clamp(54px, 7.4vw, 108px); justify-self: end; }
.w-polis   { grid-column: 4 / 5;  grid-row: 3 / 6; font-size: clamp(36px, 4.6vw, 66px); writing-mode: vertical-rl; transform: rotate(180deg); justify-self: center; }
.w-247     { grid-column: 5 / 9;  grid-row: 3 / 5; font-size: clamp(96px, 14.5vw, 210px); font-weight: 800; color: var(--orange); text-decoration: none; letter-spacing: -.03em; line-height: .82; }
a.w-247:hover { color: var(--black); }
.w-kv      { grid-column: 9 / 10; grid-row: 3 / 5; font-size: clamp(18px, 2.2vw, 30px); writing-mode: vertical-rl; transform: rotate(180deg); justify-self: center; }
.w-ipoteka { grid-column: 10 / 13; grid-row: 2; font-size: clamp(28px, 3.4vw, 48px); }
.w-travel  { grid-column: 10 / 13; grid-row: 3; font-size: clamp(22px, 2.6vw, 38px); }
.w-klesh   { grid-column: 10 / 12; grid-row: 4; font-size: clamp(22px, 2.6vw, 38px); }
.w-riski   { grid-column: 2 / 4;  grid-row: 5; font-size: clamp(22px, 2.5vw, 36px); justify-self: end; }
.w-deti    { grid-column: 5 / 7;  grid-row: 5; font-size: clamp(26px, 3vw, 44px); }
.w-avto    { grid-column: 7 / 11; grid-row: 5; font-size: clamp(22px, 2.6vw, 38px); }
.w-garm    { grid-column: 2 / 7;  grid-row: 6; font-size: clamp(34px, 4.4vw, 64px); justify-self: end; }
.w-reg     { grid-column: 7 / 10; grid-row: 6; }

/* Косые полосы с постера */
.stripes { display: flex; gap: 14%; pointer-events: none; }
.stripes i { display: block; flex: 1; background: var(--orange); transform: skewX(-14deg); }
.stripes--wall { grid-column: 11 / 13; grid-row: 4 / 7; align-self: stretch; height: 100%; min-height: 150px; margin-right: 6%; }
.stripes--wall i:nth-child(1) { margin-top: 0; }
.stripes--wall i:nth-child(2) { margin-top: 18%; }
.stripes--wall i:nth-child(3) { margin-top: 34%; }

/* Появление стены — единственная анимация */
.js .wall .w, .js .wall .stripes { opacity: 0; }
.wall.is-on .w, .wall.is-on .stripes { animation: wall-in .5s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--i, 0) * 45ms); }
.wall.is-on .w-247 { animation-name: wall-247; animation-duration: .7s; }
.wall.is-done .w, .wall.is-done .stripes { opacity: 1; animation: none; }
@keyframes wall-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes wall-247 { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) {
  .js .wall .w, .js .wall .stripes { opacity: 1; }
  .wall.is-on .w, .wall.is-on .stripes { animation: none; }
  html { scroll-behavior: auto; }
}

.hero__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; margin-top: clamp(20px, 3vw, 36px); }
.hero__lead { max-width: 34em; margin: 0; font-size: clamp(17px, 1.6vw, 20px); color: var(--graphite); }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Заголовки секций */
.h2 { font: 700 clamp(34px, 4.6vw, 60px)/1 var(--f-display); margin: 0 0 clamp(20px, 3vw, 36px); letter-spacing: -.005em; }

/* Продукты — типографский список */
.products { padding: clamp(48px, 7vw, 96px) 0; }
.plist { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--black); }
.plist__row { border-bottom: 1px solid var(--line); }
.plist__row a { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) minmax(0, 3fr); align-items: center; gap: 8px 32px; padding: 28px 0; text-decoration: none; }
.plist__name { font: 700 clamp(30px, 3.6vw, 48px)/1 var(--f-display); transition: color .15s; }
.plist__desc { color: var(--graphite); }
.plist__price { text-align: right; font-weight: 600; white-space: nowrap; line-height: 1.3; }
.plist__name, .plist__price { transition: color .15s; }
.plist__row a:hover .plist__name, .plist__row a:hover .plist__sum { color: var(--orange); }

/* Шаги — настоящая последовательность */
.steps { background: var(--black); color: var(--white); padding: clamp(48px, 7vw, 96px) 0; }
.steps__list { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.steps__list li { counter-increment: s; display: grid; gap: 10px; align-content: start; }
.steps__list li::before { content: counter(s); font: 800 clamp(64px, 7vw, 96px)/.85 var(--f-display); color: var(--orange); }
.steps__list b { font: 700 28px/1.05 var(--f-display); }
.steps__list span { color: #C9C9C3; max-width: 30em; }

/* Офис */
.office { background: var(--concrete); padding: clamp(48px, 7vw, 96px) 0; }
.office__in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.office__photo { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; background: var(--line); }
.office__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 30% center; }
.office__dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0 0 28px; }
.office__dl dt { color: var(--graphite); }
.office__dl dd { margin: 0; font-weight: 500; }
.office__dl a { text-decoration-color: var(--orange); text-underline-offset: 3px; }
.office__cta { display: flex; gap: 10px; flex-wrap: wrap; }
.office__map { max-width: calc(var(--wrap) + var(--gut) * 2); margin: 32px auto 0; padding: 0 var(--gut); }
.office__map iframe { width: 100%; min-height: 380px; border: 0; }

/* Страница продукта */
.pg__head { position: relative; overflow: hidden; background: var(--concrete); padding: 28px 0 clamp(32px, 5vw, 56px); }
.crumbs { display: flex; gap: 8px; font-size: 15px; color: var(--graphite); margin-bottom: 18px; }
.crumbs a { color: var(--graphite); }
.pg__title { font: 800 clamp(56px, 9vw, 128px)/.9 var(--f-display); margin: 0; text-transform: uppercase; letter-spacing: -.01em; max-width: 11em; }
.pg__lead { font-size: clamp(18px, 1.8vw, 22px); color: var(--graphite); margin: 16px 0 0; max-width: 34em; }
.stripes--head { position: absolute; right: var(--gut); top: 0; bottom: 0; width: clamp(80px, 12vw, 170px); }
.calc { background: var(--concrete); padding-bottom: clamp(32px, 5vw, 56px); }
.calc__frame { position: relative; }
.pg__body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(28px, 5vw, 72px); padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(48px, 6vw, 80px); align-items: start; }
.prose { max-width: 38em; font-size: 18px; }
.prose p { margin: 0 0 1em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--orange); }
.ask { border-top: 6px solid var(--orange); background: var(--board); padding: 24px; display: grid; gap: 12px; position: sticky; top: 96px; }
.ask__price { font: 800 44px/1 var(--f-display); margin: 0; }
.ask__txt { margin: 0 0 6px; color: var(--graphite); }
.ask__tel { font-weight: 600; text-align: center; padding-top: 4px; }

.more { border-top: 1px solid var(--line); padding: 36px 0 56px; }
.more__h { font: 700 28px/1 var(--f-display); margin: 0 0 16px; }
.more__list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
.more__list a { padding: 8px 18px; border: 2px solid var(--black); border-radius: 999px; text-decoration: none; font-weight: 500; }
.more__list a:hover { background: var(--black); color: var(--white); }
.pg--404 { padding: clamp(48px, 8vw, 120px) 0; }
.pg--404 .pg__lead { margin-bottom: 24px; }

/* Подвал */
.foot { position: relative; overflow: hidden; background: var(--black); color: #D8D8D2; padding: 56px 0 40px; font-size: 15px; }
.foot__in { display: grid; grid-template-columns: 4fr 3fr 4fr; gap: 32px; position: relative; z-index: 1; }
.foot p { margin: 0 0 6px; }
.foot a { color: var(--white); text-decoration: none; }
.foot a:hover { color: var(--orange); }
.foot__name { font: 700 28px/1 var(--f-display); color: var(--white); margin-bottom: 14px !important; }
.foot__contacts { display: grid; gap: 6px; align-content: start; }
.foot__tel { font: 700 28px/1 var(--f-display); }
.foot__msg { display: flex; gap: 16px; margin-top: 6px; font-weight: 600; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 6px 18px; align-content: start; }
.foot__legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 16px 160px 0 0; color: #9C9C95; font-size: 14px; }
.foot__legal a { color: #9C9C95; text-decoration: underline; }
.stripes--foot { position: absolute; right: var(--gut); bottom: 0; height: 120px; width: 110px; opacity: .9; }

/* Мобильная панель связи и cookie */
.dock { display: none; }
.cookie { position: fixed; left: 16px; bottom: 16px; z-index: 60; max-width: 420px; display: flex; gap: 16px; align-items: center; background: var(--white); border: 2px solid var(--black); padding: 14px 16px; font-size: 15px; }
.cookie[hidden] { display: none; }
.cookie p { margin: 0; }

/* Планшет и меньше */
@media (max-width: 1023px) {
  .nav { position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--white); border-bottom: 2px solid var(--black); padding: 8px var(--gut) 16px; display: none; }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
  .top__cta { margin-left: auto; }
  .burger { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 0; }
  .burger span, .burger span::before, .burger span::after { display: block; width: 24px; height: 2px; background: var(--black); position: relative; transition: transform .2s; }
  .burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
  .burger span::before { top: -7px; }
  .burger span::after { top: 7px; }
  .burger[aria-expanded="true"] span { background: transparent; }
  .burger[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }
  .plist__row a { grid-template-columns: minmax(0, 1fr) auto; }
  .plist__desc { grid-column: 1 / -1; grid-row: 2; }
  .plist__price { grid-column: 2; grid-row: 1; }
  .office__in, .pg__body { grid-template-columns: 1fr; }
  .ask { position: static; }
  .foot__in { grid-template-columns: 1fr 1fr; }
}

/* Телефон: стена превращается в плотное облако слов */
@media (max-width: 759px) {
  body { font-size: 16px; padding-bottom: 76px; }
  .top__in { min-height: 60px; gap: 12px; }
  .nav { inset: 60px 0 auto 0; }
  .logo__txt { font-size: 19px; }
  .logo__mark { width: 32px; height: 32px; }
  .top__cta { display: none; }
  .burger { margin-left: auto; }
  .wall { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; gap: 4px 12px; padding: 20px 16px 24px; }
  .wall .w { font-size: 30px; writing-mode: horizontal-tb; transform: none; }
  .wall .w-osago, .wall .w-zhizn { font-size: 52px; }
  .wall .w-247 { font-size: 104px; order: -1; width: 100%; }
  .wall .w-col { flex-direction: row; gap: 12px; font-size: 22px; }
  .wall .w-small, .wall .w-strah, .wall .w-riski, .wall .w-garm, .wall .w-rel, .stripes--wall { display: none; }
  .hero__cta { width: 100%; }
  .hero__cta .btn { flex: 1 1 100%; }
  .plist__row a { padding: 20px 0; }
  .plist__price { font-size: 15px; }
  .steps__list { grid-template-columns: 1fr; gap: 28px; }
  .stripes--head { width: 60px; opacity: .9; }
  .pg__title { font-size: clamp(44px, 13vw, 64px); padding-right: 64px; overflow-wrap: anywhere; }
  .pg__lead { padding-right: 64px; }
  .foot__in { grid-template-columns: 1fr; }
  .stripes--foot { display: none; }
  .dock { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--line); }
  .dock .btn { flex: 1; padding: 10px 8px; font-size: 15px; }
  .cookie { left: 12px; right: 12px; bottom: 84px; max-width: none; }
}

/* Прелоадер виджетов: чёрный блок с полосами из логотипа, пока партнёрский iframe не отрисовался */
.calc__loader { display: none; }
.js .calc__frame.is-loading { min-height: 420px; }
.js .calc__frame.is-loading .calc__loader { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; background: var(--black); color: var(--white); }
.js .calc__frame.is-ready .calc__loader { position: absolute; inset: 0; z-index: 2; display: flex; background: var(--black); opacity: 0; transition: opacity .35s; pointer-events: none; }
.js .calc__frame.is-ready .calc__loader-text, .js .calc__frame.is-ready .loader { visibility: hidden; }
.js .calc__frame.is-loading .calc__widget { max-height: 420px; overflow: hidden; opacity: 0; pointer-events: none; }
.calc__widget { transition: opacity .35s; }
.calc__loader-text { font: 600 18px/1 var(--f-display); letter-spacing: .02em; }
.loader { display: flex; align-items: flex-end; gap: 12px; height: 64px; }
.loader i { display: block; width: 16px; height: 64px; background: var(--orange); transform: skewX(-14deg) scaleY(.3); transform-origin: bottom; animation: loader-bar 1.2s ease-in-out infinite; }
.loader i:nth-child(2) { animation-delay: .15s; }
.loader i:nth-child(3) { animation-delay: .3s; }
@keyframes loader-bar { 0%, 100% { transform: skewX(-14deg) scaleY(.3); } 40% { transform: skewX(-14deg) scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  .loader i { animation: none; transform: skewX(-14deg) scaleY(.7); }
  .calc__widget, .js .calc__frame.is-ready .calc__loader { transition: none; }
}

/* Список продуктов: сумма и пометка «Калькулятор онлайн» / «Оформить онлайн» */
.plist__price { display: grid; justify-items: end; gap: 8px; }
.plist__sum { display: block; }
.plist__tag { display: inline-block; padding: 5px 14px; border: 1.5px solid var(--orange); border-radius: 999px; color: var(--orange); font-size: 14px; font-weight: 600; line-height: 1.2; transition: background-color .15s, color .15s; }
.plist__row a:hover .plist__tag { background: var(--orange); color: var(--white); }
.products--page { padding-top: clamp(24px, 4vw, 48px); }
@media (max-width: 759px) { .foot__legal { padding-right: 0; } }

/* Шапка на узких десктопах: пункты меню в одну строку, телефон есть в подвале и на нижней панели */
.nav a { white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1199px) { .nav__tel { display: none; } }
