/* ===== Fonts ===== */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/static/fonts/playfair-display.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/manrope.woff2") format("woff2");
}

/* ===== Design tokens ===== */
:root {
  --accent: #c99b5f;
  --accent-strong: #d8a86b;
  --bg-card: #221c16;
  --bg-page: #17130f;
  --brand: #746554;
  --text-muted: #bfae97;
  --text-primary: #f4ede2;
  --edge: #4a4033;
  --edge-soft: #332b22;
  --font-head: "Playfair Display", "Georgia", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 0.15rem;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.55;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.container {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.ico { width: 1.25rem; height: 1.25rem; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ===== Typography ===== */
h1, h2, h3, .page-title, .section-title, .hero-title {
  font-family: var(--font-head);
  line-height: 1.2;
  text-wrap: balance;
  color: var(--text-primary);
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(23, 19, 15, 0.9);
  border-bottom: 1px solid var(--edge-soft);
  backdrop-filter: none;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand-mark {
  width: 2rem; height: 2rem;
  display: grid; place-items: center;
  color: var(--accent);
}
.brand-key { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.brand-name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}
.main-nav { display: flex; gap: 0.25rem; margin-left: auto; }
.main-nav a {
  padding: 0.5rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: color .18s ease, background .18s ease;
}
.main-nav a:hover { color: var(--text-primary); }
.main-nav a.active { color: var(--text-primary); background: var(--bg-card); }
.header-cta {
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--accent);
  color: var(--accent-strong);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}
.header-cta:hover { background: var(--accent); color: #17130f; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.btn--primary {
  background: var(--accent);
  color: #17130f;
}
.btn--primary:hover { background: var(--accent-strong); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--edge);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn--block { width: 100%; justify-content: center; }

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

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg-page);
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(23,19,15,0.96) 0%, rgba(23,19,15,0.55) 45%, rgba(23,19,15,0.2) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 5rem 4rem;
}
.hero-kicker {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-strong);
  margin-bottom: 1rem;
}
.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  max-width: 18ch;
  margin-bottom: 1.25rem;
}
.hero-subtitle {
  color: var(--text-muted);
  max-width: 44rem;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero-categories { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.hero-categories a {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.hero-categories a:hover { color: var(--accent-strong); border-color: var(--accent); }

/* ===== Sections ===== */
.section { padding-block: 4rem; }
.section--usp { background: var(--bg-card); border-top: 1px solid var(--edge-soft); border-bottom: 1px solid var(--edge-soft); }
.section--cta { background: var(--bg-card); }
.section-head { margin-bottom: 2.5rem; }
.section-title { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
.section-sub { color: var(--text-muted); margin-top: 0.6rem; max-width: 46rem; }
.section-cta { margin-top: 3rem; text-align: left; }

.usp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.usp { display: flex; flex-direction: column; gap: 0.75rem; }
.usp .ico { color: var(--accent); width: 1.6rem; height: 1.6rem; }
.usp-title { font-family: var(--font-body); font-weight: 700; font-size: 1.1rem; }
.usp-text { color: var(--text-muted); font-size: 0.95rem; }

/* ===== Catalog cards (мебельные щиты с фаской) ===== */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  /* кромка — тонкая светлая фаска по краю */
  box-shadow: inset 0 0 0 1px rgba(244, 237, 226, 0.06);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(201, 155, 95, 0.5), 0 12px 32px rgba(0,0,0,0.35);
}
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--brand); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 1.25rem 1.25rem 1.5rem; }
.card-category {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-strong);
  margin-bottom: 0.4rem;
}
.card-name { font-size: 1.35rem; margin-bottom: 0.4rem; }
.card-price { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 1rem; }
.card-desc { color: var(--text-muted); font-size: 0.92rem; }
/* пунктир «под раскрой» под ценой */
.card-cut {
  display: block;
  margin-top: 1rem;
  border-top: 1px dashed var(--edge);
  opacity: 0;
  transition: opacity .2s ease, border-color .2s ease;
}
.card:hover .card-cut { opacity: 1; border-color: var(--accent); }
.card-source {
  padding: 0.6rem 1.25rem;
  font-size: 0.75rem;
  color: var(--brand);
  border-top: 1px solid var(--edge-soft);
  background: rgba(0,0,0,0.15);
}

/* ===== Catalog page ===== */
.page-head { padding-block: 4rem 0; }
.page-title { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 0.75rem; }
.page-sub { color: var(--text-muted); max-width: 46rem; }

.catalog-tabs { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-bottom: 3rem; border-bottom: 1px solid var(--edge-soft); }
.catalog-tab {
  padding: 0.7rem 1.2rem;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .18s ease, border-color .18s ease;
}
.catalog-tab:hover { color: var(--text-primary); }
.catalog-tab.active { color: var(--text-primary); border-color: var(--accent); }

.catalog-category { margin-bottom: 4rem; }
.category-title { font-size: 1.6rem; margin-bottom: 1.5rem; }

/* ===== Forms ===== */
.request-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3rem; align-items: start; }
.request-form-wrap { background: var(--bg-card); border: 1px solid var(--edge); border-radius: var(--radius); padding: 2rem; }
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-size: 0.92rem; font-weight: 600; margin-bottom: 0.4rem; }
.req { color: var(--accent-strong); font-weight: 400; }
.opt { color: var(--text-muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg-page);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color .18s ease;
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--brand); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: #c2574f; }
.field-error { color: #e08b84; font-size: 0.85rem; margin-top: 0.4rem; }
.form-banner {
  background: rgba(194, 87, 79, 0.15);
  border: 1px solid #c2574f;
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.form-banner a { color: var(--accent-strong); text-decoration: underline; }
.form-hint { color: var(--text-muted); font-size: 0.82rem; margin-top: 1rem; }
.field-error { color: #e5a19b; }

/* success */
.request-success { text-align: left; padding: 1rem 0; }
.ico--large { width: 3rem; height: 3rem; color: var(--accent); margin-bottom: 1rem; }
.success-title { font-size: 1.8rem; margin-bottom: 0.75rem; }
.success-text { color: var(--text-muted); margin-bottom: 1.5rem; }

/* aside */
.request-aside { background: var(--bg-card); border: 1px solid var(--edge-soft); border-radius: var(--radius); padding: 1.75rem; }
.aside-title { font-size: 1.3rem; margin-bottom: 1.25rem; }
.aside-steps { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.aside-steps li { display: flex; gap: 0.8rem; align-items: flex-start; color: var(--text-muted); font-size: 0.95rem; }
.step-num {
  flex: none;
  width: 1.7rem; height: 1.7rem;
  display: grid; place-items: center;
  border: 1px solid var(--accent);
  color: var(--accent-strong);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
}
.aside-note { color: var(--text-muted); font-size: 0.85rem; margin-top: 1.25rem; border-top: 1px solid var(--edge-soft); padding-top: 1rem; }

/* ===== Contacts ===== */
.contacts-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: start; }
.contacts-list { display: flex; flex-direction: column; gap: 1.75rem; }
.contact-row { display: flex; gap: 1rem; align-items: flex-start; }
.contact-row .ico { color: var(--accent); width: 1.6rem; height: 1.6rem; margin-top: 0.15rem; }
.contact-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--brand); font-weight: 600; margin-bottom: 0.3rem; }
.contact-value { font-size: 1.15rem; }
.contact-value a { color: var(--text-primary); transition: color .18s ease; }
.contact-value a:hover { color: var(--accent-strong); }
.contact-hours { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }
.contact-link { color: var(--accent-strong); font-size: 0.9rem; text-decoration: underline; text-underline-offset: 3px; }
.contacts-cta { background: var(--bg-card); border: 1px solid var(--edge); border-radius: var(--radius); padding: 2rem; }
.contacts-cta .section-title { margin-bottom: 0.75rem; }
.contacts-cta .section-sub { margin-bottom: 1.5rem; }

/* ===== CTA section ===== */
.cta-inner { text-align: left; }
.cta-inner .section-title { margin-bottom: 0.6rem; }
.cta-inner .section-sub { margin-bottom: 1.75rem; }

/* ===== Footer ===== */
.site-footer { background: #131008; border-top: 1px solid var(--edge-soft); padding-block: 3rem 1.5rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.brand--footer { margin-bottom: 1rem; }
.footer-tagline { color: var(--text-muted); font-size: 0.95rem; max-width: 24rem; }
.footer-heading { font-family: var(--font-body); font-weight: 700; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--brand); margin-bottom: 1rem; }
.footer-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-list a, .footer-list span { color: var(--text-muted); font-size: 0.95rem; }
.footer-list a:hover { color: var(--text-primary); }
.footer-bottom { border-top: 1px solid var(--edge-soft); padding-top: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; }
.footer-sources { color: var(--brand); font-size: 0.8rem; }
.footer-copy { color: var(--text-muted); font-size: 0.85rem; }

/* ===== Responsive ===== */
@media (max-width: 64rem) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .request-layout, .contacts-layout { grid-template-columns: 1fr; }
  .usp-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 48rem) {
  .header-inner { flex-wrap: wrap; padding-block: 0.75rem; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; gap: 0; margin-left: 0; }
  .main-nav a { padding: 0.5rem 0.7rem; white-space: nowrap; }
  .header-cta { display: none; }
  .catalog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { min-height: 70vh; }
}

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