/* ==========================================================================
   Дубрава — мебель из массива дуба
   Palette: dark oak + brass. Fonts: Playfair Display (headings), Manrope (text).
   ========================================================================== */

:root {
  --bg-page: #1c1712;
  --bg-card: #292219;
  --bg-elevated: #332a1f;
  --ink: #f4ede3;
  --ink-muted: #c9b8a5;
  --ink-faint: #a4917e;
  --accent: #d9a85c;
  --accent-strong: #c9a227;
  --brand: #b55a35;
  --line: rgba(217, 168, 92, 0.22);
  --danger: #e08a7a;
  --radius: 0.8rem;
  --container: 72rem;
}

/* Metric-compatible fallbacks: local system fonts scaled to the webfont's
   advance width and vertical metrics, so the swap from fallback to webfont
   causes no visible layout shift. */
@font-face {
  font-family: "Manrope-fallback";
  src: local("Arial");
  size-adjust: 96%;
  ascent-override: 98%;
  descent-override: 22%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Playfair-fallback";
  src: local("Georgia");
  size-adjust: 103%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/manrope-cyrillic-400.woff2") format("woff2");
  unicode-range: 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("/fonts/manrope-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/manrope-cyrillic-500.woff2") format("woff2");
  unicode-range: 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("/fonts/manrope-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/manrope-cyrillic-600.woff2") format("woff2");
  unicode-range: 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("/fonts/manrope-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/manrope-cyrillic-700.woff2") format("woff2");
  unicode-range: 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("/fonts/manrope-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/playfair-display-cyrillic-700.woff2") format("woff2");
  unicode-range: 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("/fonts/playfair-display-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/playfair-display-cyrillic-600.woff2") format("woff2");
  unicode-range: 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("/fonts/playfair-display-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--ink);
  font-family: "Manrope", "Manrope-fallback", system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: "Playfair Display", "Playfair-fallback", Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  color: var(--ink);
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.9rem 1.5rem;
  background: rgba(28, 23, 18, 0.92);
  backdrop-filter: saturate(120%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); font-weight: 700; font-size: 1.25rem; }
.brand-mark { width: 26px; height: 26px; fill: var(--accent); }
.brand:hover { color: var(--ink); }
.site-nav { display: flex; gap: 1.5rem; margin-left: auto; }
.site-nav a { color: var(--ink-muted); font-size: 0.95rem; font-weight: 500; }
.site-nav a:hover { color: var(--ink); }
.header-cta {
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}
.header-cta:hover { background: rgba(217, 168, 92, 0.12); color: var(--accent-strong); }

/* Hero */
.hero {
  padding: 5rem 0 4rem;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(181, 90, 53, 0.18), transparent 60%),
    var(--bg-page);
}
.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-eyebrow {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0 0 1.2rem;
}
.hero-subtitle {
  color: var(--ink-muted);
  font-size: 1.15rem;
  margin: 0 0 1.8rem;
  max-width: 34rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-figure { margin: 0; }
.hero-illustration {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-primary {
  background: var(--accent);
  color: #241a12;
}
.btn-primary:hover { background: var(--accent-strong); color: #1a120b; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-ghost:hover { background: rgba(217, 168, 92, 0.12); }
.btn-block { width: 100%; text-align: center; }

/* Sections */
.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin: 0 0 0.7rem;
}
.section-subtitle {
  color: var(--ink-muted);
  font-size: 1.05rem;
  margin: 0 0 2.5rem;
}

/* Catalog */
.catalog { padding: 6rem 0; }
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-4px) rotate(-0.6deg);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  border-color: var(--accent);
}
.card-media { position: relative; }
.card-svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}
.card-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card-title { font-size: 1.15rem; margin: 0; }
.card-desc { color: var(--ink-muted); font-size: 0.92rem; margin: 0; flex: 1; }
.card-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0.4rem 0 0;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--line);
}
.catalog-note {
  margin-top: 2rem;
  color: var(--ink-faint);
  font-size: 0.85rem;
  text-align: center;
}

/* About */
.about { padding: 6rem 0; background: var(--bg-card); }
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 2.5rem 0 3rem;
}
.fact { text-align: left; }
.fact-number {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.fact-label { color: var(--ink-muted); font-size: 1rem; }
.about-rings { margin: 2rem 0; }
.about-rings svg { width: 100%; height: 120px; }
.rings-caption { text-align: center; color: var(--ink-faint); font-size: 0.9rem; margin: 0.5rem 0 0; }
.about-text { color: var(--ink-muted); font-size: 1.05rem; max-width: 44rem; }

/* Order form */
.order { padding: 6rem 0; }
.order-card {
  max-width: 40rem;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.5rem;
  position: relative;
}
.order-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed var(--line);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
}
.order-form { display: flex; flex-direction: column; gap: 1.2rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field-label { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.input {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.7rem 0.9rem;
  color: var(--ink);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 1rem;
}
.input::placeholder { color: var(--ink-faint); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217, 168, 92, 0.18); }
.textarea { resize: vertical; min-height: 100px; }
.field-error { color: var(--danger); font-size: 0.85rem; }
.input.invalid { border-color: var(--danger); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.progress {
  display: block;
  height: 3px;
  background: transparent;
  border-radius: 2px;
  overflow: hidden;
}
.progress.is-active { background: rgba(217, 168, 92, 0.2); }
.progress.is-active::after {
  content: "";
  display: block;
  height: 100%;
  width: 40%;
  background: var(--accent);
  animation: progress 1s linear infinite;
}
@keyframes progress {
  from { transform: translateX(-100%); }
  to { transform: translateX(250%); }
}
.form-success {
  text-align: center;
  padding: 2rem 0 0.5rem;
}
.success-tag {
  display: inline-block;
  background: rgba(217, 168, 92, 0.16);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem;
}
.success-text { color: var(--ink-muted); font-size: 1rem; max-width: 28rem; margin: 0 auto; }

/* Contacts */
.contacts { padding: 6rem 0; background: var(--bg-card); }
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 2rem; }
.contact-label { color: var(--ink-faint); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 0.5rem; }
.contact-value { font-size: 1.5rem; font-weight: 600; margin: 0 0 1rem; }
.tel-link { color: var(--ink); font-size: inherit; }
.tel-link:hover { color: var(--accent); }
.contact-note { color: var(--ink-muted); font-size: 0.95rem; margin: 0; }
.copy-btn { margin-top: 0.25rem; }

/* Footer */
.site-footer { padding: 2.5rem 0; border-top: 1px solid var(--line); }
.site-footer p { margin: 0.3rem 0; color: var(--ink-muted); font-size: 0.9rem; }
.footer-note { color: var(--ink-faint); }

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-figure { order: -1; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: 1fr; gap: 1.5rem; }
  .contacts-grid { grid-template-columns: 1fr; gap: 2rem; }
  .site-nav { display: none; }
}
@media (max-width: 560px) {
  .catalog-grid { grid-template-columns: 1fr; }
  .order-card { padding: 1.5rem; }
  .header-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .progress.is-active::after { animation: none; }
  .card, .btn { transition: none; }
}
