/* Дубрава — warm oak palette */
:root {
  --accent: #e3a56e;
  --accent-hover: #f0b683;
  --brand: #b87a4a;
  --bg-page: #1e1712;
  --bg-card: #2a211a;
  --bg-card-2: #332820;
  --text-primary: #f7efe4;
  --text-muted: #cbbaa7;
  --line: rgba(227, 165, 110, 0.28);
  --line-strong: #e3a56e;
  --radius: 0.55rem;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font-heading: 'Prata', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}

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

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

/* ---- header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(30, 23, 18, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
}
.brand:hover { color: var(--text-primary); }
.brand-mark {
  width: 26px;
  height: 26px;
  color: var(--accent);
}
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.site-nav a:not(.btn) { color: var(--text-muted); font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--text-primary); }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.7rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.btn-accent {
  background: var(--accent);
  color: #241408;
}
.btn-accent:hover {
  background: var(--accent-hover);
  color: #241408;
  box-shadow: 0 0 24px rgba(227, 165, 110, 0.5);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: rgba(247, 239, 228, 0.35);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* ---- hero ---- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30, 23, 18, 0.96) 0%, rgba(30, 23, 18, 0.55) 45%, rgba(30, 23, 18, 0.25) 100%);
}
.hero-content {
  position: relative;
  padding-block: 4rem;
}
.hero-eyebrow {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 1rem;
}
.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  margin-bottom: 1.2rem;
}
.hero-years {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: 1.8rem;
}
.hero-years-num {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  color: var(--accent);
}
.hero-years-label {
  color: var(--text-muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---- sections ---- */
.section {
  padding-block: 5rem;
  border-top: 1px solid var(--line);
}
.section-dark {
  background: var(--bg-card);
}
.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
.section-sub { color: var(--text-muted); font-size: 1.1rem; }

/* ---- catalog ---- */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.catalog-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 1.6rem 1.6rem 1.6rem 1.9rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.catalog-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.card-rings {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 10px;
  background: repeating-linear-gradient(
    to bottom,
    var(--brand) 0px,
    var(--brand) 2px,
    var(--accent) 2px,
    var(--accent) 3px,
    var(--bg-card-2) 3px,
    var(--bg-card-2) 5px
  );
  transition: filter 0.2s ease;
}
.catalog-card:hover .card-rings {
  filter: brightness(1.4);
}
.card-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.35;
  margin-bottom: 0.4rem;
}
.card-size {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 1rem;
}
.card-price {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--accent);
  margin: 0;
}

/* ---- factory ---- */
.factory-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.factory-frame {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 6px;
  background: var(--bg-page);
}
.factory-frame img {
  border-radius: calc(var(--radius) - 2px);
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.factory-copy h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.factory-copy .lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 52ch;
}
.factory-stats {
  display: flex;
  gap: 2.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
}
.stat-num {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.4rem;
}
.factory-note { color: var(--text-muted); max-width: 56ch; }

/* ---- request form ---- */
.request-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}
.request-copy h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.request-copy p { color: var(--text-muted); font-size: 1.1rem; }
.request-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
}
.field { margin-bottom: 1.4rem; }
.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 0.5rem 0;
  transition: border-color 0.15s ease;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(203, 186, 167, 0.5); }
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-bottom-color: #d97b6c;
}
.field-error {
  color: #e89a8c;
  font-size: 0.85rem;
  margin: 0.4rem 0 0;
}
.form-banner {
  background: rgba(217, 123, 108, 0.12);
  color: #e89a8c;
  border: 1px solid rgba(217, 123, 108, 0.4);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}
.form-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  margin: 0.9rem 0 0;
}
.form-success {
  text-align: center;
  padding: 1rem 0;
}
.form-success-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--accent);
  margin: 0 0 0.4rem;
}
.form-success p { color: var(--text-muted); margin: 0; }
.honey {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

/* ---- contacts ---- */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.contacts-copy h2,
.contacts-route h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
.contact-phone a {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  color: var(--text-primary);
}
.contact-phone a:hover { color: var(--accent); }
.contact-hours { color: var(--text-muted); }
.contact-address { color: var(--text-primary); font-size: 1.1rem; }
.route-list {
  list-style: none;
  counter-reset: route;
  padding: 0;
  margin: 0 0 1rem;
}
.route-list li {
  counter-increment: route;
  position: relative;
  padding: 0.7rem 0 0.7rem 2.6rem;
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
}
.route-list li::before {
  content: counter(route);
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--accent);
}
.route-note { color: var(--text-muted); }

/* ---- footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 3rem;
  background: var(--bg-page);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-tag { color: var(--text-muted); margin: 0.5rem 0 0; }
.footer-links {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  align-items: center;
}
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }

/* ---- auth ---- */
.auth-body {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-card {
  width: min(420px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.5rem;
}
.brand-center {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.auth-title {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}
.auth-back { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; }
.auth-back a { color: var(--text-muted); }

/* ---- admin ---- */
.admin-body { background: var(--bg-page); }
.admin-main { padding-block: 3rem; }
.admin-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 2rem;
}
.logout-form { margin: 0; }
.leads-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.lead-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.lead-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.lead-name { font-family: var(--font-body); font-weight: 700; font-size: 1.2rem; margin: 0; }
.lead-phone { color: var(--accent); font-weight: 600; }
.lead-comment { color: var(--text-muted); margin: 0.5rem 0; }
.lead-date { color: var(--text-muted); font-size: 0.85rem; margin: 0; }
.lead-status-form { display: flex; flex-direction: column; gap: 0.4rem; }
.status-label { font-size: 0.85rem; color: var(--text-muted); }
.status-row { display: flex; gap: 0.6rem; align-items: center; }
.status-select {
  background: var(--bg-card-2);
  color: var(--text-primary);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem 0.8rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.empty-state {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
}
.empty-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--accent);
  margin: 0 0 0.4rem;
}
.empty-hint { color: var(--text-muted); margin: 0; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .factory-grid,
  .request-wrap,
  .contacts-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
  .site-nav { gap: 0.9rem; }
  .site-nav a:not(.btn) { display: none; }
  .catalog-grid { grid-template-columns: 1fr; }
  .hero { min-height: 80vh; }
  .hero-title { font-size: 2.2rem; }
  .section { padding-block: 3.5rem; }
  .lead-card { flex-direction: column; }
}

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