/* case_story — bespoke portfolio case pages (lib/blocks/case-story.php).
   Every colour comes from the customer's palette (--c1…--c5, --paper, --ink, --accent);
   the motif class (.cs--arch, .cs--circle, …) shapes the swatches, boards and decoration;
   the font class (.cs--f-anton / serif / rounded) sets the headlines. */
.cs{position:relative;overflow:hidden;background:var(--paper);color:var(--ink);font-family:var(--font-primary),sans-serif}
.cs .container{position:relative;z-index:1}
.cs h2,.cs h3{text-transform:none;letter-spacing:0}

/* the hero board already shows logo + headline: the template's h1 stays for screen readers */
.mil-case-page.is-story .mil-case-title{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.mil-case-page.is-story .mil-case-underline,.mil-case-page.is-story .mil-case-hero-logo-float,.mil-case-page.is-story .mil-case-hero-logo{display:none}

/* headline faces */
.cs-h2,.cs-h3,.cs-num,.cs-cta-title{font-family:var(--font-secondary),sans-serif;font-weight:400;color:var(--ink)}
.cs--f-anton .cs-h2,.cs--f-anton .cs-h3,.cs--f-anton .cs-cta-title{text-transform:uppercase}
.cs--f-serif .cs-h2,.cs--f-serif .cs-h3,.cs--f-serif .cs-num,.cs--f-serif .cs-cta-title{font-family:'Playfair Display',Georgia,serif;font-weight:700}
.cs--f-rounded .cs-h2,.cs--f-rounded .cs-h3,.cs--f-rounded .cs-num,.cs--f-rounded .cs-cta-title{font-family:'Fredoka',var(--font-primary),sans-serif;font-weight:600}

/* ---- intro */
.cs-intro{padding:clamp(80px,9vw,140px) 0 clamp(60px,7vw,100px)}
.cs-intro:before{content:"";position:absolute;right:-8vw;top:-10vw;width:42vw;height:42vw;background:var(--c2);opacity:.12;pointer-events:none}
.cs-intro:after{content:"";position:absolute;left:-6vw;bottom:-14vw;width:26vw;height:26vw;background:var(--c3);opacity:.1;pointer-events:none}
.cs-intro-row{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:clamp(40px,6vw,100px);align-items:center}
.cs-eyebrow{font-size:13px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--accent);margin:0 0 18px}
.cs-h2{font-size:clamp(40px,5.4vw,82px);line-height:1;margin:0 0 26px}
.cs-lead{font-size:clamp(17px,1.45vw,20px);line-height:1.65;color:var(--ink);opacity:.86;margin:0 0 34px;max-width:640px}
.cs-label{font-size:12px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;margin:0 0 12px;opacity:.7}
.cs-scope{display:flex;flex-wrap:wrap;gap:10px;list-style:none;margin:0 0 28px;padding:0}
.cs-scope li{padding:9px 16px;border-radius:999px;font-size:14px;font-weight:500;color:var(--ink);background:color-mix(in srgb,var(--c2) 16%,var(--paper));border:1px solid color-mix(in srgb,var(--c2) 40%,transparent)}
.cs-site{display:inline-flex;align-items:center;gap:8px;font-size:15px;color:var(--ink);text-decoration:none;border-bottom:2px solid var(--accent);padding-bottom:3px}
.cs-site:hover{color:var(--accent)}

/* palette swatches, shaped by the motif */
.cs-palette{display:flex;flex-wrap:wrap;gap:16px;justify-content:center}
.cs-swatch{position:relative;display:flex;align-items:flex-end;justify-content:center;width:118px;height:150px;padding-bottom:14px;box-shadow:0 18px 40px rgba(0,0,0,.12)}
.cs-swatch b{font-size:11px;font-weight:600;letter-spacing:.06em}
.cs-swatch--1{transform:translateY(-18px)}
.cs-swatch--3{transform:translateY(14px)}
.cs-swatch--5{transform:translateY(-8px)}

.cs--arch .cs-swatch{border-radius:999px 999px 16px 16px}
.cs--arch .cs-intro:before,.cs--arch .cs-intro:after{border-radius:999px 999px 0 0}
.cs--arch .cs-board{border-radius:220px 220px 22px 22px}
.cs--circle .cs-swatch{width:132px;height:132px;border-radius:50%;align-items:center;padding:0}
.cs--circle .cs-intro:before,.cs--circle .cs-intro:after{border-radius:50%}
.cs--circle .cs-board{border-radius:32px}
.cs--tile .cs-swatch{width:112px;height:112px;border-radius:14px;transform:rotate(45deg);align-items:center;padding:0;margin:22px}
.cs--tile .cs-swatch b{transform:rotate(-45deg)}
.cs--tile .cs-intro:before,.cs--tile .cs-intro:after{transform:rotate(45deg);border-radius:8%}
.cs--tile .cs-board{border-radius:10px}
.cs--slant .cs-swatch{clip-path:polygon(18% 0,100% 0,82% 100%,0 100%);width:128px;box-shadow:none}
.cs--slant .cs-intro:before,.cs--slant .cs-intro:after{clip-path:polygon(25% 0,100% 0,75% 100%,0 100%)}
.cs--slant .cs-board{border-radius:4px}
.cs--frame .cs-swatch{border:6px solid var(--paper);outline:2px solid var(--ink);border-radius:2px}
.cs--frame .cs-intro:before{background:none;border:3px solid var(--c2);opacity:.35}
.cs--frame .cs-intro:after{background:none;border:3px solid var(--c3);opacity:.3}
.cs--frame .cs-board{border-radius:2px;outline:2px solid var(--ink);outline-offset:10px}
.cs--blob .cs-swatch{border-radius:58% 42% 52% 48% / 45% 55% 45% 55%;width:130px;height:130px;align-items:center;padding:0}
.cs--blob .cs-swatch--2{border-radius:40% 60% 45% 55% / 60% 40% 60% 40%}
.cs--blob .cs-intro:before,.cs--blob .cs-intro:after{border-radius:58% 42% 52% 48% / 45% 55% 45% 55%}
.cs--blob .cs-board{border-radius:36px}

/* ---- chapters: one per portfolio board */
.cs-chapter{padding:clamp(56px,7vw,110px) 0}
.cs-chapter:nth-child(odd){background:color-mix(in srgb,var(--c2) 7%,var(--paper))}
.cs-chapter-row{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,.7fr);gap:clamp(36px,6vw,96px);align-items:center}
.cs-chapter.is-flip .cs-chapter-row{grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr)}
.cs-chapter.is-flip .cs-board{order:2}
.cs-board{display:block;overflow:hidden;box-shadow:0 30px 70px rgba(0,0,0,.18);background:var(--c1)}
.cs-board img{display:block;width:100%;height:auto;transition:transform .6s cubic-bezier(0,0,.3642,1)}
.cs-board:hover img{transform:scale(1.025)}
.cs-num{display:block;font-size:clamp(56px,6vw,96px);line-height:1;color:var(--accent);margin-bottom:14px}
.cs-h3{font-size:clamp(28px,2.8vw,44px);line-height:1.05;margin:0 0 18px}
.cs-text{font-size:17px;line-height:1.65;opacity:.85;margin:0}

/* ---- closing band */
.cs-cta{background:var(--accent);color:var(--on-accent);padding:clamp(56px,7vw,96px) 0}
.cs-cta-row{display:flex;align-items:center;justify-content:space-between;gap:30px;flex-wrap:wrap}
.cs-cta-title{color:var(--on-accent);font-size:clamp(30px,3.4vw,52px);line-height:1.05;margin:0 0 10px}
.cs-cta-text{margin:0;font-size:17px;opacity:.85;max-width:620px}
.cs-cta-btn{display:inline-flex;align-items:center;gap:10px;padding:18px 30px;border-radius:999px;background:var(--on-accent);color:var(--accent);font-weight:600;text-decoration:none;white-space:nowrap}
.cs-cta-btn:hover{transform:translateY(-2px)}

@media (max-width:992px){
  .cs-intro-row,.cs-chapter-row,.cs-chapter.is-flip .cs-chapter-row{grid-template-columns:1fr}
  .cs-chapter.is-flip .cs-board{order:0}
  .cs-palette{justify-content:flex-start}
  .cs--arch .cs-board{border-radius:140px 140px 18px 18px}
}
@media (max-width:576px){
  .cs-swatch{width:88px;height:112px}
  .cs--circle .cs-swatch,.cs--blob .cs-swatch{width:96px;height:96px}
  .cs--tile .cs-swatch{width:80px;height:80px;margin:14px}
}
@media (prefers-reduced-motion:reduce){.cs-board img,.cs-cta-btn{transition:none}.cs-board:hover img{transform:none}}
