@font-face { font-family: "Reglo"; src: url(assets/Reglo-Bold.otf) format("opentype"); font-weight: 700; font-display: swap; }

/* One system for every page: a single accent per surface, one left edge, the pixel font only for small labels,
   the tilted pill used once per page, quiet motion. --side keeps content 1290px wide on full-width backgrounds. */
:root { --blue: #371deb; --lime: #aaff03; --accent: var(--lime); --line: rgba(255,255,255,.16); --label-font: Array, sans-serif;
  --side: max(75px, calc(50% - 645px)); --ease: cubic-bezier(.2,0,0,1); }
* { box-sizing: border-box; margin: 0; }
body { background: var(--blue); color: #fff; font-family: Inter, sans-serif; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.page { position: relative; }

/* Shared type */
.reglo { font-family: Reglo, sans-serif; font-weight: 700; line-height: normal; text-box: trim-both cap alphabetic; white-space: nowrap; }
.array { font-family: Array, sans-serif; font-weight: 400; line-height: normal; }
.label { font: 400 13px/1 var(--label-font); letter-spacing: .16em; text-transform: uppercase; }
.title { display: flex; align-items: center; gap: 10px; font-size: 64px; }
/* text-box trims the font's extra space above caps so the padding centres the text, as in Figma */
.pill { --r: -5deg; display: inline-block; background: var(--lime); color: #000; border-radius: 15px; padding: 12px 10px; margin: 12px 0; text-box: trim-both cap alphabetic; transform: rotate(var(--r)); }
.pill.cw { --r: 5deg; }
.hero .pill { animation: wiggle 4s ease-in-out infinite; } /* the one idle animation on the page, as requested */
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(var(--r)); } 85% { transform: rotate(calc(var(--r) + 4deg)); } 90% { transform: rotate(calc(var(--r) - 3deg)); } 95% { transform: rotate(calc(var(--r) + 1deg)); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* Section eyebrow (numbered label + hairline) and heading whose second line takes the accent */
.eyebrow { display: flex; align-items: center; gap: 16px; color: var(--accent); }
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.eyebrow + * { margin-top: -16px; } /* keep each eyebrow tight to the heading it introduces */
.h2 { font: 700 52px/1.05 Reglo, sans-serif; text-transform: uppercase; }
.h2 em { display: block; font-style: normal; color: var(--accent); }

/* Nav */
/* The nav stays pinned while you scroll. Once you leave the top it tightens and gets a frosted backdrop in the
   page colour, so it stays readable over white sections too. z-index sits just under the reading-progress bar. */
.nav { position: fixed; inset: 0 0 auto; z-index: 9; display: flex; justify-content: space-between; align-items: center; padding: 32px 40px;
  transition: padding .3s var(--ease), background-color .3s, box-shadow .3s; }
.nav.scrolled { padding-block: 16px; background: color-mix(in srgb, var(--bg, var(--blue)) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.nav .logo { color: var(--accent); font-size: 36px; text-box: trim-both cap alphabetic; }
.nav ul { display: flex; gap: 32px; list-style: none; padding: 0; font: 600 18px/1 "Clash Display", sans-serif; letter-spacing: .01em; }
.nav a { display: block; transition: color .15s; }
.nav a:focus-visible { color: var(--accent); }
.nav ul a[href] { position: relative; }
.nav ul a[href]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav ul a:focus-visible::after { transform: scaleX(1); }

/* Hero */
.hero { position: relative; height: 959px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 10px; text-align: center; }
.hero-bg { position: absolute; left: 0; top: -78px; width: 100%; height: 1037px; object-fit: cover; opacity: .1; max-width: none; }
.hero > :not(.hero-bg) { position: relative; }
.hero .name { font-size: min(128px, 8.89vw); letter-spacing: -0.02em; }
.hero .tagline { text-wrap: balance; width: 560px; max-width: 100%; margin-top: 20px; font-size: 20px; line-height: 1.6; color: rgba(255,255,255,.78); }
/* Hero entrance is CSS, not GSAP: it starts with the first paint, so the text never flashes before animating */
.hero > :not(.hero-bg) { animation: rise .6s var(--ease) both; }
.hero .name { animation-delay: .1s; }
.hero .tagline { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; translate: 0 20px; } }

/* Work */
.work { --accent: var(--blue); --line: rgba(0,0,0,.12); display: flex; flex-direction: column; gap: 72px; padding: 140px var(--side); background: #fff; color: #111; }
.section-head { display: flex; flex-direction: column; gap: 40px; }
.row { display: flex; gap: 40px; align-items: flex-start; }
.card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card img { width: 100%; height: auto; margin-bottom: 14px; border-radius: 16px; transition: transform .3s var(--ease); }
.card .label { color: var(--blue); }
.card h3 { font: 600 24px/1.3 Inter, sans-serif; letter-spacing: -.01em; transition: color .15s; }
.card p { font-size: 17px; line-height: 1.5; color: #666; }
.card .tall { aspect-ratio: 488 / 557; object-fit: cover; }

/* About */
.about { position: relative; height: 959px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 40px; padding: 25px var(--side);
  background: url("data:image/svg+xml;utf8,<svg viewBox='0 0 1440 959' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><rect x='0' y='0' height='100%' width='100%' fill='url(%23grad)' opacity='1'/><defs><radialGradient id='grad' gradientUnits='userSpaceOnUse' cx='0' cy='0' r='10' gradientTransform='matrix(-120.8 48.65 -73.051 -181.39 1533.5 364)'><stop stop-color='rgba(55,29,235,1)' offset='0'/><stop stop-color='rgba(41,22,176,0.75)' offset='0.25'/><stop stop-color='rgba(28,15,118,0.5)' offset='0.5'/><stop stop-color='rgba(14,7,59,0.25)' offset='0.75'/><stop stop-color='rgba(0,0,0,0)' offset='1'/></radialGradient></defs></svg>") 0 0 / 100% 100%, #000; }
.about > * { position: relative; }
/* Greeting: a circular portrait on the right with a speech bubble above it */
.about .hello { position: absolute; right: var(--side); top: 50%; translate: 0 -50%; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.hello-photo { width: min(420px, 30vw); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 8px rgba(255,255,255,.06), 0 30px 80px rgba(55,29,235,.45); }
.hello-bubble { position: relative; padding: 14px 22px; border-radius: 20px; background: var(--lime); color: #000; font: 600 22px/1 Inter, sans-serif; rotate: -4deg; }
.hello-bubble::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 18px; height: 18px; margin-left: -9px; border-radius: 3px; background: inherit; rotate: 45deg; }
.about .bio { display: flex; flex-direction: column; gap: 16px; max-width: min(520px, 45vw); font-size: 18px; line-height: 1.6; color: rgba(255,255,255,.78); }
.about .tools-label { color: rgba(255,255,255,.6); }
.about .eyebrow { max-width: min(560px, 45vw); } /* stop the hairline before it reaches the portrait */
.tools { display: flex; gap: 8px; margin-top: -24px; list-style: none; padding: 0; }
.tools li { padding: 9px; border-radius: 100px; background: #fff; transition: transform .2s var(--ease); }
.tools img { width: 16px; height: 16px; }

/* Contact */
.contact { display: flex; flex-direction: column; align-items: center; gap: 40px; padding: 120px var(--side) 75px; overflow: hidden; }
.contact-inner { width: 100%; display: flex; flex-direction: column; gap: 96px; }
.spread { display: flex; justify-content: space-between; align-items: center; }
.contact .logo { color: var(--accent); font-size: 36px; }
.contact .spread.end { align-items: flex-end; }
.contact .note { font-size: 17px; line-height: 1.6; text-align: right; color: rgba(255,255,255,.78); }
.links { display: flex; gap: 40px; }
.links a { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.3); }
/* Hover/focus: a lime line sweeps across the top, the title turns lime and the arrow fills solid */
.links a::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: var(--lime); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.links .link-title { font: 600 28px/1.2 Inter, sans-serif; transition: color .2s; }
.links .arrow { padding: 8px; border: 1px solid rgba(255,255,255,.4); border-radius: 100px; transition: background .2s, border-color .2s; }
.links .arrow img { width: 20px; height: 20px; transition: transform .2s var(--ease), filter .2s; }
.links small { font-size: 15px; color: rgba(255,255,255,.65); transition: color .2s; }
.links a:focus-visible { outline: none; }
.links a:focus-visible::before { transform: scaleX(1); }
.links a:focus-visible .link-title { color: var(--lime); }
.links a:focus-visible .arrow { border-color: var(--lime); background: var(--lime); }
.links a:focus-visible .arrow img { filter: brightness(0); }
.bigname { color: var(--lime); font-size: min(163px, 11.32vw); letter-spacing: -0.02em; }

/* Hover effects only on devices with a real pointer, and only on things you can actually click */
@media (hover: hover) {
  .nav a[href]:hover { color: var(--accent); }
  .nav ul a[href]:hover::after { transform: scaleX(1); }
  a.card:hover img { transform: translateY(-4px); }
  a.card:hover h3 { color: var(--blue); }
  .links a[href]:hover::before { transform: scaleX(1); }
  .links a[href]:hover .link-title { color: var(--lime); }
  .links a[href]:hover small { color: #fff; }
  .links a[href]:hover .arrow { border-color: var(--lime); background: var(--lime); }
  .links a[href]:hover .arrow img { filter: brightness(0); transform: translate(2px, -2px) scale(1.1); }
}
a.card:active img { transform: translateY(-1px) scale(.99); transition-duration: .1s; }

@media (max-width: 900px) {
  .nav { padding: 20px; }
  .nav.scrolled { padding-block: 12px; }
  .nav ul { font-size: 15px; gap: 16px; }
  .nav .logo, .contact .logo { font-size: 28px; }
  .hero, .about { height: auto; min-height: 100svh; }
  .title { font-size: 34px; flex-wrap: wrap; }
  .h2 { font-size: 34px; }
  .hero .tagline { font-size: 17px; }
  .work { gap: 56px; padding: 72px 20px; }
  .row { flex-direction: column; gap: 56px; }
  .card { width: 100%; }
  .about { padding: 120px 20px 60px; }
  .about .eyebrow, .about .bio { max-width: none; }
  .about .bio { font-size: 17px; }
  .about .hello { position: static; translate: none; }
  .hello-photo { width: 220px; }
  .hello-bubble { font-size: 18px; }
  .contact { padding: 72px 20px 40px; }
  .contact-inner { gap: 56px; }
  .contact .spread.end { flex-direction: column; align-items: flex-start; gap: 20px; }
  .contact .note { text-align: left; }
  .links { flex-direction: column; gap: 32px; }
}

/* ===== Case studies =====
   Editorial system: one accent (orange), one left edge, pixel font only for small labels,
   brand pill reserved for the hero, quiet motion. */
.cs { --accent: #ffa600; --on-accent: #121212; --bg: #121212; --ink: #f8f8f8; --muted: rgba(248,248,248,.68); --faint: rgba(248,248,248,.5); --line: rgba(255,255,255,.12);
  --surface: #1a1a1a; --surface-line: rgba(255,255,255,.06); --chip: rgba(255,255,255,.18); --dot: rgba(255,255,255,.3); --track: rgba(255,255,255,.08); --fill: rgba(255,255,255,.45); --tint: rgba(255,166,0,.06); --ring: rgba(255,166,0,.2);
  background: var(--bg); color: var(--ink); }
/* Light theme for brands that live on white (Postie) */
.cs.light { --accent: #166d38; --on-accent: #fff; --bg: #fff; --ink: #111; --muted: rgba(17,17,17,.7); --faint: rgba(17,17,17,.5); --line: rgba(0,0,0,.12);
  --surface: #f7f2e8; --surface-line: rgba(0,0,0,.05); --chip: rgba(0,0,0,.18); --dot: rgba(0,0,0,.25); --track: rgba(0,0,0,.07); --fill: rgba(0,0,0,.3); --tint: rgba(22,109,56,.06); --ring: rgba(22,109,56,.18); }
.cs .pill { background: var(--accent); color: var(--on-accent); --r: -1deg; }
.cs .pill.cw { --r: 1deg; }

/* Hero */
.cs-hero { height: auto; display: flex; flex-direction: column; align-items: center; gap: 36px; padding: 168px var(--side) 96px; text-align: center; }
.cs-hero .title { flex-wrap: wrap; justify-content: center; }
.cs-kicker { color: var(--accent); }
.cs-lede { width: 760px; max-width: 100%; font-size: 20px; line-height: 1.6; color: var(--muted); }
.cs-meta { display: flex; gap: 40px; width: 100%; max-width: 1040px; margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); list-style: none; text-align: left; }
.cs-meta li { flex: 1; display: flex; flex-direction: column; gap: 12px; color: var(--faint); }
.cs-meta strong { font: 500 17px/1.4 Inter, sans-serif; letter-spacing: 0; text-transform: none; color: var(--ink); }
.cs-band img { width: 100%; height: auto; }

/* Stats */
.cs-stats { display: grid; grid-template-columns: repeat(4, 1fr); padding: 80px var(--side) 0; list-style: none; }
.cs-stats li { display: flex; flex-direction: column; gap: 12px; padding: 4px 32px; border-left: 1px solid var(--line); }
.cs-stats li:first-child { border-left: 0; padding-left: 0; }
.cs-stats strong { font: 700 44px/1 Reglo, sans-serif; color: var(--ink); }
.cs-stats li > span { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* Body: chapter rail + content column */
.cs-body { display: grid; grid-template-columns: 200px minmax(0, 1040px); justify-content: center; gap: 96px; padding: 140px 25px; align-items: start; }
.cs-body > nav { position: sticky; top: 110px; } /* the nav (grid item) sticks; the list alone has no room to move */
.cs-toc { position: relative; display: flex; flex-direction: column; gap: 2px; padding-left: 28px; list-style: none; counter-reset: toc; --p: 0; }
/* Progress rail: grey track, orange fill grows to the current chapter (--p, set by JS) */
.cs-toc::before, .cs-toc::after { content: ""; position: absolute; left: 6px; top: 20px; bottom: 20px; width: 2px; background: var(--line); }
.cs-toc::after { background: var(--accent); transform: scaleY(var(--p)); transform-origin: top; transition: transform .45s var(--ease); }
.cs-toc a { position: relative; display: block; white-space: nowrap; padding: 10px 0; font: 400 14px/20px var(--label-font); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); opacity: .4; counter-increment: toc; transition: opacity .2s, transform .2s var(--ease); }
.cs-toc a::before { content: "0" counter(toc); margin-right: 12px; color: var(--accent); }
/* Chapter dot on the rail: hollow ahead, filled once read, ringed for the current one */
.cs-toc a::after { content: ""; position: absolute; z-index: 1; left: -27px; top: 50%; width: 12px; height: 12px; margin-top: -6px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--dot); background: var(--bg); transition: transform .25s var(--ease), background .2s, border-color .2s, box-shadow .2s; }
.cs-toc a.is-done { opacity: .7; }
.cs-toc a.is-done::after { background: var(--accent); border-color: var(--accent); }
.cs-toc a.is-active { opacity: 1; }
.cs-toc a.is-active::after { background: var(--accent); border-color: var(--accent); transform: scale(1.25); box-shadow: 0 0 0 5px var(--ring); }

.cs-main { display: flex; flex-direction: column; gap: 160px; min-width: 0; }
.cs-section { display: flex; flex-direction: column; gap: 48px; scroll-margin-top: 100px; }
.cs-text { font-size: 17px; line-height: 1.65; max-width: 640px; color: var(--muted); }
.cs-split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 80px; align-items: end; }

.cs-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; counter-reset: card; }
.cs-cards.stack { grid-template-columns: 1fr; gap: 32px; }
.cs-card { display: flex; flex-direction: column; gap: 10px; padding-top: 24px; border-top: 1px solid var(--line); }
.cs-card::before { counter-increment: card; content: "0" counter(card); margin-bottom: 6px; font: 400 13px/1 var(--label-font); letter-spacing: .16em; color: var(--accent); }
.cs-card h3 { font: 600 20px/1.3 Inter, sans-serif; }
.cs-card p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.cs-card.cs-win { padding: 28px 32px; border: 0; border-left: 2px solid var(--accent); background: var(--tint); }
.cs-card.cs-win::before { content: "Result"; counter-increment: none; text-transform: uppercase; }

.cs-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--chip); border-radius: 100px; font: 500 13px/1 Inter, sans-serif; letter-spacing: .02em; color: var(--ink); }
.cs-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cs-tag.alt { border-color: var(--accent); }
.cs-tag.muted::before { background: var(--fill); }
.cs-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.cs-quote { max-width: 760px; padding: 2px 0 2px 24px; border-left: 2px solid var(--accent); font-size: 20px; line-height: 1.55; }
.cs-block { display: flex; flex-direction: column; gap: 20px; }
.cs-fig { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.cs-fig img { width: 100%; height: auto; padding: 24px; border: 1px solid var(--surface-line); border-radius: 14px; background: var(--surface); }
.cs-fig figcaption { font-size: 13px; line-height: 1.5; color: var(--faint); }

.cs-round { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; align-items: start; margin-top: 8px; }
.cs-round img { width: 260px; height: auto; border-radius: 14px; }
.cs-bars { display: flex; flex-direction: column; gap: 16px; max-width: 760px; list-style: none; }
.cs-bars li { display: grid; grid-template-columns: 110px minmax(0, 1fr) 52px; align-items: center; gap: 24px; font: 500 15px/1 Inter, sans-serif; color: var(--muted); }
.cs-bars .track { display: block; height: 10px; border-radius: 5px; background: var(--track); overflow: hidden; }
.cs-bars .fill { display: block; height: 100%; width: var(--w); border-radius: 5px; background: var(--fill); transform-origin: left; }
.cs-bars.b .fill { background: var(--accent); }
.cs-bars time { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.cs-big-quote { max-width: 860px; font: 500 34px/1.3 Inter, sans-serif; letter-spacing: -.01em; }

.cs-final { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 80px; align-items: center; }
.cs-final img { width: 300px; height: auto; }
.cs-final ul { padding-left: 1.1em; font-size: 17px; line-height: 1.9; color: var(--muted); }
.cs-sub { font: 600 24px/1.3 Inter, sans-serif; }
.cs-impact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.cs-impact div { display: flex; flex-direction: column; gap: 10px; padding-top: 24px; border-top: 1px solid var(--line); }
.cs-impact h3 { font: 600 18px/1.3 Inter, sans-serif; }
.cs-impact p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.cs-found { display: flex; flex-direction: column; gap: 18px; padding: 56px; border: 1px solid var(--surface-line); border-radius: 16px; background: var(--surface); }
.cs-found .label { color: var(--accent); }
.cs-found p:last-child { font: 500 30px/1.35 Inter, sans-serif; letter-spacing: -.01em; color: var(--ink); }
.cs-back { display: flex; width: max-content; align-items: center; gap: 12px; margin: 0 auto 120px; padding-bottom: 6px; border-bottom: 1px solid var(--line); font: 500 18px/1 Inter, sans-serif; transition: border-color .2s; }
.cs-back span { display: inline-block; color: var(--accent); transition: transform .2s var(--ease); }
.cs-progress { position: fixed; inset: 0 0 auto; z-index: 10; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; pointer-events: none; }

@media (hover: hover) {
  .cs-toc a:hover { opacity: 1; transform: translateX(3px); }
  .cs-toc a:hover::after { transform: translateX(-3px) scale(1.25); border-color: var(--accent); } /* cancel the nudge so the dot stays on the rail */
  .cs-back:hover { border-color: var(--accent); }
  .cs-back:hover span { transform: translateX(-6px); }
}

@media (max-width: 900px) {
  .cs-hero { padding: 120px 20px 56px; gap: 24px; }
  .cs-hero .title, .cs-hero .pill { white-space: normal; } /* long hero pills (Postie) must wrap on phones */
  .cs-lede { font-size: 17px; }
  .cs-meta { flex-direction: column; gap: 20px; margin-top: 16px; }
  .cs-stats { grid-template-columns: 1fr 1fr; gap: 32px 0; padding: 56px 20px 0; }
  .cs-stats li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .cs-stats strong { font-size: 32px; }
  .cs-body { grid-template-columns: 1fr; padding: 72px 20px 80px; }
  .cs-body > nav { display: none; }
  .cs-main { gap: 96px; }
  .cs-section { gap: 32px; }
  .cs-split, .cs-round, .cs-final { grid-template-columns: 1fr; gap: 32px; }
  .cs-cards, .cs-impact { grid-template-columns: 1fr; gap: 28px; }
  .cs-fig img { padding: 12px; }
  .cs-round img, .cs-final img { width: 100%; max-width: 300px; }
  .cs-bars li { grid-template-columns: 64px minmax(0, 1fr) 40px; gap: 12px; font-size: 13px; }
  .cs-big-quote { font-size: 24px; }
  .cs-found { padding: 32px 24px; }
  .cs-found p:last-child { font-size: 21px; }
}

/* Case-study building blocks used by Postie (and available to later studies) */
.cs-cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-cards.four, .cs-steps.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cs-card ul, .cs-card ol { padding-left: 1.1em; font-size: 15px; line-height: 1.7; color: var(--muted); }
.cs-mood { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; list-style: none; }
.cs-mood li { display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.cs-mood .bar { display: flex; align-items: flex-end; height: 160px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.cs-mood .bar span { width: 100%; height: var(--h); border-radius: 8px 8px 0 0; background: var(--accent); transform-origin: bottom; }
.cs-mood .dip .bar span { background: var(--fill); }
.cs-mood strong { font: 600 16px/1.3 Inter, sans-serif; color: var(--ink); }
.cs-scroll { overflow-x: auto; max-width: 100%; } /* max-width: inside a flex column the box would otherwise grow to the table width */
.cs-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.cs-table th, .cs-table td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--muted); }
.cs-table thead th { font: 400 13px/1 var(--label-font); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.cs-table tbody th { font-weight: 600; color: var(--ink); }
.cs-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; list-style: none; counter-reset: step; }
.cs-steps li { display: flex; flex-direction: column; gap: 8px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.6; color: var(--muted); counter-increment: step; }
.cs-steps li::before { content: "0" counter(step); font: 400 13px/1 var(--label-font); letter-spacing: .16em; color: var(--accent); }
.cs-steps li.key { border-top: 2px solid var(--accent); }
.cs-steps strong { font: 600 18px/1.3 Inter, sans-serif; color: var(--ink); }
.cs-steps em { font: 400 12px/1 var(--label-font); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.cs-swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; list-style: none; }
.cs-swatches li { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
.cs-swatches li::before { content: ""; height: 120px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--c); }
.cs-swatches code { font: 400 13px/1 Inter, sans-serif; color: var(--faint); }
.cs-media { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 80px; align-items: center; }
.cs-media img { width: 100%; height: auto; }
@media (max-width: 900px) {
  .cs-cards.two, .cs-cards.four, .cs-steps, .cs-steps.four, .cs-media { grid-template-columns: 1fr; gap: 28px; }
  .cs-mood { gap: 10px; }
  .cs-mood li { font-size: 12px; }
  .cs-mood strong { font-size: 13px; }
  .cs-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cs-media img { max-width: 300px; }
}
.cs-caption { font-size: 13px; line-height: 1.5; color: var(--faint); }

/* Book theme: the case study wears the book's own materials (cream paper, ink, Amatica SC + EB Garamond) */
.cs.light.book { --accent: #0a0a0a; --on-accent: #faf7f0; --bg: #faf7f0; --ink: #0a0a0a; --muted: rgba(10,10,10,.72); --faint: rgba(74,70,62,.85);
  --surface: #efe8d8; --tint: #efe8d8; --ring: rgba(10,10,10,.15); --label-font: "EB Garamond", serif; font-family: "EB Garamond", serif; }
.book .cs-hero .title, .book .h2 { font-family: "Amatica SC", cursive; font-weight: 700; text-transform: none; letter-spacing: .02em; }
.book .cs-hero .title { font-size: 128px; line-height: .95; white-space: normal; }
/* Title types itself out: hidden letters keep their space, so the centred line never shifts while it types */
.book .title .ch { visibility: hidden; white-space: pre-wrap; }
.book .title .ch.on { visibility: visible; }
.book .title .ch.at { position: relative; }
.book .title .ch.at::after { content: ""; position: absolute; right: -.06em; top: .08em; bottom: .02em; width: .05em; border-radius: 1px; background: currentColor; animation: caret .9s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.book .h2 { font-size: 72px; line-height: 1; }
.book .cs-text, .book .cs-card p, .book .cs-card li, .book .cs-quote, .book .cs-steps li { font-size: 19px; }
.book .cs-card h3, .book .cs-steps strong, .book .cs-stats strong, .book .cs-big-quote { font-family: "Amatica SC", cursive; font-weight: 700; letter-spacing: .02em; }
.book .cs-card h3 { font-size: 30px; line-height: 1.1; }
.book .cs-stats strong { font-size: 56px; }
.book .cs-big-quote { font-size: 52px; line-height: 1.1; }
.book .cs-found { background: #0a0a0a; color: #faf7f0; border: 0; }
.book .cs-found .label { color: #efe8d8; }
.book .cs-found p:last-child { color: #faf7f0; font: italic 400 28px/1.4 "EB Garamond", serif; }
.book .label { font-size: 15px; letter-spacing: .12em; }
.book .cs-toc a { font-size: 17px; }
.book .cs-sub { font: 600 28px/1.2 "EB Garamond", serif; }
.book .cs-meta strong, .book .cs-table { font-family: "EB Garamond", serif; font-size: 18px; }
.cs-card h4 { margin-top: 10px; font: 400 13px/1 var(--label-font); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.type-amatica { font: 700 44px/1 "Amatica SC", cursive !important; }
.type-garamond { font: 400 40px/1 "EB Garamond", serif !important; }
@media (max-width: 900px) {
  .book .cs-hero .title { font-size: 72px; }
  .book .h2 { font-size: 46px; }
  .book .cs-big-quote { font-size: 34px; }
}

/* Picture-book data pages (book case study): bold ink-on-paper pictograms, patterns and outlined captions */
.pb-defs { position: absolute; width: 0; height: 0; }
.pb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.pb-page { display: flex; flex-direction: column; gap: 28px; padding: 40px; border: 2px solid var(--ink); background: #fff; }
.pb-page.wide { grid-column: 1 / -1; }
.pb-page.dark { background: var(--ink); color: var(--bg); }
.pb-page h4 { font: 700 40px/1.05 "Amatica SC", cursive; letter-spacing: .02em; }
.pb-icons { width: 100%; max-width: 300px; height: auto; overflow: visible; color: var(--ink); fill: currentColor; }
.pb-page.wide .pb-icons { max-width: 420px; }
.pb-icons + .pb-icons { margin-top: -12px; }
.dark .pb-icons { color: var(--bg); }
.pb-icons .off { fill: none; stroke: currentColor; stroke-width: 2.5px; }
.pb-icons .soft { color: #c4c4c4; }
.pb-icons .stripes, .pb-icons .dots { stroke: var(--ink); stroke-width: 2.5px; }
.pb-icons .stripes { fill: url(#pb-stripes); }
.pb-icons .dots { fill: url(#pb-dots); }
.pb-note { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-top: auto; padding: 18px; background: var(--ink); color: var(--bg); }
.dark .pb-note { padding: 0; }
.pb-note p { padding: 10px 14px; border: 1px solid var(--bg); font-size: 17px; line-height: 1.4; }
.pb-note .pb-aside { padding: 6px 12px; border: 0; background: #fff; color: var(--ink); font-size: 14px; white-space: nowrap; }
/* wraps: legend sits beside the pie when the page is wide enough, otherwise drops below it */
.pb-pie { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.pb-pie svg { flex: 0 1 200px; min-width: 160px; height: auto; }
.pb-legend { flex: 1 1 170px; display: flex; flex-direction: column; gap: 10px; list-style: none; font-size: 17px; }
.pb-legend li { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.sw { width: 22px; height: 22px; flex-shrink: 0; border: 2px solid var(--ink); }
.sw.dots { background: radial-gradient(circle, #0a0a0a 2.6px, #fff 3px) 0 0 / 9px 9px; }
.sw.stripes { background: repeating-linear-gradient(45deg, #0a0a0a 0 2px, #fff 2px 6px); }
.sw.grey { background: #d9d9d9; }
.sw.white { background: #fff; }
@media (max-width: 900px) {
  .pb-grid { grid-template-columns: 1fr; }
  .pb-page { padding: 24px; }
  .pb-page h4 { font-size: 32px; }
  .pb-pie svg { max-width: 220px; }
  .pb-note { flex-direction: column; align-items: flex-start; }
}

/* Dining App theme: dark like Telco, with the project's tomato-orange accent */
.cs.dining { --accent: #ff6b3b; --on-accent: #0b0b0b; --bg: #0b0b0b; --tint: rgba(255,107,59,.07); --ring: rgba(255,107,59,.22); }
.cs-band.stage { display: flex; justify-content: center; padding: 80px 20px; background: var(--accent); }
.cs-band.stage img { width: 300px; }
.cs-phones { display: flex; justify-content: center; gap: 32px; }
.cs-phones img { width: 30%; max-width: 280px; }
.cs-card.cs-win[data-label]::before { content: attr(data-label); }
/* Simple numbered flow, read left to right */
.cs-flow { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; counter-reset: flow; }
.cs-flow li { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--chip); border-radius: 100px; font-size: 15px; counter-increment: flow; }
.cs-flow li::before { content: counter(flow); font: 400 13px/1 var(--label-font); color: var(--accent); }
.cs-flow li.muted { color: var(--faint); border-style: dashed; }
@media (max-width: 900px) {
  .cs-band.stage { padding: 48px 20px; }
  .cs-band.stage img { width: 220px; }
  .cs-phones { gap: 10px; }
}
/* Real app screens: rounded like a phone screen; the band can hold more than one */
.cs-band.stage { gap: 40px; }
.cs-band.stage img, .cs-phones img, .cs-overlay > img:first-child { height: auto; border-radius: 28px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.cs-band.stage img { width: 280px; }
/* Item screen with the revised "added to cart" toast laid over it, as it appears in the app */
.cs-overlay { position: relative; }
.cs-overlay .toast { position: absolute; left: 50%; bottom: 18%; width: 70%; transform: translateX(-50%); filter: drop-shadow(0 8px 20px rgba(0,0,0,.35)); }
@media (max-width: 900px) {
  .cs-band.stage { gap: 14px; }
  .cs-band.stage img { width: 44%; max-width: 200px; border-radius: 18px; }
  .cs-phones img { border-radius: 14px; }
}
/* Book reel: the finished spreads slide past edge to edge, 4 pages (2 spreads) across on desktop and 3 on phones.
   The track holds the set twice and moves exactly one set, so the loop never jumps. Hover pauses it to read. */
.cs-band.reel { overflow: hidden; background: #0a0a0a; }
.reel-track { display: flex; width: max-content; animation: reel 60s linear infinite; }
.cs-band.reel img { flex: none; width: 50vw; height: auto; }
.cs-band.reel:hover .reel-track { animation-play-state: paused; }
@keyframes reel { to { translate: -50% 0; } }
@media (max-width: 900px) { .cs-band.reel img { width: 66.67vw; } }
@media (prefers-reduced-motion: reduce) { .cs-band.reel { overflow-x: auto; } } /* no sliding: swipe or scroll through instead */

/* Back-to-top button on case studies: fades in after the hero, sits above the page in the accent colour */
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 10; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font: 600 22px/1 Inter, sans-serif; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s var(--ease); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (hover: hover) { .to-top.show:hover { transform: translateY(-3px); } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (max-width: 900px) { .to-top { right: 16px; bottom: 16px; width: 46px; height: 46px; } }
