:root {
  --ink: #4c2d20;
  --ink-soft: #765447;
  --paper: #f6f2ef;
  --sand: #e8dcd5;
  --accent: #c9653d;
  --white: #fffdfb;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, Arial, sans-serif; }
main { overflow: hidden; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, .contact h3 { font-family: Georgia, 'Times New Roman', serif; }

.hero { min-height: 720px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 48%); background: var(--white); }
.hero__content { align-self: center; padding: 80px clamp(28px, 7vw, 110px); }
.eyebrow, .section-label { margin-bottom: 18px; color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1 { max-width: 720px; margin-bottom: 28px; font-size: clamp(52px, 6vw, 92px); font-weight: 500; line-height: .98; letter-spacing: -.045em; }
.hero__lead { max-width: 620px; margin-bottom: 38px; color: var(--ink-soft); font-size: clamp(18px, 2vw, 23px); line-height: 1.5; }
.primary-link { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; padding: 0 26px; border-radius: 999px; color: white; background: var(--ink); font-weight: 700; text-decoration: none; }
.hero__image-wrap { min-height: 520px; overflow: hidden; }
.hero__image { width: 100%; height: 100%; display: block; object-fit: cover; }

.services, .gallery-section { padding: 90px clamp(22px, 7vw, 110px); }
.services h2, .gallery-section h2, .contact h2 { max-width: 850px; margin-bottom: 50px; font-size: clamp(38px, 5vw, 66px); font-weight: 500; line-height: 1.06; letter-spacing: -.03em; }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service-grid article { min-height: 270px; padding: 28px; border-top: 2px solid var(--ink); background: var(--white); }
.service-grid span { color: var(--accent); font-weight: 800; }
.service-grid h3 { margin: 55px 0 14px; font-size: 21px; }
.service-grid p { margin: 0; color: var(--ink-soft); line-height: 1.6; }

.gallery-section { background: var(--ink); color: var(--white); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 250px; gap: 14px; }
.gallery__item { min-width: 0; padding: 0; overflow: hidden; border: 0; border-radius: 4px; background: #2b1912; cursor: zoom-in; }
.gallery__item--tall { grid-row: span 2; }
.gallery__item--wide { grid-column: span 2; }
.gallery__item img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s ease, opacity .35s ease; }
.gallery__item:hover img, .gallery__item:focus-visible img { opacity: .88; transform: scale(1.025); }
.gallery__item:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.contact { padding: 100px max(22px, calc((100vw - 900px) / 2)); text-align: center; background: var(--sand); }
.contact h2 { margin-right: auto; margin-left: auto; margin-bottom: 16px; }
.contact__lead { margin-bottom: 42px; color: var(--ink-soft); font-size: 19px; }
.contact__links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; text-align: left; }
.contact__links a, .msweb-ui.ui-component.btn.messenger-button { position: relative; min-height: 112px; padding: 24px 24px 24px 70px; border: 1px solid rgba(76,45,32,.2); border-radius: 12px; color: var(--ink); background: rgba(255,255,255,.46); text-decoration: none; }
.contact__links a img, .msweb-ui.ui-component.btn.messenger-button img { position: absolute; top: 24px; left: 24px; width: 30px; height: 30px; object-fit: contain; }
.contact__links span, .contact__links strong { display: block; }
.contact__links span { margin-bottom: 8px; color: var(--ink-soft); font-size: 14px; }
.contact__links strong { font-size: clamp(18px, 3vw, 24px); overflow-wrap: anywhere; }
.messengers { display: contents; }
.msweb-ui.ui-component.btn.messenger-button { display: flex; align-items: flex-end; justify-content: flex-start; font-size: clamp(18px, 3vw, 24px); font-weight: 700; text-align: left; }
.msweb-ui.ui-component.btn.messenger-button:hover { border-color: rgba(76,45,32,.38); color: var(--ink); background: rgba(255,255,255,.72); }
footer { padding: 26px; color: #aa8e82; background: var(--ink); text-align: center; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }

.messenger-actions { display: grid; gap: 10px; min-width: min(360px, 70vw); padding-top: 6px; }
.gallery-modal .modal-wide { width: min(1100px, calc(100vw - 28px)); max-width: 1100px; overflow: hidden; background: #1b100c; }
.gallery-modal .modal-header { color: white; background: #1b100c; }
.gallery-modal .modal-content { padding: 0; }
.gallery-viewer { position: relative; display: grid; place-items: center; min-height: min(75vh, 820px); background: #120b08; }
.gallery-viewer img { max-width: 100%; max-height: min(72vh, 800px); display: block; object-fit: contain; }
.gallery-viewer__counter { position: absolute; top: 14px; left: 14px; padding: 6px 10px; border-radius: 999px; color: white; background: rgba(0,0,0,.58); font-size: 13px; }
.gallery-viewer__controls { position: absolute; right: 14px; bottom: 14px; left: 14px; display: flex; justify-content: space-between; gap: 12px; pointer-events: none; }
.gallery-viewer__controls .btn { pointer-events: auto; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero__content { padding: 70px 24px 52px; }
  .hero__image-wrap { min-height: 480px; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-auto-rows: 210px; }
}

@media (max-width: 600px) {
  .hero { min-height: auto; }
  h1 { font-size: clamp(44px, 14vw, 64px); }
  .hero__image-wrap { min-height: 390px; }
  .services, .gallery-section { padding: 68px 18px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-grid article { min-height: 230px; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 170px; }
  .gallery__item--wide { grid-column: span 2; }
  .contact { padding: 72px 18px; }
  .contact__links { grid-template-columns: 1fr; }
  .gallery-viewer { min-height: 65vh; }
  .gallery-viewer img { max-height: 62vh; }
  .gallery-viewer__controls { right: 8px; bottom: 8px; left: 8px; }
}
