/* Кромка: сайт-заглушка ajawjabw.ru.
   Формы: фото и панели скруглены на 20px, всё нажимаемое (кнопки, переключатели) — пилюли.
   Один акцент — лесной зелёный. Тема по системной настройке. */

@font-face {
  font-family: "Onest";
  src: url("fonts/onest-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  src: url("fonts/onest-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f2f3f1;
  --surface: #e6e8e4;
  --ink: #151715;
  --muted: #565b55;
  --line: rgb(21 23 21 / 0.12);
  --accent: #2d5a43;
  --accent-ink: #eef2ee;
  --footer-bg: #2d5a43;
  --shadow: rgb(29 45 36 / 0.10);
  --r: 20px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111311;
    --surface: #1b1e1b;
    --ink: #e9ebe7;
    --muted: #a0a69e;
    --line: rgb(233 235 231 / 0.12);
    --accent: #8cc3a2;
    --accent-ink: #0f1a14;
    --footer-bg: #1e3a2b;
    --shadow: rgb(0 0 0 / 0.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 "Onest", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.4rem, 4.3vw, 4rem); line-height: 1.04; }
h2 { font-size: clamp(2rem, 3.8vw, 3.25rem); line-height: 1.08; }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0; }
.lead { color: var(--muted); font-size: clamp(1.05rem, 1.4vw, 1.2rem); max-width: 52ch; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: min(1240px, 100% - 2 * clamp(16px, 4vw, 40px)); margin-inline: auto; }
main > section { padding-block: clamp(64px, 9vw, 120px); }
main > section > h2 { margin-bottom: clamp(32px, 4vw, 56px); }

/* ===== Шапка (header-hide-scroll) ===== */
.header-hide {
  --header-hide-bg: color-mix(in srgb, var(--bg) 82%, transparent);
  --header-hide-color: var(--ink);
  --header-hide-pad: 12px clamp(12px, 3vw, 24px);
}
.header-hide.is-hidden { transform: translateY(calc(-100% - 40px)); } /* вместе с тенью */
.header-hide__bar {
  max-width: 1240px;
  margin-inline: auto;
  border-radius: var(--r);
  box-shadow: 0 8px 28px var(--shadow), inset 0 0 0 1px var(--line);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.header-hide__nav a { font-weight: 500; color: var(--muted); transition: color 0.2s; }
.header-hide__nav a:hover { color: var(--ink); }
.header-hide__bar > .dot-fill-button { justify-self: end; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; text-decoration: none; }
.logo svg { width: 28px; height: 28px; color: var(--accent); }

/* ===== Кнопки (dot-fill-button) ===== */
.dot-fill-button {
  --dot-fill-button-bg: var(--ink);
  --dot-fill-button-color: var(--bg);
  --dot-fill-button-hover-bg: var(--accent);
  --dot-fill-button-hover-color: var(--accent-ink);
  --dot-fill-button-radius: 999px;
  font-size: 1.05rem;
  white-space: nowrap;
  transition: transform 0.15s;
}
.dot-fill-button:active { transform: scale(0.98); }
.dot-fill-button--sm { font-size: 0.95rem; --dot-fill-button-pad-y: 0.75em; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: none; }
.link-arrow svg { width: 18px; height: 18px; fill: currentColor; transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ===== Первый экран ===== */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  min-height: min(100dvh, 900px);
  padding-block: 104px 48px !important;
}
.hero__copy { display: grid; gap: 28px; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.hero__media {
  --corner-clip-reveal-ratio: 4 / 5;
  --corner-clip-reveal-radius: var(--r);
  max-height: calc(100dvh - 150px);
  width: 100%;
}

/* ===== Коллекция: асимметричная сетка, широкая и узкая карточки чередуются ===== */
.bento { display: grid; grid-template-columns: repeat(5, 1fr); gap: 40px 24px; }
.item { grid-column: span 2; display: grid; gap: 16px; align-content: start; }
.item--wide { grid-column: span 3; }
.item .corner-clip-reveal { --corner-clip-reveal-radius: var(--r); aspect-ratio: auto; height: clamp(300px, 36vw, 500px); }
.item .corner-clip-reveal__media { transition: scale 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.item:hover .corner-clip-reveal__media { scale: 1.04; }
.item__meta { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; }
.item__meta p { grid-column: 1 / -1; color: var(--muted); }
.price { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ===== Покрытие (before-after-slider) ===== */
.oil__head { display: grid; gap: 20px; margin-bottom: clamp(32px, 4vw, 48px); }
.before-after {
  --before-after-ratio: 16 / 7;
  --before-after-radius: var(--r);
  --before-after-line: var(--accent-ink);
  --before-after-knob-bg: var(--accent);
  --before-after-knob-color: var(--accent-ink);
  --before-after-label-bg: rgb(17 19 17 / 0.62);
  --before-after-label-color: #eef2ee;
}
.before-after__label { font: 500 14px/1 "Onest", system-ui, sans-serif; backdrop-filter: blur(6px); }
/* «До» — тот же снимок, обесцвеченный и осветлённый, как сухая шлифованная доска */
.oak-raw { filter: saturate(0.4) brightness(1.28) contrast(0.82); }

/* ===== Мастерская: фото прилипает, этапы прокручиваются рядом ===== */
.workshop { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.workshop__media { --corner-clip-reveal-ratio: 4 / 5; --corner-clip-reveal-radius: var(--r); position: sticky; top: 104px; }
.workshop__copy h2 { margin-bottom: 40px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 36px; }
.steps li { display: grid; gap: 8px; padding-top: 24px; border-top: 1px solid var(--line); }
.steps p { color: var(--muted); max-width: 46ch; }

/* ===== Калькулятор ===== */
.calc { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.calc__intro { display: grid; gap: 20px; position: sticky; top: 104px; }
.calc__panel {
  display: grid;
  gap: 28px;
  padding: clamp(20px, 3vw, 36px);
  border-radius: var(--r);
  background: var(--surface);
}
.seg { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; }
.seg legend, .range label { font-weight: 600; margin-bottom: 10px; padding: 0; }
.seg__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: block;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.seg label:hover span { box-shadow: inset 0 0 0 1px var(--muted); }
.seg input:checked + span { background: var(--ink); color: var(--bg); box-shadow: none; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.range { display: grid; gap: 6px; }
.range label { display: flex; justify-content: space-between; }
.range output { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 500; }
.range input { width: 100%; accent-color: var(--accent); height: 28px; margin: 0; }
.calc__result { display: grid; gap: 4px; padding-top: 24px; border-top: 1px solid var(--line); }
.calc__note { color: var(--muted); font-size: 0.95rem; }
.calc__price { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.calc__price.is-bump { animation: price-bump 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes price-bump { from { opacity: 0.35; transform: translateY(6px); } }
.calc__panel > .dot-fill-button { justify-self: start; }

/* ===== Вопросы (blur-focus-faq) без «терминальных» меток ===== */
.blur-focus-faq { --blur-focus-faq-text: var(--ink); --blur-focus-faq-line: var(--line); gap: clamp(24px, 5vw, 72px); }
.blur-focus-faq__q { font-size: clamp(1.15rem, 2vw, 1.6rem); font-weight: 500; letter-spacing: -0.02em; padding: 10px 0; }
.blur-focus-faq__q[aria-selected="true"] { font-weight: 600; }
.blur-focus-faq__panel { border-radius: var(--r); background: var(--surface); border: 0; font-size: 1.05rem; position: sticky; top: 104px; }
.blur-focus-faq__row { grid-template-columns: 1fr; padding: 28px 28px 0; }
.blur-focus-faq__row + .blur-focus-faq__row { border-top: 0; padding: 12px 28px 28px; }
.blur-focus-faq__tag { display: none; }
.blur-focus-faq__in { font-family: inherit; font-size: 1.25rem; text-transform: none; letter-spacing: -0.01em; }
.blur-focus-faq__out { color: var(--muted); }

/* ===== Подвал (footer-reveal) ===== */
.footer-reveal { --footer-reveal-bg: var(--footer-bg); --footer-reveal-color: #eef2ee; --footer-reveal-radius: 32px; }
.footer-reveal__inner { padding: clamp(48px, 7vw, 96px) clamp(16px, 4vw, 40px) 32px; max-width: 1320px; margin-inline: auto; }
.footer-reveal__links a { font-size: 17px; opacity: 0.85; }
.footer-reveal__title { font-size: clamp(64px, 17vw, 240px); letter-spacing: -0.05em; }
.legal { font-size: 14px; opacity: 0.7; max-width: 60ch; }
main { position: relative; background: var(--bg); }

/* ===== Телефоны ===== */
@media (max-width: 720px) { .header-hide__bar { grid-template-columns: 1fr auto; } } /* меню скрыто — кнопка вправо */
@media (max-width: 767px) {
  .hero, .workshop, .calc { grid-template-columns: 1fr; }
  .hero { min-height: 0; padding-block: 96px 32px !important; }
  .hero__media { max-height: none; }
  .bento { grid-template-columns: 1fr; }
  .item, .item--wide { grid-column: auto; }
  .item .corner-clip-reveal { height: auto; aspect-ratio: 4 / 3; }
  .workshop__media, .calc__intro, .blur-focus-faq__panel { position: static; }
  .before-after { --before-after-ratio: 4 / 3; }
}
