/* ============ Site-wide motion effects (used with fx.js) ============ */

/* ---------- big headings: letters rise ---------- */
.fx-letters .fx-ch, .fx-letters .fx-sup { display: inline-block; opacity: 0; transform: translateY(.45em) rotate(4deg); transition: opacity .9s var(--ease), transform 1.1s var(--ease), color .35s var(--ease); transition-delay: calc(var(--k, 0) * 55ms); }
.fx-letters.fx-on .fx-ch, .fx-letters.fx-on .fx-sup { opacity: 1; transform: none; }
.fx-letters .fx-ch:hover { color: var(--blue); transform: translateY(-.06em); transition-delay: 0s; }
.dark .fx-letters .fx-ch:hover, .on-dark .fx-letters .fx-ch:hover, .hero .fx-letters .fx-ch:hover { color: var(--blue-soft); }
.fx-letters.fx-whole { opacity: 0; transform: translateY(.3em); transition: opacity 1s var(--ease), transform 1.2s var(--ease); transition-delay: .25s; }
.fx-letters.fx-whole.fx-on { opacity: 1; transform: none; }

/* ---------- words: light up on scroll, pop near the cursor ---------- */
.fx-pop .fx-w { display: inline-block; opacity: .18; transform: translateY(var(--wy, 0)) scale(var(--ws, 1)); transition: opacity .6s var(--ease), transform .35s var(--ease), color .3s; }
.fx-pop.fx-on .fx-w { opacity: 1; transition-delay: calc(var(--k, 0) * 18ms), 0s, 0s; }
.fx-pop .fx-w.fx-lit { color: var(--blue); }
.dark .fx-pop .fx-w.fx-lit, .hero .fx-pop .fx-w.fx-lit { color: var(--blue-soft); }
.svc li:hover .fx-pop .fx-w.fx-lit, .svc li:hover .fx-w.fx-lit { color: var(--white); }

/* ---------- cards: glow that follows the cursor ---------- */
.fx-glow { display: none; }
.fx-glowable { position: relative; isolation: isolate; overflow: hidden; }
.fx-glowable > .fx-glow { display: block; position: absolute; z-index: -1; width: 460px; height: 460px; left: var(--gx, 50%); top: var(--gy, 50%); transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(1, 37, 255, .16), transparent 62%); opacity: 0; transition: opacity .5s var(--ease); pointer-events: none; }
.dark .fx-glowable > .fx-glow { background: radial-gradient(circle, rgba(125, 140, 255, .26), transparent 62%); }
.fx-glowable:hover > .fx-glow { opacity: 1; }
.svc li.fx-glowable:hover > .fx-glow { background: radial-gradient(circle, rgba(255, 255, 255, .26), transparent 62%); }
/* on photo cards the glow sits on top of the picture as a soft light */
.feature.fx-glowable > .fx-glow, .member.fx-glowable > .fx-glow { z-index: 1; mix-blend-mode: screen; background: radial-gradient(circle, rgba(125, 140, 255, .45), transparent 60%); }

/* ---------- cards: 3D tilt ---------- */
.fx-tilt { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--ease); }
.fx-tilt:hover { z-index: 2; }
.feature.fx-tilt:hover { box-shadow: 0 30px 60px rgba(0, 0, 0, .22); }

/* ---------- hero glow ---------- */
.fx-orb { position: absolute; z-index: 0; width: 46vmax; height: 46vmax; left: 62%; top: 40%; border-radius: 50%; background: radial-gradient(circle at 40% 40%, rgba(125, 140, 255, .5), rgba(1, 37, 255, .22) 45%, transparent 70%); filter: blur(30px); mix-blend-mode: screen; opacity: .55; transform: translate(-50%, -50%) translate(var(--mx, 0px), var(--my, 0px)); transition: transform 1.2s var(--ease); animation: fx-breathe 9s ease-in-out infinite alternate; pointer-events: none; }
@keyframes fx-breathe { from { scale: 1; opacity: .45; } to { scale: 1.15; opacity: .7; } }

/* ---------- moving strip of services ---------- */
.fx-marquee { overflow: hidden; border-bottom: 1px solid var(--line); background: var(--white); padding: clamp(14px, 1.6vw, 22px) 0; }
.fx-track { display: flex; width: max-content; animation: fx-move 34s linear infinite; }
.fx-marquee:hover .fx-track { animation-play-state: paused; }
.fx-set { display: flex; align-items: center; }
.fx-set span { display: inline-block; font-family: var(--display); font-size: clamp(2.2rem, 4.6vw, 4.4rem); line-height: 1; text-transform: uppercase; color: var(--navy); padding: 0 .35em; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), color .3s; }
.fx-set span:hover { transform: scale(1.14) rotate(-3deg); color: var(--blue); }
.fx-set i { width: .45em; height: .45em; font-size: clamp(2.2rem, 4.6vw, 4.4rem); background: var(--blue); border-radius: 50%; flex: none; transform: scale(.5); }
@keyframes fx-move { to { transform: translateX(-50%); } }

/* ---------- custom cursor (mouse only) ---------- */
.fx-cur { position: fixed; z-index: 200; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
.fx-cur::before { content: ""; position: absolute; width: 14px; height: 14px; left: -7px; top: -7px; border-radius: 50%; background: var(--white); mix-blend-mode: difference; transition: width .4s var(--ease), height .4s var(--ease), left .4s var(--ease), top .4s var(--ease), background .3s, opacity .3s; }
.fx-cur span { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(.6); font-family: var(--display); font-size: 1.05rem; letter-spacing: .04em; color: var(--white); white-space: nowrap; opacity: 0; transition: opacity .25s, transform .4s var(--ease); }
.fx-cur.fx-link::before { width: 42px; height: 42px; left: -21px; top: -21px; }
.fx-cur.fx-big::before { width: 88px; height: 88px; left: -44px; top: -44px; background: var(--blue); mix-blend-mode: normal; }
.fx-cur.fx-big span { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.fx-cur.fx-press::before { transform: scale(.8); }
.fx-cur.fx-gone::before, .fx-cur.fx-gone span { opacity: 0; }

/* ---------- header ---------- */
/* stuck header turns frosted with a soft shadow */
.hd { transition: background .5s var(--ease), box-shadow .5s var(--ease); }
.hd.stuck { background: rgba(255, 255, 255, .86); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 10px 30px rgba(20, 20, 20, .06); }
/* glow that follows the cursor inside each column */
.hd-col { position: relative; isolation: isolate; }
.hd-glow { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hd-glow i { position: absolute; width: 320px; height: 320px; left: var(--gx, 50%); top: var(--gy, 50%); transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(1, 37, 255, .12), transparent 62%); opacity: 0; transition: opacity .5s var(--ease); }
.hd-col:hover .hd-glow i { opacity: 1; }
/* label slides and turns blue on hover */
.hd-label { transition: translate .5s var(--ease), color .4s; }
.hd-col:hover .hd-label { translate: 6px 0; color: var(--blue); }
/* tab names: letters wave on hover */
.hd-tab .hl { display: inline-block; transition: translate .9s var(--ease), opacity .7s var(--ease); transition-delay: calc(var(--c, 0) * 90ms + var(--k, 0) * 35ms + .25s); }
.hd-col:hover .hd-tab .hl { animation: hd-wave .55s var(--ease) both; animation-delay: calc(var(--k, 0) * 35ms); }
@keyframes hd-wave { 40% { translate: 0 -7px; } 100% { translate: 0 0; } }
/* chips float gently and spread apart on hover */
.chips { transition: gap .5s var(--ease); }
.hd-col:hover .chips { gap: 10px; }
.chip { animation: chip-float 4s ease-in-out infinite; animation-delay: calc(var(--n, 0) * -1.1s); transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), box-shadow .45s var(--ease), scale .7s cubic-bezier(.34, 1.56, .64, 1), opacity .5s; }
@keyframes chip-float { 50% { translate: 0 -3px; } }
.chip.pop { animation: chip-pop .55s cubic-bezier(.34, 1.56, .64, 1); }
.chips em { display: inline-block; transition: scale .6s cubic-bezier(.34, 1.56, .64, 1), opacity .5s, translate .5s var(--ease); }
.hd-col:hover .chips em { translate: 3px 0; }
/* email & WhatsApp: underline draws in */
.hd-contact a { width: fit-content; background: linear-gradient(var(--blue), var(--blue)) no-repeat 0 100% / 0 1px; transition: background-size .5s var(--ease), color .3s, translate .5s var(--ease), opacity .6s; }
.hd-contact a:hover { background-size: 100% 1px; }
/* menu button lines stretch on hover */
.menu-btn span { transition: transform .5s var(--ease), width .5s var(--ease), translate .5s var(--ease); }
.menu-btn:hover span:first-child { translate: -5px 0; }
.menu-btn:hover span:last-child { translate: 5px 0; }
.menu-btn[aria-expanded="true"]:hover span { translate: 0 0; }
.hd-burger:hover .menu-btn span { background: var(--blue); }

/* entrance: columns slide in one after another when the header arrives */
.hd-anim .hd-label, .hd-anim .hd-contact a { opacity: 0; translate: 0 14px; transition-delay: calc(var(--c, 0) * 90ms + .1s); }
.hd-anim .chips > * { opacity: 0; scale: 0; transition-delay: calc(var(--c, 0) * 90ms + var(--n, 0) * 70ms + .2s); }
.hd-anim .hd-tab .hl { opacity: 0; translate: 0 70%; }
.hd-anim .brand-name img, .hd-anim .menu-btn { opacity: 0; transition: opacity .8s var(--ease) .1s, transform .6s var(--ease); }
.hd-anim.hd-in .hd-label, .hd-anim.hd-in .hd-contact a { opacity: 1; translate: 0 0; }
.hd-anim.hd-in .chips > * { opacity: 1; scale: 1; }
.hd-anim.hd-in .hd-tab .hl { opacity: 1; translate: 0 0; }
.hd-anim.hd-in .brand-name img, .hd-anim.hd-in .menu-btn { opacity: 1; }
/* once in, hover effects respond straight away */
.hd-anim.hd-in .hd-col:hover .hd-label, .hd-anim.hd-in .hd-col:hover .chips em { transition-delay: 0s; }
.hd-anim.hd-in .hd-col:hover .hd-label { translate: 6px 0; }

@media (prefers-reduced-motion: reduce) {
  .fx-letters .fx-ch, .fx-letters .fx-sup, .fx-letters.fx-whole, .fx-pop .fx-w { opacity: 1; transform: none; transition: none; }
  .fx-orb, .fx-track, .chip { animation: none; }
}
