/* ============================================================================
   СтройРесурс — landing styles. BEM-lite, mobile-first.
   Accent palette overridden here (terracotta).
   ========================================================================== */
:root {
  --accent-500: #e8590c;
  --accent-600: #d24c06;
  --accent-700: #b54108;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font-sans);
  font-size: var(--fs-400);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent-600); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: var(--lh-tight); }

/* ---- Utilities ---- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.u-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 50%; translate: -50% -120%; top: var(--sp-2); z-index: var(--z-modal);
  background: var(--accent-600); color: #fff; padding: var(--sp-2) var(--sp-4); border-radius: var(--r-sm);
  transition: translate var(--dur) var(--ease);
}
.skip-link:focus { translate: -50% 0; }
:focus-visible { outline: 3px solid var(--accent-500); outline-offset: 2px; border-radius: 4px; }
.icon { width: 1.15em; height: 1.15em; fill: currentColor; }

/* ---- Buttons ---- */
.btn {
  --_bg: var(--accent-600); --_fg: var(--accent-contrast);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font: inherit; font-weight: var(--fw-semibold); line-height: 1;
  padding: var(--sp-3) var(--sp-5); border: 1px solid transparent; border-radius: var(--r-full);
  background: var(--_bg); color: var(--_fg); cursor: pointer; text-decoration: none;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-accent); }
.btn:active { transform: translateY(0); }
.btn--primary { --_bg: var(--accent-600); }
.btn--primary:hover { background: var(--accent-700); }
.btn--ghost { --_bg: transparent; --_fg: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--bg-muted); box-shadow: var(--sh-sm); }
.btn--lg { padding: var(--sp-4) var(--sp-6); font-size: var(--fs-500); }
.btn--block { width: 100%; }

.eyebrow { font-weight: var(--fw-semibold); color: var(--accent-700); letter-spacing: .02em; font-size: var(--fs-300); text-transform: uppercase; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; gap: var(--sp-4); padding-block: var(--sp-3); }
.logo { display: inline-flex; align-items: center; gap: var(--sp-2); text-decoration: none; color: var(--text); font-family: var(--font-display); }
.logo__mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-md); background: var(--accent-600); color: #fff; font-weight: var(--fw-extrabold); font-size: .85rem; }
.logo__text { font-weight: var(--fw-bold); font-size: var(--fs-500); }
.logo__text strong { color: var(--accent-600); }
.nav { margin-left: auto; }
.nav__menu { list-style: none; display: flex; gap: var(--sp-5); padding: 0; }
.nav__menu a { color: var(--text-muted); text-decoration: none; font-weight: var(--fw-medium); transition: color var(--dur-fast) var(--ease); }
.nav__menu a:hover { color: var(--accent-600); }
.nav__toggle { display: none; background: none; border: 0; padding: var(--sp-2); cursor: pointer; }
.nav__burger, .nav__burger::before, .nav__burger::after { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--dur) var(--ease); }
.nav__burger::before, .nav__burger::after { content: ""; position: relative; }
.nav__burger::before { top: -7px; } .nav__burger::after { top: 5px; }
.site-header__phone { font-weight: var(--fw-semibold); }
.site-header__cta { white-space: nowrap; }

/* ---- Hero ---- */
.hero { padding-block: clamp(2.5rem, 1rem + 8vw, 6rem); background:
  radial-gradient(60% 80% at 80% 0%, #fff7ed 0%, transparent 70%), var(--bg); }
.hero__inner { display: grid; gap: var(--sp-7); align-items: center; }
.hero__title { font-size: var(--fs-800); font-weight: var(--fw-extrabold); margin-block: var(--sp-3) var(--sp-4); }
.hero__lead { font-size: var(--fs-500); color: var(--text-muted); max-width: 46ch; }
.hero__usps { list-style: none; padding: 0; margin-block: var(--sp-5); display: grid; gap: var(--sp-2); }
.hero__usps li { padding-left: 1.8em; position: relative; }
.hero__usps li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-600); font-weight: var(--fw-bold); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.hero__trust { margin-top: var(--sp-5); color: var(--text-faint); font-size: var(--fs-300); }
.hero__art { width: 100%; aspect-ratio: 14/11; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--sh-lg); }

/* ---- Section primitives ---- */
.section { padding-block: clamp(3rem, 1.5rem + 7vw, 6rem); }
.section--muted { background: var(--bg-subtle); }
.section--accent { background: linear-gradient(135deg, var(--accent-600), var(--accent-700)); color: #fff; }
.section--accent .section__title, .section--accent a { color: #fff; }
.section__head { text-align: center; max-width: var(--container-narrow); margin: 0 auto var(--sp-7); }
.section__title { font-size: var(--fs-700); font-weight: var(--fw-bold); }
.section__subtitle { color: var(--text-muted); margin-top: var(--sp-3); font-size: var(--fs-500); }
.section--accent .section__subtitle { color: rgba(255,255,255,.85); }

/* ---- Cards ---- */
.cards { display: grid; gap: var(--sp-5); grid-template-columns: 1fr; }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-6); box-shadow: var(--sh-sm); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.card__icon { font-size: 2.2rem; margin-bottom: var(--sp-3); }
.card__title { font-size: var(--fs-500); margin-bottom: var(--sp-2); }
.card__price { margin-top: var(--sp-3); font-weight: var(--fw-bold); color: var(--accent-700); }

/* ---- Calculator ---- */
.calc__form { max-width: 560px; margin: 0 auto; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-6); box-shadow: var(--sh-md); display: grid; gap: var(--sp-4); }
.calc__result { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4); background: var(--bg-subtle); border-radius: var(--r-md); }
.calc__result-value { font-family: var(--font-display); font-size: var(--fs-700); color: var(--accent-700); }

/* ---- Forms ---- */
.field { display: grid; gap: var(--sp-2); }
.field label { font-weight: var(--fw-medium); font-size: var(--fs-300); }
.field__opt { color: var(--text-faint); font-weight: var(--fw-regular); }
.field input, .field select, .field textarea {
  font: inherit; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--bg); color: var(--text); width: 100%; transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-500); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-500) 20%, transparent); outline: none; }
.field[data-invalid] input, .field[data-invalid] textarea { border-color: var(--danger); }
.field__err { color: var(--danger); font-size: var(--fs-300); }

/* ---- Gallery ---- */
.gallery { list-style: none; padding: 0; display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.gallery__item { margin: 0; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--sh-sm); background: var(--bg); }
.gallery__item img { aspect-ratio: 4/3; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.gallery__item:hover img { transform: scale(1.05); }
.gallery figcaption { padding: var(--sp-3) var(--sp-4); font-size: var(--fs-300); color: var(--text-muted); }

/* ---- Features ---- */
.features { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); text-align: center; }
.feature__num { display: block; font-family: var(--font-display); font-size: var(--fs-700); color: var(--accent-600); font-weight: var(--fw-extrabold); }
.feature p { color: var(--text-muted); margin-top: var(--sp-2); }

/* ---- Reviews ---- */
.review { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-6); box-shadow: var(--sh-sm); }
.review__stars { color: #f59e0b; letter-spacing: 2px; margin-bottom: var(--sp-3); }
.review footer { margin-top: var(--sp-4); color: var(--text-faint); font-size: var(--fs-300); }

/* ---- Lead ---- */
.lead { display: grid; gap: var(--sp-7); }
.lead__list { list-style: none; padding: 0; margin-top: var(--sp-4); display: grid; gap: var(--sp-2); }
.lead__list li { padding-left: 1.8em; position: relative; }
.lead__list li::before { content: "✓"; position: absolute; left: 0; }
.lead__form { background: var(--bg); color: var(--text); border-radius: var(--r-lg); padding: var(--sp-6); box-shadow: var(--sh-lg); display: grid; gap: var(--sp-4); }
.lead__note { font-size: var(--fs-300); color: var(--text-faint); text-align: center; }
.lead__form a { color: var(--accent-600); }

/* ---- Contacts ---- */
.contacts { display: grid; gap: var(--sp-6); }
.contacts__phone { font-family: var(--font-display); font-size: var(--fs-600); font-weight: var(--fw-bold); text-decoration: none; }
.contacts__info p { margin-top: var(--sp-2); }

/* ---- Footer ---- */
.site-footer { background: var(--c-900); color: var(--c-300); padding-block: var(--sp-6); }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: space-between; }
.site-footer a { color: var(--c-100); text-decoration: none; }

/* ---- Modal ---- */
.modal { border: 0; border-radius: var(--r-lg); padding: 0; max-width: 420px; width: calc(100% - 2rem); box-shadow: var(--sh-lg); }
.modal::backdrop { background: rgba(2, 6, 23, .55); backdrop-filter: blur(2px); }
.modal__body { padding: var(--sp-7); text-align: center; display: grid; gap: var(--sp-3); justify-items: center; }
.modal__icon { width: 64px; height: 64px; border-radius: var(--r-full); background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); display: grid; place-items: center; font-size: 2rem; }

/* ---- FAB (WhatsApp) ---- */
.fab { position: fixed; right: var(--sp-4); bottom: var(--sp-4); width: 56px; height: 56px; border-radius: var(--r-full); display: grid; place-items: center; box-shadow: var(--sh-lg); z-index: var(--z-header); transition: transform var(--dur) var(--ease); }
.fab:hover { transform: scale(1.08); }
.fab--wa { background: #25d366; }
.fab--wa svg { width: 30px; height: 30px; fill: #fff; }

/* ---- Reveal on scroll ---- */
.section { opacity: 1; }
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ============================================================================
   Responsive — tablet & desktop
   ========================================================================== */
@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .contacts { grid-template-columns: 1fr 1.4fr; align-items: start; }
}
@media (min-width: 920px) {
  .hero__inner { grid-template-columns: 1.1fr 1fr; }
  .lead { grid-template-columns: 1fr 1fr; align-items: center; }
}

/* ---- Mobile nav ---- */
@media (max-width: 860px) {
  .site-header__phone { display: none; }
  .nav__toggle { display: inline-flex; order: 3; }
  .nav__menu {
    position: absolute; inset: 100% 0 auto 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--sh-md);
    padding: var(--sp-2) var(--gutter); display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu li { padding-block: var(--sp-2); border-bottom: 1px solid var(--border); }
  .nav { position: static; }
}
@media (max-width: 520px) {
  .site-header__cta { display: none; }
}

/* ---- Mobile hardening ---- */
html { scroll-padding-top: 76px; }
@media (max-width: 640px) {
  /* iOS не зумит страницу при фокусе, если шрифт поля >= 16px */
  .field input, .field select, .field textarea { font-size: 16px; }
}
