/* ==========================================================================
   CASE STUDY — SHARED PAGE CHROME
   ==========================================================================
   Used by every case study under direction-g/work/[slug].html
   Re-declares parent Direction G theme tokens (so case study pages work
   standalone) plus the case-study-specific layout system: view modes,
   case header, KPI modules, stats grid, scene wrappers, prove-box, etc.
   ========================================================================== */

/* ============== THEME TOKENS ============== */
/* Tokens (--bg, --ink, --accent, --display, --max-width, radii, etc.) now live
   in css/tokens.css — link it BEFORE this file in every case study page. */

/* ============== BASE RESET ============== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color 0.5s ease, color 0.5s ease;
}

.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition: background-color 0.45s ease, color 0.45s ease,
              border-color 0.45s ease, box-shadow 0.45s ease,
              fill 0.45s ease, stroke 0.45s ease !important;
}

a { color: var(--ink); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent); }

ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* Visible keyboard focus for all interactive controls */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Keep anchored sections clear of the fixed nav */
.case-section { scroll-margin-top: 90px; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .atmosphere { animation: none !important; }
  .scroll-reveal { opacity: 1 !important; transform: none !important; }
}

/* ============== ATMOSPHERIC LAYERS ============== */
.atmosphere {
  position: fixed;
  inset: -8vmax;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, var(--atmos-1), transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 90%, var(--atmos-2), transparent 60%);
  animation: drift 24s ease-in-out infinite;
}
/* Overscan the fixed layer so translate-only drift never reveals a hard edge. */
@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-4%, 3%); }
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: var(--grain-opacity);
  background-image: repeating-linear-gradient(
    0deg,
    var(--grain-color) 0px,
    var(--grain-color) 1px,
    transparent 1px,
    transparent 3px
  );
}

main { position: relative; z-index: 2; }

/* ============== CASE STUDY NAV (with view-modes) ============== */
.case-study-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 16px 32px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
}
.case-study-nav .nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.case-study-nav .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.case-study-nav .brand .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 12px var(--accent-glow), 0 0 20px var(--accent-glow);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
.case-study-nav .brand .name { color: var(--ink); }
.case-study-nav .brand .status { color: var(--ink-soft); }

.case-study-nav .nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
}
.case-study-nav .nav-back:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}
.case-study-nav .nav-back .arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}
.case-study-nav .nav-back:hover .arrow { transform: translateX(-3px); }

.case-study-nav .nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ============== VIEW-MODE SEGMENTED CONTROL ============== */
.view-modes {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 2px;
}
.mode-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease;
}
.mode-btn:hover {
  color: var(--ink);
}
.mode-btn.active {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 18px var(--accent-glow);
}

/* ============== THEME TOGGLE ============== */
.theme-toggle {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.3s ease;
  padding: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(20deg);
}
.theme-toggle svg {
  width: 15px;
  height: 15px;
}
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ============== CASE-STUDY WRAPPER & SECTIONS ============== */
#caseStudyWrapper {
  padding-top: 70px;
}

.case-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 96px var(--content-pad-x);
  position: relative;
}
.case-section + .case-section {
  border-top: 1px solid var(--line);
}

.section-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--accent-bright);
}

.section-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 48px;
  max-width: 900px;
}
.section-title em {
  color: var(--accent-bright);
  font-style: italic;
  font-weight: 400;
}

.section-body {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 720px;
  margin-bottom: 32px;
}
.section-body strong {
  color: var(--ink);
  font-weight: 500;
}
.section-body em {
  color: var(--accent);
  font-style: italic;
}

/* ============== CASE HEADER (the Section 1 hero block) ============== */
.case-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px var(--content-pad-x) 60px;
  position: relative;
}
.case-header .eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.case-header .eyebrow .sep {
  color: var(--ink-fainter);
}
.case-header .eyebrow .live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.case-header .eyebrow .live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
  animation: pulse 1.6s ease-in-out infinite;
}

.presentation-hero {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(42px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 36px;
  max-width: 1280px;
}
.presentation-hero em {
  color: var(--accent-bright);
  font-style: italic;
  font-weight: 400;
  text-shadow: 0 0 40px var(--accent-glow);
}

.hero-sub {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 780px;
  margin-bottom: 56px;
}
.hero-sub strong {
  color: var(--ink);
  font-weight: 500;
}
.hero-sub em {
  color: var(--accent);
  font-style: italic;
}

/* ============== SCOPE-DISTINCTION CALLOUT ============== */
.scope-callout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0 0 48px 0;
  max-width: 1080px;
}
.scope-callout > div {
  padding: 24px 28px;
}
.scope-callout > div + div {
  border-left: 1px solid var(--line);
}
.scope-callout .scope-mine {
  border-left: 2px solid var(--accent-bright) !important;
  background: linear-gradient(135deg, var(--surface), var(--bg-soft));
}
.scope-callout .scope-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-fainter);
  margin-bottom: 10px;
}
.scope-callout .scope-mine .scope-label {
  color: var(--accent);
}
.scope-callout .scope-text {
  font-family: var(--display);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.35;
  color: var(--ink);
}

/* ============== PROVES-BOX (What this project proves) ============== */
.proves-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-bright);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 980px;
  position: relative;
  margin-bottom: 64px;
}
.proves-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 60% at 0% 50%,
    var(--accent-glow),
    transparent 60%
  );
  opacity: 0.15;
  pointer-events: none;
  border-radius: var(--radius-lg);
}
.proves-box h2 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  position: relative;
}
.proves-box ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
.proves-box ul li {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  padding-left: 22px;
  position: relative;
}
.proves-box ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-bright);
  font-family: var(--mono);
  font-size: 13px;
}
.proves-box ul li strong {
  color: var(--accent-bright);
  font-weight: 600;
}

/* ============== STATS GRID (Project Snapshot bar) ============== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 48px;
}
.stat-card {
  background: var(--surface);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.3s ease;
}
.stat-card:hover {
  background: var(--surface-strong);
}
.stat-card .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-fainter);
}
.stat-card .value {
  font-family: var(--display);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.stat-card .value em {
  color: var(--accent-bright);
  font-style: normal;
  font-weight: 600;
}

/* ============== KPI VALUE (the headline metric module) ============== */
.kpi-module {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.kpi-value {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(64px, 9vw, 128px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--accent-bright);
  text-shadow: 0 0 40px var(--accent-glow);
}
.kpi-qualifier {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 480px;
}
.kpi-qualifier strong {
  color: var(--ink);
  font-weight: 500;
}

.kpi-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.kpi-pair > div {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ============== INSIGHT CARDS / CALLOUTS ============== */
.insight-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent-bright);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  position: relative;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.insight-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.insight-card .quote {
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 16px;
  font-style: italic;
}
.insight-card .quote::before {
  content: "“";
  color: var(--accent);
  margin-right: 4px;
}
.insight-card .quote::after {
  content: "”";
  color: var(--accent);
}
.insight-card .author {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ============== FEATURE / PRINCIPLE CARDS ============== */
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  position: relative;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.feature-card::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: var(--accent-bright);
  box-shadow: 0 0 12px var(--accent-glow);
  opacity: 0;
  transform: scaleY(0.4);
  transform-origin: center;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.feature-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}
.feature-card:hover::before {
  opacity: 1;
  transform: scaleY(1);
}
.feature-card .feature-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 16px;
}
.feature-card .feature-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 12px;
}
.feature-card .feature-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ============== VIEW-MODE ENGINE ============== */
/* Hide view-scoped elements by default — specificity bumped via [data-view-mode]
   parent selector so component classes like .leadership-grid don't override.
   - .min-pres = appears in Presentation
   - .min-2    = appears in Overview AND Deep Dive (anything in Overview is also in Deep Dive)
   - .min-15   = appears in Deep Dive only */
[data-view-mode] .view-item {
  display: none !important;
}
[data-view-mode="presentation"] .view-item.min-pres,
[data-view-mode="overview"]     .view-item.min-2,
[data-view-mode="deep-dive"]    .view-item.min-2,
[data-view-mode="deep-dive"]    .view-item.min-15 {
  display: revert !important;
}

/* ============== PRESENTATION MODE — SLIDE TREATMENT ============== */
/* In Presentation, every section becomes a centered slide with massive
   typography, generous breathing room, and one or two visual anchors. */
[data-view-mode="presentation"] {
  --content-pad-x: 64px;
}
[data-view-mode="presentation"] .case-header {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px var(--content-pad-x);
}
[data-view-mode="presentation"] .case-header .eyebrow {
  justify-content: center;
  margin-bottom: 48px;
  font-size: 13px;
}
[data-view-mode="presentation"] .presentation-hero {
  font-size: clamp(56px, 9vw, 152px);
  text-align: center;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}
[data-view-mode="presentation"] .hero-sub {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  font-size: 22px;
  max-width: 880px;
}
[data-view-mode="presentation"] .scope-callout,
[data-view-mode="presentation"] .proves-box,
[data-view-mode="presentation"] .stats-grid {
  margin-left: auto;
  margin-right: auto;
}
[data-view-mode="presentation"] .kpi-value {
  font-size: clamp(120px, 18vw, 240px);
}
[data-view-mode="presentation"] .kpi-module {
  grid-template-columns: 1fr;
  text-align: center;
  gap: 24px;
  padding: 56px 0;
}
[data-view-mode="presentation"] .kpi-qualifier {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  font-size: 16px;
}
/* Each section becomes a slide */
[data-view-mode="presentation"] .case-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px var(--content-pad-x);
}
[data-view-mode="presentation"] .case-section .section-eyebrow {
  justify-content: center;
  margin-bottom: 32px;
  font-size: 13px;
}
[data-view-mode="presentation"] .case-section .section-title {
  font-size: clamp(56px, 8vw, 128px);
  text-align: center;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 64px;
}
[data-view-mode="presentation"] .case-section .section-body {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  font-size: 20px;
  max-width: 880px;
}

/* In Presentation, hide dense supporting elements unless explicitly tagged min-pres */
[data-view-mode="presentation"] .case-section > *:not(.section-eyebrow):not(.section-title):not(.section-body):not(.slide-section):not(.slide-card):not(.view-item):not(.kpi-module):not(.presentation-keep) {
  display: none !important;
}

/* ============== OVERVIEW MODE — TIGHTENED ============== */
/* Overview compresses padding and reduces visual density */
[data-view-mode="overview"] .case-header {
  padding-top: 56px;
  padding-bottom: 40px;
}
[data-view-mode="overview"] .case-section {
  padding-top: 64px;
  padding-bottom: 64px;
}
[data-view-mode="overview"] .presentation-hero {
  font-size: clamp(36px, 5vw, 72px);
}
[data-view-mode="overview"] .section-title {
  font-size: clamp(30px, 3.8vw, 48px);
  margin-bottom: 28px;
}
[data-view-mode="overview"] .section-body {
  font-size: 16px;
  margin-bottom: 24px;
}
[data-view-mode="overview"] .hero-sub {
  font-size: 17px;
  margin-bottom: 36px;
}
[data-view-mode="overview"] .kpi-value {
  font-size: clamp(56px, 7vw, 96px);
}

/* ============== TWO-COLUMN SECTION LAYOUT ============== */
.split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.split-row.tight { gap: 32px; }

/* ============== INSIGHT GRID (2x2 or 3-column) ============== */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.insight-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.insight-grid .insight-card {
  margin: 0;
}
.insight-card .insight-stat {
  font-family: var(--display);
  font-weight: 700;
  font-size: 40px;
  letter-spacing: -0.02em;
  color: var(--accent-bright);
  line-height: 1;
  margin-bottom: 12px;
  text-shadow: 0 0 20px var(--accent-glow);
}
.insight-card .insight-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 8px;
}
.insight-card .insight-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ============== BLUEPRINT TABLE (service blueprints) ============== */
.blueprint-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-family: var(--sans);
  font-size: 13px;
}
.blueprint-table thead th {
  background: var(--surface-strong);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}
.blueprint-table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: top;
  line-height: 1.5;
}
.blueprint-table tbody tr:last-child td { border-bottom: 0; }
.blueprint-table tbody tr:hover {
  background: var(--surface-strong);
}
.blueprint-table .stage {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.blueprint-table .pain {
  color: var(--ink-soft);
}
.blueprint-table .pain::before {
  content: "× ";
  color: var(--alert);
  font-weight: 700;
}
.blueprint-table .move {
  color: var(--ink);
}
.blueprint-table .move::before {
  content: "→ ";
  color: var(--accent);
  font-weight: 700;
}

/* ============== COMPARISON STRIP (competitive cards) ============== */
.comparison-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.comparison-strip.cols-3 { grid-template-columns: repeat(3, 1fr); }
.comparison-strip.cols-5 { grid-template-columns: repeat(5, 1fr); }

.comp-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.comp-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.comp-card.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 32px var(--accent-glow);
}
.comp-card .comp-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 8px;
}
.comp-card .comp-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-fainter);
  margin-bottom: 14px;
}
.comp-card .comp-body {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.comp-card .comp-pip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.comp-card .comp-pip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.comp-card .comp-pip.yes { color: var(--accent); }
.comp-card .comp-pip.yes::before { background: var(--accent-bright); box-shadow: 0 0 10px var(--accent-glow); }
.comp-card .comp-pip.no { color: var(--ink-fainter); }
.comp-card .comp-pip.no::before { background: var(--alert); }

/* ============== JOURNEY MAP TRACK ============== */
.journey-track {
  display: grid;
  grid-template-columns: repeat(var(--steps, 6), 1fr);
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.journey-step {
  padding: 20px 16px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.journey-step:last-child { border-right: 0; }
.journey-step .step-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-fainter);
}
.journey-step .step-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
.journey-step .step-action {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.journey-step .step-emotion {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--ink-fainter), var(--ink-fainter));
  margin-top: auto;
}
.journey-step[data-emotion="good"]   .step-emotion { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.journey-step[data-emotion="ok"]     .step-emotion { background: var(--warn); }
.journey-step[data-emotion="bad"]    .step-emotion { background: var(--alert); }
.journey-step[data-emotion="worst"]  .step-emotion {
  background: var(--alert);
  box-shadow: 0 0 12px var(--alert-glow);
}

/* ============== PERSONA CARD ============== */
.persona-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.persona-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent-bright);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.persona-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.persona-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.persona-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.persona-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  line-height: 1.5;
}
.persona-jtbd {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink);
  padding-left: 16px;
  border-left: 2px solid var(--accent);
}
.persona-quote {
  font-style: italic;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.persona-quote::before { content: "“"; color: var(--accent); }
.persona-quote::after { content: "”"; color: var(--accent); }
.persona-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}
.persona-list .pl-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ============== EVOLUTION TOUR (tabbed before-after-shipped) ============== */
.evolution-tour {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.evo-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: var(--surface-strong);
}
.evo-tab {
  appearance: none;
  flex: 1;
  background: transparent;
  border: 0;
  padding: 18px 20px;
  text-align: left;
  cursor: pointer;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-right: 1px solid var(--line);
  transition: background 0.2s ease, color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.evo-tab:last-child { border-right: 0; }
.evo-tab:hover { color: var(--ink); background: var(--surface); }
.evo-tab .tab-num { font-size: 10px; color: var(--ink-fainter); }
.evo-tab .tab-title {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: -0.01em;
  text-transform: none;
}
.evo-tab .tab-status {
  font-size: 9px;
  letter-spacing: 0.1em;
}
.evo-tab[data-status="killed"] .tab-status { color: var(--alert); }
.evo-tab[data-status="partial"] .tab-status { color: var(--warn); }
.evo-tab[data-status="shipped"] .tab-status { color: var(--accent); }

.evo-tab.active {
  background: var(--bg);
  color: var(--ink);
}
.evo-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.evo-pane {
  display: none;
  padding: 32px;
  gap: 32px;
  align-items: start;
}
.evo-pane.active { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr); }
.evo-mockup-slot {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.evo-narrative {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.evo-narrative h4 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.evo-narrative p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.evo-narrative .evo-quote {
  font-style: italic;
  color: var(--ink);
  border-left: 2px solid var(--accent);
  padding-left: 14px;
}
.evo-narrative .evo-metric {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: auto;
}

/* ============== KPI SCOREBOARD (paired bars) ============== */
.kpi-scoreboard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.kpi-row {
  display: grid;
  grid-template-columns: 280px 1fr auto;
  gap: 24px;
  align-items: center;
}
.kpi-row .kpi-label {
  font-family: var(--display);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.3;
}
.kpi-row .kpi-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.kpi-bar {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
}
.kpi-bar .bar-label {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.kpi-bar .bar-track {
  position: relative;
  height: 8px;
  background: var(--bg-soft);
  border-radius: 4px;
  overflow: hidden;
}
.kpi-bar .bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 4px;
  background: var(--ink-fainter);
}
.kpi-bar.post .bar-fill {
  background: var(--accent-bright);
  box-shadow: 0 0 12px var(--accent-glow);
}
.kpi-row .kpi-delta {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--accent-bright);
  text-shadow: 0 0 16px var(--accent-glow);
  white-space: nowrap;
}

/* ============== LEADERSHIP GRID ============== */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.leadership-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.3s ease;
}
.leadership-card:hover { border-color: var(--line-strong); }
.leadership-card .lc-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.leadership-card .lc-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.leadership-card .lc-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.leadership-card .lc-takeaway {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  font-style: italic;
  color: var(--accent);
  border-top: 1px dashed var(--line);
  padding-top: 12px;
  margin-top: auto;
}

/* ============== TESTING TIMELINE ============== */
.testing-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.testing-timeline.rounds-6 { grid-template-columns: repeat(6, 1fr); }
.test-round {
  background: var(--surface);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.test-round .tr-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.test-round .tr-method {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}
.test-round .tr-n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.test-round .tr-finding {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ============== HONEST GAP CALLOUT ============== */
.honest-gap {
  background: transparent;
  border: 1px dashed var(--ink-fainter);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 880px;
}
.honest-gap .gap-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-fainter);
}
.honest-gap p {
  font-family: var(--display);
  font-style: italic;
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* ============== REFLECTION QUOTE ============== */
.reflection {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 48px 0;
  margin: 64px 0;
}
.reflection p {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 1080px;
}
.reflection p::before { content: "“"; color: var(--accent); margin-right: 4px; }
.reflection p::after { content: "”"; color: var(--accent); }

/* ============== HARD PROBLEM HEADER ============== */
.hard-problem {
  margin-bottom: 80px;
}
.hp-header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.hp-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.hp-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink);
}
.hp-summary {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 780px;
  margin-bottom: 32px;
}
.hp-metric-bar {
  display: inline-flex;
  align-items: baseline;
  gap: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.hp-metric-bar .metric-value {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-bright);
  text-shadow: 0 0 14px var(--accent-glow);
}

/* ============== SAID-YES/NO MATRIX ============== */
.yn-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.yn-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
}
.yn-col .yn-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.yn-col.yes .yn-label { color: var(--accent); }
.yn-col.no .yn-label { color: var(--alert); }
.yn-col ul { display: flex; flex-direction: column; gap: 14px; }
.yn-col ul li {
  font-size: 14px;
  line-height: 1.5;
  padding-left: 20px;
  position: relative;
  color: var(--ink);
}
.yn-col.yes ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
}
.yn-col.no ul li {
  color: var(--ink-soft);
}
.yn-col.no ul li .yn-strike {
  color: var(--ink-fainter);
  text-decoration: line-through;
}
.yn-col.no ul li::before {
  content: "✕";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--alert);
  font-family: var(--mono);
  font-weight: 700;
}

/* ============== ROADMAP LIST ============== */
.roadmap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  counter-reset: rm;
}
.roadmap li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
}
.roadmap li:last-child { border-bottom: 0; }
.roadmap li::before {
  counter-increment: rm;
  content: "0" counter(rm);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  align-self: start;
}
.roadmap li strong { color: var(--ink); font-weight: 600; }

/* ============== SCROLL-REVEAL ============== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.scroll-reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ============== FOOTER ============== */
.case-footer {
  border-top: 1px solid var(--line);
  padding: 40px var(--content-pad-x);
  max-width: var(--max-width);
  margin: 80px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-fainter);
  gap: 16px;
  flex-wrap: wrap;
}
.case-footer .end-pulse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.case-footer .end-pulse::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent-bright);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 1080px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid .stat-card:nth-child(4),
  .stats-grid .stat-card:nth-child(5) {
    grid-column: span 1;
  }
}

@media (max-width: 880px) {
  :root {
    --content-pad-x: var(--content-pad-x-mobile);
  }
  .case-study-nav { padding: 12px 20px; }
  .case-study-nav .brand .status { display: none; }
  .case-study-nav .nav-right { gap: 10px; }
  .view-modes { padding: 3px; }
  .mode-btn { font-size: 10px; padding: 6px 10px; letter-spacing: 0.04em; }
  #caseStudyWrapper { padding-top: 60px; }
  .case-header { padding: 56px 24px 40px; }
  .case-section { padding: 64px 24px; }
  .scope-callout { grid-template-columns: 1fr; }
  .scope-callout > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-module { grid-template-columns: 1fr; gap: 16px; }
  .kpi-pair { grid-template-columns: 1fr; gap: 32px; }
  .proves-box { padding: 20px 22px; }
  .case-footer {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }
  .split-row { grid-template-columns: 1fr; gap: 32px; }
  .insight-grid { grid-template-columns: 1fr; }
  .insight-grid.cols-3 { grid-template-columns: 1fr; }
  .comparison-strip,
  .comparison-strip.cols-3,
  .comparison-strip.cols-5 { grid-template-columns: 1fr; }
  .journey-track { grid-template-columns: 1fr; }
  .journey-step { border-right: 0; border-bottom: 1px solid var(--line); }
  .journey-step:last-child { border-bottom: 0; }
  .persona-grid { grid-template-columns: 1fr; }
  .evo-pane.active { grid-template-columns: 1fr; }
  .evo-tabs { flex-direction: column; }
  .evo-tab { border-right: 0; border-bottom: 1px solid var(--line); }
  .evo-tab:last-child { border-bottom: 0; }
  .kpi-row { grid-template-columns: 1fr; }
  .leadership-grid { grid-template-columns: 1fr; }
  .testing-timeline,
  .testing-timeline.rounds-6 { grid-template-columns: 1fr; }
  .test-round { border-right: 0; }
  .yn-matrix { grid-template-columns: 1fr; }
  .blueprint-table { font-size: 12px; }
  .blueprint-table thead { display: none; }
  .blueprint-table tbody td { padding: 10px 14px; }
}
