/* v5.4 CASE-STUDY BASE — the shared STRUCTURE only.
   Story arc on every page:   BANNER (enter the world) → PROBLEM → SOLUTION → INSIGHT → SHOWCASE → conclusion + footer.
   Shared: reset, spacing rhythm, 12-col grid, figure rules, motion + reduced motion.
   Per project (in each page): typefaces, palette, chapter-marker style, banner, every composition.
   Hierarchy tokens each page fills: --f-display (identity-adjacent headlines), --f-body, --f-label.            */
*{box-sizing:border-box;margin:0}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{background:var(--bg);color:var(--ink);font:400 var(--fs-body,17px)/1.6 var(--f-body,system-ui,sans-serif);overflow-x:clip;-webkit-font-smoothing:antialiased}
img,svg{display:block;max-width:100%;height:auto}
a{color:inherit}
.skip{position:absolute;left:12px;top:-60px;z-index:200;background:#000;color:#fff;padding:10px 14px;border-radius:12px;font:700 14px var(--site-sans,sans-serif);text-decoration:none}
.skip:focus{top:12px}
:focus-visible{outline:2px solid var(--focus,currentColor);outline-offset:3px}

:root{--max:1240px;--wide:1480px;--gutter:clamp(16px,4.5vw,64px);--sec:clamp(104px,13vw,200px);--gap:clamp(20px,3vw,48px);--r:clamp(10px,1.1vw,16px)}
.wrap{max-width:var(--max);margin:0 auto;padding:0 var(--gutter);position:relative}
.wrap.wide{max-width:var(--wide)}
.wrap.narrow{max-width:900px}
.sec{position:relative;padding-top:var(--sec)}
.g12{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--gap);row-gap:clamp(28px,3.4vw,48px)}
.g12>*{min-width:0}
.bleed{width:100%;max-width:none}
.bleed img{width:100%}
figure{margin:0}
figcaption,.cap{font:400 var(--fs-cap,12px)/1.45 var(--f-label,ui-monospace,monospace);letter-spacing:.03em;color:var(--muted);margin-top:12px}
.vh{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* banner frame: header row / centred identity / foot row */
.banner{position:relative;isolation:isolate;display:grid;grid-template-rows:auto 1fr auto;min-height:max(620px,min(100svh,1040px));overflow:clip}
.banner-in{grid-row:2;align-self:center;display:grid;justify-items:center;text-align:center;padding:clamp(20px,4vw,48px) var(--gutter)}
.b-id{margin:0;line-height:0}
.b-id img{margin:0 auto}

/* original Wix motion (measured in v5.1): hover-grow 1.05 / 0.3s; glide-in from the viewport edge; fade+grow on the wordmark */
[data-hover]{transition:scale .3s ease-in-out}
@media (hover:hover){[data-hover]:hover{scale:1.05}}
.js [data-enter]{visibility:hidden}.js [data-enter].in{visibility:visible}
.js .reveal{opacity:0;translate:0 28px;transition:opacity .9s ease,translate .9s cubic-bezier(.2,.7,.2,1)}
.js .reveal.in{opacity:1;translate:0 0}

@media (max-width:899px){ .g12{grid-template-columns:minmax(0,1fr)} .g12>*{grid-column:1/-1!important;grid-row:auto!important} }
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation:none!important;transition:none!important}
  .js [data-enter]{visibility:visible}
  .js .reveal{opacity:1;translate:none}
  [data-hover]:hover{scale:none}
}

/* ---------- editor-driven content (empty + hidden unless the user has APPROVED content for it) ---------- */
.u-notes{padding-top:var(--sec)}
.u-notes-g{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(28px,3.4vw,48px) var(--gap);border-top:1px solid var(--line,rgba(127,127,127,.3));padding-top:clamp(24px,3vw,40px)}
.u-note h3{font:600 13px/1.3 var(--f-label,inherit);letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.u-note p{margin-top:10px;color:var(--ink-2,inherit);max-width:58ch}
.uslot{margin-top:clamp(28px,3.4vw,48px)}
.u-figs{display:grid;gap:clamp(10px,1.4vw,20px)}
.u-figs.u-n2{grid-template-columns:repeat(2,minmax(0,1fr))}.u-figs.u-n3{grid-template-columns:repeat(3,minmax(0,1fr))}
.u-fig img{width:100%;border-radius:var(--r)}
@media (max-width:599px){ .u-notes-g,.u-figs.u-n2,.u-figs.u-n3{grid-template-columns:minmax(0,1fr)} }

/* v5.5 — the site header/footer on a case study use the PROJECT's own typefaces (max two per project). */
:root{--site-sans:var(--f-body,system-ui,sans-serif);--site-serif:var(--f-display,var(--f-body,system-ui,sans-serif));--site-mono:var(--f-label,var(--f-body,system-ui,sans-serif))}
.site-head .name,.sf-name,.sf-end .end-t{font-style:normal}
