/* OnePROM — HERO v2 (только главная). Все правила под .hx / html.hx-home — остальную страницу не трогают.
   BLACK = пространство · WHITE = информация · METAL = продукт · GOLD = действие */

.hx {
  --hx-gold: var(--gold, #C9A24E);
  --hx-gold-hi: var(--gold-hi, #E7CE86);
  --hx-ink: #000;
  --hx-text: #f4f1ea;
  --hx-dim: #a6a39b;
  --hx-faint: #6e6c66;
  --hx-line: rgba(244, 241, 234, .14);
  --hx-ease: cubic-bezier(.16, 1, .3, 1);
  position: relative;
  z-index: 2;                 /* выше сторителлинга: изделие «перетекает» в следующую секцию */
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: calc(100svh - var(--hx-top, 0px));
  min-height: calc(100vh - var(--hx-top, 0px));
  min-height: calc(100svh - var(--hx-top, 0px));
  background: var(--hx-ink);
  color: var(--hx-text);
}
.hx *, .hx *::before, .hx *::after { box-sizing: border-box; }
@supports (overflow: clip) { .hx { overflow-x: clip; overflow-y: visible; } .hx-bg { overflow: hidden; } }

/* ---------- фон: техническая сетка + мягкий свет за изделием ---------- */
.hx-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hx-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(244, 241, 234, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 241, 234, .045) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 62% 48%, #000 0%, rgba(0,0,0,.5) 45%, transparent 80%);
          mask-image: radial-gradient(ellipse 70% 70% at 62% 48%, #000 0%, rgba(0,0,0,.5) 45%, transparent 80%);
}
.hx-light {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 34% 40% at 64% 47%, rgba(231, 206, 134, .075), transparent 70%),
    radial-gradient(ellipse 60% 55% at 64% 50%, rgba(244, 241, 234, .035), transparent 75%);
}
.hx-floor {
  position: absolute; left: 30%; right: 0; bottom: 0; height: 28%;
  background: linear-gradient(to top, #000 10%, transparent);
}

/* ---------- сцена изделия: 4 слоя трансформаций, чтобы они не конфликтовали ----------
   .hx-stage   — скролл (GSAP)
   .hx-par     — параллакс мыши
   .hx-product — входная анимация
   .hx-visual  — постер WebP → canvas WebGL / GLB */
.hx-stage {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: flex-end;
  pointer-events: none;
  will-change: transform;
}
.hx-par {
  position: relative;
  width: min(74vw, 1400px, calc((100svh - var(--hx-top, 0px)) * 1.5));
  aspect-ratio: 16 / 10;
  margin-right: -5vw;
  margin-top: -4vh;
}
.hx-product { position: absolute; inset: 0; transform-origin: 55% 50%; }
.hx-visual { position: absolute; inset: 0; }
.hx-visual > img,
.hx-visual > canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; display: block;
}
.hx-visual > canvas { opacity: 0; transition: opacity .7s ease; }
.hx.is-3d .hx-visual > canvas { opacity: 1; }
.hx.is-3d .hx-visual > img { opacity: 0; transition: opacity .7s ease .1s; }

/* затемнение слева — текст всегда читается поверх металла */
.hx-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, #000 0%, rgba(0,0,0,.82) 22%, rgba(0,0,0,.35) 40%, transparent 55%);
}

/* технические выноски — позиции приходят из 3D (или зашиты под постер) */
.hx-notes { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.hx-note {
  position: absolute; left: var(--x); top: var(--y);
  width: 0; height: 0;
}
.hx-note::before { /* точка */
  content: ""; position: absolute; left: -3px; top: -3px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--hx-text);
  box-shadow: 0 0 0 4px rgba(244, 241, 234, .12);
}
.hx-note > span {
  position: absolute; top: calc(var(--dy, -64px) - 10px);
  left: var(--dx, 48px);
  white-space: nowrap;
  font: 500 12px/1 Manrope, system-ui, sans-serif;
  letter-spacing: .04em;
  color: var(--hx-dim);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hx-line);
}
.hx-note[data-side="l"] > span { transform: translateX(-100%); }
.hx-note > i { /* выносная линия */
  position: absolute; left: 0; top: 0;
  width: var(--len, 80px); height: 1px; background: var(--hx-line);
  transform-origin: 0 0; transform: rotate(var(--ang, -53deg));
}

/* ---------- текст ---------- */
.hx-wrap {
  position: relative; z-index: 2;
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding: 0 24px clamp(40px, 9vh, 104px);
}
.hx-copy { max-width: none; }
.hx-eyebrow {
  margin: 0 0 24px;
  font: 500 13px/1 Manrope, system-ui, sans-serif;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--hx-dim);
  display: flex; align-items: center; gap: 12px;
}
.hx-eyebrow::before { content: ""; width: 32px; height: 1px; background: var(--hx-gold); }
.hx-title {
  margin: 0;
  font-family: Oswald, "Arial Narrow", Impact, sans-serif;
  font-weight: 600;
  font-size: clamp(52px, 6.8vw, 124px);
  line-height: .9;
  letter-spacing: .005em;
  text-transform: uppercase;
  color: #fff;
}
.hx-line { display: block; overflow: hidden; white-space: nowrap; padding-bottom: .04em; margin-bottom: -.04em; }
.hx-line > span { display: block; }
.hx-lead {
  margin: 28px 0 0;
  max-width: 30em;
  font: 400 clamp(15px, 1.15vw, 18px)/1.6 Manrope, system-ui, sans-serif;
  color: var(--hx-dim);
}
.hx-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hx-btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 28px;
  font: 500 16px/1 Oswald, "Arial Narrow", sans-serif;
  letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; border-radius: 4px;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.hx-btn--gold { background: var(--hx-gold); color: #120d02; }
.hx-btn--gold:hover { background: var(--hx-gold-hi); }
.hx-btn--gold .hx-arr { transition: transform .35s var(--hx-ease); }
.hx-btn--gold:hover .hx-arr { transform: translateX(4px); }
.hx-btn--ghost { color: var(--hx-text); border: 1px solid rgba(244, 241, 234, .28); }
.hx-btn--ghost:hover { border-color: var(--hx-text); }
.hx-btn:focus-visible { outline: 2px solid var(--hx-gold-hi); outline-offset: 3px; }

/* ---------- входная анимация (только при html.hx-js и без reduced-motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hx-js .hx-line > span { transform: translateY(105%); animation: hxRise 1.1s var(--hx-ease) forwards; }
  .hx-js .hx-line:nth-child(2) > span { animation-delay: .12s; }
  .hx-js .hx-eyebrow,
  .hx-js .hx-lead,
  .hx-js .hx-cta { opacity: 0; animation: hxFade .9s ease forwards; }
  .hx-js .hx-eyebrow { animation-delay: .05s; }
  .hx-js .hx-lead { animation-delay: .45s; }
  .hx-js .hx-cta { animation-delay: .6s; }
  .hx-js .hx-product {
    opacity: 0; transform: scale(.92) rotate(-2.5deg);
    animation: hxProduct 1.6s var(--hx-ease) .2s forwards;
  }
  .hx-js .hx-note { opacity: 0; animation: hxFade .8s ease forwards; animation-delay: calc(1.3s + var(--i, 0) * .12s); }
  .hx-js .hx-note > i { transform: rotate(var(--ang, -53deg)) scaleX(0); animation: hxDraw .7s var(--hx-ease) forwards; animation-delay: calc(1.3s + var(--i, 0) * .12s); }
}
@keyframes hxRise { to { transform: none; } }
@keyframes hxFade { to { opacity: 1; } }
@keyframes hxProduct { to { opacity: 1; transform: none; } }
@keyframes hxDraw { to { transform: rotate(var(--ang, -53deg)) scaleX(1); } }

/* ---------- шапка на главной: меньше конкуренции с героем ---------- */
html.hx-home .nav-links a { opacity: .72; transition: opacity .2s ease; }
html.hx-home .nav-links a:hover { opacity: 1; }
html.hx-home:not(.hx-past) .nav-right .btn.btn-gold {   /* второй золотой CTA в шапке → контурный, пока виден герой */
  background: transparent; color: var(--gold-hi, #E7CE86);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 78, .55);
}

/* ---------- планшет / мобильный: изделие сверху, текст снизу, без выносок ---------- */
@media (max-width: 899px) {
  .hx { flex-direction: column; align-items: stretch; justify-content: flex-end; }
  .hx-stage { position: relative; inset: auto; flex: 1 1 auto; justify-content: center; align-items: center; min-height: 38svh; }
  .hx-par { width: 118vw; margin: 0 -9vw 0 0; }
  .hx-scrim { background: linear-gradient(to top, #000 0%, rgba(0,0,0,.7) 40%, transparent 70%); }
  .hx-notes { display: none; }
  .hx-grid { -webkit-mask-image: radial-gradient(ellipse 90% 50% at 50% 30%, #000, transparent 80%); mask-image: radial-gradient(ellipse 90% 50% at 50% 30%, #000, transparent 80%); }
  .hx-light { background: radial-gradient(ellipse 70% 30% at 50% 30%, rgba(231, 206, 134, .07), transparent 70%); }
  .hx-wrap { padding-top: 0; padding-bottom: 40px; margin-top: -6vh; }
  .hx-eyebrow { margin-bottom: 16px; font-size: 11px; letter-spacing: .16em; white-space: nowrap; }
  .hx-title { font-size: clamp(30px, 10vw, 72px); }
  .hx-lead { margin-top: 20px; }
  .hx-cta { margin-top: 28px; }
  .hx-btn { flex: 1 1 auto; justify-content: center; height: 52px; padding: 0 20px; }
}
@media (max-width: 419px) { .hx-wrap { padding-left: 20px; padding-right: 20px; } .hx-eyebrow::before { width: 20px; } }
@media (max-width: 899px) and (prefers-reduced-motion: no-preference) {
  .hx-js .hx-product { transform: translateY(16px); animation-duration: 1s; }  /* упрощённый вход */
}

/* ---------- reduced motion: всё сразу на месте ---------- */
@media (prefers-reduced-motion: reduce) {
  .hx *, .hx *::before, .hx *::after { animation: none !important; transition: none !important; }
}

/* =====================================================================
   ФОТО-РЕЖИМ (.hx--photo): полноэкранный кадр, изделие слева, текст справа
   ===================================================================== */
.hx--photo { background: #000; }
.hx--photo .hx-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-start; }
.hx--photo .hx-par {
  position: relative; flex: 0 0 auto; margin: 0 0 0 -3vw;
  width: min(84vw, calc((100svh - var(--hx-top, 0px)) * 1.79 * 1.04));
  aspect-ratio: 2560 / 1429;
}
/* правый и нижний край кадра растворяются в чёрном фоне сайта */
.hx-photo {
  -webkit-mask-image: linear-gradient(to right, #000 58%, transparent 97%), linear-gradient(to bottom, transparent 0%, #000 14%, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, #000 58%, transparent 97%), linear-gradient(to bottom, transparent 0%, #000 14%, #000 80%, transparent 100%);
          mask-composite: intersect;
}
.hx--photo .hx-product { transform-origin: 32% 55%; }
.hx-photo, .hx-photo img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hx-photo img { object-fit: cover; object-position: 30% 55%; }

/* затемнение: край кадра уходит в чёрный сайта, справа — спокойная зона под текст */
.hx-shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.55) 0%, transparent 16%, transparent 72%, #000 100%),
    linear-gradient(to right, rgba(0,0,0,.35) 0%, transparent 18%, transparent 50%, rgba(0,0,0,.55) 78%, rgba(0,0,0,.7) 100%);
}

.hx--photo { align-items: center; }
.hx--photo .hx-wrap { max-width: none; padding: 0 clamp(24px, 5vw, 96px) 0 0; display: flex; justify-content: flex-end; }
.hx--photo .hx-copy { width: min(42vw, 760px); }
.hx--photo .hx-title { font-size: clamp(44px, 4.2vw, 84px); }
.hx--photo .hx-lead { max-width: 26em; }

@media (prefers-reduced-motion: no-preference) {
  .hx-js .hx--photo .hx-product { opacity: 0; transform: scale(1.06); animation: hxPhoto 1.8s var(--hx-ease) .1s forwards; }
}
@keyframes hxPhoto { to { opacity: 1; transform: none; } }

@media (max-width: 899px) {
  .hx--photo { flex-direction: column; align-items: stretch; justify-content: flex-end; }
  .hx--photo .hx-stage { position: absolute; top: 3%; left: 0; right: 0; bottom: auto; display: block; }
  .hx--photo .hx-par { position: relative; width: 100%; margin: 0; aspect-ratio: 1540 / 1090; }
  .hx-photo {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 78%, transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 78%, transparent 100%);
  }
  .hx-photo img { object-fit: cover; object-position: 50% 50%; }
  .hx-shade { display: none; }
  .hx--photo .hx-wrap { padding: 0 24px 40px; display: block; }
  .hx--photo .hx-copy { width: auto; }
  .hx--photo .hx-title { font-size: clamp(30px, 10vw, 72px); }
  .hx-js .hx--photo .hx-product { transform: none; animation-duration: 1s; }
}

/* =====================================================================
   .hx--photo-r — групповой кадр: оборудование на всю ширину картинки,
   поэтому картинка справа, текст слева (как в исходной раскладке hero)
   ===================================================================== */
@media (min-width: 900px) {
  /* кадр крупнее и заходит под текст; сверху/снизу выходит за край героя — жёстких границ нет */
  .hx--photo-r .hx-stage { justify-content: flex-end; overflow: hidden; }
  .hx--photo-r .hx-par {
    margin: 0 -4vw 0 0;
    width: min(77vw, calc((100svh - var(--hx-top, 0px)) * 1.79 * 1.1));
  }
  .hx--photo-r .hx-product { transform-origin: 62% 58%; }
  .hx--photo-r .hx-photo {
    /* длинный мягкий переход в чёрный слева и плавный — сверху и снизу */
    -webkit-mask-image: linear-gradient(to left, #000 0%, #000 55%, rgba(0,0,0,.6) 74%, rgba(0,0,0,.2) 89%, transparent 100%),
                        linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.6) 12%, #000 26%, #000 72%, rgba(0,0,0,.5) 88%, transparent 100%);
    -webkit-mask-composite: source-in;
            mask-image: linear-gradient(to left, #000 0%, #000 55%, rgba(0,0,0,.6) 74%, rgba(0,0,0,.2) 89%, transparent 100%),
                        linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.6) 12%, #000 26%, #000 72%, rgba(0,0,0,.5) 88%, transparent 100%);
            mask-composite: intersect;
  }
  /* под текстом фон картинки виден, но приглушён — текст читается */
  .hx--photo-r .hx-shade {
    background:
      linear-gradient(to bottom, rgba(0,0,0,.35) 0%, transparent 20%, transparent 78%, #000 100%),
      linear-gradient(to right, rgba(0,0,0,.8) 0%, rgba(0,0,0,.55) 26%, rgba(0,0,0,.2) 40%, transparent 50%);
  }
  .hx--photo-r .hx-wrap { justify-content: flex-start; padding: 0 0 0 max(24px, calc((100vw - 1200px) / 2 + 24px)); }
  .hx--photo-r .hx-copy { width: min(40vw, 700px); }
  .hx--photo-r .hx-title { font-size: clamp(40px, 3.6vw, 72px); text-shadow: 0 2px 30px rgba(0,0,0,.5); }
  .hx--photo-r .hx-lead { color: #c4c1b9; text-shadow: 0 1px 16px rgba(0,0,0,.7); }
}
@media (max-width: 899px) {
  .hx--photo-r .hx-stage { top: 3%; }
  .hx--photo-r .hx-par { aspect-ratio: 2560 / 1429; width: 136vw; margin-left: -18vw; }
}

/* =====================================================================
   .hx--full — картинка-сцена на весь первый экран (слева в кадре пустое
   небо и бетон под текст). Никаких масок: только мягкое затемнение под
   текстом и плавный уход в чёрный внизу, к пролёту.
   ===================================================================== */
.hx--full .hx-stage { position: absolute; inset: 0; display: block; overflow: hidden; }
.hx--full .hx-par { position: absolute; inset: -1.5%; width: auto; margin: 0; aspect-ratio: auto; }
.hx--full .hx-photo { -webkit-mask-image: none; mask-image: none; }
.hx--full .hx-photo img { object-fit: cover; object-position: 62% 55%; }
.hx--full .hx-shade {
  background:
    linear-gradient(to bottom, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 18%, rgba(0,0,0,0) 70%, rgba(0,0,0,.75) 90%, #000 100%),
    linear-gradient(to right, rgba(0,0,0,.6) 0%, rgba(0,0,0,.35) 30%, rgba(0,0,0,.08) 48%, rgba(0,0,0,0) 58%);
}
.hx--full { align-items: center; }
.hx--full .hx-wrap { max-width: none; display: flex; justify-content: flex-start; padding: 0 0 8vh max(24px, calc((100vw - 1200px) / 2 + 24px)); }
.hx--full .hx-copy { width: min(42vw, 700px); }
.hx--full .hx-title { font-size: clamp(40px, 3.8vw, 76px); text-shadow: 0 2px 30px rgba(0,0,0,.45); }
.hx--full .hx-lead { color: #cfccc4; text-shadow: 0 1px 16px rgba(0,0,0,.65); }
@media (prefers-reduced-motion: no-preference) {
  .hx-js .hx--full .hx-product { transform: scale(1.04); animation: hxPhoto 2.2s var(--hx-ease) .05s forwards; }
}
@media (max-width: 899px) {
  .hx--full { align-items: stretch; }
  .hx--full .hx-stage { inset: 0 0 auto 0; top: 2%; height: auto; }
  .hx--full .hx-par { position: relative; inset: auto; width: 100%; aspect-ratio: 1860 / 1329; }
  .hx--full .hx-photo {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 74%, transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 74%, transparent 100%);
  }
  .hx--full .hx-photo img { object-position: 50% 50%; }
  .hx--full .hx-shade { display: none; }
  .hx--full .hx-wrap { padding: 0 24px 40px; display: block; }
  .hx--full .hx-copy { width: auto; }
}

/* длинный H1 (ключевая фраза): меньше кегль, строки переносятся */
.hx--full .hx-title { font-size: clamp(30px, 3vw, 58px); line-height: 1.14; letter-spacing: .01em; }
.hx--full .hx-line { white-space: normal; text-wrap: balance; }
.hx--full .hx-title { max-width: 15.5em; }
@media (max-width: 899px) { .hx--full .hx-title { font-size: clamp(26px, 7.6vw, 44px); } }
/* место над строкой для диакритики заглавных (Á, Ó, Ǵ в казахской латинице), не мешая анимации */
.hx-line { padding-top: .16em; margin-top: -.16em; }

/* чёрная «крышка» над картинкой hero до верхней линии полосы поиска (высоту меряет hero-v2.js) */
.hx--full::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: var(--hx-cap, 0px); background: #000; z-index: 2; pointer-events: none; }
