/* Studio flow layer — menu overlay, scrubbed copy, layered sections, floaters, cursor, FAQ, mega footer */

/* ---------- layered sections: rounded sheets (no negative margins — each section keeps its own padding) ---------- */
:is(#bm,html) body.editorial-page>section:not(#hero-section):not(#filter-bar):not(.sticky),
:is(#bm,html) body.editorial-home>main>section:not(#hero-section){
  --st-r:clamp(28px,4.2vw,64px);position:relative;z-index:2;
  border-radius:var(--st-r) var(--st-r) 0 0;background-color:#f6f6f4!important;box-shadow:0 -18px 30px -26px rgba(17,17,17,.28)}
.fx-marquee+section,.fx-marquee+main>section:first-child{border-radius:0!important;box-shadow:none!important}
.fx-marquee{z-index:4}
:is(#bm,html) body.editorial-page #hero-section{z-index:1}

/* ---------- scrubbed lead copy ---------- */
.st-scrub{color:#111}
.st-scrub .st-w{display:inline;opacity:.16;transition:opacity .15s linear}

/* ---------- floating mirrored shapes ---------- */
.st-floaty{position:absolute;z-index:0;width:clamp(36px,5vw,76px);opacity:.5;pointer-events:none}
.st-floaty svg{display:block;width:100%;height:auto}
@media (max-width:900px){.st-floaty{display:none}}

/* ---------- cursor ring ---------- */
.st-cursor{position:fixed;z-index:10000;left:0;top:0;width:34px;height:34px;margin:-17px 0 0 -17px;border:1.5px solid #111;border-radius:50%;pointer-events:none;opacity:0;
  border-color:#ff6b00;transition:opacity .25s,width .3s cubic-bezier(.22,1,.36,1),height .3s cubic-bezier(.22,1,.36,1),margin .3s cubic-bezier(.22,1,.36,1),background .3s}
.st-cursor.is-on{opacity:1}
.st-cursor.is-link{width:64px;height:64px;margin:-32px 0 0 -32px;background:rgba(255,107,0,.18)}
@media (hover:none),(pointer:coarse){.st-cursor{display:none}}

/* ---------- full-screen menu ---------- */
.st-menu-btn{display:inline-flex;margin-left:.9rem;align-items:center;gap:.7rem;padding:.7rem 1.3rem;border:2px solid #ff6b00;border-radius:999px;background:#ff6b00;color:#111;font:600 .72rem var(--font-display);letter-spacing:.08em;text-transform:uppercase;cursor:pointer;transition:transform .25s,background .25s}
.st-menu-btn:hover{background:#ff8733;transform:translateY(-1px)}
.st-menu-btn b{width:.9rem;height:.5rem;border-block:2px solid currentColor;position:relative}
.st-menu{position:fixed;inset:0;z-index:300;display:grid;grid-template-rows:auto 1fr auto;padding:clamp(1rem,3vw,2.2rem) clamp(1.2rem,5vw,4.5rem) clamp(1.4rem,3vw,2.6rem);background:#111;color:#f0f0ee;
  clip-path:circle(0 at var(--x,100%) var(--y,0));visibility:hidden;transition:clip-path .85s cubic-bezier(.76,0,.24,1),visibility 0s .85s;overflow:auto}
.st-menu.is-open{clip-path:circle(150vmax at var(--x,100%) var(--y,0));visibility:visible;transition:clip-path .85s cubic-bezier(.76,0,.24,1),visibility 0s}
.st-menu-top{display:flex;align-items:center;justify-content:space-between}
.st-menu-close{display:inline-flex;align-items:center;gap:.6rem;padding:.7rem 1.3rem;border:2px solid #f0f0ee;border-radius:999px;color:#f0f0ee;background:transparent;font:600 .72rem var(--font-display);letter-spacing:.08em;text-transform:uppercase;cursor:pointer;transition:background .25s,color .25s}
.st-menu-close:hover{background:#ff6b00;border-color:#ff6b00;color:#111}
.st-menu-nav{display:flex;flex-direction:column;justify-content:center;gap:.1rem;padding-block:2rem}
.st-menu-link{display:flex;align-items:baseline;gap:1.2rem;width:fit-content;color:#f0f0ee;text-decoration:none;opacity:0;transform:translateY(60px);transition:opacity .7s cubic-bezier(.22,1,.36,1),transform .8s cubic-bezier(.22,1,.36,1),color .25s,padding .35s cubic-bezier(.22,1,.36,1)}
.st-menu.is-open .st-menu-link{opacity:1;transform:none;transition-delay:calc(.25s + var(--i) * 70ms),calc(.25s + var(--i) * 70ms),0s,0s}
.st-menu-link .n{font:500 .8rem "IBM Plex Mono",monospace;letter-spacing:.14em;color:#ff6b00}
.st-menu-link .t{font:500 clamp(2.4rem,7.4vw,5.6rem)/1.02 var(--font-display);letter-spacing:-.02em;text-transform:uppercase}
.st-menu-link .a{font-size:clamp(1.4rem,3.4vw,3rem);color:#ff6b00;opacity:0;transform:translate(-10px,10px);transition:opacity .3s,transform .35s}
.st-menu-nav:hover .st-menu-link:not(:hover){opacity:.32}
.st-menu-link:hover{padding-left:1.2rem;color:#ff6b00}
.st-menu-link:hover .a{opacity:1;transform:none}
.st-menu-link.is-current .t{-webkit-text-stroke:2px #ff6b00;color:transparent}
.st-menu-foot{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:1.5rem 3rem}
.st-menu-ask{margin:0;font:500 clamp(1.1rem,2.2vw,1.7rem)/1.25 var(--font-display);max-width:20ch}
.st-menu-mail{color:#f0f0ee;font:500 clamp(1rem,1.8vw,1.35rem) var(--font-display);border-bottom:2px solid #ff6b00;text-decoration:none}
html.st-menu-lock,html.st-menu-lock body{overflow:hidden}

/* ---------- FAQ ---------- */
.st-faq{position:relative;padding:clamp(4rem,8vw,8rem) 0}
.st-faq-wrap{max-width:980px;margin:0 auto;padding:0 clamp(1.25rem,4vw,3rem)}
.st-faq-title{margin:0 0 2.5rem;font-size:clamp(2rem,5vw,4.2rem);line-height:1.05;text-transform:uppercase;color:#111}
.st-faq-item{margin-bottom:.7rem;border:2px solid #111;border-radius:34px;background:#f7f7f5;transition:background .3s,box-shadow .3s}
.st-faq-item:has([aria-expanded="true"]){background:#ff6b00;box-shadow:0 5px 0 #111}
.st-faq-q{display:flex;align-items:center;justify-content:space-between;gap:1rem;width:100%;padding:1.2rem 1.6rem;text-align:left;color:#111;background:none;cursor:pointer;font:500 clamp(1rem,1.8vw,1.3rem)/1.3 var(--font-display)}
.st-faq-q i{display:grid;place-items:center;flex:none;width:2.4rem;height:2.4rem;border:2px solid #111;border-radius:50%;font-size:1.2rem;transition:transform .4s cubic-bezier(.22,1,.36,1),background .3s,color .3s}
.st-faq-q[aria-expanded="true"] i{transform:rotate(135deg);background:#111;color:#ff6b00}
.st-faq-a{display:grid;grid-template-rows:0fr;transition:grid-template-rows .5s cubic-bezier(.22,1,.36,1)}
.st-faq-a>div{overflow:hidden}
.st-faq-q[aria-expanded="true"]+.st-faq-a{grid-template-rows:1fr}
.st-faq-a p{margin:0;padding:0 1.6rem 1.4rem;max-width:62ch;font-size:1rem;line-height:1.65;color:#111}

/* ---------- home teaser ---------- */
.kk-work .st-more{margin:2.5rem 0 0;text-align:center}

/* ---------- mega footer: mascot + giant wordmark ---------- */
.jx-mega{position:relative;display:flex;flex-direction:column;align-items:center;padding:2rem 0 0;overflow:hidden;background:#111}
.jx-mascot{width:clamp(70px,9vw,120px);height:auto;margin-bottom:-.4rem;position:relative;z-index:2}
.jx-eyes{transition:transform .12s linear}
.jx-mega-word{display:block;font:600 clamp(3.4rem,17.5vw,17rem)/.82 var(--font-display);letter-spacing:-.03em;text-transform:uppercase;color:transparent;-webkit-text-stroke:2px rgba(240,240,238,.35);white-space:nowrap;transform:translateY(12%);transition:-webkit-text-stroke-color .4s,color .4s}
.jx-mega:hover .jx-mega-word{-webkit-text-stroke-color:#ff6b00;color:rgba(255,107,0,.12)}

@media (prefers-reduced-motion:reduce){.st-menu,.st-menu-link{transition:none}.st-scrub .st-w{opacity:1!important}}

/* beat the generic ".has-scroll-scene > *" rule */
:is(#bm,html) body .st-floaty{position:absolute!important;display:block!important;z-index:0!important;width:clamp(36px,5vw,76px)!important}
:is(#bm,html) body .st-floaty svg{width:100%!important;height:auto!important}

/* outline lettering must beat the theme's heading colour */
:is(#bm,html) body .jx-mega-word{color:transparent!important;-webkit-text-stroke:2px rgba(240,240,238,.4)}
:is(#bm,html) body .jx-mega:hover .jx-mega-word{color:rgba(255,107,0,.14)!important;-webkit-text-stroke-color:#ff6b00}
:is(#bm,html) body .kk-big-b{color:transparent!important;-webkit-text-stroke:2px #ff6b00}
:is(#bm,html) body .kk-big-b sup{-webkit-text-stroke:0;color:#ff6b00!important}
/* FAQ: neutralise theme button borders so the pill shape stays clean */
.st-faq-item{overflow:hidden}
:is(#bm,html) body .st-faq-q{border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;color:#111!important}
:is(#bm,html) body .st-faq-q i{border:2px solid #111!important;border-radius:50%!important}
.st-faq-a>div{border-top:0}

/* ---------- team strip ---------- */
.st-team{position:relative;padding:clamp(4rem,8vw,8rem) 0;overflow:clip}
.st-team{--gutter:max(1.5rem,calc((100vw - 1280px) / 2))}
.st-team-head{display:flex;flex-direction:column;align-items:center;text-align:center;margin:0 auto 3rem;padding:0 1.5rem}
.st-team-title{margin:.6rem 0 0;max-width:18ch;font-size:clamp(2.2rem,5.4vw,4.6rem);line-height:1.04;text-transform:uppercase;color:#111}
.st-team-ctrl{display:flex;gap:.6rem}
.st-team-btn{display:grid;place-items:center;width:3.4rem;height:3.4rem;border:2px solid #111;border-radius:50%;background:transparent;color:#111;font-size:1.3rem;cursor:pointer;transition:background .25s,color .25s,transform .25s}
.st-team-btn:hover{background:#ff6b00;transform:translateY(-2px)}
.st-flip{transform:scaleX(-1)}
.st-team-track{display:flex;gap:1.5rem;padding:.5rem var(--gutter) 1.5rem;overflow-x:auto;scroll-snap-type:x proximity;scroll-padding-left:var(--gutter);scrollbar-width:none;cursor:grab;overscroll-behavior-x:contain}
.st-team-track::-webkit-scrollbar{display:none}
.st-team-track.is-drag{cursor:grabbing;scroll-snap-type:none;user-select:none}
.st-team-track:focus-visible{outline:3px solid #111;outline-offset:-3px;border-radius:24px}
.st-team-card{flex:0 0 clamp(230px,24vw,340px);scroll-snap-align:start;text-decoration:none;color:#111;user-select:none}
.st-team-photo{position:relative;display:grid;place-items:end center;aspect-ratio:3/4;overflow:hidden;border-radius:999px 999px 28px 28px;background:var(--accent,#ff6b00);border:3px solid #111;transition:transform .5s cubic-bezier(.22,1,.36,1),box-shadow .5s}
.st-team-card:hover .st-team-photo{transform:translateY(-8px);box-shadow:0 10px 0 #111}
.st-team-photo img{width:100%;height:100%;object-fit:cover;pointer-events:none}
.st-mascot{width:78%;height:auto;margin-bottom:10%;overflow:visible;pointer-events:none}
.st-team-card h3{margin:1.1rem 0 .15rem;font-size:clamp(1.15rem,1.7vw,1.5rem);line-height:1.15;color:#111}
.st-team-card p{margin:0;font:500 .72rem "IBM Plex Mono",monospace;letter-spacing:.14em;text-transform:uppercase;color:#656560}
.st-team-cta .st-team-photo{place-items:center;background:#111;color:#ff6b00;font-size:clamp(3rem,6vw,5rem);border-color:#111}
.st-team-cta:hover .st-team-photo{background:#ff6b00;color:#111}
.st-team-cta .st-team-photo span{display:grid;place-items:center;width:1.6em;height:1.6em;border:3px solid currentColor;border-radius:50%;transition:transform .45s cubic-bezier(.22,1,.36,1)}
.st-team-cta:hover .st-team-photo span{transform:rotate(45deg)}
.st-team-foot{display:flex;align-items:center;gap:2rem;max-width:1280px;margin:1.2rem auto 0;padding:0 1.5rem}
.st-team-bar{flex:1;height:4px;background:rgba(17,17,17,.12);border-radius:4px;overflow:hidden}
.st-team-bar i{display:block;height:100%;background:#ff6b00;border-radius:4px;transform-origin:left;transform:scaleX(.1);transition:transform .15s linear}

/* ---------- typographic statement band ---------- */
.st-statement{position:relative;padding:clamp(4rem,8vw,8rem) 0;text-align:center;overflow:clip}
.st-statement-lines{display:flex;flex-direction:column;align-items:center;margin-bottom:2.5rem}
.st-line{display:block;font:600 clamp(3rem,11vw,10rem)/.92 var(--font-display);letter-spacing:-.03em;text-transform:uppercase;white-space:nowrap;color:#111}
.st-line--b{color:transparent;-webkit-text-stroke:2px #111}
.st-line:nth-child(3){color:#ff6b00}

/* ---------- scroll-driven type scale (compositor-driven; no JS, no per-frame cost) ---------- */
@supports (animation-timeline: view()) {
  .st-line{animation:st-slide linear both;animation-timeline:view();animation-range:entry 0% cover 55%}
  .st-line--b{animation-name:st-slide-r}
  .fx-split{transform-origin:0 60%;animation:st-scale linear both;animation-timeline:view();animation-range:entry 0% cover 38%}
  :is(#bm,html) body #hero-section h1{transform-origin:0 50%;animation:st-hero linear both;animation-timeline:scroll(root);animation-range:0 70vh}
  .st-team-card{animation:st-card linear both;animation-timeline:view(x);animation-range:entry 0% entry 90%}
}
@keyframes st-slide{from{transform:translateX(-22vw) scale(.8);opacity:.2}to{transform:none;opacity:1}}
@keyframes st-slide-r{from{transform:translateX(22vw) scale(.8);opacity:.2}to{transform:none;opacity:1}}
@keyframes st-scale{from{scale:.84;opacity:.35}to{scale:1;opacity:1}}
@keyframes st-hero{to{scale:.86;opacity:.15;translate:0 -3vh}}
@keyframes st-card{from{opacity:.25;scale:.92}to{opacity:1;scale:1}}
@media (prefers-reduced-motion:reduce){.st-line,.fx-split,.st-team-card,#hero-section h1{animation:none!important}}

/* header layout no longer depends on Tailwind utilities: brand left, CTA + Menu right */
#header .container>.flex{display:flex;align-items:center;justify-content:space-between;gap:1rem}
#header .container>.flex>.flex:last-child{display:flex;align-items:center;gap:.5rem}
#header .container>.flex>.flex:first-child>a{display:flex;align-items:center;gap:.75rem}
@media (max-width:767px){#header a[href="contact.html"]{display:none}}

/* ---------- one rhythm for vertical spacing ---------- */
:root{--sec-y:clamp(4rem,7.2vw,6.5rem)}
/* CTA bands were fixed at h-[700px]/h-[800px]: let content decide, with one shared min-height */
:is(#bm,html) body>section:not(#hero-section)[class*="h-["]{height:auto!important;min-height:clamp(440px,62vh,640px);padding-block:var(--sec-y)}
/* tighter, even rhythm on phones (Tailwind py-32 = 128px is too tall at 390px) */
@media (max-width:640px){
  :is(#bm,html) body>section:not(#hero-section):not([class*="h-["]){padding-block:clamp(3.5rem,14vw,5rem)!important}
  .st-team,.st-statement,.st-faq,.kk-work{padding-block:clamp(3.5rem,14vw,5rem)!important}
}

/* every top-level section shares the same vertical padding */
:is(#bm,html) body>section:not(#hero-section):not(#filter-bar):not(.sticky):not([class*="h-["]),
:is(#bm,html) body.editorial-home>main>section:not(#hero-section):not([class*="h-["]){padding-block:var(--sec-y)!important}
.st-team,.st-statement,.st-faq,.kk-work{padding-block:var(--sec-y)!important}
/* shared content width: matches Tailwind .container (1280px) so edges line up page-wide */
.st-faq-wrap{max-width:980px}
.kk-wrap{max-width:1280px;padding-inline:1.5rem}
@media (min-width:1536px){.kk-wrap{max-width:1536px}}

/* headings never exceed their container: fluid sizes on tablet/phone + safe wrapping */
:is(#bm,html) body :is(h1,h2){overflow-wrap:break-word}
@media (max-width:1023px){
  :is(#bm,html) body section h2:is([class*="text-6xl"],[class*="text-7xl"],[class*="text-8xl"]){font-size:clamp(2rem,8.4vw,3.75rem)!important;line-height:1.08!important}
  .st-faq-title,.st-team-title{font-size:clamp(1.9rem,8vw,3.2rem)}
}

/* ---------- responsive header + menu ---------- */
.st-header-actions{display:flex;align-items:center;gap:.5rem}
/* the theme forces the header CTA to display:flex with !important — beat it on small screens */
@media (max-width:639px){:is(#bm,html) body #header a[href="contact.html"]{display:none!important}}
@media (max-width:480px){#header .st-menu-btn{padding:.65rem 1.05rem}}
/* menu fits any viewport height: type scales with height too, footer never falls off-screen */
.st-menu{height:100dvh;grid-template-rows:auto minmax(0,1fr) auto}
.st-menu-nav{padding-block:clamp(.5rem,3vh,2rem);overflow:visible}
.st-menu-link .t{font-size:clamp(2rem,min(7.4vw,9.4vh),5.6rem)}
.st-menu-ask{font-size:clamp(1rem,2vh + .6vw,1.7rem)}
@media (max-height:640px){.st-menu-foot{flex-direction:row;align-items:center}.st-menu-link{gap:.8rem}}
@media (max-width:560px){.st-menu-foot{flex-direction:column;align-items:flex-start}.st-menu-ask{max-width:none}}

/* ---------- flip team cards (front portrait -> back image) ---------- */
.st-team-card--flip{cursor:pointer;outline:none}
.st-team .st-team-card--flip .st-team-photo--flip{display:block;overflow:visible!important;background:none!important;border:0!important;border-radius:0!important;perspective:1100px;transition:transform .5s cubic-bezier(.22,1,.36,1)}
.st-team-flip{position:relative;width:100%;height:100%;transform-style:preserve-3d;transition:transform .8s cubic-bezier(.22,1,.36,1)}
.st-team-face{position:absolute;inset:0;overflow:hidden;backface-visibility:hidden;-webkit-backface-visibility:hidden;border:3px solid #111;border-radius:999px 999px 28px 28px;background:var(--accent,#ff6b00)}
.st-team-face img{display:block;width:100%;height:100%;object-fit:cover}
.st-team-back{transform:rotateY(180deg)}
.st-team-card--flip.is-flipped .st-team-flip{transform:rotateY(180deg)}
@media (hover:hover){.st-team-card--flip:hover .st-team-flip{transform:rotateY(180deg)}}
.st-team-card--flip:hover .st-team-photo--flip{transform:translateY(-8px);box-shadow:none}
.st-team-card--flip:hover .st-team-face{box-shadow:0 10px 0 #111}
.st-team-card--flip:focus-visible .st-team-face{outline:3px solid #111;outline-offset:4px}
@media (prefers-reduced-motion:reduce){.st-team-flip{transition:none}}
/* keep team artwork and case-study screens in full colour (editorial theme greyscales section images) */
body.editorial-page .st-team img,body.editorial-page #featured img{filter:none!important}
