/* =========================================================
   OHMA — interactive components (fx.js, site.js, kp.js)
   ========================================================= */

/* ---------- round controls ---------- */
.fx-round { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--sheet); border: 0; color: #000; cursor: pointer; transition: background .2s, color .2s; }
.fx-round:hover { background: #000; color: #fff; }
.fx-round svg { width: 18px; height: 18px; }
.fx-btn-line { background: #1c1c1c; color: #fff; }
.fx-btn-line:hover { background: #fff; color: #000; }

/* ---------- carousel ---------- */
.fx-car { overflow-x: auto; scrollbar-width: none; padding: 0 max(32px, calc((100vw - var(--max)) / 2 + 32px)); scroll-padding-inline: max(32px, calc((100vw - var(--max)) / 2 + 32px)); overscroll-behavior-x: contain; }
.fx-car::-webkit-scrollbar { display: none; }
.fx-car.snap { scroll-snap-type: x mandatory; }
.fx-car.drag { scroll-snap-type: none; user-select: none; cursor: grabbing; }
.fx-car-track { display: flex; gap: 16px; width: max-content; }
.fx-slide { position: relative; display: block; width: clamp(260px, 26vw, 380px); scroll-snap-align: start; user-select: none; -webkit-user-drag: none; }
.fx-slide .fx-img { display: block; aspect-ratio: 4 / 5; background: var(--sheet); border-radius: var(--r); overflow: hidden; }
.fx-slide img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), opacity .4s; }
.fx-slide:hover img { transform: scale(1.03); }
.fx-slide-cap { display: block; padding: 14px 2px 0; }
.fx-slide-cap b { display: block; font-size: 18px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; }
.fx-slide:hover .fx-slide-cap b { color: var(--violet); }
.fx-slide-cap small { display: inline-block; margin-top: 8px; font-family: var(--mono); text-transform: uppercase; font-size: 11px; background: var(--sheet); padding: 5px 8px; border-radius: 4px; }
.fx-slide-r { position: absolute; top: 12px; left: 12px; font-family: var(--mono); text-transform: uppercase; font-size: 11px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px); padding: 6px 9px; border-radius: 4px; }
.fx-car-nav { display: flex; gap: 6px; }
.fx-car-bar { height: 2px; background: var(--sheet); margin-top: 32px; overflow: hidden; border-radius: 2px; }
.fx-car-bar span { display: block; height: 100%; background: #000; transition: transform .15s linear; }
@media (max-width: 640px) { .fx-car { padding: 0 16px; scroll-padding-inline: 16px; } .fx-car-nav { display: none; } }
.fx-img { position: relative; background: var(--sheet); }
.fx-img img { opacity: 0; }
.fx-img.loaded img { opacity: 1; }

/* ---------- drawing ↔ photo ---------- */
.fx-cmp-wrap { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; padding-top: 28px; border-top: 1px solid var(--rule); }
.fx-cmp-text .tag { display: inline-flex; font-family: var(--mono); text-transform: uppercase; font-size: 11px; background: var(--sheet); padding: 6px 9px; border-radius: 4px; color: #000; }
.fx-cmp-text h2 { margin: 18px 0 16px; }
.fx-cmp-text p { max-width: 42ch; }
.fx-cmp-text .btn { margin-top: 28px; }
.fx-cmp { position: relative; aspect-ratio: 1180 / 1000; overflow: hidden; border-radius: var(--r-lg); background: var(--lime); touch-action: pan-y; user-select: none; cursor: ew-resize; }
.fx-cmp-a, .fx-cmp-b { position: absolute; inset: 0; }
.fx-cmp-a { display: grid; place-items: center; padding: 28px; background: var(--lime) linear-gradient(rgba(0, 0, 0, .055) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(0, 0, 0, .055) 1px, transparent 1px) 0 0 / 28px 28px; }
.fx-cmp-a svg { width: 100%; height: 100%; }
.fx-cmp-b { clip-path: inset(0 0 0 var(--x)); background: #eeefec; }
.fx-cmp-b img { width: 100%; height: 100%; object-fit: cover; }
.fx-cmp-handle { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; background: #000; transform: translateX(-1px); pointer-events: none; }
.fx-cmp-handle i { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 50%; background: #000; display: flex; align-items: center; justify-content: center; color: #fff; }
.fx-cmp-handle svg { width: 14px; height: 14px; }
.fx-cmp-lbl { position: absolute; top: 16px; font-family: var(--mono); text-transform: uppercase; font-size: 11px; padding: 6px 9px; border-radius: 4px; pointer-events: none; }
.fx-cmp-lbl.a { left: 16px; background: rgba(255, 255, 255, .75); } .fx-cmp-lbl.b { right: 16px; background: #000; color: #fff; }
.fx-cmp input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.fx-cmp:focus-within .fx-cmp-handle i { outline: 2px solid var(--violet); outline-offset: 3px; }
@media (max-width: 900px) { .fx-cmp-wrap { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- process ---------- */
.fx-proc { --p: 0; list-style: none; position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding-top: 18px; }
.fx-proc-line { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--sheet); border-radius: 2px; }
.fx-proc-line i { position: absolute; inset: 0; background: #000; transform-origin: left; transform: scaleX(var(--p)); border-radius: 2px; }
.fx-proc li { background: var(--sheet); border-radius: var(--r); padding: 22px; min-height: 220px; display: flex; flex-direction: column; transition: background .4s; }
.fx-proc li.on { background: var(--lime); }
.fx-proc-n { font-family: var(--mono); font-size: 12px; }
.fx-proc h3 { margin: auto 0 8px; padding-top: 40px; font-size: 19px; }
.fx-proc p { font-size: 14.5px; color: #3f3f3c; }
@media (max-width: 1000px) {
  .fx-proc { grid-template-columns: 1fr; padding: 0 0 0 18px; }
  .fx-proc-line { top: 0; bottom: 0; left: 0; right: auto; width: 2px; height: auto; }
  .fx-proc-line i { transform-origin: top; transform: scaleY(var(--p)); }
  .fx-proc li { min-height: 0; } .fx-proc h3 { padding-top: 20px; }
}

/* ---------- chart ---------- */
.fx-chart-panel { position: relative; }
.fx-seg { position: relative; display: inline-flex; gap: 4px; background: #fff; padding: 4px; border-radius: var(--pill); }
.fx-seg button { position: relative; z-index: 1; border: 0; background: none; padding: 9px 14px; font-weight: 500; font-size: 12px; cursor: pointer; color: #000; border-radius: var(--pill); transition: color .25s; }
.fx-seg button.active { color: #fff; }
.fx-seg-ink { position: absolute; top: 4px; bottom: 4px; left: 0; background: #000; border-radius: var(--pill); transition: transform .35s var(--ease), width .35s var(--ease); }
.fx-legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 20px; }
.fx-legend span { display: flex; align-items: center; gap: 8px; font-family: var(--mono); text-transform: uppercase; font-size: 11px; background: #fff; padding: 6px 9px; border-radius: 4px; }
.fx-legend i { width: 10px; height: 10px; border-radius: 2px; }
.fx-save { font-style: normal; margin-left: auto; color: #000; font-size: 15px; }
.fx-save b { font-weight: 500; background: var(--lime); padding: 0 4px; border-radius: 3px; }
.fx-chart { overflow-x: auto; }
.fx-ch-svg { min-width: 640px; width: 100%; height: auto; }
.fx-ch-svg .g { stroke: var(--rule-2); stroke-dasharray: 2 4; }
.fx-ch-svg text { font-size: 12px; fill: var(--steel); font-family: var(--mono); }
.fx-ch-svg .bar { transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); transition: transform .8s var(--ease) var(--d), opacity .15s; }
.fx-chart.in .bar { transform: scaleY(1); }
.fx-chart:hover .bar:not(:hover) { opacity: .4; }
.fx-tip { position: absolute; left: 0; top: 0; pointer-events: none; background: #000; color: #fff; font-family: var(--mono); font-size: 12px; padding: 6px 9px; border-radius: 4px; white-space: nowrap; opacity: 0; transition: opacity .12s; z-index: 2; }
.fx-tip.on { opacity: 1; }
.fx-src { font-size: 12.5px; margin-top: 12px; } .fx-src a { color: var(--steel-2); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 640px) { .fx-save { margin-left: 0; width: 100%; } }

/* ---------- gallery ---------- */
.fx-gal-panel { margin-top: 16px; }
.fx-masonry { columns: 4 220px; column-gap: 10px; }
.fx-gi { display: block; width: 100%; margin: 0 0 10px; break-inside: avoid; border: 0; padding: 0; cursor: zoom-in; border-radius: 10px; overflow: hidden; }
.fx-gi img { width: 100%; height: auto; transition: transform .8s var(--ease); }
.fx-gi:hover img { transform: scale(1.04); }

/* ---------- photo lightbox ---------- */
.fx-plb { position: fixed; inset: 0; z-index: 9990; background: rgba(0, 0, 0, .94); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.fx-plb.open { opacity: 1; visibility: visible; }
.fx-plb figure { max-width: min(1200px, 86vw); max-height: 86vh; overflow: hidden; border-radius: var(--r); }
.fx-plb img { max-width: 100%; max-height: 86vh; width: auto; height: auto; cursor: zoom-in; opacity: 0; transition: opacity .25s, transform .4s var(--ease); }
.fx-plb img.in { opacity: 1; }
.fx-plb figure.zoom img { transform: scale(2.2); cursor: zoom-out; }
.fx-plb-x, .fx-plb-n { position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: #000; cursor: pointer; display: grid; place-items: center; }
.fx-plb-x { top: 18px; right: 18px; font-size: 24px; }
.fx-plb-n { top: 50%; transform: translateY(-50%); }
.fx-plb-x:hover, .fx-plb-n:hover { background: var(--lime); }
.fx-plb-n svg { width: 20px; height: 20px; }
.fx-plb-n.p { left: 18px; } .fx-plb-n.n { right: 18px; }
.fx-plb-c { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #fff; font-family: var(--mono); font-size: 12px; }
.fx-lock { overflow: hidden; }
@media (max-width: 640px) { .fx-plb-n { display: none; } }

/* ---------- FAQ ---------- */
.fx-faq-wrap { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; padding-top: 28px; border-top: 1px solid var(--rule); }
.fx-acc { display: grid; gap: 6px; }
.fx-acc-i { background: var(--sheet); border-radius: var(--r); transition: background .25s; }
.fx-acc-i.open { background: var(--lime); }
.fx-acc-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 22px; border: 0; background: none; text-align: left; font-weight: 500; font-size: 18px; letter-spacing: -0.015em; cursor: pointer; color: #000; }
.fx-acc-q i { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #fff; }
.fx-acc-q i::before, .fx-acc-q i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; margin: -.75px 0 0 -5.5px; background: #000; transition: transform .25s var(--ease); }
.fx-acc-q i::after { transform: rotate(90deg); }
.fx-acc-i.open .fx-acc-q i { background: #000; }
.fx-acc-i.open .fx-acc-q i::before, .fx-acc-i.open .fx-acc-q i::after { background: #fff; }
.fx-acc-i.open .fx-acc-q i::after { transform: rotate(0); }
.fx-acc-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
.fx-acc-i.open .fx-acc-a { grid-template-rows: 1fr; }
.fx-acc-a > div { overflow: hidden; }
.fx-acc-a p { padding: 0 64px 22px 22px; max-width: 70ch; color: #2b2b29; }
@media (max-width: 900px) { .fx-faq-wrap { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- closing: stacked sheets, then the black CTA ---------- */
.stack-bands { position: relative; margin-top: 64px; }
.stack-bands i { display: block; height: 22px; border-radius: 20px 20px 0 0; }
.stack-bands i:first-child { background: var(--lime); margin: 0 48px -6px; }
.stack-bands i:last-child { background: var(--lilac); margin: 0 24px -6px; }
.fx-cta { position: relative; background: #000; color: #fff; padding: clamp(80px, 9vw, 140px) 0 64px; border-radius: 20px 20px 0 0; }
.fx-cta-in { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: end; max-width: none; }
.fx-cta h2 { color: #fff; font-size: clamp(44px, 6vw, 96px); line-height: 1; letter-spacing: -0.05em; max-width: 12ch; }
.fx-cta p { color: #a7a7a3; font-size: 17px; max-width: 40ch; }
.fx-cta .hero-cta { margin-top: 28px; }
@media (max-width: 900px) { .fx-cta-in { grid-template-columns: 1fr; gap: 24px; } .stack-bands i:first-child { margin: 0 24px -6px; } .stack-bands i:last-child { margin: 0 12px -6px; } }

/* ---------- forms ---------- */
.fx-bad { border-color: #c2361f !important; animation: shake .35s; }
@keyframes shake { 25%, 75% { transform: translateX(-4px); } 50% { transform: translateX(4px); } }
.photo-tag.fx-render { background: rgba(255, 255, 255, .85); }

/* ---------- intro: white sheet, product lines, counter ---------- */
.intro { position: fixed; inset: 0; z-index: 9999; background: #fff; color: #000; clip-path: inset(0 0 0 0); transition: clip-path .95s cubic-bezier(.76, 0, .24, 1); }
.intro.out { clip-path: inset(0 0 100% 0); }
html.intro-on { overflow: hidden; }
.intro-in { position: absolute; inset: 0; padding: 22px 32px 32px; display: grid; grid-template-rows: auto 1fr auto; }
.intro-in::after { content: ""; position: absolute; top: 26px; right: 32px; width: 36px; height: 36px; border-radius: 50%; background: #000; animation: in-pulse 1.2s ease-in-out infinite alternate; }
.intro-logo { height: 40px; width: auto; }
.intro-words { list-style: none; align-self: end; margin-bottom: 32px; }
.intro-words li { overflow: hidden; }
.intro-words span { display: block; font-size: clamp(44px, 8vw, 128px); font-weight: 500; letter-spacing: -0.055em; line-height: .98; transform: translateY(105%); animation: in-rise .9s cubic-bezier(.2, .8, .2, 1) forwards; }
.intro-words li:nth-child(2) span { animation-delay: .14s; color: #9a9a96; }
.intro-words li:nth-child(3) span { animation-delay: .28s; color: #c8c8c4; }
.intro-foot { display: flex; justify-content: space-between; align-items: end; }
.intro-num { font-family: var(--mono); font-size: 14px; }
.intro-skip { background: var(--sheet); border: 0; color: #000; font-family: var(--mono); text-transform: uppercase; font-size: 11px; padding: 7px 10px; border-radius: 4px; cursor: pointer; }
.intro-skip:hover { background: #000; color: #fff; }
.intro-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--sheet); }
.intro-bar i { display: block; height: 100%; background: var(--lime); transform-origin: left; transform: scaleX(0); }
@keyframes in-rise { to { transform: none; } }
@keyframes in-pulse { to { transform: scale(.8); } }
@media (max-width: 640px) { .intro-in { padding: 18px 16px 28px; } .intro-in::after { right: 16px; top: 20px; width: 28px; height: 28px; } .intro-logo { height: 30px; } }

/* ---------- cookie: floating pill ---------- */
.cookie { position: fixed; right: 16px; bottom: 16px; z-index: 400; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); background: rgba(240, 240, 239, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: var(--pill); padding: 6px 6px 6px 18px; opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .3s var(--ease); }
.cookie.in { opacity: 1; transform: none; }
.cookie p { font-size: 13.5px; color: #000; max-width: 52ch; line-height: 1.35; }
.cookie-act { display: flex; gap: 4px; flex: none; }
.cookie .btn { padding: 9px 12px; font-size: 11.5px; }
.cookie .btn-ghost { background: #fff; }
.cookie .btn-ghost:hover { background: #000; }
@media (max-width: 760px) { .cookie { left: 8px; right: 8px; bottom: 8px; border-radius: var(--r-lg); flex-direction: column; align-items: stretch; padding: 14px; } .cookie-act .btn { flex: 1; } }
.fb-links { display: flex; gap: 18px; flex-wrap: wrap; }
.fb-links a:hover { color: #fff; }

/* ---------- showreel ---------- */
.sreel { --g: 0; padding: 112px 0; }
.sreel-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 40px; padding-top: 28px; border-top: 1px solid var(--rule); }
.sreel-head p { font-size: 17px; max-width: 46ch; }
.sreel-stage { display: flex; justify-content: center; padding: 0 32px; }
.sreel-box { position: relative; width: calc(64% + 36% * var(--g)); aspect-ratio: 16 / 9; max-height: 92vh; overflow: hidden; background: #000; border-radius: var(--r-lg); cursor: pointer; }
.sreel-prev { width: 100%; height: 100%; object-fit: cover; display: block; }
.sreel-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; border: 0; background: #fff; color: #000; font-family: var(--mono); text-transform: uppercase; font-size: 12px; font-weight: 500; padding: 10px 14px; border-radius: 4px; cursor: pointer; }
.sreel-btn .sreel-ic svg { width: 12px; height: 12px; }
.sreel-box:hover .sreel-btn { background: var(--lime); }
.sreel-btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 4px; }
@media (max-width: 760px) { .sreel { padding: 72px 0; } .sreel-head { flex-direction: column; align-items: flex-start; } .sreel-stage { padding: 0 16px; } .sreel-box { width: 100%; } }

/* full-screen player */
.splayer { position: fixed; inset: 0; z-index: 9995; background: #000; display: none; }
.splayer.open { display: block; }
.splayer video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.splayer-ui { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 14px; padding: 6px 14px 6px 6px; color: #000; background: rgba(240, 240, 239, .9); backdrop-filter: blur(12px); border-radius: var(--pill); font-family: var(--mono); font-size: 12px; transition: opacity .3s; }
.splayer-ui button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: #000; color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.splayer-ui button:hover { background: var(--violet); }
.splayer-ui svg { width: 16px; height: 16px; }
.splayer-ui .sp-mute { background: #fff; color: #000; }
.sp-track { position: relative; flex: 1; height: 24px; display: flex; align-items: center; }
.sp-track::before { content: ""; position: absolute; left: 0; right: 0; height: 3px; background: rgba(0, 0, 0, .15); border-radius: 3px; }
.sp-fill { position: absolute; left: 0; right: 0; height: 3px; background: #000; transform-origin: left; transform: scaleX(0); border-radius: 3px; }
.sp-track input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.sp-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: #000; font-size: 24px; display: grid; place-items: center; cursor: pointer; transition: opacity .3s; }
.sp-close:hover { background: var(--lime); }
.splayer.idle { cursor: none; }
.splayer.idle .splayer-ui, .splayer.idle .sp-close { opacity: 0; }

/* Yandex map */
.ymap-box { height: 420px; margin-top: 6px; }
.ymap { width: 100%; height: 100%; border: 0; display: block; }
.ymap-links { display: flex; gap: 6px; margin-top: 8px; }
.ymap-links a { font-family: var(--mono); text-transform: uppercase; font-size: 11.5px; background: var(--sheet); padding: 9px 12px; border-radius: var(--pill); }
.ymap-links a:hover { background: #000; color: #fff; }

.kp-modal .btn[disabled] { opacity: .7; cursor: progress; }
@media print { .fx-cta, .stack-bands, .sreel, .fx-car { display: none !important; } }
