/* ═══════════════════════════════════════════════════
   Case Study Shared Styles — Aryan Portfolio
   Theme tokens come from ../theme.css (must load first).
   This file owns case-study-specific layout + sizing tokens.
   ═══════════════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Case-study-only layout tokens (theme tokens live in theme.css).
     1300px matches homepage section max-width (index.html line 465). */
  --max: 1300px;
  --wide: 1300px;
}

/* Match homepage's 75% baseline zoom (index.html line 16) so case studies
   render at the same visual scale as the homepage. */
html { zoom: 0.75; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: 76px; /* clears the slimmer fixed nav (48px logo + 14px*2 padding) */
}
/* Same as homepage: fixed canvas at z:1, content lifted to z:2 */
#space-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
body > section,
body > main,
body > article,
body > footer,
body > div { position: relative; z-index: 2; }
a { color: var(--amber); text-decoration: none; transition: opacity 0.15s; }
a:hover { opacity: 0.75; }
img { display: block; }

/* ── TEXT SELECTION — uses the same muted grey as description text, theme-independent ── */
/* Cobalt highlight + black text. font-weight isn't allowed in ::selection,
   so we fake +1 weight step with a 0.5px same-color text-shadow that thickens
   the glyphs — applies to body, pills, descriptions, everything selected. */
::selection      { background: rgba(var(--peacock-rgb), 0.85); color: #0a0a0a; text-shadow: 0 0 0.55px #0a0a0a, 0 0 0.55px #0a0a0a; }
::-moz-selection { background: rgba(var(--peacock-rgb), 0.85); color: #0a0a0a; text-shadow: 0 0 0.55px #0a0a0a, 0 0 0.55px #0a0a0a; }

/* ── Section header pills — slow text glow on hover (no pill bg/box shimmer,
   just the inner letters lighting up gently). Coexists with the existing
   csPulse border animation. */
.cs-section-label,
.cs-gallery-label,
.cs-tech-label,
.cs-audio-label,
.cs-arch-section .cs-section-label,
.cs-breadcrumb {
  transition: text-shadow 0.6s ease;
}
.cs-section-label:hover,
.cs-gallery-label:hover,
.cs-tech-label:hover,
.cs-audio-label:hover,
.cs-arch-section .cs-section-label:hover,
.cs-breadcrumb:hover {
  text-shadow: 0 0 12px rgba(var(--amber-rgb), 0.65), 0 0 22px rgba(var(--amber-rgb), 0.30);
}

/* ── NAV (case-study topbar — matches homepage layout) ── */
.cs-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
/* Center nav links — like homepage .nav-links */
.cs-nav-links {
  display: flex;
  gap: 38px;
  align-items: center;
}
.cs-nav-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  transition: color 0.25s ease;
}
.cs-nav-links a:hover { color: var(--amber); opacity: 1; }

/* Back-to-all bar — sticky just below the fixed nav, flex row with back btn
   on the left and the Case-Study breadcrumb pill centered. */
.cs-back-bar {
  position: sticky;
  top: 76px;
  z-index: 90;
  background: var(--bg);
  padding: 6px 35px 0;
  height: 140px;
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid rgba(106, 106, 102, 0.30);
  transition: height 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), padding 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.cs-back-bar h1 {
  transition: opacity 0.18s ease, max-height 0.28s ease, margin 0.28s ease;
  max-height: 200px;
  opacity: 1;
  overflow: hidden;
}
/* Scroll-collapsed state — pill + h1 flip to a horizontal row, h1 shrinks.
   Both stay visible side-by-side. Smooth transitions. */
.cs-back-bar.scrolled {
  height: 78px;
  padding-top: 4px;
}
.cs-back-bar.scrolled .cs-back-bar-title-col {
  top: 4px;
  gap: 0;
}
/* Pill slides UP + fades on scroll, h1 flows up to take its place */
.cs-back-bar .cs-breadcrumb {
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
              max-height 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
              margin 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
              padding 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  overflow: hidden;
}
.cs-back-bar.scrolled .cs-breadcrumb {
  opacity: 0;
  transform: translateY(-18px);
  max-height: 0;
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-top-width: 0;
  border-bottom-width: 0;
  pointer-events: none;
}
.cs-back-bar.scrolled h1 {
  font-size: 25px !important;
}
.cs-back-bar-title-col { transition: gap 0.4s ease; }
.cs-back-bar .cs-back-btn { align-self: center; margin-top: 1px; }
/* Pill + h1 column, positioned at hero's content-left X.
   Column spans full back-bar height, then flex justify-center vertically
   centers the (pill + h1) group as a single unit — rock-solid regardless
   of internal element heights. */
.cs-back-bar-title-col {
  position: absolute;
  left: max(40px, calc(50% - var(--max) / 2 + 40px));
  top: 6px;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
}
.cs-back-bar-title-col .cs-breadcrumb {
  margin: 0 !important;
}
/* (legacy rules below — superseded by the column above) */
.cs-back-bar .cs-breadcrumb-legacy-unused {
  margin-bottom: 0 !important;
  margin-left: auto;
  margin-right: auto;
}
/* Back button — default (expanded) sizing */
.cs-back-bar .cs-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--s2);
  border: 1px solid var(--border);
  color: var(--amber);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: text-shadow 0.6s ease, transform 0.15s ease, font-size 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), letter-spacing 0.45s ease, padding 0.45s ease;
  white-space: nowrap;
  position: relative;
  isolation: isolate;
  overflow: visible;
}
/* Collapsed view — back button matches the case-study pill exactly */
.cs-back-bar.scrolled .cs-back-btn {
  font-size: 10px;
  letter-spacing: 0.20em;
  line-height: 1;
  padding: 6px 16px;
  border-radius: 50px;
}
.cs-back-bar .cs-back-btn::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: 999px;
  padding: 1px;
  /* Two amber arcs 180° apart, low intensity — matches the amber text + glow
     so the accent reads as amber across every theme (peacock goes grey in Stone). */
  background: conic-gradient(from var(--sa),
    transparent 0deg 30deg,
    rgba(var(--amber-rgb), 0.14)  50deg,
    rgba(var(--amber-rgb), 0.40)  80deg,
    rgba(var(--amber-rgb), 0.65) 105deg,
    rgba(var(--amber-rgb), 0.40) 130deg,
    rgba(var(--amber-rgb), 0.14) 160deg,
    transparent 180deg 210deg,
    rgba(var(--amber-rgb), 0.14) 230deg,
    rgba(var(--amber-rgb), 0.40) 260deg,
    rgba(var(--amber-rgb), 0.65) 285deg,
    rgba(var(--amber-rgb), 0.40) 310deg,
    rgba(var(--amber-rgb), 0.14) 340deg,
    transparent 360deg);
  filter: drop-shadow(0 0 2px rgba(var(--amber-rgb), 0.30));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  animation: snakeRotate 18s linear -3s infinite, electricFlicker 6s steps(28, end) infinite;
  pointer-events: none;
  z-index: 1;
}
.cs-back-bar .cs-back-btn:hover {
  transform: translateX(-2px);
  text-shadow: 0 0 12px rgba(var(--amber-rgb), 0.65), 0 0 22px rgba(var(--amber-rgb), 0.30);
  opacity: 1;
}

@media (max-width: 768px) {
  .cs-nav { padding: 12px 20px; }
  .cs-nav-links { display: none; }
  /* Mobile: back-bar becomes a simple vertical stack (back btn → breadcrumb → h1);
     the desktop absolute-positioned/collapsing layout collides at narrow widths. */
  .cs-back-bar, .cs-back-bar.scrolled {
    height: auto !important; min-height: 0 !important;
    display: flex !important; flex-direction: column !important;
    align-items: flex-start !important; gap: 10px !important;
    padding: 14px 20px 12px !important;
  }
  .cs-back-bar-title-col, .cs-back-bar.scrolled .cs-back-bar-title-col {
    position: static !important; left: auto !important; top: auto !important;
    bottom: auto !important; gap: 8px !important;
  }
  .cs-back-bar .cs-back-btn { align-self: flex-start !important; margin-top: 0 !important; }
  .cs-back-bar h1, .cs-back-bar.scrolled h1, .cs-hero h1 { font-size: 25px !important; }
}
.cs-nav-back {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}
.cs-nav-back:hover { color: var(--amber); opacity: 1; }
.cs-nav-divider { color: var(--text-dim); font-size: 12px; }
.cs-nav-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-nav-brand {
  margin-left: auto;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* Right-side nav controls — theme-picker + LinkedIn + Let's Talk
   Same shape/feel as homepage, simplified (no snake animation). */
.cs-nav-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.cs-nav-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color 0.25s, border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  flex-shrink: 0;
}
.cs-nav-linkedin svg { width: 17px; height: 17px; }
.cs-nav-linkedin:hover {
  color: var(--amber);
  border-color: rgba(var(--amber-rgb), 0.45);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(var(--amber-rgb), 0.18);
  opacity: 1;
}
.cs-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  padding: 8px 19px;
  background: var(--amber);
  color: #0a0a0a;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-indent: 0.06em;
  transition: transform 0.25s, box-shadow 0.25s;
  white-space: nowrap;
}
.cs-nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--amber-rgb), 0.4), 0 0 24px rgba(var(--peacock-rgb), 0.28);
  opacity: 1;
}

/* Cover image — theme-aware inline SVG. Cobalt+peach gradients in peach
   theme, stone+champagne in stone theme — all via CSS tokens. */
.cs-hero-cover {
  width: 100%;
  max-width: var(--max);
  display: block;
  margin: 0 auto 24px;
  border-radius: 14px;
  border: 1px solid rgba(106, 106, 102, 0.35);
  overflow: hidden;
  background: rgba(8, 8, 8, 0.55);
  opacity: 0.5; /* ~50% transparency reduction */
}
.cs-hero-cover svg { display: block; width: 100%; height: auto; }

/* warm = peach in peach theme, champagne in stone — mapped to --amber */
.cv-warm-text { fill: var(--amber); }
.cv-warm-fill { fill: var(--amber); }
.cv-warm-stroke { stroke: var(--amber); }
/* cool = cobalt in peach theme, stone-grey in stone — mapped to --peacock-bright */
.cv-cool-text { fill: var(--peacock-bright); }
.cv-cool-fill { fill: var(--peacock-bright); }
.cv-cool-stroke { stroke: var(--peacock-bright); }
/* cards / surfaces */
.cv-card { fill: rgba(14, 14, 14, 0.85); }
/* lines / dividers */
.cv-line-stroke { stroke: rgba(106, 106, 102, 0.35); }
.cv-line-fill { fill: rgba(106, 106, 102, 0.25); }
/* gradient stops */
.cv-bg-1 { stop-color: rgba(8, 8, 8, 0.95); }
.cv-bg-2 { stop-color: rgba(14, 14, 14, 0.95); }
.cv-warm-fade-in { stop-color: var(--amber); stop-opacity: 0.18; }
.cv-warm-fade-out { stop-color: var(--amber); stop-opacity: 0; }

/* ── HERO — flex column so we can reorder breadcrumb/title/tagline above the
   cover image without restructuring the HTML. Left-aligned within --max. ── */
.cs-hero {
  display: flex;
  flex-direction: column;
}
.cs-hero .cs-breadcrumb { order: 1; align-self: flex-start; }
.cs-hero h1            { order: 2; }
.cs-hero .cs-hero-row  { order: 3; }
.cs-hero .cs-tagline   { order: 4; }
.cs-hero .cs-hero-cover { order: 5; }
.cs-hero .cs-hero-stats { order: 6; }

/* (original .cs-hero block below — kept for padding/max-width settings) */
.cs-hero {
  padding: 64px 40px 52px;
  max-width: var(--max);
  margin: 0 auto;
}
.cs-breadcrumb {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--amber);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cs-breadcrumb span { color: var(--text-dim); }
.cs-category {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid var(--border-amber);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.cs-hero h1, .cs-back-bar h1 {
  font-size: clamp(28px, 5vw, 50px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 16px;
}
/* Hero title — fixed colors, theme-independent:
   "AI Training" (h1 outer) always cobalt.
   "Voice Platform" (em) always peach.
   A soft, low-alpha white field is permanently overlaid (never disappears)
   and drifts horizontally as a slow seamless loop. Light & elegant.
   Gradient is periodic (start = end alpha) and tiled (repeat-x) so the
   loop wraps without any visible jolt. */
/* Soft white orb, lava-lamp behavior — low alpha so cobalt + peach stay vivid.
   h1 and em are intentionally OUT OF PHASE (em starts ~half a cycle behind)
   so the orb visits "AI Training" and "Voice Platform" at different moments —
   gives the effect a more interesting spatial rhythm rather than one big
   simultaneous wash. */
@keyframes csTitleShine {
  0%, 100% { background-position: 78% 0%; }
  50%      { background-position: 22% 0%; }
}
.cs-hero h1, .cs-back-bar h1 {
  background-color: var(--peacock-bright);
  background-image: linear-gradient(
    100deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0) 30%,
    rgba(255,255,255,0.32) 50%,
    rgba(255,255,255,0) 70%,
    rgba(255,255,255,0) 100%
  );
  background-size: 200% 100%;
  background-repeat: no-repeat;
  background-position: 50% 0%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: csTitleShine 20s ease-in-out infinite;
  will-change: background-position;
}
.cs-hero h1 em, .cs-back-bar h1 em {
  font-style: normal;
  background-color: var(--amber);
  background-image: linear-gradient(
    100deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0) 30%,
    rgba(255,255,255,0.32) 50%,
    rgba(255,255,255,0) 70%,
    rgba(255,255,255,0) 100%
  );
  background-size: 200% 100%;
  background-repeat: no-repeat;
  background-position: 50% 0%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: csTitleShine 20s ease-in-out -10s infinite;
  will-change: background-position;
}
@media (prefers-reduced-motion: reduce) {
  .cs-hero h1, .cs-back-bar h1, .cs-hero h1 em, .cs-back-bar h1 em { animation: none; }
}

/* Locked title treatment — applied to every section h2.
   Same scheme as hero h1: cobalt outer, peach em, drifting low-alpha white orb,
   em phase-offset by half a cycle so the orb is never on both halves at once. */
.cs-section h2,
.cs-gallery h2,
.cs-tech h2,
.cs-outcome h2,
.cs-arch-section h2,
.cs-audio h2 {
  background-color: var(--peacock-bright);
  background-image: linear-gradient(
    100deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0) 30%,
    rgba(255,255,255,0.32) 50%,
    rgba(255,255,255,0) 70%,
    rgba(255,255,255,0) 100%
  );
  background-size: 200% 100%;
  background-repeat: no-repeat;
  background-position: 50% 0%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: csTitleShine 20s ease-in-out infinite;
  will-change: background-position;
}
.cs-section h2 em,
.cs-gallery h2 em,
.cs-tech h2 em,
.cs-outcome h2 em,
.cs-arch-section h2 em,
.cs-audio h2 em {
  font-style: normal;
  background-color: var(--amber);
  background-image: linear-gradient(
    100deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0) 30%,
    rgba(255,255,255,0.32) 50%,
    rgba(255,255,255,0) 70%,
    rgba(255,255,255,0) 100%
  );
  background-size: 200% 100%;
  background-repeat: no-repeat;
  background-position: 50% 0%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: csTitleShine 20s ease-in-out -10s infinite;
  will-change: background-position;
}
@media (prefers-reduced-motion: reduce) {
  .cs-section h2, .cs-gallery h2, .cs-tech h2, .cs-outcome h2,
  .cs-arch-section h2, .cs-audio h2,
  .cs-section h2 em, .cs-gallery h2 em, .cs-tech h2 em, .cs-outcome h2 em,
  .cs-arch-section h2 em, .cs-audio h2 em { animation: none; }
}

/* Hero meta row — emoji set + waveform side-by-side under the title.
   Tight vertical spacing, no glow, just a subtle bob animation. */
.cs-hero-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 6px 0;
  flex-wrap: wrap;
}
.cs-emoji-set {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.cs-emoji {
  font-size: 30px;
  line-height: 1;
  display: inline-block;
  animation: csEmojiPulse 4s ease-in-out infinite;
  will-change: transform;
}
.cs-emoji:nth-child(2) { animation-delay: 0.4s; }
.cs-emoji:nth-child(3) { animation-delay: 0.8s; }
.cs-emoji:nth-child(4) { animation-delay: 1.2s; }
.cs-emoji:nth-child(5) { animation-delay: 1.6s; }
@keyframes csEmojiPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-3px) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .cs-emoji { animation: none; }
}

.cs-tagline {
  font-size: 15px;
  color: var(--text-muted);
  max-width: none;
  line-height: 1.6;
  margin-bottom: 32px;
  font-weight: 500;
}
.cs-hero-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  padding: 20px 24px;
  background: rgba(16, 16, 16, 0.55);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.cs-stat-num {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 800;
  color: var(--peacock-bright);
  line-height: 1;
}
.cs-stat-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── BRIEF GRID (compact problem/ask layout) ── */
.cs-brief-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 20px;
}
.cs-brief-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: baseline;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  gap: 20px;
}
.cs-brief-row:last-child { border-bottom: none; }
.cs-brief-row:hover { background: var(--s1); }
.cs-brief-key {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--amber);
}
.cs-brief-val {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}
.cs-brief-val strong { color: var(--text); font-weight: 700; }

/* ── CONTENT SECTIONS ── */
.cs-section {
  padding: 48px 40px;
  max-width: var(--max);
  margin: 0 auto;
}
.cs-section-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--amber);
  margin-bottom: 8px;
}
.cs-section h2 {
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.cs-section p {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: none;
  margin-bottom: 12px;
}
.cs-section p:last-child { margin-bottom: 0; }
.cs-section strong { color: var(--text); font-weight: 700; }

/* ── DIVIDER ── */
.cs-divider {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 40px;
}
.cs-divider hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber-dim), rgba(var(--amber-rgb),0.2), var(--amber-dim), transparent);
}

/* ── SCREENSHOTS ── */
.cs-gallery {
  padding: 0 40px 52px;
  max-width: var(--wide);
  margin: 0 auto;
}
.cs-gallery-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--amber);
  margin-bottom: 8px;
  padding: 0;
}
.cs-gallery h2 {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.cs-gallery-grid {
  display: grid;
  gap: 10px;
}
.cs-gallery-grid.cols-1 { grid-template-columns: 1fr; }
.cs-gallery-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.cs-gallery-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cs-gallery-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.cs-screenshot-wrap {
  background: rgba(16, 16, 16, 0.55);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.cs-screenshot-wrap:hover {
  border-color: rgba(var(--peacock-rgb), 0.32);
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  transform: translateY(-1px);
}
.cs-screenshot-wrap img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top center;
  display: block;
  opacity: 0.88;
  transition: transform 0.3s, opacity 0.25s ease;
}
.cs-screenshot-wrap:hover img {
  opacity: 1;
}
.cs-gallery-grid.cols-1 .cs-screenshot-wrap img { height: 380px; }
.cs-gallery-grid.cols-2 .cs-screenshot-wrap img { height: 260px; }
.cs-gallery-grid.cols-4 .cs-screenshot-wrap img { height: 180px; }
.cs-screenshot-wrap:hover img { transform: scale(1.015); }
.cs-screenshot-caption {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border);
}
.cs-screenshot-caption .tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  background: rgba(var(--amber-rgb), 0.10);
  border: 1px solid rgba(var(--amber-rgb), 0.32);
  padding: 4px 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* ── LIGHTBOX ── */
.cs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.cs-lightbox.active {
  opacity: 1;
  pointer-events: all;
}
.cs-lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.8);
  object-fit: contain;
}
.cs-lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  z-index: 10000;
  background: none;
  border: none;
  transition: color 0.15s;
}
.cs-lightbox-close:hover { color: var(--text); }

/* Mockup screenshot (CSS-drawn dashboard for hospitality) */
.cs-mockup {
  background: var(--s2);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16/10;
  position: relative;
  display: flex;
  flex-direction: column;
}
.cs-mockup-topbar {
  height: 32px;
  background: var(--s3);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 6px;
  flex-shrink: 0;
}
.cs-mockup-dot { width: 8px; height: 8px; border-radius: 50%; }
.cs-mockup-dot.red { background: #e05a5a; }
.cs-mockup-dot.yellow { background: #e8b84b; }
.cs-mockup-dot.green { background: #4ec97a; }
.cs-mockup-url {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  height: 16px;
  margin-left: 8px;
}
.cs-mockup-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}
.cs-mockup-sidebar {
  width: 18%;
  border-right: 1px solid var(--border);
  background: var(--s1);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cs-mockup-nav-item {
  height: 10px;
  border-radius: 3px;
  background: rgba(255,255,255,0.04);
}
.cs-mockup-nav-item.active {
  background: var(--amber-dim);
  border-left: 2px solid var(--amber);
}
.cs-mockup-content {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.cs-mockup-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.cs-mockup-kpi {
  background: var(--s3);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 8px;
}
.cs-mockup-kpi-val {
  height: 14px;
  border-radius: 2px;
  background: var(--amber-dim);
  width: 60%;
  margin-bottom: 4px;
}
.cs-mockup-kpi-label {
  height: 7px;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
  width: 80%;
}
.cs-mockup-grid-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 8px;
  flex: 1;
  min-height: 0;
}
.cs-mockup-chart {
  background: var(--s3);
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 8px;
  gap: 3px;
}
.cs-mockup-bar {
  flex: 1;
  background: var(--amber-dim);
  border-radius: 2px 2px 0 0;
  border-top: 1px solid rgba(var(--amber-rgb),0.3);
}
.cs-mockup-list {
  background: var(--s3);
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cs-mockup-row {
  height: 16px;
  border-bottom: 1px solid var(--border);
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cs-mockup-row-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.cs-mockup-row-line { height: 6px; border-radius: 2px; background: rgba(255,255,255,0.06); flex: 1; }
.cs-mockup-row-val { height: 6px; width: 24px; border-radius: 2px; background: var(--amber-dim); }

/* ── TECH STACK ── */
.cs-tech {
  padding: 0 40px 52px;
  max-width: var(--max);
  margin: 0 auto;
}
.cs-tech-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--amber);
  margin-bottom: 8px;
}
.cs-tech h2 {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.cs-stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cs-stack-item {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 16px;
  transition: border-color 0.15s, transform 0.15s;
  cursor: default;
}
.cs-stack-item:hover {
  border-color: var(--border-amber);
  transform: translateY(-1px);
}
.cs-stack-item .role {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
  display: block;
  margin-bottom: 2px;
}
.cs-stack-item .name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* ── FLOW DIAGRAM ── */
.cs-flow {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  row-gap: 10px;
  margin: 20px 0;
}
.cs-flow-step {
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 14px;
  flex: 1;
  min-width: 110px;
  text-align: center;
}
.cs-flow-step .step-tool {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
  margin-bottom: 3px;
}
.cs-flow-step .step-action {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.cs-flow-arrow {
  color: var(--text-dim);
  font-size: 16px;
  padding: 0 4px;
  flex-shrink: 0;
}

/* ── OUTCOME ── */
.cs-outcome {
  padding: 0 40px 52px;
  max-width: var(--max);
  margin: 0 auto;
}
.cs-outcome-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--amber);
  margin-bottom: 8px;
}
.cs-outcome h2 {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.cs-outcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.cs-outcome-card {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
}
.cs-outcome-card .oc-val {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
  margin-bottom: 5px;
}
.cs-outcome-card .oc-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.cs-outcome p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 680px;
  margin-bottom: 0;
}

/* ── AUDIO PLAYER ── */
.cs-audio {
  padding: 0 40px 52px;
  max-width: var(--max);
  margin: 0 auto;
}
.cs-audio-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--amber);
  margin-bottom: 8px;
}
.cs-audio h2 {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.cs-audio p {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 20px;
  max-width: none;
  line-height: 1.6;
}
.cs-audio-clips {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cs-clip {
  background: rgba(16, 16, 16, 0.55);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.cs-clip:hover { border-color: rgba(var(--peacock-rgb), 0.32); transform: translateY(-1px); }
.cs-clip-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--amber);
  color: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.cs-clip-play:hover { transform: scale(1.08); box-shadow: 0 4px 16px rgba(var(--amber-rgb),0.3); }
.cs-clip-info { flex: 1; min-width: 0; }
.cs-clip-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.cs-clip-meta {
  font-size: 11px;
  color: var(--text-muted);
}
.cs-clip-duration {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.cs-clip audio {
  display: none;
}
.cs-clip-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 22px;
  padding: 0 6px;
}
.cs-clip-waveform span {
  width: 2px;
  border-radius: 1px;
  background: var(--amber-dim);
  transition: background 0.2s;
}
.cs-clip:hover .cs-clip-waveform span { background: rgba(var(--amber-rgb),0.3); }

/* ── NEXT/PREV FOOTER ──
   Dark surface to match the page aesthetic, with a subtle accent stripe
   along the top of each half (peach left, cobalt right) and a small
   accent pill for the direction label. Hover brightens the surface +
   intensifies the stripe. Pushed lower with extra top margin. */
.cs-footer-nav {
  display: flex;
  align-items: stretch;
  margin-top: 80px;
  border-top: 1px solid var(--border);
}
.cs-footer-nav-item {
  flex: 1;
  padding: 32px 48px;
  background: rgba(14, 14, 14, 0.55);
  transition: background 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.cs-footer-nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  opacity: 0.45;
  transition: opacity 0.25s;
  pointer-events: none;
}
.cs-footer-nav-item:first-child {
  border-right: 2px solid rgba(255, 255, 255, 0.16);
}
.cs-footer-nav-item:first-child::before {
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
}
.cs-footer-nav-item:last-child {
  text-align: right;
  align-items: flex-end;
}
.cs-footer-nav-item:last-child::before {
  background: linear-gradient(90deg, transparent, var(--peacock-bright), transparent);
}
.cs-footer-nav-item:hover {
  transform: translateY(-2px);
}
.cs-footer-nav-item:hover::before {
  opacity: 1;
}
.cs-footer-nav-item a {
  display: block;
  height: 100%;
  width: 100%;
  color: inherit;
}
/* Direction = HOLLOW pill in side's accent color — matches sub-section
   pill convention (10px / 800, low-alpha bg, accent border, accent text).
   Text glows on hover like the sub-section pills. */
.cs-footer-direction {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
  transition: text-shadow 0.6s ease, background 0.25s ease, border-color 0.25s ease;
}
.cs-footer-nav-item:first-child .cs-footer-direction {
  background: rgba(14, 14, 14, 0.55);
  border: 1px solid rgba(106, 106, 102, 0.45);
  color: var(--amber);
}
.cs-footer-nav-item:last-child .cs-footer-direction {
  background: rgba(14, 14, 14, 0.55);
  border: 1px solid rgba(106, 106, 102, 0.45);
  color: var(--peacock-bright);
}
/* No pill glow on hover — kept clean. Only the lift + accent stripe move. */
/* Title color — left = cobalt, right = peach (theme-aware). Matches
   sub-section h2 sizing (20px / 900). */
/* Footer titles — same treatment as sub-section h2s: cobalt→peach base
   gradient + drifting white shine band, all clipped to text. */
/* Footer titles — same locked treatment as sub-section h2s:
   cobalt outer + peach <em> + drifting white shine band on each. */
.cs-footer-cs-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
  background-color: var(--peacock-bright);
  background-image: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.32) 50%, transparent 70%);
  background-size: 200% 100%;
  background-repeat: no-repeat;
  background-position: 50% 0%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: csTitleShine 20s ease-in-out infinite;
  transition: opacity 0.2s;
}
.cs-footer-cs-title em {
  font-style: normal;
  background-color: var(--amber);
  background-image: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.32) 50%, transparent 70%);
  background-size: 200% 100%;
  background-repeat: no-repeat;
  background-position: 50% 0%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: csTitleShine 20s ease-in-out -10s infinite;
}
/* Title stays plain on hover — only the pill glows (mirrors the sub-section
   pill hover convention). No dulling, no title glow, no flash. */
.cs-footer-cs-type {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── QUOTE BLOCK ── */
.cs-quote {
  background: var(--s1);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: 0 10px 10px 0;
  padding: 20px 24px;
  margin: 20px 0;
}
.cs-quote p {
  font-size: 15px;
  font-style: italic;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 8px;
  font-weight: 500;
}
.cs-quote-attr {
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
}

/* ── TIMELINE ── */
.cs-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 18px;
  border-left: 2px solid var(--border);
  margin: 20px 0;
}
.cs-timeline-item {
  padding: 0 0 18px 22px;
  position: relative;
}
.cs-timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  border: 2px solid var(--bg);
}
.cs-timeline-item:last-child { padding-bottom: 0; }
.cs-timeline-step {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--amber);
  margin-bottom: 3px;
}
.cs-timeline-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}
.cs-timeline-desc strong { color: var(--text); font-weight: 700; }

/* ── LIVE BADGE ── */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(78,201,122,0.2);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.live-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

.concept-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid var(--border-amber);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.cs-content-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--s2);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-style: italic;
}

/* ── HERO GLOW + ENTRANCE ── */
.cs-hero {
  position: relative;
  overflow: hidden;
}
.cs-hero::after {
  content: '';
  position: absolute;
  top: -60px; right: -80px;
  width: 520px; height: 400px;
  background: radial-gradient(ellipse, rgba(var(--amber-rgb),0.07) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.cs-hero > * { position: relative; z-index: 1; }

@keyframes csFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.cs-hero { animation: csFadeUp 0.5s ease both; }
.cs-hero-stats { animation: csFadeUp 0.5s 0.12s ease both; }

/* ── WAVEFORM (voice accent) ── */
.cs-waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 30px;
  margin: 14px 0 18px;
}
.cs-waveform span {
  width: 3px;
  border-radius: 2px;
  background: var(--amber);
  opacity: 0.4;
  animation: csWave 1.6s ease-in-out infinite;
}
.cs-waveform span:nth-child(1)  { height: 35%; animation-delay: 0.00s; }
.cs-waveform span:nth-child(2)  { height: 65%; animation-delay: 0.15s; }
.cs-waveform span:nth-child(3)  { height: 90%; animation-delay: 0.30s; }
.cs-waveform span:nth-child(4)  { height: 55%; animation-delay: 0.10s; }
.cs-waveform span:nth-child(5)  { height: 100%; animation-delay: 0.45s; }
.cs-waveform span:nth-child(6)  { height: 70%; animation-delay: 0.20s; }
.cs-waveform span:nth-child(7)  { height: 45%; animation-delay: 0.35s; }
.cs-waveform span:nth-child(8)  { height: 85%; animation-delay: 0.05s; }
.cs-waveform span:nth-child(9)  { height: 60%; animation-delay: 0.40s; }
.cs-waveform span:nth-child(10) { height: 30%; animation-delay: 0.25s; }
.cs-waveform span:nth-child(11) { height: 75%; animation-delay: 0.50s; }
.cs-waveform span:nth-child(12) { height: 50%; animation-delay: 0.12s; }
@keyframes csWave {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 0.12; transform: scaleY(0.18); }
}

/* ── ARCH SECTION (full-bleed bg) ── */
.cs-arch-section {
  background: var(--s1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 40px;
}
.cs-arch-inner {
  max-width: var(--wide);
  margin: 0 auto;
}
.cs-arch-section .cs-section-label { margin-bottom: 8px; }
.cs-arch-section h2 {
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

/* ── ARCHITECTURE DIAGRAM ── */
.cs-arch {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}
.cs-arch-col {
  flex: 1;
  padding: 20px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid var(--border);
}
.cs-arch-col:last-child { border-right: none; }
.cs-arch-col--hub {
  background: rgba(var(--amber-rgb),0.04);
  border-color: var(--border-amber);
}
.cs-arch-col-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.cs-arch-col--hub .cs-arch-col-label {
  color: var(--amber);
  border-bottom-color: var(--border-amber);
}
.cs-arch-node {
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  transition: border-color 0.15s;
}
.cs-arch-node:hover { border-color: var(--border-amber); color: var(--amber); }
.cs-arch-node--hub {
  background: var(--amber-dim);
  border-color: rgba(var(--amber-rgb),0.4);
  color: var(--amber);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
  padding: 20px 12px;
  text-align: center;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.cs-arch-node--hub small {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(var(--amber-rgb),0.5);
}
.cs-arch-node--output { border-left: 2px solid var(--green); }
.cs-arch-connector {
  display: flex;
  align-items: center;
  padding: 0 6px;
  color: var(--text-dim);
  font-size: 14px;
  flex-shrink: 0;
}

/* ── BUTTONS ── */
.cs-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.cs-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  background: var(--amber);
  color: #140c00;
  white-space: nowrap;
}

/* Shine sweep */
.cs-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.28),
    transparent
  );
  transform: skewX(-18deg);
  animation: btnShine 3s ease-in-out infinite;
}

@keyframes btnShine {
  0%    { left: -75%; opacity: 1; }
  55%   { left: 135%; opacity: 1; }
  56%, 100% { left: 135%; opacity: 0; }
}

.cs-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(var(--amber-rgb), 0.38), 0 2px 8px rgba(var(--amber-rgb), 0.2);
  opacity: 1;
  background: var(--amber);
}

.cs-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(var(--amber-rgb), 0.2);
}

/* Ghost variant */
.cs-btn--ghost {
  background: transparent;
  color: var(--amber);
  border: 1px solid var(--border-amber);
  box-shadow: none;
}

.cs-btn--ghost::before { display: none; }

.cs-btn--ghost:hover {
  background: var(--amber-dim);
  border-color: rgba(var(--amber-rgb), 0.4);
  color: var(--amber);
  box-shadow: 0 4px 20px rgba(var(--amber-rgb), 0.12);
}

/* Small variant */
.cs-btn--sm {
  padding: 9px 18px;
  font-size: 11px;
}

/* Responsive ── */
@media (max-width: 768px) {
  .cs-nav { padding: 12px 20px; }
  .cs-nav-title { display: none; }
  .cs-hero { padding: 40px 20px 32px; }
  .cs-section, .cs-tech, .cs-outcome, .cs-audio { padding-left: 20px; padding-right: 20px; }
  .cs-gallery { padding-left: 20px; padding-right: 20px; }
  .cs-footer-nav { flex-direction: column; }
  .cs-footer-nav-item:first-child { border-right: none; border-bottom: 1px solid var(--border); }
  .cs-gallery-grid.cols-2, .cs-gallery-grid.cols-3, .cs-gallery-grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .cs-flow { flex-direction: column; align-items: stretch; }
  .cs-flow-arrow { transform: rotate(90deg); align-self: center; }
  /* Architecture pipeline stacks vertically on mobile; connectors point down.
     Prefixed + !important to override per-page inline .cs-arch rules. */
  .cs-arch-section .cs-arch { flex-direction: column !important; align-items: stretch !important; }
  .cs-arch-section .cs-arch-col { width: 100% !important; }
  .cs-arch-section .cs-arch-connector { transform: rotate(90deg) !important; min-width: 0 !important; margin: 2px auto !important; }
  .cs-hero-stats { gap: 20px; }
  .cs-mockup-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .cs-brief-row { grid-template-columns: 80px 1fr; padding: 12px 16px; }
}

/* ═══════════════════════════════════════════════════
   MOBILE CONVENTION — case-study phone layout (≤600px)
   Normalizes what the per-page inline rules left inconsistent.
   Selectors are section-scoped (.cs-hero / .cs-gallery ...) so they
   out-specify the bare per-page inline rules and win with !important.
   ═══════════════════════════════════════════════════ */
@media (max-width: 600px) {
  /* Hero stats: always 2-up on phones (pages ranged 2–5 cols inconsistently) */
  .cs-hero .cs-hero-stats { grid-template-columns: repeat(2, 1fr) !important; }
  .cs-hero .cs-hero-stats > div { padding: 22px 10px !important; }

  /* Galleries: wide screenshots go full-width; thumbnail grids stay 2-up */
  .cs-gallery .cs-gallery-grid.cols-2 { grid-template-columns: 1fr !important; }
  .cs-gallery .cs-gallery-grid.cols-3,
  .cs-gallery .cs-gallery-grid.cols-4 { grid-template-columns: 1fr 1fr !important; }
  /* Portrait phone-screenshot galleries read better one-up */
  .cs-gallery .cs-gallery-grid .cs-screenshot-wrap.is-portrait { grid-column: 1 / -1 !important; }

  /* Section rhythm: trim the airy 37px desktop padding on phones */
  .cs-hero, .cs-section, .cs-gallery, .cs-tech, .cs-arch-section, .cs-outcome, .cs-audio {
    padding-top: 26px !important; padding-bottom: 26px !important;
  }
  .cs-hero { padding-top: 16px !important; }

  /* Tap targets: comfortable minimums for the two pill buttons */
  .cs-back-bar .cs-back-btn, .cs-tech .cs-stack-item { min-height: 34px; }
}

/* Small phones (≤380px) — thumbnail grids also go one-up to stay legible */
@media (max-width: 380px) {
  .cs-gallery .cs-gallery-grid.cols-3,
  .cs-gallery .cs-gallery-grid.cols-4 { grid-template-columns: 1fr !important; }
  .cs-hero .cs-hero-stats { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ═══════════════════════════════════════════════════
   V3 HYBRID CARD RECIPE — Section-level surface treatment
   Alternates black (0.94 / 0.97) and grey (0.82 / 0.90) tints
   across major case-study sections for visual rhythm.
   Matches homepage card convention (memory: V3 hybrid).
   ═══════════════════════════════════════════════════ */

/* Helpers — apply via classes on the section element OR via section-order
   selectors. Default is to NOT auto-paint sections; pages add classes:
     .cs-card-blk-1 → very dark black (0.97 alpha)
     .cs-card-blk-2 → dark black     (0.94 alpha)
     .cs-card-gry-1 → light grey     (0.90 alpha)
     .cs-card-gry-2 → mid grey       (0.82 alpha)
   Each card sits on top of the page bg with a 1px border + 14px radius. */

/* Skin-only modifiers — composes with existing section classes
   (cs-hero / cs-section / cs-gallery / etc.) without overriding padding. */
.cs-card-blk-1,
.cs-card-blk-2,
.cs-card-gry-1,
.cs-card-gry-2 {
  border: 1px solid var(--border);
  border-radius: 14px;
  position: relative;
  z-index: 2;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cs-card-blk-1 { background: rgba(8, 8, 8, 0.97); }
.cs-card-blk-2 { background: rgba(14, 14, 14, 0.94); }
.cs-card-gry-1 { background: rgba(34, 34, 34, 0.90); }
.cs-card-gry-2 { background: rgba(28, 28, 28, 0.82); }

.cs-card-blk-1:hover,
.cs-card-blk-2:hover,
.cs-card-gry-1:hover,
.cs-card-gry-2:hover {
  border-color: var(--border-amber);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
}

/* ═══════════════════════════════════════════════════
   PEACH/YELLOW theme adjustments specific to case studies
   Most theme switching happens automatically because we
   tokenized rgba(255,179,102,X) → rgba(var(--amber-rgb),X).
   Below are the case-study-specific tweaks.
   ═══════════════════════════════════════════════════ */

/* Peach mode — em accents in headings adopt peacock blue (matches homepage h2 em treatment) */
/* Peach mode — em accents pop in cobalt (peacock-bright). !important needed
   to beat the per-page inline em color rule that uses var(--amber).
   Hero h1 em is intentionally excluded — it uses a gradient (see below). */
:root[data-theme="peach"] .cs-section h2 em,
:root[data-theme="peach"] .cs-gallery h2 em,
:root[data-theme="peach"] .cs-tech h2 em,
:root[data-theme="peach"] .cs-outcome h2 em,
:root[data-theme="peach"] .cs-arch-section h2 em,
:root[data-theme="peach"] .cs-audio h2 em { color: var(--peacock-bright) !important; }

/* Peach mode — h1/h2/h3 main color shifts to peacock (same as homepage rule) */
:root[data-theme="peach"] .cs-hero h1, :root[data-theme="peach"] .cs-back-bar h1,
:root[data-theme="peach"] .cs-section h2,
:root[data-theme="peach"] .cs-gallery h2,
:root[data-theme="peach"] .cs-tech h2,
:root[data-theme="peach"] .cs-audio h2,
:root[data-theme="peach"] .cs-arch-section h2 { color: var(--peacock); }

/* (Peach hero h1 em is fully defined earlier — animated layered shine.
   No additional override here.) */

/* Yellow mode — body headings stay light grey (matches homepage rule for yellow) */
:root[data-theme="yellow"] .cs-hero h1, :root[data-theme="yellow"] .cs-back-bar h1,
:root[data-theme="yellow"] .cs-section h2,
:root[data-theme="yellow"] .cs-gallery h2,
:root[data-theme="yellow"] .cs-tech h2,
:root[data-theme="yellow"] .cs-audio h2,
:root[data-theme="yellow"] .cs-arch-section h2 { color: var(--text); }

/* Output node green stays green in default theme; in peach/yellow keep green for visual rhythm */
.cs-arch-node--output { border-left: 2px solid var(--green); }

/* ═══════════════════════════════════════════════════════════════════════
   STREAK SYSTEM — backgrounds & snake animations
   Source-of-truth: _docs/STREAK-SYSTEM.md
   Applied to case-study elements where applicable.
   Every streak resolves through --amber-rgb / --peacock-rgb so theme
   switching is automatic (no per-theme overrides).
   ═══════════════════════════════════════════════════════════════════════ */

/* §2 — Required globals */
@property --sa { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

@keyframes snakeRotate     { to { --sa: 360deg; } }
@keyframes electricFlicker {
  0%, 100% { opacity: 1; }
  14% { opacity: 0.9; } 17% { opacity: 1; }
  41% { opacity: 0.93; } 43% { opacity: 1; }
  88% { opacity: 0.88; } 90% { opacity: 1; }
}
@keyframes ctaHaloAlt {
  0%, 100% { background-color: rgba(var(--amber-rgb), 0.10); }
  50%      { background-color: rgba(var(--peacock-rgb), 0.10); }
}

@media (prefers-reduced-motion: reduce) {
  .vc::after, .format-card::after, .cs-screenshot-wrap::after,
  .cs-arch-node::after, .cs-clip::after,
  .cs-nav-cta::before, .cs-nav-cta::after, .cs-back-btn::before {
    animation: none !important;
  }
}

/* §3 — Single-color cobalt snake (cards / image frames) */
.vc, .format-card, .cs-screenshot-wrap, .cs-arch-node, .cs-clip {
  position: relative;
  isolation: isolate;
}
.vc::after, .format-card::after, .cs-screenshot-wrap::after,
.cs-arch-node::after, .cs-clip::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--sa),
    transparent 0deg 240deg,
    rgba(var(--peacock-rgb), 0.22) 254deg,
    rgba(var(--peacock-rgb), 0.65) 278deg,
    rgba(var(--peacock-rgb), 0.95) 302deg,
    rgba(var(--peacock-rgb), 0.65) 326deg,
    rgba(var(--peacock-rgb), 0.22) 350deg,
    transparent 360deg);
  filter: drop-shadow(0 0 4px rgba(var(--peacock-rgb), 0.6))
          drop-shadow(0 0 12px rgba(var(--peacock-rgb), 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  animation: snakeRotate 15s linear infinite,
             electricFlicker 6s steps(28, end) infinite;
  pointer-events: none;
  z-index: 5;
}

/* Stagger pulses across siblings so adjacent cards don't flicker in unison */
.cs-audio-clips > .vc:nth-child(3n+1)::after { animation-delay: 0s, 0s; }
.cs-audio-clips > .vc:nth-child(3n+2)::after { animation-delay: -3s, -1.5s; }
.cs-audio-clips > .vc:nth-child(3n)::after   { animation-delay: -6s, -3s; }

.format-grid > .format-card:nth-child(4n+1)::after { animation-delay: 0s, 0s; }
.format-grid > .format-card:nth-child(4n+2)::after { animation-delay: -2.25s, -1s; }
.format-grid > .format-card:nth-child(4n+3)::after { animation-delay: -4.5s, -2s; }
.format-grid > .format-card:nth-child(4n)::after   { animation-delay: -6.75s, -3s; }

.cs-gallery-grid > .cs-screenshot-wrap:nth-child(4n+1)::after { animation-delay: 0s, 0s; }
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(4n+2)::after { animation-delay: -2.25s, -1s; }
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(4n+3)::after { animation-delay: -4.5s, -2s; }
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(4n)::after   { animation-delay: -6.75s, -3s; }

/* Arch nodes: column has a label as child #1, so nodes start at child #2 */
.cs-arch-col > .cs-arch-node:nth-child(2)::after { animation-delay: 0s, 0s; }
.cs-arch-col > .cs-arch-node:nth-child(3)::after { animation-delay: -3s, -1.5s; }
.cs-arch-col > .cs-arch-node:nth-child(4)::after { animation-delay: -6s, -3s; }

/* §4 — Dual-color streak (Let's Talk + Back pill buttons)
   Both theme colors visible at once, 180° apart. */
.cs-nav-cta, .cs-back-btn {
  position: relative;
  isolation: isolate;
  overflow: visible;
}
.cs-nav-cta::before, .cs-back-btn::before {
  content: '';
  position: absolute; inset: -2px;
  border-radius: 999px;
  padding: 2px;
  background: conic-gradient(from var(--sa),
    transparent 0deg 64deg,
    rgba(var(--amber-rgb), 0.20)    76deg,
    rgba(var(--amber-rgb), 0.55)   100deg,
    rgba(var(--amber-rgb), 0.92)   124deg,
    rgba(var(--amber-rgb), 0.55)   148deg,
    rgba(var(--amber-rgb), 0.20)   172deg,
    transparent 184deg 244deg,
    rgba(var(--peacock-rgb), 0.20) 256deg,
    rgba(var(--peacock-rgb), 0.55) 280deg,
    rgba(var(--peacock-rgb), 0.92) 304deg,
    rgba(var(--peacock-rgb), 0.55) 328deg,
    rgba(var(--peacock-rgb), 0.20) 352deg,
    transparent 360deg);
  filter: drop-shadow(0 0 3px rgba(var(--peacock-rgb), 0.45))
          drop-shadow(0 0 3px rgba(var(--amber-rgb), 0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  animation: snakeRotate 15s linear -2s infinite,
             electricFlicker 6s steps(28, end) infinite;
  pointer-events: none;
  z-index: 1;
}
/* Soft dual-color halo behind the Let's Talk pill */
.cs-nav-cta::after {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 999px;
  background-color: rgba(var(--amber-rgb), 0.10);
  filter: blur(8px);
  animation: ctaHaloAlt 6s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

/* ═══════════════════════════════════════════════════════════════════════
   GREY/BLACK CARD ALTERNATION — adjacent cards rotate through 4 tints
   of the same dark palette. Alpha kept at 0.55 across the board so the
   starfield reads through every card, like the rest of the page.
   ═══════════════════════════════════════════════════════════════════════ */

/* Format cards — 4-step rotation across the 7 cards */
.format-grid > .format-card:nth-child(4n+1) { background: rgba(8, 8, 8, 0.55); }
.format-grid > .format-card:nth-child(4n+2) { background: rgba(34, 34, 34, 0.55); }
.format-grid > .format-card:nth-child(4n+3) { background: rgba(14, 14, 14, 0.55); }
.format-grid > .format-card:nth-child(4n)   { background: rgba(28, 28, 28, 0.55); }

/* Voice cards — 3-step (3 cards) */
.cs-audio-clips > .vc:nth-child(3n+1) { background: rgba(8, 8, 8, 0.55); }
.cs-audio-clips > .vc:nth-child(3n+2) { background: rgba(34, 34, 34, 0.55); }
.cs-audio-clips > .vc:nth-child(3n)   { background: rgba(14, 14, 14, 0.55); }

/* Screenshot tiles — 4-step rotation */
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(4n+1) { background: rgba(8, 8, 8, 0.55); }
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(4n+2) { background: rgba(34, 34, 34, 0.55); }
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(4n+3) { background: rgba(14, 14, 14, 0.55); }
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(4n)   { background: rgba(28, 28, 28, 0.55); }

/* ─── ARCH NODE STREAK OVERRIDE — peach instead of cobalt ─── */
.cs-arch-col > .cs-arch-node::after {
  background: conic-gradient(from var(--sa),
    transparent 0deg 240deg,
    rgba(var(--amber-rgb), 0.22) 254deg,
    rgba(var(--amber-rgb), 0.65) 278deg,
    rgba(var(--amber-rgb), 0.95) 302deg,
    rgba(var(--amber-rgb), 0.65) 326deg,
    rgba(var(--amber-rgb), 0.22) 350deg,
    transparent 360deg);
  filter: drop-shadow(0 0 4px rgba(var(--amber-rgb), 0.6))
          drop-shadow(0 0 12px rgba(var(--amber-rgb), 0.35));
}

/* ─── WIDE-ARC DUAL COBALT STREAK (opposite sides, 180° apart)
   For wider/horizontal containers: arch outer box, stats bar, table wrap.
   Pattern: two cobalt arcs centered at ~105° and ~285° (180° apart),
   with transparent gaps at 0–30°/180–210° so the arcs read clean on long
   horizontal edges. ─── */
.cs-arch, .cs-hero-stats, .how-table-wrap {
  position: relative;
  isolation: isolate;
}
.cs-arch::after, .cs-hero-stats::after, .how-table-wrap::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--sa),
    transparent 0deg 30deg,
    rgba(var(--peacock-rgb), 0.22)  50deg,
    rgba(var(--peacock-rgb), 0.62)  80deg,
    rgba(var(--peacock-rgb), 0.95) 105deg,
    rgba(var(--peacock-rgb), 0.62) 130deg,
    rgba(var(--peacock-rgb), 0.22) 160deg,
    transparent 180deg 210deg,
    rgba(var(--peacock-rgb), 0.22) 230deg,
    rgba(var(--peacock-rgb), 0.62) 260deg,
    rgba(var(--peacock-rgb), 0.95) 285deg,
    rgba(var(--peacock-rgb), 0.62) 310deg,
    rgba(var(--peacock-rgb), 0.22) 340deg,
    transparent 360deg);
  filter: drop-shadow(0 0 4px rgba(var(--peacock-rgb), 0.55))
          drop-shadow(0 0 10px rgba(var(--peacock-rgb), 0.32));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  animation: snakeRotate 18s linear -1.5s infinite,
             electricFlicker 6s steps(28, end) infinite;
  pointer-events: none;
  z-index: 5;
}

/* Wrapper for the How It Works table — gives the streak something to ride on
   while the table itself keeps its border-radius + overflow:hidden. */
.how-table-wrap {
  border-radius: 10px;
  margin-top: 24px;
}
.how-table-wrap > .how-table {
  margin-top: 0;
}
@media (prefers-reduced-motion: reduce) {
  .cs-arch::after, .cs-hero-stats::after, .how-table-wrap::after {
    animation: none !important;
  }
}

/* ─── Arch node streak removed entirely — only hover state stays ─── */
.cs-arch-col > .cs-arch-node::after {
  display: none !important;
}

/* ─── Arch outer container — peach wide-arc (override cobalt) ─── */
.cs-arch::after {
  background: conic-gradient(from var(--sa),
    transparent 0deg 30deg,
    rgba(var(--amber-rgb), 0.22)  50deg,
    rgba(var(--amber-rgb), 0.62)  80deg,
    rgba(var(--amber-rgb), 0.95) 105deg,
    rgba(var(--amber-rgb), 0.62) 130deg,
    rgba(var(--amber-rgb), 0.22) 160deg,
    transparent 180deg 210deg,
    rgba(var(--amber-rgb), 0.22) 230deg,
    rgba(var(--amber-rgb), 0.62) 260deg,
    rgba(var(--amber-rgb), 0.95) 285deg,
    rgba(var(--amber-rgb), 0.62) 310deg,
    rgba(var(--amber-rgb), 0.22) 340deg,
    transparent 360deg);
  filter: drop-shadow(0 0 4px rgba(var(--amber-rgb), 0.55))
          drop-shadow(0 0 10px rgba(var(--amber-rgb), 0.32));
}

/* ─── Streak color overrides — apply the rule:
   Cobalt-dominant content → peach streak
   Peach-dominant content  → cobalt streak (default for §3/wide-arc)
   ─── */

/* Voice cards (.vc) — titles inside are cobalt → peach streak */
.vc::after {
  background: conic-gradient(from var(--sa),
    transparent 0deg 240deg,
    rgba(var(--amber-rgb), 0.22) 254deg,
    rgba(var(--amber-rgb), 0.65) 278deg,
    rgba(var(--amber-rgb), 0.95) 302deg,
    rgba(var(--amber-rgb), 0.65) 326deg,
    rgba(var(--amber-rgb), 0.22) 350deg,
    transparent 360deg);
  filter: drop-shadow(0 0 4px rgba(var(--amber-rgb), 0.6))
          drop-shadow(0 0 12px rgba(var(--amber-rgb), 0.35));
}

/* Format cards — pills inside are cobalt → peach streak */
.format-card::after {
  background: conic-gradient(from var(--sa),
    transparent 0deg 240deg,
    rgba(var(--amber-rgb), 0.22) 254deg,
    rgba(var(--amber-rgb), 0.65) 278deg,
    rgba(var(--amber-rgb), 0.95) 302deg,
    rgba(var(--amber-rgb), 0.65) 326deg,
    rgba(var(--amber-rgb), 0.22) 350deg,
    transparent 360deg);
  filter: drop-shadow(0 0 4px rgba(var(--amber-rgb), 0.6))
          drop-shadow(0 0 12px rgba(var(--amber-rgb), 0.35));
}

/* How-table wrap — SEGMENT/THE WORK headers are cobalt → peach wide-arc */
.how-table-wrap::after {
  background: conic-gradient(from var(--sa),
    transparent 0deg 30deg,
    rgba(var(--amber-rgb), 0.22)  50deg,
    rgba(var(--amber-rgb), 0.62)  80deg,
    rgba(var(--amber-rgb), 0.95) 105deg,
    rgba(var(--amber-rgb), 0.62) 130deg,
    rgba(var(--amber-rgb), 0.22) 160deg,
    transparent 180deg 210deg,
    rgba(var(--amber-rgb), 0.22) 230deg,
    rgba(var(--amber-rgb), 0.62) 260deg,
    rgba(var(--amber-rgb), 0.95) 285deg,
    rgba(var(--amber-rgb), 0.62) 310deg,
    rgba(var(--amber-rgb), 0.22) 340deg,
    transparent 360deg);
  filter: drop-shadow(0 0 4px rgba(var(--amber-rgb), 0.55))
          drop-shadow(0 0 10px rgba(var(--amber-rgb), 0.32));
}

/* ─── ALL streaks → cobalt (override previous peach overrides) ─── */
.vc::after, .format-card::after {
  background: conic-gradient(from var(--sa),
    transparent 0deg 240deg,
    rgba(var(--peacock-rgb), 0.22) 254deg,
    rgba(var(--peacock-rgb), 0.65) 278deg,
    rgba(var(--peacock-rgb), 0.95) 302deg,
    rgba(var(--peacock-rgb), 0.65) 326deg,
    rgba(var(--peacock-rgb), 0.22) 350deg,
    transparent 360deg);
  filter: drop-shadow(0 0 4px rgba(var(--peacock-rgb), 0.6))
          drop-shadow(0 0 12px rgba(var(--peacock-rgb), 0.35));
}

.cs-arch::after, .how-table-wrap::after {
  background: conic-gradient(from var(--sa),
    transparent 0deg 30deg,
    rgba(var(--peacock-rgb), 0.22)  50deg,
    rgba(var(--peacock-rgb), 0.62)  80deg,
    rgba(var(--peacock-rgb), 0.95) 105deg,
    rgba(var(--peacock-rgb), 0.62) 130deg,
    rgba(var(--peacock-rgb), 0.22) 160deg,
    transparent 180deg 210deg,
    rgba(var(--peacock-rgb), 0.22) 230deg,
    rgba(var(--peacock-rgb), 0.62) 260deg,
    rgba(var(--peacock-rgb), 0.95) 285deg,
    rgba(var(--peacock-rgb), 0.62) 310deg,
    rgba(var(--peacock-rgb), 0.22) 340deg,
    transparent 360deg);
  filter: drop-shadow(0 0 4px rgba(var(--peacock-rgb), 0.55))
          drop-shadow(0 0 10px rgba(var(--peacock-rgb), 0.32));
}

/* ═══════════════════════════════════════════════════════════════════════
   STREAK DIRECTION ALTERNATION — visual rhythm
   – Stacked containers down the page alternate clockwise/CCW
   – Side-by-side cards in a grid alternate per sibling
   electricFlicker stays "normal" on every element (its tiny opacity
   twitches don't read directionally).
   ═══════════════════════════════════════════════════════════════════════ */

/* Stacked: cs-hero-stats (fwd) → cs-arch (rev) → how-table-wrap (fwd) */
.cs-arch::after {
  animation-direction: reverse, normal;
}

/* Grids: every other sibling rotates the opposite way */
.format-grid > .format-card:nth-child(even)::after,
.cs-audio-clips > .vc:nth-child(even)::after,
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(even)::after {
  animation-direction: reverse, normal;
}

/* ─── Screenshot tiles — uniform mid-grey, no alternation
   (alternating frames around images felt visually noisy with the screenshots
   already having their own bright pixels) ─── */
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(4n+1),
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(4n+2),
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(4n+3),
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(4n) {
  background: rgba(16, 16, 16, 0.55);
}

/* ─── Reduce card alternation to 2 colors (just dark + lighter grey).
   Removes the "middle" tints so adjacent cards alternate cleanly without
   one card visually popping out as a third tone.
   Tables keep the 4-tint variation since rows benefit from extra rhythm. ─── */

/* Format cards — 2-cycle (was 4) */
.format-grid > .format-card:nth-child(4n+1),
.format-grid > .format-card:nth-child(4n+3) { background: rgba(8, 8, 8, 0.55); }
.format-grid > .format-card:nth-child(4n+2),
.format-grid > .format-card:nth-child(4n)   { background: rgba(34, 34, 34, 0.55); }

/* Voice cards — 2-cycle (was 3) */
.cs-audio-clips > .vc:nth-child(odd)  { background: rgba(8, 8, 8, 0.55); }
.cs-audio-clips > .vc:nth-child(even) { background: rgba(34, 34, 34, 0.55); }

/* ─── CORRECTION: alternation should use dark grey + black only,
   not the lighter greys. Override the previous nth-child rules. ─── */

/* Format cards — 2-tone: black (8) + dark grey (14) */
.format-grid > .format-card:nth-child(4n+1),
.format-grid > .format-card:nth-child(4n+3) { background: rgba(8, 8, 8, 0.55) !important; }
.format-grid > .format-card:nth-child(4n+2),
.format-grid > .format-card:nth-child(4n)   { background: rgba(14, 14, 14, 0.55) !important; }

/* Voice cards — 2-tone: black + dark grey */
.cs-audio-clips > .vc:nth-child(odd)  { background: rgba(8, 8, 8, 0.55) !important; }
.cs-audio-clips > .vc:nth-child(even) { background: rgba(14, 14, 14, 0.55) !important; }

/* ─── 2-tone (black + dark grey) alternation extended to: ─── */

/* Screenshot tiles — was uniform, now alternates per tile */
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(odd)  { background: rgba(8, 8, 8, 0.55) !important; }
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(even) { background: rgba(14, 14, 14, 0.55) !important; }

/* Stats bar — container transparent, cells alternate */
.cs-hero-stats { background: transparent !important; }
.cs-hero-stats > div:nth-child(odd)  { background: rgba(8, 8, 8, 0.55); }
.cs-hero-stats > div:nth-child(even) { background: rgba(14, 14, 14, 0.55); }

/* Architecture nodes — label is child #1, nodes start at #2.
   Within each column, nodes alternate: black/dark/black/etc. */
.cs-arch-col > .cs-arch-node:nth-child(2),
.cs-arch-col > .cs-arch-node:nth-child(4) { background: rgba(8, 8, 8, 0.55) !important; }
.cs-arch-col > .cs-arch-node:nth-child(3) { background: rgba(14, 14, 14, 0.55) !important; }

/* ─── Arch nodes — uniform black (override prior alternation) ─── */
.cs-arch-col > .cs-arch-node:nth-child(2),
.cs-arch-col > .cs-arch-node:nth-child(3),
.cs-arch-col > .cs-arch-node:nth-child(4) {
  background: rgba(8, 8, 8, 0.55) !important;
}

/* ─── Horizontal-row alternation flipped: dark grey (14) FIRST, black (8) SECOND.
   Applies to all card rows that read left-to-right. ─── */

/* Stats cells */
.cs-hero-stats > div:nth-child(odd)  { background: rgba(14, 14, 14, 0.55) !important; }
.cs-hero-stats > div:nth-child(even) { background: rgba(8, 8, 8, 0.55) !important; }

/* Voice cards */
.cs-audio-clips > .vc:nth-child(odd)  { background: rgba(14, 14, 14, 0.55) !important; }
.cs-audio-clips > .vc:nth-child(even) { background: rgba(8, 8, 8, 0.55) !important; }

/* Format cards (7 in a row) */
.format-grid > .format-card:nth-child(4n+1),
.format-grid > .format-card:nth-child(4n+3) { background: rgba(14, 14, 14, 0.55) !important; }
.format-grid > .format-card:nth-child(4n+2),
.format-grid > .format-card:nth-child(4n)   { background: rgba(8, 8, 8, 0.55) !important; }

/* Screenshot tiles (horizontal grid) */
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(odd)  { background: rgba(14, 14, 14, 0.55) !important; }
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(even) { background: rgba(8, 8, 8, 0.55) !important; }

/* ─── Horizontal alternation REVERSED — black FIRST, dark grey SECOND ─── */
.cs-hero-stats > div:nth-child(odd)  { background: rgba(8, 8, 8, 0.55) !important; }
.cs-hero-stats > div:nth-child(even) { background: rgba(14, 14, 14, 0.55) !important; }

.cs-audio-clips > .vc:nth-child(odd)  { background: rgba(8, 8, 8, 0.55) !important; }
.cs-audio-clips > .vc:nth-child(even) { background: rgba(14, 14, 14, 0.55) !important; }

.format-grid > .format-card:nth-child(4n+1),
.format-grid > .format-card:nth-child(4n+3) { background: rgba(8, 8, 8, 0.55) !important; }
.format-grid > .format-card:nth-child(4n+2),
.format-grid > .format-card:nth-child(4n)   { background: rgba(14, 14, 14, 0.55) !important; }

.cs-gallery-grid > .cs-screenshot-wrap:nth-child(odd)  { background: rgba(8, 8, 8, 0.55) !important; }
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(even) { background: rgba(14, 14, 14, 0.55) !important; }

/* ─── Architecture: outer black, inner nodes dark grey ─── */
.cs-arch-col > .cs-arch-node:nth-child(2),
.cs-arch-col > .cs-arch-node:nth-child(3),
.cs-arch-col > .cs-arch-node:nth-child(4) {
  background: rgba(14, 14, 14, 0.55) !important;
}

/* ─── Hover color-flip system: peach default → cobalt on hover ─── */

/* Screenshot tag pill — flips to cobalt when its tile is hovered */
.cs-screenshot-caption .tag { transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease; }
.cs-screenshot-wrap:hover .cs-screenshot-caption .tag {
  color: var(--peacock-bright);
  background: rgba(var(--peacock-rgb), 0.10);
  border-color: rgba(var(--peacock-rgb), 0.32);
}

/* Stats numbers — flip to cobalt when their stat cell is hovered */
.cs-stat-num { transition: color 0.2s ease; }
.cs-hero-stats > div:hover .cs-stat-num { color: var(--amber); }

/* ─── Sawtooth streak phase — adjacent horizontal cards offset by half-cycle
   so streaks read as a zig-zag rather than a marching wave. Combines with
   the existing direction-reverse on even children for added contrast. ─── */
.format-grid > .format-card:nth-child(odd)::after,
.cs-audio-clips > .vc:nth-child(odd)::after,
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(odd)::after {
  animation-delay: 0s, 0s !important;
}
.format-grid > .format-card:nth-child(even)::after,
.cs-audio-clips > .vc:nth-child(even)::after,
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(even)::after {
  animation-delay: -7.5s, -3s !important;
}

/* ─── Streak intensity reduced ~15% ─── */
.vc::after, .format-card::after, .cs-screenshot-wrap::after,
.cs-arch-node::after, .cs-clip::after {
  background: conic-gradient(from var(--sa),
    transparent 0deg 240deg,
    rgba(var(--peacock-rgb), 0.18) 254deg,
    rgba(var(--peacock-rgb), 0.52) 278deg,
    rgba(var(--peacock-rgb), 0.78) 302deg,
    rgba(var(--peacock-rgb), 0.52) 326deg,
    rgba(var(--peacock-rgb), 0.18) 350deg,
    transparent 360deg);
  filter: drop-shadow(0 0 3px rgba(var(--peacock-rgb), 0.45))
          drop-shadow(0 0 10px rgba(var(--peacock-rgb), 0.26));
}

.cs-arch::after, .cs-hero-stats::after, .how-table-wrap::after {
  background: conic-gradient(from var(--sa),
    transparent 0deg 30deg,
    rgba(var(--peacock-rgb), 0.18)  50deg,
    rgba(var(--peacock-rgb), 0.50)  80deg,
    rgba(var(--peacock-rgb), 0.78) 105deg,
    rgba(var(--peacock-rgb), 0.50) 130deg,
    rgba(var(--peacock-rgb), 0.18) 160deg,
    transparent 180deg 210deg,
    rgba(var(--peacock-rgb), 0.18) 230deg,
    rgba(var(--peacock-rgb), 0.50) 260deg,
    rgba(var(--peacock-rgb), 0.78) 285deg,
    rgba(var(--peacock-rgb), 0.50) 310deg,
    rgba(var(--peacock-rgb), 0.18) 340deg,
    transparent 360deg);
  filter: drop-shadow(0 0 3px rgba(var(--peacock-rgb), 0.42))
          drop-shadow(0 0 8px rgba(var(--peacock-rgb), 0.24));
}

/* ─── Revert sawtooth phase shift — restore 4-step delay stagger ─── */
.format-grid > .format-card:nth-child(odd)::after,
.cs-audio-clips > .vc:nth-child(odd)::after,
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(odd)::after {
  animation-delay: 0s, 0s !important;
}
.format-grid > .format-card:nth-child(4n+2)::after { animation-delay: -2.25s, -1s !important; }
.format-grid > .format-card:nth-child(4n+3)::after { animation-delay: -4.5s, -2s !important; }
.format-grid > .format-card:nth-child(4n)::after   { animation-delay: -6.75s, -3s !important; }
.cs-audio-clips > .vc:nth-child(2)::after { animation-delay: -3s, -1.5s !important; }
.cs-audio-clips > .vc:nth-child(3)::after { animation-delay: -6s, -3s !important; }
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(4n+2)::after { animation-delay: -2.25s, -1s !important; }
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(4n+3)::after { animation-delay: -4.5s, -2s !important; }
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(4n)::after   { animation-delay: -6.75s, -3s !important; }

/* ─── Sawtooth phase (180° offset) — voice cards + screenshot tiles only.
   Format cards keep the 4-step flowing stagger. ─── */
.cs-audio-clips > .vc:nth-child(odd)::after,
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(odd)::after {
  animation-delay: 0s, 0s !important;
}
.cs-audio-clips > .vc:nth-child(even)::after,
.cs-gallery-grid > .cs-screenshot-wrap:nth-child(even)::after {
  animation-delay: -7.5s, -3s !important;
}

/* ─── Streak color flips — sections whose headers are cobalt now get peach
   streaks (opposite-color rule):
     .cs-hero-stats   — numbers are cobalt → peach streak
     .how-table-wrap  — SEGMENT/THE WORK + first-col are cobalt → peach streak
     .vc              — Training Interview titles are cobalt → peach streak
   Other streaks (format cards, screenshot tiles, arch outer, arch nodes)
   stay on whatever color they currently use. ─── */

/* Wide-arc — stats + table */
.cs-hero-stats::after,
.how-table-wrap::after {
  background: conic-gradient(from var(--sa),
    transparent 0deg 30deg,
    rgba(var(--amber-rgb), 0.18)  50deg,
    rgba(var(--amber-rgb), 0.50)  80deg,
    rgba(var(--amber-rgb), 0.78) 105deg,
    rgba(var(--amber-rgb), 0.50) 130deg,
    rgba(var(--amber-rgb), 0.18) 160deg,
    transparent 180deg 210deg,
    rgba(var(--amber-rgb), 0.18) 230deg,
    rgba(var(--amber-rgb), 0.50) 260deg,
    rgba(var(--amber-rgb), 0.78) 285deg,
    rgba(var(--amber-rgb), 0.50) 310deg,
    rgba(var(--amber-rgb), 0.18) 340deg,
    transparent 360deg);
  filter: drop-shadow(0 0 3px rgba(var(--amber-rgb), 0.42))
          drop-shadow(0 0 8px rgba(var(--amber-rgb), 0.24));
}

/* Card snake — voice cards */
.vc::after {
  background: conic-gradient(from var(--sa),
    transparent 0deg 240deg,
    rgba(var(--amber-rgb), 0.18) 254deg,
    rgba(var(--amber-rgb), 0.52) 278deg,
    rgba(var(--amber-rgb), 0.78) 302deg,
    rgba(var(--amber-rgb), 0.52) 326deg,
    rgba(var(--amber-rgb), 0.18) 350deg,
    transparent 360deg);
  filter: drop-shadow(0 0 3px rgba(var(--amber-rgb), 0.45))
          drop-shadow(0 0 10px rgba(var(--amber-rgb), 0.26));
}

/* ─── Title-to-content spacing for sections WITHOUT a description paragraph.
   Brings them in line with description-having sections (where the <p> creates
   natural breathing room between h2 and content). ─── */
.cs-tech h2 + .cs-stack-list,
.cs-gallery h2 + .cs-gallery-grid {
  margin-top: 24px;
}

/* ─── Canva-style "lift" text effect ~50% — soft drop shadow under headers
   for a subtle 3D raised feel. Applied to all heading types and stats. ─── */
.cs-hero h1,
.cs-section h2,
.cs-gallery h2,
.cs-tech h2,
.cs-outcome h2,
.cs-arch-section h2,
.cs-audio h2,
.cs-stat-num {
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.30));
}

/* ─── Coding-style "/" prefix — cobalt, +2px, lava-shine animation
   (matches the hero/h2 white-band drift). ─── */
.cs-hero h1::before, .cs-back-bar h1::before,
.cs-section h2::before,
.cs-gallery h2::before,
.cs-tech h2::before,
.cs-outcome h2::before,
.cs-arch-section h2::before,
.cs-audio h2::before {
  content: '/';
  font-size: calc(1em + 2px);
  font-weight: 700;
  margin-right: 0;
  background-color: var(--text-muted);
  background-image: linear-gradient(
    100deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0) 30%,
    rgba(255,255,255,0.32) 50%,
    rgba(255,255,255,0) 70%,
    rgba(255,255,255,0) 100%
  );
  background-size: 200% 100%;
  background-repeat: no-repeat;
  background-position: 50% 0%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: csTitleShine 20s ease-in-out infinite;
}
/* Footer titles — static grey slash, no animation. */
.cs-footer-cs-title::before {
  content: '/';
  color: var(--text-muted);
  -webkit-text-fill-color: var(--text-muted);
  font-size: calc(1em + 2px);
  font-weight: 700;
  margin-right: 0;
}
