/* lagomhome: шрифт, палитра и компоненты поверх собранного Tailwind.
   Подключается после tailwind.css. */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  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+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* знак рубля у Google лежит в latin-ext (70 КБ) — вырезан в отдельный файл */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-rub.woff2") format("woff2");
  unicode-range: U+20BD;
}

:root {
  --ink: #1a2026; /* графит с сайта lagomhome */
  --ink-2: #2b343d;
  --paper: #fdfcf9;
  --tile: #f6f5f2;
  --line: #e5e4de;
  --oak: #b9773c; /* наш акцент: цвет дуба с их фото */
  --oak-text: #8a5526;
  --oak-light: #d9a066;
}

/* шаблон: scroll-smooth стоял на body и не работал */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}
html.menu-open {
  overflow: hidden;
}
body {
  background-color: #f8f7f4;
  color: #1a1a1a;
  font-family: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection {
  background: var(--oak);
  color: #fff;
}
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #f8f7f4;
  border-left: 1px solid var(--line);
}
::-webkit-scrollbar-thumb {
  background: #d1d0ca;
}
::-webkit-scrollbar-thumb:hover {
  background: #a8a7a2;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
:focus-visible {
  outline: 2px solid var(--oak);
  outline-offset: 3px;
}
h1,
h2,
.t-promo {
  text-wrap: balance;
}

.logo {
  letter-spacing: -0.02em;
  text-transform: lowercase;
}
.topbar {
  transition: color 0.2s;
}
.topbar:hover {
  color: #fff;
}

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.9rem 1.75rem;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}
.btn-ink {
  background: var(--ink);
  color: #fff;
}
.btn-ink:hover {
  background: var(--ink-2);
}
.btn-line {
  border-color: rgba(26, 32, 38, 0.28);
  color: var(--ink);
  background: rgba(253, 252, 249, 0.7);
}
.btn-line:hover {
  border-color: var(--ink);
}
.link-u {
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  transition: color 0.2s;
}
.link-u:hover {
  color: var(--oak-text);
}

/* ---------- первый экран ---------- */
.t-hero {
  font-size: clamp(2rem, 9.4vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.hero {
  background: var(--paper);
}
.hero-copy {
  z-index: 2;
}
.hero-photo {
  display: block;
  position: relative;
  order: 2;
  aspect-ratio: 9 / 9.6;
  overflow: hidden;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}
.hero-canvas {
  z-index: 1;
}
.hero-note {
  position: absolute;
  z-index: 2;
  left: 12px;
  right: 12px;
  bottom: 12px;
  width: fit-content;
  max-width: calc(100% - 24px);
  padding: 0.45rem 0.7rem;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 400;
  color: #4b5563;
  background: rgba(253, 252, 249, 0.86);
  border-radius: 2px;
}
/* планшет: кадр на всю ширину был бы выше экрана */
@media (min-width: 640px) and (max-width: 1023px) {
  .hero-photo {
    aspect-ratio: 16 / 10;
  }
  .hero-photo img {
    object-position: 50% 78%;
  }
}
@media (min-width: 1024px) {
  .t-hero {
    font-size: clamp(3rem, 4.7vw, 4.25rem);
  }
  .hero-copy {
    width: 54%;
  }
  .hero-photo {
    position: absolute;
    inset: 0 0 0 auto;
    width: 60%;
    aspect-ratio: auto;
    order: 0;
    /* левый край кадра — белая стена: растворяем его в цвете страницы */
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30%);
    mask-image: linear-gradient(to right, transparent 0, #000 30%);
  }
  .hero-photo img {
    object-position: 62% 55%;
  }
  .hero-note {
    left: auto;
    right: 16px;
    bottom: 16px;
  }
}
/* вместо видео шаблона — медленный наезд на фотографию */
@media (prefers-reduced-motion: no-preference) {
  .hero-photo img {
    animation: hero-zoom 22s ease-in-out infinite alternate;
  }
  html.js .hero-in {
    animation: hero-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  html.js .hero-in:nth-child(2) {
    animation-delay: 0.08s;
  }
  html.js .hero-in:nth-child(3) {
    animation-delay: 0.16s;
  }
  html.js .hero-in:nth-child(4) {
    animation-delay: 0.24s;
  }
}
@keyframes hero-zoom {
  from {
    scale: 1;
  }
  to {
    scale: 1.06;
  }
}
@keyframes hero-in {
  from {
    opacity: 0;
    translate: 0 18px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* ---------- плитки и карточки товаров ---------- */
.tag {
  align-self: flex-start;
  width: fit-content;
  padding: 0.375rem 0.75rem;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4b5563;
  background: rgba(229, 228, 222, 0.6);
  border-radius: 2px;
  position: relative;
  z-index: 2;
}
.tag-sm {
  padding: 0.25rem 0.5rem;
  margin-bottom: 1rem;
  background: #f5f5f3;
}
/* предметные кадры обрезаны по предмету и стоят на белом: multiply сливает их с плашкой */
.tile-img,
.piece-img {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
}
.tile-img {
  margin: 1.5rem 6%;
  /* шаблон: появление плитки ведёт opacity и transform этой обёртки — на это время она
     отдельный слой, и multiply картинки внутри не достаёт до плашки: вокруг предмета
     0,8 с стоял белый прямоугольник. Смешиваем с плашкой саму обёртку */
  mix-blend-mode: multiply;
}
.piece-img {
  margin-bottom: 1rem;
}
.tile-img img,
.piece-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: scale 0.7s ease-out;
}
.group:hover .tile-img img,
.group:hover .piece-img img {
  scale: 1.05;
}

.rail {
  display: flex;
  gap: 1px;
  background: var(--line);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}
.piece {
  flex: 0 0 82%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  height: 400px;
  padding: 1.5rem;
  background: #fff;
}
@media (min-width: 640px) {
  .piece {
    flex-basis: calc((100% - 1px) / 2);
  }
}
@media (min-width: 1024px) {
  .piece {
    flex-basis: calc((100% - 3px) / 4);
    height: 420px;
  }
}
.piece-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f0efeb;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  color: #6b7280;
}
.dots {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  padding-top: 3px;
}
.dots i,
.swatches i {
  display: block;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.dots i {
  width: 12px;
  height: 12px;
}
.piece-all {
  justify-content: space-between;
  background: var(--tile);
}
.t-all {
  font-size: 1.75rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.rail-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: #6b7280;
  transition: color 0.2s, border-color 0.2s, opacity 0.2s;
}
.rail-btn:hover:not(:disabled) {
  color: #000;
  border-color: #000;
}
.rail-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ---------- каталог: шесть колонок с бегущей строкой ---------- */
.cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.cat {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--tile);
  border-bottom: 1px solid var(--line);
}
.cat:nth-child(odd) {
  border-right: 1px solid var(--line);
}
.cat-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  transition: scale 2s ease-out;
}
.cat:hover .cat-bg {
  scale: 1.05;
}
.cat-veil {
  position: absolute;
  inset: 0 0 auto 0;
  height: 60%;
  background: linear-gradient(to bottom, var(--tile), rgba(246, 245, 242, 0.9) 50%, rgba(246, 245, 242, 0));
}
.cat-body {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem 1rem;
}
.cat-more {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.8rem;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #000;
  background: rgba(253, 252, 249, 0.9);
}
.marquee-overlay {
  display: none;
}
@media (min-width: 1024px) {
  .cats {
    display: flex;
    height: 75vh;
    min-height: 520px;
    max-height: 780px;
  }
  .cat {
    flex: 1 1 0;
    aspect-ratio: auto;
    height: 100%;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
  .cat:last-child {
    border-right: 0;
  }
  .cat-body {
    padding: 2.5rem 1.5rem 1.5rem;
  }
}
/* бегущая строка поверх колонки — только там, где есть мышь */
@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  html.js .marquee-overlay {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 5;
    overflow: hidden;
    pointer-events: none;
    background: var(--ink);
    visibility: hidden;
  }
  .marquee-slide {
    height: 100%;
  }
  .marquee-inner {
    height: 100%;
    width: max-content;
    display: flex;
    align-items: center;
    animation: marquee 9s linear infinite;
    animation-play-state: paused;
  }
  .cat:hover .marquee-inner {
    animation-play-state: running;
  }
  .marquee-part {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--paper);
  }
  .marquee-part span {
    white-space: nowrap;
    text-transform: uppercase;
    font-weight: 200;
    letter-spacing: -0.01em;
    font-size: 4vh;
    line-height: 1;
    padding: 0 1vw;
  }
  .marquee-part i {
    display: block;
    width: 120px;
    height: max(4vh, 34px);
    margin: 0 1vw;
    border-radius: 999px;
    background-size: cover;
    background-position: center 70%;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}
@keyframes marquee {
  to {
    transform: translateX(var(--w, -300px));
  }
}

/* ---------- комнаты ---------- */
.room-arrow {
  flex-shrink: 0;
  color: #000;
  opacity: 0;
  translate: -8px 0;
  transition: opacity 0.3s, translate 0.3s;
}
.room:hover .room-arrow,
.room:focus-visible .room-arrow {
  opacity: 1;
  translate: 0 0;
}
@media (hover: none) {
  .room-arrow {
    opacity: 1;
    translate: 0 0;
  }
}

/* ---------- образцы, мастерская, сервис, отзывы ---------- */
.t-promo {
  font-size: clamp(1.7rem, 3.1vw, 2.75rem);
  line-height: 1.14;
}
.swatches {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 1.1rem 1.5rem;
}
@media (min-width: 480px) {
  .swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.1rem;
  }
}
.swatches li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  font-size: 11px;
  font-weight: 400;
  color: #4b5563;
}
.swatches i {
  width: 46px;
  height: 46px;
}
.step {
  background: var(--paper);
  padding: 1.75rem 1.25rem 2rem;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
}
.step > span {
  display: block;
  margin-bottom: 1.1rem;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--oak-text);
}
.quote {
  background: #fff;
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.75rem;
}
.quote blockquote {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  color: #333;
}
.quote figcaption {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.quote figcaption a {
  display: block;
  width: fit-content;
  margin-top: 0.35rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #6b7280;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.quote figcaption a:hover {
  color: #000;
}
@media (min-width: 640px) {
  .step {
    padding: 2rem 1.5rem 2.25rem;
  }
  .quote {
    padding: 2rem 1.5rem;
  }
}
@media (min-width: 1024px) {
  .step {
    padding: 2.25rem 2rem 2.75rem;
  }
  .quote {
    padding: 2.5rem 2rem;
  }
}

/* ---------- вопросы ---------- */
.faq-toggle {
  width: 100%;
  padding: 1.15rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}
.faq-n {
  flex-shrink: 0;
  width: 2.25rem;
  font-size: 12px;
  font-weight: 300;
  color: #6b7280;
}
.faq-ico {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #6b7280;
  transition: rotate 0.3s;
}
.faq-toggle[aria-expanded="true"] .faq-ico {
  rotate: 180deg;
}
.accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.3s ease-out, visibility 0s 0.3s;
}
.accordion-content.is-open {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.3s ease-out, visibility 0s;
}
.accordion-inner {
  overflow: hidden;
}
.accordion-inner p {
  padding: 0 2rem 1.25rem 2.25rem;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.8;
  color: #4b5563;
}

/* ---------- подвал ---------- */
.foot-links {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.62);
}
.foot-links a {
  width: fit-content;
  transition: color 0.2s;
}
.foot-links a:hover {
  color: #fff;
}

/* ---------- меню для узких экранов ---------- */
.menu-btn {
  position: relative;
  width: 30px;
  height: 30px;
  color: var(--ink);
}
.menu-btn span {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 1.5px;
  background: currentColor;
  transition: translate 0.25s, rotate 0.25s;
}
.menu-btn span:first-child {
  top: 11px;
}
.menu-btn span:last-child {
  top: 18px;
}
.menu-open .menu-btn span:first-child {
  translate: 0 3.5px;
  rotate: 45deg;
}
.menu-open .menu-btn span:last-child {
  translate: 0 -3.5px;
  rotate: -45deg;
}
.menu {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 124px 20px 28px;
  overflow-y: auto;
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0s 0.25s;
}
.menu-open .menu {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s, visibility 0s;
}
.menu nav a {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.35rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.menu-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding-top: 1.75rem;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4b5563;
}

/* ---------- появление блоков ---------- */
/* в сетках с волосяными линиями (плитки, шаги, отзывы) прячем содержимое ячейки,
   а не саму ячейку: иначе до появления виден серый фон сетки */
html.js .reveal:not(.is-in),
html.js .reveal-cell:not(.is-in) > * {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  html.js .reveal:not(.is-in),
  html.js .reveal-cell:not(.is-in) > * {
    opacity: 1;
  }
  .marquee-inner {
    animation: none !important;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}
