/* ===================================================================
   Case study template (v1, Oct 2026)
   Used with body class="home case": the shared pieces (nav, footer,
   pills, headings, buttons, dark/grey sections) come from home.css,
   everything below is case-study layout.
   Content comes from content/cases/<slug>.json, rendered by
   assets/case.js. See the block list at the top of case.js.
   =================================================================== */

body.case{
  --c-accent:var(--h-orange);
  --c-gap:clamp(56px,7vw,104px);
  --c-text:40rem;
}

/* ---------- inline text helpers ---------- */
/* Highlight set in Space Grotesk: Darker Grotesque has a tall ascent
   (about 0.5em of empty space above capitals, 0.3em below), so any
   background on it looks heavier at the top. Space Grotesk's spacing
   is even, so equal padding looks equal. */
.case .c-hl{
  background:var(--c-accent);color:#fff;
  font-family:var(--font-head);font-weight:500;font-size:.84em;letter-spacing:-.01em;
  padding:.14em .4em;border-radius:.35em;
  -webkit-box-decoration-break:clone;box-decoration-break:clone;
}
.case .c-todo{
  background:rgba(255,173,0,.16);color:inherit;
  outline:1px dashed #ffad00;outline-offset:2px;border-radius:3px;
  padding:0 .25em;
}
.case .c-todo::before{content:"To fill: ";font-weight:700;color:#ffad00;}
.case .h-grey .c-todo::before{color:#9a6400;}

/* ---------- hero ---------- */
.case .c-hero{padding:clamp(130px,16vh,180px) 0 0;}
.case .c-back{
  display:inline-flex;align-items:center;gap:8px;margin-bottom:clamp(28px,4vw,48px);
  color:var(--h-muted-dark);font-weight:700;font-size:1.05rem;transition:color .2s,gap .2s;
}
.case .c-back:hover{color:#fff;gap:12px;}
.case .c-back svg{width:16px;height:16px;}
.case .c-hero .h-head{font-size:clamp(2.7rem,7.4vw,7rem);max-width:14ch;}
.case .c-hero .h-lead{max-width:40ch;}
.case .c-figure.c-hero-media{margin-top:clamp(44px,6vw,80px);}

/* ---------- snapshot facts ---------- */
.case .c-facts{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:22px 32px;
  margin-top:clamp(44px,5vw,64px);padding-top:26px;border-top:1px solid var(--h-line-dark);
}
.case .c-fact dt{font-size:.82rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:rgba(243,244,246,.66);margin:0 0 6px;}
.case .c-fact dd{margin:0;font-size:1.25rem;line-height:1.3;color:var(--h-on-dark);}
.case .c-fact a{border-bottom:1px solid rgba(255,255,255,.35);}
.case .c-fact a:hover{border-color:#fff;}

/* ---------- section menu: floating bar at the bottom ---------- */
.case .c-hero{padding-bottom:clamp(72px,9vw,120px);}
.case .c-subnav{
  position:fixed;left:50%;bottom:clamp(14px,2.4vw,24px);z-index:60;
  max-width:calc(100vw - 24px);
  background:color-mix(in srgb,var(--h-navy) 86%,transparent);
  -webkit-backdrop-filter:saturate(140%) blur(16px);backdrop-filter:saturate(140%) blur(16px);
  border:1px solid rgba(255,255,255,.14);border-radius:999px;
  box-shadow:0 12px 32px rgba(0,0,0,.28);
  opacity:0;transform:translate(-50%,calc(100% + 40px));pointer-events:none;
  transition:transform .4s var(--ease),opacity .3s;
}
.case .c-subnav.is-visible{opacity:1;transform:translate(-50%,0);pointer-events:auto;}
.case .c-subnav-inner{display:flex;align-items:center;gap:4px;padding:6px;}
.case .c-subnav-name{
  flex:none;padding:6px 14px 6px 12px;margin-right:4px;border-right:1px solid rgba(255,255,255,.14);
  font-family:var(--font-head);font-weight:700;text-transform:uppercase;letter-spacing:.02em;
  font-size:.9rem;line-height:1.4;color:#fff;white-space:nowrap;
}
.case .c-subnav-links{display:flex;gap:2px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;}
.case .c-subnav-links::-webkit-scrollbar{display:none;}
.case .c-subnav-links a{
  display:inline-flex;align-items:center;gap:7px;flex:none;
  padding:8px 13px;border-radius:999px;
  font-weight:700;font-size:1.05rem;line-height:1.1;color:rgba(243,244,246,.78);white-space:nowrap;
  transition:color .2s,background .2s;
}
.case .c-subnav-links a span{font-family:var(--font-head);font-size:.7rem;opacity:.6;}
.case .c-subnav-links a:hover{color:#fff;background:rgba(255,255,255,.07);}
.case .c-subnav-links a.is-active{background:var(--c-accent);color:#fff;}
.case .c-subnav-links a.is-active span{opacity:.9;}
@media(max-width:820px){
  .case .c-subnav{left:12px;right:12px;max-width:none;transform:translateY(calc(100% + 40px));border-radius:18px;}
  .case .c-subnav.is-visible{transform:none;}
  .case .c-subnav-name{display:none;}
}

/* ---------- sections ---------- */
.case .c-section .h-title{max-width:15ch;margin-bottom:clamp(36px,4.5vw,64px);}
.case .c-blocks{display:flex;flex-direction:column;gap:clamp(32px,4vw,52px);}
.case .c-blocks > .c-figure,.case .c-blocks > .c-decision,.case .c-blocks > .c-swatches,
.case .c-blocks > .c-quotes,.case .c-blocks > .c-stats{margin-top:calc(var(--c-gap) - clamp(32px,4vw,52px));}
.case .c-blocks > :first-child{margin-top:0;}

/* text */
.case .c-text{max-width:var(--c-text);}
.case .c-text p{font-size:clamp(1.3rem,1.7vw,1.55rem);line-height:1.42;margin:0 0 .9em;}
.case .c-text p:last-child{margin-bottom:0;}
.case .h-dark .c-text p{color:var(--h-muted-dark);}
.case .h-dark .c-text p:first-child{color:var(--h-on-dark);}
.case .h-grey .c-text p{color:var(--h-muted-light);}
.case .h-grey .c-text p:first-child{color:var(--h-ink);}
.case .c-text h3{
  font-family:var(--font-head);font-weight:700;font-size:1rem;letter-spacing:.1em;text-transform:uppercase;
  color:var(--c-accent);margin:0 0 12px;
}

/* big statement */
.case .c-statement{
  font-family:var(--font-head);font-weight:700;letter-spacing:-.02em;line-height:1.05;
  font-size:clamp(1.9rem,3.8vw,3.4rem);max-width:22ch;margin:0;
}
.case .h-grey .c-statement{color:var(--h-ink);}
.case .h-dark .c-statement{color:var(--h-on-dark);}

/* chips (one-off list of answers, like the deck) */
.case .c-chips{display:flex;flex-wrap:wrap;gap:12px;list-style:none;margin:0;padding:0;max-width:56rem;}
.case .c-chips li{
  background:var(--c-accent);color:#fff;border-radius:999px;
  padding:12px 22px;font-family:var(--font-head);font-weight:700;font-size:clamp(1.05rem,1.6vw,1.35rem);line-height:1.2;
}

/* figures and placeholders */
.case .c-figure{margin:0;}
.case .c-figure-title{
  font-size:.85rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;
  color:var(--c-accent);margin:0 0 14px;
}
.case .c-media{position:relative;border-radius:10px;overflow:hidden;}
.case .c-media img,.case .c-media video{display:block;width:100%;height:auto;}
.case .c-figure.is-seamless .c-media{border-radius:0;overflow:visible;}
.case .c-figure figcaption{margin-top:14px;font-size:1.15rem;line-height:1.4;max-width:46ch;}
.case .h-dark .c-figure figcaption{color:var(--h-muted-dark);}
.case .h-grey .c-figure figcaption{color:var(--h-muted-light);}

.case .c-bleed{display:block;width:100%;height:clamp(320px,52vw,760px);object-fit:cover;}

.case .c-ph{
  display:flex;flex-direction:column;justify-content:center;gap:10px;
  aspect-ratio:var(--ratio,16/10);padding:clamp(20px,3vw,40px);
  border:1.5px dashed rgba(255,255,255,.28);border-radius:10px;background:rgba(255,255,255,.03);
}
.case .h-grey .c-ph{border-color:rgba(15,21,28,.28);background:rgba(15,21,28,.03);}
.case .c-ph-tag{
  align-self:flex-start;background:#ffad00;color:#2b1d00;border-radius:999px;
  padding:4px 11px;font-size:.78rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
}
.case .c-ph-text{font-size:clamp(1.1rem,1.5vw,1.3rem);line-height:1.35;max-width:40ch;margin:0;}
.case .h-dark .c-ph-text{color:var(--h-on-dark);}
.case .h-grey .c-ph-text{color:var(--h-ink);}
.case .c-ph-file{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.82rem;opacity:.7;margin:0;word-break:break-all;}

/* decisions: text and close-up side by side, alternating */
.case .c-decision{display:grid;grid-template-columns:1fr;gap:24px 56px;align-items:center;}
@media(min-width:900px){
  .case .c-decision{grid-template-columns:minmax(0,5fr) minmax(0,7fr);}
  .case .c-decision.is-flip .c-decision-text{order:2;}
}
.case .c-decision + .c-decision{padding-top:var(--c-gap);border-top:1px solid var(--h-line-dark);}
.case .h-grey .c-decision + .c-decision{border-top-color:var(--h-line-light);}
.case .c-num{display:block;font-family:var(--font-head);font-weight:700;color:var(--c-accent);font-size:1rem;letter-spacing:.08em;margin-bottom:12px;}
.case .c-decision h3{
  font-family:var(--font-head);font-weight:700;text-transform:uppercase;letter-spacing:-.01em;line-height:.95;
  font-size:clamp(1.7rem,2.8vw,2.5rem);margin:0 0 18px;
}
.case .h-dark .c-decision h3{color:var(--h-on-dark);}
.case .c-decision .c-text p{font-size:clamp(1.25rem,1.5vw,1.4rem);}

/* colour swatches */
.case .c-swatches{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;}
.case .c-swatch-chip{height:clamp(90px,10vw,130px);border-radius:8px;border:1px solid rgba(15,21,28,.1);}
.case .c-swatch-name{margin:12px 0 2px;font-weight:700;font-size:1.1rem;}
.case .c-swatch-hex{margin:0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.85rem;opacity:.65;}
.case .h-grey .c-swatch-name{color:var(--h-ink);}

/* quotes */
.case .c-quotes{display:grid;grid-template-columns:1fr;gap:clamp(28px,3vw,44px);}
@media(min-width:800px){.case .c-quotes{grid-template-columns:1fr 1fr;}}
.case .c-quote{margin:0;border-top:2px solid var(--c-accent);padding-top:20px;}
.case .c-quote p{font-size:clamp(1.3rem,1.7vw,1.55rem);line-height:1.38;margin:0 0 14px;}
.case .h-grey .c-quote p{color:var(--h-ink);}
.case .h-dark .c-quote p{color:var(--h-on-dark);}
.case .c-quote cite{font-style:normal;font-size:.85rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;opacity:.6;}

/* stats */
.case .c-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:28px 40px;}
.case .c-stat{border-top:1px solid var(--h-line-dark);padding-top:18px;}
.case .c-stat-value{display:block;font-family:var(--font-head);font-weight:700;letter-spacing:-.03em;line-height:.95;font-size:clamp(3.2rem,7vw,6rem);color:var(--c-accent);}
.case .c-stat-label{display:block;margin-top:10px;font-size:1.25rem;line-height:1.3;color:var(--h-on-dark);}
.case .c-stats-note{grid-column:1/-1;margin:0;font-size:1.05rem;color:var(--h-muted-dark);}

/* next project */
.case .c-next{display:block;padding:clamp(72px,9vw,130px) 0;border-top:1px solid var(--h-line-dark);transition:background .3s;}
.case .c-next:hover{background:var(--h-navy-2);}
.case .c-next .h-pill{margin-bottom:18px;}
.case .c-next .h-head{font-size:clamp(2.4rem,6vw,5.4rem);display:flex;align-items:center;gap:.3em;flex-wrap:wrap;}
.case .c-next svg{width:.7em;height:.7em;flex:none;transition:transform .3s;}
.case .c-next:hover svg{transform:translateX(8px);}

@media(max-width:600px){
  .case .c-chips li{padding:10px 16px;}
}

/* nav and dark surfaces follow the project's own dark colour */
.case .site-nav{background:color-mix(in srgb,var(--h-navy) 88%,transparent);}
.case .mobile-menu{background:var(--h-navy);}
.case .c-bleed-wrap{background:var(--h-navy);}

/* ===================================================================
   v1.2 (7 Oct 2026): clearer heading scale, numbered section labels,
   light quote cards, floating section menu at the bottom.
   =================================================================== */

/* heading scale: hero > section > decision > figure label */
.case .c-hero .h-head{font-size:clamp(3rem,8vw,7.6rem);max-width:13ch;}
.case .c-section .h-title{font-size:clamp(1.6rem,2.4vw,2.2rem);line-height:.95;max-width:18ch;margin-bottom:clamp(32px,4vw,56px);}
.case .c-decision h3{font-size:clamp(1.45rem,2.2vw,2rem);}
.case .c-statement{font-size:clamp(1.7rem,3vw,2.6rem);}
.case .c-next .h-head{font-size:clamp(2.2rem,5vw,4.4rem);}
.case .h-pill .c-pill-num{opacity:.75;margin-right:2px;}

/* when two dark sections meet, a hairline marks the change */
.case .c-section{padding:clamp(80px,10vw,144px) 0;}
.case .c-section.h-dark + .c-section.h-dark{border-top:1px solid var(--h-line-dark);}

/* light pieces sit on the dark page instead of light bands */
.case .c-quote{
  background:#f3f3f3;border:0;border-radius:12px;
  padding:clamp(22px,2.6vw,32px);box-shadow:0 1px 2px rgba(15,21,28,.05),0 12px 32px rgba(15,21,28,.07);
}
.case .h-dark .c-quote p,.case .h-grey .c-quote p{color:var(--h-ink);}
.case .c-quote cite{color:var(--h-ink);}
.case .c-quotes{gap:clamp(28px,3vw,40px) clamp(28px,3vw,40px);}
.case .h-dark .c-swatch-chip{border-color:rgba(255,255,255,.16);}
.case .h-dark .c-swatch-name{color:var(--h-on-dark);}
.case .h-grey .c-quote{background:#fff;}
@media(min-width:900px){
  .case .c-decision.is-flip{grid-template-columns:minmax(0,7fr) minmax(0,5fr);}
  .case .c-decision.is-flip .c-figure{order:1;}
}

/* light sections: headings dark grey (set in home.css), accents stay orange */

/* bullet lists (older projects) */
.case .c-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;}
.case .c-list li{position:relative;padding-left:22px;font-size:clamp(1.25rem,1.6vw,1.45rem);line-height:1.38;}
.case .c-list li::before{content:"";position:absolute;left:2px;top:.5em;width:9px;height:9px;border-radius:50%;background:var(--c-accent);}
.case .h-dark .c-list li{color:var(--h-muted-dark);}
.case .h-grey .c-list li{color:var(--h-muted-light);}
.case .c-text a{border-bottom:1px solid currentColor;}

/* ===================================================================
   v1.3 (14 Oct 2026): more compact reading
   Smaller body text and headings, tighter line height, wider measure
   and less space between blocks and sections, so a case study takes
   less scrolling. Overrides the sizes above.
   =================================================================== */
body.case{--c-gap:clamp(44px,5vw,76px);--c-text:44rem;}
.case .c-hero{padding-bottom:clamp(56px,7vw,96px);}
.case .c-hero .h-head{font-size:clamp(2.6rem,6.6vw,6.2rem);}
.case .c-figure.c-hero-media{margin-top:clamp(36px,5vw,64px);}
.case .c-facts{margin-top:clamp(36px,4vw,52px);}
.case .c-fact dd{font-size:1.15rem;}
.case .c-section{padding:clamp(64px,7.5vw,112px) 0;}
.case .c-section .h-title{font-size:clamp(1.6rem,2.4vw,2.2rem);margin-bottom:clamp(24px,3vw,40px);}
.case .c-blocks{gap:clamp(24px,2.8vw,36px);}
.case .c-blocks > .c-quotes,.case .c-blocks > .c-stats{margin-top:calc(var(--c-gap) - clamp(24px,2.8vw,36px));}
.case .c-text p{font-size:clamp(1.18rem,1.35vw,1.32rem);line-height:1.36;margin:0 0 .7em;}
.case .c-decision{gap:20px 48px;}
.case .c-decision h3{font-size:clamp(1.35rem,2vw,1.8rem);margin-bottom:14px;}
.case .c-decision .c-text p{font-size:clamp(1.12rem,1.25vw,1.24rem);}
.case .c-statement{font-size:clamp(1.45rem,2.4vw,2.1rem);line-height:1.12;max-width:26ch;}
.case .c-figure figcaption{font-size:1.05rem;margin-top:10px;}
.case .c-quote p{font-size:clamp(1.15rem,1.4vw,1.3rem);}
.case .c-list li{font-size:clamp(1.15rem,1.35vw,1.3rem);}
.case .c-stat-value{font-size:clamp(2.8rem,6vw,5rem);}
.case .c-next{padding:clamp(56px,7vw,100px) 0;}
.case .c-next .h-head{font-size:clamp(2rem,4.4vw,3.8rem);}

/* type specimens (block "type") */
.case .c-type{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:14px;}
.case .c-type-card{
  display:flex;flex-direction:column;gap:16px;min-width:0;
  background:#fff;color:var(--h-ink);border-radius:10px;padding:clamp(20px,2.4vw,30px);
}
.case .c-type.is-dark .c-type-card{background:#000;color:#fff;}
.case .h-dark .c-type:not(.is-dark) .c-type-card{background:#f3f3f3;}
.case .c-type-role{margin:0;font-size:.8rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;opacity:.6;}
.case .c-type-sample{flex:1;display:flex;flex-direction:column;justify-content:center;gap:6px;min-height:120px;}
.case .c-type-sample .c-media{border-radius:0;background:none;}
.case .c-type-sample img{display:block;width:100%;height:auto;}
.case .c-type-aa{margin:0;font-size:clamp(4rem,8vw,6.5rem);line-height:.9;font-weight:700;}
.case .c-type-line{margin:0;font-size:clamp(1.4rem,2.2vw,2rem);line-height:1.1;font-weight:700;}
.case .c-type-name{margin:0;padding-top:14px;border-top:1px solid currentColor;border-top-color:color-mix(in srgb,currentColor 18%,transparent);font-weight:700;font-size:1.15rem;}
.case .c-type-card .c-ph{color:var(--h-ink);}
.case .c-type.is-dark .c-ph{color:#fff;border-color:rgba(255,255,255,.3);background:rgba(255,255,255,.04);}
.home.case .h-section .c-type.is-dark .c-type-card p,.home.case .h-section .c-type.is-dark .c-ph p{color:#fff;}
.home.case .h-section .c-type:not(.is-dark) .c-type-card p{color:var(--h-ink);}
/* live-text specimens */
.case .c-type-live{display:flex;flex-direction:column;gap:10px;}
.case .c-type-live p{margin:0;font-family:inherit;}
.case .c-type-live .c-type-aa{font-size:clamp(4.5rem,9vw,7.5rem);line-height:.9;}
.case .c-type-live .c-type-line{font-size:clamp(1.6rem,2.6vw,2.4rem);line-height:1.1;}
.case .c-type-chars{font-size:clamp(1rem,1.3vw,1.2rem);line-height:1.45;letter-spacing:.02em;opacity:.7;word-break:break-all;}
.case .c-type-card.is-loading .c-type-sample{visibility:hidden;}
.case .c-type-live,.case .c-type-live p{font-weight:400;font-synthesis:none;}

/* ===================================================================
   v1.4 (14 Oct 2026)
   =================================================================== */
/* two-column text runs: paragraphs left, statement right */
.case .c-split{display:flex;flex-direction:column;gap:clamp(24px,2.8vw,36px);}
@media(min-width:960px){
  .case .c-split{
    display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);
    column-gap:clamp(40px,5vw,88px);row-gap:clamp(18px,2vw,26px);align-items:start;
  }
  .case .c-split-main{grid-column:1;grid-row:var(--r);}
  /* asymmetric: the side column starts a little lower than the paragraphs */
  .case .c-split-side{grid-column:2;grid-row:var(--r);align-self:start;margin-top:clamp(36px,4vw,60px);}
}
.case .c-split-side .c-statement{
  max-width:none;font-size:clamp(1.35rem,2vw,1.85rem);line-height:1.18;
  border-left:4px solid var(--c-hl,var(--c-accent));padding-left:clamp(16px,1.6vw,22px);
}

/* highlight as bold coloured words (theme.highlight = "text") */
body.case{--c-hl:var(--c-accent);}
.case.hl-text .c-hl{
  background:none;color:var(--c-hl);padding:0;border-radius:0;
  font:inherit;font-weight:700;letter-spacing:inherit;
}

/* floating section menu: switches to a light bar over dark sections */
.case .c-subnav{transition:transform .4s var(--ease),opacity .3s,background .3s,border-color .3s;}
.case .c-subnav.on-dark{
  background:rgba(243,243,243,.94);border-color:rgba(15,21,28,.08);
  box-shadow:0 14px 36px rgba(0,0,0,.45);
}
.case .c-subnav.on-dark .c-subnav-name{color:#0f151c;border-right-color:rgba(15,21,28,.14);}
.case .c-subnav.on-dark .c-subnav-links a{color:rgba(15,21,28,.72);}
.case .c-subnav.on-dark .c-subnav-links a:hover{color:#0f151c;background:rgba(15,21,28,.07);}
.case .c-subnav.on-dark .c-subnav-links a.is-active{color:#fff;background:var(--c-accent);}

/* ===================================================================
   v1.5 (14 Oct 2026): hero layout A
   Wide screens: headline and intro on the left, hero image on the
   right, facts row below, so the first screen shows the work straight
   away. Phones and heroes without an image stay stacked.
   =================================================================== */
.case .c-back{display:flex;width:fit-content;}
@media(min-width:960px){
  .case .c-hero.has-media{padding-top:clamp(110px,13vh,140px);}
  .case .c-hero.has-media .c-hero-grid{
    display:grid;grid-template-columns:minmax(0,5.5fr) minmax(0,6.5fr);
    column-gap:clamp(40px,4.5vw,64px);align-items:center;
  }
  .case .c-hero.has-media .h-head{font-size:clamp(2.3rem,4vw,4.1rem);max-width:13ch;margin-top:18px;}
  .case .c-hero.has-media .h-lead{font-size:clamp(1.12rem,1.3vw,1.25rem);max-width:34rem;}
  .case .c-hero.has-media .c-hero-media{margin-top:0;}
  .case .c-hero.has-media .c-facts{margin-top:clamp(40px,4.5vw,64px);}
}

/* eyebrow labels as plain uppercase text instead of pills
   (theme.eyebrow = "text"; TEDx) */
.home.case.eyebrow-text .h-pill,
.home.case.eyebrow-text .h-dark .h-pill,
.home.case.eyebrow-text .h-grey .h-pill{
  background:none;padding:0;border-radius:0;
  color:var(--c-hl);font-size:.82rem;letter-spacing:.16em;text-transform:uppercase;
}
.home.case.eyebrow-text .h-pill .c-pill-num{opacity:.6;margin-right:6px;}

/* ===================================================================
   v1.6 (14 Oct 2026)
   =================================================================== */
/* headings break into even lines instead of one long last line */
.case .h-head,.case .c-statement,.case .c-decision h3{text-wrap:balance;}
.case .h-lead,.case .c-text p{text-wrap:pretty;}

/* text in two columns (text block "columns": 2) */
@media(min-width:960px){
  .case .c-text.is-cols{max-width:none;columns:2;column-gap:clamp(40px,5vw,88px);}
  .case .c-text.is-cols p{break-inside:avoid;}
}

/* colours and typefaces side by side */
.case .c-pair{display:flex;flex-direction:column;gap:clamp(24px,2.8vw,36px);}
@media(min-width:960px){
  .case .c-pair{display:grid;grid-template-columns:minmax(0,4fr) minmax(0,8fr);gap:clamp(24px,2.6vw,40px);align-items:stretch;}
  .case .c-pair .c-swatches{grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;}
  .case .c-pair .c-swatch-chip{height:auto;aspect-ratio:16/11;}
  .case .c-pair .c-type{grid-template-columns:repeat(2,minmax(0,1fr));}
  .case .c-pair .c-type-card{padding:clamp(18px,2vw,26px);gap:12px;}
  .case .c-pair .c-type-live .c-type-aa{font-size:clamp(3.4rem,5vw,4.6rem);}
  .case .c-pair .c-type-live .c-type-line{font-size:clamp(1.15rem,1.6vw,1.5rem);}
  .case .c-pair .c-type-chars{font-size:clamp(.82rem,.95vw,.95rem);}
}
@media(min-width:960px){
  /* hero headline: slightly smaller so it sets on fewer, more even lines */
  .case .c-hero.has-media .h-head{font-size:clamp(2.2rem,3.4vw,3.6rem);max-width:none;}
}

/* ===================================================================
   v1.7 (15 Oct 2026): gallery block, light accents, marker highlights
   =================================================================== */
.case .c-gallery-grid{display:grid;grid-template-columns:repeat(var(--cols,2),minmax(0,1fr));gap:clamp(12px,1.4vw,20px);align-items:start;}
@media(max-width:700px){ .case .c-gallery-grid{grid-template-columns:1fr;} }

/* light accent colour: dark text on top of it, ink for labels on light sections */
.home.case.accent-light .h-pill,
.home.case.accent-light .h-dark .h-pill,
.home.case.accent-light .h-grey .h-pill{background:var(--c-accent);color:var(--c-accent-ink);}
.case.accent-light .c-subnav-links a.is-active,
.case.accent-light .c-subnav.on-dark .c-subnav-links a.is-active{color:var(--c-accent-ink);}
.case.accent-light .c-chips li{color:var(--c-accent-ink);}
.case.accent-light .h-grey .c-num,
.case.accent-light .h-grey .c-figure-title,
.case.accent-light .h-grey .c-text h3,
.case.accent-light .h-grey .c-stat-value{color:var(--h-ink);}

/* marker highlight: words sit on the accent like a highlighter */
.case.hl-marker .c-hl{
  background:var(--c-hl);color:var(--c-accent-ink,#0f151c);
  font:inherit;font-weight:700;letter-spacing:inherit;
  padding:0 .18em;border-radius:3px;
}
.case .c-pair .c-type > .c-type-card:only-child{grid-column:1 / -1;}
/* right column of a text run: statement and side image stacked */
.case .c-split-side > * + *{margin-top:clamp(24px,2.6vw,36px);}
.case .c-split-side .c-figure figcaption{max-width:none;}

/* ===================================================================
   v1.8 (15 Oct 2026): light accent with text eyebrows and text
   highlights (Beehouse yellow)
   =================================================================== */
.home.case.eyebrow-text.accent-light .h-pill,
.home.case.eyebrow-text.accent-light .h-dark .h-pill{background:none;color:var(--c-hl);}
.home.case.eyebrow-text.accent-light .h-grey .h-pill{background:none;color:var(--h-ink);}
.home.case.eyebrow-text.accent-light .h-grey .h-pill::before{
  content:"";display:inline-block;width:22px;height:3px;margin-right:10px;
  vertical-align:middle;background:var(--c-accent);transform:translateY(-1px);
}
/* yellow text is unreadable on light grey: ink text with a yellow underline instead */
.case.accent-light.hl-text .h-grey .c-hl{
  color:var(--h-ink);
  background:linear-gradient(transparent 62%, var(--c-accent) 62%, var(--c-accent) 92%, transparent 92%);
}

/* ===================================================================
   v1.9 (16 Oct 2026): decorative artwork in section corners
   =================================================================== */
.case .c-section{position:relative;overflow:hidden;overflow:clip;}
.case .c-section > .container{position:relative;z-index:1;}
.case .c-decor{
  position:absolute;z-index:0;pointer-events:none;user-select:none;
  width:min(var(--w,260px),19vw);
  opacity:0;transform:translate(70px,50px) rotate(calc(var(--rot,0deg) + 14deg));
  transition:opacity 1.2s ease,transform 1.8s cubic-bezier(.16,1,.3,1);
}
.case .c-decor.is-left{transform:translate(-70px,50px) rotate(calc(var(--rot,0deg) - 14deg));}
.case .c-decor.is-in{opacity:1;transform:rotate(var(--rot,0deg));}
.case .c-decor img{display:block;width:100%;height:auto;transform-origin:50% 90%;animation:c-sway 9s ease-in-out infinite;}
.case .c-decor.is-left img{animation-delay:-4.5s;}
@keyframes c-sway{0%,100%{transform:rotate(-1.6deg);}50%{transform:rotate(1.6deg);}}
@media(max-width:899px){ .case .c-decor{display:none;} }
@media(prefers-reduced-motion:reduce){
  .case .c-decor{transition:none;opacity:1;transform:rotate(var(--rot,0deg));}
  .case .c-decor img{animation:none;}
}

/* small inline galleries in a text column (Toi o Tāmaki letters) keep their columns on phones */
@media(max-width:700px){ .case .c-split-main .c-gallery-grid{grid-template-columns:repeat(var(--cols,3),minmax(0,1fr));gap:10px;} }

/* Hero buttons follow the case accent (v20) */
.home.case .h-btn-primary{background:var(--c-accent);color:#fff;}
.home.case .h-btn-primary:hover{filter:brightness(1.08);background:var(--c-accent);}
.home.case.accent-light .h-btn-primary{color:var(--c-accent-ink);}

/* Gallery masonry + per-item labels (v21): full-length page designs of different heights */
.case .c-gallery-grid.is-masonry{display:block;columns:var(--cols,3);column-gap:clamp(12px,1.6vw,24px);}
.case .c-gallery-grid.is-masonry > *{break-inside:avoid;margin-bottom:clamp(20px,2.4vw,36px);}
@media(max-width:700px){ .case .c-gallery-grid.is-masonry{columns:2;column-gap:12px;} }
.case .c-gallery-item{display:block;}
.case .c-gallery-label{display:block;margin-top:10px;font-size:.95rem;line-height:1.35;color:var(--h-muted-light);}
.case .h-dark .c-gallery-label{color:var(--h-muted-dark);}

/* Reviews: stars, reviewer avatar and name (v22) */
.case .c-quote-stars{display:block;color:var(--c-accent);font-size:1.05rem;letter-spacing:.12em;margin-bottom:12px;}
.case .c-quote-by{display:flex;align-items:center;gap:12px;}
.case .c-quote-avatar{width:40px;height:40px;border-radius:50%;object-fit:cover;flex:0 0 auto;}
.case .c-quote-who{display:flex;flex-direction:column;gap:2px;}
.case .c-quote-who strong{font-family:var(--font-head);font-weight:700;font-size:.95rem;color:var(--h-ink);}
/* App Store badge at the end of a case study */
.case .c-badge{display:flex;flex-direction:column;align-items:center;gap:18px;text-align:center;}
.case .c-badge p{margin:0;font-size:1.25rem;}
.case .h-dark .c-badge p{color:var(--h-on-dark);}
.case .c-badge a{display:inline-block;transition:transform .25s ease;}
.case .c-badge a:hover{transform:translateY(-2px);}
.case .c-badge img{display:block;height:56px;width:auto;}

/* full-screen band with the image centred at its own size (v23) */
.case .c-bleed-wrap.is-contain{
  min-height:100svh;display:flex;align-items:center;
  padding:clamp(64px,8vw,120px) 0;background:var(--h-navy-2,var(--h-navy));
}
.case .c-bleed-wrap.is-contain .container{width:100%;}
.case .c-bleed-inner{display:block;width:100%;max-width:1200px;height:auto;margin:0 auto;border-radius:14px;}

/* Page load (v24): case pages are built from JSON after load. Until then only the
   nav and a plain dark page show, so the footer and the closing section do not
   flash at the top. A CSS fallback shows everything after 3 s if scripts fail. */
html.js body.case:not(.is-ready) > :not(.site-nav):not(.mobile-menu){opacity:0;animation:caseShow .01s 3s forwards;}
html.js body.case > main,html.js body.case > .h-close,html.js body.case > .site-footer{transition:opacity .45s ease;}
@keyframes caseShow{to{opacity:1;}}
html.js body.case{background:var(--h-navy);}

/* testimonial: where the review came from, on its own row (18 Oct 2026) */
.case .c-quote-loc{font-size:.95rem;line-height:1.3;color:var(--h-ink);opacity:.6;}

/* stats keep their width while counting */
.case .c-stat-value{font-variant-numeric:tabular-nums;}

/* click to enlarge, for images marked "zoom" */
.case .c-media.is-zoom{position:relative;cursor:zoom-in;}
.case .c-media.is-zoom:focus-visible{outline:2px solid var(--c-accent);outline-offset:4px;}
.case .c-zoom-hint{position:absolute;right:12px;bottom:12px;width:36px;height:36px;border-radius:50%;
  background:rgba(15,21,28,.72) center/18px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E");
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);opacity:.85;transition:opacity .2s,transform .2s;pointer-events:none;}
.case .c-media.is-zoom:hover .c-zoom-hint{opacity:1;transform:scale(1.06);}
.c-zoom{position:fixed;inset:0;z-index:200;background:rgba(6,9,13,.92);overflow:auto;overscroll-behavior:contain;
  display:flex;opacity:0;visibility:hidden;transition:opacity .25s,visibility 0s .25s;}
.c-zoom.is-open{opacity:1;visibility:visible;transition:opacity .25s;}
.c-zoom-stage{margin:auto;padding:clamp(56px,6vw,72px) clamp(12px,3vw,40px);cursor:zoom-out;}
.c-zoom-stage img{display:block;max-width:min(1600px,100%);width:auto;height:auto;margin:0 auto;border-radius:6px;cursor:default;}
.c-zoom-close{position:fixed;top:16px;right:16px;width:44px;height:44px;border-radius:50%;border:0;cursor:pointer;
  background:#f3f3f3 center/16px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f151c' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M5 5l14 14M19 5 5 19'/%3E%3C/svg%3E");}
.c-zoom-close:focus-visible{outline:2px solid #f4552a;outline-offset:3px;}
html.c-zoom-lock,html.c-zoom-lock body{overflow:hidden;}
@media(prefers-reduced-motion:reduce){.c-zoom,.c-zoom.is-open{transition:none;}}

/* the closing call to action is always Bentoji orange, whatever the case accent */
.home.case .h-close .h-btn-primary,.home.case.accent-light .h-close .h-btn-primary{background:var(--h-orange);color:#fff;}
.home.case .h-close .h-btn-primary:hover{background:var(--h-orange-dark);filter:none;}

/* pills in mixed sizes (SoundLax brief answers) */
.case .c-chips.is-mixed{align-items:center;gap:10px 10px;max-width:40rem;}
.case .c-chips.is-mixed li.is-s{font-size:clamp(.95rem,1.15vw,1.05rem);padding:9px 16px;}
.case .c-chips.is-mixed li.is-m{font-size:clamp(1.1rem,1.5vw,1.3rem);padding:11px 20px;}
.case .c-chips.is-mixed li.is-l{font-size:clamp(1.3rem,2vw,1.7rem);padding:13px 24px;}
/* zoom backdrop fades in with the image */
.c-zoom{-webkit-overflow-scrolling:touch;}
@media(max-width:700px){
  .case .c-chips.is-mixed{gap:8px;}
  .case .c-chips.is-mixed li.is-s{font-size:.8rem;padding:7px 11px;}
  .case .c-chips.is-mixed li.is-m{font-size:.9rem;padding:8px 13px;}
  .case .c-chips.is-mixed li.is-l{font-size:1.02rem;padding:9px 15px;}
}

/* compact pills: same size, smaller text, less height */
.case .c-chips.is-compact{gap:8px;max-width:40rem;}
.case .c-chips.is-compact li{font-size:clamp(.92rem,1.05vw,1rem);padding:8px 15px;}
@media(max-width:700px){ .case .c-chips.is-compact li{font-size:.86rem;padding:7px 12px;} }

/* ---------- opening a case study (14 Nov 2026) ----------
   Homepage (and Work page) <-> case study pages fade across, and the
   thumbnail you clicked grows into the case study's hero image.
   Uses cross-document View Transitions: Chrome, Edge and Safari 18.2+;
   other browsers simply open the page as before. The shared name
   "case-hero" is set by portfolio.js and case.js on one element only. */
@view-transition{navigation:auto;}
::view-transition{background:#0f151c;}
.home .site-nav{view-transition-name:site-nav;}
::view-transition-group(case-hero){animation-duration:.95s;animation-timing-function:cubic-bezier(.76,0,.24,1);border-radius:8px;overflow:hidden;}
::view-transition-old(case-hero),::view-transition-new(case-hero){animation-duration:.95s;animation-timing-function:cubic-bezier(.76,0,.24,1);height:100%;width:100%;object-fit:cover;}
::view-transition-old(root){animation:bj-vt-out .45s cubic-bezier(.4,0,1,1) both;}
::view-transition-new(root){animation:bj-vt-in .8s .4s cubic-bezier(.16,1,.3,1) both;}
@keyframes bj-vt-out{to{opacity:0;}}
@keyframes bj-vt-in{from{opacity:0;transform:translateY(32px);}}
@media(prefers-reduced-motion:reduce){::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important;}}
/* early hero while the case content loads (opening animation only) */
html.js body.case.is-vt:not(.is-ready) > main{opacity:1;animation:none;}
