/* ============================================================
   ГРАНИТ — спецтехника и расчистка участков
   Стили: mobile-first, без библиотек
   ============================================================ */

:root {
  /* Цвета */
  --color-graphite: #23262b;      /* основной тёмный */
  --color-graphite-dark: #191b1f; /* подвал, hero-оверлей */
  --color-accent: #f5a623;        /* строительный акцент */
  --color-accent-dark: #d98f10;   /* hover */
  --color-bg: #ffffff;
  --color-bg-soft: #f5f6f8;       /* фоновые секции */
  --color-text: #23262b;
  --color-text-muted: #5b6069;
  --color-border: #e3e5e9;
  --color-white: #ffffff;
  --color-success: #1f8a4c;
  --color-error: #d3382e;

  /* Типографика */
  --font-main: "Inter", "Segoe UI", Roboto, -apple-system, Arial, sans-serif;

  /* Прочее */
  --radius: 12px;
  --shadow: 0 6px 24px rgba(25, 27, 31, 0.09);
  --shadow-hover: 0 12px 32px rgba(25, 27, 31, 0.16);
  --header-height: 64px;
  --container: 1160px;
}

/* ---------- Сброс и база ---------- */

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

html {
  scroll-behavior: smooth;
  /* якоря не прячутся под фиксированной шапкой */
  scroll-padding-top: calc(var(--header-height) + 12px);
}

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

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, p, ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.97);
}

.btn--accent {
  background: var(--color-accent);
  color: var(--color-graphite-dark);
}

.btn--accent:hover {
  background: var(--color-accent-dark);
}

.btn--lg {
  min-height: 56px;
  padding: 16px 32px;
  font-size: 17px;
}

.btn--whatsapp {
  background: #25d366;
  color: #fff;
}

.btn--whatsapp:hover {
  background: #1eb857;
}

.btn--telegram {
  background: #229ed9;
  color: #fff;
}

.btn--telegram:hover {
  background: #1d8bc0;
}

/* ---------- Шапка ---------- */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  flex-direction: column;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--color-graphite);
}

.logo__dot {
  display: inline;
  color: var(--color-accent);
}

.logo__tagline {
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__link {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-graphite);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav__link:hover {
  color: var(--color-accent-dark);
  border-color: var(--color-accent);
}

.nav__cta {
  min-height: 44px;
  padding: 10px 20px;
  font-size: 15px;
}

/* Бургер (мобильное меню) */

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 2.5px;
  width: 100%;
  background: var(--color-graphite);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.burger.is-open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.burger.is-open span:nth-child(2) {
  opacity: 0;
}

.burger.is-open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 92svh;
  padding: calc(var(--header-height) + 48px) 0 64px;
  color: var(--color-white);
  /* Фото техники за работой. Замените images/hero.jpg на своё
     горизонтальное фото (мульчер/экскаватор в работе), ≥1600px по ширине. */
  background:
    linear-gradient(180deg, rgba(25, 27, 31, 0.72) 0%, rgba(25, 27, 31, 0.55) 55%, rgba(25, 27, 31, 0.8) 100%),
    url("images/hero.jpg") center / cover no-repeat;
  background-color: var(--color-graphite-dark); /* фолбэк, пока фото не загрузилось */
}

.hero__inner {
  max-width: 820px;
  margin: 0;
  padding-left: 20px;
  padding-right: 20px;
}

@media (min-width: 1200px) {
  .hero__inner {
    margin-left: calc((100vw - var(--container)) / 2);
  }
}

.hero__title {
  font-size: clamp(30px, 6vw, 54px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.hero__subtitle {
  margin-top: 20px;
  max-width: 620px;
  font-size: clamp(16px, 2.2vw, 19px);
  color: rgba(255, 255, 255, 0.88);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 32px;
}

.hero__phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.hero__phone:hover {
  color: var(--color-accent);
}

.hero__phone .icon {
  color: var(--color-accent);
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 40px;
}

.hero__badges li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.hero__badges li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--color-accent);
}

/* ---------- Секции ---------- */

.section {
  padding: 72px 0;
}

.section__title {
  font-size: clamp(26px, 4.5vw, 40px);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.section__title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  margin-top: 14px;
  background: var(--color-accent);
}

.section__lead {
  margin-top: 16px;
  max-width: 640px;
  font-size: 17px;
  color: var(--color-text-muted);
}

/* ---------- Услуги ---------- */

.services {
  background: var(--color-bg-soft);
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 40px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.card__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--color-bg-soft);
}

.card__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 24px;
}

.card__title {
  font-size: 22px;
  font-weight: 800;
}

.card__desc {
  margin-top: 12px;
  font-size: 15px;
  color: var(--color-text-muted);
}

.card__list {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.card__list li {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
  line-height: 1.5;
}

.card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--color-accent);
}

.card__footer {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card__price {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.2;
}

.card__price span {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ---------- О компании ---------- */

.about__text {
  margin-top: 28px;
  max-width: 780px;
  font-size: 18px;
  line-height: 1.7;
}

.about__features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 44px;
}

.feature {
  padding: 28px 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow);
}

.feature__icon {
  width: 40px;
  height: 40px;
  color: var(--color-accent);
}

.feature h3 {
  margin-top: 16px;
  font-size: 17px;
  font-weight: 800;
}

.feature p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ---------- Отзывы ---------- */

.reviews {
  background: var(--color-graphite);
  color: var(--color-white);
}

.reviews .section__lead {
  color: rgba(255, 255, 255, 0.7);
}

.reviews__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 40px;
}

.review {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}

.review__head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.review__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--color-accent);
  color: var(--color-graphite-dark);
  font-weight: 900;
  font-size: 19px;
}

.review__name {
  font-weight: 800;
  font-size: 16px;
}

.review__service {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

.review__stars {
  margin-left: auto;
  color: var(--color-accent);
  font-size: 16px;
  letter-spacing: 2px;
}

.review__text {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
}

.reviews__source {
  margin-top: 32px;
  text-align: center;
  font-size: 14px;
}

.reviews__source a {
  color: rgba(255, 255, 255, 0.65);
  font-weight: 600;
  transition: color 0.2s ease;
}

.reviews__source a:hover {
  color: var(--color-accent);
}

/* ---------- Заявка + контакты ---------- */

.request {
  background: var(--color-bg-soft);
}

.request__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.form {
  margin-top: 32px;
  display: grid;
  gap: 20px;
}

.form__group {
  display: grid;
  gap: 8px;
}

.form__label {
  font-size: 14px;
  font-weight: 700;
}

.form__required {
  color: var(--color-error);
}

.form__input {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.25);
}

.form__input.is-invalid {
  border-color: var(--color-error);
}

.form__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%235b6069' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}

.form__textarea {
  resize: vertical;
  min-height: 110px;
}

.form__error {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-error);
}

.form__submit {
  justify-self: start;
}

.form__success {
  padding: 14px 18px;
  border-radius: var(--radius);
  background: rgba(31, 138, 76, 0.1);
  border: 1px solid rgba(31, 138, 76, 0.35);
  color: var(--color-success);
  font-weight: 700;
  font-size: 15px;
}

/* Контакты рядом с формой */

.request__contacts {
  align-self: start;
  padding: 32px 28px;
  background: var(--color-graphite);
  color: var(--color-white);
  border-radius: var(--radius);
}

.request__contacts-title {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
}

.request__phone {
  display: inline-block;
  margin-top: 12px;
  font-size: clamp(26px, 5vw, 32px);
  font-weight: 900;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.request__phone:hover {
  color: var(--color-accent);
}

.request__note {
  margin-top: 8px;
  font-size: 14px;
  color: var(--color-accent);
  font-weight: 700;
}

.request__messengers {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.request__geo {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  display: grid;
  gap: 6px;
}

.request__geo strong {
  color: var(--color-white);
}

/* ---------- Подвал ---------- */

.footer {
  background: var(--color-graphite-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 48px 0 0;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 40px;
}

.footer__logo {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--color-white);
}

.footer__text {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.6;
}

.footer__nav {
  display: grid;
  gap: 12px;
  align-content: start;
}

.footer__nav a {
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer__nav a:hover {
  color: var(--color-accent);
}

.footer__phone {
  display: inline-block;
  font-size: 20px;
  font-weight: 800;
  color: var(--color-white);
  transition: color 0.2s ease;
}

.footer__phone:hover {
  color: var(--color-accent);
}

.footer__avito {
  display: block;
  margin-top: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-accent);
}

.footer__avito:hover {
  text-decoration: underline;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  padding-bottom: 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================================
   Адаптив: планшет и десктоп
   ============================================================ */

/* Мобильное меню (до 900px) */
@media (max-width: 900px) {
  .burger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 20px 24px;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav__link {
    padding: 12px 4px;
    border-bottom: 1px solid var(--color-border);
    font-size: 16px;
  }

  .nav__cta {
    margin-top: 12px;
  }
}

@media (min-width: 640px) {
  .about__features {
    grid-template-columns: repeat(2, 1fr);
  }

  .reviews__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .section {
    padding: 96px 0;
  }

  .services__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .request__inner {
    grid-template-columns: 1.4fr 1fr;
    gap: 56px;
  }

  .request__contacts {
    margin-top: 96px;
    position: sticky;
    top: calc(var(--header-height) + 24px);
  }

  .footer__inner {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

@media (min-width: 1100px) {
  .about__features {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================================
   УСЛУГИ 2.0 — тег, галерея-карусель, характеристики, детали
   ============================================================ */

.card__tag {
  align-self: flex-start;
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  background: rgba(245, 166, 35, 0.12);
  border-radius: 100px;
}

/* --- Галерея с перелистыванием --- */
.gallery {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-bg-soft);
}

.gallery__track {
  display: flex;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery__img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(25, 27, 31, 0.5);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.gallery__nav:hover {
  background: var(--color-accent);
  color: var(--color-graphite-dark);
}

.gallery__nav--prev { left: 10px; }
.gallery__nav--next { right: 10px; }

/* на устройствах с мышью — прячем стрелки до наведения */
@media (hover: hover) {
  .gallery__nav { opacity: 0; }
  .gallery:hover .gallery__nav,
  .gallery__nav:focus-visible { opacity: 1; }
}

.gallery__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.gallery__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.6);
  transition: background 0.2s ease, transform 0.2s ease;
}

.gallery__dot.is-active {
  background: var(--color-accent);
  transform: scale(1.2);
}

/* --- Таблица характеристик --- */
.specs {
  margin-top: 18px;
  border-top: 1px solid var(--color-border);
}

.specs__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 13.5px;
}

.specs__row dt {
  color: var(--color-text-muted);
  flex: 0 0 auto;
}

.specs__row dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
}

/* --- Раскрывающийся блок «подробнее» --- */
.card__more {
  margin-top: 18px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
}

.card__more summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-graphite);
  background: var(--color-bg-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.2s ease;
}

.card__more summary:hover { background: #eef0f3; }
.card__more summary::-webkit-details-marker { display: none; }

.card__more summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  color: var(--color-accent-dark);
}

.card__more[open] summary::after { content: "\2013"; }

.card__more-body { padding: 2px 14px 14px; }

.card__more-title {
  margin: 16px 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.card__more-body .card__list { margin-top: 0; }

/* ============================================================
   Выравнивание блоков карточек по общей сетке (subgrid).
   На десктопе все карточки делят одни строки: галерея, тег,
   заголовок, описание, характеристики, «подробнее», футер —
   поэтому одинаковые блоки начинаются на одной линии.
   ============================================================ */
@media (min-width: 900px) {
  .services__grid {
    grid-template-rows: repeat(7, auto);
  }

  .card {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 7;
  }

  .card__body {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: 2 / -1;
    /* внутренние отступы блоков задаются их собственными margin */
  }

  .card__tag {
    justify-self: start;
  }

  .card__footer {
    margin-top: 0;
    align-self: end;
  }
}
