/* =========================================================
   Rinnai Service — style.css  (редизайн v3)
   Брендбук: белый / #F7F7F8, Rinnai Red #CF000E точечно,
   серые полосы (Bar) #C2C8CF и #CECCBE, Arial.
   Идея: полоса (Bar) — главный структурный элемент. Секции
   строятся на асимметричной сетке «заголовок слева — содержание
   справа», без карточек и теней.
   ========================================================= */

:root {
    --red:        #CF000E;
    --red-dark:   #A8000B;
    --white:      #FFFFFF;
    --gray-bg:    #FFFFFF;   /* фон чередующихся блоков: по решению заказчика белый (было #F7F7F8) */
    --bar-1:      #C2C8CF;
    --bar-2:      #CECCBE;
    --line:       #E3E5E8;
    --ink:        #1F2328;
    --ink-2:      #5B5F66;
    --font:       "Neue Haas Grotesk", Arial, Helvetica, sans-serif;
    --container:  1180px;
    --bar:        8px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background-color: var(--white);
}

h1, h2, h3, h4 { font-family: var(--font); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.text-rinnai-red { color: var(--red); }

.visually-hidden {
    position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}
.visually-hidden:focus { left: 16px; top: 16px; width: auto; height: auto; padding: 8px 12px; background: var(--white); z-index: 100; }

/* ---------- Полосы ---------- */
.bar { height: var(--bar); border: 0; margin: 0; background-color: var(--bar-1); }
.bar--2 { background-color: var(--bar-2); }
.bar--thin { height: 3px; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 22px;
    font: inherit; font-weight: 700; font-size: 15px;
    border: 2px solid transparent; cursor: pointer; white-space: nowrap;
    transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background-color: var(--red); color: var(--white); border-color: var(--red); }
.btn-primary:hover { background-color: var(--red-dark); border-color: var(--red-dark); }
.btn-outline { background-color: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background-color: var(--ink); color: var(--white); }

/* ---------- Шапка ---------- */
.site-header { background-color: var(--white); position: sticky; top: 0; z-index: 50; }
.site-header__inner { display: flex; align-items: center; gap: 32px; height: 76px; }
/* Логотип: Rinnai красным 36px по брендбуку, «Сервис» тем же кеглем чёрным,
   между ними фирменная серая полоса; под ними — подпись «Официальная сервисная служба» */
.logo { display: grid; grid-template-columns: auto auto; column-gap: 12px; align-items: baseline; line-height: 1; }
.logo__brand { font-weight: 700; font-size: 36px; color: var(--red); letter-spacing: -0.02em; }
.logo__suffix { font-weight: 700; font-size: 26px; color: var(--ink); letter-spacing: -0.01em; padding-left: 12px; border-left: 3px solid var(--bar-1); }
.logo__tag { grid-column: 1 / -1; font-size: 11.5px; color: var(--ink-2); margin-top: 6px; letter-spacing: 0.01em; }
.main-nav { list-style: none; display: flex; gap: 28px; }
.main-nav a { font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--red); }
.main-nav__accent { color: var(--red); font-weight: 700; }
nav[data-main-nav] { margin-left: auto; }
.site-header__actions { display: flex; align-items: center; gap: 20px; }
.header-phone { font-weight: 700; font-size: 16px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--ink); }

/* ---------- Первый экран: фото слева целиком, текст справа на белом — без наложений ---------- */
.hero { display: grid; grid-template-columns: 55% 1fr; min-height: calc(100vh - 84px); }
.hero__media { position: relative; min-height: 480px; }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.hero__inner { display: flex; align-items: center; padding: 64px 48px 64px 56px; }
.hero__content { max-width: 520px; }
.hero__official { font-size: 18px; font-weight: 700; margin-bottom: 20px; padding-left: 18px; border-left: var(--bar) solid var(--red); line-height: 1.3; }
.hero__title { font-size: clamp(36px, 3.8vw, 52px); line-height: 1.05; letter-spacing: -0.025em; }
.hero__text { font-size: 17px; color: var(--ink-2); max-width: 46ch; margin-top: 22px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__phone { margin-top: 32px; padding-top: 18px; border-top: 3px solid var(--bar-2); }
.hero__phone-k { font-size: 14px; color: var(--ink-2); }
.hero__phone-v { display: block; font-size: 26px; font-weight: 700; margin-top: 6px; letter-spacing: -0.01em; line-height: 1.2; }
.hero__phone-v:hover { color: var(--red); }

/* ---------- Цифры под первым экраном ---------- */
.facts-band { background-color: var(--gray-bg); }
.facts { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); }
.fact { padding: 28px 24px 28px 0; border-left: var(--bar) solid var(--bar-1); padding-left: 22px; }
.fact + .fact { margin-left: 24px; }
.fact__value { display: block; font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.fact__label { display: block; font-size: 15px; color: var(--ink-2); margin-top: 10px; }

/* ---------- Широкая фотополоса: фото слева целиком, подпись справа ---------- */
.photo-wide { display: grid; grid-template-columns: 1fr 1fr; background-color: var(--white); }
.photo-wide__media { position: relative; min-height: 420px; }
.photo-wide__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.photo-wide__inner { display: flex; align-items: center; padding: 48px 48px 48px 56px; }
.photo-wide__text { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; line-height: 1.2; max-width: 20ch; letter-spacing: -0.02em; padding-left: 20px; border-left: var(--bar) solid var(--red); }

/* ---------- Секции: заголовок слева, содержание справа ---------- */
.section { padding: 88px 0; }
.section--gray { background-color: var(--gray-bg); }
.section__grid { display: grid; grid-template-columns: 300px 1fr; gap: 64px; align-items: start; }
.section__aside { position: sticky; top: 100px; }
.section__title { font-size: 30px; letter-spacing: -0.02em; line-height: 1.15; }
.section__img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background-color: var(--white); margin-top: 28px; border-top: 3px solid var(--bar-2); }
.section__title::after { content: ""; display: block; width: 56px; height: var(--bar); background-color: var(--bar-1); margin-top: 18px; }

/* Преимущества: две колонки, разделённые линиями */
.benefits { list-style: none; display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
.benefit { padding: 24px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 44px 1fr; gap: 16px; }
.benefit:nth-child(-n+2) { border-top: 0; padding-top: 0; }
.benefit .icon { width: 30px; height: 30px; color: var(--red); margin-top: 2px; }
.benefit__title { font-size: 18px; }
.benefit__text { font-size: 15px; color: var(--ink-2); margin-top: 6px; }

/* Услуги: список, крупные названия */
.services { list-style: none; }
.service { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: baseline; padding: 22px 0; border-top: 1px solid var(--line); }
.service:first-child { border-top: 0; padding-top: 0; }
.service__title { font-size: 22px; font-weight: 700; }
.service__title::before { content: ""; display: inline-block; width: 10px; height: 10px; background-color: var(--red); margin-right: 14px; vertical-align: 2px; }
.service__short { font-size: 15px; color: var(--ink-2); }
.section__note { font-size: 15px; color: var(--ink-2); margin-top: 28px; padding-top: 20px; border-top: var(--bar) solid var(--bar-2); }

/* Раскрывающиеся списки (рекомендации, вопросы) */
.acc { border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 32px; gap: 24px; align-items: start; padding: 22px 0; }
.acc__summary::-webkit-details-marker { display: none; }
.acc__title { font-size: 20px; font-weight: 700; line-height: 1.25; }
.acc__short { font-size: 15px; color: var(--ink-2); margin-top: 6px; max-width: 64ch; }
.acc__mark { width: 32px; height: 32px; position: relative; margin-top: 2px; }
.acc__mark::before, .acc__mark::after { content: ""; position: absolute; background-color: var(--red); left: 50%; top: 50%; transform: translate(-50%, -50%); }
.acc__mark::before { width: 18px; height: 3px; }
.acc__mark::after { width: 3px; height: 18px; transition: transform .15s; }
.acc__item[open] .acc__mark::after { transform: translate(-50%, -50%) rotate(90deg); }
.acc__body { padding: 0 56px 26px 0; font-size: 15.5px; line-height: 1.65; max-width: 68ch; }
.acc__body p + p { margin-top: 12px; }
.acc--faq .acc__summary { padding: 18px 0; }
.acc--faq .acc__title { font-size: 17px; }

/* ---------- Контакты ---------- */
.contacts { background-color: var(--white); padding: 80px 0; }
.contacts__grid { display: grid; grid-template-columns: 300px 1fr 1fr; gap: 48px; align-items: start; }
.contacts__title { font-size: 30px; letter-spacing: -0.02em; }
.contacts__title::after { content: ""; display: block; width: 56px; height: var(--bar); background-color: var(--bar-1); margin-top: 18px; }
.contacts__lead { font-size: 15px; color: var(--ink-2); margin-top: 18px; max-width: 30ch; }
.contacts__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.contacts__actions .btn { min-height: 44px; padding: 0 18px; }
.contact-list { list-style: none; }
.contact-list li { padding: 14px 0; border-top: 1px solid var(--bar-1); font-size: 15px; }
.contact-list li:first-child { border-top: 0; padding-top: 0; }
.contact-list__k { display: block; font-size: 13px; color: var(--ink-2); }
.contact-list__v { display: block; font-weight: 700; font-size: 17px; margin-top: 2px; }
.contact-list a:hover { color: var(--red); }
.contacts__map { border: 1px solid var(--bar-1); min-height: 320px; background-color: var(--white); overflow: hidden; }
.contacts__map--widget { border: 0; min-height: 0; }
.contacts__map--widget iframe { width: 100% !important; display: block; }
.contacts__map img { max-width: none; }

/* ---------- Подвал ---------- */
.site-footer { padding: 22px 0; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13.5px; color: var(--ink-2); }
.footer-bottom a:hover { color: var(--red); }

/* ---------- Политика ---------- */
.legal-page { max-width: 760px; }
.legal-page h1 { font-size: 34px; margin-bottom: 24px; }
.legal-page h2 { font-size: 20px; margin: 32px 0 10px; }
.legal-page p, .legal-page li { font-size: 15.5px; line-height: 1.65; margin-bottom: 12px; }
.legal-page ul { padding-left: 20px; }
.legal-page a { text-decoration: underline; }
.breadcrumbs { font-size: 13.5px; color: var(--ink-2); margin-bottom: 24px; }
.breadcrumbs span[aria-hidden] { margin: 0 8px; }
.breadcrumbs a:hover { color: var(--red); }

/* ---------- Доступность ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--red); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1000px) {
    .header-phone { display: none; }
    .hero { grid-template-columns: 1fr 1fr; min-height: 0; }
    .hero__inner { padding: 40px 24px 40px 32px; }
    .section__grid, .contacts__grid { grid-template-columns: 1fr; gap: 32px; }
    .section__aside { position: static; display: grid; grid-template-columns: 1fr 200px; gap: 24px; align-items: end; }
    .section__img { margin-top: 0; }
    .contacts__map { min-height: 280px; }
}
@media (max-width: 760px) {
    .site-header__inner { gap: 16px; }
    .logo__brand { font-size: 30px; }
    .logo__suffix { font-size: 22px; }
    .site-header__actions .btn { display: none; }
    .nav-toggle { display: block; }
    nav[data-main-nav] { display: none; position: absolute; left: 0; right: 0; top: 76px; background: var(--white); border-top: var(--bar) solid var(--bar-1); border-bottom: 1px solid var(--line); padding: 8px 24px 16px; }
    nav[data-main-nav].is-open { display: block; }
    .main-nav { flex-direction: column; gap: 0; }
    .main-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
    .hero { grid-template-columns: 1fr; }
    .hero__media { min-height: 260px; }
    .hero__inner { padding: 32px 24px 40px; }
    .photo-wide { grid-template-columns: 1fr; }
    .photo-wide__media { min-height: 240px; }
    .photo-wide__inner { padding: 28px 24px 36px; }
    .facts { grid-template-columns: 1fr; }
    .fact { padding: 18px 0 18px 18px; }
    .fact + .fact { margin-left: 0; border-top: 1px solid var(--line); }
    .fact__value { font-size: 32px; }
    .section { padding: 52px 0; }
    .section__aside { grid-template-columns: 1fr; }
    .section__img { max-width: 260px; margin-top: 20px; }
    .contacts { padding: 52px 0; }
    .benefits { grid-template-columns: 1fr; }
    .benefit:nth-child(2) { border-top: 1px solid var(--line); padding-top: 24px; }
    .service { grid-template-columns: 1fr; gap: 6px; }
    .acc__body { padding-right: 0; }
}

/* Карта: подпись над меткой и блок-заглушка без ключа */
.map-card { width: 220px; background: var(--white); border-top: 4px solid var(--red); padding: 12px 14px; font-size: 13px; line-height: 1.4; box-shadow: 0 2px 8px rgba(31,35,40,.15); }
.map-card strong { display: block; font-size: 13.5px; margin-bottom: 4px; }
.map-card span { display: block; color: var(--ink-2); }
.map-card a { display: inline-block; margin-top: 8px; color: var(--red); font-weight: 700; }
.contacts__map--static { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 32px; background-color: var(--gray-bg); }
.contacts__map-k { font-size: 13px; color: var(--ink-2); }
.contacts__map--static strong { font-size: 18px; line-height: 1.3; }
.contacts__map--static .btn { align-self: flex-start; margin-top: 8px; }

/* ---------- Страница «Осторожно» ---------- */
.page-title { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.025em; max-width: 20ch; }
.page-intro { font-size: 17px; color: var(--ink-2); max-width: 66ch; margin-top: 20px; line-height: 1.6; }
.page-intro--tight { margin-top: 0; margin-bottom: 20px; font-size: 15.5px; }
.benefit--nomark { grid-template-columns: 1fr; }
.check-list { list-style: none; max-width: 66ch; }
.check-list li { position: relative; padding: 10px 0 10px 28px; border-top: 1px solid var(--line); font-size: 15.5px; line-height: 1.5; }
.check-list li:first-child { border-top: 0; padding-top: 0; }
.check-list li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 7px; height: 13px; border: solid var(--red); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.check-list li:first-child::before { top: 6px; }
.section__note a { color: var(--red); font-weight: 700; }
.site-list { list-style: none; max-width: 66ch; }
.site-list__item { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); }
.site-list__url { font-weight: 700; font-size: 16px; }
.site-list__note { font-size: 14px; color: var(--ink-2); }
