/* Цвета и шрифты — из шаблона Canva */
:root {
  --photo-ratio: 5 / 8;   /* форма рамки для фото товаров: чуть длиннее прежних 2 / 3, чтобы не обрезались детали */
  --cream: #ECE7DE;
  --cream-2: #EAE5DC;
  --wine: #A24E4E;
  --cocoa: #4D403A;
  --ink: #262626;
  --white: #fff;
  --serif: "CMU Serif", "Crimson Text", Georgia, serif;
  --sans: "Mulish", "Muli", system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--cream); color: var(--wine);
  font-family: var(--sans); font-size: 17px; line-height: 1.5; font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Анимированный логотип: проявление слева направо ---------- */
.reveal {
  -webkit-mask-image: linear-gradient(90deg, #000 42%, transparent 58%);
          mask-image: linear-gradient(90deg, #000 42%, transparent 58%);
  -webkit-mask-size: 250% 100%; mask-size: 250% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: 100% 0; mask-position: 100% 0;
  animation: reveal 2.4s cubic-bezier(.45, .05, .25, 1) .3s forwards;
}
@keyframes reveal { to { -webkit-mask-position: 0 0; mask-position: 0 0; } }

.splash {
  position: fixed; inset: 0; z-index: 100; background: var(--cream);
  display: grid; place-items: center; transition: opacity .9s ease, visibility .9s;
}
.splash.is-done { opacity: 0; visibility: hidden; }
.splash__logo { width: min(440px, 70vw); }

/* ---------- Шапка ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter); color: var(--wine); background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid color-mix(in srgb, var(--wine) 18%, transparent);
  transition: background .35s, color .35s, border-color .35s;
}
.header--over { color: #fff; background: transparent; backdrop-filter: none; border-color: transparent; }
.header--over .header__logo { opacity: 0; pointer-events: none; }
.header__logo { transition: opacity .35s; }
.header__logo img { height: 34px; width: auto; }
.nav { display: flex; gap: 26px; margin-left: auto; font-size: 15px; letter-spacing: .02em; }
.nav a { text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; transition: border-color .25s; }
.nav a:hover { border-color: currentColor; }
.tools { display: flex; align-items: center; gap: 14px; }
.lang { display: flex; gap: 2px; }
.lang button {
  font: 600 13px var(--sans); letter-spacing: .06em; color: inherit; background: none;
  border: 1px solid transparent; border-radius: 999px; padding: 5px 9px; cursor: pointer;
}
.lang button[aria-pressed="true"] { border-color: currentColor; }
.currency select {
  font: 600 13px var(--sans); color: inherit; background: transparent;
  border: 1px solid currentColor; border-radius: 999px; padding: 6px 10px; cursor: pointer;
}
.currency select option { color: #262626; background: #fff; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; text-decoration: none;
  font: 600 15px var(--sans); letter-spacing: .04em; color: var(--wine); background: transparent;
  border: 1px solid var(--wine); border-radius: 999px; padding: 13px 28px;
  transition: background .25s, color .25s;
}
.btn:hover { background: var(--wine); color: var(--cream); }
.btn--solid { background: var(--wine); color: var(--cream); }
.btn--solid:hover { background: var(--cocoa); border-color: var(--cocoa); }
.btn--light { color: #fff; border-color: rgba(255,255,255,.85); }
.btn--light:hover { background: #fff; color: var(--wine); }

/* ---------- Главная: фото на весь экран ---------- */
.hero { position: relative; height: clamp(560px, 100svh, 880px); overflow: hidden; color: #fff; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 38% 64%; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(40,28,22,.28) 0%, rgba(40,28,22,0) 30%, rgba(40,28,22,0) 55%, rgba(40,28,22,.42) 100%); }
.hero__logo { position: absolute; top: clamp(64px, 11vh, 120px); left: 50%; transform: translateX(-50%); width: clamp(210px, 28vw, 400px); }
.hero__copy { position: absolute; left: 0; right: 0; bottom: clamp(36px, 8vh, 84px); text-align: center; padding: 0 var(--gutter); }
.hero__title { margin: 0; font: 400 clamp(28px, 3.4vw, 46px)/1.05 var(--serif); letter-spacing: -.01em; text-shadow: 0 1px 18px rgba(0,0,0,.25); }
.hero__title span { display: block; }
.hero__sub { font: italic 400 clamp(15px, 1.4vw, 19px)/1.3 var(--serif); margin: 18px 0 22px; text-shadow: 0 1px 12px rgba(0,0,0,.3); }

/* ---------- Студия: движущиеся «модели» ---------- */
.studio { overflow: hidden; padding: 12px 0 4px; }
.studio__track {
  display: flex; gap: 20px; width: max-content; padding-left: 20px;
  animation: drift 46s linear infinite;
}
.studio__track:hover, .studio__track.is-held { animation-play-state: paused; }
@keyframes drift { to { transform: translateX(-50%); } }
.model {
  position: relative; flex: none; width: clamp(170px, 19vw, 250px); aspect-ratio: var(--photo-ratio); border: 0; padding: 0;
  border-radius: 140px 140px 8px 8px; overflow: hidden; cursor: pointer; color: inherit;
  transition: transform .5s ease, box-shadow .5s ease;
}
.model:hover { transform: translateY(-6px); box-shadow: 0 18px 40px -18px rgba(77, 64, 58, .5); }
.studio__hint { text-align: center; margin: 18px var(--gutter) 0; font-size: 14px; opacity: .75; }

/* Заглушка вместо фото (пока фото не загружены) */
.ph {
  width: 100%; height: 100%; display: grid; place-content: center; text-align: center; gap: 6px; padding: 16px;
  background:
    radial-gradient(120% 80% at 30% 15%, rgba(255,255,255,.28), transparent 60%),
    linear-gradient(160deg, var(--tone), color-mix(in srgb, var(--tone) 82%, #000));
  color: var(--ink-c);
}
.ph b { font: 400 clamp(22px, 3vw, 34px)/1.05 var(--serif); letter-spacing: .02em; }
.ph i { font: italic 400 15px var(--serif); opacity: .85; }
.ph small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .6; }

/* ---------- Секции ---------- */
.section { padding: clamp(56px, 9vw, 120px) var(--gutter); }
.section__title { margin: 0 0 clamp(28px, 4vw, 52px); font: 400 clamp(32px, 5vw, 64px)/1.05 var(--serif); letter-spacing: -.015em; }
.section__title--center { text-align: center; }
.fabrics-sec { padding-top: clamp(64px, 9vw, 120px); }
.fabrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; max-width: 1240px; margin: 0 auto; }
.fabric { display: flex; flex-direction: column; justify-content: space-between; gap: 34px; text-align: center; background: #fff; border: 1px solid color-mix(in srgb, var(--wine) 55%, transparent); padding: clamp(34px, 5vw, 62px) clamp(26px, 3.4vw, 46px) clamp(26px, 3vw, 40px); min-height: 360px; }
.fabric p { margin: 0; font-size: 16px; line-height: 1.55; }
.fabric b { font-weight: 700; }
.fabric h3 { margin: 0; font: 700 21px/1.2 var(--sans); }

/* Два крупных плана с текстом */
.duo { padding: clamp(20px, 5vw, 70px) var(--gutter) clamp(48px, 7vw, 100px); }
.duo__frame { position: relative; max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; background: var(--cocoa); }
.duo__frame > img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.duo__frame::after { content: ""; position: absolute; inset: 0; background: rgba(32, 22, 18, .22); pointer-events: none; }
.duo__text { position: absolute; z-index: 2; inset: 0; margin: 0; padding: 0 clamp(18px, 7vw, 100px); display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; font: 400 clamp(20px, 3.6vw, 46px)/1.14 var(--serif); letter-spacing: -.01em; text-shadow: 0 1px 22px rgba(0,0,0,.28); }
.duo__logo { display: inline-block; height: 1.2em; width: auto; vertical-align: -.22em; margin-right: .15em; }

/* О бренде */
.about { background: #fff; }
.about__top { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(28px, 6vw, 90px); padding: clamp(56px, 9vw, 130px) var(--gutter); }
.about__title { margin: 0; text-align: center; font: 400 clamp(40px, 6vw, 80px)/1 var(--serif); letter-spacing: -.02em; }
.about__text { text-align: center; font-size: 17px; line-height: 1.5; }
.about__text p { margin: 0 0 14px; }
.care { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(24px, 6vw, 90px); padding: 0 var(--gutter) clamp(56px, 8vw, 100px); }
.care__photo { position: relative; margin: 0; max-width: 520px; width: 100%; }
.care__photo img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; object-position: 50% 40%; }
.care__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(25,18,15,.55)); pointer-events: none; }
.care__photo figcaption { position: absolute; z-index: 2; left: clamp(16px, 3vw, 26px); right: 20%; bottom: clamp(18px, 3vw, 30px); color: #fff; font: 400 clamp(24px, 3.1vw, 40px)/1.05 var(--serif); letter-spacing: -.01em; }
.care__list { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(26px, 4vw, 52px); }
.care__list li { display: grid; justify-items: center; gap: 14px; text-align: center; font-size: clamp(17px, 1.9vw, 23px); line-height: 1.3; }
.care__list svg { width: 44px; height: 44px; fill: none; stroke: var(--wine); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* Фото-баннер «Комфорт не должен исключать красоту» */
.beauty { position: relative; height: clamp(440px, 56vw, 768px); overflow: hidden; color: #fff; }
.beauty__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 35%; }
.beauty__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,12,8,.18), rgba(20,12,8,.5)); }
.beauty__copy { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 0 var(--gutter); }
.beauty__copy h3 { margin: 0 auto 18px; max-width: 900px; font: 400 clamp(32px, 5.8vw, 80px)/1 var(--serif); letter-spacing: -.02em; text-shadow: 0 1px 26px rgba(0,0,0,.3); }
.beauty__copy p { margin: 0 auto; max-width: 760px; font-size: clamp(15px, 1.6vw, 21px); line-height: 1.4; }

/* ---------- Каталог ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 34px 24px; }
.card { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.card__img { aspect-ratio: var(--photo-ratio); border-radius: 6px; overflow: hidden; transition: transform .5s ease; }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .card__img { transform: translateY(-4px); }
.card__name { margin: 16px 0 0; font: 400 28px/1.05 var(--serif); letter-spacing: .01em; }
.card__type { margin: 4px 0 0; font: italic 400 17px var(--serif); opacity: .9; }
.card__price { margin: 8px 0 0; font-weight: 600; font-size: 15px; letter-spacing: .03em; }
.price-old { text-decoration: line-through; opacity: .6; font-weight: 400; margin-right: 8px; }
.price-note, .rate-note { font-size: 13px; opacity: .75; margin: 26px 0 0; }
.rate-note { margin: -26px 0 26px; }

/* ---------- Контакты и подвал ---------- */
.contacts { background: var(--cream-2); }
.contacts__photos { display: flex; justify-content: center; gap: 14px; margin: 0 0 clamp(36px, 5vw, 64px); }
.contacts__photos img { width: min(380px, 44vw); aspect-ratio: 2 / 3; object-fit: cover; }
.contacts__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; font-size: clamp(17px, 1.9vw, 24px); }
.contacts p { margin: 0 0 6px; }
.label { font-size: 13px !important; text-transform: uppercase; letter-spacing: .12em; opacity: .75; margin-bottom: 8px !important; }
.label--gap { margin-top: 28px !important; }
.contacts a { text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--wine) 40%, transparent); }
.contacts a:hover { border-color: var(--wine); }
.contacts .contacts__logo { width: min(300px, 100%); justify-self: end; border: 0; }
.footer { padding: 26px var(--gutter) 34px; text-align: center; background: var(--cream-2); }
.footer p { margin: 0; font-size: 13px; opacity: .7; }

/* ---------- Окно товара ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(38, 30, 28, .55); backdrop-filter: blur(3px); animation: fade .3s ease; }
.modal__panel {
  position: relative; width: min(1040px, 100%); max-height: 100%; overflow: auto; background: var(--cream);
  border-radius: 10px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; animation: rise .4s ease;
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.modal__close {
  position: absolute; top: 10px; right: 14px; z-index: 3; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--wine); background: var(--cream); color: var(--wine); font: 300 28px/1 var(--sans); cursor: pointer;
}
.gallery { padding: 20px; }
.gallery__main { aspect-ratio: var(--photo-ratio); height: min(calc(100vh - 262px), 640px); width: auto; margin: 0 auto; overflow: hidden; border-radius: 6px; cursor: zoom-in; position: relative; touch-action: manipulation; }
.gallery__main.is-zoomed { cursor: zoom-out; }
.gallery__main > * { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; transform-origin: var(--ox, 50%) var(--oy, 50%); }
.gallery__main.is-zoomed > * { transform: scale(2.4); transition: transform .2s ease; }
.gallery__hint { margin: 8px 0 12px; font-size: 12.5px; opacity: .7; text-align: center; }
.gallery__thumbs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; }
.thumb { flex: 0 0 64px; aspect-ratio: var(--photo-ratio); border: 2px solid transparent; border-radius: 6px; overflow: hidden; padding: 0; cursor: pointer; background: none; }
.thumb[aria-current="true"] { border-color: var(--wine); }
.thumb .ph { padding: 4px; }
.thumb .ph b, .thumb .ph i { display: none; }
.thumb .ph small { font-size: 9px; letter-spacing: .06em; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.info { padding: 56px 40px 36px 20px; display: flex; flex-direction: column; }
.info__type { margin: 0 0 6px; font: italic 400 20px var(--serif); }
.info__name { margin: 0 0 18px; font: 400 clamp(36px, 4.4vw, 54px)/1 var(--serif); }
.info__price { margin: 0; font-size: 22px; font-weight: 600; }
.info__note { margin: 2px 0 22px; font-size: 12.5px; opacity: .7; }
.info__desc { margin: 0 0 8px; }
.info__actions { margin-top: auto; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }
.info__hint { margin: 12px 0 0; font-size: 12.5px; opacity: .7; }

/* ---------- Телефон ---------- */
@media (max-width: 860px) {
  .header { flex-wrap: wrap; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
  .header--over .nav { opacity: .95; }
  .about__top, .care { grid-template-columns: 1fr; }
  .care__photo { justify-self: center; }
  .contacts .contacts__logo { justify-self: start; width: 220px; }
  .hero__img { object-position: 36% 60%; }
  .hero__logo { top: 118px; }
  .duo { padding-left: 10px; padding-right: 10px; }
  .contacts__grid { grid-template-columns: 1fr; gap: 26px; }
  .contacts .contacts__logo { grid-column: auto; margin-top: 4px; }
  .header__logo img { height: 28px; }
  .nav { order: 3; width: 100%; margin: 0; gap: 18px; overflow-x: auto; font-size: 14px; white-space: nowrap; }
  .tools { margin-left: auto; }
  .modal { padding: 0; align-items: end; }
  .modal__panel { grid-template-columns: 1fr; border-radius: 14px 14px 0 0; max-height: 94vh; }
  .info { padding: 4px 22px 28px; }
  .gallery { padding: 14px 14px 0; }
  .gallery__main { height: auto; width: 100%; aspect-ratio: var(--photo-ratio); }
}

/* Уважаем настройку «уменьшить анимацию» */
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; -webkit-mask-image: none; mask-image: none; }
  .studio__track { animation: none; overflow-x: auto; }
  html { scroll-behavior: auto; }
  .modal__panel, .modal__backdrop { animation: none; }
}

.footer .footer__links { margin-top: 8px; font-size: 14px; }
.footer__links a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; opacity: .8; }
.footer__links a:hover { opacity: 1; }

/* ---------- Заголовок «Не только для сна. Для жизни.»: каждое предложение в одну строку ---------- */
.about__title span { display: block; white-space: nowrap; }
.about__title { font-size: min(5.85vw, 80px); letter-spacing: -.02em; }
@media (min-width: 861px) {
  .about__top { grid-template-columns: 1.18fr 1fr; gap: 5.9vw; padding-left: 5.56vw; padding-right: 5.56vw; }
}
@media (max-width: 860px) {
  .about__title { font-size: min(10.4vw, 56px); }
}

/* ---------- Главная на компьютере: кадр, масштаб и подписи 1:1 как в шаблоне Canva (1366 × 768) ---------- */
@media (min-width: 861px) {
  .hero { height: auto; aspect-ratio: 1366 / 768; }
  .hero__img { inset: auto; max-width: none; width: 142.61%; height: auto; left: -25.33%; top: -51.82%; object-fit: fill; }
  .hero__shade { display: none; }
  .hero__logo { top: 6.64%; width: 28.55%; }
  .hero__copy { bottom: 1.5vw; }
  .hero__title { font-size: 2.93vw; line-height: 1.05; letter-spacing: 0; text-shadow: 0 1px 14px rgba(0,0,0,.18); }
  .hero__sub { font-size: clamp(11px, 1.15vw, 20px); font-weight: 600; margin: 3.7vw 0 0; }
}

/* Меню поверх светлой стены на главной: тёмный текст, чтобы читалось */
@media (min-width: 861px) {
  .header--over { color: var(--cocoa); }
}
