:root {
  --bg: #e8e4de;
  --bg-deep: #ddd8d0;
  --surface: #ffffff;
  --text: #3d3429;
  --muted: #6b6158;
  --accent: #a67c00;
  --accent-dark: #6d4c2a;
  --accent-soft: rgba(166, 124, 0, 0.12);
  --header-bg: #5c4a3a;
  --header-text: #f7f3ee;
  --border: rgba(61, 52, 41, 0.14);
  --shadow: 0 10px 28px rgba(61, 52, 41, 0.12);
  --radius: 14px;
  --max: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--accent-dark); }

img { max-width: 100%; height: auto; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px 32px;
}

/* —— Top bar —— */
.site-header {
  background: var(--header-bg);
  color: var(--header-text);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-title {
  font-size: clamp(17px, 2.4vw, 22px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.brand-sub {
  font-size: 12px;
  opacity: 0.82;
}

.header-phone {
  margin-left: auto;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background 0.15s ease;
}

.header-phone:hover { background: rgba(255, 255, 255, 0.18); }

.nav-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}

.site-nav {
  width: 100%;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.nav-link {
  text-decoration: none;
  color: var(--header-text);
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.nav-link.active {
  background: var(--accent);
  color: #fff;
  border-color: rgba(0, 0, 0, 0.08);
}

/* —— Hero —— */
.hero {
  margin-top: 22px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 320px;
}

.hero-media {
  position: relative;
  min-height: 280px;
  background:
    linear-gradient(135deg, rgba(92, 74, 58, 0.08), rgba(166, 124, 0, 0.06)),
    url("/assets/hero-kitchen.png") center/cover no-repeat;
  background-color: #e2ddd4;
}

.hero-media-label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
}

.hero-body {
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.hero-body h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  color: var(--text);
}

.hero-lead {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 800;
  font-size: 14px;
  padding: 12px 18px;
  border-radius: 10px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn-primary {
  background: linear-gradient(180deg, #c4922a, var(--accent));
  color: #fff;
  box-shadow: 0 4px 14px rgba(166, 124, 0, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(166, 124, 0, 0.4);
}

.btn-secondary {
  background: var(--surface);
  color: var(--accent-dark);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: #faf8f5; }

/* —— Panels —— */
.page-head {
  margin-top: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.8vw, 30px);
}

.panel {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.muted { color: var(--muted); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 14px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: #faf8f5;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--accent-dark);
}

.card p { margin: 0; color: var(--muted); font-size: 14px; }

.card-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  margin-bottom: 10px;
}

/* —— Works —— */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.filterBtn {
  border: 1px solid var(--border);
  background: #faf8f5;
  color: var(--text);
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.filterBtn:hover { border-color: rgba(166, 124, 0, 0.45); }

.filterBtn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.work-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #faf8f5;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.work-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.work-thumb {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  display: block;
  background: var(--bg-deep);
}

.work-body { padding: 12px 14px 14px; }

.work-body h3 { margin: 0 0 6px; font-size: 16px; }

.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.badge {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 4px 9px;
  border-radius: 999px;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(45, 38, 32, 0.72);
  padding: 18px;
  z-index: 9999;
}

.modal.open { display: flex; }

.modal-box {
  width: min(980px, 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.modal-top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}

.modal-title { margin: 0; font-size: 17px; }

.modal-desc { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.close-btn {
  border: 1px solid var(--border);
  background: #faf8f5;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}

.viewer { position: relative; background: #2a241e; }

.viewer img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 900;
}

.nav-prev { left: 10px; }
.nav-next { right: 10px; }

.caption-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

/* —— Contact form —— */
form { display: grid; gap: 12px; }

label { font-weight: 800; font-size: 14px; }

input, textarea, select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

textarea { min-height: 120px; resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* —— Constructor —— */
.iframe-wrap {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.about-tall { min-height: 200px; }

/* —— Footer —— */
.site-footer {
  margin-top: 28px;
  padding: 22px 0 28px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
}

.footer-contacts {
  display: grid;
  gap: 4px;
  font-size: 14px;
  color: var(--muted);
}

.footer-contacts strong { color: var(--text); }

.footer-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: stretch;
}

.stat-card {
  min-width: 118px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(61, 52, 41, 0.08);
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-value {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: var(--accent-dark);
  line-height: 1.1;
}

.stat-card.metrika {
  background: linear-gradient(180deg, #fff9ef, var(--surface));
  border-color: rgba(166, 124, 0, 0.25);
}

.stat-card.metrika .stat-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.stat-card.metrika.is-live .stat-value {
  font-size: 18px;
  color: #fc0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.metrika-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ccc;
  margin-right: 4px;
  vertical-align: middle;
}

.metrika-dot.live {
  background: #fc0;
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.25);
}

.footer-copy {
  width: 100%;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

/* —— Mobile call bar —— */
.mobile-call {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 90;
  text-align: center;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #c4922a, var(--accent));
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(166, 124, 0, 0.45);
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media { min-height: 220px; }
  .grid-3, .works-grid, .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    flex-direction: column;
    padding-top: 10px;
  }

  .site-nav.open { display: flex; }

  .header-phone { margin-left: 0; order: 3; width: 100%; text-align: center; }

  .mobile-call { display: block; }

  body { padding-bottom: 72px; }
}
