/* =========================================================================
   Cortex Labs — Motion layer (GSAP + ScrollTrigger + SplitText + Lenis)
   Everything here is additive: without JS the page stays fully readable.
   ========================================================================= */

/* ---------- Lenis smooth scroll ---------- */
html.lenis,html.lenis body{height:auto}
html.lenis.lenis-smooth{scroll-behavior:auto!important}
.lenis.lenis-smooth [data-lenis-prevent]{overscroll-behavior:contain}
.lenis.lenis-stopped{overflow:hidden}

/* ---------- Hero accent fix: gradient must live on each split word ---------- */
.cx-showcase-accent .cx-title-word{
 background-image:linear-gradient(98deg,#ff416a 0%,#ff8ca2 44%,#ff355f 77%,#f53661 100%);
 background-size:300% 100%;
 -webkit-background-clip:text;background-clip:text;
 -webkit-text-fill-color:transparent;color:transparent;
 animation:cxAccentShift 6s ease-in-out infinite alternate
}
@keyframes cxAccentShift{to{background-position:100% 0}}

/* ---------- Custom cursor ---------- */
.cx-cursor,.cx-cursor-ring{position:fixed;top:0;left:0;pointer-events:none;z-index:100000;border-radius:50%;opacity:0}
.cx-cursor{width:8px;height:8px;background:var(--red)}
.cx-cursor-ring{width:40px;height:40px;border:1px solid rgba(243,0,59,.65);display:grid;place-items:center;
 transition:width .35s cubic-bezier(.2,.8,.2,1),height .35s cubic-bezier(.2,.8,.2,1),background-color .3s,border-color .3s}
.cx-cursor-ring span{font:800 10px/1 Manrope,sans-serif;letter-spacing:.14em;color:#fff;opacity:0;transform:scale(.6);transition:opacity .25s,transform .35s}
body.cx-cursor-hover .cx-cursor-ring{width:62px;height:62px;background:rgba(243,0,59,.1);border-color:var(--red)}
body.cx-cursor-view .cx-cursor-ring{width:96px;height:96px;background:var(--red);border-color:var(--red)}
body.cx-cursor-view .cx-cursor-ring span{opacity:1;transform:scale(1)}
body.cx-cursor-view .cx-cursor{opacity:0!important}
body.cx-cursor-down .cx-cursor-ring{width:30px;height:30px}
@media (hover:none),(pointer:coarse){.cx-cursor,.cx-cursor-ring{display:none}}

/* ---------- SplitText helpers ---------- */
.cx-split-line{padding-bottom:.08em;margin-bottom:-.08em}
.cx-chars .cx-char{display:inline-block;will-change:transform}

/* ---------- Image parallax wrapper (injected by JS) ---------- */
.about-photo-wrap,.about-choose-photo{position:relative}
.cx-px{position:absolute;left:0;right:0;top:-10%;bottom:-10%;display:block;will-change:transform}
.cx-px>img{width:100%!important;height:100%!important;object-fit:cover}

/* ---------- Kinetic type band ---------- */
.cx-kinetic{position:relative;background:#030303;overflow:hidden;padding:clamp(50px,8vw,120px) 0;isolation:isolate}
.cx-kinetic:before{content:"";position:absolute;inset:0;background:radial-gradient(ellipse 60% 50% at 50% 50%,#2a0010 0%,transparent 70%);z-index:-1}
.cx-kinetic-tilt{transform:rotate(-4deg) scale(1.08)}
.cx-kinetic-row{display:flex;width:max-content;white-space:nowrap;will-change:transform}
.cx-kinetic-row+.cx-kinetic-row{margin-top:.1em}
.cx-kinetic-set{display:flex;align-items:center;flex:0 0 auto}
.cx-kinetic-set span{font:800 clamp(54px,10vw,168px)/1 'Bricolage Grotesque',sans-serif;letter-spacing:-.05em;text-transform:uppercase;padding-right:.32em;color:#f5f5f5}
.cx-kinetic-set .o{color:transparent;-webkit-text-stroke:1.5px #4a4a4a}
.cx-kinetic-set .r{color:var(--red);text-shadow:0 0 60px #f3003b55}
.cx-kinetic-set .s{color:var(--red);font-size:clamp(28px,4vw,64px);padding-right:.6em;display:inline-block}
.cx-kinetic-row.alt{background:var(--red);padding:.12em 0;transform:rotate(6deg) translateY(-.2em)}
.cx-kinetic-row.alt .cx-kinetic-set span{font-size:clamp(22px,3vw,44px);color:#080808;letter-spacing:-.02em}
.cx-kinetic-row.alt .cx-kinetic-set .s{color:#080808;font-size:clamp(16px,2vw,28px)}

/* ---------- Manifesto (pinned word-by-word) ---------- */
.cx-manifesto{position:relative;min-height:100vh;display:grid;place-items:center;padding:120px 22px;background:#030303;overflow:hidden;isolation:isolate}
.cx-manifesto-orb{position:absolute;border-radius:50%;filter:blur(70px);z-index:-1;pointer-events:none}
.cx-manifesto-orb.one{width:46vw;height:46vw;max-width:640px;max-height:640px;left:-12vw;top:10%;background:#f3003b33}
.cx-manifesto-orb.two{width:34vw;height:34vw;max-width:480px;max-height:480px;right:-8vw;bottom:5%;background:#ff305c22}
.cx-manifesto-ring{position:absolute;left:50%;top:50%;width:min(92vw,980px);aspect-ratio:1;translate:-50% -50%;border-radius:50%;border:1px dashed #ffffff10;z-index:-1}
.cx-manifesto-ring:after{content:"";position:absolute;inset:14%;border-radius:50%;border:1px solid #f3003b1f}
.cx-manifesto-inner{max-width:1120px;text-align:center}
.cx-pill{display:inline-flex;align-items:center;gap:8px;padding:7px 16px;border:1px solid #303030;border-radius:40px;background:#0a0a0a;font:600 11px/1.2 Manrope,sans-serif;color:#cfcfcf;letter-spacing:.04em;margin-bottom:26px}
.cx-pill b{color:var(--red);font-weight:800}
.cx-manifesto-text{font:700 clamp(30px,4.7vw,74px)/1.08 'Bricolage Grotesque',sans-serif;letter-spacing:-.045em;margin:0;color:#f5f5f5;text-wrap:balance}
.cx-manifesto-text em{font-style:normal;color:var(--red)}
.cx-manifesto-sign{margin:34px auto 0;display:flex;justify-content:center;gap:clamp(18px,4vw,60px);flex-wrap:wrap;font:600 12px/1.4 Manrope,sans-serif;color:#7c7c7c;letter-spacing:.18em;text-transform:uppercase}
.cx-manifesto-sign span:before{content:"✦";color:var(--red);margin-right:10px}

/* ---------- Horizontal capabilities ---------- */
.cx-hscroll{position:relative;background:#030303;overflow:hidden;isolation:isolate}
.cx-hscroll:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#030303 0,transparent 8%,transparent 92%,#030303 100%);z-index:3;pointer-events:none}
.cx-hscroll-track{display:flex;align-items:center;gap:clamp(18px,2.4vw,40px);height:100vh;min-height:620px;padding:0 7vw;width:max-content;will-change:transform}
.cx-h-intro{flex:0 0 min(560px,82vw);padding-right:4vw}
.cx-h-intro h2{font:800 clamp(44px,6.4vw,104px)/.95 'Bricolage Grotesque',sans-serif;letter-spacing:-.055em;margin:0 0 22px;color:#fff}
.cx-h-intro h2 em{font-style:normal;color:transparent;-webkit-text-stroke:1.5px var(--red)}
.cx-h-intro p{font:400 15px/1.7 Manrope,sans-serif;color:#9b9b9b;max-width:420px;margin:0 0 26px}
.cx-h-hint{display:inline-flex;align-items:center;gap:12px;font:700 11px/1 Manrope,sans-serif;color:#d0d0d0;letter-spacing:.16em;text-transform:uppercase}
.cx-h-hint i{width:56px;height:1px;background:var(--red);position:relative;overflow:hidden}
.cx-h-hint i:after{content:"";position:absolute;inset:0;background:#fff;animation:cxHint 1.6s ease-in-out infinite}
@keyframes cxHint{from{transform:translateX(-100%)}to{transform:translateX(100%)}}
.cx-h-panel{position:relative;flex:0 0 clamp(300px,34vw,520px);height:min(70vh,610px);border-radius:26px;overflow:hidden;background:#0c0c0c;border:1px solid #1f1f1f;display:flex;flex-direction:column;justify-content:flex-end;padding:clamp(22px,2.4vw,36px);color:#fff;isolation:isolate}
.cx-h-panel:nth-child(odd){transform:translateY(4vh)}
.cx-h-panel:nth-child(even){transform:translateY(-4vh)}
.cx-h-media{position:absolute;inset:0;z-index:-2;overflow:hidden}
.cx-h-media img{position:absolute;left:-12%;top:0;width:124%;height:100%;object-fit:cover;filter:saturate(1.05) brightness(.82);transition:filter .5s}
.cx-h-panel:after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,#0000 25%,#000000d9 78%,#000 100%)}
.cx-h-panel:hover .cx-h-media img{filter:saturate(1.2) brightness(1)}
.cx-h-num{position:absolute;top:18px;left:24px;font:800 clamp(64px,8vw,130px)/1 'Bricolage Grotesque',sans-serif;letter-spacing:-.06em;color:transparent;-webkit-text-stroke:1.5px #ffffff55}
.cx-h-panel h3{font:700 clamp(24px,2.2vw,34px)/1.08 'Bricolage Grotesque',sans-serif;letter-spacing:-.04em;margin:0 0 10px}
.cx-h-panel p{font:400 13.5px/1.6 Manrope,sans-serif;color:#c3c3c3;margin:0 0 16px;max-width:380px}
.cx-h-tags{display:flex;flex-wrap:wrap;gap:7px}
.cx-h-tags span{font:600 10.5px/1 Manrope,sans-serif;padding:7px 11px;border:1px solid #ffffff2a;border-radius:30px;background:#ffffff0d;backdrop-filter:blur(6px);color:#eee}
.cx-h-outro{flex:0 0 min(520px,80vw);display:flex;flex-direction:column;align-items:flex-start;gap:24px;padding-left:3vw}
.cx-h-outro h3{font:800 clamp(38px,4.6vw,76px)/.98 'Bricolage Grotesque',sans-serif;letter-spacing:-.05em;margin:0;color:#fff}
.cx-h-outro h3 span{color:var(--red)}
.cx-h-outro a{display:inline-flex;gap:10px;align-items:center;background:var(--red);color:#fff;border-radius:60px;padding:16px 28px;font:800 12px/1 Manrope,sans-serif;letter-spacing:.02em}
.cx-h-progress{position:absolute;left:7vw;right:7vw;bottom:34px;height:2px;background:#1c1c1c;z-index:4;border-radius:2px;overflow:hidden}
.cx-h-progress span{display:block;height:100%;background:linear-gradient(90deg,#f3003b,#ff6d8e);transform-origin:left;transform:scaleX(0)}
.cx-h-counter{position:absolute;right:7vw;top:clamp(90px,12vh,130px);z-index:4;font:700 12px/1 Manrope,sans-serif;letter-spacing:.2em;color:#777}
.cx-h-counter b{color:#fff;font-size:28px;letter-spacing:-.02em;margin-right:6px;font-family:'Bricolage Grotesque',sans-serif}
@media (max-width:767px){
 .cx-hscroll:before,.cx-h-progress,.cx-h-counter{display:none}
 .cx-hscroll-track{flex-direction:column;align-items:stretch;height:auto;min-height:0;width:auto;padding:72px 16px;gap:18px}
 .cx-h-intro,.cx-h-outro{flex:none;padding:0}
 .cx-h-panel,.cx-h-panel:nth-child(odd),.cx-h-panel:nth-child(even){flex:none;height:440px;transform:none}
 .cx-h-outro{margin-top:20px}
}

/* ---------- Portal CTA (pinned circle expand) ---------- */
.cx-portal{position:relative;height:100vh;min-height:560px;overflow:hidden;background:#030303;display:grid;place-items:center;isolation:isolate}
.cx-portal-circle{position:absolute;left:50%;top:50%;width:140px;height:140px;margin:-70px 0 0 -70px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#ff5a7f 0%,#f3003b 45%,#8d0023 100%);transform:scale(.0001);z-index:0;box-shadow:0 0 120px #f3003b66}
.cx-portal-orbit{position:absolute;left:50%;top:50%;width:min(80vw,760px);aspect-ratio:1;translate:-50% -50%;z-index:0;opacity:.5;pointer-events:none}
.cx-portal-orbit img{width:100%;height:100%;object-fit:contain}
.cx-portal-content{position:relative;z-index:2;text-align:center;padding:0 18px}
.cx-portal-kicker{font:700 12px/1 Manrope,sans-serif;letter-spacing:.3em;text-transform:uppercase;color:#fff;opacity:.85;margin-bottom:24px}
.cx-portal-title{font:800 clamp(52px,11.5vw,200px)/.86 'Bricolage Grotesque',sans-serif;letter-spacing:-.065em;text-transform:uppercase;margin:0;color:#fff}
.cx-portal-title .line{display:block;overflow:hidden;padding-bottom:.04em}
.cx-portal-title .line span{display:inline-block}
.cx-portal-title .o{color:transparent;-webkit-text-stroke:2px #fff}
.cx-portal-cta{margin-top:38px;display:inline-flex;align-items:center;gap:12px;background:#fff;color:#0a0a0a;border-radius:60px;padding:18px 32px;font:800 13px/1 Manrope,sans-serif;box-shadow:0 20px 50px #0006}
.cx-portal-cta:hover{color:#0a0a0a;background:#ffe5ec}
.cx-portal-cta i{font-style:normal;display:inline-grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--red);color:#fff}

/* ---------- Inner-page banner ghost word ---------- */
.cx-banner-ghost{position:absolute;right:-2vw;bottom:-.18em;font:800 clamp(90px,15vw,250px)/1 'Bricolage Grotesque',sans-serif;letter-spacing:-.06em;text-transform:uppercase;color:transparent;-webkit-text-stroke:1px #ffffff12;white-space:nowrap;pointer-events:none;user-select:none;z-index:0}
.about-banner-content{z-index:1}

/* ---------- Misc ---------- */
.cx-glow-follow{position:absolute;width:420px;height:420px;border-radius:50%;background:radial-gradient(circle,#f3003b26 0%,transparent 65%);pointer-events:none;z-index:0;left:0;top:0;opacity:0;transition:opacity .4s}
.featured-section:hover .cx-glow-follow,.services-section:hover .cx-glow-follow{opacity:1}
.featured-shell,.services-shell{position:relative;z-index:1}
.logo-marquee.cx-gsap-marquee .logo-marquee-track{animation:none!important}

@media (prefers-reduced-motion:reduce){
 .cx-cursor,.cx-cursor-ring,.cx-glow-follow{display:none}
 .cx-showcase-accent .cx-title-word{animation:none}
 .cx-h-panel:nth-child(odd),.cx-h-panel:nth-child(even){transform:none}
 .cx-hscroll-track{flex-wrap:wrap;width:auto;height:auto;padding:80px 6vw}
 .cx-portal-circle{transform:scale(30)}
}
