/* =========================================================
   AV — Anna Vanderpool Portfolio
   Design tokens + global styles
   ========================================================= */

:root{
  --ink:#273043;
  --ink-soft: rgba(39,48,67,0.7);
  --ink-line: rgba(39,48,67,0.14);
  --yellow:#f3c969;
  --pink:#f3ddd8;
  --green:#81df9b;
  --purple:#8583dd;
  --cream:#fdf9f2;
  --white:#ffffff;
  --red:#ee4524;

  --disp:'DM Sans', 'Inter', sans-serif;
  --body:'Inter', sans-serif;

  --maxw:1240px;
  --edge: clamp(20px, 5vw, 78px);
  --radius: 8px;
  --bounce: cubic-bezier(.34,1.56,.64,1);
  --ease: cubic-bezier(.16,1,.3,1);
}

*, *::before, *::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  position:relative;
  margin:0;
  background:var(--cream);
  color:var(--ink);
  font-family:var(--body);
  font-size:16px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
h1,h2,h3,h4{ font-family:var(--disp); font-weight:700; margin:0; letter-spacing:-0.01em; }
p{ margin:0; }
a{ color:inherit; text-decoration:none; }
img{ display:block; max-width:100%; }
button{ font:inherit; cursor:pointer; background:none; border:0; color:inherit; }
ul{ margin:0; padding:0; list-style:none; }
:focus-visible{ outline:2.5px solid var(--ink); outline-offset:3px; }
::selection{ background:var(--yellow); color:var(--ink); }

.wrap{ max-width:var(--maxw); margin:0 auto; padding:0 var(--edge); position:relative; }
.eyebrow{
  font-family:var(--body); font-weight:700; font-size:13px; letter-spacing:0.08em; text-transform:uppercase;
  color:var(--ink); opacity:0.55;
}
.visually-hidden{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* ---------- Ambient body glow — gentle drift, whole page ---------- */
.ambient-glow{
  position:fixed; inset:0; z-index:-1; overflow:hidden; pointer-events:none;
}
.ambient-glow::before{
  content:"";
  position:absolute; top:-10%; right:-14%; width:62vw; height:62vw; max-width:900px; max-height:900px;
  background:radial-gradient(circle, rgba(243,201,105,0.55), rgba(243,201,105,0) 68%);
  animation:ambient-drift 34s ease-in-out infinite;
}
@keyframes ambient-drift{
  0%,100%{ transform:translate(0,0) scale(1); }
  25%{ transform:translate(-6vw,4vw) scale(1.08); }
  50%{ transform:translate(-2vw,10vw) scale(0.96); }
  75%{ transform:translate(5vw,3vw) scale(1.04); }
}

/* ---------- Reveal-on-scroll (fade up) ---------- */
.reveal{
  opacity:0; transform:translateY(28px);
  transition:opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in{ opacity:1; transform:translateY(0); }
.reveal-group .reveal-item{
  opacity:0; transform:translateY(24px);
  transition:opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal-group.in .reveal-item{ opacity:1; transform:translateY(0); }
.reveal-group.in .reveal-item:nth-child(1){ transition-delay:.05s; }
.reveal-group.in .reveal-item:nth-child(2){ transition-delay:.14s; }
.reveal-group.in .reveal-item:nth-child(3){ transition-delay:.23s; }
.reveal-group.in .reveal-item:nth-child(4){ transition-delay:.32s; }
.reveal-group.in .reveal-item:nth-child(5){ transition-delay:.41s; }
@media (prefers-reduced-motion:reduce){
  *{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; scroll-behavior:auto !important; }
  .reveal, .reveal-item{ opacity:1 !important; transform:none !important; }
}

/* =========================================================
   Buttons
   ========================================================= */
.btn{
  position:relative;
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  font-family:var(--body); font-weight:700; font-size:16px;
  padding:14px 34px; border-radius:100px;
  background:var(--ink); color:var(--white);
  border:2px solid var(--ink);
  transition:transform .3s var(--bounce), box-shadow .3s ease;
  white-space:nowrap;
}
.btn:hover{ transform:translateY(-3px); box-shadow:0 12px 26px rgba(39,48,67,0.28); }
.btn .arrow{ transition:transform .25s ease; display:inline-block; }
.btn:hover .arrow{ transform:translateX(4px); }
.btn.alt{ background:var(--green); color:var(--ink); border-color:var(--ink); }
.btn.alt:hover{ box-shadow:0 12px 26px rgba(129,223,155,0.55); }
.btn.ghost{ background:transparent; color:var(--ink); }
.btn.small{ padding:10px 22px; font-size:14px; }


.icon-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px; border-radius:100px;
  background:var(--white); color:var(--ink); border:2px solid transparent;
  transition:transform .3s var(--bounce), background .25s ease, color .25s ease, border-color .25s ease;
}
.icon-btn:hover{ background:var(--ink); color:var(--white); border-color:var(--white); transform:translateY(-3px); }
.icon-btn svg{ width:19px; height:19px; }
.pill-btn{
  display:inline-flex; align-items:center; gap:10px;
  background:var(--white); color:var(--ink); font-weight:700; font-size:15px;
  padding:12px 22px; border-radius:100px; border:2px solid transparent;
  transition:transform .3s var(--bounce), box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
.pill-btn:hover{ transform:translateY(-2px); background:var(--ink); color:var(--white); border-color:var(--white); }
.pill-btn svg{ width:18px; height:18px; }

/* ---------- Hand-drawn stroke button (hero) ---------- */
.btn-hand{
  position:relative; display:inline-flex; align-items:center; justify-content:center;
  width:249px; height:54px;
  margin-top:22px; padding:0 20px; font-family:var(--body); font-weight:700; font-size:16px;
  color:var(--ink); background:transparent; z-index:1;
}
.btn-hand .hand-fill{
  position:absolute; left:20; top:0; width:220px; height:54px; z-index:-2;
  background:var(--yellow); border-radius:2px;
  transform:translate(12px,-12px);
  transition:transform .25s ease-in-out;
}
.btn-hand:hover .hand-fill{ transform:translate(0,0); }
.btn-hand .hand-stroke{
  position:absolute; inset:0; z-index:-1;
  background:url('../images/button-outline.svg') no-repeat center / 100% 100%;
}
.btn-hand .label{ position:relative; }

/* =========================================================
   Header / nav
   ========================================================= */
.site-header{
  position:sticky; top:0; z-index:300;
  padding:18px 0;
}
.site-header::before{
  content:"";
  position:absolute; inset:-1px 0 -40px; z-index:-1;
  background:linear-gradient(180deg, rgba(253,249,242,0.92) 0%, rgba(253,249,242,0.55) 55%, rgba(253,249,242,0) 100%);
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  -webkit-mask-image:linear-gradient(180deg, black 0%, black 55%, transparent 100%);
  mask-image:linear-gradient(180deg, black 0%, black 55%, transparent 100%);
}
.site-header .wrap{ display:flex; align-items:center; justify-content:space-between; gap:24px; }
.logo-mark{ font-family:var(--disp); font-weight:800; font-size:22px; letter-spacing:-0.02em; display:flex; align-items:center; gap:8px; }
.nav-links{ display:flex; align-items:center; gap:4px; }
.nav-link{
  font-weight:600; font-size:15px; padding:10px 16px;
  opacity:1; transition:opacity .25s ease;
}
.nav-link:hover{ opacity:0.5; }
.nav-cta{
  margin-left:8px; background:var(--green); color:var(--ink); font-weight:700; font-size:15px;
  padding:11px 24px; border-radius:6px;
  transition:transform .3s var(--bounce), box-shadow .3s ease;
}
.nav-cta:hover{ transform:translateY(-2px); box-shadow:0 10px 22px rgba(129,223,155,0.55); }
.nav-toggle{ display:none; padding:8px; }
.nav-toggle span{ display:block; width:24px; height:2.5px; border-radius:2px; background:var(--ink); margin:5px 0; transition:transform .3s ease, opacity .3s ease; }

@media (max-width:900px){
  .nav-links{
    position:fixed; inset:0 0 0 auto; height:100dvh; width:min(320px,84vw);
    background:var(--cream); flex-direction:column; align-items:stretch; justify-content:center;
    gap:6px; padding:0 32px; transform:translateX(100%); transition:transform .45s var(--bounce);
    box-shadow:-14px 0 40px rgba(39,48,67,0.14); z-index:250;
  }
  .nav-links.open{ transform:translateX(0); }
  .nav-link{ font-size:20px; padding:14px 12px; }
  .nav-cta{ margin:14px 12px 0; text-align:center; }
  .nav-toggle{ display:block; z-index:260; }
  .nav-toggle.open span:nth-child(1){ transform:translateY(7.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2){ opacity:0; }
  .nav-toggle.open span:nth-child(3){ transform:translateY(-7.5px) rotate(-45deg); }
  .nav-scrim{
    position:fixed; inset:0; background:rgba(39,48,67,0.35); z-index:240;
    opacity:0; pointer-events:none; transition:opacity .35s ease;
  }
  .nav-scrim.open{ opacity:1; pointer-events:auto; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero{
  position:relative;
  /* pull the section up behind the sticky header so the pink gradient
     starts at the true top of the screen, visible through the header's blur */
  margin-top:-82px;
  padding:calc(clamp(56px,10vw,110px) + 82px) 0 clamp(28px,3vw,40px);
  overflow:hidden;
  background:linear-gradient(180deg, var(--pink) 0%, rgba(253,249,242,0) 62%);
}
.hero-inner{
  position:relative; z-index:1;
  display:grid; grid-template-columns:minmax(220px,320px) 1fr; gap:clamp(40px,6vw,80px);
  align-items:center;
}
.hero-portrait-wrap{ position:relative; width:100%; max-width:300px; justify-self:center; }
.hero-portrait-frame{
  position:relative;
  width:100%; aspect-ratio:248/246; overflow:visible;
}
.hero-portrait-frame::after{
  content:"";
  position:absolute; inset:0; z-index:0; pointer-events:none;
  background:url('../images/line-stoke-box.svg') no-repeat center / 100% 100%;
}
.hero-portrait-frame img{
  position:absolute; left:28px; bottom:-6px; width:80%; height:auto; max-height:120%; z-index:1;
  object-fit:contain; object-position:bottom;
}
.hero-deco{ position:absolute; z-index:2; }
.hero-deco.martini{ width:76px; left:-38px; top:-34px; transform:rotate(-18deg); animation:float-a 6s ease-in-out infinite; }
.hero-deco.controller{ width:88px; right:-32px; top:48%; transform:translateY(-50%); animation:float-b 7s ease-in-out infinite; }
@keyframes float-a{ 0%,100%{ transform:rotate(-18deg) translateY(0); } 50%{ transform:rotate(-14deg) translateY(-8px); } }
@keyframes float-b{ 0%,100%{ transform:translateY(-50%) rotate(0deg); } 50%{ transform:translateY(calc(-50% - 10px)) rotate(3deg); } }

.hero-text h1{
  font-size:clamp(2.1rem, 4.6vw, 3.6rem); line-height:1.08; margin-bottom:18px;
}
.hero-text .lede{ font-size:clamp(1.05rem, 1.7vw, 1.35rem); color:var(--ink-soft); max-width:46ch; margin-bottom:6px; }

/* =========================================================
   Brand strip ("header bottom") — solid, no eyebrow
   ========================================================= */
.brands{ padding:clamp(30px,5vw,54px) 0; position:relative; z-index:1; background:none; }
.brands-row{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:center;
  gap:clamp(28px,5vw,56px);
}
.brands-row img{
  max-height:46px; width:auto; max-width:150px;
  filter:grayscale(1) opacity(1);
  transition:filter .3s ease, transform .3s ease;
}
.brands-row img:hover{ filter:grayscale(0) opacity(1); transform:translateY(-2px); }

/* =========================================================
   #works — sticky stacked case-study cards
   Each .work-card is position:sticky with a slightly larger top offset
   and z-index than the one before it, so as you scroll, each new card
   slides up and settles over the previous one, leaving a peek of it
   behind — full-bleed photography throughout, no scroll-jacking JS.
   ========================================================= */
.works{ padding:clamp(20px,2vw,30px) 0 clamp(30px,4vw,54px); }
.work-head{ text-align:center; max-width:640px; margin:0 auto clamp(36px,6vw,56px); }
.work-head h2{ font-size:clamp(1.9rem,4vw,2.7rem); margin-bottom:14px; }
.work-head p{ color:var(--ink-soft); font-size:1.05rem; }

.tag{
  display:inline-block; font-weight:700; font-size:13px;
  padding:4px 14px; border-radius:100px; color:var(--white);
  text-transform:capitalize;
}

.work-stack{ display:flex; flex-direction:column; gap:clamp(28px,5vw,48px); padding:6px 0 10px; }
.work-card{
  position:sticky;
  display:block; overflow:hidden; border-radius:28px;
  min-height:min(76vh, 720px);
  isolation:isolate;
}
.work-card:nth-child(1){ top:96px; z-index:1; }
.work-card:nth-child(2){ top:96px; z-index:2; }
.work-card:nth-child(3){ top:128px; z-index:3; }
.work-card:nth-child(4){ top:160px; z-index:4; }
.work-card:nth-child(5){ top:192px; z-index:5; }
.work-card:nth-child(6){ top:224px; z-index:6; }

.card-bg{
  position:absolute; inset:0; background-size:cover; background-position:center;
  transform:scale(1.01); transition:transform .6s var(--ease);
}
.work-card:hover .card-bg{ transform:scale(1.05); }
.card-scrim{
  position:absolute; inset:0;
  background:linear-gradient(0deg, rgba(39,48,67,0.92) 0%, rgba(39,48,67,0.5) 42%, rgba(39,48,67,0.02) 66%);
}
.card-content{
  position:relative; z-index:1; height:100%; min-height:inherit;
  display:flex; flex-direction:column; justify-content:flex-end; gap:12px;
  padding:clamp(22px,4vw,44px); color:var(--white);
}
.card-content .tag{ align-self:flex-start; }
.card-content h3{ font-size:clamp(1.5rem,3vw,2.15rem); }
.card-content .desc{ max-width:56ch; color:rgba(255,255,255,0.86); font-size:15.5px; }
.card-content .btn.small{
  align-self:flex-start; margin-top:4px; padding:11px 26px; font-size:14.5px; border-radius:2px;
  background:var(--white); color:var(--ink); border-color:var(--white);
}
.card-content .btn.small:hover{ background:var(--yellow); border-color:var(--yellow); }

@media (max-width:720px){
  .work-card{ min-height:min(66vh,560px); border-radius:20px; }
  .work-card:nth-child(1){ top:16px; }
  .work-card:nth-child(2){ top:16px; }
  .work-card:nth-child(3){ top:40px; }
  .work-card:nth-child(4){ top:64px; }
  .work-card:nth-child(5){ top:88px; }
  .work-card:nth-child(6){ top:112px; }
}

/* ---------- All-works index page ---------- */
.allworks-hero{
  margin-top:-82px;
  padding:calc(clamp(56px,9vw,110px) + 82px) 0 clamp(20px,3vw,30px);
  background:linear-gradient(180deg, var(--pink) 0%, rgba(253,249,242,0) 68%);
  text-align:center;
  position:relative;
}
.allworks-hero h1{ font-size:clamp(2.2rem,5vw,3.2rem); margin-bottom:16px; }
.allworks-hero p{ max-width:680px; margin:0 auto; color:var(--ink-soft); font-size:1.05rem; }
.allworks-card{ position:relative; display:block; border-radius:20px; overflow:hidden; background:var(--pink); }
.allworks-card .ac-img-wrap{ overflow:hidden; }
.allworks-card img{ width:100%; aspect-ratio:4/3; object-fit:cover; display:block; transition:transform .5s var(--ease); }
.allworks-card:hover img{ transform:scale(1.04); }
.allworks-card .ac-body{ padding:20px 22px 26px; }
.allworks-card .tag{ margin-bottom:10px; }
.allworks-card h3{ font-size:1.25rem; margin-bottom:8px; }
.allworks-card p{ color:var(--ink-soft); font-size:14.5px; }

/* ---------- "Done for fun" Pinterest-style gallery wall ---------- */
.fun-gallery{
  column-count:4; column-gap:18px;
  padding:clamp(20px,4vw,40px) 0 clamp(60px,8vw,90px);
}
.fun-item{
  display:block; break-inside:avoid; margin-bottom:18px;
  border-radius:14px; overflow:hidden; background:var(--pink);
  aspect-ratio:1/1;
}
.fun-item img{
  width:100%; height:100%; object-fit:cover; display:block;
  transition:transform .5s var(--ease); cursor:zoom-in;
}
.fun-item:hover img{ transform:scale(1.035); }
@media (max-width:980px){ .fun-gallery{ column-count:3; } }
@media (max-width:720px){ .fun-gallery{ column-count:2; column-gap:12px; } .fun-item{ margin-bottom:12px; border-radius:10px; } }
@media (max-width:480px){ .fun-gallery{ column-count:2; } }

/* ---------- "Browse all works" CTA banner (homepage) ---------- */
.allworks-cta{ padding:clamp(10px,2vw,20px) 0 clamp(30px,4vw,40px); }
.cta-panel{
  display:flex; align-items:center; justify-content:space-between; gap:28px; flex-wrap:wrap;
  background:var(--ink); color:var(--white); border-radius:24px;
  padding:clamp(28px,4vw,48px);
}
.cta-panel .eyebrow{ color:var(--green); opacity:1; }
.cta-panel h2{ font-size:clamp(1.5rem,3vw,2.1rem); margin:8px 0 10px; }
.cta-panel p{ color:rgba(255,255,255,0.72); max-width:52ch; }
.cta-panel .btn{ flex-shrink:0; }

/* =========================================================
   About
   ========================================================= */
.about{ padding:clamp(26px,3vw,40px) 0; }
.about-grid{
  display:grid; grid-template-columns:0.92fr 1.08fr; gap:clamp(40px,6vw,70px);
  align-items:center;
}
.collage{ position:relative; aspect-ratio:1/1; max-width:460px; }
.collage img{
  position:absolute; object-fit:cover; border:7px solid var(--white);
  border-radius:8px;
}
.collage img:nth-child(1){ width:46%; height:52%; left:0; top:8%; z-index:2; }
.collage img:nth-child(2){ width:44%; height:50%; right:0; top:0; z-index:1; }
.collage img:nth-child(3){ width:40%; height:46%; left:6%; bottom:0; z-index:3; }
.collage img:nth-child(4){ width:42%; height:44%; right:2%; bottom:6%; z-index:2; }
.collage img:nth-child(5){ width:34%; height:36%; left:32%; top:34%; z-index:4; }

.about-text .greeting{
  font-family:var(--disp); font-weight:700; font-size:clamp(1.1rem,1.8vw,1.35rem);
  color:var(--ink-soft); margin-bottom:2px;
}
.about-text h2{ font-size:clamp(1.9rem,3.4vw,2.6rem); margin-bottom:20px; max-width:18ch; }
.about-social{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:26px; }
.about-social .icon-btn{ background:var(--pink); }
.about-social .icon-btn:hover{ background:var(--ink); }
.about-social .pill-btn{ background:var(--pink); }
.about-social .pill-btn:hover{ background:var(--ink); }
.about-text p{ color:var(--ink-soft); margin-bottom:14px; max-width:56ch; }
.about-text p:last-of-type{ margin-bottom:0; }

/* =========================================================
   Stats
   ========================================================= */
.stats{ padding:clamp(40px,7vw,74px) 0; }
.stats h2{ font-size:clamp(1.6rem,3vw,2.2rem); margin-bottom:clamp(26px,4vw,40px); text-align:center; }
.stats-grid{
  display:grid; grid-template-columns:repeat(4,1fr); gap:18px;
}
.stat-card{
  background:var(--pink); border-radius:var(--radius);
  padding:28px 20px; text-align:center;
  transition:transform .35s var(--bounce);
}
.stat-card:hover{ transform:translateY(-4px); }
.stat-num{ display:block; font-family:var(--disp); font-weight:800; font-size:clamp(1.6rem,3vw,2.2rem); margin-bottom:6px; }
.stat-label{ font-size:14px; color:var(--ink-soft); font-weight:500; }
@media (max-width:720px){ .stats-grid{ grid-template-columns:repeat(2,1fr); } }

/* =========================================================
   Footer
   ========================================================= */
.site-footer{ background:var(--ink); color:var(--white); padding:clamp(40px,6vw,64px) 0 30px; position:relative; z-index:1; }
.footer-grid{
  display:grid; grid-template-columns:1.1fr 1fr 1fr; gap:40px;
  padding-bottom:36px; border-bottom:1px solid rgba(255,255,255,0.14);
}
.footer-brand .logo-mark{ color:var(--white); margin-bottom:12px; }
.footer-brand p{ color:#fff; text-transform:lowercase; font-size:14px; max-width:32ch; }
.footer-col h4{
  font-size:15px; text-transform:uppercase; letter-spacing:0.06em;
  padding-bottom:12px; margin-bottom:14px; border-bottom:1px solid rgba(255,255,255,0.25);
}
.footer-col ul{ display:flex; flex-direction:column; gap:10px; }
.footer-col ul a{ font-size:15px; color:rgba(255,255,255,0.82); transition:color .2s ease; }
.footer-col ul a:hover{ color:var(--green); }
.footer-resources{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:26px; }
.footer-social{ display:flex; gap:10px; }
/* specificity fix: keep icon/pill buttons dark-on-white regardless of .footer-col ul a rule above (scoped to ul a, not these) */
.footer-bottom{
  display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px;
  padding-top:24px; font-size:13px; color:rgba(255,255,255,0.55);
}
@media (max-width:760px){ .footer-grid{ grid-template-columns:1fr; gap:32px; } }

/* =========================================================
   Case-study page
   ========================================================= */
.cs-hero{
  margin-top:-82px;
  padding:calc(clamp(56px,9vw,110px) + 82px) 0 clamp(30px,5vw,50px);
  background:linear-gradient(180deg, var(--pink) 0%, rgba(253,249,242,0) 68%);
  text-align:center;
  position:relative;
}
.cs-hero h1{ font-size:clamp(2.2rem,5vw,3.2rem); margin-bottom:20px; }
.cs-tags{ display:flex; flex-wrap:wrap; gap:14px; justify-content:center; margin-bottom:24px; }
.cs-tags span{
  font-weight:700; font-size:15px; color:var(--white); padding:8px 24px; border-radius:100px;
}
.cs-hero .cs-summary{ max-width:820px; margin:0 auto; font-size:clamp(1.05rem,1.6vw,1.25rem); color:var(--ink-soft); }
.cs-back{
  display:inline-flex; align-items:center; gap:8px; font-weight:600; font-size:14px;
  color:var(--ink-soft); margin-bottom:22px; transition:color .2s ease, transform .2s ease;
}
.cs-back:hover{ color:var(--ink); transform:translateX(-3px); }
.cs-hero .cs-back{ display:inline-flex; }
.cs-media{ padding:0 0 clamp(40px,6vw,70px); }
.cs-media img{
  width:100%; max-width:1060px; margin:0 auto; border-radius:16px;
}
.cs-details{ padding:clamp(30px,5vw,54px) 0; }
.cs-details-grid{
  display:grid; grid-template-columns:repeat(3,1fr); gap:32px;
  padding-bottom:clamp(30px,5vw,46px); margin-bottom:clamp(30px,5vw,46px);
  border-bottom:1px solid var(--ink-line);
}
.cs-details-grid h4{ font-size:14px; text-transform:uppercase; letter-spacing:0.06em; margin-bottom:14px; }
.cs-details-grid ul{ display:flex; flex-direction:column; gap:8px; }
.cs-details-grid li{ position:relative; padding-left:18px; color:var(--ink-soft); }
.cs-details-grid li::before{ content:"—"; position:absolute; left:0; color:var(--ink); opacity:0.4; }
.cs-body{ max-width:860px; }
.cs-body p{ color:var(--ink-soft); font-size:1.08rem; margin-bottom:18px; }
.cs-body p:last-child{ margin-bottom:0; }
.cs-gallery{
  display:grid; grid-template-columns:1fr 1fr; gap:24px;
  padding:clamp(10px,3vw,20px) 0 clamp(40px,6vw,60px);
}
.cs-gallery img{ border-radius:14px; width:100%; }
.cs-gallery.single{ grid-template-columns:1fr; max-width:760px; margin:0 auto; padding:clamp(10px,3vw,20px) 0 clamp(40px,6vw,60px); }
.cs-next{
  display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap;
  background:var(--pink); border-radius:20px; padding:clamp(28px,4vw,46px);
  margin:0 var(--edge) clamp(50px,7vw,80px); max-width:calc(var(--maxw) - 2*var(--edge)); margin-left:auto; margin-right:auto;
}
.cs-next .label{ font-size:14px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; opacity:0.6; margin-bottom:8px; display:block; }
.cs-next h3{ font-size:clamp(1.4rem,2.6vw,1.9rem); }

/* ---------- Long-form case-study components (quick facts, subheads, stat
   groups, pull-quotes, photos, and inline-chart figures used by richer
   write-ups like USALLIANCE) ---------- */
.cs-facts{
  display:flex; flex-wrap:wrap; gap:28px;
  padding-bottom:clamp(28px,4vw,42px); margin-bottom:clamp(28px,4vw,42px);
}
.cs-facts .fact{ flex:1 1 180px; min-width:160px; }
.cs-facts .fact .flabel{
  display:block; font-family:var(--disp); font-weight:700; font-size:12px;
  text-transform:uppercase; letter-spacing:0.06em; color:var(--ink-soft); margin-bottom:6px;
}
.cs-facts .fact p{ color:var(--ink); font-size:14.5px; line-height:1.55; margin:0; }

.cs-section{ padding:clamp(34px,5vw,58px) 0; border-top:1px solid var(--ink-line); }
.cs-section:first-of-type{ border-top:0; padding-top:0; }
#competitor-analysis{ border-top:0; padding-top:0; }
.cs-section h2{ font-size:clamp(1.6rem,3.2vw,2.15rem); margin-bottom:8px; }
.cs-eyebrow-num{
  display:inline-block; font-family:var(--disp); font-weight:800; color:var(--purple);
  margin-right:8px;
}
.cs-subhead{ font-size:clamp(1.15rem,2vw,1.4rem); margin:clamp(26px,4vw,38px) 0 12px; }
.cs-section > .cs-subhead:first-of-type{ margin-top:20px; }

.cs-stats{ display:flex; flex-wrap:wrap; gap:16px; margin:22px 0; }
.cs-stats .stat-card{ flex:1 1 190px; }

.cs-quote{
  border-left:3px solid var(--yellow); background:var(--pink); border-radius:0 14px 14px 0;
  padding:18px 26px; margin:26px 0; font-size:1.05rem; color:var(--ink);
}
.cs-quote p{ margin:0; font-style:italic; }

.cs-note{ font-size:14px; color:var(--ink-soft); font-style:italic; margin:8px 0 22px; }

.cs-photo{ margin:26px 0; }
.cs-photo img{ width:100%; max-width:1060px; margin:0 auto; border-radius:14px; display:block; }
.cs-photo.small img{ max-width:700px; }
.cs-photo figcaption{
  max-width:1060px; margin:10px auto 0; text-align:center; font-size:13px; color:var(--ink-soft);
}
.cs-photo.small figcaption{ max-width:700px; }
.cs-photo .enlarge-link{ display:block; text-align:center; margin-top:6px; font-size:13px; font-weight:600; color:var(--purple); cursor:pointer; }
.cs-photo .enlarge-link:hover{ text-decoration:underline; }
.cs-photo:has(.enlarge-link) img{ cursor:zoom-in; }

/* ---------- Lightbox (click-to-enlarge case-study photos) ---------- */
.lightbox{
  position:fixed; inset:0; z-index:600;
  display:flex; align-items:center; justify-content:center; padding:clamp(20px,5vw,60px);
  background:rgba(20,22,30,0.92);
  opacity:0; pointer-events:none; transition:opacity .3s ease;
}
.lightbox.open{ opacity:1; pointer-events:auto; }
.lightbox img{
  max-width:100%; max-height:100%; border-radius:8px;
  box-shadow:0 20px 60px rgba(0,0,0,0.5);
  cursor:default;
}
.lightbox-close{
  position:absolute; top:18px; right:20px; width:44px; height:44px; border-radius:100px;
  display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,0.12); color:var(--white); font-size:24px; line-height:1;
  transition:background .2s ease, transform .2s ease;
}
.lightbox-close:hover{ background:rgba(255,255,255,0.24); transform:rotate(90deg); }

.cs-chart{
  margin:28px 0; background:var(--white); border-radius:16px;
  padding:clamp(16px,3vw,26px) clamp(16px,3vw,30px);
  box-shadow:0 4px 24px rgba(39,48,67,0.07);
}
.cs-chart svg{ display:block; width:100%; height:auto; }
.cs-chart figcaption{ font-size:13.5px; color:var(--ink-soft); margin-top:12px; }
.cs-chart .chart-note{ font-size:12.5px; color:var(--ink-soft); opacity:0.8; margin-top:6px; }

.cs-comp-row{ display:flex; gap:28px; align-items:flex-start; margin:22px 0 30px; }
.cs-comp-row .cs-comp-photo{ flex:0 0 320px; margin:0; }
.cs-comp-row .cs-comp-photo img{ width:100%; border-radius:14px; display:block; }
.cs-comp-row .cs-comp-text{ flex:1; min-width:0; }
.cs-comp-row .cs-comp-text h3{ margin-top:0; }
.cs-comp-row .cs-comp-text p:last-child{ margin-bottom:0; }

.link-cta{
  display:inline-flex; align-items:center; gap:6px;
  font-weight:700; color:var(--purple); text-decoration:underline;
  text-underline-offset:3px;
}
.link-cta:hover{ color:var(--ink); }

.cs-compare{ display:flex; gap:28px; flex-wrap:wrap; margin:22px 0 30px; }
.cs-compare-col{ flex:1 1 300px; min-width:0; }
.cs-compare-col .cs-photo{ margin:0; }

@media (max-width:820px){
  .hero-inner{ grid-template-columns:1fr; text-align:center; row-gap:52px; }
  .hero-portrait-wrap{ margin:0 auto; }
  .hero-text .lede{ margin-left:auto; margin-right:auto; }
  .about-grid{ grid-template-columns:1fr; }
  .collage{ order:-1; margin:0 auto 8px; }
  .about-text{ order:2; text-align:left; }
  .stats-grid{ grid-template-columns:repeat(2,1fr); }
  .cs-details-grid{ grid-template-columns:1fr; gap:24px; }
  .cs-gallery{ grid-template-columns:1fr; }
  .cs-comp-row{ flex-direction:column; }
  .cs-comp-row .cs-comp-photo{ flex:0 0 auto; width:100%; }
}
