/* ============================================================
   Site nav (shared)
   ============================================================ */
/* Glassmorphism nav: sits over content, blurs what's behind,
   thin border-bottom anchors it to the page. */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: var(--space-3);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--rule);
}

.site-nav .nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.site-nav nav { display: flex; gap: var(--space-3); }

.site-nav a {
  color: var(--text);
  position: relative;
}

.site-nav a {
  transition: opacity 180ms ease;
}
.site-nav a:hover { opacity: 0.55; }

/* Theme toggle — shows the icon for the destination state
   (moon in light mode, sun in dark mode). */
.theme-toggle {
  background: transparent;
  border: 0;
  padding: 6px;
  margin: -6px;
  cursor: pointer;
  color: var(--text);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 200ms ease, color 200ms ease;
}

.theme-toggle:hover {
  background: var(--rule);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ============================================================
   Home — hero
   ============================================================ */
.home .hero {
  padding-block: var(--space-8) var(--space-10);
}

.home .hero .display {
  max-width: 24ch;
}

/* Each identity sits on its own line. */
.home .hero .display .line {
  display: block;
}

/* Editorial ampersand — italic + slightly muted, the way Apple and many
   editorial designers treat the "&". */
.home .hero .display .amp {
  font-style: italic;
  font-weight: 400;
  color: var(--text-muted);
}

/* ============================================================
   Home — Selected Work
   ============================================================ */
.work { padding-bottom: var(--space-10); }

.work .label { margin-bottom: var(--space-6); }

.tiles {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Card system: uniform --surface (light grey) on white page.
   Subtle hairline border, 4px lift + soft shadow on hover.
   No chromatic accent — content provides identity. */
.tile {
  background: var(--surface);
  border-radius: 28px;
  border: 1px solid var(--rule);
  overflow: hidden;
  transition: transform 450ms cubic-bezier(0.165, 0.84, 0.44, 1),
              box-shadow 450ms cubic-bezier(0.165, 0.84, 0.44, 1),
              border-color 250ms ease;
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--hover-shadow);
  border-color: rgba(0, 0, 0, 0.12);
}

/* Vertical stack: text block at top, image below — like Apple's iPhone
   product card. Whole card is one link. */
.tile-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-6);
  padding: var(--space-8) var(--space-6) 0;
}

@media (min-width: 768px) {
  .tile-link {
    padding: var(--space-10) var(--space-8) 0;
    gap: var(--space-8);
  }
}

.tile-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  max-width: 540px;
}

/* Company logo above the title — small brand marker. Both eToro
   (wordmark SVG) and monday (wordmark SVG) display at the same
   height; widths vary by mark. */
.tile-logo {
  height: 24px;
  width: auto;
  max-width: 160px;
  margin-bottom: var(--space-2);
  object-fit: contain;
}

/* Some marks (monday's wordmark) need different colors per theme.
   Show light variant by default, swap to dark variant when the
   page is in dark mode (manual toggle or OS preference). */
.tile-logo-dark { display: none; }

:root[data-theme="dark"] .tile-logo-light { display: none; }
:root[data-theme="dark"] .tile-logo-dark  { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tile-logo-light { display: none; }
  :root:not([data-theme="light"]) .tile-logo-dark  { display: block; }
}

/* Primary button: solid near-black pill. Hover inverts to outline. */
.tile-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-3);
  padding: 12px 24px;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  transition: background-color 250ms ease, color 250ms ease;
}

.tile-link:hover .tile-cta {
  background: transparent;
  color: var(--text);
}

.tile-image {
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.04);
}

.tile-image img,
.tile-image .placeholder-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms ease-out;
}

.placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
  background: repeating-linear-gradient(
    45deg, #E8E8E8, #E8E8E8 10px, #ECECEC 10px, #ECECEC 20px
  );
}

.tile-link:hover .tile-image img,
.tile-link:hover .tile-image .placeholder-img {
  transform: scale(1.02);
}

.tile-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text);
}

.tile-desc {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: var(--space-6);
}

.site-footer a { transition: opacity 180ms ease; }
.site-footer a:hover { opacity: 0.55; }

/* ============================================================
   Case study
   ============================================================ */
.case-study .back-link {
  font-size: 14px;
  margin-bottom: var(--space-8);
}

.case-study .back-link a {
  color: var(--text-muted);
}

.case-study .back-link a:hover { color: var(--text); }

.cs-hero {
  padding-block: var(--space-4) var(--space-8);
}

.cs-hero .display { margin-bottom: var(--space-3); }
.cs-hero .subhead { margin-bottom: var(--space-3); color: var(--text-muted); }
.cs-meta { font-size: 14px; }

.cs-cover {
  margin-block: var(--space-8) var(--space-10);
}

.cs-cover .placeholder-img {
  aspect-ratio: 16 / 9;
}

/* Embedded HTML animation player (e.g. Memoth app walkthrough).
   Uses iframe so the embedded React/Babel runtime stays sandboxed
   from the parent page. Matches the visual language of .cs-cover —
   rounded corners, soft shadow, dark fallback background. */
.cs-animation-frame {
  position: relative;
  width: 100%;
  margin-top: var(--space-4);
  border-radius: 28px;
  overflow: hidden;
  background: #0c0e12;
  aspect-ratio: 16 / 10;
  box-shadow:
    0 30px 60px -24px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.cs-animation-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 640px) {
  .cs-animation-frame {
    aspect-ratio: 9 / 16;
    border-radius: 20px;
  }
}

.cs-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}

.cs-section .label {
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: var(--space-4);
}

.cs-section p + p { margin-top: var(--space-2); }

.cs-image {
  margin-top: var(--space-6);
}

.cs-image .placeholder-img {
  aspect-ratio: 16 / 9;
}

.cs-pagination {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--rule);
  padding-block: var(--space-6);
  margin-top: var(--space-10);
  font-size: 14px;
}

.cs-pagination a { color: var(--text-muted); }
.cs-pagination a:hover { color: var(--text); }

/* ============================================================
   Hero masked-word reveal (home only, respects reduced motion)
   Each word sits inside a clipped mask; an inner span slides up
   from translateY(110%) to 0 with a staggered delay set by JS.
   ============================================================ */
.home .hero .display .word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  line-height: 1.05;
}

.home .hero .display .word-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 900ms cubic-bezier(0.165, 0.84, 0.44, 1);
  will-change: transform;
}

.home.is-loaded .hero .display .word-inner {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .home .hero .display .word-inner {
    transform: none;
    transition: none;
  }
}

/* ============================================================
   Tile hover effects (respects reduced motion)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .tile,
  .tile-image img,
  .tile-image .placeholder-img,
  .tile-cta {
    transition: none;
  }
  .tile:hover {
    transform: none;
  }
  .tile-link:hover .tile-image img,
  .tile-link:hover .tile-image .placeholder-img {
    transform: none;
  }
}

/* ============================================================
   About page
   ============================================================ */
.about main { padding-block: var(--space-8) var(--space-10); }

.about-hero {
  padding-block: var(--space-6) var(--space-10);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-10);
}

.about-hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: start;
}

@media (min-width: 768px) {
  .about-hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    gap: var(--space-10);
  }
}

.about-hero-text { min-width: 0; }

.about-hero .display {
  max-width: 22ch;
  margin-bottom: var(--space-6);
}

.about-hero .display .line { display: block; }

/* Portrait — square crop, generous radius, soft desaturation,
   layered shadow for depth, hairline ring for definition.
   Sits above headline on mobile, beside it on desktop. */
.about-hero-portrait {
  margin: 0;
  order: -1;
  max-width: 320px;
}

@media (min-width: 768px) {
  .about-hero-portrait {
    order: 0;
    max-width: none;
    margin-top: var(--space-2);
  }
}

.about-hero-portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  filter: saturate(0.88) contrast(1.02);
  box-shadow:
    0 24px 60px -20px rgba(0, 0, 0, 0.28),
    0 2px 8px -2px rgba(0, 0, 0, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .about-hero-portrait img {
  filter: saturate(0.85) brightness(0.96) contrast(1.04);
  box-shadow:
    0 24px 60px -20px rgba(0, 0, 0, 0.6),
    0 2px 8px -2px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.about-intro {
  margin-bottom: var(--space-6);
  color: var(--text-muted);
  font-weight: 400;
}

.about-status {
  font-size: 12px;
  letter-spacing: 0.06em;
}

.about-section {
  padding-block: var(--space-8);
  border-bottom: 1px solid var(--rule);
}

.about-section:last-of-type { border-bottom: 0; }

.about-section > .label {
  margin-bottom: var(--space-6);
}

/* Career timeline */
.timeline {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.timeline-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--rule);
}

.timeline-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

@media (min-width: 768px) {
  .timeline-row {
    grid-template-columns: 200px 1fr;
    gap: var(--space-6);
    align-items: start;
  }
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.timeline-years {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.timeline-duration {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* Company-group pattern — used when one company contains multiple roles
   (e.g. promotion path). The .timeline-meta shows the total tenure span,
   the .timeline-group-company is the company headline, and each role
   becomes a .timeline-subrole nested below. */
.timeline-row-group .timeline-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.timeline-group-company {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.timeline-company {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Company logo next to the timeline company name. Light/dark variants
   swap automatically with the theme (same pattern as .tile-logo). */
.timeline-meta-logo {
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
}

.timeline-logo {
  height: 22px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.timeline-logo-dark { display: none; }

[data-theme="dark"] .timeline-logo-light { display: none; }
[data-theme="dark"] .timeline-logo-dark { display: block; }

.timeline-subrole {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-left: var(--space-4);
  border-left: 1px solid var(--rule);
}

.timeline-subrole-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.timeline-subrole .timeline-role {
  font-size: 18px;
  margin: 0;
}

.timeline-subrole-dates {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.75;
}

.timeline-role {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-1);
}

.timeline-company {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.timeline-summary {
  font-size: 16px;
  line-height: 1.5;
  max-width: 60ch;
}

/* How I work — principles */
.principles {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.principle-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.principle-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
  max-width: 26ch;
}

.principle-body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Tools */
.tools-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.tools-list li {
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
}

/* Contact */
.about-contact .contact-line {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.4;
}

.about-contact a {
  border-bottom: 1px solid var(--rule);
  transition: border-color 200ms ease, opacity 200ms ease;
}

.about-contact a:hover {
  border-bottom-color: var(--text);
  opacity: 1;
}

/* ============================================================
   KYC project — cover composition (3 phones) + 10-screen grid
   ============================================================ */

/* Cover composition: three mobile screens in a row, center slightly
   prominent, sides angled and pushed down a touch for visual rhythm.
   Used on the home tile and at the top of the case study page. */
.phone-cover {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 28px);
  padding: clamp(16px, 3vw, 32px);
  background: var(--surface);
}

.phone-cover .phone {
  display: block;
  height: 95%;
  width: auto;
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.18),
              0 0 0 1px rgba(0, 0, 0, 0.04);
  transition: transform 600ms cubic-bezier(0.165, 0.84, 0.44, 1);
  flex-shrink: 0;
}

.phone-cover .phone-left {
  transform: rotate(-4deg) translateY(8px);
  z-index: 1;
}
.phone-cover .phone-center {
  transform: translateY(-2px) scale(1.04);
  z-index: 3;
}
.phone-cover .phone-right {
  transform: rotate(4deg) translateY(8px);
  z-index: 1;
}

/* On hover (whole tile), the fan opens up a touch. */
.tile-link:hover .phone-cover .phone-left {
  transform: rotate(-6deg) translateY(4px) translateX(-6px);
}
.tile-link:hover .phone-cover .phone-right {
  transform: rotate(6deg) translateY(4px) translateX(6px);
}
.tile-link:hover .phone-cover .phone-center {
  transform: translateY(-6px) scale(1.06);
}

/* When the cover sits inside the case study .cs-cover figure, the
   container has aspect-ratio 16/9 from .cs-cover .placeholder-img.
   Override that since we're rendering a real composition now. */
.case-study .cs-cover {
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.case-study .cs-cover .phone-cover {
  height: 100%;
}

/* Real-image covers fill the 16:9 container, cropping overflow. */
.case-study .cs-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .phone-cover .phone,
  .tile-link:hover .phone-cover .phone-left,
  .tile-link:hover .phone-cover .phone-right,
  .tile-link:hover .phone-cover .phone-center {
    transition: none;
  }
}

/* 10-screen grid in the case study FINAL DESIGNS section.
   2 cols mobile, 3 tablet, 5 desktop — 10 phones fit cleanly. */
.phone-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-3);
}

@media (min-width: 640px) {
  .phone-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
}

@media (min-width: 1024px) {
  .phone-grid { grid-template-columns: repeat(5, 1fr); gap: var(--space-4); }
}

.phone-grid-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
}

.phone-grid-item img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.phone-grid-item figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
  text-align: center;
}

/* ============================================================
   Feature tiles — square illustrations (dark Tori marketing tiles).
   2 cols mobile, 4 cols desktop. Each tile keeps its own image
   background (the source tiles are designed full-bleed).
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-3);
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
  }
}

.feature-grid-item {
  position: relative;
  margin: 0;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.feature-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================================
   A/B test cards — used in the KYC case study to document
   specific tests (problem / what we tried / result).
   ============================================================ */
.test-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.test-card {
  padding: var(--space-6);
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--rule);
}

.test-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.test-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.test-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .test-fields {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}

.test-field-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.test-field-text {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

/* Stat callouts inside a Result column — vertical stack with
   big display numbers + small mono captions. */
.test-stats {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.test-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.test-stat-value {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.6vw, 32px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.test-stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.3;
}

.test-stat-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-top: var(--space-3);
}

/* Visual demo image inside a test card — centered mobile mockup
   between the title and the 3-column breakdown. */
.test-visual {
  display: flex;
  justify-content: center;
  margin: var(--space-4) 0 var(--space-6);
}

.test-visual img {
  display: block;
  max-height: 500px;
  width: auto;
  border-radius: 18px;
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.18),
              0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* Before/after pair — two mobile screens side by side with mono labels.
   Stacks vertically on mobile. */
.test-visual-pair {
  margin: var(--space-4) 0 var(--space-6);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  justify-items: center;
}

@media (min-width: 640px) {
  .test-visual-pair {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: end;
  }
}

.test-visual-side {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.test-visual-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.test-visual-side img {
  display: block;
  max-height: 460px;
  width: auto;
  border-radius: 18px;
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.18),
              0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* Step flow — used to show a multi-step user journey inside a test card.
   2 cols mobile, 3 cols tablet+, kept readable by capping image width. */
.test-flow {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 var(--space-6);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  justify-items: center;
}

@media (min-width: 768px) {
  .test-flow {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
  }
}

.test-flow-step {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  max-width: 240px;
}

.test-flow-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.test-flow-step img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.18),
              0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* A standalone user-voice pull quote inside a test card — sits between
   the visual mockup and the Problem/Tried/Result breakdown. */
.test-pull-quote {
  margin: 0 auto var(--space-6);
  padding: var(--space-4) 0;
  max-width: 56ch;
  text-align: center;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.test-pull-quote p {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 var(--space-2) 0;
}

.test-pull-quote cite {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-style: normal;
}

/* User voices block inside a test card — sits between the visual
   (flow steps or before/after) and the Problem/Tried/Result fields.
   Anonymised support-email quotes that frame the human pain behind
   the metrics. Re-uses the global .quote-grid styling for cards. */
.test-voices {
  margin: 0 0 var(--space-6);
}

.test-voices .test-field-label {
  margin-bottom: var(--space-3);
}

/* "How we prototyped" callout inside a test card — sits below the
   Problem/Tried/Result columns as a behind-the-scenes detail. */
.test-poc {
  margin-top: var(--space-6);
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--rule);
}

.test-poc-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.test-poc-text {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  max-width: 72ch;
}

/* Award / recognition pill — small mono badge below a test title. */
.test-award {
  display: inline-block;
  margin-top: calc(var(--space-2) * -0.5);
  margin-bottom: var(--space-3);
  padding: 6px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
}

/* Horizontal stat row — used in the User research section to show
   research scope at a glance (interviews / segments / markets / sessions). */
.stat-row {
  list-style: none;
  margin: var(--space-6) 0 0 0;
  padding: var(--space-6) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .stat-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-row-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.stat-row-value {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-row-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Research artifact — a wide image (affinity map, themes board,
   research tracker, Fullstory grid, etc.) with a small caption. */
.research-artifact {
  margin: var(--space-6) 0 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.research-artifact img,
.research-artifact .placeholder-img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
}

.research-artifact figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* ============================================================
   Case study part divider — used when a case study has two
   distinct phases (e.g., KYC: Part 01 Redesign / Part 02 Tests).
   ============================================================ */
.cs-part {
  padding-top: var(--space-10);
  margin-top: var(--space-6);
  border-top: 1px solid var(--text);
}

.cs-part-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.cs-part-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-4);
  max-width: 24ch;
}

.cs-part-summary {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ============================================================
   User quote grid — placed inside the case study to add social
   proof before the Outcome metrics. Two-column on desktop.
   ============================================================ */
.quote-grid {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .quote-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
}

.quote {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--rule);
}

.quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.9vw, 22px);
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text);
  position: relative;
}

.quote blockquote::before {
  content: "\201C"; /* opening curly quote */
  position: absolute;
  left: -0.4em;
  top: -0.15em;
  color: var(--text-muted);
  opacity: 0.5;
}

.quote cite {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-style: normal;
}

/* ============================================================
   Project meta — spec sheet that sits between the cover and the
   case study body. Label left, value right, hairline dividers.
   ============================================================ */
.project-meta {
  margin: 0 0 var(--space-10) 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.project-meta-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 768px) {
  .project-meta-row {
    grid-template-columns: 160px 1fr;
    gap: var(--space-8);
    align-items: start;
  }
}

.project-meta-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
  padding-top: 4px;
}

.project-meta-value {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  max-width: 60ch;
}

@media (min-width: 768px) {
  .project-meta-value {
    text-align: right;
    margin-left: auto;
  }
}

.project-meta-pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

@media (min-width: 768px) {
  .project-meta-pills {
    justify-content: flex-end;
  }
}

.project-meta-pills li {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  padding: 8px 16px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--text);
  background: transparent;
}
