/* =====================
   Reset & base
   ===================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:         #F8F7F4;
  --heading:    #1A1A1A;
  --body:       #2E2C29;
  --muted:      #6E6B65;
  --subtle:     #706B64;
  --border:     #E2DED8;
  --sage:       #7A8F68;   /* decorative: borders, fills */
  --sage-dark:  #647555;   /* text: 4.65:1 on --bg, passes WCAG AA */
  --sage-light: #E9EDE4;
  --accent:       var(--sage);
  --accent-dark:  var(--sage-dark);
  --accent-light: var(--sage-light);
  --font:       'Manrope', system-ui, -apple-system, sans-serif;
}

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  color: var(--body);
  font-family: var(--font);
  line-height: 1.72;
  min-height: 100vh;
}

/* =====================
   Layout
   ===================== */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 28px;
}

.container--wide {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 28px;
}

/* =====================
   Focus visible — global
   ===================== */
:focus-visible {
  outline: 2px solid var(--heading);
  outline-offset: 3px;
  border-radius: 2px;
}

/* =====================
   Skip link
   ===================== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 28px;
  background: var(--heading);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 6px 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  z-index: 100;
  transition: top 0.1s;
}

.skip-link:focus {
  top: 0;
}

/* =====================
   Navigation
   ===================== */
nav {
  padding: 36px 0 32px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--sage);
  margin-bottom: 0;
}

.nav-name {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--heading);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--heading);
}

/* =====================
   Links
   ===================== */
a {
  color: var(--body);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
  transition: text-decoration-color 0.15s ease;
}

a:hover {
  text-decoration-color: var(--muted);
}

/* =====================
   Typography — H1
   L: 40px / -0.04em / 1.1
   M: 36px / -0.035em / 1.1
   S: 32px / -0.03em / 1.15
   XS: 28px / -0.02em / 1.15
   ===================== */
h1 {
  font-family: var(--font);
  font-weight: 600;
  font-size: 40px;
  letter-spacing: -0.04em;
  line-height: 1.1em;
  color: var(--heading);
}

/* =====================
   Typography — H2
   L: 30px / -0.03em / 1.15
   M: 28px / -0.025em / 1.15
   S: 26px / -0.02em / 1.2
   XS: 24px / -0.015em / 1.2
   ===================== */
h2 {
  font-family: var(--font);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.03em;
  line-height: 1.15em;
  color: var(--heading);
  margin: 3rem 0 0.65rem;
}

/* =====================
   Typography — H3
   L: 22px / -0.02em / 1.25
   M: 21px / -0.015em / 1.25
   S: 20px / -0.01em / 1.3
   XS: 19px / -0.005em / 1.3
   ===================== */
h3 {
  font-family: var(--font);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.25em;
  color: var(--heading);
  margin: 2.25rem 0 0.5rem;
}

/* =====================
   Body text
   ===================== */
p {
  font-size: 17px;
  line-height: 1.72;
  margin-bottom: 1.25rem;
}

strong {
  font-weight: 600;
  color: var(--heading);
}

em {
  font-style: italic;
}

ul, ol {
  margin: 0 0 1.25rem 1.4rem;
}

li {
  margin-bottom: 0.5rem;
  font-size: 17px;
}

blockquote {
  border-left: 4px solid var(--accent);
  margin: 2.25rem 0;
  padding: 0.2rem 0 0.2rem 1.5rem;
  color: var(--body);
  font-size: 19px;
  font-style: italic;
  line-height: 1.6;
}

/* =====================
   Home page
   ===================== */
.home-intro {
  padding: 80px 0 64px;
}

.home-intro h1 {
  margin-bottom: 16px;
}

.home-tagline {
  font-size: 18px;
  color: var(--muted);
  max-width: 440px;
  line-height: 1.6;
}

.home-availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px 5px 10px;
  transition: border-color 0.2s, color 0.2s;
}

.home-availability::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5A9E6B;
  flex-shrink: 0;
}

.home-availability:hover {
  color: var(--body);
  border-color: var(--sage);
}

.case-studies {
  padding-top: 12px;
  padding-bottom: 96px;
}

.case-study-entry {
  display: grid;
  grid-template-columns: 5fr 7fr;
  height: 320px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 40px;
  position: relative;
  cursor: pointer;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.case-study-entry:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* Stretch the read-link to cover the whole card */
.case-study-entry .read-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
}

/* Left text panel */
.entry-panel-left {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Right image panel */
.entry-panel-right {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 28px 24px 0;
}

/* =====================
   Browser window mockup
   ===================== */
.browser-window {
  width: 84%;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.22);
  flex-shrink: 0;
}

/* Browser chrome — tab bar */
.browser-chrome {
  background: #DEE1E6;
  font-family: -apple-system, 'Segoe UI', sans-serif;
}

.browser-tabs {
  display: flex;
  align-items: flex-end;
  padding: 3px 50px 0 6px;
  gap: 1px;
}

.browser-tab {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px;
  border-radius: 5px 5px 0 0;
  font-size: 8.5px;
  max-width: 120px;
  min-width: 60px;
  white-space: nowrap;
  overflow: hidden;
  background: #C5C8CF;
  color: #5F6368;
  line-height: 1;
}

.browser-tab--active {
  background: #F5F5F5;
  color: #202124;
  font-weight: 500;
  padding-bottom: 4px;
}

.tab-favicon {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
  display: block;
}

.tab-title {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Nav bar row */
.browser-nav {
  background: #F5F5F5;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-top: 1px solid #DADCE0;
}

.browser-arrows {
  display: flex;
  gap: 2px;
  color: #ABABAB;
  font-size: 10px;
  flex-shrink: 0;
}

.browser-arrows span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
}

.browser-url-bar {
  flex: 1;
  background: #EBEBEB;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 8.5px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

.url-lock {
  font-size: 7.5px;
  color: #888;
  flex-shrink: 0;
}

.browser-window .screen-viewport {
  overflow: hidden;
  width: 100%;
}

.browser-window .screen-viewport img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  transition: object-position 0.5s ease;
}

/* Coutts: start from top */
.case-study-entry--coutts .screen-viewport img {
  object-position: top center;
}

/* Coutts: tilt left, bleeds off bottom-left */
.case-study-entry--coutts .browser-window {
  transform: rotate(-2.5deg);
  transform-origin: bottom left;
  margin-left: -16px;
  margin-bottom: -36px;
}

/* Loans: tilt right, bleeds off bottom-right */
.case-study-entry--loans .browser-window {
  transform: rotate(3deg);
  transform-origin: bottom right;
  margin-left: 32px;
  margin-right: -20px;
  margin-bottom: -36px;
}

/* Loans: sharpen */
.case-study-entry--loans .screen-viewport img {
  filter: contrast(1.12) saturate(1.08);
}

/* CareerSense: tilt right (mirror), full window visible */
.case-study-entry--careersense {
  height: 340px;
}

.case-study-entry--careersense .browser-window {
  transform: rotate(-3deg);
  transform-origin: bottom left;
  margin-left: -20px;
  margin-bottom: -36px;
}

/* CareerSense: sharpen */
.case-study-entry--careersense .screen-viewport img {
  filter: contrast(1.12) saturate(1.08);
}

/* PNA: phone with sticky header (same treatment as savings) */
.case-study-entry--pna .phone-mockup {
  display: block;
  padding: 0;
  width: 220px;
  height: 320px;
  margin-right: 16px;
  margin-bottom: -20px;
  border-radius: 6px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  position: relative;
  transform: rotate(2.5deg);
  transform-origin: bottom right;
  transition: transform 0.35s ease;
}

.case-study-entry--pna .phone-mockup img {
  position: absolute;
  top: 0;
  left: 0;
  width: 220px;
  height: auto;
  max-height: none;
  display: block;
  border-radius: 0;
  box-shadow: none;
  transform: translateY(0);
  transition: transform 0.5s ease;
}

.case-study-entry--pna .phone-mockup::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 47px;
  background: url('assets/coutts_savings_mobile_screen.png') no-repeat top left;
  background-size: 220px auto;
  pointer-events: none;
  z-index: 1;
}

.case-study-entry--pna:hover .phone-mockup img {
  transform: translateY(-90px);
}

/* Savings: phone with sticky header */
.case-study-entry--coutts-savings .phone-mockup {
  display: block;
  padding: 0;
  width: 220px;
  height: 320px;
  margin-right: 16px;
  margin-bottom: -20px;
  border-radius: 6px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  position: relative;
  transform: rotate(2.5deg);
  transform-origin: bottom right;
  transition: transform 0.35s ease;
}

/* Scrolling content — override all base phone-mockup img rules */
.case-study-entry--coutts-savings .phone-mockup img {
  position: absolute;
  top: 0;
  left: 0;
  width: 220px;
  height: auto;
  max-height: none;
  display: block;
  border-radius: 0;
  box-shadow: none;
  transform: translateY(0);
  transition: transform 0.5s ease;
}

/* Sticky header overlay */
.case-study-entry--coutts-savings .phone-mockup::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 47px;
  background: url('assets/coutts_savings_mobile_screen.png') no-repeat top left;
  background-size: 220px auto;
  pointer-events: none;
  z-index: 1;
}

.case-study-entry--coutts-savings:hover .phone-mockup img {
  transform: translateY(-90px);
}

/* Portfolio: browser tilts right */
.case-study-entry--portfolio .browser-window {
  transform: rotate(2.5deg);
  transform-origin: bottom right;
  margin-right: -16px;
  margin-bottom: -36px;
}

/* Per-project colour theming */
.case-study-entry--coutts .entry-panel-left    { background: #3D7A76; }
.case-study-entry--coutts .entry-panel-right   { background: #E0F0EE; }

.case-study-entry--loans .entry-panel-left     { background: #7A4A5C; }
.case-study-entry--loans .entry-panel-right    { background: #F0E5EB; }

.case-study-entry--careersense .entry-panel-left  { background: #A87828; }
.case-study-entry--careersense .entry-panel-right { background: #F5EDD8; }

.case-study-entry--portfolio .entry-panel-left  { background: #508840; }
.case-study-entry--portfolio .entry-panel-right { background: #E5F0E0; }

.case-study-entry--coutts-savings .entry-panel-left  { background: #7A4A5C; }
.case-study-entry--coutts-savings .entry-panel-right { background: #F0E5EB; }

.case-study-entry--pna .entry-panel-left  { background: #3A6298; padding: 16px 36px; }
.case-study-entry--pna .entry-panel-right { background: #E0E8F5; }
.case-study-entry--pna .entry-stat        { margin-top: 4px; }
.case-study-entry--pna .read-link         { margin-top: 0.75rem; }

.case-study-entry--savings-workshop .entry-panel-left  { background: #C06828; }
.case-study-entry--savings-workshop .entry-panel-right { background: #F5EAE0; }

.phone-mockup {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 28px 24px;
}

.phone-mockup img {
  max-height: 270px;
  width: auto;
  border-radius: 6px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.screen-viewport--text {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 32px;
  background: #E5EFF7;
}

.screen-text-preview {
  font-size: 15px;
  font-weight: 600;
  color: #2A4D75;
  line-height: 1.5;
  text-align: center;
  margin: 0;
  font-style: italic;
}

/* Text on coloured left panels */
.entry-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.entry-number {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.65);
}

.case-study-entry h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.25em;
  color: #fff;
  margin: 0 0 0.6rem;
}

.case-study-entry p {
  font-size: 15px;
  color: rgba(255,255,255,0.92);
  margin-bottom: 0;
  line-height: 1.6;
}

.protected-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.protected-badge svg {
  flex-shrink: 0;
}

.entry-stat {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  margin-top: 12px;
  margin-bottom: 0;
  letter-spacing: 0.01em;
}
.entry-stat strong {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
}

.read-link {
  display: inline-flex;
  align-items: center;
  margin-top: 1.5rem;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  letter-spacing: -0.01em;
}

.read-link .arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.read-link:hover .arrow {
  transform: translateX(4px);
}

/* =====================
   Case study pages
   ===================== */
.case-study-header {
  padding: 60px 0 44px;
}

.case-study-header h1 {
  margin-bottom: 16px;
}

.case-study-tagline {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 580px;
  margin-bottom: 32px;
}

.case-study-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  font-size: 14px;
  color: var(--muted);
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.case-study-meta span {
  padding-left: 10px;
  border-left: 2px solid var(--accent);
  line-height: 1.45;
}

.case-study-meta span strong {
  color: var(--accent-dark);
  font-weight: 600;
  display: block;
  font-size: 14px;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.case-study-body {
  padding: 8px 0 96px;
}

/* Keep prose readable at wide container — cap text but let components breathe */
.case-study-body p,
.case-study-body li,
.case-study-body h2,
.case-study-body h3,
.about-body p,
.about-body li,
.about-body h2 {
  max-width: 660px;
}

/* Components fill their own container width */
.at-a-glance p,
.key-finding p,
blockquote {
  max-width: none;
}

.at-a-glance {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 28px 32px 24px;
  margin-bottom: 3rem;
}

.at-a-glance h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-dark);
  margin: 0 0 1rem;
  line-height: 1;
}

.at-a-glance p {
  font-size: 17px;
  margin-bottom: 0.75rem;
}

.at-a-glance p:last-child {
  margin-bottom: 0;
}

/* =====================
   Two-column intro (case study opener)
   ===================== */
.case-intro-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2rem;
  align-items: stretch;
  margin-bottom: 3.5rem;
}

.case-intro-grid .at-a-glance {
  margin-bottom: 0;
}

.case-intro-image {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
}

.case-intro-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =====================
   Key finding callout
   ===================== */
.key-finding {
  background: var(--accent-light);
  border-radius: 6px;
  padding: 20px 24px 20px;
  margin: 2rem 0;
}

.key-finding::before {
  content: 'Key finding';
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-dark);
  margin-bottom: 0.6rem;
}

.key-finding p {
  font-size: 17px;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 0;
  line-height: 1.6;
}

/* =====================
   Prose example block
   ===================== */
.prose-example {
  margin: 1.75rem 0 2rem;
}

.prose-example-label {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent-dark);
  margin-bottom: 1.25rem;
}

/* =====================
   Images
   ===================== */
.case-study-image {
  margin: 2.5rem 0;
}

.case-study-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.case-study-image figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--subtle);
  line-height: 1.5;
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}

/* Contained image — limits display width for low-res sources */
.case-study-image--contained {
  max-width: 600px;
}

/* Portrait image — mobile screenshots etc, centred with constrained width */
.case-study-image--portrait {
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

/* Blend image background into page — use on images with non-transparent bg */
.case-study-image--blend img {
  mix-blend-mode: multiply;
}

/* Before/after image comparison row */
.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin: 2.5rem 0;
  align-items: stretch;
}

.before-after figure {
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}

.before-after figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.before-after figure figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--subtle);
  line-height: 1.5;
  font-weight: 600;
}

/* Text + portrait phone side by side */
.text-phone-pair {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 40px;
  align-items: start;
  margin: 1.5rem 0 2.5rem;
}

.text-phone-pair p {
  margin: 0;
}

.text-phone-pair__image img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  display: block;
}

.text-phone-pair__image figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--subtle);
  line-height: 1.5;
}

/* Side-by-side image pair */
.image-pair {
  display: flex;
  gap: 20px;
  margin: 2.5rem 0;
  align-items: flex-start;
}

.image-pair .case-study-image {
  margin: 0;
  flex: 1 1 0;
  overflow: hidden;
  border-radius: 6px;
}

.image-pair .case-study-image img {
  height: 280px;
  width: 100%;
  object-fit: cover;
  object-position: top left;
}

/* Natural height pair with ⅓/⅔ column split */
.image-pair--natural {
  display: grid;
  grid-template-columns: 1fr 2fr;
}

/* Natural height pair with equal columns — use for UI screenshots */
.image-pair--equal {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.image-pair--equal .case-study-image {
  flex: unset;
}

.image-pair--equal .case-study-image img {
  height: 280px;
  object-fit: cover;
  object-position: center;
}

.image-pair--natural .case-study-image {
  flex: unset;
}

.image-pair--natural .case-study-image img {
  height: auto;
  object-fit: unset;
}

h4 {
  font-family: var(--font);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1.3em;
  color: var(--heading);
  margin: 1.75rem 0 0.4rem;
}

/* Reduce top padding when tradeoff grid immediately follows a heading */
h3 + .tradeoff-grid,
h4 + .tradeoff-grid {
  padding-top: 20px;
  margin-top: 0;
}

h4:has(+ .tradeoff-grid) {
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
  margin-top: 2.5rem;
  margin-bottom: 0;
}

/* Full-bleed image (wider than text column) */
.case-study-image--wide {
  margin: 2.5rem -28px;
}

.case-study-image--wide img {
  border-radius: 0;
  border-left: none;
  border-right: none;
}

.case-study-image--wide figcaption {
  padding: 0 28px 0 38px;
}

/* =====================
   Competitor comparison block
   ===================== */
.competitor-comparison {
  margin: 2.5rem 0;
}

/* Override the wide-image bleed so the image stays inside the container,
   aligned with the labels and annotation cards */
.competitor-comparison .case-study-image--wide {
  margin: 0;
}

.competitor-comparison .case-study-image--wide img {
  border-radius: 4px;
}

.competitor-labels {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  margin-bottom: 0.5rem;
}

.competitor-labels span {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.competitor-annotations {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.competitor-annotation {
  background: var(--accent-light);
  border-radius: 4px;
  padding: 14px 16px 16px;
}

.competitor-annotation-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--accent);
  line-height: 1.4;
}

.competitor-annotation p:last-child {
  font-size: 15px;
  color: var(--accent-dark);
  line-height: 1.5;
  margin: 0;
}

.competitor-note {
  padding: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* =====================
   Body content links — sage tint
   ===================== */
.about-body a,
.case-study-body a {
  color: var(--accent-dark);
  text-decoration-color: color-mix(in srgb, var(--accent-dark) 35%, transparent);
}

.about-body a:hover,
.case-study-body a:hover {
  text-decoration-color: var(--accent-dark);
}

/* =====================
   H3 approach step numbers
   ===================== */
h3[data-step]::before {
  content: attr(data-step);
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-dark);
  margin-bottom: 4px;
}

/* =====================
   Case study H1 sage rule
   ===================== */
.case-study-header h1::after {
  content: '';
  display: block;
  width: 36px;
  height: 2px;
  background: var(--accent);
  margin: 14px 0 0;
}

/* =====================
   Reflection section
   ===================== */
/* =====================
   Takeaway split — full-width reflection block
   ===================== */
.takeaway-split {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.takeaway-split-left {
  background: var(--accent-dark);
  padding: 60px 48px 60px max(28px, calc((100vw - 900px) / 2 + 28px));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.takeaway-split-right {
  background: var(--accent-light);
  padding: 60px max(28px, calc((100vw - 900px) / 2 + 28px)) 60px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}

.takeaway-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.75);
  margin-bottom: 20px;
  display: block;
}

.takeaway-quote {
  font-size: 22px !important;
  font-style: italic;
  line-height: 1.55;
  color: #fff !important;
  max-width: 380px;
}

.takeaway-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0 16px;
  align-items: start;
}

.takeaway-number {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-dark);
  padding-top: 3px;
  letter-spacing: 0.04em;
}

.takeaway-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
}

.takeaway-text strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--heading);
}

/* =====================
   Next case study navigation
   ===================== */
.all-work-link {
  display: inline-block;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 48px;
  transition: color 0.2s;
}

.all-work-link:hover {
  color: var(--body);
}

.next-case-study {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: var(--accent);
  padding: 40px max(28px, calc((100vw - 900px) / 2 + 28px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  transition: background 0.2s;
  margin-top: 0;
}

.next-case-study:hover {
  background: var(--accent-dark);
}

.next-case-study-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.8);
  display: block;
  margin-bottom: 6px;
}

.next-case-study-title {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
}

.next-case-study-arrow {
  font-size: 32px;
  color: rgba(255,255,255,0.55);
  transition: transform 0.2s, color 0.2s;
  flex-shrink: 0;
  margin-left: 24px;
}

.next-case-study:hover .next-case-study-arrow {
  transform: translateX(6px);
  color: #fff;
}

/* =====================
   Trade-off cards — three-column wider layout
   ===================== */
.tradeoff-grid {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 56px max(28px, calc((100vw - 1080px) / 2 + 28px));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 20px;
  row-gap: 18px;
  margin-top: 2rem;
  margin-bottom: 2rem;
  background: var(--bg);
}

.tradeoff-card {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 10px;
  padding: 32px 28px;
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
}

.tradeoff-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tradeoff-icon svg {
  width: 44px;
  height: 44px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tradeoff-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--heading);
  line-height: 1.4;
}

.tradeoff-body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--body);
}

.tradeoff-chosen {
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--accent-dark);
  font-weight: 600;
  align-self: start;
}

/* =====================
   Old reflection section (kept for graceful fallback)
   ===================== */
.reflection-section {
  background: var(--accent-light);
  border-top: 2px solid var(--accent);
  border-radius: 0 0 6px 6px;
  padding: 28px 32px;
  margin-top: 3rem;
}

.reflection-section h2 {
  margin-top: 0;
}

/* =====================
   Confidentiality note
   ===================== */
.figure-blur-note {
  font-size: 14px;
  color: var(--subtle);
  font-style: italic;
  margin-top: 8px;
  line-height: 1.4;
}

.confidentiality-note {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--subtle);
  font-style: italic;
}

/* =====================
   External stat callout — big number + quote + source
   ===================== */
.stat-callout {
  display: flex;
  align-items: center;
  gap: 32px;
  background: var(--accent-light);
  padding: 40px max(28px, calc((100vw - 900px) / 2 + 28px));
  margin: 2.5rem 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.stat-callout-number {
  font-size: 68px;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--accent-dark);
  flex-shrink: 0;
  white-space: nowrap;
}

.stat-callout-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-callout-body p {
  font-size: 17px !important;
  font-style: italic;
  color: var(--heading) !important;
  line-height: 1.55 !important;
  margin: 0 !important;
  max-width: none !important;
}

.stat-callout-body cite {
  font-size: 14px;
  color: var(--muted);
  font-style: normal;
  letter-spacing: 0.02em;
  font-weight: 600;
}

/* =====================
   Stat band — full viewport width block with big numbers
   ===================== */
.stat-band {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 3rem;
  margin-bottom: 3rem;
  padding: 60px max(28px, calc((100vw - 900px) / 2 + 28px));
  background: var(--accent-dark);
  display: flex;
  justify-content: center;
  gap: 0;
}

.stat-band-item {
  flex: 1;
  text-align: center;
  padding: 0 28px;
  border-right: 1px solid rgba(255,255,255,0.18);
}

.stat-band-item:last-child {
  border-right: none;
}

.stat-band-number {
  font-size: 76px;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  color: #fff;
  display: block;
}

.stat-band-label {
  font-size: 14px;
  color: rgba(255,255,255,0.62);
  margin-top: 14px;
  line-height: 1.55;
  display: block;
}

/* =====================
   Pull quote — full viewport width
   ===================== */
.pull-quote {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 3rem;
  margin-bottom: 3rem;
  padding: 48px max(28px, calc((100vw - 900px) / 2 + 28px));
  background: var(--bg);
  position: relative;
}

.pull-quote::before {
  content: '\201C';
  font-size: 120px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.35;
  position: absolute;
  top: 12px;
  left: max(28px, calc((100vw - 900px) / 2 + 28px));
  font-style: italic;
  pointer-events: none;
}

.pull-quote p {
  font-size: 24px !important;
  font-style: italic;
  letter-spacing: -0.02em !important;
  line-height: 1.45 !important;
  color: var(--heading) !important;
  max-width: 740px !important;
  margin-bottom: 0.75rem !important;
  font-weight: 400 !important;
  padding-top: 1.5rem;
}

.pull-quote cite {
  display: block;
  font-size: 14px;
  color: var(--muted);
  font-style: normal;
  letter-spacing: 0.02em;
  font-weight: 600;
}

/* =====================
   Quote grid — user research quotes as cards
   ===================== */
.quote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 2.5rem 0;
}

.quote-grid--wide {
  max-width: none;
}

.quote-card {
  background: var(--accent-light);
  border-radius: 8px;
  padding: 26px 28px;
}

.quote-card--span {
  grid-column: 1 / -1;
}

.quote-card p {
  font-size: 16px !important;
  font-style: italic;
  color: var(--heading) !important;
  line-height: 1.65 !important;
  margin-bottom: 14px !important;
  max-width: none !important;
}

.quote-card cite {
  font-size: 14px;
  color: var(--muted);
  font-style: normal;
  letter-spacing: 0.02em;
  font-weight: 600;
}

/* =====================
   Insight cards
   ===================== */
.insight-cards-intro {
  font-size: 15px;
  color: var(--muted);
  margin: 2rem 0 0.6rem;
}

.insight-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0 0 2.5rem;
  max-width: 660px;
}

.insight-card {
  background: var(--sage-light);
  border-radius: 10px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.insight-card-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--sage-dark);
  opacity: 0.65;
}

.insight-visual {
  height: 72px;
  display: flex;
  align-items: flex-end;
}

.insight-stat {
  font-size: 56px;
  font-weight: 400;
  color: var(--sage-dark);
  letter-spacing: -0.03em;
  line-height: 1;
}

.insight-text {
  font-size: 14px;
  color: var(--body);
  line-height: 1.65;
  margin: 0;
  max-width: none !important;
}

/* =====================
   About page
   ===================== */
.about-header {
  padding: 60px 0 16px;
}

.about-body {
  padding-bottom: 96px;
}

.about-body h2 {
  margin-top: 2.75rem;
  padding-left: 14px;
  border-left: 3px solid var(--sage);
}

/* =====================
   How I got here — side by side
   ===================== */
.got-here-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 0 56px;
  margin-top: 1.5rem;
}

.got-here-prose p {
  line-height: 1.72;
  color: var(--body);
  margin-bottom: 1.25rem;
  max-width: none;
}

.got-here-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem;
}

.got-here-list li {
  font-size: 15px;
  line-height: 1.75;
  color: var(--body);
  padding-left: 1rem;
  position: relative;
  margin-bottom: 0.2rem;
}

.got-here-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage-dark);
}

/* Custom bullets for case study and about body lists */
.case-study-body ul,
.about-body ul:not(.got-here-list) {
  list-style: none;
  padding-left: 1.1rem;
}

.case-study-body ul li,
.about-body ul:not(.got-here-list) li {
  position: relative;
}

.case-study-body ul li::before,
.about-body ul:not(.got-here-list) li::before {
  content: '';
  position: absolute;
  left: -1.1rem;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-dark);
}

/* =====================
   Career timeline
   ===================== */
.timeline {
  position: relative;
  margin: 0;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.timeline-entry {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0 24px;
  position: relative;
  flex: 1;
  min-height: 96px;
}

.timeline-year {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  padding-top: 3px;
  text-align: right;
  padding-right: 24px;
  position: relative;
  line-height: 1.4;
  padding-bottom: 0;
  white-space: nowrap;
}

/* Vertical connector line */
.timeline-year::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: var(--sage-dark);
  opacity: 0.35;
}

.timeline-entry:last-child .timeline-year::after {
  display: none;
}

/* Dot on the line */
.timeline-year::before {
  content: '';
  position: absolute;
  right: -4px;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  z-index: 2;
  box-shadow: 0 0 0 2px var(--bg);
}

.timeline-entry--current .timeline-year::before {
  background: var(--sage-dark);
  width: 9px;
  height: 9px;
  right: -5px;
  top: 6px;
  box-shadow: 0 0 0 2px var(--bg);
}

.timeline-entry--current .timeline-year {
  color: var(--sage-dark);
}

.timeline-content {
  padding-bottom: 0;
  padding-top: 2px;
}



.timeline-role {
  font-size: 15px;
  font-weight: 600;
  color: var(--body);
  margin: 0 0 3px;
  line-height: 1.3;
}

.timeline-org {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

/* =====================
   Contact section
   ===================== */
.contact-section {
  padding: 72px 0 64px;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.contact-section h2 {
  margin: 0 0 12px;
}

.contact-section p {
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 480px;
}

.contact-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: center;
}

.contact-links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--sage-dark);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--sage-dark) 30%, transparent);
  padding-bottom: 1px;
}

.contact-links a:hover {
  border-bottom-color: var(--sage-dark);
}

/* =====================
   Footer
   ===================== */
footer {
  padding: 36px 0;
  border-top: 2px solid var(--sage);
  font-size: 14px;
  color: var(--muted);
  display: flex;
  gap: 24px;
  align-items: center;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

footer a:hover {
  color: var(--heading);
}

.footer-copy {
  margin-right: auto;
  font-weight: 600;
  color: var(--body);
  letter-spacing: -0.01em;
}

/* =====================
   Breakpoints — M (≤1200px)
   ===================== */
@media (max-width: 1200px) {
  h1 { font-size: 36px; letter-spacing: -0.035em; }
  h2 { font-size: 28px; letter-spacing: -0.025em; }
  h3 { font-size: 21px; letter-spacing: -0.015em; }
}

/* =====================
   Breakpoints — S (≤900px)
   ===================== */
@media (max-width: 900px) {
  h1 { font-size: 32px; letter-spacing: -0.03em; line-height: 1.15em; }
  h2 { font-size: 26px; letter-spacing: -0.02em; line-height: 1.2em; }
  h3 { font-size: 20px; letter-spacing: -0.01em; line-height: 1.3em; }

  .tradeoff-grid { grid-template-columns: 1fr; padding: 40px 28px; }
}

/* =====================
   Breakpoints — XS (≤600px)
   ===================== */
@media (max-width: 600px) {
  html { font-size: 16px; }

  h1 { font-size: 28px; letter-spacing: -0.02em; line-height: 1.15em; }
  h2 { font-size: 24px; letter-spacing: -0.015em; line-height: 1.2em; }
  h3 { font-size: 19px; letter-spacing: -0.005em; line-height: 1.3em; }

  .home-intro { padding: 48px 0 40px; }

  .case-study-header { padding: 40px 0 32px; }
  .case-study-meta { flex-direction: column; gap: 8px; }

  .case-study-image--wide { margin: 2rem 0; }
  .case-study-image--wide img { border-radius: 6px; }
  .case-study-image--wide figcaption { padding: 0; }

  .stat-band { flex-direction: column; gap: 28px; padding: 40px 24px; }
  .stat-band-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.18); padding: 0 0 28px; }
  .stat-band-item:last-child { border-bottom: none; padding-bottom: 0; }
  .stat-band-number { font-size: 56px; }

  .stat-callout { flex-direction: column; gap: 16px; padding: 32px 24px; }
  .stat-callout-number { font-size: 52px; }

  .pull-quote { padding: 36px 24px; }
  .pull-quote p { font-size: 20px !important; }

  .quote-grid { grid-template-columns: 1fr; }

  .tradeoff-grid { grid-template-columns: 1fr; padding: 40px 24px; }

  .competitor-labels { display: none; }
  .competitor-annotations { grid-template-columns: 1fr; gap: 8px; }
  .competitor-comparison { margin: 2rem 0; }
  .competitor-note { padding: 10px 0 0; }

  .takeaway-split { grid-template-columns: 1fr; }
  .takeaway-split-left { padding: 40px 24px; }
  .takeaway-split-right { padding: 40px 24px; gap: 20px; }
  .takeaway-quote { font-size: 20px !important; }

  .next-case-study { flex-direction: column; align-items: flex-start; gap: 12px; padding: 32px 24px; }
  .next-case-study-arrow { font-size: 26px; margin-left: 0; }

  .case-intro-grid {
    grid-template-columns: 1fr;
  }

  .case-intro-image {
    max-height: 280px;
  }

  /* Stack cards on mobile */
  .case-study-entry {
    grid-template-columns: 1fr;
    height: auto;
  }

  .entry-panel-left {
    padding: 32px 28px;
    display: block;
    align-self: start;
  }

  .case-study-entry .entry-panel-left p {
    margin-bottom: 0;
  }

  .entry-panel-left .read-link {
    display: inline-flex;
    margin-top: 1.5rem;
  }

  .entry-panel-right {
    padding: 24px 24px 0;
    min-height: 180px;
  }

  .device-frame--laptop .device-keyboard {
    margin: 0 -10px;
  }
}

/* =====================
   Animations
   ===================== */

/* Page enter */
@keyframes page-enter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}

body {
  animation: page-enter 0.45s ease both;
}

/* Page exit */
body.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

/* Scroll fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  will-change: opacity, transform;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Contact panel links */
.contact-links-panel {
  gap: 0;
  justify-content: center;
}

.contact-link-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px 0;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.contact-link-item:first-child {
  border-top: 1px solid rgba(0,0,0,0.1);
}

.contact-link-item:hover {
  opacity: 0.65;
}

.contact-link-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--sage-dark);
}

.contact-link-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--heading);
  letter-spacing: -0.01em;
}

/* Browser window hover lift */
.browser-window {
  transition: transform 0.35s ease;
}

.case-study-entry--coutts:hover .browser-window {
  transform: rotate(-2.5deg) translateY(-8px);
}

.case-study-entry--loans:hover .browser-window {
  transform: rotate(3deg) translateY(-8px);
}

.case-study-entry--careersense:hover .browser-window {
  transform: rotate(-3deg) translateY(-8px);
}

.case-study-entry--portfolio:hover .browser-window {
  transform: rotate(2.5deg) translateY(-8px);
}

.case-study-entry--coutts-savings:hover .phone-mockup {
  transform: rotate(2.5deg) translateY(-8px);
}

.case-study-entry--pna:hover .phone-mockup {
  transform: rotate(2.5deg) translateY(-8px);
}

.case-study-entry--savings-workshop .browser-window {
  transform: rotate(-2.5deg);
  transform-origin: bottom left;
  margin-left: -16px;
  margin-bottom: -36px;
}

.case-study-entry--savings-workshop:hover .browser-window {
  transform: rotate(-2.5deg) translateY(-8px);
}

.case-study-entry--savings-workshop:hover .screen-viewport img {
  object-position: 50% 30%;
}

/* Reveal more screen content on hover */
.case-study-entry--loans:hover .screen-viewport img,
.case-study-entry--careersense:hover .screen-viewport img,
.case-study-entry--portfolio:hover .screen-viewport img {
  object-position: 50% 30%;
}

.case-study-entry--coutts:hover .screen-viewport img {
  object-position: 50% 30%;
}

/* =====================
   Reduced motion
   ===================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  body {
    animation: none;
  }
}
