/* Motion and glass layer for every page. Content stays visible without JS; motion.js adds .js-motion
   only when the browser supports it and the visitor has not asked for reduced motion. */

@view-transition{navigation:auto}
::view-transition-old(root),::view-transition-new(root){animation-duration:.35s}

@keyframes rise{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}
@keyframes settle{from{transform:scale(1.08)}to{transform:scale(1)}}
@keyframes drift{0%,100%{transform:translate(0,0) scale(1)}50%{transform:translate(-6%,4%) scale(1.12)}}
@keyframes shine{from{transform:translateX(-120%) skewX(-20deg)}to{transform:translateX(220%) skewX(-20deg)}}

/* scroll reveal */
.js-motion .reveal{opacity:0;transform:translateY(26px);transition:opacity .7s cubic-bezier(.2,.7,.2,1),transform .7s cubic-bezier(.2,.7,.2,1);transition-delay:calc(var(--d,0) * 80ms)}
.js-motion .reveal.in{opacity:1;transform:none}

/* first-screen entrance */
.js-motion .enter{animation:rise .8s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--d,0) * 110ms + 120ms)}
.js-motion .hero-photo img{animation:settle 2.4s cubic-bezier(.2,.7,.2,1) both}

/* ambient glow behind the homepage hero and page mastheads */
.hero::before,.mast::after{content:"";position:absolute;width:60vw;height:60vw;max-width:820px;max-height:820px;right:-14vw;top:-22vw;border-radius:50%;
  background:radial-gradient(circle,#2f80ff2e 0%,transparent 62%);pointer-events:none;z-index:0;animation:drift 18s ease-in-out infinite}
.hero .wrap,.mast .wrap{z-index:1}

/* header gains depth once the page scrolls */
.top{transition:box-shadow .3s,background .3s}
.top.scrolled{box-shadow:0 10px 30px #0008;background:color-mix(in srgb,#050608 96%,transparent)}

/* cards: lift, and a soft light that follows the pointer */
.card{position:relative;isolation:isolate}
@media (hover:hover) and (pointer:fine){
  .card::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:-1;opacity:0;transition:opacity .3s;
    background:radial-gradient(420px circle at var(--mx,50%) var(--my,50%),#2f80ff1f,transparent 60%)}
  .card:hover::after{opacity:1}
}
.svc,.tile,.talk,.step,.entry,.fw-col,.rel{transition:transform .35s cubic-bezier(.2,.7,.2,1),box-shadow .35s}
.svc:hover,.tile:hover,.talk:hover,.step:hover,.rel:hover{transform:translateY(-6px)}

/* buttons: light sweep on hover */
.btn{position:relative;overflow:hidden}
.btn::before{content:"";position:absolute;inset:0 auto 0 0;width:40%;background:linear-gradient(90deg,transparent,#ffffff40,transparent);transform:translateX(-120%) skewX(-20deg);pointer-events:none}
.btn:hover::before{animation:shine .8s ease}

/* icons and chips respond to hover */
.svc-ico,.sector svg,.socials a{transition:transform .35s cubic-bezier(.2,.7,.2,1),background .2s,color .2s}
.svc:hover .svc-ico,.svc-block:hover .svc-ico{transform:rotate(-8deg) scale(1.08)}
.socials a:hover{transform:translateY(-3px)}
.chip,.sector{transition:transform .25s,box-shadow .25s}
.chip:hover,.sector:hover{transform:translateY(-3px)}

/* timeline dots light up as each entry arrives */
.entry::before{transition:background .5s .2s,box-shadow .5s .2s}
.entry.in::before{background:var(--horizon);box-shadow:0 0 0 6px #2f80ff26}

/* reading progress on articles */
.progress{position:fixed;left:0;top:env(safe-area-inset-top,0px);height:3px;width:100%;transform-origin:0 50%;transform:scaleX(var(--p,0));background:linear-gradient(90deg,var(--horizon),#f5a023);z-index:70;pointer-events:none}

@media (prefers-reduced-motion:reduce){
  .hero::before,.mast::after{animation:none}
  .btn:hover::before{animation:none}
  ::view-transition-old(root),::view-transition-new(root){animation:none}
}

/* ---------- glass ----------
   Frosted, translucent surfaces over a faint fixed glow, so the blur has colour to work with.
   "html" prefixes outrank the homepage's inline styles, which load after this file. */
html body{background:
  radial-gradient(42vw 42vw at 88% 18%,#2f80ff1c,transparent 70%),
  radial-gradient(36vw 36vw at 6% 62%,#f5a02312,transparent 70%),
  radial-gradient(48vw 48vw at 60% 110%,#2f80ff14,transparent 70%),
  var(--ink);background-attachment:fixed}

html .card,html .callout,html .tbl,html .author,html .rel{
  background:linear-gradient(150deg,rgba(40,47,60,.62),rgba(22,26,33,.48));
  -webkit-backdrop-filter:blur(16px) saturate(150%);backdrop-filter:blur(16px) saturate(150%);
  border:1px solid rgba(255,255,255,.07);
  box-shadow:var(--raised),inset 0 1px 0 rgba(255,255,255,.07)}
html .svc:hover,html .card:hover{background:linear-gradient(150deg,rgba(47,128,255,.12),rgba(22,26,33,.5))}
html .tabs.card:hover,html .c-form:hover,html .c-card:hover{background:linear-gradient(150deg,rgba(40,47,60,.62),rgba(22,26,33,.48))}
html .cta-band{background:radial-gradient(80% 140% at 100% 0%,rgba(13,47,120,.45),transparent 60%),linear-gradient(150deg,rgba(40,47,60,.62),rgba(22,26,33,.48))}
html .tab[aria-selected="true"]{background:rgba(255,255,255,.06);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}

/* header and mobile menu */
html .top{background:rgba(5,6,8,.5);-webkit-backdrop-filter:blur(18px) saturate(160%);backdrop-filter:blur(18px) saturate(160%);border-bottom:1px solid rgba(255,255,255,.08)}
html .top.scrolled{background:rgba(5,6,8,.68)}
/* nested inside the blurred header, so its own blur cannot reach the page: keep it nearly opaque */
html .menu nav{background:rgba(22,26,33,.95);-webkit-backdrop-filter:blur(20px) saturate(160%);backdrop-filter:blur(20px) saturate(160%);border:1px solid rgba(255,255,255,.1)}
html .menu summary{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.08)}

/* small glass pieces over photos and glows */
html .cred,html .socials a,html .chip,html .sector{background:rgba(255,255,255,.05);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.09)}
html .sector{box-shadow:none}
/* footer link hover turns text blue; keep social icons white on their blue hover square */
html .socials a:hover{background:var(--horizon);color:#fff;border-color:transparent}
html .about-badge{background:rgba(5,6,8,.5);-webkit-backdrop-filter:blur(14px) saturate(150%);backdrop-filter:blur(14px) saturate(150%);border:1px solid rgba(255,255,255,.12)}
html .cover small{background:rgba(5,6,8,.42);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-color:rgba(255,255,255,.18)}
html .btn-line{background:rgba(255,255,255,.04);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
html .when{background:rgba(47,128,255,.08);box-shadow:none;border:1px solid rgba(47,128,255,.25)}
html .field input,html .field select,html .field textarea{background:rgba(5,6,8,.45);box-shadow:inset 0 1px 0 rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08)}
html .field input:focus,html .field select:focus,html .field textarea:focus{border-color:var(--horizon)}

@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  html .card,html .callout,html .tbl,html .author,html .rel{background:rgba(27,31,38,.94)}
  html .top{background:rgba(5,6,8,.94)}
  html .menu nav{background:rgba(27,31,38,.98)}
}
