/* Vania Muriuki portfolio. Plain CSS, no build step. */

:root {
  --bg: rgb(33, 25, 37);
  --bg-raised: #2a2030;
  --bg-sunk: #1a1320;
  --text: #f7f2f9;
  --muted: #cdc2d4;
  --line: #4a3d52;
  --purple: #b995ff;
  --mustard: #f0c04a;
  --teal: #45d0c1;
  --accent: var(--purple);
  --on-accent: #1a1320;

  --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "Inconsolata", ui-monospace, monospace;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4rem, 10vw, 8rem);
  --radius: 14px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
@media (max-width: 40rem) { html { scroll-padding-top: 8.5rem; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
a:hover { color: var(--accent); }

:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 0.6em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 7vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.9rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.55rem); }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 44rem; }

.skip { position: absolute; left: -999px; top: 0; background: var(--mustard); color: var(--on-accent); padding: 0.5rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; top: 1rem; }

/* Small mono labels */
.label {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
  display: block;
}

.lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--muted); max-width: 40rem; }

/* Accent helpers */
.accent-purple { --accent: var(--purple); }
.accent-mustard { --accent: var(--mustard); }
.accent-teal { --accent: var(--teal); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding: 1rem 0;
  background: var(--bg);
  border-bottom: 2px dashed var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; }
.logo-dot { width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--mustard); display: inline-block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(0.9rem, 3vw, 2rem); }
.site-nav a { font-family: var(--font-mono); font-size: 1.05rem; text-decoration: none; padding: 0.4rem 0; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--mustard); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700;
  padding: 0.85rem 1.4rem; border-radius: 999px;
  background: var(--mustard); color: var(--on-accent); text-decoration: none;
  border: 2px solid var(--mustard);
  transition: transform 0.2s ease, background 0.2s ease;
}
.btn:hover { color: var(--on-accent); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text); border: 2px dashed var(--line); }
.btn-ghost:hover { color: var(--text); border-color: var(--teal); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.5rem; }

/* Sections */
.section { padding: var(--section) 0; }
.section + .section { padding-top: 0; }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head p { color: var(--muted); }

/* Hero */
.hero { position: relative; padding: clamp(3rem, 9vw, 7rem) 0 var(--section); overflow: hidden; }
.hero h1 { max-width: 15ch; }
.hero .lede { margin-top: 1.5rem; }
.hero-meta { display: grid; gap: 1.25rem; margin-top: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); max-width: 46rem; }

.shapes { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.shape { position: absolute; opacity: 0.9; }
.shape-circle { width: clamp(4rem, 11vw, 8rem); aspect-ratio: 1; border-radius: 50%; background: var(--mustard); top: 12%; right: 8%; }
.shape-square { width: clamp(3rem, 8vw, 5.5rem); aspect-ratio: 1; border: 3px dashed var(--teal); top: 52%; right: 22%; transform: rotate(14deg); }
.shape-tri { width: clamp(3.5rem, 9vw, 6rem); aspect-ratio: 1; background: var(--purple); clip-path: polygon(50% 0, 100% 100%, 0 100%); bottom: 10%; right: 5%; }
@media (max-width: 40rem) {
  .shape { opacity: 0.35; }
  .shape-square { display: none; }
}

@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.shape-circle { animation: drift 7s ease-in-out infinite; }
.shape-tri { animation: drift 9s ease-in-out infinite reverse; }

/* Dashed cards */
.card {
  background: var(--bg-raised);
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.result-card { display: grid; gap: 0.25rem; }
.result-card .label { margin-bottom: 0.5rem; }
.result-nums { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.result-nums .num { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 800; line-height: 1; }
.result-nums .num small { font-size: 0.5em; font-weight: 600; }
.result-nums .was { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--mustard); }
.result-nums .arrow { color: var(--mustard); font-size: 1.5rem; }

.award { display: flex; gap: 1rem; align-items: flex-start; }
.award-mark { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--teal); display: grid; place-items: center; color: var(--on-accent); font-weight: 800; font-family: var(--font-display); }
.award p { margin: 0; }
.award small { display: block; font-family: var(--font-mono); color: var(--muted); font-size: 0.95rem; }

/* Work grid */
.work-grid { display: grid; gap: clamp(1.25rem, 3vw, 2rem); grid-template-columns: 1fr; }
@media (min-width: 48rem) {
  .work-grid { grid-template-columns: 1fr 1fr; }
  .work-card.lead,
  .work-grid > .work-card:last-child:nth-child(even) { grid-column: 1 / -1; grid-template-columns: 1.15fr 1fr; align-items: center; }
}

.work-card {
  display: grid; gap: 1.25rem; text-decoration: none; color: var(--text);
  background: var(--bg-raised); border: 2px dashed var(--accent); border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.work-card:hover { color: var(--text); transform: translateY(-4px); border-style: solid; }
.work-card .thumb { border-radius: 10px; overflow: hidden; background: var(--bg-sunk); aspect-ratio: 16 / 10; }
.work-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-card h3 { margin-bottom: 0.4rem; }
.work-card p { color: var(--muted); margin: 0; }
.work-card .more { font-family: var(--font-mono); color: var(--accent); margin-top: 0.9rem; display: inline-block; }
.work-card.lead h3 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }

/* Text only thumb for cases without an image */
.thumb-text { position: relative; display: grid; place-items: center; padding: 1.5rem; }
.thumb-text span { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.3rem); text-align: center; position: relative; z-index: 1; }
.thumb-text::before { content: ""; position: absolute; width: 38%; aspect-ratio: 1; border-radius: 50%; background: var(--accent); opacity: 0.28; top: 12%; left: 10%; }
.thumb-text::after { content: ""; position: absolute; width: 26%; aspect-ratio: 1; border: 3px dashed var(--accent); bottom: 12%; right: 12%; transform: rotate(12deg); }

/* Design+ strip */
.design-plus { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: clamp(2rem, 5vw, 3rem); }
@media (min-width: 40rem) { .design-plus { grid-template-columns: auto 1fr 1fr; align-items: stretch; } }
.design-plus .label { align-self: center; margin: 0; }
.design-plus .item { border: 2px dashed var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.design-plus .item strong { font-family: var(--font-display); display: block; font-size: 1.15rem; }
.design-plus .item span { color: var(--muted); }

/* Point lists */
.points { display: grid; gap: clamp(1.25rem, 3vw, 2rem); grid-template-columns: 1fr; counter-reset: pt; list-style: none; padding: 0; margin: 0; }
@media (min-width: 52rem) { .points { grid-template-columns: repeat(3, 1fr); } }
.points li { counter-increment: pt; }
.points li::before { content: "0" counter(pt); font-family: var(--font-mono); color: var(--accent); display: block; margin-bottom: 0.75rem; font-size: 1.05rem; }
.points p { color: var(--muted); margin: 0; }

/* Contact */
.contact { text-align: left; }
.contact h2 { max-width: 18ch; }

/* Footer */
.site-footer { border-top: 2px dashed var(--line); padding: 2.5rem 0 3rem; margin-top: var(--section); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem; align-items: center; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer a, .site-footer p { font-family: var(--font-mono); font-size: 1rem; margin: 0; }
.site-footer p { color: var(--muted); }

/* About */
.about-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 52rem) { .about-grid { grid-template-columns: 0.8fr 1.2fr; } }
.portrait { border-radius: var(--radius); border: 2px dashed var(--mustard); padding: 0.6rem; background: var(--bg-raised); max-width: 24rem; }
.portrait img { border-radius: 8px; width: 100%; }
.langs { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.langs li { font-family: var(--font-mono); border: 2px dashed var(--line); border-radius: 999px; padding: 0.3rem 0.9rem; }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px dashed var(--line); }
.timeline li { position: relative; padding: 0 0 2rem 1.75rem; }
.timeline li::before { content: ""; position: absolute; left: -0.55rem; top: 0.35rem; width: 0.9rem; height: 0.9rem; border-radius: 50%; background: var(--accent); }
.timeline li:nth-child(3n+1) { --accent: var(--purple); }
.timeline li:nth-child(3n+2) { --accent: var(--mustard); }
.timeline li:nth-child(3n) { --accent: var(--teal); }
.timeline .when { font-family: var(--font-mono); color: var(--accent); display: block; }
.timeline h3 { margin: 0.2rem 0 0.3rem; font-size: 1.25rem; }
.timeline p { color: var(--muted); margin: 0; }

/* Case study template */
.case-hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3rem); }
.case-hero h1 { font-size: clamp(2.1rem, 6vw, 4rem); max-width: 20ch; }
.case-hero .lede { margin-top: 1rem; }
.back { font-family: var(--font-mono); text-decoration: none; display: inline-block; margin-bottom: 2rem; }

.facts { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin: 2.5rem 0 0; border: 2px dashed var(--accent); border-radius: var(--radius); overflow: hidden; }
.facts div { padding: 1rem 1.25rem; background: var(--bg-raised); }
.facts dt { font-family: var(--font-mono); color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.9rem; }
.facts dd { margin: 0.2rem 0 0; }

.numbers { display: grid; gap: clamp(1rem, 3vw, 1.5rem); grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); list-style: none; padding: 0; margin: 0; }
.numbers li { border-top: 2px dashed var(--accent); padding-top: 1rem; }
.numbers strong { display: block; font-family: var(--font-display); font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1; font-weight: 800; }
.numbers span { color: var(--muted); }

.case-section { padding: clamp(3rem, 7vw, 5rem) 0 0; }
.case-section h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.case-section ul.plain { padding-left: 1.2rem; }
.case-section ul.plain li { margin-bottom: 0.5rem; }
.case-section ul.plain li::marker { color: var(--accent); }

.figure { margin: clamp(1.5rem, 4vw, 2.5rem) 0; }
.figure img { width: 100%; border-radius: var(--radius); background: var(--bg-sunk); }
.figure figcaption { font-family: var(--font-mono); color: var(--muted); margin-top: 0.6rem; font-size: 0.95rem; }
.figure.wide { max-width: var(--wrap); }
.gallery { display: grid; gap: clamp(1rem, 3vw, 1.5rem); grid-template-columns: 1fr; margin: clamp(1.5rem, 4vw, 2.5rem) 0; }
@media (min-width: 48rem) { .gallery.two { grid-template-columns: 1fr 1fr; } }
.gallery .figure { margin: 0; }

blockquote.quote { margin: clamp(1.5rem, 4vw, 2.5rem) 0; padding: 1.5rem 1.75rem; border-left: 4px solid var(--mustard); background: var(--bg-raised); border-radius: 0 var(--radius) var(--radius) 0; }
blockquote.quote p { font-family: var(--font-display); font-size: clamp(1.25rem, 3vw, 1.65rem); line-height: 1.3; margin: 0 0 0.6rem; }
blockquote.quote cite { font-family: var(--font-mono); font-style: normal; color: var(--muted); }

.compare { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1.5rem 0; }
@media (min-width: 44rem) { .compare { grid-template-columns: 1fr 1fr; } }
.compare .card h3 { font-size: 1.2rem; }
.compare .card ul { margin: 0; padding-left: 1.2rem; color: var(--muted); }

.next-case { margin-top: var(--section); }

/* 404 */
.lost { min-height: 60vh; display: grid; align-content: center; }

/* Reveal on scroll, only when JS runs and motion is allowed */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
.result-note { margin: 0; color: var(--muted); }

/* Book a call */
.btn-teal { background: var(--teal); border-color: var(--teal); color: var(--on-accent); }
.site-nav ul { flex-wrap: wrap; align-items: center; }
.site-nav a.nav-call { border: 2px dashed var(--teal); border-radius: 999px; padding: 0.3rem 0.9rem; }
.site-nav a.nav-call:hover { color: var(--teal); border-style: solid; }
@media (max-width: 26rem) {
  .site-nav ul { gap: 0.7rem; }
  .site-nav a { font-size: 0.98rem; }
  .site-nav a.nav-call { padding: 0.25rem 0.65rem; }
}

/* Coming soon highlight after the work cards */
.coming-soon { margin-top: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 1.25rem; align-items: center; grid-template-columns: 1fr; border-width: 3px; }
.coming-soon h3 { margin-bottom: 0.4rem; }
.coming-soon p { color: var(--muted); margin: 0; max-width: 44rem; }
.coming-soon .btn { justify-self: start; }
.coming-soon .shape-dot { display: none; }
@media (min-width: 48rem) {
  .coming-soon { grid-template-columns: auto 1fr auto; }
  .coming-soon .shape-dot { display: block; width: 3rem; aspect-ratio: 1; border-radius: 50%; background: var(--mustard); }
}

/* Card without a case page yet */
.work-card.no-link:hover { transform: none; border-style: dashed; }
.label.keep-case { text-transform: none; letter-spacing: 0.02em; }
.soon-tag { display: inline-block; margin-top: 0.9rem; font-family: var(--font-mono); font-size: 0.95rem; color: var(--on-accent); background: var(--accent); border-radius: 999px; padding: 0.2rem 0.75rem; }

/* watu wako case: principles and iterations */
.principles { padding-left: 1.4rem; }
.principles li { margin-bottom: 0.8rem; }
.principles li::marker { color: var(--accent); font-family: var(--font-mono); font-weight: 700; }
.iterations { list-style: none; margin: 2rem 0 0; padding: 0; border-left: 2px dashed var(--line); }
.iteration { position: relative; padding: 0 0 2.5rem 1.75rem; }
.iteration::before { content: ""; position: absolute; left: -0.55rem; top: 0.35rem; width: 0.9rem; height: 0.9rem; border-radius: 50%; background: var(--accent); }
.iter-num { font-family: var(--font-mono); color: var(--accent); display: block; }
.iteration h3 { margin: 0.2rem 0 0.6rem; }
.end-note { font-family: var(--font-mono); color: var(--muted); font-size: 1rem; margin-top: 2rem; }

/* Diagram (a): two scales. Typographic only, no rose drawn. */
.scale-fig { margin: 2rem 0; }
.scale { background: var(--bg-raised); border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.5rem 1.5rem 2.75rem; }
.scale-zones { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.zone { border-radius: 8px; padding: 0.7rem 0.8rem; font-family: var(--font-mono); font-size: 1rem; line-height: 1.3; }
.zone-low { border: 2px dashed var(--line); color: var(--muted); }
.zone-award { background: #FFD60A; color: #1a1320; font-weight: 700; }
.scale-line { position: relative; height: 2px; background: var(--muted); margin: 1.1rem 0.4rem 0; }
.tick { position: absolute; left: calc(var(--at) * 100%); top: 0; transform: translateX(-50%); font-family: var(--font-mono); font-size: 0.95rem; color: var(--muted); padding-top: 0.7rem; }
.tick::before { content: ""; position: absolute; left: 50%; top: -6px; width: 2px; height: 14px; background: var(--muted); transform: translateX(-50%); }
.tick-key { color: var(--text); font-weight: 700; }
.tick-key::before { background: #FFD60A; width: 3px; height: 18px; top: -8px; }

/* Table (b): score bands */
.band-wrap { margin: 2rem 0 0.5rem; overflow-x: auto; }
.bands { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 1rem; background: var(--bg-raised); border: 2px dashed var(--accent); border-radius: var(--radius); overflow: hidden; }
.bands caption { text-align: left; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; padding: 0 0 0.75rem; }
.bands th { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); text-align: left; font-weight: 400; padding: 0.8rem 1rem; border-bottom: 2px dashed var(--line); }
.bands td { padding: 0.55rem 1rem; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.bands td:first-child { font-family: var(--font-mono); white-space: nowrap; }
.band-num { display: inline-block; font-family: var(--font-display); font-weight: 800; width: 2.6ch; }
.band-bar { display: inline-block; vertical-align: middle; margin-left: 0.6rem; height: 8px; border-radius: 4px; background: var(--accent); width: calc(var(--w) * 10rem); }
.band-none td { color: var(--muted); border-bottom: 0; font-style: italic; }

@media (max-width: 40rem) {
  .site-header { padding: 0.6rem 0; }
  .site-header .wrap { row-gap: 0.4rem; }
  .logo { font-size: 1.1rem; }
  html { scroll-padding-top: 7rem; }
  .iteration { padding-left: 1.25rem; }
  .bands td, .bands th { padding-left: 0.7rem; padding-right: 0.7rem; }
  .band-bar { width: calc(var(--w) * 4.5rem); margin-left: 0.4rem; }
  .band-none td:last-child { white-space: normal; }
  .scale { padding: 1.1rem 1.1rem 2.5rem; }
}

/* watu wako cover: brand files placed as they are, never recoloured or stretched */
.watu-cover {
  position: relative;
  background: #1A1A30;
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(0.5rem, 2vw, 1.25rem);
  padding: clamp(1rem, 4vw, 2.5rem);
  overflow: hidden;
}
.watu-cover .watu-logo { height: 62%; width: auto; max-width: none; object-fit: contain; }
.watu-cover .watu-line { margin: 0; color: #FFFFFF; font-family: var(--font-display); font-weight: 600; font-size: clamp(1rem, 2.6vw, 1.6rem); text-align: center; }
.watu-cover .watu-rose { position: absolute; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); width: clamp(1.5rem, 4vw, 2.75rem); height: auto; }
.case-hero + .wrap .watu-cover { margin: clamp(1.5rem, 4vw, 2.5rem) 0; }
.work-card .thumb.thumb-cover { background: #1A1A30; }
.work-card .thumb .watu-cover { aspect-ratio: auto; height: 100%; border-radius: 0; padding: 1rem; }
.work-card .thumb .watu-cover img.watu-logo { width: auto; height: 58%; object-fit: contain; }
.work-card .thumb .watu-cover img.watu-rose { width: clamp(1.25rem, 3vw, 2rem); height: auto; object-fit: contain; }
.work-card .thumb .watu-cover .watu-line { font-size: clamp(0.95rem, 2vw, 1.2rem); }

/* the four ikos */
.ikos { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.ikos li { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.ikos img { width: 66px; height: 66px; }
.ikos span { font-family: var(--font-mono); font-size: 1.05rem; }

/* see it live */
.see-live { margin-top: 2rem; }
.see-live .label { margin-bottom: 0; }
.see-live .btn-row { margin-top: 0.75rem; }
.see-live-end { margin-top: 2.5rem; }

/* Light plate for hotlinked Webflow images, many are transparent PNGs with dark text */
.figure.plate img { background: #F4F1EA; padding: 24px; border-radius: 16px; }
.work-card .thumb.plate { background: #F4F1EA; padding: 24px; border-radius: 16px; }
.work-card .thumb.plate img { object-fit: contain; }
@media (max-width: 40rem) {
  .figure.plate img, .work-card .thumb.plate { padding: 16px; }
}

/* watu wako screenshots have their own background: no plate, just a frame */
.figure.shot img { border-radius: var(--radius); border: 1px solid var(--line); }
.iteration .figure.shot { margin: 1.5rem 0 0; }

/* Full width fabric band */
.fabric-band { margin-top: clamp(3rem, 7vw, 5rem); background: #111111; }
.fabric-band img { width: 100%; max-height: 70vh; object-fit: cover; }

/* Rebuilt boards: light panels in each project's colours */
.rebuild { background: #F4F1EA; border-radius: 16px; padding: clamp(1.25rem, 3vw, 2rem); margin: clamp(1.25rem, 3vw, 2rem) 0; color: var(--ink); }
.rebuild h3 { color: var(--ink); margin-bottom: 1.25rem; }
.rebuild h4 { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 0.6rem; color: var(--ink); }
.rebuild ul, .rebuild ol { margin: 0; padding: 0; list-style: none; }
.rebuild.hop { --ink: #15173D; --mark: #EB534A; }
.rebuild.soma { --ink: #1C1C1C; --mark: #D4B84A; --mark-pale: #EFE3B3; }

/* 1. Double diamond */
.dd { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 36rem) { .dd { grid-template-columns: 1fr 1fr; } }
@media (min-width: 60rem) { .dd { grid-template-columns: repeat(4, 1fr); } }
.dd > li { background: #fff; border-top: 4px solid var(--mark); border-radius: 10px; padding: 1rem 1.1rem 1.1rem; }
.dd-shape { display: block; width: 1.4rem; height: 1.4rem; background: var(--mark); transform: rotate(45deg); margin: 0.3rem 0 0.9rem 0.2rem; }
.dd ul li { padding: 0.25rem 0; border-bottom: 1px solid #15173D1f; }
.dd ul li:last-child { border-bottom: 0; }

/* 2. Research methods */
.pills { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.pills li { border: 2px solid var(--mark); border-radius: 999px; padding: 0.5rem 1.1rem; font-weight: 600; background: #fff; }

/* 3. Survey stats */
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.stats li { background: #fff; border-radius: 10px; padding: 1rem; display: grid; gap: 0.35rem; align-content: start; }
.stats strong { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; }
.ring { width: 3rem; height: 3rem; border-radius: 50%; background: conic-gradient(var(--mark) calc(var(--p) * 1%), #15173D26 0); -webkit-mask: radial-gradient(circle, transparent 52%, #000 53%); mask: radial-gradient(circle, transparent 52%, #000 53%); }

/* 4. Octalysis */
.octa { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 48rem) { .octa { grid-template-columns: 1fr 1.2fr; } }
.drives { display: grid; gap: 0.5rem; }
.drive { display: flex; align-items: center; gap: 0.75rem; background: #fff; border: 2px solid transparent; border-radius: 10px; padding: 0.5rem 0.75rem; font-weight: 600; }
.drive-n { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 2px solid var(--ink); font-family: var(--font-mono); flex: none; }
.drive.white-hat .drive-n { background: #fff; }
.drive.black-hat .drive-n { background: var(--ink); color: #fff; }
.drive.focus { background: var(--mark); border-color: var(--mark); }
.octa-note { margin: 0.9rem 0 0; font-size: 0.95rem; display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; align-items: center; }
.hat-key { font-family: var(--font-mono); border-radius: 999px; padding: 0.1rem 0.6rem; border: 2px solid var(--ink); }
.hat-key.black { background: var(--ink); color: #fff; }
.hat-key.focus { background: var(--mark); border-color: var(--mark); }
.octa-points { display: grid; gap: 0.75rem; }
.octa-points li { background: #fff; border-left: 4px solid var(--mark); border-radius: 0 10px 10px 0; padding: 0.7rem 0.9rem; }

/* 5. Jobs to be done */
.jtbd { display: grid; gap: 1rem; }
.jtbd li { position: relative; padding-left: 2rem; font-size: 1.05rem; }
.jtbd li::before { content: ""; position: absolute; left: 0; top: 0.4rem; width: 1rem; height: 1rem; background: var(--mark); }

/* 6. What book buyers value */
.values { display: grid; gap: 1.5rem 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 30rem) { .values { grid-template-columns: 1fr 1fr; } }
@media (min-width: 48rem) { .values { grid-template-columns: repeat(3, 1fr); } }
.values li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.35rem; }
.thumb-circle { width: 4rem; height: 4rem; border-radius: 50%; background: var(--mark); display: grid; place-items: center; color: var(--ink); margin-bottom: 0.4rem; }
.values span:not(.thumb-circle) { font-size: 0.98rem; }

/* 7. Sitemap: scrolls sideways inside its own box only */
.sitemap-scroll { overflow-x: auto; max-width: 100%; padding-bottom: 0.5rem; }
.sitemap { display: flex; gap: 0.6rem; min-width: max-content; align-items: flex-start; }
.sitemap > li { width: 8.3rem; flex: 1 0 8.3rem; display: grid; gap: 0.4rem; }
.sitemap .l1 { display: block; background: var(--ink); color: #fff; font-weight: 700; border-radius: 8px; padding: 0.6rem 0.7rem; min-height: 3.6rem; }
.sitemap .l2s { display: grid; gap: 0.4rem; }
.sitemap .l2 { display: block; background: var(--mark); border-radius: 6px; padding: 0.4rem 0.6rem; font-weight: 600; font-size: 0.95rem; }
.sitemap .l3 { display: grid; gap: 0.3rem; margin: 0.3rem 0 0 0.6rem; }
.sitemap .l3 li { background: var(--mark-pale); border-radius: 6px; padding: 0.3rem 0.55rem; font-size: 0.9rem; }
.sitemap-key { margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.9rem; }
.sitemap-key span { border-radius: 6px; padding: 0.15rem 0.6rem; }
.sitemap-key .k1 { background: var(--ink); color: #fff; }
.sitemap-key .k2 { background: var(--mark); }
.sitemap-key .k3 { background: var(--mark-pale); }

/* Next case study card */
.next-card {
  display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: center;
  text-decoration: none; color: var(--text);
  background: var(--bg-raised); border: 3px dashed var(--accent); border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.75rem);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.next-card:hover, .next-card:focus-visible { color: var(--text); transform: translateY(-6px); border-style: solid; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35); }
.next-card .thumb { border-radius: 16px; overflow: hidden; background: var(--bg-sunk); aspect-ratio: 16 / 10; }
.next-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.next-card .thumb.plate { background: #F4F1EA; padding: 24px; }
.next-card .thumb.plate img { object-fit: contain; }
.next-card .thumb .watu-cover { aspect-ratio: auto; height: 100%; border-radius: 0; padding: 1rem; }
.next-card .thumb .watu-cover img.watu-logo { width: auto; height: 58%; object-fit: contain; }
.next-card .thumb .watu-cover img.watu-rose { width: clamp(1.25rem, 3vw, 2rem); height: auto; object-fit: contain; }
.next-body { display: grid; gap: 0.6rem; }
.next-body .label { margin: 0; }
.next-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 4.5vw, 2.8rem); line-height: 1.1; }
.next-line { color: var(--muted); font-size: 1.1rem; }
.next-arrow { font-size: clamp(2rem, 5vw, 3.2rem); color: var(--accent); justify-self: end; line-height: 1; transition: transform 0.25s ease; }
.next-card:hover .next-arrow { transform: translateX(6px); }
@media (min-width: 52rem) { .next-card { grid-template-columns: 0.9fr 1.3fr auto; gap: 2rem; } }

/* Laptop frame for desktop screenshots */
.laptop { max-width: 100%; }
.laptop-screen { background: #0d0d12; border: 1px solid #3a3a44; border-radius: 14px 14px 0 0; padding: clamp(6px, 1.2vw, 12px); }
.laptop-screen img { width: 100%; border-radius: 4px; display: block; }
.figure.shot .laptop-screen img { border: 0; }
.laptop-base { height: clamp(10px, 1.6vw, 16px); margin: 0 -4%; background: linear-gradient(#2d2d36, #16161c); border-radius: 0 0 14px 14px; position: relative; }
.laptop-base::before { content: ""; position: absolute; left: 50%; top: 0; width: 16%; height: 45%; transform: translateX(-50%); background: #0d0d12; border-radius: 0 0 8px 8px; }
.figure.shot { padding: 0 4%; }

/* Phone frames: three in a row, sideways scroll row on small screens */
.phone-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.5rem); margin-top: 1.5rem; }
@media (max-width: 48rem) {
  .phone-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.75rem; gap: 1rem; }
  .phone-row .phone-fig { flex: 0 0 68%; scroll-snap-align: center; }
}
.phone-fig { margin: 0; }
.phone { background: #0d0d12; border: 1px solid #3a3a44; border-radius: 36px; padding: 26px 10px 16px; max-width: 18rem; margin: 0 auto; position: relative; }
.phone::before { content: ""; position: absolute; top: 9px; left: 50%; width: 26%; height: 9px; transform: translateX(-50%); background: #26262e; border-radius: 999px; z-index: 1; }
.phone img { width: 100%; border-radius: 12px; display: block; }
.phone-fig figcaption { font-family: var(--font-mono); color: var(--muted); text-align: center; margin-top: 0.6rem; font-size: 0.95rem; }

/* Soma Nami style guide */
.sg { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 48rem) { .sg { grid-template-columns: 1fr 1fr; } }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.swatch { background: var(--c); aspect-ratio: 1; border-radius: 10px; display: flex; align-items: flex-end; padding: 0.5rem; color: #fff; border: 1px solid #0000001a; }
.swatch.light { color: #1C1C1C; }
.swatch span { font-family: var(--font-mono); font-size: 0.95rem; }
.specimen { font-family: "Ibarra Real Nova", Georgia, serif; }
.specimen p { margin: 0; line-height: 1.25; }
.sp-name { font-family: var(--font-mono); font-size: 0.95rem; margin-bottom: 0.5rem !important; }
.sp { font-size: clamp(1.3rem, 3vw, 1.7rem); }
.sp.b { font-weight: 700; }
.sp.r { font-weight: 400; }
.sp.caps { text-transform: uppercase; letter-spacing: 0.04em; }
.sg-buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.sg-btn { font-family: "Ibarra Real Nova", Georgia, serif; font-weight: 700; border-radius: 999px; padding: 0.5rem 1.4rem; }
.sg-btn.gold { background: #D4B84A; color: #1C1C1C; }
.sg-btn.grey { background: #D9D9D9; color: #1C1C1C; }
.sg-btn.black { background: #000000; color: #FFFFFF; }

/* Masaka Kids boards */
.rebuild.masaka { --ink: #1C1C1C; --mark: #E8412F; }
.board-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 48rem) { .board-grid { grid-template-columns: 1.2fr 1fr; } }
.crop { aspect-ratio: var(--ratio); overflow: hidden; border-radius: 12px; background: #e6e1d6; }
.crop img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos); display: block; }
.findings h4 { margin-top: 0.25rem; }
.findings h4 + ul { margin-bottom: 1.25rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li { border: 2px solid var(--mark); border-radius: 999px; padding: 0.35rem 0.9rem; font-weight: 600; background: #fff; }
.chips.good li { border-color: var(--ink); }
.notes { display: grid; gap: 0.8rem; }
.notes li { position: relative; padding-left: 2rem; font-weight: 600; }
.notes li::before { content: ""; position: absolute; left: 0; top: 0.2rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--mark); }
.final .crop { margin-bottom: 1.25rem; }
.stripes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; margin-bottom: 1.5rem; }
.stripes li { background: var(--c); height: clamp(8rem, 22vw, 12rem); border-radius: 8px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 0.5rem; }
.stripes span { font-family: var(--font-mono); font-size: 0.8rem; color: #1C1C1C; writing-mode: vertical-rl; transform: rotate(180deg); }
.mk-type p { margin: 0; line-height: 1.15; }
.mk-lexend { font-family: "Lexend", system-ui, sans-serif; font-weight: 900; font-size: clamp(2.2rem, 6vw, 3.4rem); letter-spacing: 0.01em; }
.mk-avenir-b { font-family: "Avenir Next", "Avenir", system-ui, sans-serif; font-weight: 700; font-size: 1.5rem; margin-top: 0.5rem !important; }
.mk-avenir-r { font-family: "Avenir", "Avenir Next", system-ui, sans-serif; font-weight: 400; font-size: 1.25rem; }

/* Offer prices */
.price { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; color: var(--text); margin-top: 1rem; }
.scope-note { margin: 1.5rem 0 0; color: var(--muted); font-size: 1rem; }

/* Exact crop rectangle: wrapper keeps the crop's aspect, image is scaled and shifted inside */
.crop-rect { position: relative; overflow: hidden; padding: 0; border-radius: 12px; background: none; }
.crop-rect img { position: absolute; max-width: none; height: auto; display: block; }
.final .crop-rect { margin-bottom: 1.25rem; }

/* watu wako cover: the score and the roses. badge-rose.svg is placed as supplied, square, unrotated. */
.watu-cover .watu-score { margin: 0; font-family: "Poppins", var(--font-display); font-weight: 800; color: #FFFFFF; line-height: 1; font-size: clamp(4rem, 13vw, 8.5rem); letter-spacing: -0.02em; }
.watu-roses { display: flex; gap: clamp(0.3rem, 1vw, 0.6rem); justify-content: center; }
.watu-roses img { width: clamp(1.6rem, 4.2vw, 2.9rem); height: auto; aspect-ratio: 1; max-width: none; object-fit: contain; }
.watu-cover .watu-line { font-family: var(--font-mono); font-weight: 400; font-size: clamp(0.95rem, 2vw, 1.15rem); color: #FFFFFF; }
.work-card .thumb .watu-cover .watu-score, .next-card .thumb .watu-cover .watu-score { font-size: clamp(3rem, 8vw, 5rem); }
.work-card .thumb .watu-cover .watu-roses img, .next-card .thumb .watu-cover .watu-roses img { width: clamp(1.2rem, 3vw, 2rem); height: auto; object-fit: contain; }
.work-card .thumb .watu-cover .watu-line, .next-card .thumb .watu-cover .watu-line { font-size: 0.95rem; }

/* Cover centring: one group, centred both ways by grid on every size */
.watu-cover { display: grid; place-items: center; place-content: center; }
.watu-cover .watu-group { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(0.5rem, 2vw, 1.1rem); margin: 0; text-align: center; }
.watu-cover .watu-group > * { margin: 0; }
.work-card .thumb .watu-cover, .next-card .thumb .watu-cover { width: 100%; height: 100%; }

/* Single phone capture beside the text */
.phone-single { margin: 1.5rem auto 0; max-width: 17rem; }
.iteration .phone-single { margin-top: 1.5rem; }

/* Light mode: warm cream ground, plum text. Mustard is an accent only, never a background. */
:root[data-theme="light"] {
  --bg: #FBF6EC;
  --bg-raised: #FFFFFF;
  --bg-sunk: #F3EBDC;
  --text: #211925;
  --muted: #5B4B63;
  --line: #E2D6C4;
  --purple: #6B3FB8;
  --mustard: #A8740C;
  --teal: #0F7F74;
  --on-accent: #FFFFFF;
  /* darker ink of the mustard for text, so accent text passes AA on the cream (5.5 to 1) */
  --mustard-ink: #865C08;
  color-scheme: light;
}
:root[data-theme="light"] .accent-mustard,
:root[data-theme="light"] .timeline li:nth-child(3n+2) { --accent: var(--mustard-ink); }
:root[data-theme="light"] .result-nums .arrow { color: var(--mustard-ink); }
/* buttons: plum with white text instead of a mustard fill */
:root[data-theme="light"] .btn:not(.btn-teal):not(.btn-ghost) { background: var(--text); border-color: var(--text); color: #FFFFFF; }
:root[data-theme="light"] .btn:not(.btn-teal):not(.btn-ghost):hover { color: #FFFFFF; }
:root[data-theme="light"] .btn-ghost { border-color: var(--muted); }
:root[data-theme="light"] .skip { background: var(--text); color: #FFFFFF; }
/* keep light panels and the toggle distinct from the cream ground */
:root[data-theme="light"] .rebuild { border: 1px solid var(--line); }
:root[data-theme="light"] .theme-toggle { border-color: var(--muted); }
:root[data-theme="light"] .next-card:hover { box-shadow: 0 14px 30px rgba(33, 25, 37, 0.14); }

/* Theme toggle */
.theme-toggle { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 2px dashed var(--line); background: transparent; color: var(--text); cursor: pointer; padding: 0; order: 3; }
.theme-toggle:hover { border-style: solid; border-color: var(--text); }
.theme-toggle[hidden] { display: none; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
.site-header .wrap > .logo { order: 1; }
.site-header .wrap > .site-nav { order: 2; margin-left: auto; }
@media (max-width: 40rem) {
  .theme-toggle { order: 2; margin-left: auto; width: 2.25rem; height: 2.25rem; }
  .site-header .wrap > .site-nav { order: 3; margin-left: 0; width: 100%; }
}

/* Hopstair cream cover */
.thumb.thumb-cream { background: #F4F1EA; }
.work-card .thumb.thumb-cream img, .next-card .thumb.thumb-cream img { object-fit: contain; }
.figure.cover-cream { background: #F4F1EA; border-radius: 16px; display: grid; place-items: center; padding: clamp(1rem, 3vw, 2rem); margin: clamp(1.5rem, 4vw, 2.5rem) 0; }
.figure.cover-cream img { width: auto; max-width: 100%; max-height: 34rem; border-radius: 0; background: none; }

/* Plain rounded images from the Drive */
.figure.drive-img img { border-radius: var(--radius); border: 1px solid var(--line); }

/* Where the score lives: one wide board, then two side by side; stacked on phones */
.lives-grid { display: grid; gap: clamp(1rem, 3vw, 1.5rem); grid-template-columns: 1fr; margin-top: 1.5rem; }
@media (min-width: 48rem) { .lives-grid { grid-template-columns: 1fr 1fr; } .lives-grid .figure:first-child { grid-column: 1 / -1; } }
.lives-grid .figure { margin: 0; }
.lives-note { font-family: var(--font-mono); color: var(--muted); font-size: 0.95rem; margin-top: 1.25rem; }

/* Scale line drawn as a pseudo element so the tick labels sit on the panel itself */
.scale-line { background: none; }
.scale-line::before { content: ""; position: absolute; inset: 0; background: var(--muted); }

/* Image placeholder: a calm 16:10 block until the real image is dropped in at its data-slot */
.placeholder-box { aspect-ratio: 16 / 10; width: 100%; border-radius: var(--radius); background: var(--bg-sunk); border: 2px dashed var(--line); }
.work-card .thumb.placeholder, .next-card .thumb.placeholder { display: grid; place-items: center; padding: 1.5rem; border: 2px dashed var(--line); }
.thumb.placeholder span { font-family: var(--font-mono); color: var(--muted); font-size: 0.95rem; text-align: center; }

/* More from myAgro: one line per upcoming case, not links */
.soon-list { margin: 0.9rem 0 0; padding-left: 1.2rem; color: var(--muted); max-width: 44rem; }
.soon-list li { margin-bottom: 0.4rem; }
.soon-list li::marker { color: var(--accent); }
.soon-list strong { color: var(--text); }
