/* СИБИРЬМЕТАЛЛСТРОЙ — industrial motion. Loaded after style.css. */

:root {
  --fx-ease: cubic-bezier(.16, 1, .3, 1);
  --fx-gold: rgba(212, 175, 55, .55);
}

html.fx-on { scroll-behavior: smooth; }

/* —— grain (desktop) —— */
html.fx-on:not(.fx-lite) body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 3;
  opacity: .035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.8  0 0 0 0 0.75  0 0 0 0 0.45  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* —— buttons: glow + clipped gold sweep —— */
html.fx-on .btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: filter .25s ease, transform .25s var(--fx-ease), box-shadow .25s ease, background .25s ease, border-color .25s ease, color .25s ease;
}
html.fx-on .btn::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 236, 176, .28), transparent);
  transform: translateX(-160%);
  pointer-events: none;
  z-index: 1;
}
html.fx-on .btn-ghost::after,
html.fx-on .btn-line::after,
html.fx-on .btn-dark::after {
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, .22), transparent);
}
@media (hover: hover) and (pointer: fine) {
  html.fx-on .btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
  }
  html.fx-on .btn:hover::after {
    animation: fx-shine .55s ease;
  }
  html.fx-on .btn-ghost:hover,
  html.fx-on .btn-line:hover {
    box-shadow: 0 0 0 1px var(--gold);
  }
}
html.fx-on .btn:active { transform: translateY(0); }
html.fx-on .sticky-cta .btn,
html.fx-on .sticky-cta .btn:hover {
  transform: none;
  filter: none;
  box-shadow: none;
  overflow: hidden;
}
html.fx-on .sticky-cta .btn::after { content: none; animation: none; }

@keyframes fx-shine {
  from { transform: translateX(-160%); }
  to { transform: translateX(280%); }
}

/* Leaflet panes use z-index 400–1000; keep them inside the map box */
.maps,
.map,
.map.leaflet-container {
  position: relative;
  z-index: 0;
  isolation: isolate;
}

/* —— header compact + burger —— */
html.fx-on .header {
  transition: background .3s ease, border-color .3s ease, min-height .3s ease, padding .3s ease, backdrop-filter .3s ease;
}
html.fx-on .brand img { transition: height .3s var(--fx-ease); }
html.fx-on .header.is-solid {
  background: rgba(7, 8, 11, .97);
  backdrop-filter: blur(18px) saturate(1.15);
  border-bottom: 1px solid var(--line);
}
html.fx-on .header.is-compact {
  min-height: 72px;
  padding-top: 2px;
  padding-bottom: 2px;
}
html.fx-on .header.is-compact .brand img { height: 64px; }
html.fx-on .burger span,
html.fx-on .burger span::before,
html.fx-on .burger span::after {
  transition: transform .25s var(--fx-ease), top .25s ease, background .25s ease, opacity .2s ease;
}
html.fx-on .header.is-open .burger span { background: transparent; }
html.fx-on .header.is-open .burger span::before { top: 0; transform: rotate(45deg); }
html.fx-on .header.is-open .burger span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 980px) {
  html.fx-on .nav {
    display: none;
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    max-height: calc(100dvh - var(--header));
    overflow-y: auto;
  }
  html.fx-on .header.is-open .nav {
    display: flex;
  }
  html.fx-on .header:not(.is-open) .drop menu {
    display: none;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
  }
  html.fx-on .header.is-compact { min-height: 64px; }
  html.fx-on .header.is-compact .brand img { height: 48px; }
}

/* —— hero industrial layers —— */
.hero-fx,
.hero-hud,
.hero-sparks,
.hero-fx-frame,
.hero-fx-glow {
  pointer-events: none;
}
.hero-cine video,
.hero-cine .hero-fallback { z-index: 0; }
.hero-veil { z-index: 1; }
.hero-fx {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
}
.hero-fx-grid {
  position: absolute;
  inset: -20% 0 0;
  background-image:
    linear-gradient(rgba(212, 175, 55, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, .07) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.5) 0%, transparent 58%);
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.5) 0%, transparent 58%);
  opacity: .7;
}
html.fx-on:not(.fx-lite) .hero-fx-grid {
  animation: fx-grid 48s linear infinite;
}
.hero-fx-steel {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 70% at 80% 20%, rgba(212, 175, 55, .12), transparent 42%),
    radial-gradient(80% 50% at 10% 90%, rgba(212, 175, 55, .06), transparent 50%);
  mix-blend-mode: screen;
}
.hero-fx-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 480px;
  height: 480px;
  margin: -240px 0 0 -240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 215, 140, .16), transparent 62%);
  opacity: 0;
  will-change: transform;
}
html.fx-on:not(.fx-lite) .hero-cine.is-lit .hero-fx-glow { opacity: 1; }
.hero-fx-frame i {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(212, 175, 55, .45);
}
.hero-fx-frame .tl { top: 18px; left: 18px; border-right: 0; border-bottom: 0; }
.hero-fx-frame .tr { top: 18px; right: 18px; border-left: 0; border-bottom: 0; }
.hero-fx-frame .bl { bottom: 18px; left: 18px; border-right: 0; border-top: 0; }
.hero-fx-frame .br { bottom: 18px; right: 18px; border-left: 0; border-top: 0; }
.hero-hud {
  position: absolute;
  z-index: 3;
  top: calc(var(--header) + 18px);
  right: 28px;
  display: grid;
  gap: 6px;
  justify-items: end;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(240, 215, 140, .72);
}
.hero-hud b {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  vertical-align: middle;
  animation: fx-pulse 2.4s ease-in-out infinite;
}
.hero-copy { z-index: 4; }
html.fx-on .hero-copy > * {
  animation: fx-rise .9s var(--fx-ease) both;
}
html.fx-on .hero-copy > *:nth-child(1) { animation-delay: .08s; }
html.fx-on .hero-copy > *:nth-child(2) { animation-delay: .2s; }
html.fx-on .hero-copy > *:nth-child(3) { animation-delay: .34s; }
html.fx-on .hero-copy > *:nth-child(4) { animation-delay: .46s; }
html.fx-on .hero-copy > *:nth-child(5) { animation-delay: .58s; }
html.fx-on .hero-cine video,
html.fx-on .hero-cine .hero-fallback {
  transform-origin: center center;
  will-change: transform;
}
html.fx-on .scroll-hint {
  animation: fx-hint 2.2s ease-in-out infinite;
}
.hero-sparks span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #f6e7a6;
  box-shadow: 0 0 8px 2px rgba(240, 215, 140, .8);
  opacity: 0;
}
html.fx-on:not(.fx-lite) .hero-sparks span {
  animation: fx-spark 2.8s ease-in infinite;
}
.hero-sparks span:nth-child(1) { left: 18%; top: 42%; animation-delay: .2s; }
.hero-sparks span:nth-child(2) { left: 28%; top: 58%; animation-delay: 1.1s; }
.hero-sparks span:nth-child(3) { left: 62%; top: 36%; animation-delay: .7s; }
.hero-sparks span:nth-child(4) { left: 74%; top: 62%; animation-delay: 1.8s; }
.hero-sparks span:nth-child(5) { left: 48%; top: 48%; animation-delay: 2.2s; }
.hero-sparks span:nth-child(6) { left: 86%; top: 28%; animation-delay: .4s; }

@keyframes fx-grid {
  from { transform: translateY(0); }
  to { transform: translateY(72px); }
}
@keyframes fx-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes fx-pulse {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}
@keyframes fx-hint {
  0%, 100% { opacity: .45; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(6px); }
}
@keyframes fx-spark {
  0% { opacity: 0; transform: translate(0, 0) scale(.4); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(18px, -42px) scale(.1); }
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(212, 175, 55, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, .06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.45), transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.45), transparent 70%);
}
html.fx-on .page-hero-photo {
  transform: scale(1.04);
  transition: transform 1.2s var(--fx-ease);
}
html.fx-on .page-hero.is-in .page-hero-photo { transform: scale(1); }

/* —— scroll reveal —— */
html.fx-on .fx-reveal {
  opacity: 0;
  transform: translateY(22px) scale(.97);
  transition: opacity .75s var(--fx-ease), transform .75s var(--fx-ease);
  transition-delay: var(--fx-d, 0ms);
}
html.fx-on .fx-reveal.fx-left { transform: translateX(-20px) scale(.97); }
html.fx-on .fx-reveal.fx-right { transform: translateX(20px) scale(.97); }
html.fx-on .fx-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* —— section seams —— */
.section::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  pointer-events: none;
}
.faq-section::before { content: none; }

/* —— cards / services —— */
html.fx-on .card {
  transition: border-color .25s ease, transform .35s var(--fx-ease), box-shadow .35s ease, background .25s ease;
}
html.fx-on .card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35), 0 0 0 1px rgba(212, 175, 55, .22), 0 0 28px rgba(212, 175, 55, .08);
}
html.fx-on .card .num {
  display: inline-block;
  transition: transform .35s var(--fx-ease), color .25s ease;
}
html.fx-on .card:hover .num { transform: translateX(4px); }
html.fx-on .card-media img {
  transition: transform .9s var(--fx-ease), filter .9s ease;
}
html.fx-on .card:hover .card-media img {
  transform: scale(1.07);
  filter: contrast(1.08) saturate(1.05);
}
html.fx-on .card p {
  transition: color .25s ease;
}
html.fx-on .card:hover p { color: var(--steel); }
html.fx-on .plus article {
  transition: background .25s ease, box-shadow .3s ease, transform .3s var(--fx-ease);
}
html.fx-on .plus article:hover {
  background: #161922;
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, .35);
}
html.fx-on .plus article:hover .num { transform: translateX(3px); }
html.fx-on .plus .num {
  display: inline-block;
  transition: transform .3s var(--fx-ease);
}

/* —— production photos —— */
.split-photo .pic { isolation: isolate; }
.split-photo .pic img {
  transition: transform 1.1s var(--fx-ease), filter .5s ease;
  filter: saturate(.92) contrast(1.04);
}
html.fx-on .split-photo .pic:hover img {
  transform: scale(1.05);
  filter: saturate(1) contrast(1.08);
}
.split-photo .pic::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 46%, rgba(7, 8, 11, .42));
}
.split-photo .pic::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8%;
  height: 2px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(240, 215, 140, .85), transparent);
  opacity: 0;
}
html.fx-on:not(.fx-lite) .split-photo .pic.is-in::after {
  animation: fx-scan 2.6s var(--fx-ease) .2s both;
}
.pic-meta {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-2);
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: rgba(7, 8, 11, .62);
  backdrop-filter: blur(8px);
  pointer-events: none;
}
@keyframes fx-scan {
  0% { opacity: 0; top: 8%; }
  18% { opacity: 1; }
  100% { opacity: 0; top: 92%; }
}

html.fx-on .gallery a {
  position: relative;
}
html.fx-on .gallery a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(7, 8, 11, .35));
  opacity: .4;
  transition: opacity .3s ease;
}
html.fx-on .gallery a:hover::after { opacity: .15; }

html.fx-on .video-card {
  transition: transform .35s var(--fx-ease), border-color .25s ease;
}
html.fx-on .video-card:hover { transform: translateY(-4px); }

/* —— stats —— */
html.fx-on .stat b {
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(212, 175, 55, .18);
}

/* —— process / flow —— */
.flow,
.process-line {
  position: relative;
  overflow-x: clip;
}
.flow::before,
.process-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  pointer-events: none;
  z-index: 1;
  background: rgba(212, 175, 55, .14);
}
.flow::after,
.process-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 26%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: translateX(-120%);
  opacity: 0;
}
html.fx-on .flow.is-in::after,
html.fx-on .process-line.is-in::after {
  opacity: 1;
  animation: fx-rail 3.6s var(--fx-ease) .2s both, fx-rail-loop 7s linear 3.8s infinite;
}
html.fx-lite .flow.is-in::after,
html.fx-lite .process-line.is-in::after {
  animation: fx-rail 2.4s var(--fx-ease) .2s both;
}
html.fx-on .flow article,
html.fx-on .process-line li,
html.fx-on .quality article {
  transition: background .3s ease, box-shadow .3s ease;
}
html.fx-on .flow.is-in article:hover,
html.fx-on .process-line.is-in li:hover,
html.fx-on .quality article:hover {
  background: #171b24;
  box-shadow: inset 0 2px 0 var(--gold);
}
@keyframes fx-rail {
  from { transform: translateX(-100%); }
  to { transform: translateX(250%); }
}
@keyframes fx-rail-loop {
  from { transform: translateX(-100%); }
  to { transform: translateX(350%); }
}

/* —— chips / CTA band —— */
html.fx-on .chip {
  transition: border-color .25s ease, color .25s ease, transform .25s ease, background .25s ease;
}
html.fx-on .chip:hover {
  border-color: var(--gold);
  color: var(--gold-2);
  transform: translateY(-2px);
}
html.fx-on .cta-band {
  position: relative;
  overflow: hidden;
  transition: border-color .3s ease, box-shadow .3s ease;
}
html.fx-on .cta-band::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% 40%;
  height: 180px;
  background: radial-gradient(circle, rgba(212, 175, 55, .14), transparent 70%);
  pointer-events: none;
}
html.fx-on .cta-band:hover {
  border-color: var(--gold);
  box-shadow: 0 0 40px rgba(212, 175, 55, .08);
}
html.fx-on .clients figure {
  transition: opacity .3s ease, filter .3s ease, transform .3s ease;
  opacity: .78;
}
html.fx-on .clients figure:hover {
  opacity: 1;
  transform: translateY(-3px);
  filter: brightness(1.08);
}

html.fx-on .film:hover .film-track { animation-play-state: paused; }
html.fx-on .film-track.is-paused { animation-play-state: paused; }

html.fx-on .nav a,
html.fx-on .nav .drop > a {
  transition: color .2s ease, box-shadow .2s ease;
}
html.fx-on .drop menu {
  display: grid;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s var(--fx-ease), visibility 0s linear .2s;
}
html.fx-on .drop:hover menu,
html.fx-on .drop:focus-within menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition: opacity .2s ease, transform .2s var(--fx-ease);
}

@media (max-width: 980px) {
  html.fx-on .drop menu {
    display: grid;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }
  html.fx-on .header:not(.is-open) .drop menu {
    display: none;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
  }
  .hero-hud { display: none; }
  .hero-fx-frame { display: none; }
  .hero-sparks { display: none; }
  .scroll-hint { display: none; }
  html.fx-on .hero-copy > * { animation-duration: .55s; }
}

html.fx-lite .fx-reveal,
html.fx-lite .fx-reveal.is-in {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
html.fx-lite .hero-copy > * {
  animation: none !important;
  opacity: 1;
  transform: none;
}
html.fx-lite .film-track {
  animation: none;
}
html.fx-lite .hero-cine video,
html.fx-lite .hero-cine .hero-fallback {
  will-change: auto;
  transform: none;
}
html.fx-lite .card:hover,
html.fx-lite .card:hover .num { transform: none; }
html.fx-lite .btn {
  overflow: visible;
  isolation: auto;
}
html.fx-lite .btn::after { content: none; animation: none; }

@media (max-width: 640px) {
  html.fx-on .fx-reveal {
    transform: translateY(14px);
  }
  html.fx-on .card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html.fx-on .fx-reveal,
  html.fx-on .hero-copy > *,
  html.fx-on .page-hero-photo {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
  .hero-fx-grid,
  .hero-sparks span,
  .hero-hud b,
  .scroll-hint,
  .split-photo .pic::after,
  html.fx-on .flow.is-in::after,
  html.fx-on .process-line.is-in::after,
  html.fx-on .btn::after {
    animation: none !important;
  }
  html.fx-on .btn:hover,
  html.fx-on .card:hover { transform: none; }
  html.fx-on .btn::after { content: none; }
}
