/* ---------------------------------------------------
   Tokens
--------------------------------------------------- */
:root {
  --bg: #fafafa;
  --ink: #2f2f30;
  --ink-faint: #697674;
  --hero-ink: #8b8d89;
  --heading-ink: #424242;
  --muted-ink: #6a7674;

  --font-serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Site-wide accent, used sparingly (e.g. the Contact email link) to
     stand out against the otherwise neutral ink palette. */
  --accent: #3f7fe0;

  /* Derived from the Figma layout grid: 6 columns, stretch, 20px
     gutter, 0 margin, on a 1440px frame -> column width 223px.
     Content sits inset by roughly one column on each side. */
  --side-padding: clamp(24px, 15.5vw, 223px);

  /* Case-study data-viz + callout accents (Foundtale). Distinct from
     the site's neutral palette on purpose -- these are chart/data
     colors, not brand colors. */
  --stat-card-bg: #eef1f5;
  --stat-navy: #1e3a6e;
  --stat-bar-1: #1e3a6e;
  --stat-bar-2: #3f7fe0;
  --stat-bar-3: #8fb8ee;
  --stat-bar-4: #d0d3d8;
  --callout-bg: #f7e6c4;
  --speech-bg: #e9f1fb;
  --status-blue: #2f6fd1;

  /* Cubism Through Shadows */
  --warning-ink: #c1502e;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  animation: page-fade-in 0.22s ease forwards;
}

/* Page-to-page transition: each page fades in on load (pure CSS, no
   flash risk), and page-transition.js briefly fades the current page
   out before navigating to another internal page. */
@keyframes page-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

a {
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------------------------------------------------
   Background canvas (cursor trail effect)
--------------------------------------------------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* ---------------------------------------------------
   Page layout
--------------------------------------------------- */
.page {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--side-padding);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: clamp(48px, 8vh, 96px);
}

.brand .logo {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 2.6vw, 2.1rem);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand .tagline {
  margin: 12px 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-faint);
  max-width: 46ch;
}

.brand .tagline strong {
  font-weight: 700;
  color: var(--ink);
}

.site-nav .footer-label {
  text-align: right;
}

.site-nav ul {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.site-nav a {
  font-size: 1.05rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--ink);
  transition: font-weight 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  font-weight: 700;
}

/* ---------------------------------------------------
   Hero
--------------------------------------------------- */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  padding: clamp(120px, 22vh, 220px) 0 clamp(80px, 14vh, 160px);
}

.hero-text {
  max-width: 900px;
}

.hero-text h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  line-height: 1.16;
  color: var(--hero-ink);
}

.hero-subline {
  margin: 14px 0 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  line-height: 1.3;
  color: var(--hero-ink);
}

.hero-divider {
  border: none;
  border-top: 1px solid rgba(118, 132, 130, 0.25);
  margin: clamp(20px, 3vh, 28px) 0;
}

.hero-text .credential {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-faint);
  line-height: 1.6;
}

/* ---------------------------------------------------
   Social icons
--------------------------------------------------- */
.social-icons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  flex-shrink: 0;
}

.social-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.3px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.social-icon:hover,
.social-icon:focus-visible {
  transform: translateY(-2px);
  background-color: var(--ink);
  color: var(--bg);
}

.social-icon--substack svg {
  width: 17px;
  height: 17px;
}

/* Subtle CSS-only tooltip */
.social-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translate(4px, -50%);
  background-color: #222222;
  color: #fafafa;
  font-size: 11px;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  padding: 6px 9px;
  border-radius: 5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.social-icon:hover::after,
.social-icon:focus-visible::after {
  opacity: 0.92;
  transform: translate(0, -50%);
}

/* ---------------------------------------------------
   Responsive
--------------------------------------------------- */
@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
  }

  .site-nav ul {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    padding-top: clamp(64px, 14vh, 140px);
  }

  .social-icons {
    flex-direction: row;
    align-items: center;
  }

  .social-icon::after {
    right: auto;
    left: 50%;
    top: calc(100% + 10px);
    transform: translate(-50%, -4px);
  }

  .social-icon:hover::after,
  .social-icon:focus-visible::after {
    transform: translate(-50%, 0);
  }
}

/* ---------------------------------------------------
   About page
--------------------------------------------------- */
.about-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: clamp(100px, 18vh, 200px);
}

.about-title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--heading-ink);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1rem;
}

/* Text: reserve the bold width in advance via a hidden ::after ghost
   copy, so switching font-weight on hover never changes the box's
   width and never shifts anything. */
.back-link-text {
  position: relative;
  display: inline-block;
  color: var(--muted-ink);
  transition: color 0.15s ease;
}

.back-link-text::after {
  content: attr(data-text);
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: 700;
}

.back-link:hover .back-link-text,
.back-link:focus-visible .back-link-text {
  color: var(--ink);
  font-weight: 700;
}

/* Icon: fixed 32x32 box (box-sizing: border-box), so a thicker hover
   border eats into the interior rather than growing the box -- no
   layout shift. Same fill/invert language as the homepage social
   icons: background fills to --ink, glyph color inverts to --bg. */
.back-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.3px solid var(--muted-ink);
  color: var(--muted-ink);
  background-color: transparent;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, border-width 0.15s ease, color 0.15s ease;
}

.back-link-icon svg path {
  stroke-width: 1.6;
  transition: stroke-width 0.15s ease;
}

.back-link:hover .back-link-icon,
.back-link:focus-visible .back-link-icon {
  background-color: var(--ink);
  border-color: var(--ink);
  border-width: 2px;
  color: var(--bg);
}

.back-link:hover .back-link-icon svg path,
.back-link:focus-visible .back-link-icon svg path {
  stroke-width: 2.2;
}

.about-hero {
  margin: clamp(56px, 9vh, 110px) 0 0;
  max-width: 720px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1.5;
  color: var(--hero-ink);
}

.essay {
  margin: clamp(130px, 18vh, 220px) 0 0 clamp(40px, 10vw, 160px);
  max-width: 620px;
}

.essay-label {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--heading-ink);
}

.essay p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-faint);
}

.essay-intro {
  margin-bottom: clamp(40px, 6vh, 64px);
}

.essay-section {
  margin-top: clamp(40px, 6vh, 64px);
}

.essay-section h2 {
  margin: 0 0 12px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  color: var(--heading-ink);
}

.essay-section p + p {
  margin-top: 1.4em;
}

.essay-section strong {
  font-weight: 700;
  color: var(--ink-faint);
}

.about-footer {
  display: flex;
  justify-content: flex-end;
  gap: 64px;
  margin-top: clamp(56px, 8vh, 96px);
}

.footer-label {
  margin: 0 0 14px;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted-ink);
}

.about-footer ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Reserve the bold width in advance via a hidden ::after ghost copy
   (same technique as .back-link-text), so the hover weight change
   never shifts the link or reflows its neighbors. */
.about-footer a {
  position: relative;
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.15s ease;
}

.about-footer a::after {
  content: attr(data-text);
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: 700;
}

.about-footer a:hover,
.about-footer a:focus-visible {
  font-weight: 700;
}

.thank-you {
  margin: clamp(32px, 5vh, 56px) 0 0 clamp(40px, 10vw, 160px);
  padding-bottom: clamp(24px, 4vh, 48px);
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 1;
  color: var(--hero-ink);
  text-align: left;
}

@media (max-width: 720px) {
  .about-header {
    align-items: flex-start;
  }

  .essay {
    margin-left: 0;
    max-width: 100%;
  }

  .thank-you {
    margin-left: 0;
  }

  .about-footer {
    justify-content: flex-start;
    gap: 40px;
  }
}

/* ---------------------------------------------------
   Work detail page (e.g. Illustration)
--------------------------------------------------- */
.work-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: clamp(64px, 12vh, 140px);
}

.work-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.work-title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  color: var(--heading-ink);
}

/* Gliding sway: gentle, slow drift in place -- small vertical bob
   plus a slight rotation wobble around her existing tilt, never
   translating across the page. Lives on the wrapper so the thought
   bubbles drift together with her. */
.work-avatar-wrap {
  position: relative;
  width: clamp(90px, 8vw, 130px);
  flex-shrink: 0;
  transform-origin: center;
  animation: avatar-glide 6.5s ease-in-out infinite;
}

.work-avatar {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes avatar-glide {
  0%,
  100% {
    transform: rotate(-8deg) translateY(0);
  }
  50% {
    transform: rotate(-6deg) translateY(-7px);
  }
}

/* Small trailing dots implying a thought/daydream, drifting up and
   to the left away from her head. Each one pulses on its own loop,
   staggered so the pulse ripples from the biggest bubble up to the
   smallest -- like a looping "thinking..." GIF. */
.thought-bubble {
  position: absolute;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1.3px solid var(--muted-ink);
  transform-origin: center;
  animation: thought-pulse 2.4s ease-in-out infinite;
}

@keyframes thought-pulse {
  0%,
  100% {
    transform: scale(0.85);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.95;
  }
}

.thought-bubble--1 {
  width: 9px;
  height: 9px;
  top: 6%;
  left: 4%;
  animation-delay: 0s;
}

.thought-bubble--2 {
  width: 6px;
  height: 6px;
  top: -6%;
  left: -4%;
  animation-delay: 0.25s;
}

.thought-bubble--3 {
  width: 4px;
  height: 4px;
  top: -15%;
  left: -12%;
  animation-delay: 0.5s;
}

/* White bounded panel holding the gallery, centered in the page. */
.illustration-panel {
  margin: clamp(64px, 10vh, 110px) auto 0;
  max-width: 960px;
  background-color: #ffffff;
  border-radius: 20px;
  padding: clamp(24px, 4vw, 48px);
}

/* Masonry packs items by actual height instead of a uniform grid --
   see illustration-masonry.js. .illustration-sizer is Masonry's
   convention for reading the column width; it's an empty element and
   never one of the laid-out items. The float/width fallback below is
   what's visible for the brief moment before the JS runs. */
.illustration-grid {
  position: relative;
}

.illustration-sizer,
.illustration-item {
  width: 31.5%;
}

.illustration-item {
  float: left;
  margin-bottom: 24px;
}

.illustration-item img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Closing line + footer share one row, both centered against the
   same max-width as the panel above so their left edges line up
   with the panel's left edge exactly. */
.work-closing-block {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 960px;
  margin: clamp(48px, 7vh, 80px) auto 0;
  padding-bottom: clamp(48px, 8vh, 96px);
}

.work-closing {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  color: var(--hero-ink);
}

.about-footer--single {
  display: block;
  margin-top: 0;
}

@media (max-width: 720px) {
  .work-header {
    align-items: flex-start;
  }

  .work-avatar-wrap {
    animation: none;
  }

  .illustration-sizer,
  .illustration-item {
    width: 100%;
    float: none;
  }

  .illustration-panel {
    padding: 24px;
  }

  .work-closing-block {
    flex-direction: column;
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-avatar-wrap,
  .thought-bubble {
    animation: none;
  }
}

/* ---------------------------------------------------
   Case study page (e.g. Foundtale)
--------------------------------------------------- */
.case-header {
  padding-top: clamp(64px, 12vh, 140px);
}

.case-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  /* Matches .work-avatar-wrap's height on the Illustration page --
     that tall sibling is what pushes its title down within the
     centered row. Replicating the same min-height here keeps both
     pages' titles starting at the same point despite Foundtale
     having no equivalent tall element in its header row. */
  min-height: clamp(90px, 8vw, 130px);
}

.case-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.case-title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  color: var(--heading-ink);
}

.case-tag {
  font-size: 0.82rem;
  color: var(--muted-ink);
}

.case-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--status-blue);
  flex-shrink: 0;
}

.case-subtitle {
  margin: 14px 0 0;
  font-size: 1rem;
  color: var(--ink);
}

/* Hero */
.case-hero {
  position: relative;
  margin: clamp(32px, 5vh, 56px) 0 0;
}

.case-hero-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

/* Fallback look if an image is still pending / fails to load. */
.case-hero-placeholder {
  aspect-ratio: 2.3 / 1;
  border-radius: 14px;
  border: 1.5px dashed var(--muted-ink);
  background-color: #f0f0ee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-ink);
  font-size: 0.9rem;
  text-align: center;
  padding: 24px;
  clear: both;
}

.case-hero figcaption {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: var(--muted-ink);
}

/* Shared centered content column */
.case-content {
  max-width: 900px;
  margin: 0 auto;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: clamp(40px, 6vh, 64px) 0 0;
}

.case-meta-col {
  flex: 1;
  min-width: 200px;
}

.case-meta-label {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--heading-ink);
}

.case-meta-value {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-faint);
}

.case-meta-secondary {
  margin-top: clamp(24px, 4vh, 40px);
}

.case-meta-link-row {
  margin: 10px 0 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-faint);
}

.case-meta-link {
  color: var(--muted-ink);
  text-decoration: underline;
}

.case-divider {
  border: none;
  border-top: 1px solid rgba(118, 132, 130, 0.25);
  margin: clamp(40px, 6vh, 64px) 0;
}

.case-section {
  margin-top: clamp(40px, 6vh, 64px);
}

.case-section:first-of-type {
  margin-top: 0;
}

.case-section h2 {
  margin: 0 0 14px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  color: var(--heading-ink);
}

.case-section p {
  margin: 0 0 1.2em;
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--ink-faint);
}

.case-section p:last-child {
  margin-bottom: 0;
}

.case-underline {
  text-decoration: underline;
  text-decoration-color: var(--muted-ink);
}

/* Two-up split: text + callout, or image + speech bubble */
.case-split {
  display: flex;
  gap: 32px;
  align-items: stretch;
  margin-top: 8px;
}

.case-split-text {
  flex: 1.5;
  margin: 0 !important;
}

.case-callout {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
}

/* The GIF already has its own peach card design baked in, so this
   just displays it at its natural aspect ratio -- no extra
   background/padding that would double up the card look. */
.case-callout-media {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

/* Fallback look if the image fails to load. */
.case-callout-media.case-callout-media--pending {
  min-height: 140px;
  background-color: var(--callout-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #8a6d3b;
}

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: clamp(32px, 5vh, 48px) 0;
}

.stat-card {
  background-color: var(--stat-card-bg);
  border-radius: 12px;
  padding: clamp(20px, 3vw, 28px);
}

.stat-title {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(47, 47, 48, 0.35);
}

.stat-headline {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.stat-number {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2.1rem, 4vw, 2.8rem);
  color: var(--stat-navy);
  line-height: 1;
  flex-shrink: 0;
}

.stat-desc {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink);
}

.stat-bar {
  display: flex;
  gap: 3px;
  height: 8px;
  margin-bottom: 12px;
}

.stat-bar-seg {
  display: block;
  height: 100%;
  border-radius: 2px;
}

.stat-bar-labels {
  display: flex;
  gap: 3px;
}

.stat-bar-labels span {
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--ink-faint);
  text-align: center;
}

/* Pull quote */
.case-pullquote {
  margin: 0;
  padding: 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.case-pullquote p {
  margin: 0 0 1em;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink-faint);
}

.case-pullquote-bold {
  font-weight: 700;
  color: var(--heading-ink) !important;
  margin-bottom: 0 !important;
}

/* "The idea" image + speech bubble */
/* White bounded panel holding the image + speech bubble + child task
   + summary together, matching the Illustration page's panel. */
.idea-panel {
  margin-top: 24px;
}

.case-split--idea {
  margin: 0;
  align-items: flex-start;
}

.case-idea-gif {
  flex: 1.4;
  width: 100%;
  border-radius: 12px;
  display: block;
}

.case-idea-column {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.case-idea-column p {
  margin: 0 !important;
}

.case-speech-bubble {
  background-color: var(--speech-bg);
  border-radius: 16px;
  padding: 20px 22px;
}

.case-speech-bubble p {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink) !important;
}

.case-idea-summary {
  margin-top: 20px !important;
}

/* Numbered refuse-to-build grid */
.refuse-grid {
  display: flex;
  gap: 32px;
  margin: clamp(24px, 4vh, 40px) 0 clamp(32px, 5vh, 48px);
}

.refuse-item {
  flex: 1;
  min-width: 200px;
}

.refuse-number {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--muted-ink);
}

.refuse-title {
  margin: 0 0 10px !important;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--heading-ink) !important;
}

/* Testing section (full-width tinted band inside .page) */
.case-testing {
  background-color: #eef0ee;
  margin-top: clamp(48px, 7vh, 80px);
  padding: clamp(40px, 6vh, 64px) 0;
}

.case-testing h2 {
  margin: 0 0 clamp(24px, 4vh, 40px);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  color: var(--heading-ink);
}

.testing-grid {
  display: flex;
  gap: 48px;
}

.testing-col {
  flex: 1;
  min-width: 240px;
}

.testing-label {
  margin: 0 0 14px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--heading-ink);
  line-height: 1.4;
}

.testing-col p {
  margin: 0 0 1em;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-faint);
}

.testing-list {
  margin: 0.6em 0 0;
  padding: 0;
  list-style: none;
}

.testing-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-faint);
}

.testing-list li::before {
  content: '–';
  position: absolute;
  left: 0;
}

/* Closing question + footer */
.case-closing {
  margin: clamp(56px, 8vh, 96px) auto 0;
  max-width: 640px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  line-height: 1.6;
  color: var(--hero-ink);
}

.case-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: clamp(40px, 6vh, 64px);
  padding: 24px 0 clamp(32px, 5vh, 56px);
  border-top: 1px solid rgba(118, 132, 130, 0.2);
}

.case-copyright {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted-ink);
  max-width: 640px;
}


@media (max-width: 900px) {
  .case-split,
  .case-split--idea,
  .refuse-grid,
  .testing-grid {
    flex-direction: column;
  }

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

  .case-meta {
    flex-direction: column;
    gap: 24px;
  }
}

/* ---------------------------------------------------
   Case study page (Cubism Through Shadows)
--------------------------------------------------- */

/* 2x2 meta grid (Format/Context/Role/Age) instead of Foundtale's
   single row of three -- reuses .case-meta-col for label/value. */
.case-meta--grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 32px;
}

.case-subhead {
  margin: 0 0 4px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--heading-ink);
}

.case-caveat {
  font-style: italic;
}

.case-emphasis {
  font-weight: 700;
  color: var(--heading-ink);
}

/* Phase label + full-width process photo, used twice ("Phase 01",
   "Phase 02") -- each photo is a pre-built collage image, so this
   just pairs a short label column with it. */
.phase-block {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin: clamp(24px, 4vh, 32px) 0;
}

.phase-label {
  flex: 0 0 180px;
}

.phase-number {
  margin: 0 0 4px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--heading-ink);
}

.phase-caption {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted-ink);
}

.phase-image {
  display: block;
  flex: 1;
  min-width: 0;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* "Where It Actually Sits" heading is centered on the page, unlike
   the other left-aligned case-section headings. */
.case-section--centered h2 {
  text-align: center;
}

/* Gallery -> Activity Room -> Gallery flow diagram */
.flow-diagram {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 8px 16px;
  margin: clamp(24px, 4vh, 40px) 0;
  text-align: center;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 170px;
  max-width: 220px;
}

.flow-title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--heading-ink);
}

.flow-arrow-down {
  color: var(--muted-ink);
  line-height: 1;
}

.flow-action {
  margin: 4px 0 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.flow-detail {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.flow-arrow-right {
  align-self: center;
  margin-top: 12px;
  color: var(--muted-ink);
}

/* Bordered format/spec box */
.spec-box {
  border: 1px solid rgba(47, 47, 48, 0.55);
  border-radius: 4px;
  max-width: 700px;
  margin: 0 auto;
  padding: 24px 28px;
}

.spec-box p {
  margin: 0 0 16px;
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--ink-faint);
}

.spec-box p:last-child {
  margin-bottom: 0;
}

.spec-label {
  font-weight: 700;
  color: var(--heading-ink);
}

.spec-warning-label {
  font-weight: 700;
  color: var(--warning-ink) !important;
}

.spec-warning {
  color: var(--warning-ink) !important;
}

/* The Mechanism: white card holding two side-by-side concept
   illustrations + captions, matching the reference's card treatment. */
.mechanism-panel {
  background-color: #fff;
  border-radius: 20px;
  padding: clamp(24px, 4vw, 40px);
  margin: clamp(24px, 4vh, 32px) 0;
}

.mechanism-panel-caption {
  margin: 0 0 16px;
  font-size: 0.8rem;
  color: var(--muted-ink);
}

.mechanism-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.mechanism-item p {
  margin: 14px 0 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-faint);
}

.mechanism-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* Takeaway gallery: one wide image on top, two side-by-side below */
.takeaway-gallery {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.takeaway-gallery-row {
  display: flex;
  gap: 12px;
}

.takeaway-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

.takeaway-gallery-row .takeaway-image {
  flex: 1;
  min-width: 0;
}

/* Fallback look if a Mechanism/Takeaway image is still pending. */
.mechanism-image-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  border: 1.5px dashed var(--muted-ink);
  background-color: #f0f0ee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-ink);
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
}

.mechanism-summary {
  margin-top: clamp(20px, 3vh, 28px);
  font-size: 0.9rem;
  color: var(--ink-faint);
}

@media (max-width: 900px) {
  .phase-block,
  .mechanism-grid {
    flex-direction: column;
  }

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

  .phase-label {
    flex: none;
  }

  .flow-arrow-right {
    display: none;
  }

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

/* ---------------------------------------------------
   Case study page (Inkling Isle)
--------------------------------------------------- */

/* Small floated pending-image note beside "The concept" copy */
.concept-note {
  float: right;
  width: 240px;
  margin: 4px 0 16px 24px;
}

.concept-note-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.concept-note-placeholder {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1.5px dashed var(--muted-ink);
  background-color: #f0f0ee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-ink);
  font-size: 0.72rem;
  text-align: center;
  padding: 10px;
}

/* White card holding the wireframe gif at its native size, instead
   of stretching it full-width (which was blurring it). */
.wireframe-panel {
  clear: both;
  background-color: #fff;
  border-radius: 20px;
  padding: clamp(20px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: clamp(24px, 4vh, 32px) 0;
}

.wireframe-image {
  display: block;
  width: 100%;
  max-width: 620px;
  height: auto;
  border-radius: 10px;
}

.wireframe-caption {
  margin: 14px 0 0;
  font-size: 0.8rem;
  color: var(--muted-ink);
  text-align: center;
}

/* Three-photo row ("Why this idea") */
.trio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: clamp(24px, 4vh, 32px) 0;
  clear: both;
}

.trio-item p {
  margin: 14px 0 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-faint);
}

.trio-image-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  border: 1.5px dashed var(--muted-ink);
  background-color: #f0f0ee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-ink);
  font-size: 0.82rem;
  text-align: center;
  padding: 16px;
}

.trio-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Three design principles */
.principle-list {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vh, 28px);
  margin-top: clamp(24px, 4vh, 32px);
}

.principle-row {
  display: flex;
  gap: 32px;
}

/* Scoped to .principle-row so this beats .case-section p's
   specificity -- a bare .principle-label was losing to it and
   rendering grey instead of dark. */
.principle-row .principle-label {
  flex: 0 0 190px;
  margin: 0;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
}

.principle-text {
  flex: 1;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--ink-faint);
}

.principle-text strong {
  color: var(--muted-ink);
  font-weight: 700;
}

/* Label column + wide content column, reused for "Product decisions"
   and "How I would test this" */
.decision-row {
  display: flex;
  gap: 32px;
}

.decision-label {
  flex: 0 0 220px;
}

/* Same heading treatment as .case-section h2 -- "Product decisions"
   and "How I would test this" are headings too, just placed in the
   label column instead of full-width. Scoped to .decision-label so
   it beats .case-section p's specificity. */
.decision-label .decision-heading {
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  color: var(--heading-ink);
}

.decision-copy {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-faint);
}

.decision-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.decision-list p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-faint);
}

.decision-list strong {
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 900px) {
  .concept-note {
    float: none;
    width: 240px;
    margin: 0 0 20px;
  }

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

  .principle-row,
  .decision-row {
    flex-direction: column;
    gap: 12px;
  }

  .principle-label,
  .decision-label {
    flex: none;
  }
}

/* ---------------------------------------------------
   Photography page
--------------------------------------------------- */
.photo-subtitle {
  margin: 0 0 24px;
  font-size: 0.9rem;
  color: var(--ink-faint);
}

/* Same masonry-packing pattern as .illustration-grid, but 2 columns
   instead of 3 -- see photography-masonry.js. */
.photo-grid {
  position: relative;
}

.photo-sizer,
.photo-item {
  width: 48.5%;
}

.photo-item {
  float: left;
  margin-bottom: 24px;
}

.photo-grid img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.photo-single {
  max-width: 380px;
  margin: 24px auto 0;
}

.photo-single img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Fallback look while a photo is still pending upload. */
.photo-placeholder {
  border-radius: 8px;
  border: 1.5px dashed var(--muted-ink);
  background-color: #f0f0ee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-ink);
  font-size: 0.85rem;
  text-align: center;
  padding: 16px;
}

@media (max-width: 720px) {
  .photo-sizer,
  .photo-item {
    width: 100%;
    float: none;
  }
}

/* ---------------------------------------------------
   Work page
--------------------------------------------------- */
.work-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: clamp(100px, 18vh, 200px);
}

.work-page-title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--heading-ink);
}

.work-page-subtitle {
  margin: 14px 0 0;
  font-size: 1rem;
  color: var(--ink-faint);
}

.page-nav .footer-label {
  text-align: right;
}

.page-nav ul {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-nav a {
  font-size: 1.05rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--ink);
  transition: font-weight 0.15s ease;
}

.page-nav a:hover,
.page-nav a:focus-visible {
  font-weight: 700;
}

/* Category tabs */
.work-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 40px);
  margin-top: clamp(64px, 10vh, 104px);
  border-bottom: 1px solid rgba(118, 132, 130, 0.25);
}

.work-tab {
  position: relative;
  display: inline-block;
  background: none;
  border: none;
  padding: 0 0 14px;
  margin-bottom: -1px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted-ink);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.1s ease, font-weight 0.15s ease;
}

/* Reserve the bold width so hover/active never shifts the row. */
.work-tab::after {
  content: attr(data-label);
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: 700;
}

.work-tab:hover,
.work-tab:focus-visible {
  color: #000000;
  font-weight: 600;
}

.work-tab:active {
  transform: translateY(1px);
}

.work-tab.is-active {
  color: #000000;
  font-weight: 700;
  border-bottom-color: #000000;
}

/* Sub-project pills (Learning Design / Product Design) */
.work-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.work-pills[hidden] {
  display: none;
}

.work-pill {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(47, 47, 48, 0.08);
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--ink-faint);
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.work-pill:hover,
.work-pill:focus-visible {
  color: #000000;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(47, 47, 48, 0.14);
}

.work-pill:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(47, 47, 48, 0.1);
}

.work-pill--soon {
  cursor: default;
  color: var(--muted-ink);
  box-shadow: none;
  border: 1.3px dashed rgba(118, 132, 130, 0.4);
}

.work-pill--soon:hover,
.work-pill--soon:focus-visible {
  color: #000000;
  font-weight: 600;
  box-shadow: none;
}

/* Quote */
.work-quote {
  margin: clamp(48px, 7vh, 80px) 0 0;
  max-width: 760px;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.55;
  color: var(--ink-faint);
}

.work-quote-note {
  margin: 12px 0 0;
  max-width: 640px;
  font-size: 0.85rem;
  color: var(--muted-ink);
}

.work-quote-note[hidden] {
  display: none;
}

@media (max-width: 700px) {
  .work-page-header {
    align-items: flex-start;
  }

  .page-nav ul {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
  }
}

/* ---------------------------------------------------
   Contact page
--------------------------------------------------- */
.contact-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: clamp(100px, 18vh, 200px);
}

.contact-title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--heading-ink);
}

.contact-email-row {
  margin: clamp(100px, 16vh, 180px) 0 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 1.05rem;
}

.contact-email-label {
  font-weight: 700;
  color: var(--ink);
}

.contact-email-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}

.contact-email-link:hover,
.contact-email-link:focus-visible {
  border-color: currentColor;
}

.contact-note {
  margin: clamp(40px, 6vh, 64px) 0 0;
  max-width: 640px;
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.55;
  color: var(--ink-faint);
}

@media (max-width: 700px) {
  .contact-header {
    align-items: flex-start;
  }
}

/* ---------------------------------------------------
   Product design case study (Philips, etc.)
--------------------------------------------------- */
.pd-top-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: clamp(64px, 12vh, 140px);
}

.company-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.company-tab {
  display: inline-block;
  padding: 11px 28px;
  border-radius: 999px;
  border: 1.3px solid rgba(118, 132, 130, 0.35);
  background-color: transparent;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink-faint);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease, font-weight 0.15s ease;
}

.company-tab:hover,
.company-tab:focus-visible {
  color: #000000;
  font-weight: 600;
}

.company-tab:active {
  transform: translateY(1px);
}

.company-tab.is-active {
  background-color: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.company-tab--soon {
  cursor: default;
  border-style: dashed;
}

.company-tab--soon:hover,
.company-tab--soon:focus-visible {
  color: #000000;
  font-weight: 600;
}

/* Project sub-tabs within a company */
.project-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 40px);
  margin-top: 18px;
}

.project-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0 0 6px;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 400;
  color: var(--ink-faint);
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease, border-color 0.15s ease, font-weight 0.15s ease;
}

.project-tab::after {
  content: attr(data-label);
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: 700;
}

.project-tab:hover,
.project-tab:focus-visible {
  color: #000000;
  font-weight: 600;
}

.project-tab.is-active {
  color: #000000;
  font-weight: 700;
  border-bottom-color: #000000;
}

.pd-meta {
  margin-top: clamp(32px, 5vh, 48px);
}

.pd-project-title {
  margin: clamp(32px, 5vh, 48px) 0 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--heading-ink);
}

.pd-project-title-year {
  margin-left: 10px;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted-ink);
}

.pd-project-subtitle {
  margin: 10px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.pd-intro {
  margin-top: clamp(32px, 5vh, 48px);
  align-items: center;
}

.pd-intro-text {
  flex: 1;
  margin: 0 !important;
}

.pd-intro-image-wrap {
  flex: 1.2;
  min-width: 260px;
}

.pd-intro-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.pd-problem {
  margin-top: clamp(32px, 5vh, 48px);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
}

.pd-problem strong {
  color: var(--heading-ink);
}

.pd-role-heading {
  margin: 0 0 12px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--heading-ink);
}

.pd-role-text {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--ink-faint);
}

.pd-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: clamp(24px, 4vh, 40px);
}

.pd-compare-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.pd-compare-caption {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--muted-ink);
}

.pd-stat-block {
  display: flex;
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
  margin-top: clamp(48px, 7vh, 80px);
  flex-wrap: wrap;
}

.pd-stat-figure {
  flex: 0 0 auto;
  max-width: 280px;
}

.pd-stat-image {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
}

.pd-stat-desc {
  margin: 8px 0 0;
  font-size: 0.92rem;
  color: var(--ink-faint);
}

.pd-stat-text {
  flex: 1;
  min-width: 260px;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--ink-faint);
}

/* Reflection band (reuses .case-testing's grey background) */
.pd-reflection-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.pd-reflection-heading {
  margin: 0 0 14px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: var(--heading-ink);
}

.pd-reflection-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-faint);
}

/* Placeholder for pending case-study images */
.pd-image-placeholder {
  border-radius: 12px;
  border: 1.5px dashed var(--muted-ink);
  background-color: #f0f0ee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-ink);
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
  min-height: 160px;
  width: 100%;
  height: 100%;
}

/* Footer: Next / Work links */
/* Grid instead of a flex column so the Next/Work icons share one
   column and line up, while each text label stays right-aligned in
   its own (wider, shared) column regardless of word length. */
.pd-footer-nav {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: end;
  align-items: center;
  column-gap: 10px;
  row-gap: 20px;
  margin-top: clamp(48px, 7vh, 80px);
  padding-bottom: clamp(40px, 6vh, 64px);
}

.pd-footer-nav > .back-link {
  display: contents;
}

.pd-footer-nav .back-link-text {
  justify-self: end;
}

/* .pd-next-link is a <button> reusing .back-link's exact visual
   treatment (hover/focus bold text + icon darken) -- it only needs
   the button reset plus flipping the chevron to point forward. */
.pd-next-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.pd-next-link .back-link-icon {
  transform: scaleX(-1);
}

.pd-panel[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .pd-intro,
  .pd-compare-grid,
  .pd-stat-block {
    flex-direction: column;
    align-items: flex-start;
  }

  .pd-compare-grid {
    grid-template-columns: 1fr;
  }

  .pd-footer-nav {
    justify-content: start;
  }

  .pd-footer-nav .back-link-text {
    justify-self: start;
  }
}
