/* Black, a cool misty paper, and one warm orange. Type does the design work: wide heavy caps against an italic serif. */
:root {
  --bg: #F2F4F3;
  --panel: #DFE7E7;      /* Misty Ice Blue */
  --ink: #0E0E0E;
  --muted: #4F5656;
  --line: #C9D2D2;
  --accent: #9F430A;     /* Burnt Orange, 5.8:1 on paper */
  --on-accent: #FFFFFF;
  color-scheme: light;

  --wide: "Archivo", "Arial Black", system-ui, sans-serif;
  --text: "Archivo", "Segoe UI", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
}
:root[data-theme="dark"] {
  --bg: #0D0D0D; --panel: #181818; --ink: #F1EFEA; --muted: #A3A09A;
  --line: #2A2A2A; --accent: #FF7A3D; --on-accent: #0D0D0D; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D0D0D; --panel: #181818; --ink: #F1EFEA; --muted: #A3A09A;
    --line: #2A2A2A; --accent: #FF7A3D; --on-accent: #0D0D0D; color-scheme: dark;
  }
}
/* Inverted band: black in light mode, misty paper in dark mode */
.invert {
  --bg: #0D0D0D; --panel: #181818; --ink: #F1EFEA; --muted: #A3A09A;
  --line: #2E2E2E; --accent: #FF7A3D; --on-accent: #0D0D0D;
}
:root[data-theme="dark"] .invert {
  --bg: #DFE7E7; --panel: #F2F4F3; --ink: #0E0E0E; --muted: #4A5151;
  --line: #BCC6C6; --accent: #9F430A; --on-accent: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .invert {
    --bg: #DFE7E7; --panel: #F2F4F3; --ink: #0E0E0E; --muted: #4A5151;
    --line: #BCC6C6; --accent: #9F430A; --on-accent: #FFFFFF;
  }
}

*, *::before, *::after { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html { scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--text); font-size: 17px; line-height: 1.65; font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.invert { background: var(--bg); color: var(--ink); }

.wrap {
  max-width: 1200px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 700px) { .wrap { padding-left: 32px; padding-right: 32px; } }

/* Type system */
.kicker { font-family: var(--serif); font-style: italic; font-size: 1.2rem; line-height: 1.2; color: var(--accent); margin: 0 0 18px; display: flex; align-items: center; gap: 12px; }
.kicker::before { content: ""; width: 28px; height: 2px; background: var(--accent); flex: none; }
h1, h2, h3 { margin: 0; color: var(--ink); }
h2, .page-title {
  font-family: var(--wide); font-stretch: 125%; font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.9rem, 4.6vw, 3.6rem); line-height: 0.98; letter-spacing: -0.01em; margin-bottom: 20px; text-wrap: balance;
}
.page-title { font-weight: 900; font-size: clamp(2.3rem, 6.4vw, 5.2rem); line-height: 0.94; }
h2 em, h1 em {
  font-family: var(--serif); font-style: italic; font-weight: 400; font-stretch: 100%;
  text-transform: none; letter-spacing: 0; color: var(--accent);
}
h2 em, .page-title em { font-size: 1.12em; }
h3 { font-family: var(--wide); font-stretch: 112%; font-weight: 700; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.2; letter-spacing: -0.005em; }
p { margin: 0 0 14px; }
.intro { color: var(--muted); max-width: 58ch; font-size: 1.08rem; }

.section { padding-block: clamp(64px, 10vw, 128px); }
.section.flush { padding-top: 0; }
.section-head { margin-bottom: clamp(36px, 5vw, 60px); }
.section-head.split { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 40px; }
.section-head.split > div { max-width: 62ch; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border: 2px solid var(--ink); border-radius: 0;
  background: transparent; color: var(--ink); text-decoration: none; cursor: pointer;
  font-family: var(--wide); font-stretch: 112%; font-weight: 700; font-size: 0.86rem; letter-spacing: 0.04em; text-transform: uppercase;
  transition: background .15s, color .15s, transform .15s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.solid { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.solid:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn .arr { transition: transform .15s; }
.btn:hover .arr { transform: translateX(3px); }

/* Text link with an arrow, used to lead from a teaser to its full page */
.more {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-family: var(--wide); font-stretch: 112%; font-weight: 700; font-size: 0.84rem; letter-spacing: 0.04em; text-transform: uppercase;
  border-bottom: 2px solid var(--accent); padding-bottom: 4px; white-space: nowrap;
}
.more .arr { color: var(--accent); transition: transform .15s; }
.more:hover .arr { transform: translateX(3px); }

/* Header */
.site-head { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.head-inner { display: flex; align-items: center; gap: 12px 28px; padding-block: 12px; }
.brand { text-decoration: none; color: var(--ink); line-height: 1; margin-right: auto; }
.brand b { display: block; font-family: var(--wide); font-stretch: 125%; font-weight: 800; font-size: 1.05rem; letter-spacing: 0.02em; text-transform: uppercase; }
.brand i { font-family: var(--serif); font-size: 1rem; color: var(--accent); }
.site-nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; font-size: 0.92rem; font-weight: 500; color: var(--muted); }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); }
.head-actions { display: flex; align-items: center; gap: 10px; }
.theme-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line);
  background: transparent; color: var(--ink); cursor: pointer; border-radius: 50%;
}
.theme-btn:hover { border-color: var(--ink); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: none; }
}
.head-cta { padding: 10px 16px; font-size: 0.76rem; }
@media (max-width: 900px) {
  .head-inner { flex-wrap: wrap; padding-bottom: 0; }
  .site-nav { order: 3; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; border-top: 1px solid var(--line); }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav ul { gap: 20px; padding-block: 10px; white-space: nowrap; }
}
@media (max-width: 420px) { .head-cta { display: none; } }

/* Hero */
.hero { padding-block: clamp(48px, 9vw, 120px) clamp(40px, 6vw, 72px); }
.hero h1 { margin-bottom: clamp(28px, 4vw, 44px); }
.h1-lead { display: block; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.5rem, 3.2vw, 2.6rem); line-height: 1.15; color: var(--muted); max-width: 26ch; margin-bottom: 10px; }
.h1-main {
  display: block; font-family: var(--wide); font-stretch: 125%; font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.3rem, 7.4vw, 6.4rem); line-height: 0.92; letter-spacing: -0.02em; max-width: 13ch;
}
.dot { color: var(--accent); }
.hero-foot { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px clamp(32px, 6vw, 80px); align-items: end; }
.lede { font-size: 1.15rem; line-height: 1.6; max-width: 52ch; margin: 0; }
.lede strong { font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.facts { list-style: none; margin: 40px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 32px; font-size: 0.9rem; color: var(--muted); }
.facts li::before { content: "\2726"; color: var(--accent); margin-right: 8px; font-size: 0.8em; }
@media (max-width: 760px) {
  .hero-foot { grid-template-columns: minmax(0, 1fr); }
  .actions { justify-content: flex-start; }
}

/* Inner page heading */
.page-hero { padding-block: clamp(48px, 8vw, 104px) clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); margin-bottom: clamp(48px, 7vw, 88px); }
.page-hero .intro { margin: 0; }

/* Journey strip */
.journey { border-block: 1px solid var(--line); background: var(--panel); padding-block: clamp(36px, 5vw, 56px); }
.journey-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 32px; margin-bottom: 28px; }
.journey-top h2 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); margin: 0; }
.journey-top p { margin: 0; color: var(--muted); max-width: 46ch; }
.chain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); counter-reset: s; }
.chain li { counter-increment: s; position: relative; padding: 0 14px 0 0; }
.chain li::before { content: counter(s, decimal-leading-zero); display: block; font-family: var(--serif); font-style: italic; font-size: 1.5rem; line-height: 1; color: var(--accent); margin-bottom: 10px; }
.chain .step { display: block; font-family: var(--wide); font-stretch: 112%; font-weight: 700; font-size: 1rem; line-height: 1.2; padding-bottom: 12px; border-bottom: 2px solid var(--ink); margin-bottom: 10px; }
.chain li:last-child .step { border-bottom-color: var(--accent); }
.chain .pass { display: block; font-size: 0.84rem; color: var(--muted); line-height: 1.4; }
.chain .pass::before { content: "\2192\00a0"; color: var(--accent); }
.journey-note { margin: 30px 0 0; font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.3; max-width: 46ch; }
.journey-note em { color: var(--accent); }
@media (max-width: 900px) {
  .chain { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
}
@media (max-width: 520px) {
  .chain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Home: case study teasers, one row each, linking to the full write-up */
.teasers { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.teaser { border-bottom: 1px solid var(--line); }
.teaser a {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 8px 24px; align-items: center;
  padding: clamp(20px, 3vw, 30px) 0; text-decoration: none; color: var(--ink);
}
.teaser .cn { font-family: var(--serif); font-style: italic; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; color: var(--accent); }
.teaser h3, .teaser h2 { font-family: var(--wide); font-stretch: 112%; font-weight: 700; text-transform: none; letter-spacing: -0.005em; line-height: 1.2; margin: 0; font-size: clamp(1.1rem, 2vw, 1.45rem); transition: color .15s; }
.teaser .who { display: block; margin-top: 6px; font-size: 0.88rem; color: var(--muted); }
.teaser .line { margin: 0; color: var(--muted); font-size: 0.98rem; }
.teaser .go { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--accent); transition: background .15s, color .15s, transform .15s; }
.teaser a:hover h3, .teaser a:hover h2 { color: var(--accent); }
.teaser a:hover .go { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: translateX(3px); }
/* Home highlights: cards with a screenshot on desktop, the plain list on phones and tablets */
.teaser .thumb { display: none; }
.thumb .ph { display: none; font-family: var(--serif); font-style: italic; color: var(--muted); }
.thumb.missing img { display: none; }
.thumb.missing .ph { display: block; }
@media (min-width: 1001px) {
  .highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); border-top: 0; }
  .highlights .teaser { border: 1px solid var(--line); transition: border-color .15s; }
  .highlights .teaser:hover { border-color: var(--accent); }
  .highlights .teaser a { display: flex; flex-direction: column; align-items: stretch; height: 100%; padding: 0; gap: 0; }
  .highlights .thumb { display: grid; place-items: center; aspect-ratio: 16 / 10; margin: 0; background: var(--panel); border-bottom: 1px solid var(--line); overflow: hidden; }
  .highlights .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .3s; }
  .highlights .teaser a:hover .thumb img { transform: scale(1.03); }
  .highlights .tt { padding: 22px 24px 0; }
  .highlights .line { padding: 14px 24px 0; flex: 1; }
  .highlights .go { margin: 20px 24px 24px auto; }
}
/* The homepage highlights have no case numbers, so their list rows drop the number column */
@media (max-width: 1000px) {
  .highlights .teaser a { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; }
}
@media (max-width: 860px) {
  .teaser a { grid-template-columns: 3rem minmax(0, 1fr) 40px; }
  .teaser .line { grid-column: 2 / 3; grid-row: 2; }
  .teaser .go { width: 40px; height: 40px; grid-row: 1; grid-column: 3; }
  .highlights .teaser a { grid-template-columns: minmax(0, 1fr) 40px; }
  .highlights .line { grid-column: 1 / 2; }
  .highlights .go { grid-column: 2; }
}

/* Services */
.offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.offer { padding: 28px clamp(18px, 2.4vw, 32px) 8px; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.offer:first-child { border-left: 0; padding-left: 0; }
.offer .num { font-family: var(--serif); font-style: italic; font-size: 2.6rem; line-height: 1; color: var(--accent); margin-bottom: 18px; }
.offer h3 { margin-bottom: 10px; }
/* On the Services page the offer names are h2s under the page h1, styled like h3s */
.offer .h3-offer {
  font-family: var(--wide); font-stretch: 112%; font-weight: 700; text-transform: none;
  font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.2; letter-spacing: -0.005em; margin-bottom: 10px;
}
.offer .fit { color: var(--muted); }
.offer ul { margin: 6px 0 20px; padding: 0; list-style: none; }
.offer li { padding: 7px 0; border-top: 1px solid var(--line); font-size: 0.96rem; }
.offer .terms { margin-top: auto; font-size: 0.92rem; padding: 14px 0 0; border-top: 2px solid var(--accent); }
.offers.short .offer { padding-bottom: 20px; }
.also { margin: 48px 0 0; max-width: 72ch; color: var(--muted); }
@media (max-width: 900px) {
  .offers { grid-template-columns: minmax(0, 1fr); }
  .offer, .offer:first-child { border-left: 0; padding-left: 0; padding-right: 0; border-top: 1px solid var(--line); }
  .offer:first-child { border-top: 0; }
}

/* Case studies: an index you can open */
.cases { border-top: 2px solid var(--ink); }
.case { border-bottom: 1px solid var(--line); }
.case summary {
  list-style: none; cursor: pointer; display: grid; align-items: center;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto 44px; gap: 12px 24px; padding: clamp(20px, 3vw, 32px) 0;
}
.case summary::-webkit-details-marker { display: none; }
.case .cn { font-family: var(--serif); font-style: italic; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; color: var(--accent); }
.case .ct h3 { font-size: clamp(1.15rem, 2.4vw, 1.75rem); transition: color .15s; }
.case summary:hover .ct h3 { color: var(--accent); }
/* On the Work page the case titles are h2s under the page h1, styled like h3s */
.case .ct .h3-like {
  font-family: var(--wide); font-stretch: 112%; font-weight: 700; text-transform: none; text-wrap: wrap;
  font-size: clamp(1.15rem, 2.4vw, 1.75rem); line-height: 1.2; letter-spacing: -0.005em; margin: 0; transition: color .15s;
}
.case summary:hover .ct .h3-like { color: var(--accent); }
.case .ct .who { display: block; margin-top: 6px; font-size: 0.9rem; color: var(--muted); }
.case .tag { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 5px 10px; white-space: nowrap; }
.case .tog { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; transition: transform .2s, background .2s; }
.case .tog::before { content: "+"; font-size: 1.4rem; line-height: 1; }
.case[open] .tog { transform: rotate(45deg); background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.case-body { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 24px clamp(32px, 6vw, 80px); padding: 4px 0 clamp(32px, 5vw, 56px) calc(4.5rem + 24px); }
.meta { margin: 0; display: grid; gap: 0; align-content: start; }
.meta div { padding: 12px 0; border-top: 1px solid var(--line); }
.meta dt { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.meta dd { margin: 2px 0 0; }
.story h4 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.35rem; color: var(--accent); margin: 26px 0 6px; }
.story h4:first-child { margin-top: 0; }
.story ul { margin: 0 0 6px; padding-left: 1.1em; }
.story li { margin-bottom: 4px; }
.story li::marker { color: var(--accent); }
@media (max-width: 760px) {
  .case summary { grid-template-columns: 3rem minmax(0, 1fr) 40px; }
  .case .tag { display: none; }
  .case .tog { width: 40px; height: 40px; }
  .case-body { grid-template-columns: minmax(0, 1fr); padding-left: 0; }
}

/* How I work (inverted band) */
.standards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px clamp(24px, 4vw, 56px); counter-reset: st; }
.standards li { counter-increment: st; padding-top: 18px; border-top: 1px solid var(--line); }
.standards li::before { content: counter(st, decimal-leading-zero); font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--accent); display: block; margin-bottom: 8px; }
.standards strong { display: block; font-family: var(--wide); font-stretch: 112%; font-weight: 700; font-size: 1.08rem; margin-bottom: 6px; }
.standards span { color: var(--muted); }
.pull { margin: clamp(56px, 8vw, 96px) 0 0; padding-top: 36px; border-top: 2px solid var(--accent); }
.pull p { font-family: var(--serif); font-size: clamp(1.9rem, 4.4vw, 3.6rem); line-height: 1.08; margin: 0; max-width: 22ch; }
.pull cite { display: block; margin-top: 16px; font-style: normal; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 900px) { .standards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .standards { grid-template-columns: minmax(0, 1fr); } }

/* Photo slot. Shows abi.jpg once it is in the folder, and a placeholder until then */
.photo { margin: 0; aspect-ratio: 4 / 5; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .ph { display: none; font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--muted); text-align: center; padding: 16px; }
.photo.missing img { display: none; }
.photo.missing .ph { display: block; }

/* Case study pages */
.back { display: inline-flex; gap: 8px; margin-bottom: 28px; font-size: 0.9rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--accent); }
.case-who { margin: 0 0 18px; color: var(--muted); font-size: 1.05rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tags li { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 5px 10px; }
.case-meta { margin: 0 0 clamp(48px, 7vw, 88px); display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-top: 2px solid var(--ink); }
.case-meta div { padding: 16px 20px 16px 0; border-bottom: 1px solid var(--line); }
.case-meta dt { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.case-meta dd { margin: 4px 0 0; }
.chapter { display: grid; grid-template-columns: minmax(0, 0.35fr) minmax(0, 1fr); gap: 16px clamp(32px, 6vw, 80px); margin-bottom: clamp(48px, 7vw, 88px); }
.chapter > h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-stretch: 100%; text-transform: none; letter-spacing: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; color: var(--accent); margin: 0; }
.chapter-body { min-width: 0; }
.chapter-body > p, .chapter-body > ul { max-width: 64ch; }
.chapter-body ul { margin: 0 0 14px; padding-left: 1.1em; }
.chapter-body li { margin-bottom: 6px; }
.chapter-body li::marker { color: var(--accent); }
@media (max-width: 860px) { .chapter { grid-template-columns: minmax(0, 1fr); } }

/* Screenshots. Each image shows once its file exists; until then a labelled placeholder holds its place */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); margin: 8px 0 0; }
.shot { margin: 0; min-width: 0; }
.shot.wide { grid-column: 1 / -1; }
.shot .frame { display: block; border: 1px solid var(--line); background: var(--panel); overflow: hidden; text-decoration: none; }
.shot img { display: block; width: 100%; height: auto; }
.shot .ph { display: none; }
.shot.missing .frame { aspect-ratio: 16 / 10; display: grid; place-items: center; padding: 16px; text-align: center; pointer-events: none; }
.shot.missing img { display: none; }
.shot.missing .ph { display: block; font-family: var(--serif); font-style: italic; font-size: 1.15rem; line-height: 1.3; color: var(--muted); }
.shot .ph code { display: block; margin-top: 8px; font: 500 0.78rem/1.3 ui-monospace, Consolas, monospace; font-style: normal; color: var(--muted); overflow-wrap: anywhere; }
.shot figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 640px) { .shots { grid-template-columns: minmax(0, 1fr); } }

/* Before and after: side by side on wide screens, stacked on phones */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); margin: 8px 0 0; }
.compare .label { display: inline-block; margin-bottom: 10px; padding: 4px 10px; font-family: var(--wide); font-stretch: 112%; font-weight: 700; font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--ink); }
.compare .after .label { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (max-width: 640px) { .compare { grid-template-columns: minmax(0, 1fr); } }

.shots.three { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
@media (max-width: 640px) { .shots.three { grid-template-columns: minmax(0, 1fr); } }
.chapter-body > * + .shots, .chapter-body > * + .diagram, .chapter-body > * + .compare, .chapter-body > * + .vs { margin-top: clamp(20px, 3vw, 32px); }
.chapter-body h3 { margin: 28px 0 10px; }
.chapter-body h3:first-child { margin-top: 0; }

/* Phone screenshots stay phone-sized */
.shot.phone { max-width: 300px; width: 100%; justify-self: center; }

/* On the live site a missing screenshot disappears; placeholders only show in a local preview */
.live .shot.missing, .live .photo.missing, .live .compare.has-missing { display: none; }
.live .about-teaser:has(.photo.missing) { grid-template-columns: minmax(0, 1fr); }

/* Diagrams drawn in code: no client data, and they follow light and dark mode */
.diagram { margin: 8px 0 0; padding: clamp(18px, 3vw, 32px); border: 1px solid var(--line); background: var(--panel); }
.diagram + .diagram, .shots + .diagram, .diagram + .shots { margin-top: clamp(20px, 3vw, 36px); }
.diagram figcaption { margin-top: 18px; font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
.diagram .chain { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.flow { display: flex; align-items: center; gap: 12px; }
.flow-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.flow-head { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.flow-arrow { flex: none; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.flow-arrow::before { content: "\2192"; }
.node { background: var(--bg); border: 1px solid var(--line); padding: 9px 12px; font-size: 0.86rem; line-height: 1.35; }
.node b { display: block; font-family: var(--wide); font-stretch: 112%; font-weight: 700; font-size: 0.86rem; }
.node.key { border: 2px solid var(--accent); }
@media (max-width: 700px) {
  .flow { flex-direction: column; align-items: stretch; }
  .flow-arrow { text-align: center; }
  .flow-arrow::before { content: "\2193"; }
  .diagram .chain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 701px) and (max-width: 1000px) { .diagram .chain { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 24px; } }

/* Wireframes: grey boxes only, never real titles */
.wf { --c1: var(--accent); --c2: #2F6B6B; --c3: #6E6526; border: 1px solid var(--line); background: var(--bg); padding: 14px; display: grid; gap: 7px; }
:root[data-theme="dark"] .wf { --c2: #6FB0B0; --c3: #C9BC6A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wf { --c2: #6FB0B0; --c3: #C9BC6A; } }
.wf .bar { height: 22px; background: var(--line); }
.wf-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.wf-group + .wf-group { margin-top: 8px; }
.wf-group .tag { grid-column: 1 / -1; height: 7px; width: 38%; background: var(--c); }
.wf-group .bar { height: 30px; background: color-mix(in srgb, var(--c) 30%, var(--bg)); border-left: 3px solid var(--c); }
.wf-group.c1 { --c: var(--c1); } .wf-group.c2 { --c: var(--c2); } .wf-group.c3 { --c: var(--c3); }

.compare > figure { margin: 0; min-width: 0; }
.shot-cap { margin-top: 10px; font-size: 0.9rem; color: var(--muted); line-height: 1.45; }

/* Audit table: scrolls sideways inside its own box on a phone, never the page */
.table-wrap { overflow-x: auto; border-top: 2px solid var(--ink); }
.audit { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 0.95rem; }
.audit th, .audit td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
.audit thead th { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.audit tbody th { font-family: var(--wide); font-stretch: 112%; font-weight: 700; white-space: nowrap; }
.audit td:last-child { color: var(--ink); }
.audit td { color: var(--muted); }

/* Two-sided comparison of a number */
.vs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.vs > div { padding: 18px 20px 4px 0; }
.vs > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.vs .n { display: block; font-family: var(--serif); font-size: clamp(3rem, 7vw, 5rem); line-height: 1; color: var(--muted); }
.vs .after .n { color: var(--accent); }
.vs .k { display: block; margin-top: 8px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.vs p { margin: 6px 0 0; }
@media (max-width: 520px) {
  .vs { grid-template-columns: minmax(0, 1fr); }
  .vs > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* Testimonial on a case page */
/* Testimonial band on case pages: its own inverted band between "The result" and "Next case study" */
.quote-band { padding-block: clamp(72px, 11vw, 144px); }
.quote-band figure { margin: 0; }
.quote-band .qmark { display: block; height: 0.5em; font-family: var(--serif); font-size: clamp(6rem, 3.5rem + 5vw, 8rem); line-height: 0.85; color: var(--accent); margin-bottom: clamp(16px, 2vw, 24px); }
.quote-band blockquote { margin: 0; }
.quote-band blockquote p { margin: 0; max-width: 30ch; font-family: var(--serif); font-style: normal; font-size: clamp(1.4rem, 0.9rem + 2vw, 2.4rem); line-height: 1.3; color: var(--ink); }
.quote-band figcaption .rule { display: block; width: 56px; height: 3px; background: var(--accent); margin: clamp(28px, 4vw, 40px) 0 16px; }
.quote-band figcaption strong { display: block; font-family: var(--wide); font-stretch: 125%; font-weight: 800; font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.quote-band figcaption span:last-child { display: block; margin-top: 6px; font-size: 0.92rem; color: var(--muted); }
.quote-band + .wrap .next-case { margin-top: clamp(48px, 7vw, 88px); }
/* A band with no quote yet stays hidden on the live site; a local preview shows where it will go */
.quote-band:has(blockquote p:empty) { display: none; }
.preview .quote-band:has(blockquote p:empty) { display: block; }
.preview .quote-band blockquote p:empty::before { content: "Testimonial to come"; opacity: 0.45; }

/* One-line note under a gallery */
.gallery-note { margin: 12px 0 0; font-size: 0.9rem; color: var(--muted); }

/* Work page group headings */
.group-title { font-family: var(--serif); font-style: italic; font-weight: 400; font-stretch: 100%; text-transform: none; letter-spacing: 0; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.1; color: var(--accent); margin: clamp(48px, 6vw, 72px) 0 16px; }
.group-title:first-child { margin-top: 0; }

/* Home card thumbnails drawn in code */
.thumb.stat { background: var(--ink); color: var(--bg); text-align: center; }
.thumb.stat > .big, .thumb.stat > .small, .thumb.stat .ph { padding-inline: 16px; }
.thumb.stat .ph { font-style: normal; color: var(--bg); }
.highlights .thumb.stat { align-content: center; }
.thumb.stat .big { display: block; font-family: var(--serif); font-size: 5.5rem; line-height: 0.9; color: var(--accent); }
.thumb.stat .small { display: block; margin-top: 8px; font-size: 0.85rem; max-width: 22ch; margin-inline: auto; }
.thumb .wf { width: 72%; padding: 10px; }
.thumb .wf .wf-group .bar { height: 18px; }

.privacy { margin: 24px 0 0; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--panel); font-size: 0.9rem; color: var(--muted); max-width: 72ch; }

/* Next case study */
.next-case { border-block: 2px solid var(--ink); }
.next-case a { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: clamp(24px, 4vw, 40px) 0; text-decoration: none; color: var(--ink); }
.next-case small { display: block; font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--accent); margin-bottom: 6px; }
.next-case strong { font-family: var(--wide); font-stretch: 112%; font-weight: 700; font-size: clamp(1.15rem, 2.4vw, 1.75rem); line-height: 1.2; }
.next-case a:hover strong { color: var(--accent); }
.next-case .go { flex: none; width: 52px; height: 52px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--accent); font-size: 1.2rem; }
.next-case a:hover .go { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Home: about teaser */
.about-teaser { display: grid; grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr); gap: 32px clamp(32px, 6vw, 96px); align-items: center; }
.about-teaser .photo { max-width: 360px; }
.about-teaser p { font-size: 1.12rem; max-width: 54ch; }
.about-teaser .more { margin-top: 10px; }
@media (max-width: 760px) {
  .about-teaser { grid-template-columns: minmax(0, 1fr); }
  .about-teaser .photo { max-width: 260px; }
}

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; }
.about-side { position: sticky; top: 104px; }
.about-side h2 { margin-bottom: 24px; }
/* The About heading sits in a narrow column, so it uses the smaller section size, not the full page-title size */
.about-side .page-title { font-size: clamp(1.9rem, 3.6vw, 3.4rem); overflow-wrap: break-word; hyphens: manual; }
.about-side .photo { max-width: 380px; margin-bottom: 28px; }
.hello { font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.2; margin: 0; }
.hello em { color: var(--accent); }
.about-text p { max-width: 62ch; }
.creds { margin: 34px 0 0; display: grid; }
.creds div { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 4px 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.creds dt { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.creds dd { margin: 0; }
@media (max-width: 860px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .about-side { position: static; }
  .about-side .photo { max-width: 260px; }
}
@media (max-width: 480px) { .creds div { grid-template-columns: minmax(0, 1fr); } }

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(36px, 5vw, 64px) clamp(32px, 5vw, 72px); }
.quote { margin: 0; padding-top: 22px; border-top: 2px solid var(--ink); display: flex; flex-direction: column; }
.quote::before { content: "\201C"; font-family: var(--serif); font-size: 5rem; line-height: 0.6; color: var(--accent); height: 34px; margin-bottom: 8px; }
.quote p { font-family: var(--serif); font-size: clamp(1.3rem, 2vw, 1.55rem); line-height: 1.35; }
.quote footer { margin-top: auto; padding-top: 10px; font-size: 0.92rem; color: var(--muted); }
.quote footer strong { display: block; font-family: var(--wide); font-stretch: 112%; font-weight: 700; color: var(--ink); font-size: 1rem; }
@media (max-width: 760px) { .quotes { grid-template-columns: minmax(0, 1fr); } }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; }
.faq-list { border-top: 2px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; font-family: var(--wide); font-stretch: 108%; font-weight: 600; font-size: 1.05rem; line-height: 1.35; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-family: var(--text); font-weight: 400; font-size: 1.5rem; line-height: 1; color: var(--accent); transition: transform .2s; flex: none; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover { color: var(--accent); }
.faq-list details p { margin: 0 0 22px; color: var(--muted); max-width: 62ch; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: minmax(0, 1fr); } }

/* Contact */
.contact h2 { font-size: clamp(2.4rem, 8vw, 6.4rem); line-height: 0.9; margin-bottom: 28px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(32px, 6vw, 96px); align-items: end; }
.contact-grid p { font-size: 1.15rem; max-width: 46ch; }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 8px; }
.email { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2rem); color: var(--ink); text-decoration-color: var(--accent); overflow-wrap: anywhere; }
.copy-btn { background: none; border: 0; padding: 4px 0; color: var(--muted); font: 600 0.8rem/1 var(--text); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.copy-btn:hover { color: var(--accent); }
.copy-status { font-size: 0.85rem; color: var(--accent); min-height: 1.3em; margin: 0 0 18px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

/* Negative footer: the name rises out of the page */
.site-foot { padding: 0 0 max(24px, env(safe-area-inset-bottom, 0px)); }
.foot-panel { background: var(--accent); color: var(--on-accent); padding-top: clamp(28px, 4vw, 48px); overflow: hidden; }
.foot-panel .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-bottom: clamp(20px, 4vw, 48px); }
.foot-panel .tagline { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.8rem); line-height: 1.2; margin: 0; max-width: 24ch; }
.foot-panel nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-panel nav a { color: var(--on-accent); font-size: 0.92rem; font-weight: 500; text-decoration: none; }
.foot-panel nav a:hover { text-decoration: underline; }
.wordmark { display: block; width: 100%; height: auto; margin-bottom: -1px; }
.wordmark text { fill: var(--bg); font-family: var(--wide); font-stretch: 125%; font-weight: 900; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 18px; font-size: 0.82rem; color: var(--muted); }
@media (max-width: 760px) {
  .foot-panel .wrap, .foot-base { flex-direction: column; align-items: center; text-align: center; }
  .foot-panel .tagline { margin-inline: auto; }
  .foot-panel nav ul { justify-content: center; }
}
