/* ==========================================================
   deepview.css — DeepView AI® Case Study Styles
   Light theme by default. Dark theme via [data-theme="dark"].
   Mobile-first layout.
   ========================================================== */

/* ─────────────────────────────────────────
   1. DESIGN TOKENS
   ───────────────────────────────────────── */
:root {
  /* Fonts */
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body:    "DM Sans", system-ui, sans-serif;

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Layout */
  --container-max: 1080px;
  --radius-sm:  6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Transitions */
  --ease: cubic-bezier(0.2, 0, 0.1, 1);
  --duration: 0.25s;

  /* ── Light theme colours (WCAG AA verified) ── */
  --bg:              #FAFAF8;
  --bg-alt:          #F2F1EE;
  --surface:         #FFFFFF;
  --border:          #E4E2DE;
  --border-strong:   #C5C3BD;

  /* Text — all pass 4.5:1 on --bg and --surface */
  --text:            #1C1B18;   /* ~17:1 on white */
  --text-2:          #5C5A54;   /* ~6.5:1 on white */
  --text-3:          #96948F;   /* ~3.0:1 — use only for decorative / large text */

  /* Accent amber — #A3620A on white = 5.1:1 (AA) */
  --accent:          #A3620A;
  --accent-bg:       #FEF3C7;
  --accent-border:   #F5C164;

  /* Clinical indigo — #3730A3 on white = 10.3:1 (AAA) */
  --clinical:        #3730A3;
  --clinical-bg:     #EEF2FF;
  --clinical-border: #C7D2FE;

  /* Semantic */
  --danger:          #991B1B;   /* ~8:1 on white */
  --danger-bg:       #FEF2F2;
  --danger-border:   #FECACA;

  --success:         #065F46;   /* ~8:1 on white */
  --success-bg:      #ECFDF5;
  --success-border:  #6EE7B7;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}

/* ── Dark theme overrides ── */
[data-theme="dark"] {
  --bg:            #111110;
  --bg-alt:        #1A1916;
  --surface:       #222120;
  --border:        #2E2D2A;
  --border-strong: #46443F;

  --text:   #EDEBE7;   /* ~15:1 on #111 */
  --text-2: #A8A59F;   /* ~7:1  on #111 */
  --text-3: #6A6762;   /* ~3.3:1 — decorative/large only */

  --accent:        #F0A932;   /* bright amber, ~7:1 on #111 */
  --accent-bg:     #261C08;
  --accent-border: #7A4A08;

  --clinical:        #818CF8;   /* ~5:1 on #111 */
  --clinical-bg:     #1A1B35;
  --clinical-border: #3730A3;

  --danger:        #FCA5A5;
  --danger-bg:     #2D1414;
  --danger-border: #7F1D1D;

  --success:        #6EE7B7;
  --success-bg:     #0A2318;
  --success-border: #065F46;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
}


/* ─────────────────────────────────────────
   2. RESET
   ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

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


/* ─────────────────────────────────────────
   3. ACCESSIBILITY UTILITIES
   ───────────────────────────────────────── */
/* Visually hidden (for screen readers) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip navigation link */
.skip-link {
  position: absolute;
  top: -48px; left: var(--space-4);
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: var(--space-4); }

/* Global focus style */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}


/* ─────────────────────────────────────────
   4. SCROLL PROGRESS BAR
   ───────────────────────────────────────── */
#scroll-bar {
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
  height: 2px;
  width: 0%;
  background: var(--accent);
  transition: width 0.05s linear;
}


/* ─────────────────────────────────────────
   5. LAYOUT
   ───────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(var(--space-5), 5vw, var(--space-10));
}
.section {
  padding: clamp(var(--space-16), 10vw, 120px) 0;
}
.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}


/* ─────────────────────────────────────────
   6. TYPOGRAPHY UTILITIES
   ───────────────────────────────────────── */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-5);
}

.section-lead {
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  color: var(--text-2);
  max-width: 60ch;
  line-height: 1.75;
  margin-bottom: var(--space-10);
}

.sub-heading {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--space-5);
}


/* ─────────────────────────────────────────
   7. TOP BAR
   ───────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) clamp(var(--space-5), 4vw, var(--space-10));
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.topbar.scrolled {
  border-bottom-color: var(--border);
}

/* Brand / logo */
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.2s;
}
.brand:hover { color: var(--accent); }
.brand-dot { color: var(--accent); }

/* Desktop nav */
.topnav {
  display: none; /* hidden on mobile, shown via media query */
  gap: var(--space-8);
  align-items: center;
}
.topnav a {
  font-size: 0.875rem;
  color: var(--text-2);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s;
}
.topnav a::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--text);
  transition: width 0.25s var(--ease);
}
.topnav a:hover,
.topnav a[aria-current] { color: var(--text); }
.topnav a:hover::after,
.topnav a[aria-current]::after { width: 100%; }

/* Controls group */
.topbar-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Mobile hamburger */
.menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  transition: border-color 0.2s;
}
.menu-btn:hover { border-color: var(--text-2); }
.menu-btn span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
/* Open state */
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Theme toggle */
.theme-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  transition: border-color 0.2s, color 0.2s;
}
.theme-btn:hover { border-color: var(--text-2); color: var(--text); }
.theme-btn svg { width: 16px; height: 16px; }
/* Sun/moon visibility controlled by theme */
.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none;  }

/* Mobile nav open state — full-width dropdown */
.topnav.is-open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--space-5) clamp(var(--space-5), 4vw, var(--space-10));
  gap: var(--space-5);
  box-shadow: var(--shadow-md);
}
.topnav.is-open a { font-size: 1rem; }


/* ─────────────────────────────────────────
   8. STICKY PROCESS NAV
   ───────────────────────────────────────── */
.process-nav {
  position: sticky;
  top: 57px; /* matches topbar height */
  z-index: 90;
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
.process-nav.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.process-nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(var(--space-5), 5vw, var(--space-10));
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.process-nav-inner::-webkit-scrollbar { display: none; }
.pnav-link {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  text-decoration: none;
  padding: var(--space-4) var(--space-5);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.pnav-link:hover { color: var(--text-2); }
.pnav-link.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}


/* ─────────────────────────────────────────
   9. BUTTONS
   ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--primary:hover {
  background: color-mix(in srgb, var(--accent) 85%, #000);
  border-color: color-mix(in srgb, var(--accent) 85%, #000);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover {
  border-color: var(--text-2);
}


/* ─────────────────────────────────────────
   10. PILLS
   ───────────────────────────────────────── */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: var(--space-1) var(--space-3);
}
.pill--accent {
  color: var(--accent);
  background: var(--accent-bg);
  border-color: var(--accent-border);
}


/* ─────────────────────────────────────────
   11. HERO
   ───────────────────────────────────────── */
.hero {
  padding-top: clamp(100px, 15vw, 140px);
  padding-bottom: clamp(var(--space-16), 10vw, 100px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: var(--space-5);
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-2);
  max-width: 52ch;
  line-height: 1.7;
  margin-bottom: var(--space-6);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* Hero image frame */
.hero-img-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  min-height: 240px;
  box-shadow: var(--shadow-md);
}
.hero-img-frame img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}


/* ─────────────────────────────────────────
   12. OVERVIEW — AT A GLANCE
   ───────────────────────────────────────── */
.glance-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.glance-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  border: 1px solid var(--border);
  border-left-width: 3px;
}
.glance-card--problem { border-left-color: var(--danger); }
.glance-card--solution { border-left-color: var(--accent); }

.glance-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}
.glance-card--problem .glance-tag { color: var(--danger); }
.glance-card--solution .glance-tag { color: var(--accent); }

.glance-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--space-5);
  color: var(--text);
}
.glance-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.glance-list li {
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.6;
  padding-left: var(--space-5);
  position: relative;
}
.glance-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--text-3);
}


/* ─────────────────────────────────────────
   13. IMPACT STRIP
   ───────────────────────────────────────── */
.impact-strip {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: clamp(var(--space-10), 8vw, var(--space-20)) 0;
}
.impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.impact-cell {
  background: var(--bg-alt);
  padding: clamp(var(--space-6), 4vw, var(--space-10)) clamp(var(--space-5), 3vw, var(--space-8));
  text-align: center;
}
.impact-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1;
  color: var(--text);
  margin-bottom: var(--space-2);
}
.impact-unit { color: var(--accent); }
.impact-label {
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.5;
}
.impact-label strong { color: var(--text); font-weight: 600; }


/* ─────────────────────────────────────────
   14. CHALLENGES
   ───────────────────────────────────────── */
.challenge-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.challenge-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 4vw, var(--space-8));
  transition: border-color 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}
.challenge-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.challenge-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--border);
  display: block;
  margin-bottom: var(--space-4);
  transition: color 0.3s;
  user-select: none;
}
.challenge-card:hover .challenge-num {
  color: color-mix(in srgb, var(--accent) 25%, var(--border));
}
.challenge-category {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--space-2);
}
.challenge-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-3);
}
.challenge-desc {
  font-size: 0.92rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: var(--space-5);
}

/* Approach box inside challenge card */
.challenge-response {
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
}
[data-theme="dark"] .challenge-response {
  background: var(--accent-bg);
  border-color: var(--accent-border);
}
.response-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-2);
}
.challenge-response p {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
}


/* ─────────────────────────────────────────
   15. RESEARCH
   ───────────────────────────────────────── */
/* Stats row */
.research-stats {
  display: flex;
  gap: clamp(var(--space-8), 6vw, var(--space-16));
  flex-wrap: wrap;
  margin-bottom: var(--space-10);
}
.r-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--accent);
  margin-bottom: var(--space-1);
}
.r-num span { color: var(--text-3); }
.r-label {
  font-size: 0.8rem;
  color: var(--text-3);
}

/* Photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
}
.photo-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  min-height: 160px;
}
.photo-item--tall {
  grid-row: span 2;
}
.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-item figcaption {
  font-size: 0.75rem;
  color: var(--text-3);
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border-top: 1px solid var(--border);
  line-height: 1.4;
}

/* Key insights */
.insight-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
}
.insight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
  transition: border-color 0.2s;
}
.insight-card:hover { border-color: var(--border-strong); }
.insight-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clinical);
  margin-bottom: var(--space-3);
}
.insight-card p {
  font-size: 0.93rem;
  color: var(--text-2);
  line-height: 1.65;
  font-style: italic;
}

/* Full-width image frame (affinity map etc.) */
.full-img-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  min-height: 180px;
}
.full-img-frame img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}
.full-img-frame figcaption {
  font-size: 0.78rem;
  color: var(--text-3);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--border);
  background: var(--surface);
}


/* ─────────────────────────────────────────
   16. CUSTOMER CONTEXT (DEFINE)
   ───────────────────────────────────────── */
.customer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.customer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 4vw, var(--space-8));
}
.customer-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clinical);
  margin-bottom: var(--space-3);
}
.customer-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-4);
}
.detail-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.detail-list li {
  font-size: 0.93rem;
  color: var(--text-2);
  line-height: 1.65;
  padding-left: var(--space-5);
  position: relative;
}
.detail-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--text-3);
}


/* ─────────────────────────────────────────
   17. DESIGN DECISIONS
   ───────────────────────────────────────── */
.decision {
  padding: clamp(var(--space-12), 8vw, var(--space-20)) 0;
  border-bottom: 1px solid var(--border);
}
.decision:first-of-type { border-top: 1px solid var(--border); }
[data-theme="dark"] .decision { border-color: var(--border); }

.decision-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(var(--space-8), 6vw, var(--space-16));
  align-items: start;
}
.decision-index {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clinical);
  margin-bottom: var(--space-4);
}
.decision-insight {
  font-size: 0.9rem;
  color: var(--text-2);
  font-style: italic;
  line-height: 1.65;
  border-left: 2px solid var(--border-strong);
  padding-left: var(--space-4);
  margin-bottom: var(--space-5);
}
.decision-text h3 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-4);
}
.decision-text p {
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: var(--space-4);
}
.decision-impact {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: var(--space-2);
}
.decision-impact svg { flex-shrink: 0; }

/* Before / After frames */
.decision-visuals {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.ba-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  min-height: 120px;
  position: relative;
}
.ba-frame img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}
.ba-label {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  z-index: 1;
  pointer-events: none;
}
.ba-frame--before { border-color: var(--danger-border); }
.ba-frame--before .ba-label {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}
.ba-frame--after { border-color: var(--success-border); }
.ba-frame--after .ba-label {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}
.ba-frame figcaption {
  font-size: 0.75rem;
  color: var(--text-3);
  padding: var(--space-2) var(--space-4);
  background: var(--surface);
  border-top: 1px solid var(--border);
}


/* ─────────────────────────────────────────
   18. PULL QUOTE
   ───────────────────────────────────────── */
.pull-quote {
  border-left: 3px solid var(--accent);
  margin: clamp(var(--space-12), 8vw, var(--space-20)) 0;
  padding: var(--space-6) clamp(var(--space-6), 4vw, var(--space-10));
  background: var(--accent-bg);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
[data-theme="dark"] .pull-quote { background: var(--accent-bg); }
.pull-quote blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
}
.pull-quote figcaption {
  font-size: 0.85rem;
  color: var(--text-2);
}


/* ─────────────────────────────────────────
   19. VALIDATION
   ───────────────────────────────────────── */
.validation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.validation-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  transition: border-color 0.2s, box-shadow 0.2s;
}
.validation-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.validation-type {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--space-2);
}
.validation-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  line-height: 1;
  color: var(--text);
  margin-bottom: var(--space-4);
}
.validation-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-3);
}
.validation-card p {
  font-size: 0.92rem;
  color: var(--text-2);
  line-height: 1.65;
}
.validation-card p strong { color: var(--text); font-weight: 600; }
.validation-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: 999px;
  padding: var(--space-1) var(--space-3);
}
.validation-badge--success { /* same, already green */ }

/* Outcomes list */
.outcomes {
  margin-top: var(--space-12);
  padding-top: var(--space-10);
  border-top: 1px solid var(--border);
}
.outcomes .sub-heading { margin-bottom: var(--space-6); }
.outcome-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.outcome-list li {
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.7;
  padding-left: var(--space-6);
  position: relative;
}
.outcome-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--clinical);
}
.outcome-list li strong {
  color: var(--text);
  font-weight: 600;
}


/* ─────────────────────────────────────────
   20. PROTOTYPE EMBED
   ───────────────────────────────────────── */
.prototype-frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.proto-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.proto-logo { width: 18px; height: auto; flex-shrink: 0; }
.proto-title {
  font-size: 0.82rem;
  color: var(--text-2);
  font-weight: 500;
}

/* Placeholder shown until Figma iframe is embedded */
.prototype-placeholder {
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-12);
}
.proto-icon { width: 40px; height: auto; opacity: 0.3; }
.prototype-placeholder p {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-2);
}
.proto-sub {
  font-family: var(--font-body) !important;
  font-size: 0.85rem !important;
  color: var(--text-3) !important;
  font-weight: 400 !important;
}

/* Actual Figma iframe (add once you have embed URL) */
.figma-iframe {
  width: 100%;
  height: 600px;
  border: none;
  display: block;
}


/* ─────────────────────────────────────────
   21. FOOTER
   ───────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-8) 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.footer-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-back:hover { color: var(--text); }
.footer-back svg { flex-shrink: 0; }
.footer-copy {
  font-size: 0.82rem;
  color: var(--text-3);
}


/* ─────────────────────────────────────────
   22. REVEAL ANIMATIONS
   ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ─────────────────────────────────────────
   23. IMAGE BROKEN-STATE HANDLER
   (JS adds .img-error class — hide broken icon)
   ───────────────────────────────────────── */
img.img-error {
  opacity: 0;
}


/* ─────────────────────────────────────────
   24. RESPONSIVE — TABLET (640px+)
   ───────────────────────────────────────── */
@media (min-width: 640px) {
  /* Topbar */
  .menu-btn { display: none; }
  .topnav {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
    gap: var(--space-6);
  }
  .topnav a { font-size: 0.875rem; }
  .topnav.is-open { /* reset mobile open state on wider screens */
    flex-direction: row;
    position: static;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
  }

  /* Layout */
  .glance-grid       { grid-template-columns: 1fr 1fr; }
  .customer-grid     { grid-template-columns: 1fr 1fr; }
  .validation-grid   { grid-template-columns: 1fr 1fr; }
  .insight-grid      { grid-template-columns: repeat(3, 1fr); }
  .photo-grid        { grid-template-columns: repeat(3, 1fr); }
  .impact-grid       { grid-template-columns: repeat(4, 1fr); }

  /* Decision visuals: side by side */
  .decision-visuals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }
}


/* ─────────────────────────────────────────
   25. RESPONSIVE — DESKTOP (900px+)
   ───────────────────────────────────────── */
@media (min-width: 900px) {
  /* Hero: 2 columns */
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: clamp(var(--space-10), 6vw, var(--space-16));
  }

  /* Challenges: 3 columns */
  .challenge-grid { grid-template-columns: repeat(3, 1fr); }

  /* Decision layout */
  .decision-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  /* Flipped decision (visuals first on desktop) */
  .decision--flip .decision-grid {
    direction: rtl;
  }
  .decision--flip .decision-grid > * {
    direction: ltr;
  }

  /* Decision before/after stacked again in their column */
  .decision-visuals {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
  }
}


/* ─────────────────────────────────────────
   26. PRINT STYLES (basic)
   ───────────────────────────────────────── */
@media print {
  .topbar,
  .process-nav,
  #scroll-bar,
  .skip-link,
  .cta-row,
  .hero-cta { display: none; }
  body { background: #fff; color: #000; }
  .container { max-width: 100%; padding: 0; }
  .section--alt { background: #f5f5f5; }
}
