/* ===== АМ-ремонт | Обустройство балконов — style.css ===== */
/* mobile-first; breakpoints: 600, 768, 1200 */

:root {
  --bg: #F7F8FA;
  --bg-alt: #FFFFFF;
  --bg-soft: #FBE5F4;
  --text: #1F2937;
  --text-muted: #6B7280;
  --accent: #D000B8;
  --accent-hover: #A0009C;
  --border: #E5E7EB;
  --success: #059669;
  --shadow: 0 2px 8px rgba(31, 41, 55, 0.06);
  --shadow-lg: 0 8px 24px rgba(31, 41, 55, 0.12);
  --radius: 12px;
  --container: 1200px;
  --gap: 16px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5em; line-height: 1.25; color: var(--text); font-weight: 700; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}
.section {
  padding: 48px 0;
}
.section--alt { background: var(--bg-alt); }
.section--soft { background: var(--bg-soft); }
.section__title {
  text-align: center;
  margin: 0 0 8px;
}
.section__subtitle {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 32px;
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s;
}
.header.is-scrolled { box-shadow: var(--shadow); }
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  max-width: var(--container);
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
}
.logo__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  flex: 0 0 36px;
}
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__title { font-size: 14px; }
.logo__sub { font-size: 11px; color: var(--text-muted); font-weight: 500; }

.header__right { display: flex; align-items: center; gap: 8px; }
.header__phone { display: none; font-weight: 700; color: var(--text); font-size: 14px; }
.header__phone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  flex: 0 0 44px;
}
.header__phone-icon:hover { background: var(--accent-hover); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-hover); }
.btn--secondary {
  background: var(--bg-alt);
  color: var(--text);
  border: 2px solid var(--accent);
}
.btn--secondary:hover { background: var(--accent); color: #fff; }
.btn--block { width: 100%; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 48px 0 56px;
  background:
    linear-gradient(135deg, rgba(31, 41, 55, .78), rgba(31, 41, 55, .55)),
    url("../images/works/balkon_am_remont_1.jpg") center / cover no-repeat;
  color: #fff;
}
.hero h1 {
  color: #fff;
  font-size: 1.65rem;
  max-width: 780px;
  margin-bottom: 16px;
}
.hero__lead {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, .92);
  max-width: 640px;
  margin-bottom: 24px;
}
.hero__checklist {
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero__checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 1rem;
  color: rgba(255, 255, 255, .95);
}
.hero__checklist svg { flex: 0 0 22px; margin-top: 2px; color: #34D399; }
.hero__cta { display: flex; flex-direction: column; gap: 12px; }
.hero__cta .btn--secondary {
  background: rgba(255,255,255,.1);
  border-color: #fff;
  color: #fff;
}
.hero__cta .btn--secondary:hover { background: #fff; color: var(--text); }

/* ===== Services ===== */
.services {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.service {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform .15s, box-shadow .15s;
}
.service:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.service__icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(217, 119, 6, .1);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.service h3 { margin: 0 0 6px; font-size: 1.1rem; }
.service p { margin: 0 0 12px; color: var(--text-muted); font-size: .95rem; }
.service__price {
  display: inline-block;
  font-weight: 700;
  color: var(--accent);
  font-size: 1rem;
}

/* ===== ЖК chips ===== */
.complexes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.complexes li {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: .95rem;
}

/* ===== Why us ===== */
.why {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
  justify-content: center;
}
.why__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
}
.why__icon {
  flex: 0 0 44px;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(5, 150, 105, .1);
  color: var(--success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.why__item h3 { margin: 0 0 4px; font-size: 1.05rem; }
.why__item p { margin: 0; color: var(--text-muted); font-size: .95rem; }

/* ===== Steps ===== */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}
.steps__item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  counter-increment: step;
}
.steps__item::before {
  content: counter(step);
  position: absolute;
  top: -14px; left: 20px;
  width: 36px; height: 36px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.steps__item h3 { margin: 8px 0 6px; font-size: 1.05rem; }
.steps__item p { margin: 0; color: var(--text-muted); font-size: .95rem; }

/* ===== Gallery (masonry via CSS columns) ===== */
.gallery {
  columns: 2;
  column-gap: var(--gap);
}
.gallery__item {
  break-inside: avoid;
  margin-bottom: var(--gap);
  display: block;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--bg-soft);
}
.gallery__item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .3s;
}
.gallery__item:hover img { transform: scale(1.03); }

/* ===== Testimonials ===== */
.testimonials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.testimonial {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.testimonial__img-wrap {
  position: relative;
  background: var(--bg-soft);
  aspect-ratio: 4/5;
  overflow: hidden;
}
.testimonial__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.testimonial__body {
  padding: 12px;
}
.testimonial__quote {
  font-size: .85rem;
  color: var(--text);
  margin: 0 0 6px;
  font-style: italic;
  line-height: 1.45;
}
.testimonial__author {
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ===== Article text ===== */
.article {
  max-width: 820px;
  margin: 0 auto;
}
.article h2 {
  font-size: 1.35rem;
  margin-top: 32px;
  margin-bottom: 12px;
}
.article h2:first-child { margin-top: 0; }
.article p { font-size: 1rem; margin-bottom: 14px; }
.article ul {
  list-style: disc;
  padding-left: 24px;
  margin: 0 0 16px;
}
.article ul li { margin-bottom: 6px; }

/* ===== Expert ===== */
.expert {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.expert__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 800;
}
.expert h3 { margin: 0 0 4px; font-size: 1.25rem; }
.expert__role { color: var(--text-muted); margin: 0 0 12px; }

/* ===== Contacts ===== */
.contacts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.contacts__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
}
.contact-row__icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(217, 119, 6, .1);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
}
.contact-row a { color: var(--text); font-weight: 600; }
.contact-row a:hover { color: var(--accent); }

.socials {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  transition: background .15s, color .15s, transform .15s;
}
.social:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-2px); }
.social svg { width: 24px; height: 24px; }

.form,
.cta-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.cta-card h3 { margin: 0 0 4px; font-size: 1.15rem; }
.cta-card p { margin: 0 0 16px; color: var(--text-muted); font-size: .9rem; }
.cta-card__notice {
  font-size: .8rem;
  color: var(--text-muted);
  text-align: center;
  margin: 10px 0 0;
}
.form h3 { margin: 0 0 4px; font-size: 1.15rem; }
.form p { margin: 0 0 16px; color: var(--text-muted); font-size: .9rem; }
.form__group { margin-bottom: 12px; }
.form__input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  background: var(--bg);
}
.form__input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}
.form__notice {
  font-size: .8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
}
.form__success {
  display: none;
  text-align: center;
  padding: 20px;
  color: var(--success);
  font-weight: 700;
}
.form.is-sent .form__success { display: block; }
.form.is-sent .form__fields { display: none; }

/* ===== Footer ===== */
.footer {
  background: var(--text);
  color: rgba(255, 255, 255, .8);
  padding: 32px 0 24px;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
}
.footer__logo { color: #fff; }
.footer__logo .logo__sub { color: rgba(255,255,255,.6); }
.footer__copy { font-size: .9rem; margin: 0; }
.footer__dev { font-size: .85rem; margin: 0; color: rgba(255,255,255,.55); }
.footer__phone { color: #fff; font-weight: 700; font-size: 1.05rem; }

/* ===== Lightbox dialog ===== */
.lightbox {
  width: min(92vw, 1100px);
  max-height: 92vh;
  padding: 0;
  border: 0;
  background: transparent;
  margin: auto;
}
.lightbox::backdrop {
  background: rgba(0, 0, 0, .88);
}
.lightbox__inner {
  position: relative;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}
.lightbox img {
  width: 100%;
  height: auto;
  max-height: 92vh;
  object-fit: contain;
  display: block;
}
.lightbox__close {
  position: absolute;
  top: 8px; right: 8px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  z-index: 2;
}
.lightbox__close:hover { background: rgba(0,0,0,.8); }

/* ===== Tablet ===== */
@media (min-width: 600px) {
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.85rem; }
  .container { padding: 0 24px; }
  .section { padding: 64px 0; }
  .hero { padding: 72px 0 80px; }
  .hero__cta { flex-direction: row; }
  .hero__cta .btn { flex: 1; }
  .services { grid-template-columns: 1fr 1fr; }
  .why { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr 1fr; }
  .gallery { columns: 3; }
  .testimonials { grid-template-columns: 1fr 1fr 1fr 1fr; }
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  .header__inner { padding: 14px 24px; }
  .logo__title { font-size: 16px; }
  .logo__sub { font-size: 12px; }
}

/* ===== Desktop ===== */
@media (min-width: 768px) {
  .container { padding: 0 32px; }
  .hero h1 { font-size: 2.4rem; }
  .hero__lead { font-size: 1.15rem; }
  .testimonials { grid-template-columns: 1fr 1fr 1fr 1fr; }
  .contacts { grid-template-columns: 1fr 1fr; align-items: start; }
  .expert { flex-direction: row; text-align: left; }
  .steps { grid-template-columns: repeat(5, 1fr); gap: 32px; }
  .steps__item { padding-top: 32px; }
  .steps__item::before { left: 50%; transform: translateX(-50%); }
  .steps__item h3, .steps__item p { text-align: center; }
}

@media (min-width: 1200px) {
  .header__phone {
    display: inline-flex;
    font-size: 16px;
  }
  .header__phone-icon { display: none; }
  .services { grid-template-columns: repeat(3, 1fr); }
  .why { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery { columns: 4; }
  .testimonials { grid-template-columns: repeat(4, 1fr); }
}
