/* ==========================================================================
   АвтоХаб — кузовной автосервис (Казань)
   Тёплый, дружелюбный, «свой» сервис по-соседски.
   Палитра: терракота/персик + кремовый фон + графитовый текст + мятный акцент
   Шрифты: Fredoka (заголовки) + Karla (текст)
   ========================================================================== */

:root {
  /* Colors */
  --terracotta: #D9713C;
  --terracotta-dark: #C15E2C;
  --peach: #E8955C;
  --peach-soft: #F3C9A6;
  --cream: #FBF3EA;
  --cream-deep: #F4E7D6;
  --card: #FFFFFF;
  --graphite: #2E2A26;
  --graphite-soft: #5E564E;
  --mint: #7FA88B;
  --mint-dark: #5F8A6C;
  --mint-soft: #DCE9E0;
  --line: #EADFD0;

  /* Type */
  --font-display: 'Fredoka', 'Segoe UI', sans-serif;
  --font-body: 'Karla', 'Segoe UI', sans-serif;

  --text-hero: clamp(2.6rem, 6vw, 4.4rem);
  --text-2xl: clamp(2rem, 4vw, 3rem);
  --text-xl: clamp(1.5rem, 2.6vw, 2.1rem);
  --text-lg: 1.25rem;
  --text-base: 1.0625rem;
  --text-sm: 0.9375rem;
  --text-xs: 0.8125rem;

  /* Space */
  --space-sec: clamp(4rem, 8vw, 7.5rem);
  --radius: 22px;
  --radius-lg: 34px;
  --shadow-sm: 0 4px 16px rgba(46, 42, 38, 0.06);
  --shadow-md: 0 14px 40px rgba(46, 42, 38, 0.10);
  --maxw: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--graphite);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--graphite);
  line-height: 1.1;
  margin: 0;
  font-weight: 600;
}

p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }

.eyebrow {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--terracotta);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 3px; border-radius: 3px;
  background: var(--mint);
}

.section-title { font-size: var(--text-2xl); margin-bottom: 1rem; }
.section-intro { max-width: 62ch; color: var(--graphite-soft); font-size: var(--text-lg); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-base);
  padding: 0.85rem 1.6rem;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn-primary { background: var(--mint); color: #fff; box-shadow: 0 8px 20px rgba(95, 138, 108, 0.28); }
.btn-primary:hover { background: var(--mint-dark); transform: translateY(-2px); }
.btn-terra { background: var(--terracotta); color: #fff; box-shadow: 0 8px 20px rgba(217, 113, 60, 0.28); }
.btn-terra:hover { background: var(--terracotta-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--graphite); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--terracotta); color: var(--terracotta); }

/* ============================ HEADER ============================ */
.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251, 243, 234, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.header.scrolled { box-shadow: var(--shadow-sm); border-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 0; }
.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand svg { width: 42px; height: 42px; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; color: var(--graphite); }
.brand-name b { color: var(--terracotta); }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a { font-size: var(--text-sm); font-weight: 500; color: var(--graphite-soft); transition: color 0.15s; }
.nav a:hover { color: var(--terracotta); }
.header-cta { display: flex; align-items: center; gap: 1rem; }
.header-phone { font-family: var(--font-display); font-weight: 500; color: var(--graphite); white-space: nowrap; }
.header-phone:hover { color: var(--terracotta); }

.burger { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.burger span { display: block; width: 26px; height: 3px; border-radius: 3px; background: var(--graphite); margin: 5px 0; transition: 0.25s; }

/* ============================ HERO ============================ */
.hero { padding: clamp(2rem, 5vw, 4rem) 0 var(--space-sec); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 2rem; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--mint-soft); color: var(--mint-dark);
  font-weight: 700; font-size: var(--text-sm);
  padding: 0.4rem 0.9rem; border-radius: 100px; margin-bottom: 1.4rem;
}
.hero h1 { font-size: var(--text-hero); margin-bottom: 1.2rem; }
.hero h1 .accent { color: var(--terracotta); }
.hero-lead { font-size: var(--text-lg); color: var(--graphite-soft); max-width: 44ch; margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1.8rem; }
.hero-owner { display: flex; align-items: center; gap: 0.8rem; font-size: var(--text-sm); color: var(--graphite-soft); }
.hero-owner .sig { font-family: var(--font-display); font-weight: 600; color: var(--graphite); font-size: var(--text-base); }
.hero-visual { position: relative; }
.hero-visual img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.hero-visual::after {
  content: ""; position: absolute; inset: -18px -18px auto auto;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, var(--peach-soft), transparent 70%);
  z-index: -1;
}

/* Personal note card */
.note {
  margin-top: var(--space-sec);
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 4vw, 3rem);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  display: grid; grid-template-columns: auto 1fr; gap: 1.8rem; align-items: start;
}
.note-mark {
  width: 66px; height: 66px; flex: none; border-radius: 20px;
  background: var(--terracotta); color: #fff;
  display: grid; place-items: center; font-family: var(--font-display);
  font-size: 2rem; font-weight: 600;
}
.note-mark svg { width: 32px; height: 32px; }
.note h2 { font-size: var(--text-xl); margin-bottom: 0.9rem; }
.note p { color: var(--graphite-soft); }
.note .sign { font-family: var(--font-display); font-weight: 600; color: var(--terracotta); margin-top: 0.6rem; }

/* ============================ WHY ============================ */
.why { padding: var(--space-sec) 0; }
.why-head { text-align: center; max-width: 60ch; margin: 0 auto 3rem; }
.why-head .section-intro { margin: 0 auto; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.why-card {
  background: var(--card); border-radius: var(--radius); padding: 2rem 1.7rem;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.why-card .icon {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center;
  background: var(--cream-deep); margin-bottom: 1.1rem;
}
.why-card .icon svg { width: 30px; height: 30px; }
.why-card h3 { font-size: var(--text-lg); margin-bottom: 0.5rem; }
.why-card p { color: var(--graphite-soft); font-size: var(--text-sm); margin: 0; }
.why-card:nth-child(2) .icon { background: var(--mint-soft); }
.why-card:nth-child(3) .icon { background: #F6DFD0; }
.why-card:nth-child(4) .icon { background: var(--mint-soft); }
.why-card:nth-child(5) .icon { background: #F6DFD0; }
.why-card:nth-child(6) .icon { background: var(--cream-deep); }

/* ============================ SERVICES ============================ */
.services { padding: var(--space-sec) 0; background: var(--cream-deep); }
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-top: 2.5rem; }
.svc {
  background: var(--card); border-radius: var(--radius); padding: 1.6rem 1.7rem;
  display: flex; gap: 1.1rem; align-items: flex-start; box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.svc .dot { width: 46px; height: 46px; flex: none; border-radius: 14px; background: var(--terracotta); color: #fff; display: grid; place-items: center; }
.svc .dot svg { width: 24px; height: 24px; }
.svc h3 { font-size: var(--text-lg); margin-bottom: 0.35rem; }
.svc p { margin: 0; color: var(--graphite-soft); font-size: var(--text-sm); }

/* ============================ STEPS ============================ */
.steps { padding: var(--space-sec) 0; }
.steps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.steps-visual img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.step { display: flex; gap: 1.1rem; padding: 1.1rem 0; border-bottom: 1px dashed var(--line); }
.step:last-child { border-bottom: none; }
.step .num {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: var(--mint); color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 1.2rem;
}
.step h3 { font-size: var(--text-lg); margin-bottom: 0.25rem; }
.step p { margin: 0; color: var(--graphite-soft); font-size: var(--text-sm); }

/* ============================ PARTNERS ============================ */
.partners { padding: var(--space-sec) 0; background: var(--graphite); color: var(--cream); }
.partners h2, .partners h3 { color: var(--cream); }
.partners .eyebrow { color: var(--peach); }
.partners .eyebrow::before { background: var(--peach); }
.partners-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.partners-lead { color: #D8CFC4; font-size: var(--text-lg); max-width: 46ch; }
.partners-list { list-style: none; padding: 0; margin: 1.8rem 0; display: grid; gap: 0.9rem; }
.partners-list li { display: flex; gap: 0.75rem; align-items: flex-start; color: #E7DFD5; font-size: var(--text-sm); }
.partners-list svg { width: 22px; height: 22px; flex: none; color: var(--peach); margin-top: 2px; }
.partners-visual img { border-radius: var(--radius-lg); box-shadow: 0 20px 50px rgba(0,0,0,0.35); }
.partners-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.partners .btn-ghost { color: var(--cream); border-color: rgba(255,255,255,0.25); }
.partners .btn-ghost:hover { border-color: var(--peach); color: var(--peach); }

/* ============================ REVIEWS ============================ */
.reviews { padding: var(--space-sec) 0; }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.5rem; }
.review {
  background: var(--card); border-radius: var(--radius); padding: 1.8rem;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.review .stars { color: var(--terracotta); font-size: 1.1rem; letter-spacing: 2px; margin-bottom: 0.8rem; }
.review p { color: var(--graphite); font-size: var(--text-base); flex: 1; }
.review .who { display: flex; align-items: center; gap: 0.75rem; margin-top: 1rem; }
.review .avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--peach); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; }
.review .avatar.m2 { background: var(--mint); }
.review .avatar.m3 { background: var(--terracotta); }
.review .name { font-family: var(--font-display); font-weight: 500; }
.review .date { font-size: var(--text-xs); color: var(--graphite-soft); }

/* ============================ FAQ ============================ */
.faq { padding: var(--space-sec) 0; background: var(--cream-deep); }
.faq-list { max-width: 820px; margin: 2.5rem auto 0; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 0.9rem; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 1.3rem 1.6rem; font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg);
  color: var(--graphite); display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-q .plus { flex: none; width: 26px; height: 26px; position: relative; transition: transform 0.25s; }
.faq-q .plus::before, .faq-q .plus::after { content: ""; position: absolute; background: var(--terracotta); border-radius: 2px; }
.faq-q .plus::before { top: 50%; left: 0; right: 0; height: 3px; transform: translateY(-50%); }
.faq-q .plus::after { left: 50%; top: 0; bottom: 0; width: 3px; transform: translateX(-50%); transition: transform 0.25s; }
.faq-item.open .plus::after { transform: translateX(-50%) scaleY(0); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-a p { padding: 0 1.6rem 1.4rem; margin: 0; color: var(--graphite-soft); font-size: var(--text-base); }

/* ============================ CONTACTS ============================ */
.contacts { padding: var(--space-sec) 0; }
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.contact-cards { display: grid; gap: 1rem; }
.c-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: flex; gap: 1rem; align-items: flex-start; box-shadow: var(--shadow-sm); }
.c-card .ci { width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--mint-soft); display: grid; place-items: center; }
.c-card .ci svg { width: 24px; height: 24px; color: var(--mint-dark); }
.c-card h3 { font-size: var(--text-base); margin-bottom: 0.2rem; font-family: var(--font-display); }
.c-card a, .c-card p { color: var(--graphite-soft); margin: 0; font-size: var(--text-sm); }
.c-card a:hover { color: var(--terracotta); }
.c-note { font-size: var(--text-xs); color: var(--graphite-soft); font-style: italic; }

.form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.6rem, 3vw, 2.4rem); box-shadow: var(--shadow-sm); }
.form h3 { font-size: var(--text-xl); margin-bottom: 0.4rem; }
.form p.sub { color: var(--graphite-soft); font-size: var(--text-sm); margin-bottom: 1.4rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: var(--text-sm); font-weight: 500; margin-bottom: 0.35rem; }
.field input, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: var(--text-base);
  padding: 0.8rem 1rem; border: 1.5px solid var(--line); border-radius: 14px; background: var(--cream);
  color: var(--graphite); transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--terracotta); }
.form-ok { display: none; background: var(--mint-soft); color: var(--mint-dark); padding: 0.9rem 1.1rem; border-radius: 14px; font-weight: 700; margin-bottom: 1rem; }
.form-ok.show { display: block; }

/* ============================ FOOTER ============================ */
.footer { background: var(--graphite); color: #C9C0B6; padding: 3.5rem 0 2rem; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.footer .brand-name { color: var(--cream); }
.footer-about { max-width: 38ch; font-size: var(--text-sm); margin-top: 1rem; }
.footer h4 { color: var(--cream); font-family: var(--font-display); font-size: var(--text-base); margin-bottom: 0.9rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.footer ul a { font-size: var(--text-sm); }
.footer ul a:hover { color: var(--peach); }
.legal { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 1.6rem; font-size: var(--text-xs); line-height: 1.8; color: #9C9389; }
.legal strong { color: #C9C0B6; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 900px) {
  .nav, .header-phone { display: none; }
  .burger { display: block; }
  .brand-name { font-size: 1.25rem; }
  .header-cta .btn-primary { padding: 0.6rem 1.1rem; font-size: var(--text-sm); }
  .header .nav.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem;
    position: absolute; top: 100%; left: 0; right: 0; background: var(--cream);
    padding: 1.5rem 1.5rem 2rem; box-shadow: var(--shadow-md); border-top: 1px solid var(--line);
  }
  .hero-grid, .steps-grid, .partners-grid, .contacts-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .why-grid, .reviews-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .note { grid-template-columns: 1fr; }
}
@media (min-width: 561px) and (max-width: 900px) {
  .why-grid, .reviews-grid { grid-template-columns: 1fr 1fr; }
}
