/* ==========================================================================
   «Ясень» — мебельная фабрика. Тёплый лендинг.
   Токены из брифа: дерево и бежевые тона, 2 шрифта, акцент — только действие.
   ========================================================================== */

:root {
  --accent: #b07a38;
  --accent-soft: #f3e3c8;
  --accent-hover: #9a6a2f;
  --brand: #7d4b2a;
  --brand-deep: #5d3720;
  --bg-page: #f4ece1;
  --bg-card: #fdf8f0;
  --bg-warm: #efe4d3;
  --text-primary: #2e241c;
  --text-muted: #6b5b4e;
  --line: #e2d2b8;
  --white: #ffffff;

  --font-head: "Liberation Serif", "Yasen Head Fallback", "Times New Roman", serif;
  --font-body: "Liberation Sans", "Yasen Body Fallback", Arial, Helvetica, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --container: 1180px;
  --section-gap: clamp(72px, 9vw, 120px);

  --shadow-sm: 0 2px 10px rgba(93, 55, 32, 0.08);
  --shadow-md: 0 12px 32px rgba(93, 55, 32, 0.14);
  --shadow-lift: 0 22px 48px rgba(93, 55, 32, 0.18);
}

/* --- Fonts --- */
/* Metric-compatible fallbacks: Liberation Serif is a metric replacement for
   Times New Roman and Liberation Sans for Arial, so these local fallbacks
   occupy identical space and the swap causes no layout shift. */
@font-face {
  font-family: "Yasen Head Fallback";
  src: local("Times New Roman");
  size-adjust: 100%;
}
@font-face {
  font-family: "Yasen Body Fallback";
  src: local("Arial");
  size-adjust: 100%;
}
@font-face {
  font-family: "Liberation Serif";
  src: url("/static/fonts/LiberationSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Liberation Serif";
  src: url("/static/fonts/LiberationSerif-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Liberation Sans";
  src: url("/static/fonts/LiberationSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Liberation Sans";
  src: url("/static/fonts/LiberationSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--text-primary);
  line-height: 1.12;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1em; }
a { color: var(--brand); }
img { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 40px);
  padding-right: clamp(20px, 4vw, 40px);
}

.ico {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* --- Accessibility --- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .25s ease, transform .2s ease;
}
.btn-lg { padding: 16px 34px; font-size: 18px; }
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 0 4px rgba(176, 122, 56, 0.22), var(--shadow-md);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}
.btn-ghost:hover {
  background: var(--brand);
  color: #fff;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 236, 225, 0.94);
  backdrop-filter: saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 74px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}
.brand-mark svg { display: block; }
.brand-name {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.header-phone .ico { color: var(--accent); }
.header-phone-label { font-weight: 400; color: var(--text-muted); font-size: 15px; }
.header-cta { flex: none; }

/* --- Hero --- */
.hero {
  position: relative;
  background:
    radial-gradient(60% 70% at 80% 20%, rgba(176, 122, 56, 0.12), transparent 60%),
    var(--bg-warm);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  min-height: min(82vh, 760px);
  padding-top: clamp(32px, 5vw, 64px);
  padding-bottom: clamp(32px, 5vw, 64px);
}
.hero-kicker {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 18px;
}
.hero-title {
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.04;
  margin: 0 0 20px;
}
.hero-tagline {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--text-muted);
  margin: 0 0 30px;
  max-width: 30ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}
.hero-phone {
  display: inline-block;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  padding-left: 28px;
  position: relative;
}
.hero-phone::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
}
.hero-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}

/* --- Section scaffolding --- */
.section-title {
  font-size: clamp(30px, 3.6vw, 44px);
  margin: 0 0 12px;
}
.section-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0;
}
.section-head { margin-bottom: clamp(28px, 4vw, 48px); }

/* --- About --- */
.about {
  background: var(--bg-page);
  padding: var(--section-gap) 0;
}
.about-inner {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.about-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(176, 122, 56, 0.18), transparent 65%),
    var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 50%;
  aspect-ratio: 1;
  max-width: 320px;
  width: 100%;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}
.about-years {
  font-family: var(--font-head);
  font-size: clamp(72px, 9vw, 120px);
  font-weight: 700;
  line-height: 0.9;
  color: var(--brand);
}
.about-years-caption {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 8px;
  letter-spacing: 0.04em;
}
.about-lead {
  font-family: var(--font-head);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 600;
  color: var(--brand);
  margin: 0 0 16px;
}
.about-text {
  color: var(--text-primary);
  max-width: 60ch;
}
.about-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.about-points li {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* --- Catalog --- */
.catalog {
  background: var(--bg-card);
  padding: var(--section-gap) 0;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}
.card-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--bg-warm);
}
.card-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.card-category {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-hover);
  margin: 0;
}
.card-name {
  font-size: 22px;
  margin: 0;
}
.card-material {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0;
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.card-price {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  color: var(--brand);
}
.card-cta {
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  transition: color .2s ease;
}
.card-cta:hover { color: var(--accent-hover); }

/* --- Reviews --- */
.reviews {
  background: var(--bg-warm);
  padding: var(--section-gap) 0;
}
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 36px);
}
.review {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 30px 26px 26px;
  box-shadow: var(--shadow-sm);
}
.review::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 70px;
  height: 22px;
  background: rgba(176, 122, 56, 0.35);
  border-radius: 2px;
}
.review-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}
.review-text {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-primary);
  margin: 0 0 16px;
}
.review-author {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0;
}

/* --- Lead form --- */
.lead-section {
  background: var(--bg-page);
  padding: var(--section-gap) 0;
}
.lead-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.lead-note {
  color: var(--text-muted);
  max-width: 46ch;
}
.lead-form {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 40px);
  box-shadow: var(--shadow-md);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.label-hint { font-weight: 400; color: var(--text-muted); }
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-primary);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(176, 122, 56, 0.18);
}
.field input.invalid,
.field textarea.invalid {
  border-color: #b3392c;
}
.field textarea { resize: vertical; min-height: 90px; }
.field-error {
  display: block;
  font-size: 14px;
  color: #a02a1d;
  margin-top: 6px;
}
.field-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  margin-top: 14px;
  font-weight: 600;
  color: var(--brand);
}
.form-status.error { color: #a02a1d; }
.form-status.success { color: var(--brand); }

/* --- Contacts --- */
.contacts {
  background: var(--bg-card);
  padding: var(--section-gap) 0;
}
.contacts-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: stretch;
  margin-top: clamp(28px, 4vw, 48px);
}
.contacts-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contacts-address,
.contacts-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 17px;
  color: var(--text-primary);
}
.contacts-address .ico,
.contacts-line .ico { color: var(--accent); margin-top: 3px; }
.contacts-info a { color: var(--brand); }
.contacts-info .btn { align-self: flex-start; margin-top: 8px; }
.contacts-map {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 320px;
  box-shadow: var(--shadow-sm);
}
.map-frame { width: 100%; height: 100%; min-height: 320px; }
.map-frame svg { width: 100%; height: 100%; display: block; }

/* --- Footer --- */
.site-footer {
  background: var(--brand-deep);
  color: #f3e9db;
  padding: clamp(40px, 5vw, 64px) 0 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.brand-footer .brand-name { color: #f3e9db; }
.footer-tagline {
  color: #d9c6a8;
  font-size: 15px;
  margin: 12px 0 0;
}
.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-contacts a {
  color: #f3e9db;
  text-decoration: none;
  font-weight: 700;
}
.footer-contacts a:hover { color: var(--accent-soft); }
.footer-contacts span { color: #d9c6a8; }
.footer-credits-title {
  font-weight: 700;
  color: #f3e9db;
  margin: 0 0 8px;
  font-size: 15px;
}
.footer-credits-text {
  color: #d9c6a8;
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

/* --- Success page --- */
.success-main {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: var(--section-gap) 0;
}
.success-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(32px, 5vw, 56px);
  box-shadow: var(--shadow-md);
}
.success-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--brand);
  margin-bottom: 20px;
}
.success-check svg { width: 36px; height: 36px; }
.success-title {
  font-size: clamp(28px, 3.4vw, 40px);
  margin-bottom: 16px;
}
.success-text { color: var(--text-muted); font-size: 18px; }
.success-card .btn { margin-top: 8px; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .about-inner { grid-template-columns: 1fr; }
  .about-figure { max-width: 240px; }
  .lead-inner { grid-template-columns: 1fr; }
  .contacts-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .header-phone-label { display: none; }
  .header-cta { display: none; }
  .header-phone-num { font-size: 15px; }
  .catalog-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
}
