/* Дубрава — мебельная фабрика. Тёплое дерево и точная геометрия. */
/* Self-hosted fonts (OFL). Preloaded in <head> for the first screen; the page
   shows a skeleton until fonts are ready to avoid a visible font swap (CLS). */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/playfair-display-cyrillic-600.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.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: 700;
  font-display: swap;
  src: url("/static/fonts/playfair-display-cyrillic-700.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.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+20AD-20C0, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/manrope-cyrillic-400.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/manrope-latin-400.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: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/manrope-cyrillic-500.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/manrope-latin-500.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: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/manrope-cyrillic-600.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/manrope-latin-600.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: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/manrope-cyrillic-700.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/manrope-latin-700.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+20AD-20C0, U+FEFF, U+FFFD;
}

:root {
  --accent: #e6ad68;
  --accent-strong: #f0bd80;
  --bg-card: #2a2018;
  --bg-page: #1b1410;
  --brand: #b8754a;
  --text-muted: #c9b8a8;
  --text-primary: #f5ede4;
  --text-faint: #a8947c;
  --line: #3a2e22;
  --danger: #e0785c;
  --ok: #86c79a;
  --radius: 1.15rem;
  --font-display: "Playfair Display", Georgia, serif;
  --font-text: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Skeleton: hide first-screen text until the web fonts are ready so the visitor
   never sees a system-font flash followed by a reflow. Progressive enhancement
   JS removes .fonts-pending; if JS is unavailable the content stays visible via
   the no-js guard below. */
html.fonts-pending .hero-copy,
html.fonts-pending .hero-form {
  opacity: 0;
}
html.no-js .hero-copy,
html.no-js .hero-form {
  opacity: 1;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }

img { max-width: 100%; display: block; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(27, 20, 16, 0.92);
  backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 28px;
  min-height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 26px; height: 26px; color: var(--accent); flex: none; }
.logo-word { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--text-primary); }
.logo-tag { font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.02em; margin-left: 2px; }
.main-nav { display: flex; gap: 22px; margin-left: auto; }
.nav-link { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; padding: 4px 0; position: relative; }
.nav-link:hover { color: var(--text-primary); }
.nav-link.is-active { color: var(--text-primary); }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent);
}
.header-phone { font-weight: 600; font-size: 0.95rem; white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid transparent; border-radius: 8px;
  padding: 12px 22px; font-size: 0.95rem; font-weight: 600; cursor: pointer;
  font-family: var(--font-text); transition: all .18s ease;
}
.btn--primary { background: var(--accent); color: #1b1410; }
.btn--primary:hover { background: var(--accent-strong); color: #1b1410; box-shadow: 0 0 0 1px var(--accent-strong) inset; }
.btn--ghost { background: transparent; color: var(--text-primary); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn .ico { width: 18px; height: 18px; }
.btn:focus-visible, .nav-link:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(27,20,16,.92) 0%, rgba(27,20,16,.78) 45%, rgba(27,20,16,.35) 100%);
}
.hero-ruler { position: absolute; left: 0; top: 0; bottom: 0; width: 120px; }
.ruler-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.ruler-mark { position: absolute; left: 12px; top: var(--pos); color: var(--text-primary); font-size: 0.78rem; font-weight: 600; }
.ruler-mark i { font-style: normal; }
.ruler-mark::before { content: ""; position: absolute; left: -8px; top: 50%; width: 8px; height: 1px; background: var(--accent); }
.hero-body {
  position: relative; z-index: 2;
  max-width: 1180px; margin: 0 auto; padding: 72px 24px 88px;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center;
  min-height: 640px;
}
.eyebrow { color: var(--accent); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 12px; }
.hero-title { font-size: clamp(2.2rem, 4.5vw, 3.6rem); margin-bottom: 18px; }
.hero-sub { font-size: 1.15rem; color: var(--text-muted); max-width: 34ch; margin: 0 0 22px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hero-points li { position: relative; padding-left: 26px; color: var(--text-muted); }
.hero-points li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 14px; height: 2px; background: var(--accent);
}
.hero-form {
  background: var(--bg-card); border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--line);
}
.hero-credit { position: absolute; right: 24px; bottom: 12px; z-index: 2; color: rgba(245,237,228,.55); font-size: 0.72rem; margin: 0; }

/* ---------- Lead form ---------- */
.lead-form { display: grid; gap: 14px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.field-label .field-input { margin-top: 6px; }
.field-input {
  width: 100%; background: #1b1410; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text-primary); font-size: 1rem; padding: 12px 14px; font-family: var(--font-text);
  transition: border-color .18s ease;
}
.field-input::placeholder { color: var(--text-faint); }
.field-input:focus { outline: none; border-color: var(--accent); }
.field-input[aria-invalid="true"] { border-color: var(--danger); }
.form-note { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.form-note--muted { color: var(--text-faint); }
.form-status { margin: 0; font-size: 0.9rem; min-height: 1.2em; }
.form-status.is-error { color: var(--danger); }
.form-status.is-ok { color: var(--ok); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------- Advantages ---------- */
.advantages { padding: 96px 0; }
.adv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.adv-item { background: var(--bg-card); border-radius: var(--radius); padding: 32px; border: 1px solid var(--line); }
.adv-ico { width: 32px; height: 32px; color: var(--accent); margin-bottom: 16px; }
.adv-title { font-size: 1.3rem; margin-bottom: 10px; }
.adv-text { color: var(--text-muted); margin: 0; }

/* ---------- Sections ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 36px; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.teaser { padding: 96px 0; background: var(--bg-card); }
.teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.teaser-card { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-page); }
.teaser-card:hover { border-color: var(--accent); }
.teaser-media { aspect-ratio: 4/3; overflow: hidden; }
.teaser-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.teaser-card:hover .teaser-media img { transform: scale(1.04); }
.teaser-caption { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; }
.teaser-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.teaser-count { font-size: 0.8rem; color: var(--text-muted); }

/* ---------- Process ---------- */
.process { padding: 96px 0; }
.process-list { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.process-step { position: relative; }
.process-num {
  font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--accent);
  display: block; margin-bottom: 8px;
}
.process-line { display: block; height: 2px; background: var(--line); margin-bottom: 16px; position: relative; }
.process-step:first-child .process-line::after {
  content: ""; position: absolute; left: 0; top: -3px; height: 8px; width: 40%;
  border-bottom: 2px dashed var(--accent);
}
.process-name { font-size: 1.05rem; margin-bottom: 6px; font-family: var(--font-text); font-weight: 700; }
.process-text { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

/* ---------- Lead CTA ---------- */
.lead-cta { padding: 96px 0; background: var(--bg-card); border-top: 1px solid var(--line); }
.lead-cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.lead-cta-text { color: var(--text-muted); margin: 16px 0 20px; max-width: 46ch; }
.lead-cta-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.lead-cta-points li { position: relative; padding-left: 26px; color: var(--text-muted); }
.lead-cta-points li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700;
}
.lead-cta-form { background: var(--bg-page); border-radius: var(--radius); padding: 32px; border: 1px solid var(--line); }

/* ---------- Page hero (catalog / lead) ---------- */
.page-hero { padding: 72px 0 48px; }
.page-title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
.page-sub { color: var(--text-muted); max-width: 62ch; margin: 0; font-size: 1.05rem; }

/* ---------- Catalog ---------- */
.catalog-section { padding: 48px 0; }
.catalog-section + .catalog-section { border-top: 1px solid var(--line); }
.catalog-cat { font-size: 1.7rem; margin-bottom: 28px; text-transform: uppercase; letter-spacing: 0.04em; font-variant: small-caps; }
.catalog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.card {
  position: relative; background: var(--bg-card); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line); transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.35); }
.card-edge {
  position: absolute; left: 0; top: 0; bottom: 0; width: 6px; z-index: 2;
  background: linear-gradient(180deg, var(--brand), var(--accent));
  transition: filter .3s ease;
}
.card:hover .card-edge { filter: saturate(1.4) brightness(1.1); }
.card-media { aspect-ratio: 16/10; overflow: hidden; background: #1b1410; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 22px 24px 18px 24px; }
.card-name { font-size: 1.5rem; margin-bottom: 8px; }
.card-desc { color: var(--text-muted); margin: 0 0 16px; }
.card-foot { display: flex; align-items: center; margin-bottom: 10px; }
.card-price { font-size: 1.4rem; font-weight: 700; color: var(--accent); }
.card-credit { color: var(--text-faint); font-size: 0.72rem; margin: 0; }

/* ---------- Lead page ---------- */
.lead-page { padding: 72px 0 96px; }
.lead-page-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.lead-page-form { background: var(--bg-card); border-radius: var(--radius); padding: 32px; border: 1px solid var(--line); }
.lead-success {
  background: rgba(134,199,154,.12); border: 1px solid var(--ok); border-radius: 12px;
  padding: 20px; margin-bottom: 20px; display: flex; gap: 14px; align-items: flex-start;
}
.success-ico { width: 28px; height: 28px; color: var(--ok); flex: none; margin-top: 2px; }
.success-title { font-size: 1.2rem; font-family: var(--font-text); font-weight: 700; margin-bottom: 4px; }
.success-text { color: var(--text-muted); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 32px; background: #171009; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.logo--footer { margin-bottom: 14px; }
.footer-h { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 14px; font-family: var(--font-text); }
.footer-link { display: block; margin-bottom: 8px; color: var(--text-primary); font-weight: 600; }
.footer-link:hover { color: var(--accent); }
.footer-note, .footer-addr, .footer-hours { color: var(--text-muted); margin: 0 0 8px; }
.footer-hours { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-top: 24px; }
.footer-legal { color: var(--text-faint); font-size: 0.8rem; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; justify-content: space-between; margin-left: 0; gap: 8px; overflow-x: auto; }
  .hero-body { grid-template-columns: 1fr; gap: 32px; padding: 48px 24px 72px; min-height: 0; }
  .adv-grid { grid-template-columns: 1fr; }
  .teaser-grid { grid-template-columns: 1fr; }
  .process-list { grid-template-columns: 1fr 1fr; }
  .lead-cta-grid, .lead-page-grid { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
