:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-muted: #ebebeb;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --border: rgba(0, 0, 0, 0.08);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.15);
  --success: #248a3d;
  --radius: 18px;
  --radius-lg: 28px;
  --nav-h: 52px;
  --sticky-h: 68px;
  --font: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --container: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--fg);
  color: var(--surface);
  border-radius: 980px;
  font-size: 14px;
}
.skip-link:focus { top: 12px; }

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.section { padding: clamp(72px, 10vw, 112px) 0; }
.section-tight { padding-top: 0; }

.section-head {
  max-width: 640px;
  margin: 0 auto clamp(36px, 5vw, 56px);
  text-align: center;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h1 { font-size: clamp(40px, 7vw, 64px); font-weight: 700; }
h2 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 12px; }
h3 { font-size: clamp(18px, 2vw, 22px); }

.lede {
  margin: 0;
  font-size: clamp(17px, 1.8vw, 19px);
  color: var(--muted);
  line-height: 1.45;
}

/* Nav */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(245, 245, 247, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-links a:hover { color: var(--fg); background: var(--surface-muted); }

.nav-cta {
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 16px;
  font-size: 13px;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 3px auto;
  background: var(--fg);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(0, 0, 0, 0.25);
  border: 0;
  cursor: pointer;
}
.nav-backdrop[hidden] { display: none; }

/* Hero */
.hero {
  position: relative;
  min-height: clamp(520px, 88vh, 720px);
  display: flex;
  align-items: flex-end;
  padding-top: var(--nav-h);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: #e3e0da center / cover no-repeat;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(245,245,247,0.1) 0%, rgba(245,245,247,0.65) 50%, rgba(245,245,247,0.98) 85%, var(--bg) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: clamp(48px, 8vw, 80px) 0 clamp(40px, 6vw, 64px);
}

.hero-sub {
  display: block;
  margin-top: 0.12em;
  font-size: 0.55em;
  font-weight: 600;
  color: var(--muted);
}

.hero-lede {
  margin: 20px auto 0;
  max-width: 36ch;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: none;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--fg); box-shadow: inset 0 0 0 1px var(--border); }
.btn-secondary:hover { background: var(--surface-muted); }
.btn-calc { width: 100%; min-height: 52px; margin-top: 24px; font-size: 17px; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.about-story p { margin: 0 0 14px; color: var(--muted); }

.trust-pillars {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}
.trust-pillar {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
}
.trust-pillar h3 { margin-bottom: 4px; font-size: 16px; }
.trust-pillar p { margin: 0; font-size: 14px; color: var(--muted); }

.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.team-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.team-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--surface-muted);
}
.team-card-body { padding: 16px 18px 20px; }
.team-role { margin: 4px 0 8px; font-size: 14px; color: var(--accent); font-weight: 600; }
.team-meta { margin: 0; font-size: 13px; color: var(--muted); }

/* Benefits */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.benefit-card {
  padding: 24px 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}
.benefit-card h3 { margin-bottom: 8px; font-size: 17px; }
.benefit-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.45; }

/* Joint */
.joint-hook {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
.joint-hook-col {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.joint-hook-col-accent {
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.joint-hook-label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.joint-hook-col-accent .joint-hook-label {
  color: var(--accent);
}
.joint-hook-col p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg);
}
.joint-hook-col p strong {
  font-weight: 600;
}

.joint-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.joint-card {
  padding: 22px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.joint-card h3 { margin-bottom: 8px; font-size: 17px; }
.joint-card p { margin: 0; font-size: 14px; color: var(--muted); }

.compare-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}
.compare-table th,
.compare-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.compare-table th { font-weight: 600; background: var(--bg); }
.compare-table tr:last-child td { border-bottom: none; }
.muted-cell { color: var(--muted); }
.accent-cell { color: var(--success); font-weight: 600; }

/* Calculator */
.calc-card {
  max-width: 880px;
  margin-inline: auto;
  padding: clamp(28px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.05);
}

.calc-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field-wide { grid-column: 1 / -1; }
.field label, .field-label { font-size: 12px; font-weight: 600; color: var(--muted); }

.field input[type="number"],
.field input[type="text"],
.field input[type="tel"] {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  outline: none;
  background: var(--surface);
}
.field input[type="range"] { width: 100%; accent-color: var(--accent); }
.field.is-invalid input { border-color: #ff3b30; }

.hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }

.block-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.block-chips .block-chip { flex: 1; min-width: 140px; justify-content: center; }
.block-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 980px;
  background: var(--bg);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.block-chip[aria-pressed="true"] {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--surface);
}

.calc-results {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.result {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg);
}
.result span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.result strong {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.result-accent strong { color: var(--accent); }
.result-wide { grid-column: 1 / -1; }

.calc-note { margin: 16px 0 0; font-size: 13px; color: var(--muted); }

.lead-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}
.lead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.lead-actions .btn-primary { flex: 1; min-width: 160px; }

/* Reasons */
.reasons-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.reason-card {
  padding: 20px 16px;
  border-radius: var(--radius);
  background: var(--surface);
}
.reason-num {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: -0.04em;
}
.reason-card h3 { margin: 8px 0 6px; font-size: 16px; }
.reason-card p { margin: 0; font-size: 13px; color: var(--muted); }

/* Objects */
.objects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.object-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.object-card img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  background: var(--surface-muted);
}
.object-body { padding: 20px; }
.object-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip {
  padding: 4px 10px;
  border-radius: 980px;
  background: var(--bg);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.object-quote { margin: 0; font-size: 15px; color: var(--muted); font-style: italic; }

/* Reviews */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.review-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.review-card p { margin: 0 0 16px; }
.review-card footer { font-size: 14px; color: var(--muted); font-weight: 500; }

/* Showroom */
.showroom-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  align-items: stretch;
}
.showroom-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 320px;
  background: var(--surface-muted);
}
.showroom-media img { width: 100%; height: 100%; object-fit: cover; }
.showroom-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.showroom-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.showroom-list li {
  padding-left: 16px;
  position: relative;
  font-size: 15px;
  color: var(--muted);
}
.showroom-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* FAQ */
.faq-list {
  max-width: 760px;
  margin-inline: auto;
  display: grid;
  gap: 8px;
}
.faq-item {
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 20px; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0; padding: 0 20px 18px; color: var(--muted); font-size: 15px; line-height: 1.5; }

/* Contacts */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 960px;
  margin-inline: auto;
}
.contact-card,
.contact-form {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.contact-channels { display: grid; gap: 8px; margin: 20px 0; }
.channel {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--bg);
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s;
}
.channel:hover { background: var(--accent-soft); }
.channel span { margin-left: auto; font-weight: 400; font-size: 13px; color: var(--muted); }

.contact-form { display: grid; gap: 12px; }
.contact-form textarea {
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  resize: vertical;
}
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  outline: none;
  background: var(--surface);
}
.form-status { margin: 0; font-size: 13px; color: var(--muted); min-height: 1.2em; }
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: #ff3b30; }

/* Footer */
.footer {
  padding: 32px 0 calc(var(--sticky-h) + 32px);
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 980px;
  background: rgba(245, 245, 247, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}
.sticky-cta .btn { min-height: 44px; font-size: 14px; }
.sticky-short { display: none; }

/* Responsive */
@media (max-width: 1024px) {
  .benefits-grid,
  .reasons-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .about-grid,
  .showroom-grid,
  .contacts-grid,
  .objects-grid { grid-template-columns: 1fr; }

  .joint-grid { grid-template-columns: repeat(2, 1fr); }
  .joint-hook { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }

  .menu-toggle { display: block; }
  .nav-cta { display: none; }

  .nav-links {
    display: none;
    position: fixed;
    left: 16px;
    right: 16px;
    top: calc(var(--nav-h) + 8px);
    z-index: 55;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 10px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    max-height: min(70vh, 480px);
    overflow-y: auto;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 16px; color: var(--fg); }
}

@media (max-width: 640px) {
  .container { width: min(100% - 32px, var(--container)); }

  .hero-actions .btn { width: 100%; }
  .calc-fields,
  .results-grid,
  .lead-row { grid-template-columns: 1fr; }

  .benefits-grid,
  .reasons-grid,
  .joint-grid { grid-template-columns: 1fr; }

  .block-chips { display: grid; grid-template-columns: 1fr; }

  .sticky-cta {
    left: 12px;
    right: 12px;
    border-radius: 16px;
  }
  .sticky-secondary { display: none; }
  .sticky-cta .btn-primary { width: 100%; }
  .sticky-full { display: none; }
  .sticky-short { display: inline; }

  .lead-actions { display: grid; grid-template-columns: 1fr; }
  .lead-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:active { transform: none; }
}
