/* ==========================================================================
   FOTO — homepage motion layer (front page only, loaded after main.css)
   Classes are added by home-fx.js; without JS the page looks exactly as before.
   ========================================================================== */

/* ---------- Scroll progress bar ---------- */
.fx-progress { position: fixed; left: 0; right: 0; top: 0; z-index: 99990; height: 3px; pointer-events: none; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, #ffb347, var(--orange) 45%, #ff3d00); box-shadow: 0 0 10px rgba(242, 101, 34, .7); }
.admin-bar .fx-progress { top: 32px; }
@media (max-width: 782px) { .admin-bar .fx-progress { top: 46px; } }

/* ---------- Scroll reveal (only elements below the first screen get these) ---------- */
.fx-rv { opacity: 0; }
.fx-rv.is-in { animation: fxUp .85s cubic-bezier(.2, .7, .2, 1) var(--d, 0s) both; }
.fx-rv--zoom.is-in { animation-name: fxZoom; }
.fx-rv--left.is-in { animation-name: fxLeft; }
.fx-rv--right.is-in { animation-name: fxRight; }
.fx-rv--wipe { opacity: 1; clip-path: inset(0 100% 0 0); }
.fx-rv--wipe.is-in { animation: fxWipe 1.1s cubic-bezier(.7, 0, .2, 1) var(--d, 0s) both; }
@keyframes fxUp { from { opacity: 0; transform: translate3d(0, 34px, 0); } to { opacity: 1; transform: none; } }
@keyframes fxZoom { from { opacity: 0; transform: translate3d(0, 24px, 0) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes fxLeft { from { opacity: 0; transform: translate3d(-44px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes fxRight { from { opacity: 0; transform: translate3d(44px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes fxWipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* Section titles: orange line draws in under the heading */
.fx-title { position: relative; }
.fx-title::after { content: ""; display: block; width: 56px; height: 3px; margin-top: 12px; border-radius: 3px; background: linear-gradient(90deg, var(--orange), #ffb347); transform-origin: 0 50%; transform: scaleX(0); transition: transform .9s cubic-bezier(.2, .7, .2, 1) .25s; }
.fx-title.is-drawn::after { transform: scaleX(1); }
.faq__head .fx-title::after { margin-left: auto; margin-right: auto; transform-origin: 50% 50%; }

/* ---------- Hero ---------- */
.fx-sparks { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.fx-glow { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .6s; background: radial-gradient(420px circle at var(--gx, 70%) var(--gy, 60%), rgba(255, 122, 51, .22), rgba(242, 101, 34, .08) 40%, transparent 70%); mix-blend-mode: screen; }
.hero.is-glow .fx-glow { opacity: 1; }
.hero__media { transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
.fx-on .hero__media img { animation: fxKen 26s ease-in-out infinite alternate; transform-origin: 70% 45%; }
@keyframes fxKen { from { transform: scale(1); } to { transform: scale(1.08); } }

/* Kicker: a molten line slides in front of the text */
.hero .kicker { display: flex; align-items: center; gap: 12px; }
.hero .kicker::before { content: ""; flex: none; height: 2px; width: 36px; border-radius: 2px; background: linear-gradient(90deg, rgba(242, 101, 34, .2), var(--orange), #ffb347); }
.fx-on .hero .kicker::before { animation: fxKick 2.6s ease-in-out infinite; }
@keyframes fxKick { 0%, 100% { box-shadow: 0 0 0 rgba(255, 122, 51, 0); } 50% { box-shadow: 0 0 12px rgba(255, 122, 51, .9); } }

/* Buttons: periodic shine sweep on the primary CTA, sheen on hover for all primary buttons */
.btn--primary { position: relative; overflow: hidden; isolation: isolate; }
.btn--primary::after { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 0; width: 45%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-160%) skewX(-20deg); pointer-events: none; }
.btn--primary:hover::after { transition: transform .7s ease; transform: translateX(330%) skewX(-20deg); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(242, 101, 34, .38); }
.fx-on .hero .btn--primary::after { animation: fxShine 4.2s ease-in-out 1s infinite; }
@keyframes fxShine { 0%, 62% { transform: translateX(-160%) skewX(-20deg); } 100% { transform: translateX(330%) skewX(-20deg); } }

/* Scroll cue (desktop) */
.fx-cue { display: none; }
@media (min-width: 900px) {
	.fx-cue { display: block; position: absolute; left: 50%; bottom: 18px; width: 22px; height: 36px; margin-left: -11px; border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 12px; opacity: 0; transition: opacity .6s; pointer-events: none; }
	.fx-cue::before { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--orange); }
	.fx-on .fx-cue { opacity: 1; }
	.fx-on .fx-cue::before { animation: fxCue 1.8s ease-in-out infinite; }
	.fx-scrolled .fx-cue { opacity: 0; }
}
@keyframes fxCue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }

/* ---------- Stats strip ---------- */
.stat { position: relative; }
.stat::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 40px; height: 3px; margin-left: -20px; border-radius: 3px 3px 0 0; background: var(--orange); transform: scaleX(0); transition: transform .8s cubic-bezier(.2, .7, .2, 1) var(--d, 0s); }
.stats.is-counted .stat::after { transform: scaleX(1); }
.stat strong { font-variant-numeric: tabular-nums; }
.stat__ico::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--orange); opacity: 0; pointer-events: none; }
.stats.is-counted .stat__ico::after { animation: fxStatPing 1.4s cubic-bezier(.2, .7, .2, 1) var(--d, 0s) 1; }
.stat__ico .ico { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.stat:hover .stat__ico { background: var(--orange); color: #fff; box-shadow: 0 0 0 7px rgba(242, 101, 34, .14), 0 8px 20px rgba(242, 101, 34, .28); }
.stat:hover .stat__ico .ico { transform: rotate(-10deg) scale(1.1); }
@keyframes fxStatPing { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }

/* ---------- Product line cards: cursor spotlight + 3D tilt + floating icon ---------- */
.line-card { position: relative; overflow: hidden; isolation: isolate; }
.line-card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(242, 101, 34, .28), transparent 65%); }
.line-card:hover::before { opacity: 1; }
.line-card.fx-tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px); transition: border-color .2s, background .2s, transform .12s linear; }
.line-card__ico .ico { transition: transform .5s cubic-bezier(.2, .7, .2, 1), color .3s; }
.line-card:hover .line-card__ico .ico { transform: translateY(-6px) scale(1.08); color: var(--orange-2); }
.fx-on .lines .line-card__ico .ico { animation: fxFloat 5s ease-in-out infinite; }
.fx-on .lines .line-card:nth-child(2) .line-card__ico .ico { animation-delay: -1.2s; }
.fx-on .lines .line-card:nth-child(3) .line-card__ico .ico { animation-delay: -2.4s; }
.fx-on .lines .line-card:nth-child(4) .line-card__ico .ico { animation-delay: -3.6s; }
.fx-on .lines .line-card:hover .line-card__ico .ico { animation-play-state: paused; }
@keyframes fxFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.line-card .more .ico { transition: transform .25s; }
.line-card:hover .more .ico { transform: translateX(5px); }

/* Lines section: slow drifting warm glow behind the grid */
.lines { position: relative; isolation: isolate; overflow: hidden; }
.lines::after { content: ""; position: absolute; z-index: -1; width: 620px; height: 620px; left: -160px; top: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 101, 34, .16), transparent 65%); pointer-events: none; }
.fx-on .lines::after { animation: fxDrift 18s ease-in-out infinite alternate; }
@keyframes fxDrift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(70vw, 260px, 0); } }

/* ---------- Alloy selector: cards cascade in when a tab is switched ---------- */
.panel.fx-swap .pcard { animation: fxUp .55s cubic-bezier(.2, .7, .2, 1) both; }
.panel.fx-swap .pcard:nth-child(2) { animation-delay: .07s; }
.panel.fx-swap .pcard:nth-child(3) { animation-delay: .14s; }
.panel.fx-swap .pcard:nth-child(4) { animation-delay: .21s; }
.tab.is-active { box-shadow: 0 8px 20px rgba(242, 101, 34, .3); }

/* ---------- Flagship ---------- */
.flag__media { overflow: hidden; }
.flag__media img { transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.flag:hover .flag__media img { transform: scale(1.05); }
.flag__stats dt { font-variant-numeric: tabular-nums; }

/* ---------- Industries ---------- */
.ind__label { transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.ind:hover .ind__label { transform: translateY(-6px); }
.ind__label::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--orange); transition: width .35s; }
.ind:hover .ind__label::after { width: 44px; }
.ind::before { content: ""; position: absolute; inset: 0; z-index: 1; border: 2px solid transparent; border-radius: inherit; transition: border-color .3s; pointer-events: none; }
.ind:hover::before { border-color: var(--orange); }

/* ---------- About ---------- */
.vals li .ico { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.vals li:hover .ico { transform: rotate(-8deg) scale(1.15); }

@media (prefers-reduced-motion: reduce) {
	.fx-rv, .fx-rv--wipe { opacity: 1 !important; clip-path: none !important; }
	.fx-title::after, .stat::after { transform: scaleX(1) !important; }
	.stat__ico::after { animation: none !important; }
	.stat__ico, .stat__ico .ico { transition: none !important; }
	.fx-progress, .fx-sparks, .fx-glow, .fx-cue { display: none !important; }
	.hero__media { transform: none !important; }
}
