/* ============================================================
   About-page components + glow trail
   Dark theme only — the light theme and its toggle were removed.
   ============================================================ */

/* ---- stats counter grid ---- */
.sg-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:20px}
.sg-stat{
  background:var(--object);border:1px solid var(--edge);border-radius:16px;
  padding:28px 24px;text-align:center;transform-style:preserve-3d;
  transition:border-color .25s ease,box-shadow .25s ease;
}
.sg-stat.is-tilting{border-color:rgba(255,107,0,.35);box-shadow:0 22px 50px rgba(0,0,0,.4)}
.sg-stat__num{
  display:block;font-family:var(--display);font-weight:800;
  font-size:clamp(1.9rem,4vw,2.6rem);letter-spacing:-.04em;color:var(--heading);
  line-height:1;margin-bottom:10px;font-variant-numeric:tabular-nums;
}
.sg-stat__label{
  font-family:var(--mono);font-size:.68rem;letter-spacing:.13em;
  text-transform:uppercase;color:var(--body);
}

/* ---- about CTA banner ---- */
.sg-cta-banner{
  position:relative;overflow:hidden;text-align:center;
  border:1px solid var(--edge);border-radius:22px;padding:56px 32px;
  background:radial-gradient(700px circle at 50% 0%,var(--ambient),transparent 62%),var(--object);
  transform-style:preserve-3d;
}
.sg-cta-banner h2{margin:0 auto 16px;max-width:16ch}
.sg-cta-banner__lede{color:var(--body);max-width:52ch;margin:0 auto 28px}
.sg-cta-banner__note{color:var(--body);font-size:.85rem;margin:20px 0 0}

/* ---- background glow trail ---- */
.sg-glow-trail{
  position:fixed;top:0;left:0;width:520px;height:520px;z-index:0;
  pointer-events:none;border-radius:50%;opacity:.85;
  background:radial-gradient(circle,var(--ambient) 0%,var(--ambient-soft) 38%,transparent 68%);
  will-change:transform;
}
.wrap,.nav,.footer{position:relative;z-index:1}

@media (prefers-reduced-motion:reduce){
  .sg-glow-trail{display:none}
  body,.card,.person,.leader,.quote,.sg-value,.sg-member,.sg-stat{transition:none}
}

/* ============================================================
   Cleanup pass — avatars, header, case-studies CTA, image pop
   ============================================================ */

/* ---- 1. avatar frame: photo fills it edge to edge ---- */
.sg-member__avatar,.avatar-box,.avatar-wrapper,.team-img-wrapper,.person__ph{
  width:100% !important;
  aspect-ratio:1/1 !important;          /* square: photos are square, so zero gap */
  height:auto !important;
  max-height:none !important;
  padding:0 !important;                 /* no inner gutter — the photo is the frame */
  margin:0 0 14px !important;
  border-radius:12px !important;
  background:#161922 !important;
  overflow:hidden !important;
  position:relative;flex:none;display:block;
  perspective:800px;
}
.sg-member__avatar img,.avatar-box img,.avatar-wrapper img,
.team-img-wrapper img,.person__ph img{
  width:100% !important;height:100% !important;
  object-fit:cover !important;
  object-position:center top !important;
  display:block !important;
  border-radius:12px !important;
  position:relative;
  transition:transform .4s cubic-bezier(.22,1,.36,1);
  will-change:transform;
}

/* leadership cards keep a taller frame */
.leader__ph{
  width:100% !important;aspect-ratio:1/1 !important;height:auto !important;
  padding:0 !important;margin:0 0 16px !important;
  border-radius:12px !important;background:#161922 !important;
  overflow:hidden !important;position:relative;flex:none;perspective:800px;
}
.leader__ph img{
  width:100% !important;height:100% !important;
  object-fit:cover !important;object-position:center top !important;
  display:block !important;border-radius:12px !important;position:relative;
  transition:transform .4s cubic-bezier(.22,1,.36,1);will-change:transform;
}

/* ---- 2. compact card + depth on hover ---- */
.sg-member,.person{
  padding:14px 14px 18px !important;
  border-radius:16px !important;
  transform-style:preserve-3d;
}
.sg-member__name,.person h3{margin:4px 0 5px !important;font-size:1rem !important}
.sg-member__role,.person .person__role{font-size:.64rem !important;line-height:1.45 !important}
.sg-member .li-icon,.person .li-icon{margin-top:12px !important;width:32px;height:32px}

.sg-member:hover .sg-member__avatar img,
.sg-member.is-tilting .sg-member__avatar img,
.person:hover .person__ph img,
.person.is-tilting .person__ph img,
.leader:hover .leader__ph img,
.leader.is-tilting .leader__ph img{
  transform:scale(1.03) translateZ(20px);
}

/* the roster itself: tighter columns so cards scale down with the image */
.sg-roster,.grid--4{
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr)) !important;
  gap:18px !important;
}

/* ---- 3. header: permanently dark, no grey bleed ---- */
.header{
  background:#111216 !important;                 /* solid, not translucent */
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  border-bottom:1px solid rgba(255,255,255,.08) !important;
  box-shadow:0 1px 0 rgba(255,255,255,.03),0 14px 32px rgba(0,0,0,.45) !important;
}
.header,.header a,.header .nav__link{color:var(--body)}
.header .nav__link.is-active,.header .nav__link:hover{color:#FFFFFF}
.header .brand,.header .brand *{color:#FFFFFF}
.header .btn--primary{color:#111216}
/* dropdown panels inherit the same solid surface */
.header .nav__panel,.header .nav__drop{background:#15171C !important;backdrop-filter:none !important}

/* ---- 4. case studies CTA, centred under the grid ---- */
.sg-case-cta{
  display:flex;justify-content:center;
  margin:32px auto 0;
  text-align:center;
}
.sg-case-cta .btn{display:inline-flex}

@media (prefers-reduced-motion:reduce){
  .sg-member__avatar img,.avatar-box img,.avatar-wrapper img,
  .person__ph img,.leader__ph img{transition:none}
  .sg-member:hover .sg-member__avatar img,
  .person:hover .person__ph img,
  .leader:hover .leader__ph img{transform:none}
}

/* ============================================================
   ROUND 4 — fluid layout, team image fix, 3D interaction
   Appended block. Drop-in: nothing above this line was changed.
   Load order matters: this file must come AFTER style.css.
   ============================================================ */

/* ---- 4.0 fluid scale tokens ------------------------------------ */
:root{
  --shell:1600px;                 /* upper bound on big monitors */
  --shell-w:90%;                  /* breathing room either side   */
  --gutter:clamp(16px,3vw,48px);
  --pad-y:clamp(48px,7vw,120px);  /* replaces the fixed 96px      */
  --gap:clamp(14px,1.4vw,26px);
  --card-min:280px;               /* auto-fit floor for all grids  */
}

/* ---- 4.1 fluid container -------------------------------------- */
.wrap{
  width:var(--shell-w) !important;
  max-width:var(--shell) !important;
  margin-inline:auto !important;
  padding-inline:var(--gutter) !important;
}
.wrap--narrow{width:min(92%,820px) !important;max-width:820px !important}
/* header and footer share .wrap, so they widen with the page */
.header__inner{gap:clamp(12px,2vw,32px)}

/* ---- 4.2 fluid typography and rhythm -------------------------- */
html{font-size:clamp(15px,0.55vw + 13.4px,18px)}   /* 4K bumps the rem base */
h1{font-size:clamp(2.1rem,1.4rem + 2.6vw,4.2rem) !important;line-height:1.06}
h2{font-size:clamp(1.7rem,1.15rem + 1.7vw,2.9rem) !important;line-height:1.14}
h3{font-size:clamp(1.1rem,.98rem + .45vw,1.45rem) !important}
h5{font-size:clamp(.9rem,.86rem + .2vw,1.05rem)}
body{font-size:clamp(.95rem,.9rem + .22vw,1.08rem);line-height:1.7}
.lede{font-size:clamp(1rem,.95rem + .45vw,1.3rem) !important;max-width:64ch}
.eyebrow{font-size:clamp(.62rem,.6rem + .1vw,.75rem)}
.btn{
  font-size:clamp(.85rem,.82rem + .18vw,1rem) !important;
  padding:clamp(11px,.7vw + 8px,17px) clamp(20px,1.6vw + 14px,34px) !important;
}
.btn--sm{padding:clamp(9px,.5vw + 7px,13px) clamp(16px,1.1vw + 11px,24px) !important}
.section{padding:var(--pad-y) 0 !important}
.section--tight{padding:calc(var(--pad-y) * .62) 0 !important}
.banner{padding:clamp(48px,6vw,96px) 0 clamp(38px,4.6vw,72px) !important}

/* ---- 4.3 flexible grids: column count follows the viewport ----- */
.grid,
.grid--2,.grid--3,.grid--4,
.sg-roster,.team-grid,
.sg-values,.values-grid,
.case-studies-grid,.sg-cases,
.footer__grid{
  display:grid !important;
  gap:var(--gap) !important;
}
.grid--2{grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr)) !important}
.grid--3,.case-studies-grid,.sg-cases,
.sg-values,.values-grid{
  grid-template-columns:repeat(auto-fit,minmax(min(100%,var(--card-min)),1fr)) !important;
}
.grid--4,.sg-roster,.team-grid{
  grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)) !important;
}
.footer__grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)) !important}
/* hard cap so 4K does not produce 8 hairline columns */
@media (min-width:1900px){
  .grid--3,.case-studies-grid,.sg-cases,.sg-values,.values-grid{
    grid-template-columns:repeat(3,1fr) !important;
  }
  .grid--4,.sg-roster,.team-grid{grid-template-columns:repeat(4,1fr) !important}
}

/* ---- 4.4 team page: photo fills the frame, zero inner gap ------ */
.sg-member__avatar,.avatar-box,.avatar-wrapper,.team-img-wrapper,.person__ph{
  width:100% !important;
  aspect-ratio:1/1 !important;          /* swap to 4/5 for portraits */
  height:auto !important;
  padding:0 !important;
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
  margin:0 0 clamp(8px,.8vw,14px) !important;
  border-radius:12px !important;
  background:var(--object-2) !important;
  overflow:hidden !important;
  display:block !important;
  position:relative;
  isolation:isolate;
  perspective:900px;
}
.sg-member__avatar img,.avatar-box img,.avatar-wrapper img,
.team-img-wrapper img,.person__ph img{
  width:100% !important;
  height:100% !important;
  display:block !important;
  object-fit:cover !important;
  object-position:center top !important;
  border:0 !important;
  border-radius:12px !important;
  transform-origin:center top;
  transition:transform .45s cubic-bezier(.22,1,.36,1),filter .45s ease;
  will-change:transform;
}

/* compact card: less dead vertical space */
.sg-member,.person,.team-card{
  padding:clamp(10px,.8vw,14px) clamp(10px,.8vw,14px) clamp(14px,1.1vw,18px) !important;
  border-radius:16px !important;
  text-align:center;
  transform-style:preserve-3d;
}
.sg-member__name,.person h3,.team-card h3{
  margin:clamp(4px,.4vw,8px) 0 4px !important;
  font-size:clamp(.95rem,.9rem + .2vw,1.1rem) !important;
  line-height:1.25 !important;
}
.sg-member__role,.person .person__role,.team-card .role{
  font-size:clamp(.6rem,.58rem + .1vw,.7rem) !important;
  line-height:1.45 !important;
  margin-bottom:0 !important;
}
.sg-member .li-icon,.person .li-icon{margin-top:clamp(8px,.8vw,12px) !important}

/* ---- 4.5 3D tilt depth + headshot lift ------------------------- */
.sg-tilt,.sg-member,.person,.leader,.card,.sg-value,.team-card{
  transform-style:preserve-3d;
  transition:transform .35s cubic-bezier(.22,1,.36,1),
             border-color .25s ease,
             box-shadow .35s ease;
}
/* JS writes --rx / --ry; this is the fallback when JS is idle */
.sg-tilt.is-tilting,.sg-member.is-tilting,.person.is-tilting,
.leader.is-tilting,.card.is-tilting,.sg-value.is-tilting,.team-card.is-tilting{
  transform:perspective(1000px)
            rotateX(var(--rx,0deg))
            rotateY(var(--ry,0deg))
            translateZ(10px);
  border-color:rgba(255,107,43,.45) !important;
  box-shadow:0 26px 60px rgba(0,0,0,.5),0 0 0 1px rgba(255,107,43,.18) !important;
}
/* specular sheen that follows the pointer */
.sg-member,.person,.team-card,.card,.leader,.sg-value{position:relative}
.sg-member::after,.person::after,.team-card::after{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:radial-gradient(320px circle at var(--mx,50%) var(--my,0%),
             rgba(255,107,43,.14),transparent 62%);
  opacity:0;transition:opacity .3s ease;z-index:2;
}
.sg-member.is-tilting::after,.person.is-tilting::after,.team-card.is-tilting::after{opacity:1}

/* headshot scale lift */
.sg-member:hover .sg-member__avatar img,
.sg-member.is-tilting .sg-member__avatar img,
.sg-member:hover .avatar-box img,
.person:hover .person__ph img,
.person.is-tilting .person__ph img,
.team-card:hover .team-img-wrapper img,
.leader:hover .leader__ph img,
.leader.is-tilting .leader__ph img{
  transform:scale(1.03) translateZ(24px);
  filter:saturate(1.06);
}

/* ---- 4.6 small screens: kill the 3D, keep it flat and fast ----- */
@media (hover:none),(max-width:640px){
  .sg-tilt,.sg-member,.person,.leader,.card,.sg-value,.team-card{transform:none !important}
  .sg-member::after,.person::after,.team-card::after{display:none}
  .wrap{width:100% !important}
  .sg-roster,.team-grid,.grid--4{
    grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr)) !important;
  }
}
@media (prefers-reduced-motion:reduce){
  .sg-tilt,.sg-member,.person,.leader,.card,.sg-value,.team-card,
  .sg-member__avatar img,.avatar-box img,.person__ph img,.leader__ph img{
    transition:none !important;transform:none !important;
  }
}

/* ---- 4.7 stop horizontal overflow at any width ----------------- */
html,body{max-width:100%;overflow-x:hidden}
img,svg,video{max-width:100%;height:auto}
