/* ЛЕВ & ЛАМПА — лендинг (дизайн «Версия 2 — правки автора») */

/* ---------- Шрифты (self-hosted, variable woff2) ---------- */
@font-face {
  font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url(../fonts/cormorant-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url(../fonts/cormorant-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;
}
@font-face {
  font-family: 'Jost'; font-style: normal; font-weight: 300 400; font-display: swap;
  src: url(../fonts/jost-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Jost'; font-style: normal; font-weight: 300 400; font-display: swap;
  src: url(../fonts/jost-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;
}

@font-face {
  font-family: 'Tenor Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/tenor-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Tenor Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../fonts/tenor-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;
}

/* ---------- Токены ---------- */
:root {
  --bg: #F2EDE5;
  --ink: #2B241E;
  --muted: #6E6257;
  --red: #AE2E2A;
  --red-dark: #962521;
  --on-red: #FFF8F2;
  --chip: #E8E0D4;
  --placeholder: #9A8E81;
  --line: rgba(43, 36, 30, 0.15);
  --line-2: rgba(43, 36, 30, 0.2);
  --line-3: rgba(43, 36, 30, 0.3);
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Jost', system-ui, sans-serif;
  --display: 'Tenor Sans', 'Jost', system-ui, sans-serif; /* только главная надпись */
  /* Шкала шрифтов: Cormorant — title / lead / sub, Jost — body / small / caps */
  --fs-title: clamp(36px, 4vw, 56px);
  --fs-lead: clamp(28px, 2.6vw, 40px);
  --fs-sub: 28px;
  --fs-body: 17px;
  --fs-small: 14px;
  --fs-caps: 12px;
  --pad-x: clamp(20px, 5vw, 64px);
  --sec-y: clamp(72px, 12vw, 160px);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: 1.65;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
p, h1, h2, h3, dl, dd { margin: 0; }
a { color: var(--ink); text-decoration: none; transition: color .2s; }
a:hover { color: var(--muted); }
button:focus-visible, a:focus-visible, .chip input:focus-visible + span { outline: 1px solid var(--ink); outline-offset: 4px; }
[hidden] { display: none !important; }

.muted { color: var(--muted); }
.ink { color: var(--ink); }
.accent { color: var(--red); }

.h2 { font-family: var(--serif); font-weight: 300; font-size: var(--fs-title); line-height: 1.08; }
.display { font-family: var(--serif); font-weight: 300; font-size: var(--fs-lead); line-height: 1.15; }
.h3, .quote { font-family: var(--serif); font-weight: 300; font-size: var(--fs-sub); line-height: 1.25; }

/* Капс-подписи: кнопки, меню, футер, «назад» на странице политики */
.btn, .header, .footer, .policy__back {
  font-family: var(--sans); font-weight: 400; font-size: var(--fs-caps);
  letter-spacing: 0.16em; text-transform: uppercase;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 32px;
  border: 0; border-radius: 999px;
  background: var(--red); color: var(--on-red);
  cursor: pointer; transition: background .2s;
}
.btn:hover, .btn:focus-visible { background: var(--red-dark); color: var(--on-red); }

.cover-3x4 { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }

.section {
  padding: var(--sec-y) var(--pad-x);
  display: flex; flex-direction: column; align-items: center;
}
.section--flush-top { padding-top: 0; }
.section--line { border-top: 1px solid var(--line); }

/* ---------- 1. Hero ---------- */
.hero {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: clamp(760px, 100vh, 1000px);
}
.hero > * { grid-column: 1; }
.hero__img {
  grid-row: 1 / 4;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 45%;
}
.hero__top { grid-row: 1; display: flex; flex-direction: column; position: relative; }
.header {
  padding: 24px var(--pad-x);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: 24px;
}
.nav { display: flex; gap: 36px; }
.hero__title {
  padding: 0 var(--pad-x);
  text-align: center;
  font-family: var(--display); font-weight: 400;
  /* Tenor Sans шире Cormorant в ~1,2 раза: 10.4vw даёт ту же ширину строки, что прежние 12.5vw */
  font-size: clamp(32px, 10.4vw, 166px); line-height: 1; letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--red);
}
.hero__bar { display: none; }
.hero__sides {
  grid-row: 3; position: relative;
  padding: 40px var(--pad-x) clamp(48px, 6vw, 88px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px) minmax(0, 1fr);
  gap: 32px; align-items: end;
}
.hero__lead { max-width: 360px; }
.hero__right {
  justify-self: end;
  display: flex; flex-direction: column; align-items: flex-end; gap: 24px;
  max-width: 380px; text-align: right;
}

/* ---------- 2. Объект ---------- */
.about { gap: 56px; }
.about__text { display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; max-width: 1000px; }
.about__note { max-width: 620px; }
.about__img { width: 100%; max-width: 1120px; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- 3. История ---------- */
.story { gap: 56px; }
.story__title { max-width: 860px; text-align: center; }
.story__grid {
  width: 100%; max-width: 1240px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(20px, 2.4vw, 32px);
}
.card { display: flex; flex-direction: column; gap: 20px; }
.card__img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.story__outro { max-width: 820px; text-align: center; }

/* ---------- 4. В интерьере ---------- */
.interior { gap: 48px; }
.interior .h2 { text-align: center; }
.interior__grid {
  width: 100%; max-width: 1040px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2.4vw, 32px);
}
.interior__note { max-width: 640px; text-align: center; }

/* ---------- 5. Палитра ---------- */
.palette { gap: 56px; }
.palette__head { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; max-width: 760px; }
.swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; padding-top: 8px; }
.swatch {
  width: 44px; height: 44px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 50%;
  background: transparent; cursor: pointer;
  transition: border-color .2s;
}
.swatch:hover { border-color: var(--line-3); }
.swatch[aria-pressed="true"] { border-color: var(--ink); }
.swatch span {
  display: block; width: 30px; height: 30px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(43, 36, 30, 0.12);
}
.palette__img { width: 100%; max-width: 1240px; aspect-ratio: 16 / 9; object-fit: cover; }
.specs {
  width: 100%; max-width: 1240px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 48px clamp(40px, 6vw, 96px);
  padding-top: 24px;
}
.specs__col { display: flex; flex-direction: column; gap: 24px; }
.specs__list {
  display: grid; grid-template-columns: minmax(110px, 0.6fr) minmax(0, 1.4fr);
  border-top: 1px solid var(--line-2);
}
.specs__list dt, .specs__list dd { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.specs__list dt { color: var(--muted); padding-right: 16px; }
.specs__material {
  border-top: 1px solid var(--line-2); padding-top: 20px;
  display: flex; flex-direction: column; gap: 16px;
}

/* ---------- 6. Дизайнерам ---------- */
.designers { gap: 64px; align-items: stretch; }
.designers__head { display: flex; flex-direction: column; gap: 20px; max-width: 900px; }
.designers__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 48px 32px;
}
.perk { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--ink); padding-top: 24px; }
.cta-row {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 32px;
  padding-top: 32px; border-top: 1px solid var(--line-2);
}
.cta-row .quote { max-width: 720px; }

/* ---------- 7. Вариации ---------- */
.variations { gap: 48px; }
.variations__head { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; max-width: 900px; }
.grid4 {
  width: 100%; max-width: 1240px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
}

/* ---------- 8. Автор ---------- */
.author {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(40px, 6vw, 96px); align-items: center;
  max-width: 1240px; margin: 0 auto;
}
.author__img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.author__text { display: flex; flex-direction: column; gap: 24px; }

/* ---------- 9. Заявка ---------- */
.request { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); }
.request__body {
  padding: clamp(72px, 9vw, 136px) var(--pad-x);
  display: flex; flex-direction: column; justify-content: center; gap: 40px;
}
.request__head { display: flex; flex-direction: column; gap: 20px; }
.request__head p { max-width: 440px; }
.request__img { width: 100%; height: 100%; min-height: 560px; object-fit: cover; }

.form { display: flex; flex-direction: column; gap: 24px; max-width: 560px; }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 24px; }
.field { display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.field input, .field textarea {
  -webkit-appearance: none; appearance: none;
  width: 100%;
  border: 0; border-bottom: 1px solid var(--line-3); border-radius: 0;
  background: transparent;
  padding: 10px 0;
  font: inherit; color: var(--ink);
  transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 64px; }
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); opacity: 1; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--red); }
.field__error { color: var(--red); font-size: var(--fs-small); }

.roles { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.roles legend { padding: 0 0 12px; color: var(--muted); }
.roles__list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 20px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: transparent; color: var(--muted);
  transition: border-color .2s, background .2s, color .2s;
}
.chip:hover span { border-color: var(--line-3); }
.chip input:checked + span { border-color: var(--ink); background: var(--chip); color: var(--ink); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__submit { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 8px; }
.btn--submit { padding: 0 36px; }
.btn--submit[disabled] { opacity: .6; cursor: progress; }
.form__consent { color: var(--muted); font-size: var(--fs-small); }
.form__consent a { border-bottom: 1px solid var(--line-3); }
.form__error { color: var(--red); font-size: var(--fs-small); }

.form__done {
  display: flex; flex-direction: column; gap: 16px;
  border-top: 1px solid var(--ink); padding-top: 32px; max-width: 560px;
  outline: none;
}

/* ---------- Футер ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 36px var(--pad-x) calc(36px + env(safe-area-inset-bottom));
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px;
  color: var(--muted);
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--ink); }
.footer a[href^="mailto:"] { text-transform: none; letter-spacing: 0.04em; font-size: var(--fs-small); }
.footer__brand { letter-spacing: 0.32em; color: var(--red); }

/* ---------- Мобильное меню «Красная нить» (видно только ≤900px) ---------- */
.cord {
  width: 44px; height: 44px; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  border: 0; background: transparent; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cord i { display: block; width: 24px; height: 1.5px; border-radius: 1px; background: var(--red); transition: transform .3s ease; }
.cord i:last-child { width: 16px; margin-left: 8px; }
.cord--close i { background: var(--on-red); }
.cord--close i:first-child { transform: translateY(4.25px) rotate(45deg); }
.cord--close i:last-child { width: 24px; margin-left: 0; transform: translateY(-4.25px) rotate(-45deg); }
.cord:focus-visible { outline: 1px solid currentColor; outline-offset: 2px; }

.menu-float, .menu { display: none; }

@media (max-width: 900px) {
  .hero__bar {
    display: flex; justify-content: flex-end;
    padding: calc(8px + env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 0 0;
  }

  /* Та же кнопка в кремовом круге — появляется, когда первый экран ушёл вверх */
  .menu-float {
    display: flex; position: fixed; z-index: 90;
    top: calc(10px + env(safe-area-inset-top)); right: calc(10px + env(safe-area-inset-right));
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(242, 237, 229, 0.94);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    box-shadow: 0 0 0 1px var(--line), 0 8px 20px -12px rgba(43, 36, 30, .45);
    opacity: 0; visibility: hidden; transform: scale(.8);
    transition: opacity .25s, transform .25s, visibility 0s linear .25s;
  }
  .is-past-hero .menu-float { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .25s; }

  /* Красная штора: опускается сверху */
  .menu {
    display: flex; flex-direction: column;
    position: fixed; inset: 0; z-index: 100;
    padding:
      calc(8px + env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
      calc(28px + env(safe-area-inset-bottom)) max(28px, env(safe-area-inset-left));
    background: var(--red); color: var(--on-red);
    overflow-y: auto; overscroll-behavior: contain;
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path .45s cubic-bezier(.7, 0, .2, 1), visibility 0s linear .45s;
  }
  .menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .45s cubic-bezier(.7, 0, .2, 1); }
  .menu-open { overflow: hidden; }
  .menu__top { display: flex; justify-content: flex-end; }
  .menu__list { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
  .menu__list a {
    display: block; padding: 6px 0;
    font-family: var(--serif); font-weight: 300; font-size: 40px; line-height: 1.05;
    color: var(--on-red); opacity: .78; transition: opacity .2s;
  }
  .menu__list a:hover, .menu__list a[aria-current="true"] { opacity: 1; color: var(--on-red); }
  .menu__list a[aria-current="true"] { font-style: italic; }
  .menu__foot { margin-top: auto; padding: 40px 20px 0 0; display: flex; flex-direction: column; gap: 16px; }
  .btn--light, .btn--light:hover, .btn--light:focus-visible { background: var(--on-red); color: var(--red); }
  .menu__contacts { font-weight: 400; font-size: var(--fs-caps); letter-spacing: 0.16em; text-transform: uppercase; }
  .menu__contacts a { color: var(--on-red); opacity: .8; }
  .menu__contacts a[href^="mailto:"] { text-transform: none; letter-spacing: 0.04em; font-size: var(--fs-small); }
}
@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .menu, .menu-open .menu, .menu-float, .cord i { transition: none; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  /* Hero: заголовок лежит на картинке, как на десктопе; текст — под ней */
  .header { display: none; }
  .hero { grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; }
  .hero__img {
    grid-row: 1 / 3;
    height: min(150vw, calc(100svh - 140px)); min-height: 440px;
    object-position: 50% 50%;
  }
  .hero__top { grid-row: 1; } /* сверху теперь строка с кнопкой меню (.hero__bar) */
  .hero__sides { grid-row: 3; grid-template-columns: minmax(0, 1fr); background: var(--bg); }
  .hero__gap { display: none; }
  .hero__right { justify-self: start; text-align: left; align-items: flex-start; }
}
@media (max-width: 760px) {
  :root { --sec-y: 72px; --fs-sub: 24px; }

  .hero__sides { padding-top: 32px; padding-bottom: 64px; gap: 20px; }
  .hero__lead { max-width: none; }
  .hero__right { max-width: none; gap: 28px; }
  .hero__right .btn, .cta-row .btn, .btn--submit { align-self: stretch; }

  /* Схема и панорама палитры — во всю ширину экрана, иначе мелко */
  .about__img, .palette__img {
    width: calc(100% + 2 * var(--pad-x)); max-width: none;
    margin-inline: calc(-1 * var(--pad-x));
  }
  .about { gap: 40px; }
  .about__text { gap: 20px; }
  .palette { gap: 40px; }
  .palette__head { gap: 20px; }

  /* История и интерьер — горизонтальная лента со свайпом */
  .story { gap: 40px; }
  .interior { gap: 32px; }
  .story__grid, .interior__grid {
    display: flex; gap: 16px;
    width: calc(100% + 2 * var(--pad-x)); max-width: none;
    margin-inline: calc(-1 * var(--pad-x));
    padding-inline: var(--pad-x);
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad-x);
    scrollbar-width: none;
  }
  .story__grid::-webkit-scrollbar, .interior__grid::-webkit-scrollbar { display: none; }
  .story__grid > *, .interior__grid > * { flex: 0 0 78%; scroll-snap-align: start; }
  .card { gap: 16px; }

  /* Все семь цветов в один ряд */
  .swatches { flex-wrap: nowrap; gap: 2px; width: 100%; }
  .swatch { flex: 0 1 44px; width: auto; height: auto; aspect-ratio: 1; }
  .swatch span { width: 68%; height: 68%; }

  .specs { gap: 48px; padding-top: 8px; }

  .designers { gap: 40px; }
  .designers__grid { gap: 32px; }
  .perk { padding-top: 20px; gap: 8px; }
  .cta-row { flex-direction: column; align-items: flex-start; gap: 28px; }

  .variations { gap: 32px; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .author { gap: 32px; }
  .author__text { gap: 20px; }

  .request__body { gap: 32px; padding-top: 72px; padding-bottom: 72px; }
  .request__img { min-height: 0; height: auto; aspect-ratio: 4 / 5; }
  .footer { flex-direction: column; align-items: flex-start; gap: 12px; }
}
