:root {
  --color-primary: #0d3b66;
  --color-primary-hover: #0a2f52;
  --color-bg: #ffffff;
  --color-section: #fcf8f0;
  --color-text: #1a1a1a;
  --color-muted: #5c5c5c;
  --color-border: #e0dcd4;
  --color-check: #2a9d8f;
  --font: 'Manrope', system-ui, -apple-system, sans-serif;
  --container: 1200px;
  --radius: 8px;
  --shadow: 0 4px 24px rgba(13, 59, 102, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
}

.section--beige {
  background: var(--color-section);
}

.section__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 48px;
}

.section__title--left {
  text-align: left;
  margin-bottom: 28px;
}

.section__title--decor {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.section__title--decor::before,
.section__title--decor::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 2px;
  background: var(--color-border);
}

/* Header */
.header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px 16px;
  max-width: var(--container);
  margin: 0 auto;
  gap: 16px;
}

.header__logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
}

.header__logo:hover {
  opacity: 0.85;
}

.header__region {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-top: 4px;
}

.header__since {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.header__contacts {
  text-align: right;
}

.header__phone {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  display: block;
}

.header__phone:hover {
  text-decoration: underline;
}

.header__social {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin: 8px 0 4px;
}

.header__social-link {
  color: var(--color-primary);
  opacity: 0.85;
  transition: opacity 0.2s;
}

.header__social-link:hover {
  opacity: 1;
}

.header__hours {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  display: block;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

.burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.is-open span:nth-child(2) {
  opacity: 0;
}

.burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav {
  border-top: 1px solid var(--color-border);
}

.nav__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  padding: 14px 24px;
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Hero */
.hero {
  padding: 56px 0 72px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero__title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: 28px;
}

.hero__list {
  margin-bottom: 32px;
}

.hero__list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.hero__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  background: var(--color-check);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero__image-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid var(--color-primary);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn--primary:hover:not(:disabled) {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
}

.btn--outline:hover {
  background: rgba(13, 59, 102, 0.06);
}

.btn--full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Services */
.services__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.service-card {
  text-align: center;
}

.service-card__img {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  margin-bottom: 14px;
  display: block;
  object-fit: cover;
}

.service-card__img--placeholder {
  background: linear-gradient(135deg, #7a8b99 0%, #4a5568 100%);
}

.service-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.service-card__text {
  font-size: 0.8rem;
  color: var(--color-muted);
  line-height: 1.4;
}

/* Prices */
.prices__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.table-scroll {
  overflow-x: auto;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.price-table th,
.price-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.price-table th {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

.price-table tr:last-child td {
  border-bottom: none;
}

.price-table tbody tr:hover {
  background: rgba(13, 59, 102, 0.04);
}

/* Forms */
.form__group {
  margin-bottom: 18px;
}

.form__group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--color-text);
}

.form__group input,
.form__group select,
.form__group textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form__group input:focus,
.form__group select:focus,
.form__group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(13, 59, 102, 0.12);
}

.form__group input.is-invalid,
.form__group select.is-invalid {
  border-color: #c0392b;
}

.form__group input[type="file"] {
  padding: 10px;
  font-size: 0.85rem;
}

.form__status {
  min-height: 1.25rem;
  font-size: 0.875rem;
  margin-bottom: 12px;
}

.form__status--success {
  color: var(--color-check);
}

.form__status--error {
  color: #c0392b;
}

.calculator {
  background: var(--color-bg);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Works */
.works__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 36px;
}

.works__header .section__title {
  margin-bottom: 0;
}

.works__link {
  font-size: 0.9rem;
  color: var(--color-primary);
  font-weight: 500;
}

.works__link:hover {
  text-decoration: underline;
}

.works__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.work-card__img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.work-card__caption {
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: 1.4;
}

/* Info */
.info__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.info__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 20px;
}

.info__steps {
  counter-reset: step;
}

.info__steps li {
  position: relative;
  padding-left: 36px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.info__steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
  line-height: 24px;
  text-align: center;
}

.advantages__item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.advantages__icon {
  flex-shrink: 0;
  color: var(--color-primary);
}

.info__text {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
  color: var(--color-muted);
}

.info__legal {
  font-size: 0.8rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.info__link {
  font-size: 0.875rem;
  color: var(--color-primary);
  text-decoration: underline;
}

.info__link:hover {
  opacity: 0.85;
}

/* Footer */
.footer {
  background: var(--color-primary);
  color: #fff;
  padding: 20px 0;
  font-size: 0.85rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer__link {
  opacity: 0.9;
}

.footer__link:hover {
  text-decoration: underline;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.modal__content {
  position: relative;
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.75rem;
  line-height: 1;
  border: none;
  background: none;
  color: var(--color-muted);
  cursor: pointer;
  padding: 4px;
}

.modal__close:hover {
  color: var(--color-primary);
}

.modal__title {
  font-size: 1.35rem;
  color: var(--color-primary);
  margin-bottom: 24px;
}

body.modal-open {
  overflow: hidden;
}

/* Responsive */
@media (max-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero__grid,
  .prices__grid {
    grid-template-columns: 1fr;
  }

  .hero__image-wrap {
    order: -1;
  }

  .info__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 768px) {
  .burger {
    display: flex;
  }

  .header__contacts {
    display: none;
  }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .nav.is-open {
    max-height: 400px;
  }

  .nav__inner {
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px 24px;
  }

  .nav__link {
    padding: 12px 0;
    border-bottom: none;
  }

  .section {
    padding: 48px 0;
  }

  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .works__grid {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .section__title--decor::before,
  .section__title--decor::after {
    max-width: 48px;
  }
}

@media (max-width: 480px) {
  .services__grid {
    grid-template-columns: 1fr;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }
}

/* Cookie notice */
.cookie-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100% - 48px);
  padding: 10px 20px;
  background: var(--color-bg);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cookie-notice.is-visible {
  opacity: 1;
}

.cookie-notice__text {
  margin: 0;
  font-size: 0.9375rem;
  white-space: nowrap;
}

.cookie-notice__text a {
  color: var(--color-primary);
  text-decoration: underline;
}

.cookie-notice__text a:hover {
  opacity: 0.85;
}

.cookie-notice__btn {
  flex-shrink: 0;
  padding: 8px 20px;
  border: none;
  border-radius: 999px;
  background: #f0f0f0;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
}

.cookie-notice__btn:hover {
  background: #e4e4e4;
}
