/* ===== Дубрава — design tokens ===== */
:root {
  --accent: #e0a45c;
  --accent-hover: #f0b878;
  --accent-ink: #1c1815;
  --brand: #8a5a2b;
  --bg-page: #1c1815;
  --bg-card: #28221c;
  --bg-elevated: #322a22;
  --text-primary: #f5efe6;
  --text-muted: #bfb2a2;
  --line: rgba(224, 164, 92, 0.22);
  --radius: 1rem;
  --font-display: "Prata", "Georgia", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--text-primary);
}

a { color: inherit; text-decoration: none; }

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Icons ===== */
.ico {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
  vertical-align: -0.2em;
}
.ico-lg { width: 26px; height: 26px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease, transform .15s ease;
}
.btn-lg { padding: 16px 32px; font-size: 17px; }

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-accent:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 0 1px rgba(224,164,92,.4), 0 8px 24px rgba(224,164,92,.25);
}
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(28, 24, 21, 0.92);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.brand-mark {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}
.main-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}
.main-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .2s ease;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--accent); }
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}
.header-phone:hover { color: var(--accent); }
.header-cta { flex: 0 0 auto; }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 85% 10%, rgba(224,164,92,0.16), transparent 55%),
    radial-gradient(90% 90% at 10% 90%, rgba(138,90,43,0.22), transparent 60%);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
  min-height: 72vh;
  padding-top: 64px;
  padding-bottom: 64px;
}
.hero-kicker {
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-bottom: 20px;
}
.hero-sub {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 30em;
  margin: 0 0 28px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.hero-note { color: var(--text-muted); font-size: 15px; }
.hero-art {
  margin: 0;
}
.hero-art img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.hero-source {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 8px;
}

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-card); }
.section-head { max-width: 46em; margin-bottom: 48px; }
.section-title { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: 12px; }
.section-lead { color: var(--text-muted); font-size: 18px; margin: 0; }

/* ===== Category cards (index) ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.category-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
}
.category-media { aspect-ratio: 4 / 3; overflow: hidden; }
.category-media img { width: 100%; height: 100%; object-fit: cover; }
.category-body { padding: 24px; }
.category-name { font-size: 22px; margin-bottom: 8px; }
.category-desc { color: var(--text-muted); font-size: 15px; margin: 0 0 16px; }
.work-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
}

/* ===== Steps (how we work) ===== */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step-num {
  display: block;
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--accent);
  margin-bottom: 8px;
  opacity: 0.9;
}
.step-title { font-size: 20px; margin-bottom: 8px; }
.step-text { color: var(--text-muted); font-size: 15px; margin: 0; }
.steps-note { color: var(--accent); font-size: 15px; margin-top: 28px; }

/* ===== Zamer (lead) ===== */
.zamer-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.zamer-points { list-style: none; margin: 24px 0 0; padding: 0; }
.zamer-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.zamer-points .ico { color: var(--accent); }

.zamer-form-card {
  background: var(--bg-card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.zamer-form-card .section-title { font-size: 22px; }

/* ===== Lead form ===== */
.lead-form { display: flex; flex-wrap: wrap; gap: 16px; }
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.field { flex: 1 1 200px; }
.field-full { flex: 1 1 100%; }
.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
}
.field-label .optional { font-weight: 400; color: var(--text-muted); opacity: 0.7; }
.lead-form input[type="text"],
.lead-form input[type="tel"],
.lead-form textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-page);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.lead-form textarea { resize: vertical; }
.lead-form input:focus,
.lead-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224,164,92,0.18);
}
.lead-form input.invalid,
.lead-form textarea.invalid { border-color: var(--accent); }
.field-error {
  display: block;
  color: var(--accent);
  font-size: 13px;
  margin-top: 4px;
}
.btn-submit { width: 100%; }
.form-note { flex: 1 1 100%; color: var(--text-muted); font-size: 13px; margin: 0; }
.form-error {
  flex: 1 1 100%;
  color: var(--accent);
  font-size: 14px;
}
.form-success {
  flex: 1 1 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}
.form-success .ico-lg { width: 40px; height: 40px; color: var(--accent); margin-bottom: 12px; }
.form-success strong { font-family: var(--font-display); font-size: 20px; display: block; margin-bottom: 4px; }
.form-success p { color: var(--text-muted); margin: 0; }

/* ===== Page hero (catalog/contacts) ===== */
.page-hero {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-card);
}
.page-title { font-size: clamp(2rem, 4vw, 3rem); }

/* ===== Catalog tabs ===== */
.catalog-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.tab {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all .2s ease;
}
.tab:hover { color: var(--text-primary); border-color: var(--accent); }
.tab-active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* ===== Work cards ===== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.work-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
}
.work-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.work-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.work-card:hover .work-media img { transform: scale(1.03); }
.work-source {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(28,24,21,0.85);
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
}
.work-body { padding: 24px; }
.work-title { font-size: 22px; margin-bottom: 8px; }
.work-desc { color: var(--text-muted); font-size: 15px; margin: 0 0 16px; }
.work-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.price-plate {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 16px;
  padding: 6px 14px;
  border-radius: 8px;
  white-space: nowrap;
}

/* ===== Category CTA ===== */
.category-cta {
  margin-top: 64px;
  padding: 48px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.category-cta .section-lead { margin-bottom: 24px; }

/* ===== Contacts ===== */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contacts-list { list-style: none; margin: 0 0 24px; padding: 0; }
.contacts-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.contacts-list .ico-lg { color: var(--accent); margin-top: 2px; }
.contacts-label { display: block; font-size: 14px; color: var(--text-muted); margin-bottom: 2px; }
.contacts-value { font-size: 18px; font-weight: 600; color: var(--text-primary); }
a.contacts-value:hover { color: var(--accent); }
.contacts-telegram { color: var(--text-muted); font-size: 15px; }
.contacts-telegram a { color: var(--accent); font-weight: 600; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-card);
  padding: 64px 0 24px;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-tagline { color: var(--text-muted); font-size: 15px; max-width: 24em; }
.footer-title { font-size: 16px; color: var(--accent); margin-bottom: 16px; }
.footer-links, .footer-contacts { list-style: none; margin: 0; padding: 0; }
.footer-links li, .footer-contacts li { margin-bottom: 10px; }
.footer-links a, .footer-contacts a, .footer-contacts span { color: var(--text-muted); font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.footer-links a:hover { color: var(--accent); }
.footer-contacts .ico { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 24px; }
.footer-bottom p { color: var(--text-muted); font-size: 13px; margin: 0; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .header-phone span { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .category-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .zamer-wrap, .contacts-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 64px 0; }
}

@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .header-cta { display: none; }
  .hero-actions .btn { width: 100%; }
}

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

/* ===== Focus visibility (a11y) ===== */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== Local fonts (self-hosted woff2, metric-compatible fallbacks) ===== */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url("/static/fonts/manrope-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0400-04FF, U+0500-052F;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url("/static/fonts/manrope-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+2000-206F, U+2074, 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: optional;
  src: url("/static/fonts/manrope-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0400-04FF, U+0500-052F;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url("/static/fonts/manrope-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+2000-206F, U+2074, 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: optional;
  src: url("/static/fonts/manrope-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0400-04FF, U+0500-052F;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src: url("/static/fonts/manrope-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+2000-206F, U+2074, 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: optional;
  src: url("/static/fonts/manrope-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0400-04FF, U+0500-052F;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: optional;
  src: url("/static/fonts/manrope-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+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Prata";
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url("/static/fonts/prata-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0400-04FF, U+0500-052F;
}
@font-face {
  font-family: "Prata";
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url("/static/fonts/prata-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+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
