/* Case-study pages in the "playground" style of the home page.
   Loaded after site.css (content layouts: galleries, role cards, lightbox) and play.css (tokens, bar, contact). */
:root { --display: var(--sans); --body: var(--sans); --italic: var(--sans); --band-a: var(--bg); --band-b: var(--bg); --band-c: var(--bg); --surface-2: var(--bg); --t1: var(--bg); }
body { background: var(--bg); font-family: var(--sans); }

/* sections: one cream page, no sheets */
.case .sec { background: transparent !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; margin-top: 0 !important; }
.case .sec.s2 { padding-top: clamp(30px, 4vw, 60px); }

/* hero: dotted paper like the home hero */
.case .hero { padding: clamp(110px, 14vw, 150px) 0 clamp(40px, 5vw, 70px);
  background: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 14%, transparent) 1px, transparent 1.6px) 0 0 / 26px 26px, var(--bg) !important; }
.case .lava { display: none; }
.back-pill { display: inline-flex !important; align-items: center; gap: .4rem; padding: .7rem 1.1rem !important; border-radius: 999px; background: var(--card) !important;
  box-shadow: 0 0 0 1.5px var(--line) !important; border: 0 !important; font: 750 .88rem/1 var(--sans) !important; text-decoration: none; transition: transform .25s var(--spring); }
.back-pill:active { transform: scale(.95); }
.case .case-card .tile-top { gap: .6rem; color: var(--ink); font: 750 .78rem/1.3 var(--sans); letter-spacing: .1em; margin-top: 1.4rem; }
.case .case-card .tile-top .num { opacity: 1; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  font: 850 .82rem/1 var(--sans); letter-spacing: 0; rotate: -8deg; box-shadow: 0 8px 16px -8px rgba(0, 0, 0, .45); }
.case .case-card .tile-top .ico { color: var(--deep); }
.case .case-card h1 { position: relative; display: inline-block; text-transform: none !important; font: 900 clamp(2.3rem, 1.3rem + 3.6vw, 4.6rem)/.98 var(--sans) !important;
  letter-spacing: -.045em !important; margin: .7rem 0 clamp(26px, 3vw, 38px); text-wrap: balance; }
.case .case-card h1 .squig { bottom: -.3em; height: .26em; }
.case .roles { gap: .5rem; margin-top: .4rem; }
.case .roles span { font: 650 .9rem/1 var(--sans) !important; padding: .65rem 1rem !important; border: 0 !important; border-radius: 999px; background: var(--card) !important;
  box-shadow: 0 0 0 1.5px var(--line); letter-spacing: 0 !important; }
.case .roles span:nth-child(odd) { rotate: -1.4deg; } .case .roles span:nth-child(even) { rotate: 1.2deg; }
.js .case .roles span { opacity: 0; animation: pop .55s var(--spring) forwards; }
.js .case .roles span:nth-child(2) { animation-delay: .06s; } .js .case .roles span:nth-child(3) { animation-delay: .12s; } .js .case .roles span:nth-child(4) { animation-delay: .18s; }
.js .case .roles span:nth-child(5) { animation-delay: .24s; } .js .case .roles span:nth-child(n+6) { animation-delay: .3s; }
@keyframes pop { from { opacity: 0; scale: .4; } to { opacity: 1; scale: 1; } }

/* summary + facts on the project's own pastel card; the cover is a sticker you can tilt */
.case .case-row { gap: clamp(18px, 2.4vw, 32px); align-items: stretch; }
.case .case-row > .panel { background: var(--t) !important; color: #1b1e45; border: 0 !important; border-radius: 28px !important; box-shadow: 0 18px 40px -26px rgba(27, 30, 69, .5) !important;
  backdrop-filter: none !important; rotate: -.6deg; }
.case .case-row > .panel .summary { font: 500 1.05rem/1.65 var(--sans); text-align: left !important; text-align-last: auto !important; }
.case .case-row > .panel .facts dt { color: #1b1e45 !important; opacity: .65; }
.case .case-row > .panel .facts dd { font-weight: 750; }
.case .case-row > .panel .facts-rule { border-color: rgba(27, 30, 69, .18); }
.case .case-cover { rotate: 1.4deg; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--eo), rotate .5s var(--spring); }
.case .case-cover:not(.framed) .float { border: 8px solid var(--stk-border) !important; border-radius: 22px !important; box-shadow: 0 24px 44px -22px rgba(27, 30, 69, .55) !important; overflow: hidden; }
@media (hover: hover) and (pointer: fine) { .case .case-cover:hover { rotate: 0deg; } }
:root[data-theme="dark"] .case .case-row > .panel { filter: saturate(.85) brightness(.92); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .case .case-row > .panel { filter: saturate(.85) brightness(.92); } }

/* section titles: big, with the hand-drawn underline */
.case .sub h2 { position: relative; display: inline-block; text-transform: none !important; font: 900 clamp(1.9rem, 1.2rem + 2.2vw, 3rem)/1 var(--sans) !important;
  letter-spacing: -.04em !important; margin-bottom: clamp(26px, 3vw, 40px) !important; }
.case .sub h2 .squig { bottom: -.34em; }
.case .sub + .sub { margin-top: clamp(50px, 6vw, 90px); }

/* pictures: rounded, with a little lift when you point at them */
.case .shot, .case .gallery .shot { border-radius: 20px !important; transition: transform .45s var(--spring), box-shadow .4s var(--eo) !important; }
@media (hover: hover) and (pointer: fine) { .case button.shot:hover { transform: translateY(-5px) rotate(-.6deg) !important; box-shadow: 0 30px 50px -28px rgba(27, 30, 69, .55) !important; } }
.case figcaption { font: 600 .86rem/1.5 var(--sans) !important; font-style: normal !important; color: var(--muted); }

/* "my role" and "in numbers": pastel cards, the inner cards are white */
.case .case-body > .panel, .case .side-row > .panel { background: var(--t) !important; color: #1b1e45; border: 0 !important; border-radius: 30px !important; box-shadow: 0 18px 40px -26px rgba(27, 30, 69, .5) !important; backdrop-filter: none !important; }
.case .case-body > .panel h2, .case .side-row > .panel h2 { text-transform: none !important; font: 900 clamp(1.6rem, 1.1rem + 1.4vw, 2.3rem)/1 var(--sans) !important; letter-spacing: -.035em !important; color: #1b1e45; margin-bottom: 1.2rem; }
.case .did-card { background: rgba(255, 255, 255, .72) !important; border: 0 !important; border-radius: 22px !important; box-shadow: none !important; color: #1b1e45; transition: transform .35s var(--spring); }
@media (hover: hover) and (pointer: fine) { .case .did-card:hover { transform: translateY(-3px) rotate(-.4deg); } }
.case .did-card > b, .case .did-col h3 { color: #1b1e45 !important; font-weight: 850 !important; }
.case .did-col h3 { opacity: .7; }
.case .did li, .case .did-pts li, .case .did-card span { color: #1b1e45; }
.case .did-pts li::before, .case .did li::before { background: var(--accent) !important; }
.case .note { color: #1b1e45; }
.case .stats div { background: rgba(255, 255, 255, .72) !important; border: 0 !important; border-radius: 22px !important; box-shadow: none !important; color: #1b1e45; }
.case .stats b { color: var(--accent) !important; font-weight: 900 !important; letter-spacing: -.03em; }
.case .tile-s { background: var(--card) !important; border-radius: 22px !important; border: 0 !important; box-shadow: 0 0 0 1.5px var(--line) !important; }
:root[data-theme="dark"] .case .case-body > .panel, :root[data-theme="dark"] .case .side-row > .panel { filter: saturate(.85) brightness(.92); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .case .case-body > .panel, :root:not([data-theme="light"]) .case .side-row > .panel { filter: saturate(.85) brightness(.92); } }

/* next project: a big card in the next project's colour, its picture as a sticker */
.case .next { position: relative; display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(18px, 3vw, 40px);
  padding: clamp(18px, 2.4vw, 28px) clamp(22px, 3vw, 40px) !important; background: var(--t2) !important; color: #1b1e45 !important; border: 0 !important; border-radius: 32px !important;
  box-shadow: 0 22px 46px -28px rgba(27, 30, 69, .55) !important; backdrop-filter: none !important; text-decoration: none; transition: transform .45s var(--spring) !important; }
.case .next-img { display: block; width: clamp(110px, 16vw, 210px); aspect-ratio: 4/3; border: 7px solid #fff; border-radius: 18px; overflow: hidden; rotate: -5deg; box-shadow: 0 16px 30px -16px rgba(27, 30, 69, .55); transition: rotate .45s var(--spring), scale .45s var(--spring); }
.case .next-img img { width: 100%; height: 100%; object-fit: cover; }
.case .next .label { color: #1b1e45 !important; opacity: .7; font: 750 .78rem/1 var(--sans) !important; letter-spacing: .12em; text-transform: uppercase; }
.case .next b { display: inline-block; margin-top: .5rem; font: 900 clamp(1.4rem, 1rem + 1.6vw, 2.4rem)/1.02 var(--sans) !important; letter-spacing: -.035em; }
.case .next .go { width: 62px !important; height: 62px !important; border-radius: 50%; background: var(--accent) !important; color: #fff !important; display: grid; place-items: center; transition: transform .45s var(--spring) !important; }
.case .next .go .ico { width: 26px; height: 26px; }
@media (hover: hover) and (pointer: fine) { .case .next:hover { transform: translateY(-4px) rotate(-.6deg) !important; } .case .next:hover .next-img { rotate: 3deg; scale: 1.05; } .case .next:hover .go { transform: rotate(-30deg) scale(1.08) !important; } }
.case .next:active { scale: .98; }
:root[data-theme="dark"] .case .next { filter: saturate(.85) brightness(.92); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .case .next { filter: saturate(.85) brightness(.92); } }
@media (max-width: 640px) { .case .next { grid-template-columns: minmax(0, 1fr) auto; } .case .next-img { grid-column: 1 / -1; width: 150px; } }

/* contact follows the last section without a gap */
.case + .reach { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .js .case .roles span { animation: none; opacity: 1; } }
.case .case-card h1 { width: fit-content; max-width: 100%; }
.case :is(.did li, .did-pts li, .did-card span, .note, .sub p) { text-align: left !important; text-align-last: auto !important; }
@media (max-width: 820px) { .case .case-row { display: grid !important; grid-template-columns: 1fr !important; } .case .case-row > .panel { rotate: 0deg; } }
.case .next-h { position: relative; display: inline-block; text-transform: none !important; font: 900 clamp(1.9rem, 1.2rem + 2.2vw, 3rem)/1 var(--sans) !important; letter-spacing: -.04em !important; margin: 0 0 clamp(26px, 3vw, 40px); }
.case .next-h .squig { bottom: -.34em; }

/* colour palette (Quantum) */
.palette { display: grid; gap: .2rem; }
.pal-h { font: 800 .8rem/1 var(--sans) !important; letter-spacing: .16em !important; text-transform: uppercase; color: var(--deep); margin: 1.6rem 0 1rem; }
.pal-h:first-child { margin-top: 0; }
.pal-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); }
.pal-row li { display: grid; gap: .2rem; align-content: start; min-width: 0; }
.sw { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; border: 0; cursor: pointer; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), 0 10px 22px -16px rgba(27, 30, 69, .45); margin-bottom: .55rem; transition: transform .35s var(--spring); }
@media (hover: hover) and (pointer: fine) { .sw:hover { transform: translateY(-4px) rotate(-1deg); } }
.sw:active { transform: scale(.96); }
.sw-ok { position: absolute; inset: auto .5rem .5rem auto; padding: .35rem .6rem; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #1b1e45; font: 750 .72rem/1 var(--sans); opacity: 0; translate: 0 4px; transition: opacity .25s, translate .25s var(--eo); }
.sw.ok .sw-ok { opacity: 1; translate: 0 0; }
.pal-row b { font: 800 .95rem/1.25 var(--sans); }
.pal-row code { font: 500 .78rem/1.45 ui-monospace, "SFMono-Regular", Menlo, monospace; color: var(--muted); overflow-wrap: anywhere; }
.pal-grad { height: clamp(40px, 5vw, 64px); border-radius: 999px; box-shadow: 0 10px 22px -16px rgba(27, 30, 69, .45); }
.pal-note { margin-top: 1rem !important; font: 500 .85rem/1.5 var(--sans); color: var(--muted); }
@media (max-width: 820px) { .pal-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .pal-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
:root[data-theme="dark"] .sw { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 10px 22px -16px rgba(0, 0, 0, .6); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sw { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 10px 22px -16px rgba(0, 0, 0, .6); } }
/* short-form video: three screens side by side, same height */
.case .g-groups { display: grid; grid-template-columns: 1fr 1.9fr; gap: clamp(.8rem, 2vw, 1.4rem); max-width: 1200px; margin-inline: auto; align-items: start; }
.case .g-group { padding: clamp(.8rem, 1.6vw, 1.2rem); border-radius: 26px; background: color-mix(in srgb, var(--t) 45%, transparent); }
.case .g-label { margin: 0 0 .8rem; font: 800 .92rem/1.3 var(--sans); color: #1b1e45; }
.case .g-group .gallery { margin: 0; gap: clamp(.5rem, 1.2vw, .9rem); align-items: start; }
.case .g-tml { grid-template-columns: .5875fr .613fr; }
.case .g-tml3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.case .g-group figcaption { font-size: .82rem; }
:root[data-theme="dark"] .case .g-label { color: var(--ink); }
@media (max-width: 900px) { .case .g-groups { grid-template-columns: minmax(0, 1fr); max-width: 640px; } .case .g-group { min-width: 0; } }

/* short-form video: raw footage next to the results, same height */
.case .g-res { grid-template-columns: .541fr .461fr .5625fr .595fr .628fr; max-width: 1200px; margin-inline: auto; gap: clamp(.7rem, 2vw, 1.4rem); align-items: start; }
@media (max-width: 760px) { .case .g-res { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 44%; gap: 10px; max-width: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; } .case .g-res::-webkit-scrollbar { display: none; } .case .g-res figure { scroll-snap-align: start; } .case .g-res figcaption { font-size: .78rem; } }
.case .g-series { display: flex; flex-wrap: nowrap; justify-content: center; max-width: 1240px; margin-inline: auto; gap: clamp(.8rem, 1.6vw, 1.2rem); }
.case .g-series > figure { flex: 1 1 0; min-width: 0; }
.case .g-series figcaption { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .case .g-series { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .6rem; } .case .g-series > figure { flex: 0 0 62%; scroll-snap-align: center; } }

/* sound toggle on a video with audio */
.case .shot.video { position: relative; }
.case .snd { position: absolute; right: .6rem; bottom: .6rem; z-index: 2; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(20,22,50,.62); color: #fff; cursor: pointer; backdrop-filter: blur(6px); transition: transform .3s var(--spring, ease), background .2s; }
.case .snd:hover { transform: scale(1.08); background: rgba(20,22,50,.8); }
.case .snd svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.case .snd svg path:first-child { fill: currentColor; }
.case .snd .on, .case .snd[aria-pressed="true"] .off { display: none; }
.case .snd[aria-pressed="true"] .on { display: inline; }
.case div.shot { cursor: default; }
.case-body .stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
@media (max-width: 520px) { .case-body .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .case .stats div:last-child:nth-child(odd) { grid-column: 1 / -1; } }
/* the direction: core idea + goals */
.case .brief-idea { font-size: 1rem !important; line-height: 1.7; max-width: none; }
.case .brief { list-style: none; margin: clamp(1rem, 2vw, 1.5rem) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.7rem, 1.4vw, 1rem); }
.case .brief li { display: flex; flex-direction: column; gap: .4rem; padding: 1.1rem 1.2rem; border-radius: 22px; background: color-mix(in srgb, var(--t) 70%, #fff); color: #1b1e45; transition: transform .35s var(--spring); }
@media (hover: hover) and (pointer: fine) { .case .brief li:hover { transform: translateY(-3px) rotate(-.4deg); } }
.case .brief b { font-weight: 850; font-size: 1.02rem; }
.case .brief span { font-size: .95rem; line-height: 1.6; text-align: left; }
:root[data-theme="dark"] .case .brief li { filter: saturate(.85) brightness(.92); }
@media (max-width: 760px) { .case .brief { grid-template-columns: 1fr; } }
/* a group with a single card spans the full width */
.case .did-grid > .did-card:only-child { grid-column: 1 / -1; }
.case .sec.s2 .wrap > .gallery:first-child, .case .sec.s2 .wrap > .tiles:first-child { margin-top: clamp(32px, 5vw, 56px); }
.case .sub > p { margin-inline: 0; }
/* TikTok-style view count on a series cover */
.case .g-series .shot, .case .g-tml3 .shot { position: relative; }
.case .g-tml3 .shot::after, .case .g-series .shot::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); pointer-events: none; }
.case .views { position: absolute; left: .6rem; bottom: .5rem; z-index: 1; display: flex; align-items: center; gap: .3rem; color: #fff; font: 700 .85rem/1 var(--sans); text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.case .views svg { width: .85em; height: .85em; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; }
.case .views .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.case .stats-note { margin: .9rem 0 0; font-size: .92rem; color: #1b1e45; opacity: .8; }
.case .g-life { grid-template-columns: minmax(0, 270px); justify-content: center; }
.case .g-life .shot { position: relative; }
.case .g-life .shot::after { content: ""; position: absolute; inset: auto 0 0 0; height: 22%; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); pointer-events: none; }
.case .views { gap: .55rem; flex-wrap: wrap; }
.case .views > span:not(.sr) { display: inline-flex; align-items: center; gap: .3rem; }
.case .views .lk svg { fill: currentColor; stroke: none; }
@media (max-width: 560px) { .case .g-tml3 .views { font-size: .72rem; gap: .35rem; left: .45rem; } }
/* a category heading (big, underlined) and the smaller titles under it */
.case .sub + .cat-sub { margin-top: clamp(70px, 9vw, 120px); }
.case .cat-sub + .sub { margin-top: 0; }
.case .sub-h { margin: 0 0 .6rem; font: 700 clamp(1.3rem, 1.1rem + .8vw, 1.8rem)/1.15 var(--sans); letter-spacing: -.025em; color: var(--deep); }
.case .cat-sub + .sub .sub-h { margin-top: 0; }
.case .sub-h + p { margin-top: 0; }
/* tabs: personal projects / professional collaborations */
.case .ctabs { position: relative; display: inline-flex; flex-wrap: wrap; gap: .3rem; padding: 6px; margin-bottom: clamp(36px, 5vw, 60px); border-radius: 999px; background: color-mix(in srgb, var(--peri) 30%, var(--bg)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--peri) 55%, transparent); }
.case .ctabs input { position: absolute; opacity: 0; pointer-events: none; }
.case .ctabs label { position: relative; z-index: 1; cursor: pointer; font: 750 clamp(.9rem, .85rem + .25vw, 1.02rem)/1 var(--sans); padding: .9rem 1.25rem; border-radius: 999px; color: var(--ink); transition: color .3s var(--eo); }
.case .ctabs input:checked + label { color: var(--on-accent); }
.case .ctabs input:focus-visible + label { outline: 2.5px solid var(--accent); outline-offset: 3px; }
.case .ct-ind { position: absolute; z-index: 0; left: 0; top: 0; width: 0; height: 0; border-radius: 999px; background: var(--accent); box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--accent) 80%, transparent); transition: left .5s var(--spring), top .5s var(--spring), width .5s var(--spring), height .5s var(--spring); }
:root:not(.js) .case .ctabs input:checked + label { background: var(--accent); }
.case .ct-pane { display: none; }
.case:has(#ct-1:checked) .ct-p1, .case:has(#ct-2:checked) .ct-p2 { display: block; animation: ct-in .5s var(--spring); }
@keyframes ct-in { from { opacity: 0; translate: 0 14px; } }
.case .ct-empty { display: grid; justify-items: start; gap: 1.2rem; padding: clamp(28px, 4vw, 48px); border-radius: 26px; background: color-mix(in srgb, var(--t) 45%, transparent); max-width: 640px; }
.case .ct-empty p { margin: 0; font: 600 clamp(1.05rem, .95rem + .4vw, 1.3rem)/1.5 var(--sans); color: #1b1e45; }
:root[data-theme="dark"] .case .ct-empty p { color: var(--ink); }
@media (max-width: 560px) {
  .case .ctabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-radius: 24px; }
  .case .ctabs label { text-align: center; line-height: 1.2; padding: .75rem .6rem; font-size: .86rem; border-radius: 18px; display: grid; place-items: center; }
  .case .ct-ind { border-radius: 18px; }
}
.case .ct-empty p { hyphens: manual; }
/* the content themes: one clean row each, with real covers; a row opens its videos right underneath */
.case .themes-sub { margin-top: clamp(60px, 7vw, 100px); }
.case .theme { border-top: 1.5px solid var(--line, rgba(27, 30, 69, .14)); }
.case .theme:last-child { border-bottom: 1.5px solid var(--line, rgba(27, 30, 69, .14)); }
.case .th-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; align-items: center; gap: clamp(16px, 3vw, 40px); width: 100%; padding: clamp(18px, 2.4vw, 26px) 0; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.case .th-txt { display: grid; grid-template-columns: auto 1fr; column-gap: .9rem; row-gap: .25rem; align-items: baseline; }
.case .th-n { grid-row: 1 / span 2; font: 800 .85rem/1.6 var(--sans); color: var(--accent); }
.case .th-txt b { font: 850 clamp(1.2rem, 1rem + .8vw, 1.65rem)/1.15 var(--sans); letter-spacing: -.02em; }
.case .th-d { font: 450 .95rem/1.5 var(--sans); color: var(--muted); }
.case .th-c { justify-self: start; margin-top: .3rem; padding: .35rem .65rem; border-radius: 999px; background: color-mix(in srgb, var(--peri) 35%, transparent); font: 750 .74rem/1 var(--sans); }
.case .th-imgs { display: flex; gap: 8px; }
.case .th-imgs img { width: clamp(58px, 6.2vw, 84px); aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; box-shadow: 0 6px 14px -8px rgba(27, 30, 69, .45); transition: translate .35s var(--spring); }
.case .th-go { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #1b1e45; color: #fff; font: 800 1.05rem/1 var(--sans); transition: rotate .4s var(--spring), background .2s; }
@media (hover: hover) and (pointer: fine) { .case .th-row:hover .th-imgs img { translate: 0 -4px; } .case .th-row:hover .th-imgs img:nth-child(2) { transition-delay: .03s; } .case .th-row:hover .th-imgs img:nth-child(3) { transition-delay: .06s; } .case .th-row:hover .th-imgs img:nth-child(4) { transition-delay: .09s; } }
.case .th-row[aria-expanded="true"] .th-go { rotate: 180deg; background: var(--accent); }
:root[data-theme="dark"] .case .th-go { background: var(--ink); color: var(--bg); }
.case .theme .cat-panel { padding: 0 0 clamp(36px, 5vw, 60px); }
.case .theme .cat-panel > .sub:first-child { margin-top: .4rem; }
@media (max-width: 760px) {
  .case .th-row { grid-template-columns: minmax(0, 1fr) 40px; row-gap: 14px; }
  .case .th-imgs { grid-column: 1 / -1; grid-row: 2; }
  .case .th-imgs img { width: calc((100% - 24px) / 4); max-width: 84px; }
  .case .th-go { grid-column: 2; grid-row: 1; width: 40px; height: 40px; }
}
.case .cat-panel { scroll-margin-top: 90px; }
.case .cat-panel:not([hidden]) { animation: ct-in .6s var(--spring); }
/* inside an open theme: one calm box, smaller titles than the row above it */
.case .theme .cat-panel { padding: clamp(20px, 3vw, 34px); margin: 0 0 clamp(22px, 3vw, 32px); border-radius: 26px; background: color-mix(in srgb, var(--ink) 5%, var(--bg)); }
.case .theme .cat-panel > .sub { margin-top: 0; }
.case .theme .cat-panel > .sub + .sub { margin-top: clamp(30px, 4vw, 48px); padding-top: clamp(30px, 4vw, 48px); border-top: 1.5px solid var(--line); }
.case .theme .sub-h { position: relative; margin: 0 0 .45rem; font: 800 clamp(1.05rem, .98rem + .3vw, 1.2rem)/1.25 var(--sans); letter-spacing: -.01em; color: var(--ink); }
.case .theme .sub-h::before { content: ""; position: absolute; left: -16px; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.case .theme .cat-panel .sub > p { font-size: .95rem; line-height: 1.65; max-width: 70ch; margin: 0 0 1.2rem; }
.case .theme .cat-panel figcaption { font-size: .8rem; }
.case .theme .g-group { background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
.case .g-life { grid-template-columns: minmax(0, 170px); justify-content: start; }
@media (max-width: 760px) { .case .g-life { grid-template-columns: minmax(0, 160px); } }
.case .side-row > .panel { justify-content: center !important; } .case .side-row > .panel > .did { margin-block: 0 !important; }
.case .brief-sub + .gallery { margin-top: clamp(40px, 5vw, 64px); }
.case .sec.s3 { padding-top: clamp(16px, 2vw, 30px); }
.case .sec.s2:has(+ .sec.s3) { padding-bottom: clamp(36px, 4.5vw, 64px); }
.case .hero::before { opacity: .35; }
.case .brief-sub + .side-row { margin-top: clamp(40px, 5vw, 64px); }
/* colour swatches inside a direction card */
.case .b-sw { display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
.case .b-sw i { display: grid; gap: .15rem; font-style: normal; }
.case .b-sw i::before { content: ""; width: 54px; height: 38px; border-radius: 10px; background: var(--c); box-shadow: inset 0 0 0 1.5px rgba(27, 30, 69, .12); }
.case .b-sw em { font: 750 .72rem/1.2 var(--sans); font-style: normal; }
.case .b-sw small { font: 600 .66rem/1 var(--sans); opacity: .65; letter-spacing: .03em; }
.case .b-sw { gap: .9rem; } .case .b-sw i { justify-items: start; }
.case .b-sw { gap: .7rem; margin-top: .35rem; }
.case .b-sw i::before { width: 36px; height: 26px; border-radius: 7px; }
.case .b-sw em { font-size: .64rem; }
.case .b-sw small { font-size: .58rem; }
.case .th-imgs img.wide { width: clamp(96px, 10vw, 136px); aspect-ratio: 8 / 5; }
.case .th-sw { width: clamp(40px, 4.2vw, 56px); aspect-ratio: 4 / 5; border-radius: 10px; background: var(--c); box-shadow: inset 0 0 0 1.5px rgba(27, 30, 69, .14), 0 6px 14px -8px rgba(27, 30, 69, .45); }
@media (max-width: 760px) { .case .th-imgs img.wide { width: calc((100% - 8px) / 2); max-width: 150px; } .case .th-sw { width: calc((100% - 24px) / 4); max-width: 60px; } }
/* 404 page */
.nf { min-height: 60vh; display: grid; align-content: center; justify-items: start; gap: .9rem; }
.nf .nf-n { font: 800 clamp(4rem, 12vw, 8rem)/1 var(--display, inherit); margin: 0; color: var(--c1); }
.nf h1 { margin: 0; }
.nf p { margin: 0; }
/* phones: the theme rows are just the title and description; the pictures show once a row is opened */
@media (max-width: 760px) { .case .th-imgs { display: none; } .case .th-row { row-gap: 0; } }
/* phones: cards that sit side by side on a laptop become a swipe row (the next card peeks in), so the page stays short */
@media (max-width: 760px) {
  .case .brief, .case .did-cols { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 84%; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
  .case .brief::-webkit-scrollbar, .case .did-cols::-webkit-scrollbar { display: none; }
  .case .brief li, .case .did-col { scroll-snap-align: start; }
  .case .brief li { padding: 1rem 1.05rem; }
  .case .brief span { font-size: .9rem; line-height: 1.55; }
  /* the website's three lists (style, interactive features, technology) each get their own little card */
  .case .did-col, .case .did-col + .did-col { border: 0; padding: .9rem 1rem; border-radius: 16px; background: color-mix(in srgb, var(--t, #fff) 22%, #fff); }
  .case .did-pts li { font-size: .9rem; line-height: 1.5; }
  .case .swipe-hint { display: block; }
}
/* phones: galleries with several pictures of the same kind become a carousel: all pictures the same height, arrows to move */
.case .g-res, .case .g-series, .case .g-tml3 { --mh: 300px; } .case .g-trio { --mh: 230px; }
.mcar-w { position: relative; min-width: 0; width: 100%; max-width: 100%; }
.mcar-b { display: none; }
@media (max-width: 760px) {
  .case .gallery.mcar { width: 100%; min-width: 0; display: flex !important; gap: 10px !important; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; max-width: none !important; margin-inline: 0 !important; padding-bottom: 4px; }
  .case .gallery.mcar::-webkit-scrollbar { display: none; }
  .case .gallery.mcar > figure { flex: none; width: auto !important; max-width: none !important; margin: 0 !important; scroll-snap-align: start; translate: none !important; rotate: none !important; }
  .case .gallery.mcar img, .case .gallery.mcar video { height: var(--mh) !important; width: auto !important; max-width: none !important; aspect-ratio: auto !important; object-fit: cover; }
  .case .gallery.mcar figcaption { width: 0; min-width: 100%; font-size: .78rem; }
  .mcar-b { position: absolute; z-index: 3; top: calc(var(--mh) / 2); translate: 0 -50%; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--ink); color: var(--bg); font: 800 1.2rem/1 var(--sans, sans-serif); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .45); cursor: pointer; }
  .mcar-b.mcar-p { left: -8px; } .mcar-b.mcar-n { right: -8px; }
  .mcar-b[hidden] { display: none; }
}
/* phones: each colour family fits on one line: small square swatches, the name and the HEX (RGB and CMYK stay on larger screens) */
@media (max-width: 820px) {
  .pal-row { grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
  .pal-row .sw { aspect-ratio: 1; border-radius: 12px; }
  .pal-row b { font-size: .68rem; line-height: 1.2; margin-top: .25rem; hyphens: auto; }
  .pal-row code { font-size: .58rem; }
  .pal-row code + code { display: none; }
  .sw-ok { inset: auto 50% 50% auto; translate: 50% 50% !important; padding: .25rem .4rem; font-size: .55rem; }
}
/* the text swipe rows (direction cards, role lists) get smaller, quieter arrows, centred on the cards */
@media (max-width: 760px) {
  .mcar-w.soft .mcar-b { top: 50%; width: 32px; height: 32px; font-size: 1rem; background: color-mix(in srgb, var(--ink) 72%, transparent); box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .4); }
  .mcar-w.soft .mcar-b.mcar-p { left: -6px; } .mcar-w.soft .mcar-b.mcar-n { right: -6px; }
}
