@font-face {
  font-family: "Golos Text";
  src: url("fonts/golos-text-cyrillic-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Golos Text";
  src: url("fonts/golos-text-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Playfair Display";
  src: url("fonts/playfair-cyrillic.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Playfair Display";
  src: url("fonts/playfair-latin.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}

:root {
  color-scheme: light;
  --bg: #f9f6f0;
  --surface: #eee6db;
  --paper: #fffdf9;
  --ink: #29211b;
  --muted: #625448;
  --line: #d9cec0;
  --accent: #984021;
  --accent-hover: #783218;
  --display: "Playfair Display", Georgia, serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --gutter: clamp(18px, 5.55vw, 100px);
}

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

html {
  font-family: "Golos Text", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  font-synthesis: none;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
}

::selection { color: var(--ink); background: #f0cfb3; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .2em; touch-action: manipulation; }
a, summary, .sizes label { -webkit-tap-highlight-color: transparent; }
a:focus-visible, summary:focus-visible, input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

img { display: block; max-width: 100%; height: auto; }
p, h1, h2, dl, fieldset { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 500; line-height: 1.06; }
p { text-wrap: pretty; }
button, input { font: inherit; }
section { scroll-margin-top: 24px; }

.wrap {
  max-width: 1600px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.visually-hidden, .sizes input, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 10px;
  left: var(--gutter);
  z-index: 2;
  padding: 10px 16px;
  background: var(--paper);
}

.site-header { border-bottom: 1px solid var(--line); }
.header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  width: fit-content;
}

.brand img {
  width: 211px;
  height: auto;
  border-radius: 4px;
  background: #261e19;
}

.site-nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 44px); }
.site-nav a, .header-phone {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .875rem;
  text-decoration: none;
}

.site-nav a[aria-current] { color: var(--accent); }
.header-phone { justify-self: end; font-weight: 580; white-space: nowrap; }

.hero { min-height: calc(100svh - 77px); padding-bottom: clamp(49px, 8vh, 85px); }
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 11px;
  min-height: 66px;
  color: var(--muted);
  font-size: .8125rem;
}

.breadcrumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.breadcrumbs a::after {
  content: "/";
  margin-left: 11px;
  color: #8b7464;
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(295px, 1fr);
  grid-template-areas:
    "gallery title"
    "gallery purchase";
  grid-template-rows: auto 1fr;
  column-gap: clamp(30px, 4.3vw, 68px);
  align-items: start;
}

.product-title { grid-area: title; }
.product-title h1 {
  font-size: clamp(3rem, 5.35vw, 5.2rem);
  letter-spacing: -.037em;
}
.product-title p {
  max-width: 33ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(1rem, 1.24vw, 1.125rem);
}

.gallery { grid-area: gallery; min-width: 0; }
.gallery-media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper);
  border-radius: 5px;
}

.gallery-image { width: 100%; height: 100%; object-fit: contain; }
.gallery-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 106px)); gap: 10px; margin-top: 13px; }
.gallery-tab {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px 4px 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  font-size: .75rem;
  text-align: center;
  text-decoration: none;
  transition: border-color 180ms var(--ease), color 180ms var(--ease);
}

.gallery-tab[aria-current] { color: var(--ink); border-color: var(--accent); }
.gallery-tab img { width: 100%; aspect-ratio: 1.75; object-fit: cover; border-radius: 2px; }

.purchase { grid-area: purchase; margin-top: clamp(20px, 2.35vw, 34px); }
.size-picker { min-width: 0; padding: 0; border: 0; }
.size-picker legend, .static-size { margin-bottom: 10px; font-weight: 580; font-size: .875rem; }
.sizes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.sizes label { position: relative; display: block; min-width: 0; cursor: pointer; }
.sizes span {
  display: grid;
  min-height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: clamp(.8125rem, 1vw, .9375rem);
  white-space: nowrap;
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease);
}
.sizes input:checked + span { border-color: var(--accent); background: #f1e4d9; color: #733119; }

.finish { display: flex; align-items: center; gap: 10px; margin-top: 15px; font-size: .875rem; }
.finish-swatch {
  flex: 0 0 28px;
  width: 28px;
  height: 19px;
  border: 1px solid #37291f;
  border-radius: 3px;
  background: #1e1c1a;
  box-shadow: inset -13px 0 #783f28;
}

.price-block {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 15px;
  margin-top: clamp(21px, 2.2vw, 32px);
}

.price {
  font-size: clamp(2.125rem, 3.5vw, 3rem);
  font-weight: 590;
  line-height: 1.1;
  letter-spacing: -.043em;
  font-variant-numeric: tabular-nums;
}

.price-caption, .shop-note { color: var(--muted); font-size: .8125rem; }
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 10px 16px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-weight: 560;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms var(--ease), transform 160ms var(--ease);
}
.button:active { transform: scale(.975); }
.shop-link { margin-top: 14px; }
.shop-note { margin-top: 9px; }
.shop-note strong, .shop-note span { white-space: nowrap; }

.delivery-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 49px;
  margin-top: 15px;
  border-block: 1px solid var(--line);
  font-size: .875rem;
  text-decoration: none;
}
.delivery-link strong { margin-left: auto; white-space: nowrap; color: var(--accent); }
.delivery-link::after, summary::after {
  content: "";
  width: .48em;
  height: .48em;
  flex: none;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.details { background: var(--surface); }
.feature-layout, .delivery-layout {
  display: grid;
  align-items: center;
  gap: clamp(36px, 6vw, 92px);
  padding-block: clamp(65px, 12vh, 112px);
}
.feature-layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.details h2, .delivery h2 { font-size: clamp(2.875rem, 5vw, 4.375rem); letter-spacing: -.037em; }
.section-lead { max-width: 43ch; color: var(--muted); margin-top: 21px; }
.feature-photo {
  width: 100%;
  aspect-ratio: 1.2;
  object-fit: cover;
  object-position: 62% center;
  border-radius: 5px;
}
.specs { margin-top: 26px; font-size: .9375rem; }
.specs > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid #cfc2b3;
}
.specs > div:last-child { border-bottom: 1px solid #cfc2b3; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 580; text-align: right; white-space: nowrap; }
.detail-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 18px;
  margin-top: 9px;
}
.detail-links a, .text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
  font-size: .875rem;
  font-weight: 570;
}

.delivery-layout { grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); }
.delivery-copy { grid-column: 2; grid-row: 1; }
.delivery h2 span { color: var(--accent); }
.delivery-terms { margin-top: 28px; }
.delivery-terms > div {
  padding-block: 12px;
  border-top: 1px solid var(--line);
}
.delivery-terms dt { font-weight: 600; }
.delivery-terms dd { margin: 4px 0 0; color: var(--muted); }
.delivery-terms dd strong { color: var(--ink); font-weight: 610; }
.delivery details { border-block: 1px solid var(--line); }
.delivery details p { padding-bottom: 13px; color: var(--muted); }
.delivery summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 49px;
  cursor: pointer;
  list-style: none;
  font-weight: 540;
}
.delivery summary::-webkit-details-marker { display: none; }
.delivery details[open] summary::after { transform: rotate(225deg) translateY(-1px); }
.delivery .text-link { margin-top: 11px; }
.delivery-visual { grid-column: 1; grid-row: 1; }
.delivery-visual img { width: 100%; border-radius: 5px; }
.delivery-visual p { margin-top: 10px; color: var(--muted); font-size: .875rem; }

.site-footer {
  padding-top: clamp(38px, 6vw, 85px);
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  background: #2e241d;
  color: #fbf5ea;
}
.site-footer a:focus-visible { outline-color: #f1bf9d; }
.footer-content, .footer-note {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.footer-content h2 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -.025em; }
.footer-content p { margin-top: 11px; color: #e2d2c1; }
.footer-contacts { display: flex; flex-direction: column; }
.footer-contacts a { display: flex; align-items: center; min-height: 44px; }
.footer-phone { font-size: 1.3125rem; font-weight: 600; text-decoration: none; }
.footer-contacts span, .footer-note { color: #e2d2c1; }
.footer-note {
  align-items: center;
  margin-top: 41px;
  padding-top: 6px;
  border-top: 1px solid #6c5849;
  font-size: .8125rem;
}
.footer-note a { display: inline-flex; align-items: center; min-height: 44px; }

@media (hover: hover) and (pointer: fine) {
  .site-nav a:hover, .header-phone:hover, .breadcrumbs a:hover, .delivery-link:hover {
    text-decoration: underline;
  }
  .button:hover { background: var(--accent-hover); }
  .gallery-tab:hover, .sizes label:hover span { border-color: var(--accent); }
}

@media (prefers-reduced-motion: no-preference) {
  .product-title, .gallery { animation: arrive 420ms var(--ease) both; }
  .product-title { animation-delay: 50ms; }
  @keyframes arrive {
    from { opacity: .65; transform: translateY(7px); }
  }

  @supports (animation-timeline: view()) {
    .delivery h2 span {
      animation: city-color linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 85%;
    }
    @keyframes city-color {
      from { color: var(--ink); }
      to { color: var(--accent); }
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .button:active { transform: none; }
}

@media (max-width: 1050px) {
  :root { --gutter: clamp(18px, 4vw, 55px); }
}

@media (max-width: 730px) {
  .header-inner { min-height: 62px; grid-template-columns: 1fr auto; gap: 12px; }
  .brand img { width: clamp(175px, 51vw, 208px); }
  .site-nav a:not([href="#delivery"]), .header-phone { display: none; }
  .hero { min-height: 0; padding-bottom: 44px; }
  .breadcrumbs { min-height: 43px; }
  .product-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "gallery" "purchase";
    grid-template-rows: auto;
  }
  .product-title h1 { font-size: clamp(2.75rem, 9.4vw, 4.5rem); }
  .product-title p { margin-top: 9px; }
  .gallery { margin-top: 14px; }
  .gallery-media { aspect-ratio: 1.55; }
  .gallery-media[href$="/room.webp"] img { object-fit: cover; object-position: center 60%; }
  .gallery-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 7px; }
  .gallery-tab { font-size: .6875rem; }
  .gallery-tab img { aspect-ratio: 1.95; }
  .purchase { margin-top: 14px; }
  .finish { margin-top: 11px; }
  .price-block { margin-top: 19px; }
  .delivery-link { min-height: 45px; margin-top: 9px; }
  .shop-link { margin-top: 10px; }

  .feature-layout, .delivery-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 29px;
    padding-block: 49px;
  }
  .delivery-copy, .delivery-visual { grid-column: auto; grid-row: auto; }
  .feature-photo { aspect-ratio: 4 / 3; }
  .detail-links { column-gap: 15px; }
  .footer-content, .footer-note { flex-direction: column; gap: 10px; }
  .footer-note { align-items: flex-start; margin-top: 26px; padding-top: 17px; }
}

@media (max-width: 360px) {
  .sizes { gap: 4px; }
  .gallery-tab { padding-inline: 2px; }
  .specs > div { gap: 8px; }
  .specs { font-size: .875rem; }
}
