:root {
  color-scheme: light;
  --green: #4f6b5e;
  --green-hover: #3c574a;
  --ink: #373740;
  --muted: #5b6065;
  --surface: #f3f3f3;
  --border: #d7dad8;
  --sidebar: 59px;
  --header: 88px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 10px); }
body { margin: 0; color: var(--ink); background: white; font: 1rem/1.5 "PT Sans Caption", Arial, sans-serif; }
body > main, body > footer { margin-left: var(--sidebar); }
body.inner > main { padding-top: var(--header); min-height: 65vh; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
button, h1, h2, p, dl, dd { margin: 0; }
h1, h2 { font-weight: 700; line-height: 1.18; }
h1 { font-size: clamp(2.1rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.7rem, 3.3vw, 2.7rem); margin-bottom: 20px; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:where(a, button):focus-visible { outline: 3px solid #227446; outline-offset: 4px; }
.container { width: min(100%, 1450px); margin-inline: auto; padding-inline: clamp(16px, 2.8vw, 42px); }
.skip { position: fixed; top: 10px; left: 10px; z-index: 20; transform: translateY(-160%); padding: 8px 14px; background: #fff; }
.skip:focus { transform: none; }

.site-header { position: fixed; z-index: 5; top: 0; left: var(--sidebar); right: 0; color: var(--ink); background: #fff; }
.home .site-header:not(.scrolled):not(.menu-open) { color: #fff; background: transparent; }
.site-header.scrolled, .inner .site-header { box-shadow: 0 1px 5px rgb(0 0 0 / 12%); }
.header-content { min-height: var(--header); display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-inline: clamp(16px, 3vw, 45px); }
.desktop-nav { display: flex; align-items: center; gap: clamp(20px, 2.4vw, 36px); margin-inline: auto; }
.desktop-nav a, .mobile-menu a { text-decoration: none; }
.desktop-nav a:hover, .desktop-nav a[aria-current] { text-decoration: underline; text-underline-offset: 6px; }
.header-contacts { display: flex; align-items: center; gap: clamp(10px, 1.8vw, 24px); }
.header-phone { font-weight: 700; white-space: nowrap; text-decoration: none; }
.header-phone:hover { text-decoration: underline; text-underline-offset: 4px; }
.header-max { min-height: 36px; border: 1px solid currentColor; border-radius: 2px; padding: 5px 10px; background: transparent; color: inherit; font-size: .875rem; font-weight: 700; cursor: pointer; }
.header-max:hover { text-decoration: underline; text-underline-offset: 3px; }
.service-nav { position: relative; }
.service-nav-label { display: flex; align-items: center; gap: 2px; }
.service-toggle { display: grid; width: 30px; height: 34px; place-items: center; border: 0; background: transparent; color: inherit; cursor: pointer; }
.service-toggle span { width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.service-toggle[aria-expanded="true"] span { transform: translateY(2px) rotate(225deg); }
.desktop-nav .service-menu { position: absolute; z-index: 1; top: 100%; left: -12px; min-width: 185px; padding: 6px 0; border-top: 2px solid var(--green); background: #fff; color: var(--ink); box-shadow: 0 5px 18px rgb(0 0 0 / 15%); }
.desktop-nav .service-menu a { display: block; padding: 9px 13px; white-space: nowrap; }
.desktop-nav .service-menu a:focus-visible { outline-color: #227446 !important; outline-offset: -3px; }
.service-menu a:hover { background: #edf1ee; }
.menu-toggle, .mobile-menu { display: none; }

.contact-bar { position: fixed; z-index: 6; inset: 0 auto 0 0; width: var(--sidebar); display: flex; align-items: center; flex-direction: column; background: #fff; }
.contact-bar button { border: 0; cursor: pointer; }
.bar-contact { min-height: 295px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; writing-mode: vertical-rl; rotate: 180deg; background: var(--green); color: #fff; letter-spacing: .06em; font-size: .9375rem; }
.bar-contact:hover { background: var(--green-hover); }
.bar-max { flex: 0 0 auto; margin: 24px auto 0; padding: 7px 4px; border-radius: 4px; background: transparent; color: var(--green-hover); font-size: .875rem; font-weight: 700; }
.bar-max:hover { background: #eef4f0; }

.hero {
  position: relative;
  min-height: 820px;
  background: linear-gradient(90deg, rgb(9 15 13 / 79%), rgb(9 15 13 / 33%)), url("photos/mebel-v-kuzove.jpg") center 48% / cover no-repeat;
  color: #fff;
}
.hero-content { padding-top: 170px; padding-bottom: 125px; }
.hero-location { width: fit-content; margin-bottom: 30px; padding: 7px 15px; border-left: 5px solid var(--green); background: rgb(255 255 255 / 15%); }
.hero h1 { max-width: 900px; margin-bottom: 20px; }
.hero p { color: #f0f0f0; font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.4; }
.hero-button { display: inline-flex; min-height: 54px; margin-top: 42px; padding: 13px 36px; align-items: center; justify-content: center; border: 2px solid #fff; border-radius: 2px; color: #fff; text-decoration: none; }
.hero-button:hover { background: var(--green-hover); border-color: var(--green-hover); }
.hero-detail { position: absolute; right: 0; bottom: 0; display: flex; min-height: 86px; align-items: center; justify-content: center; gap: 9px; padding: 18px 52px; border-radius: 2px 0 0; background: var(--green); color: #fff; font-weight: 700; text-decoration: none; }
.hero-detail:hover { background: var(--green-hover); }
.hero :focus-visible, .home .site-header:not(.scrolled):not(.menu-open) :focus-visible { outline-color: #fff; }

.section { padding-block: clamp(38px, 5.7vw, 80px); }
.prices, .site-footer { background: var(--surface); }
.price-table { width: 100%; max-width: 1000px; border-collapse: collapse; table-layout: fixed; background: white; color: var(--ink); text-align: left; }
.price-table th:first-child { width: 44%; }
.price-table th, .price-table td { border-bottom: 1px solid var(--border); padding: 16px 21px; vertical-align: middle; }
.price-table thead th { background: var(--green); color: #fff; font-weight: 700; }
.price-table td { font-weight: 700; white-space: nowrap; }
.body-length { display: block; margin-top: 4px; color: var(--muted); font-size: .875rem; font-weight: 400; }
.button { display: inline-flex; min-height: 47px; align-items: center; justify-content: center; border: 1px solid var(--green); border-radius: 2px; padding: 10px 20px; background: var(--green); color: #fff; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--green-hover); border-color: var(--green-hover); }
.button-outline { background: white; color: var(--green-hover); }
.button-outline:hover { background: #eef4f0; }
.rate-button, .page-intro .button { margin-top: 24px; }

.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.photo { display: block; aspect-ratio: 1.12; background: #e8e9e9; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 160ms ease; }
.photo:hover img { transform: scale(1.04); }
.catalogue { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.service-card { display: grid; align-content: start; border: 1px solid var(--border); background: var(--surface); color: var(--ink); text-decoration: none; }
.service-card:hover { border-color: var(--green); }
.service-card img { width: 100%; aspect-ratio: 1.8; object-fit: cover; }
.service-card-body { padding: clamp(17px, 3vw, 26px); }
.service-card h2 { margin-bottom: 8px; font-size: 1.4rem; }
.service-card p { color: var(--muted); }
.service-card span { display: inline-block; margin-top: 15px; color: var(--green-hover); font-weight: 700; }
.service-card:hover span { text-decoration: underline; text-underline-offset: 4px; }
.contact-section { background: #edf1ee; }
.contact-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: min(100%, 620px); }
.contact-list > div { min-width: 0; padding: 12px 17px; background: #fff; }
.contact-list dt { color: var(--muted); font-size: .875rem; }
.contact-list dd { margin-top: 3px; font-size: 1.08rem; font-weight: 700; overflow-wrap: anywhere; }
.contact-list a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.max-note { margin-top: 14px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.copy-status:not(:empty) { margin-top: 12px; color: var(--green-hover); font-size: .9375rem; }

.page-intro { padding-top: 30px; padding-bottom: clamp(34px, 6vw, 85px); }
.breadcrumb { display: flex; align-items: baseline; gap: 10px; margin-bottom: 22px; color: var(--muted); font-size: .9375rem; }
.breadcrumb a { text-underline-offset: 4px; }
.page-intro h1 { margin-bottom: 15px; }
.page-intro > p:not(.breadcrumb) { max-width: 720px; font-size: 1.125rem; }
.footer-content { display: flex; justify-content: space-between; align-items: baseline; gap: 16px 26px; flex-wrap: wrap; padding-block: 30px; }
.footer-content nav { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.footer-content a { text-underline-offset: 4px; }
.footer-phone { font-weight: 700; white-space: nowrap; }

dialog { position: fixed; inset: 0; margin: auto; max-height: calc(100dvh - 26px); border: 0; color: var(--ink); }
dialog::backdrop { background: rgb(0 0 0 / 55%); }
.contact-dialog { width: min(572px, calc(100% - 24px)); padding: clamp(25px, 4vw, 46px); }
.contact-dialog h2 { font-size: clamp(1.45rem, 3vw, 1.75rem); margin-bottom: 16px; }
.contact-dialog .contact-list > div { background: var(--surface); }
.dialog-close { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 2px; background: #fff; color: #515960; font: 700 1.65rem/1 Arial, sans-serif; cursor: pointer; }
.dialog-close:hover { background: var(--surface); }
.photo-dialog { max-width: calc(100vw - 24px); padding: 0; background: #18201c; }
.photo-dialog img { max-width: 100%; max-height: calc(100dvh - 26px); object-fit: contain; }

@media (max-width: 996px) {
  .hero { min-height: 680px; }
  .hero-content { padding-top: 132px; }
  .hero-detail { min-height: 62px; padding-inline: 25px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalogue { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  :root { --sidebar: 0px; --header: 70px; }
  body { padding-bottom: 45px; }
  .container { padding-inline: 16px; }
  .desktop-nav { display: none; }
  .header-content { padding-inline: 17px; }
  .menu-toggle { width: 42px; height: 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: transparent; border: 0; cursor: pointer; }
  .menu-toggle span { display: block; width: 24px; height: 3px; background: #577668; }
  .home .site-header:not(.scrolled):not(.menu-open) .menu-toggle span { background: #fff; }
  .mobile-menu { display: grid; gap: 4px; padding: 2px 17px 18px; background: #fff; color: var(--ink); box-shadow: 0 4px 8px rgb(0 0 0 / 10%); }
  .mobile-menu a { padding: 9px 0; border-bottom: 1px solid var(--border); }
  .mobile-menu a[aria-current] { font-weight: 700; }
  .mobile-menu .service-nav-label { border-bottom: 1px solid var(--border); }
  .mobile-menu .service-nav-label a { flex: 1; border: 0; }
  .mobile-menu .service-toggle { width: 40px; height: 40px; }
  .mobile-menu .service-menu a { display: block; padding-left: 14px; }
  .contact-bar { inset: auto 0 0; width: auto; min-height: 45px; flex-direction: row; justify-content: flex-start; box-shadow: 0 -1px 5px rgb(0 0 0 / 14%); }
  .bar-contact { min-height: 45px; width: auto; padding-inline: 15px; writing-mode: horizontal-tb; rotate: none; letter-spacing: 0; }
  .bar-max { margin: 0 10px; padding: 7px 10px; }
  .hero { min-height: 530px; background-position: center center; }
  .hero-content { padding-top: 120px; padding-bottom: 92px; }
  .hero-location { margin-bottom: 17px; }
  .hero h1 { margin-bottom: 16px; }
  .hero-button { width: 100%; margin-top: 30px; }
  .hero-detail { inset: auto 0 0; min-height: 45px; padding-block: 10px; }
  .desktop-break { display: none; }
  .price-table th, .price-table td { padding: 12px 10px; font-size: .94rem; }
  .price-table th:first-child { width: 40%; }
}

@media (max-width: 420px) {
  .price-table th, .price-table td { padding-inline: 8px; font-size: .875rem; }
  .contact-dialog .contact-list { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .contact-actions .button { padding-inline: 10px; font-size: .875rem; }
  .gallery { gap: 8px; }
  .catalogue { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .photo img { transition: none; }
}
