:root {
  --color-bg: #f5f2ef;
  --color-surface: #ffffff;
  --color-text: #2c2927;
  --color-muted: #6d6762;
  --color-primary: #7b4b3a;
  --color-primary-dark: #593328;
  --color-accent: #8f6957;
  --color-border: #e2d9d4;
  --color-shadow: rgba(67, 44, 34, 0.12);
  --container: 1120px;
  --radius: 14px;
  --shadow: 0 14px 38px var(--color-shadow);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image: url("../images/fon.jpg");
  background-repeat: repeat;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
iframe,
object {
  max-width: 100%;
}

img {
  display: block;
  height: auto;
}

a {
  color: var(--color-primary);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-primary-dark);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea,
select {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(123, 75, 58, 0.35);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: #fff;
  background: var(--color-primary-dark);
  border-radius: 8px;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 4px 18px rgba(67, 44, 34, 0.06);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 92px;
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--color-primary-dark);
  text-decoration: none;
}

.brand__logo {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
}

.brand__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand__name {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand__subtitle {
  color: var(--color-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.header-contact {
  display: grid;
  justify-items: end;
  gap: 2px;
  flex: 0 0 auto;
  text-align: right;
}

.header-contact__phone {
  color: var(--color-text);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
}

.header-contact__hours {
  color: var(--color-accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.nav-wrap {
  border-top: 1px solid var(--color-border);
}

.nav-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 0;
  color: var(--color-text);
  background: transparent;
  border: 0;
  font-weight: 800;
  cursor: pointer;
}

.menu-toggle__icon,
.menu-toggle__icon::before,
.menu-toggle__icon::after {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle__icon {
  position: relative;
}

.menu-toggle__icon::before,
.menu-toggle__icon::after {
  position: absolute;
  left: 0;
  content: "";
}

.menu-toggle__icon::before {
  top: -7px;
}

.menu-toggle__icon::after {
  top: 7px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  width: 100%;
}

.site-nav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  display: block;
  padding: 14px 22px;
  color: var(--color-muted);
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
  color: var(--color-primary-dark);
  background: #f0e9e5;
}

main {
  min-height: 55vh;
}

.hero {
  padding-block: 32px 18px;
}

.hero__image {
  width: 100%;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.content-section {
  padding-block: 18px 56px;
}

.content-card {
  padding: clamp(24px, 5vw, 52px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.page-title {
  max-width: 860px;
  margin: 0 0 24px;
  color: var(--color-primary-dark);
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.lead {
  max-width: 880px;
  margin: 0 0 24px;
  color: #4d4743;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.content-card p {
  max-width: 900px;
  margin: 0 0 18px;
}

.content-card p:last-child {
  margin-bottom: 0;
}

.quote {
  margin: 0 0 28px;
  padding: 20px 22px;
  background: #f7f2ef;
  border-left: 4px solid var(--color-accent);
  border-radius: 0 10px 10px 0;
  color: #504741;
  font-style: italic;
}

.quote cite {
  display: block;
  margin-top: 8px;
  color: var(--color-muted);
  font-size: 0.92rem;
  font-style: normal;
}

.section-title {
  margin: 30px 0 14px;
  color: var(--color-primary-dark);
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  line-height: 1.25;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}

.service-list__item {
  min-height: 100%;
  padding: 20px;
  background: #faf8f6;
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.service-list__title {
  display: block;
  margin-bottom: 6px;
  color: var(--color-primary-dark);
  font-weight: 800;
}

.documents-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.document-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 24px;
  background: #faf8f6;
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.document-card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  color: var(--color-primary);
  background: #efe5df;
  border-radius: 10px;
}

.document-card__icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.document-card h2 {
  margin: 0 0 8px;
  color: var(--color-text);
  font-size: 1.12rem;
  line-height: 1.35;
}

.document-card p {
  margin: 0 0 18px;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.document-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  color: #fff;
  background: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: 9px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.button:hover {
  color: #fff;
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-1px);
}

.button--secondary {
  color: var(--color-primary-dark);
  background: transparent;
  border-color: var(--color-border);
}

.button--secondary:hover {
  color: var(--color-primary-dark);
  background: #f0e9e5;
  border-color: #d5c5bd;
}

.content-section--contacts {
  padding-bottom: 56px;
}

.contact-info {
  width: 100%;
}

.contact-details {
  margin: 0;
}

.contact-details__row {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  align-items: baseline;
  column-gap: 32px;
  padding: 15px 0;
  border-bottom: 1px solid var(--color-border);
}

.contact-details__row:first-child {
  padding-top: 0;
}

.contact-details__row:last-child {
  border-bottom: 0;
}

.contact-details dt,
.contact-details dd {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
}

.contact-details dt {
  color: #5f5752;
  font-weight: 700;
}

.contact-details dd {
  min-width: 0;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.map-title {
  margin: 0 0 12px;
  color: var(--color-primary-dark);
  font-size: 1.25rem;
}

.contact-map {
  width: 100%;
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
}

.contact-map__header {
  margin-bottom: 16px;
}

.contact-map__header .map-title {
  margin-bottom: 4px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.contact-map__description {
  margin: 0;
  color: var(--color-muted);
}

.contact-map__description a {
  font-weight: 700;
}

.map-embed {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  background: #ece8e5;
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.map-embed iframe {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  border: 0;
}

.site-footer {
  color: #ded5d0;
  background: #342723;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 24px;
}

.footer-company {
  color: #fff;
  font-weight: 700;
}

.footer-meta {
  color: #bfb3ad;
  font-size: 0.85rem;
  text-align: right;
}

@media (max-width: 767px) {
  .container {
    width: min(calc(100% - 24px), var(--container));
  }

  .header-main {
    align-items: flex-start;
    gap: 14px;
    min-height: auto;
    padding-block: 12px;
  }

  .brand {
    gap: 10px;
  }

  .brand__logo {
    width: 46px;
    height: 46px;
  }

  .brand__name {
    font-size: 0.92rem;
  }

  .brand__subtitle {
    max-width: 200px;
    font-size: 0.7rem;
  }

  .header-contact__phone {
    font-size: 0.96rem;
    white-space: nowrap;
  }

  .header-contact__hours {
    max-width: 120px;
    font-size: 0.7rem;
  }

  .nav-row {
    display: block;
    min-height: auto;
  }

  .menu-toggle {
    display: flex;
  }

  .site-nav__list {
    display: grid;
    gap: 0;
    padding: 0 0 10px;
  }

  .site-nav__link {
    padding: 12px 14px;
    text-align: center;
  }

  .hero {
    padding-block: 18px 10px;
  }

  .hero__image {
    min-height: 150px;
    aspect-ratio: 16 / 7;
  }

  .content-section {
    padding-block: 10px 36px;
  }

  .content-card {
    padding: 24px 20px;
    border-radius: 12px;
  }

  .page-title {
    margin-bottom: 18px;
  }

  .service-list,
  .documents-grid {
    grid-template-columns: 1fr;
  }

  .contact-details__row {
    grid-template-columns: 1fr;
    align-items: start;
    row-gap: 3px;
    padding-block: 14px;
  }

  .contact-details dt {
    color: var(--color-muted);
    font-size: 0.9rem;
  }

  .contact-map {
    margin-top: 26px;
    padding-top: 22px;
  }

  .map-embed {
    height: 340px;
  }

  .footer-bottom {
    display: grid;
    justify-items: center;
    text-align: center;
  }

  .footer-meta {
    text-align: center;
  }
}

@media (max-width: 460px) {
  .header-main {
    flex-wrap: wrap;
  }

  .brand {
    width: 100%;
  }

  .brand__subtitle {
    max-width: none;
  }

  .header-contact {
    width: 100%;
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-items: start;
    gap: 8px 12px;
    text-align: left;
  }

  .header-contact__hours {
    max-width: none;
  }

  .document-card__actions {
    display: grid;
  }

  .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
