@font-face {
  font-family: Golos;
  src: url("assets/fonts/GolosText-RU.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: Unbounded;
  src: url("assets/fonts/Unbounded-RU.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --accent-yellow: #febc34;
  --accent-aqua: #85ced1;
  --accent-green: #a8c875;
  --accent: var(--accent-yellow);
  --accent-soft: #f4ebd6;
  --accent-deep: #664500;
  --ink: #13201d;
  --dark-surface: var(--ink);
  --muted: #51615a;
  --paper: #f7f6f0;
  --white: #fffef9;
  --border: #d4d8cf;
  --dark-border: #394741;
  --dark-muted: #c4cdc7;
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --display: Unbounded, Golos, sans-serif;
}

html[data-theme="yellow"] {
  --dark-surface: #28231f;
  --dark-border: #5a4b3b;
  --dark-muted: #d0c6b7;
}

html[data-theme="aqua"] {
  --accent: var(--accent-aqua);
  --accent-soft: #dceeed;
  --accent-deep: #205e61;
}

html[data-theme="green"] {
  --accent: var(--accent-green);
  --accent-soft: #e7edd9;
  --accent-deep: #3c572c;
  --dark-surface: #20291d;
  --dark-border: #465740;
  --dark-muted: #ced6c1;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.45 Golos, system-ui, sans-serif;
}

h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button, select { color: inherit; font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.hero :focus-visible, .footer :focus-visible, .header :focus-visible { outline-color: var(--accent); }

.shell { width: min(100% - 2 * var(--gutter), 1280px); margin-inline: auto; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: fixed;
  z-index: 6;
  top: 8px;
  left: 8px;
  padding: 12px 16px;
  background: var(--white);
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

.preview { background: #e9eae3; }
.preview-inner, .preview-group { display: grid; min-width: 0; }
.preview-group + .preview-group { border-top: 1px solid var(--border); }
.preview-group > span { display: none; color: var(--muted); font-size: .72rem; white-space: nowrap; }
.preview nav { display: flex; min-width: 0; align-items: stretch; }
.preview nav a {
  display: inline-flex;
  flex: 1 1 auto;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-inline: 5px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  font-size: .72rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
.theme-link::before { width: 8px; height: 8px; flex: 0 0 8px; background: var(--swatch); content: ""; }
.theme-yellow { --swatch: var(--accent-yellow); }
.theme-aqua { --swatch: var(--accent-aqua); }
.theme-green { --swatch: var(--accent-green); }
.preview nav a[aria-current] { border-color: var(--accent-deep); color: var(--ink); font-weight: 650; }

.header, .hero, .footer { color: var(--white); background: var(--dark-surface); }
.header { position: relative; z-index: 3; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 62px;
  border-bottom: 1px solid var(--dark-border);
}
.logo { display: flex; width: 126px; min-height: 44px; align-items: center; }
html:is([data-theme="aqua"], [data-theme="green"]) .logo img { filter: brightness(0) invert(1); }
.desktop-nav, .header-phone { display: none; }

.mobile-menu summary {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  color: var(--white);
  font-size: .9rem;
  cursor: pointer;
  list-style: none;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.menu-mark { width: 16px; height: 7px; border-block: 1px solid var(--accent); }
.mobile-menu nav {
  position: absolute;
  top: 100%;
  right: var(--gutter);
  width: min(250px, 100% - 2 * var(--gutter));
  padding: 4px 12px;
  border: 1px solid var(--dark-border);
  background: var(--dark-surface);
}
.mobile-menu nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 6px;
  text-decoration: none;
}
.mobile-menu nav a + a { border-top: 1px solid var(--dark-border); }

.hero { padding-block: 24px 18px; }
.hero-heading { display: grid; gap: 12px; margin-bottom: 20px; }
.hero h1 {
  font: 610 clamp(1.625rem, 7.4vw, 3.25rem)/1.11 var(--display);
  letter-spacing: -.063em;
}
.hero h1 span { color: var(--accent); }
.hero-heading p { max-width: 32ch; color: var(--dark-muted); font-size: .94rem; line-height: 1.45; }
.hero-options { display: grid; gap: 8px; }
.hero-stone, .hero-secondary, .hero-category { display: none; }
.hero-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.94;
  background: #263a35;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 54%; }
.image-label {
  position: absolute;
  right: 0;
  bottom: 0;
  max-width: 100%;
  padding: 5px 9px;
  background: var(--dark-surface);
  color: var(--white);
  font-size: .69rem;
  line-height: 1.38;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.button:active { background: var(--accent-soft); }
.mobile-catalog { display: flex; justify-content: space-between; margin-top: 8px; }

.proof { background: var(--accent-soft); }
.proof-inner { display: grid; grid-template-columns: 1.08fr 1fr .8fr; padding-block: 12px; }
.proof-item, .proof-review { display: flex; flex-direction: column; justify-content: center; }
.proof-item + .proof-item, .proof-review { border-left: 1px solid color-mix(in srgb, var(--accent-deep) 26%, transparent); }
.proof-item:not(:first-child), .proof-review { padding-left: 10px; }
.proof-item strong { font: 560 clamp(.9rem, 3.7vw, 1.24rem)/1.2 var(--display); letter-spacing: -.04em; white-space: nowrap; }
.proof-item span, .proof-review small { margin-top: 4px; color: var(--muted); font-size: .7rem; line-height: 1.22; }
.proof-review { display: block; min-height: 44px; padding-top: 3px; font-size: .83rem; font-weight: 650; text-decoration: none; }
.proof-review > span { display: inline-block; color: var(--accent-deep); }
.proof-review small { display: block; font-weight: 400; }
.proof-review:hover { text-decoration: underline; text-underline-offset: 3px; }

.section-space { padding-block: 32px; scroll-margin-top: 12px; }
.catalog { padding-top: 23px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 14px; margin-bottom: 8px; }
h2 { font: 600 clamp(1.28rem, 5.9vw, 2.45rem)/1.14 var(--display); letter-spacing: -.055em; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--accent-deep);
  font-size: .86rem;
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.catalog-controls { margin-bottom: 10px; }
.materials, .built-views { display: flex; flex-wrap: wrap; gap: 5px; }
.materials button, .built-views button {
  min-height: 44px;
  padding: 8px clamp(7px, 2vw, 16px);
  background: transparent;
  border: 1px solid var(--border);
  font-size: .82rem;
  font-weight: 550;
}
.materials button[aria-pressed="true"], .built-views button[aria-pressed="true"] {
  border-color: var(--dark-surface);
  background: var(--dark-surface);
  color: var(--accent);
}
.catalog-meta { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 8px; }
.catalog-results { color: var(--muted); font-size: .81rem; }
.floor-filter select {
  min-height: 44px;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
}
.project-grid { display: grid; gap: 6px; }
.project { min-width: 0; }
.project-link {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .91fr) minmax(0, 1.1fr);
  min-height: 112px;
  border: 1px solid var(--border);
  background: var(--white);
  text-decoration: none;
}
.project-media { min-width: 0; overflow: hidden; background: #daded4; }
.project-media img { width: 100%; height: 100%; object-fit: cover; }
.project-copy { display: grid; align-content: center; justify-items: start; gap: 3px; min-width: 0; padding: 10px 22px 10px 10px; }
.project-type, .project-caption { color: var(--muted); font-size: .75rem; line-height: 1.22; }
.project-copy h3 { font-size: 1.06rem; font-weight: 720; line-height: 1.12; letter-spacing: -.028em; overflow-wrap: anywhere; }
.project-facts { display: flex; flex-wrap: wrap; gap: 1px 7px; margin-block: 3px; font-size: .83rem; line-height: 1.15; }
.project-facts > span { color: var(--muted); }
.project-arrow { position: absolute; top: 8px; right: 8px; color: var(--accent-deep); font-size: .87rem; }
.catalog-empty { padding: 22px 16px; border: 1px solid var(--border); }
.catalog-empty .button { margin-top: 12px; }

.built { background: var(--accent-soft); }
.built-layout { display: grid; gap: 12px; }
.built-copy h3 { margin-top: 13px; font-size: 1.1rem; }
.built-copy p { max-width: 34ch; margin-top: 4px; color: var(--muted); font-size: .9rem; }
.built-views { margin-bottom: 8px; }
.built-views button { border-color: color-mix(in srgb, var(--accent-deep) 40%, transparent); }
.built-photo { overflow: hidden; aspect-ratio: 1.6; background: #c7cfc8; }
.built-photo img { width: 100%; height: 100%; object-fit: cover; }
.built-photo[data-built-photo="building"] img { object-position: center 61%; }
[data-motion-case] [data-built-photo], [data-motion-frame] { position: relative; overflow: hidden; }
.case-motion-layer { position: absolute; z-index: 1; inset: 0; pointer-events: none; }
.case-motion-layer img { width: 100%; height: 100%; object-fit: cover; }

.process-layout { display: grid; gap: 17px; }
.process-list { display: grid; margin: 0; padding: 0; list-style: none; }
.process-list li { padding-block: 12px; border-top: 1px solid var(--border); }
.process-list li:last-child { border-bottom: 1px solid var(--border); }
.process-list h3 { font-size: 1rem; line-height: 1.25; }
.process-list p { margin-top: 3px; color: var(--muted); font-size: .89rem; }

.footer { padding-block: 30px calc(30px + env(safe-area-inset-bottom)); }
.footer-layout, .contact-actions { display: grid; gap: 12px; }
.footer p { margin-top: 10px; color: var(--dark-muted); font-size: .87rem; }
.contact-actions { grid-template-columns: 1fr; gap: 4px; }
.contact-text { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; font-size: .89rem; text-underline-offset: 4px; }

@media (min-width: 640px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hero-media { aspect-ratio: 2.3; }
  .proof-inner { padding-block: 15px; }
  .proof-item:not(:first-child), .proof-review { padding-left: 18px; }
  .proof-item span, .proof-review small { font-size: .79rem; }
  .contact-actions { display: flex; flex-wrap: wrap; gap: 20px; }
}

@media (min-width: 850px) {
  .preview-inner { display: flex; justify-content: space-between; gap: 12px; }
  .preview-group { display: flex; align-items: center; gap: 8px; }
  .preview-group + .preview-group { border-top: 0; }
  .preview-group > span { display: block; }
  .preview nav a { flex: 0 1 auto; padding-inline: 9px; }
  .mobile-menu, .mobile-catalog { display: none; }
  .header-inner { min-height: 67px; }
  .logo { width: 150px; }
  .desktop-nav { display: flex; gap: clamp(20px, 3.5vw, 53px); }
  .desktop-nav a, .header-phone {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: .92rem;
    font-weight: 550;
    text-decoration: none;
    white-space: nowrap;
  }
  .header-phone { color: var(--accent); }
  .desktop-nav a:hover, .header-phone:hover { text-decoration: underline; text-underline-offset: 4px; }
  .hero { padding-block: 29px 24px; }
  .hero-heading { grid-template-columns: 2fr 1fr; align-items: end; gap: 22px; margin-bottom: 22px; }
  .hero h1 { font-size: clamp(2.4rem, 4.58vw, 4.4rem); }
  .hero-heading p { justify-self: end; padding-bottom: 4px; font-size: 1rem; }
  .hero-options { grid-template-columns: minmax(0, 1.19fr) minmax(0, 1fr); gap: 12px; }
  .hero-option { position: relative; }
  .hero-stone, .hero-secondary { display: block; }
  .hero-media { height: clamp(235px, 24vw, 344px); aspect-ratio: auto; }
  .hero-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 47px;
    margin-top: 6px;
    padding: 8px 13px;
    border: 1px solid var(--dark-border);
    font-size: .94rem;
    font-weight: 680;
    text-decoration: none;
  }
  .hero-category::after { position: absolute; inset: 0; content: ""; }
  .hero-wood .hero-category { border-color: var(--accent); background: var(--accent); color: var(--ink); }
  .hero-option:not(.hero-wood) .hero-category > span { color: var(--accent); }
  .image-label { padding: 6px 10px; font-size: .74rem; }
  .proof-inner { grid-template-columns: 1fr 1fr 1fr; padding-block: 15px; }
  .proof-item:not(:first-child), .proof-review { padding-left: clamp(16px, 4vw, 55px); }
  .proof-item strong { font-size: 1.38rem; }
  .proof-review { font-size: 1rem; }
  .section-space { padding-block: 53px; }
  .section-head { margin-bottom: 17px; }
  .catalog-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
  .catalog-meta { gap: 22px; }
  [data-materials="wood"] .catalog-meta { width: 100%; }
  .floor-filter select { font-size: .88rem; }
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .project-link { grid-template-columns: minmax(0, 1fr); height: 100%; }
  .project-media { aspect-ratio: 1.62; }
  .project-copy { padding: 13px 32px 14px 13px; }
  .project-copy h3 { font-size: 1.21rem; }
  .project-facts { margin-block: 5px; }
  .project-arrow { top: auto; right: 12px; bottom: 14px; }
  .built-layout { grid-template-columns: .61fr 1fr; align-items: center; gap: 40px; }
  .built-copy h3 { margin-top: 20px; }
  .built-photo { aspect-ratio: 1.96; }
  .process-layout { grid-template-columns: .47fr 1fr; gap: 36px; align-items: start; }
  .process-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .process-list li { padding-block: 13px 0; }
  .process-list li:last-child { border-bottom: 0; }
  .footer { padding-block: 37px; }
  .footer-layout { grid-template-columns: 1fr auto; align-items: center; gap: 22px; }
}

@media (hover: hover) {
  .button:hover, .hero-wood .hero-category:hover { background: var(--accent-soft); }
  .hero-option:not(.hero-wood) .hero-category:hover { border-color: var(--accent); }
  .project-link:hover { border-color: var(--accent-deep); }
  .project-link:hover h3 { color: var(--accent-deep); }
  .materials button:hover, .built-views button:hover { border-color: var(--accent-deep); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-category, .button, .project-link, .materials button, .built-views button { transition: background-color .18s ease, border-color .18s ease; }
  .project-arrow { transition: transform .18s ease; }
  .project-link:hover .project-arrow { transform: translate(2px, -2px); }
  .built-photo:not([hidden]) { animation: photo-in .22s ease-out; }
  [data-motion-case] .built-photo { animation: none; }
}

@keyframes photo-in { from { opacity: .74; } to { opacity: 1; } }
