:root {
  color-scheme: light;
  --paper: #f8f5ef;
  --sand: #eee7db;
  --ink: #262620;
  --muted: #5f5b51;
  --copper: #8f4e32;
  --line: #dcd1c1;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
[hidden] { display: none !important; }
img { display: block; width: 100%; object-fit: cover; }
figure, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 5px; }
.shell { width: min(100% - 112px, 1280px); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 84px; }
.wordmark { position: relative; display: inline-block; padding: 0 0 7px; font: 700 24px/1 var(--serif); white-space: nowrap; }
.wordmark::after { content: ''; position: absolute; inset: auto auto 0 0; width: 38px; height: 1px; background: var(--copper); }
.wordmark span { font-weight: 400; }
nav { display: flex; align-items: center; gap: 38px; font-size: 15px; }
nav a:hover { color: var(--copper); }
.menu-toggle { display: none; }

.hero { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); align-items: center; gap: clamp(32px, 4.2vw, 68px); padding-block: 52px 48px; }
.eyebrow { color: var(--copper); font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.location { display: flex; align-items: center; gap: 10px; }
.location::before { content: ''; width: 16px; height: 1px; background: var(--copper); }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; }
h1 { margin: 16px 0 22px; font-size: clamp(46px, 5.35vw, 83px); line-height: .99; letter-spacing: -.055em; }
h2 { font-size: clamp(34px, 3.8vw, 55px); line-height: 1.06; letter-spacing: -.04em; }
h3 { font-size: 27px; line-height: 1.13; letter-spacing: -.025em; }
.hero-lead { max-width: 33ch; color: var(--muted); font-size: 17px; }
.contacts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 27px; }
.contact { display: inline-flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 21px; padding: 10px 18px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 600; white-space: nowrap; }
.contact:hover { background: var(--copper); border-color: var(--copper); }
.contact.contact-whatsapp { gap: 9px; }
.whatsapp-icon { display: block; flex: none; width: 17px; height: 17px; fill: currentColor; }
.hero-photo { background: var(--sand); }
.hero-photo img { height: auto; aspect-ratio: 3 / 2; }

.section { padding-block: 68px; }
.furniture { padding-top: 32px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.category-grid, .works-grid { margin-top: 25px; }
.card { display: block; width: 100%; padding: 0; border: 1px solid var(--line); background: var(--paper); text-align: left; }
.card:hover { border-color: var(--copper); }
.card img { height: auto; aspect-ratio: 1.58; }
.image-frame { display: block; overflow: hidden; background: var(--sand); }
.card img { transition: transform .35s ease; }
.card:hover img { transform: scale(1.035); }
.card-body { display: flex; min-height: 75px; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; }
.card-title { display: block; font: 25px/1.15 var(--serif); letter-spacing: -.025em; }
.card-arrow { color: var(--copper); font-size: 23px; }
.card-label { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }
.catalog-band { background: var(--sand); }
.tabs { display: flex; gap: 22px; margin: 21px 0 25px; border-bottom: 1px solid #d0c1ac; }
.tabs button { padding: 10px 2px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 15px; }
.tabs button[aria-selected='true'] { border-color: var(--copper); color: var(--ink); font-weight: 700; }
.tabs button:hover { color: var(--copper); }

.works-placeholder { display: grid; min-height: 225px; place-content: center; justify-items: center; gap: 5px; margin-top: 25px; padding: 20px; border: 1px dashed #b8a68f; text-align: center; }
.empty-mark { color: var(--copper); font: 33px/1 var(--serif); margin-bottom: 5px; }
.muted { color: var(--muted); font-size: 14px; }
.works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.work-thumb { display: block; width: 100%; padding: 0; border: 1px solid var(--line); background: var(--sand); cursor: zoom-in; }
.work-thumb:hover { border-color: var(--copper); }
.work-thumb img { aspect-ratio: 4 / 3; }
.works-more { display: block; min-height: 48px; margin: 26px auto 0; padding: 10px 22px; border: 1px solid var(--ink); background: transparent; font-weight: 600; }
.works-more:hover { border-color: var(--copper); color: var(--copper); }
.order-band { border-block: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; margin: 25px 0 0; padding: 0; list-style: none; }
.steps li { position: relative; border-top: 1px solid var(--copper); padding-top: 17px; }
.steps li:not(:last-child)::after { content: '→'; position: absolute; top: 13px; right: 4px; color: var(--copper); }
.steps p { margin-top: 7px; color: var(--muted); }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 93px; color: var(--muted); font-size: 14px; }
.site-footer .wordmark { color: var(--ink); }

dialog { width: min(920px, calc(100% - 36px)); max-height: calc(100% - 36px); padding: 0; border: 1px solid var(--line); background: var(--paper); color: var(--ink); overscroll-behavior: contain; }
dialog::backdrop { background: #24211baf; }
#work-dialog { width: fit-content; max-width: calc(100% - 36px); background: var(--ink); }
.work-full { width: auto; height: auto; max-width: min(1200px, calc(100vw - 38px)); max-height: calc(100dvh - 38px); object-fit: contain; }
.detail { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); }
.detail-image { height: 100%; min-height: 410px; }
.detail-copy { align-self: center; padding: 38px 30px; }
.detail-copy h2 { margin: 8px 0 13px; font-size: clamp(32px, 4vw, 46px); }
.detail-copy p:not(.eyebrow) { color: var(--muted); }
.detail-note { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.detail-note h3 { margin-bottom: 5px; font: 700 15px/1.35 var(--sans); letter-spacing: 0; }
.dialog-close { position: absolute; z-index: 1; inset: 9px 9px auto auto; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); background: var(--paper); font-size: 25px; line-height: 1; }
.dialog-close:hover { color: var(--copper); }
.toast:not(:empty) { position: fixed; z-index: 10; inset: auto 18px 18px auto; max-width: calc(100vw - 36px); padding: 11px 16px; background: var(--ink); color: var(--paper); box-shadow: 0 5px 18px #24211b33; }
dialog .toast:not(:empty) { position: static; margin-top: 12px; }

@media (max-width: 1000px) {
  .shell { width: calc(100% - 64px); }
  .hero { gap: 30px; }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 36px); }
  .site-header { position: relative; z-index: 2; }
  .header-inner { min-height: 65px; }
  .wordmark { font-size: 22px; }
  .menu-toggle { display: grid; width: 44px; height: 44px; place-content: center; gap: 5px; border: 1px solid var(--line); background: transparent; }
  .menu-toggle i { display: block; width: 19px; height: 1px; background: currentColor; }
  .menu-toggle[aria-expanded='true'] i:first-child { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded='true'] i:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded='true'] i:last-child { transform: translateY(-6px) rotate(-45deg); }
  nav { position: absolute; display: none; inset: 100% 0 auto; padding: 6px 18px; background: var(--paper); border-bottom: 1px solid var(--line); }
  .menu-toggle[aria-expanded='true'] + nav { display: grid; gap: 0; }
  nav a { padding: 12px 0; }
  nav a + a { border-top: 1px solid var(--line); }
  .hero { grid-template-columns: 1fr; gap: 23px; padding-block: 30px 22px; }
  h1 { margin: 11px 0 14px; font-size: clamp(41px, 10vw, 64px); }
  .hero-lead { font-size: 16px; }
  .contacts { gap: 8px; margin-top: 19px; }
  .contact { gap: 10px; padding-inline: 12px; }
  .section { padding-block: 42px; }
  .furniture { padding-top: 19px; }
  .card-grid { grid-template-columns: 1fr; gap: 14px; }
  .category-grid, .works-grid { margin-top: 20px; }
  .card-body { min-height: 61px; }
  .category-grid .card { display: grid; grid-template-columns: minmax(85px, 31%) 1fr; }
  .category-grid img { height: 100%; min-height: 82px; aspect-ratio: 1.2; }
  .tabs { gap: clamp(11px, 5vw, 24px); margin-block: 14px 20px; }
  .tabs button { font-size: 14px; }
  .steps { grid-template-columns: 1fr; gap: 15px; }
  .steps li { padding-top: 12px; }
  .steps li:not(:last-child)::after { content: '↓'; top: 7px; }
  .detail { grid-template-columns: 1fr; }
  .detail-image { height: auto; min-height: 0; max-height: 340px; aspect-ratio: 1.25; }
  .detail-copy { padding: 24px 18px; }
  #work-dialog { max-width: calc(100% - 16px); max-height: calc(100% - 16px); }
  .work-full { max-width: calc(100vw - 18px); max-height: calc(100dvh - 18px); }
  .toast:not(:empty) { inset: auto 12px 12px; }
  .site-footer { min-height: 76px; }
}

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