/* File: assets/css/style.css */

/* Шрифт Onest: файлы догружаются отдельно (см. assets/fonts/README.txt).
   Пока их нет, используется fallback-стек системных шрифтов. */
@font-face {
  font-family: 'Onest';
  src: url('../fonts/Onest-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Onest';
  src: url('../fonts/Onest-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --plaster: #F3F5F4;
  --ink: #1B2733;
  --plumb: #F4B400;
  --concrete: #D3D8D6;
  --slate: #51606E;
  --paper: #FFFFFF;
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --maxw: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--plaster);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--plumb);
  outline-offset: 2px;
}
h1, h2, h3 { font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 8vw, 4rem); }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.25rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code { background: rgba(27,39,51,.08); padding: .1em .35em; border-radius: 3px; font-size: .9em; }
.muted { color: var(--slate); font-size: .9rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--plumb); color: var(--ink); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.lead { font-size: 1.15rem; max-width: 36rem; color: var(--slate); }
.lead-sm { max-width: 38rem; opacity: .85; }

/* Кнопки */
.btn { display: inline-block; padding: .85rem 1.5rem; font: inherit; font-weight: 700; text-decoration: none; border: 2px solid var(--ink); border-radius: 4px; cursor: pointer; }
.btn-primary { background: var(--plumb); border-color: var(--plumb); color: var(--ink); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: transparent; color: var(--ink); }

/* Шапка */
.site-header { background: var(--paper); border-bottom: 2px solid var(--ink); position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.brand img { border-radius: 8px; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: transparent; border: 2px solid var(--ink); border-radius: 4px; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; content: ''; }
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }
.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 2px solid var(--ink); padding: 1rem 1.25rem 1.25rem; }
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.site-nav li a { display: block; padding: .6rem 0; text-decoration: none; font-weight: 700; border-bottom: 1px solid var(--concrete); }
.site-nav li a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--plumb); padding-left: .75rem; }
.header-phone { font-weight: 700; text-decoration: none; }

/* Герой */
.hero { padding: 3rem 0 2.5rem; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.plumb { display: none; justify-self: center; align-self: start; margin-top: -3rem; }
.plumb svg { overflow: visible; }
.plumb-swing { transform-origin: 60px 0; animation: swing 4.5s ease-out 1 both; }
@keyframes swing {
  0% { transform: rotate(14deg); }
  20% { transform: rotate(-9deg); }
  40% { transform: rotate(5deg); }
  60% { transform: rotate(-2.5deg); }
  80% { transform: rotate(1deg); }
  100% { transform: rotate(0); }
}

/* Секции */
.section { padding: 3rem 0; }
.section-dark { background: var(--ink); color: var(--plaster); }
.section-dark a { color: var(--plumb); }
.section-dark code { background: rgba(255,255,255,.12); }
.section-accent { background: var(--plumb); }
.page-head { padding: 2.5rem 0 .5rem; }
.page-head h1 { font-size: clamp(2rem, 7vw, 3.25rem); }

/* Список услуг */
.rows { list-style: none; margin: 1.5rem 0 0; padding: 0; border-top: 2px solid var(--ink); }
.rows li { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem 0; border-bottom: 1px solid var(--concrete); }
.rows h3 { margin-bottom: .25em; }
.rows p { margin: 0; color: var(--slate); max-width: 34rem; }
.rows li > a { font-weight: 700; text-decoration: none; white-space: nowrap; border-bottom: 3px solid var(--plumb); align-self: flex-start; }
.rows li > a:hover { background: var(--plumb); }

/* Галерея */
.gallery { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.75rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.gallery figcaption { padding-top: .5rem; font-size: .9rem; opacity: .85; }

/* Этапы (настоящая последовательность — нумерация оправдана) */
.steps { list-style: none; counter-reset: step; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.5rem; }
.steps li { counter-increment: step; position: relative; padding-left: 3.25rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.25rem; height: 2.25rem; display: grid; place-items: center; background: var(--ink); color: var(--plumb); font-weight: 700; border-radius: 50%; }
.steps p { margin: 0; color: var(--slate); }

.cta h2 { max-width: 30rem; }
.cta p { max-width: 32rem; }

/* Прайс */
.price-group { margin-bottom: 2.5rem; }
.price { width: 100%; border-collapse: collapse; background: var(--paper); }
.price th, .price td { padding: .8rem .9rem; text-align: left; border-bottom: 1px solid var(--concrete); vertical-align: top; }
.price thead th { background: var(--ink); color: var(--paper); font-size: .9rem; }
.price td:last-child { white-space: nowrap; font-weight: 700; }
.price td:nth-child(2) { color: var(--slate); white-space: nowrap; }
.table-scroll { overflow-x: auto; }

/* Калькулятор */
.calc-wrap { display: grid; gap: 1.5rem; }
.calc { background: var(--paper); color: var(--ink); padding: 1.5rem; border-radius: 4px; max-width: 28rem; }
.calc label { display: block; font-weight: 700; margin-bottom: .3rem; }
.calc select, .calc input { width: 100%; font: inherit; padding: .7rem .8rem; margin-bottom: 1rem; border: 2px solid var(--ink); border-radius: 4px; background: var(--paper); color: var(--ink); }
.calc-result { font-size: 1.15rem; }
.calc-result strong { font-size: 1.5rem; }

/* О себе */
.about-grid, .contact-grid { display: grid; gap: 2rem; }
.prose { max-width: 40rem; }
.prose h2 { margin-top: 1.5em; font-size: 1.5rem; }
.prose h2:first-child { margin-top: 0; }
.facts { background: var(--paper); padding: 1.5rem; border-left: 6px solid var(--plumb); align-self: start; }
.facts dl, .contact-info dl { margin: 0; }
.facts dt, .contact-info dt { font-size: .85rem; color: var(--slate); margin-top: .9rem; }
.facts dd, .contact-info dd { margin: 0; font-weight: 700; font-size: 1.1rem; }
.contact-info dd a { text-decoration-thickness: 2px; text-decoration-color: var(--plumb); }
.contact-form { min-width: 0; }
#yandex-form-placeholder { min-height: 320px; width: 100%; border: 2px dashed var(--concrete); background: var(--paper); }
#yandex-form-placeholder iframe { width: 100%; border: 0; }

/* Подвал */
.site-footer { background: var(--ink); color: var(--plaster); padding: 2.5rem 0 1rem; font-size: .95rem; }
.site-footer a { color: inherit; }
.footer-grid { display: grid; gap: 1.75rem; }
.footer-brand { font-size: 1.25rem; font-weight: 700; margin-bottom: .25rem; }
.footer-title { font-weight: 700; color: var(--plumb); margin-bottom: .4rem; }
.site-footer .muted { color: #A9B4BE; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: .15rem 0; }
.footer-bottom { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.18); color: #A9B4BE; }
.footer-bottom p { margin: 0; }

/* Планшет и выше */
@media (min-width: 640px) {
  .rows li { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 2rem; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; align-items: center; gap: 1.75rem; position: static; border: 0; padding: 0; background: transparent; }
  .site-nav ul { display: flex; gap: 1.5rem; margin: 0; }
  .site-nav li a { border: 0; padding: .3rem 0; }
  .site-nav li a:hover { box-shadow: inset 0 -3px 0 var(--plumb); }
  .site-nav li a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--plumb); padding-left: 0; }
  .hero { padding: 5rem 0 4rem; }
  .hero-grid { grid-template-columns: 1.4fr .6fr; }
  .plumb { display: block; }
  .gallery { grid-template-columns: repeat(6, 1fr); }
  .g1 { grid-column: span 4; } .g2 { grid-column: span 2; }
  .g3 { grid-column: span 2; } .g4 { grid-column: span 2; } .g5 { grid-column: span 2; }
  .g6 { grid-column: span 6; }
  .g6 img { aspect-ratio: 16 / 7; }
  .gallery .g1 img, .gallery .g2 img { aspect-ratio: auto; height: 100%; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .calc-wrap { grid-template-columns: 1fr 1fr; align-items: center; }
  .about-grid { grid-template-columns: 1.6fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1.6fr; }
}
@media (max-width: 480px) {
  .price th, .price td { padding: .65rem .55rem; font-size: .95rem; }
  .price td:nth-child(2), .price th:nth-child(2) { display: none; }
}
@media (min-width: 1400px) { :root { --maxw: 1240px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .plumb-swing { animation: none; }
}
