/* ============================================================
   Дубрава — корпусная мебель на заказ
   Palette: deep oak-green + brass accent (from customer brief)
   ============================================================ */

/* ---- Fonts (local woff2, metric fallback) ---- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/inter-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/inter-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/inter-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/inter-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/inter-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/inter-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/playfair-display-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/playfair-display-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+0200-0209, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/playfair-display-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/playfair-display-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+0200-0209, U+FEFF, U+FFFD;
}

/* Metric-compatible fallbacks (Arial / Georgia) so a font swap does not shift layout. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 104%;
  ascent-override: 97%;
  descent-override: 24%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Playfair Fallback";
  src: local("Georgia");
  size-adjust: 105%;
  ascent-override: 96%;
  descent-override: 26%;
  line-gap-override: 0%;
}

/* ---- Design tokens ---- */
:root {
  --bg-page: #141a17;
  --bg-card: #1d2621;
  --bg-elev: #232e28;
  --bg-hero: #0f1512;
  --accent: #c89a6b;
  --accent-hover: #d9ae80;
  --accent-ink: #2a1f14;
  --brand: #62706a;
  --text-primary: #f2ead9;
  --text-muted: #b8aa99;
  --border: rgba(200, 154, 107, 0.16);
  --border-strong: rgba(200, 154, 107, 0.4);
  --radius: 0.3rem;
  --radius-lg: 0.5rem;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --font-heading: "Playfair Display", "Playfair Fallback", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --container: 1200px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-page);
  background-image:
    radial-gradient(1100px 520px at 85% -8%, rgba(98, 112, 106, 0.18), transparent 60%),
    radial-gradient(900px 480px at -8% 30%, rgba(200, 154, 107, 0.07), transparent 55%);
  min-height: 100vh;
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.15; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---- Layout ---- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 6.5rem 0; }
.section--tight { padding: 4rem 0; }
.eyebrow {
  font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 1rem;
}
.lead { color: var(--text-muted); font-size: 1.1rem; max-width: 46rem; }
.text-muted { color: var(--text-muted); }
.divider {
  width: 64px; height: 2px; background: var(--accent);
  border: 0; margin: 1.2rem 0 1.5rem;
}

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 26, 23, 0.88);
  backdrop-filter: saturate(120%) blur(2px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; gap: 1.75rem;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--text-primary); font-weight: 600; font-size: 1.15rem; }
.brand:hover { color: var(--text-primary); }
.brand__mark { width: 30px; height: 30px; color: var(--accent); flex: none; }
.brand__name span { color: var(--accent); }
.nav__links { display: flex; align-items: center; gap: 1.5rem; margin-left: auto; }
.nav__link {
  color: var(--text-muted); font-size: 0.95rem; font-weight: 500;
  padding: 0.35rem 0; position: relative;
}
.nav__link:hover { color: var(--text-primary); }
.nav__link--active { color: var(--text-primary); }
.nav__link--active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--accent);
}
.nav__cta { display: flex; align-items: center; gap: 1rem; }
.nav__phone { color: var(--text-primary); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nav__phone svg { display: inline-block; vertical-align: -2px; margin-right: 0.4rem; }
.burger {
  display: none; margin-left: auto; background: none; border: 0;
  color: var(--text-primary); cursor: pointer; padding: 0.5rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: 0.85rem 1.6rem; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary {
  background: var(--accent); color: var(--accent-ink);
}
.btn--primary:hover {
  background: var(--accent-hover); color: var(--accent-ink);
  box-shadow: 0 6px 22px rgba(200, 154, 107, 0.35);
}
.btn--ghost { background: transparent; color: var(--text-primary); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-hover); }
.btn--block { width: 100%; }
.btn:active { transform: translateY(1px); }

/* ---- Hero ---- */
.hero {
  position: relative; overflow: hidden;
  background-color: var(--bg-hero);
  background-image:
    radial-gradient(1000px 560px at 78% 20%, rgba(98, 112, 106, 0.22), transparent 60%),
    radial-gradient(760px 420px at 8% 90%, rgba(200, 154, 107, 0.10), transparent 55%);
  padding: 6rem 0 5rem;
}
.hero__inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
.hero__kicker { color: var(--accent); font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.8rem; margin-bottom: 1.25rem; }
.hero h1 { margin-bottom: 0.5rem; }
.hero__subtitle { color: var(--text-muted); font-size: 1.15rem; max-width: 34rem; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 2.25rem; }
.hero__cats { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1rem; border-radius: 2rem;
  border: 1px solid var(--border); color: var(--text-primary);
  font-size: 0.9rem; font-weight: 500; transition: border-color 0.2s, color 0.2s;
}
.cat-pill:hover { border-color: var(--accent); color: var(--accent-hover); }
.cat-pill small { color: var(--text-muted); }
.hero__visual { position: relative; }
.hero__visual img { width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow); display: block; }
.hero__credit {
  position: absolute; right: 0.75rem; bottom: 0.75rem;
  font-size: 0.7rem; color: rgba(242, 234, 217, 0.65);
}

/* ---- Category cards (home) ---- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.cat-card {
  display: block; position: relative; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.75rem;
  color: var(--text-primary); transition: transform 0.2s ease, border-color 0.2s ease;
}
.cat-card:hover { transform: translateY(-4px); border-color: var(--accent); color: var(--text-primary); }
.cat-card__icon { width: 40px; height: 40px; color: var(--accent); margin-bottom: 1.25rem; }
.cat-card h3 { margin-bottom: 0.35rem; }
.cat-card p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }
.cat-card__count { font-size: 0.8rem; color: var(--accent); font-weight: 600; }

/* ---- Catalog cards ---- */
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.work-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
.work-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(200, 154, 107, 0.12); }
.work-card__media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-elev); }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.work-card:hover .work-card__media img { transform: scale(1.04); }
.work-card__credit {
  position: absolute; right: 0.6rem; bottom: 0.6rem;
  font-size: 0.66rem; color: rgba(242, 234, 217, 0.7);
  background: rgba(15, 21, 18, 0.55); padding: 0.1rem 0.45rem; border-radius: 3px;
}
.work-card__body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.work-card__body h3 { font-size: 1.2rem; margin: 0; }
.work-card__material { color: var(--text-muted); font-size: 0.92rem; margin: 0; }
.work-card__price {
  margin-top: auto; padding-top: 1rem;
  display: flex; align-items: baseline; justify-content: space-between;
  border-top: 1px solid var(--border);
}
.work-card__price .from { color: var(--text-muted); font-size: 0.82rem; }
.work-card__price .amount { color: var(--accent); font-weight: 700; font-size: 1.3rem; font-family: var(--font-heading); }

/* ---- Category nav (tabs) ---- */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.5rem; }
.cat-tabs a {
  padding: 0.6rem 1.25rem; border-radius: 2rem; border: 1px solid var(--border);
  color: var(--text-muted); font-weight: 500;
}
.cat-tabs a:hover { color: var(--text-primary); border-color: var(--border-strong); }
.cat-tabs a.active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* ---- Steps (how we work) ---- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; counter-reset: step; }
.step { position: relative; padding: 1.5rem 1.25rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.step__num {
  font-family: var(--font-heading); font-size: 2rem; font-weight: 700; color: var(--accent);
  line-height: 1; margin-bottom: 0.75rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.step p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

/* ---- Lead form ---- */
.lead-block { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.lead-form__card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2.25rem;
}
.field { margin-bottom: 1.4rem; }
.field label { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 0.5rem; color: var(--text-primary); }
.field input {
  width: 100%; padding: 0.9rem 1rem; font-family: var(--font-body); font-size: 1rem;
  color: var(--text-primary); background: var(--bg-elev);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input::placeholder { color: var(--text-muted); opacity: 0.7; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200, 154, 107, 0.18); }
.field input.invalid { border-color: #e07a6a; }
.field__error { color: #e8a294; font-size: 0.82rem; margin-top: 0.35rem; min-height: 0; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-success { display: none; }
.form-note { color: var(--text-muted); font-size: 0.82rem; margin-top: 0.8rem; }
.mini-steps { display: flex; gap: 0.5rem; margin-top: 1.25rem; }
.mini-step { font-size: 0.8rem; color: var(--text-muted); }
.mini-step b { color: var(--text-primary); }
.lead-form__aside h3 { margin-bottom: 1rem; }
.lead-form__aside ul { list-style: none; padding: 0; margin: 0; }
.lead-form__aside li { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.55rem 0; color: var(--text-muted); }
.lead-form__aside li svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 2px; }

/* ---- Contacts ---- */
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 0; border-bottom: 1px solid var(--border); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list svg { width: 24px; height: 24px; color: var(--accent); flex: none; margin-top: 2px; }
.contact-list .label { color: var(--text-muted); font-size: 0.82rem; }
.contact-list .value { font-weight: 600; font-size: 1.05rem; color: var(--text-primary); }
.contact-list a.value:hover { color: var(--accent-hover); }
.online { display: inline-flex; align-items: center; gap: 0.4rem; color: #7fb98a; font-size: 0.85rem; font-weight: 500; }
.online::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #6fbf7f; }
.map-plate { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; }

/* ---- Thanks ---- */
.thanks { text-align: center; padding: 8rem 0; }
.thanks__mark { width: 72px; height: 72px; color: var(--accent); margin: 0 auto 1.5rem; }
.thanks .lead { margin: 0 auto 2.5rem; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); padding: 3rem 0; margin-top: 2rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; }
.footer__col h4 { font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-muted); margin-bottom: 1rem; }
.footer__col a { display: block; color: var(--text-muted); padding: 0.25rem 0; }
.footer__col a:hover { color: var(--text-primary); }
.footer__legal { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.82rem; }

/* ---- Icons ---- */
.ico { width: 1.1em; height: 1.1em; }

/* ---- 404 ---- */
.notfound { text-align: center; padding: 7rem 0; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .cat-grid, .works-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .lead-block, .contacts-grid { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
  .burger { display: inline-flex; }
  .nav.open .nav__links {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--bg-page); border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem 1.5rem;
  }
}
@media (max-width: 600px) {
  .section { padding: 4.5rem 0; }
  .cat-grid, .works-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .nav__phone span { display: none; }
  .hero { padding: 3.5rem 0; }
  .hero__actions .btn { width: 100%; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
