/* ============================================================
   PERFECTO PORTE — концепт-демо
   Палитра брендбука 2024: Pantone 419C #100E0E, 7530C #A39382,
   Cool Gray 6 #A7A8A9. Шрифт-аналог: Jost (PF Bague Sans Pro —
   лицензионный, подключается в продакшене).
   ============================================================ */

@font-face { font-family: 'Jost'; font-style: normal; font-weight: 300; font-display: swap;
  src: url('../assets/fonts/jost-cyrillic-300-normal.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; font-display: swap;
  src: url('../assets/fonts/jost-latin-300-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+2013-2014,U+2018-201A,U+201C-201E,U+2022,U+2026; }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../assets/fonts/jost-cyrillic-400-normal.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: 400; font-display: swap;
  src: url('../assets/fonts/jost-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+2013-2014,U+2018-201A,U+201C-201E,U+2022,U+2026; }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../assets/fonts/jost-cyrillic-500-normal.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: 500; font-display: swap;
  src: url('../assets/fonts/jost-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+2013-2014,U+2018-201A,U+201C-201E,U+2022,U+2026; }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../assets/fonts/jost-cyrillic-600-normal.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: 600; font-display: swap;
  src: url('../assets/fonts/jost-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+2013-2014,U+2018-201A,U+201C-201E,U+2022,U+2026; }

:root {
  --ink: #100e0e;
  --ink-soft: #171413;
  --paper: #f4f1ec;
  --beige: #a39382;
  --beige-bright: #c8b8a6;
  --grey: #a7a8a9;
  --line: rgba(163, 147, 130, 0.28);
  --line-soft: rgba(163, 147, 130, 0.14);
  --max: 1320px;
  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: 'Jost', 'Segoe UI', system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* ---------- типографика ---------- */
.label {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--beige);
}
.label--num::before { content: attr(data-num) ' — '; color: var(--grey); }
h1, h2, h3 { font-weight: 300; line-height: 1.14; }
.h-display { font-size: clamp(34px, 5.2vw, 76px); letter-spacing: 0.14em; text-transform: uppercase; }
.h-section { font-size: clamp(26px, 3.4vw, 48px); letter-spacing: 0.1em; text-transform: uppercase; margin: 18px 0 26px; }
.h-card { font-size: clamp(19px, 1.6vw, 24px); letter-spacing: 0.18em; text-transform: uppercase; font-weight: 400; }
.muted { color: var(--grey); }
.lead { max-width: 62ch; color: #d9d4cc; }

/* ---------- декоративная геометрия брендбука ---------- */
.orn { position: absolute; pointer-events: none; opacity: 0.5; }
.orn circle, .orn path, .orn line { fill: none; stroke: var(--line); stroke-width: 1; }

/* ---------- reveal-анимации ----------
   Скрытие включается только после успешной инициализации JS (html.anim):
   без JS или на старом браузере контент виден сразу. */
html.anim .rv { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
html.anim .rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: 0.12s; } .rv-d2 { transition-delay: 0.24s; } .rv-d3 { transition-delay: 0.36s; }
body.lite .rv, body.no-anim .rv { opacity: 1; transform: none; transition: none; }

/* ---------- шапка ---------- */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.site-head.solid { background: rgba(16, 14, 14, 0.92); border-color: var(--line-soft); backdrop-filter: blur(8px); }
.site-head .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 18px var(--pad);
  max-width: var(--max); margin: 0 auto;
}
.site-head .logo img { height: 44px; width: auto; }
.site-nav { display: flex; gap: clamp(18px, 3vw, 44px); }
.site-nav a {
  font-size: 12px; font-weight: 400; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--paper); opacity: 0.82; padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: opacity 0.3s, border-color 0.3s;
}
.site-nav a:hover { opacity: 1; border-color: var(--beige); }
.head-phone { font-size: 14px; font-weight: 400; letter-spacing: 0.08em; color: var(--beige-bright); white-space: nowrap; }
.burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 26px; height: 1px; background: var(--paper); margin: 7px 0; transition: transform 0.3s, opacity 0.3s; }

@media (max-width: 900px) {
  .site-nav, .head-phone { display: none; }
  .burger { display: block; }
  .site-head.open { background: var(--ink); }
  .site-head.open .site-nav {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ink); border-bottom: 1px solid var(--line-soft);
    padding: 10px var(--pad) 26px;
  }
  .site-head.open .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
  .site-head.open .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .site-head.open .burger span:nth-child(2) { opacity: 0; }
  .site-head.open .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- бейдж демо ---------- */
.demo-badge {
  position: fixed; z-index: 60; right: 14px; bottom: 14px;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--grey); background: rgba(16, 14, 14, 0.85);
  border: 1px solid var(--line); border-radius: 2px;
  padding: 7px 12px; pointer-events: none;
}

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; display: grid; place-items: center; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media video, .hero-media img.poster { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.92); }
body.lite .hero-media video, .hero-media.show-poster video { display: none; }
.hero-media img.poster { display: none; }
body.lite .hero-media img.poster, .hero-media.show-poster img.poster { display: block; }
.hero-shade { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,14,14,0.62) 0%, rgba(16,14,14,0.28) 40%, rgba(16,14,14,0.34) 70%, var(--ink) 100%); }
.hero-inner { position: relative; z-index: 2; text-align: center; padding: 0 var(--pad); }
.hero-inner .label { color: var(--beige-bright); }
.hero-title { margin: 22px 0 14px; }
.hero-sub { font-size: clamp(15px, 1.4vw, 19px); letter-spacing: 0.06em; color: #e4ded5; max-width: 46ch; margin: 0 auto; }
.hero-cta { margin-top: 44px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; z-index: 2; bottom: 30px; left: 50%; transform: translateX(-50%);
  font-size: 10px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--grey);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero-scroll::after { content: ''; width: 1px; height: 46px; background: linear-gradient(var(--beige), transparent); animation: drip 2.2s infinite var(--ease); }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 60% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }
body.lite .hero-scroll::after, body.no-anim .hero-scroll::after { animation: none; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-block; padding: 15px 34px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--paper); border: 1px solid var(--beige);
  background: transparent; cursor: pointer;
  transition: background 0.35s, color 0.35s;
}
.btn:hover { background: var(--beige); color: var(--ink); }
.btn--solid { background: var(--beige); color: var(--ink); }
.btn--solid:hover { background: var(--beige-bright); }
.btn--ghost { border-color: rgba(244, 241, 236, 0.35); }
.btn--ghost:hover { border-color: var(--beige); background: transparent; color: var(--beige-bright); }
.btn[data-stub] { opacity: 0.55; cursor: not-allowed; }
.btn[data-stub]:hover { background: transparent; color: var(--paper); }
.btn--solid[data-stub]:hover { background: var(--beige); color: var(--ink); }

/* ---------- секции ---------- */
.section { position: relative; padding: clamp(72px, 10vw, 150px) 0; }
.section--tight { padding: clamp(48px, 7vw, 100px) 0; }
.sep { border: none; border-top: 1px solid var(--line-soft); margin: 0 var(--pad); }

/* манифест */
.manifest { text-align: center; }
.manifest .h-section { max-width: 22ch; margin-left: auto; margin-right: auto; }
.manifest .lead { margin: 0 auto; }
.manifest .orn-circle { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(62vw, 640px); height: min(62vw, 640px); }

/* ценности */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 64px); margin-top: clamp(36px, 5vw, 72px); }
.value { border-top: 1px solid var(--line); padding-top: 26px; }
.value h3 { font-size: 15px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; color: var(--beige-bright); margin-bottom: 14px; }
.value p { font-size: 15px; color: var(--grey); }
@media (max-width: 760px) { .values { grid-template-columns: 1fr; } }

/* italian lifestyle — светлая вставка */
.lifestyle { background: var(--paper); color: var(--ink); }
.lifestyle .grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
.lifestyle .label { color: #746657; }
.lifestyle .h-section { color: var(--ink); }
.lifestyle p { color: #4c443c; }
.lifestyle img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
@media (max-width: 860px) { .lifestyle .grid { grid-template-columns: 1fr; } }

/* коллекции-акценты */
.feature { position: relative; min-height: clamp(480px, 78vh, 760px); display: flex; align-items: flex-end; overflow: hidden; margin: 0; }
.feature + .feature { margin-top: 2px; }
.feature-bg { position: absolute; inset: 0; }
.feature-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.6s var(--ease); }
.feature.in .feature-bg img { transform: scale(1); }
body.lite .feature-bg img { transform: none; }
.feature-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,14,14,0.18) 30%, rgba(16,14,14,0.78) 100%); }
.feature-body { position: relative; z-index: 2; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) clamp(40px, 6vw, 76px); display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.feature-body h3 { font-size: clamp(30px, 4vw, 58px); letter-spacing: 0.16em; text-transform: uppercase; }
.feature-body .tag { display: block; margin-bottom: 10px; }
.feature-body p { max-width: 44ch; color: #d9d4cc; font-size: 15px; margin-top: 10px; }

/* линии каталога */
.lines-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--line-soft); border: 1px solid var(--line-soft); margin-top: clamp(30px, 4vw, 56px); }
.line-card { position: relative; background: var(--ink); overflow: hidden; aspect-ratio: 1 / 1.02; display: flex; align-items: flex-end; }
.line-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.82; transition: opacity 0.5s, transform 1.2s var(--ease); }
.line-card:hover img { opacity: 1; transform: scale(1.045); }
.line-card .cap { position: relative; z-index: 2; width: 100%; padding: 18px 20px; background: linear-gradient(transparent, rgba(16,14,14,0.88)); }
.line-card .cap .it { font-size: 11px; letter-spacing: 0.3em; color: var(--beige-bright); text-transform: uppercase; display: block; }
.line-card .cap .ru { font-size: 15px; font-weight: 400; letter-spacing: 0.1em; }
@media (max-width: 900px) { .lines-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .lines-grid { grid-template-columns: 1fr; } .line-card { aspect-ratio: 16/10; } }

/* ателье */
.atelier .grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
.atelier img { width: 100%; object-fit: cover; aspect-ratio: 16 / 10; }
.atelier .stats { display: flex; gap: clamp(24px, 4vw, 60px); margin-top: 34px; flex-wrap: wrap; }
.stat b { display: block; font-size: clamp(30px, 3vw, 44px); font-weight: 300; color: var(--beige-bright); letter-spacing: 0.06em; }
.stat span { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--grey); }
@media (max-width: 860px) { .atelier .grid { grid-template-columns: 1fr; } }

/* каталог CTA */
.catalog-cta { text-align: center; background: var(--ink-soft); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.catalog-cta .btns { margin-top: 36px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.catalog-cta .note { margin-top: 20px; font-size: 12px; color: var(--grey); letter-spacing: 0.06em; }

/* дилеры */
.dealers { overflow: hidden; }
.dealers .top { text-align: center; }
.city-marquee { margin-top: clamp(30px, 4vw, 54px); display: grid; gap: 16px; }
.city-track { display: flex; gap: 0; white-space: nowrap; width: max-content; animation: slide 70s linear infinite; }
.city-track.rev { animation-direction: reverse; animation-duration: 84s; }
.city-track span { font-size: clamp(17px, 1.7vw, 24px); font-weight: 300; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(244, 241, 236, 0.5); padding: 0 26px; }
.city-track span::after { content: '·'; color: var(--beige); margin-left: 48px; }
@keyframes slide { to { transform: translateX(-50%); } }
body.lite .city-track, body.no-anim .city-track { animation: none; }
.dealers .contact { margin-top: clamp(36px, 5vw, 64px); text-align: center; }
.dealers .phone-big { font-size: clamp(26px, 3.4vw, 46px); font-weight: 300; letter-spacing: 0.1em; color: var(--paper); }
.dealers .phone-big:hover { color: var(--beige-bright); }
.dealers .contact p { color: var(--grey); font-size: 14px; letter-spacing: 0.1em; margin-top: 8px; }

/* футер */
.site-foot { border-top: 1px solid var(--line-soft); padding: 40px 0 90px; }
.site-foot .row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-foot img { height: 36px; }
.site-foot .fine { font-size: 12px; color: var(--grey); letter-spacing: 0.08em; line-height: 1.8; }
.lite-toggle { background: none; border: 1px solid var(--line); color: var(--grey); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; padding: 9px 16px; cursor: pointer; transition: color 0.3s, border-color 0.3s; }
.lite-toggle:hover { color: var(--paper); border-color: var(--beige); }

/* ---------- страница коллекции ---------- */
.page-hero { position: relative; min-height: 72vh; min-height: 72svh; display: flex; align-items: flex-end; overflow: hidden; }
.page-hero .bg { position: absolute; inset: 0; }
.page-hero .bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,14,14,0.5), rgba(16,14,14,0.2) 45%, var(--ink) 100%); }
.page-hero .body { position: relative; z-index: 2; width: 100%; max-width: var(--max); margin: 0 auto; padding: 140px var(--pad) clamp(36px, 5vw, 64px); }
.crumbs { font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--grey); margin-bottom: 16px; }
.crumbs a:hover { color: var(--beige-bright); }

.models { background: var(--paper); color: var(--ink); }
.models .h-section { color: var(--ink); }
.models .label { color: #746657; }
.models-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 48px); margin-top: clamp(30px, 4vw, 56px); }
.model-card { text-align: center; }
.model-card .ph { background: #fff; border: 1px solid #e5dfd6; padding: clamp(16px, 2vw, 34px); }
.model-card img { width: 100%; height: auto; aspect-ratio: 934 / 1858; object-fit: contain; }
.model-card figcaption { margin-top: 16px; font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase; color: #4c443c; }
@media (max-width: 760px) { .models-grid { grid-template-columns: 1fr; } .model-card .ph { padding: 24px 15vw; } }

.swatches { margin-top: clamp(30px, 4vw, 56px); }
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; margin-top: 26px; }
.swatch { text-align: center; }
.swatch .chip { aspect-ratio: 1 / 1; overflow: hidden; border: 1px solid var(--line-soft); }
.swatch img { width: 100%; height: 100%; object-fit: cover; }
.swatch span { display: block; margin-top: 9px; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--grey); }

.portals-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 32px); margin-top: 26px; }
.portal { text-align: center; background: var(--ink-soft); border: 1px solid var(--line-soft); padding: 22px 12px; }
.portal img { width: 70%; margin: 0 auto; filter: invert(0.92) sepia(0.08); }
.portal span { display: block; margin-top: 12px; font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--grey); }
@media (max-width: 700px) { .portals-grid { grid-template-columns: repeat(2, 1fr); } }

.dims { display: flex; gap: clamp(28px, 5vw, 80px); flex-wrap: wrap; margin-top: 26px; }
.dims .stat b { font-size: clamp(24px, 2.4vw, 36px); }

.interiors { display: grid; gap: 2px; margin-top: clamp(30px, 4vw, 56px); }
.interiors img { width: 100%; object-fit: cover; }

.other-colls { text-align: center; }
.other-colls .list { display: flex; gap: clamp(16px, 3vw, 40px); justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.other-colls .list a { font-size: clamp(16px, 1.6vw, 22px); letter-spacing: 0.24em; text-transform: uppercase; color: var(--grey); transition: color 0.3s; }
.other-colls .list a:hover { color: var(--beige-bright); }

/* ---------- kiosk (плашка «концепт-демо» остаётся видимой всегда) ---------- */
body.kiosk { cursor: none; }
body.kiosk .hero-scroll { display: none; }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .feature-bg img, .line-card img { transition: none; transform: none; }
  .city-track { animation: none; }
}
