/* ============================================================
   CASE STUDY COMPONENTS
   Layout and component styles for individual case-study pages.
   Pairs with design-system.css (load that first).
   ============================================================ */


/* ─── CASE STUDY HERO ───────────────────────────────────────── */
.cs-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  padding: 140px 48px 60px;
  overflow: hidden;
}
.cs-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 75% at 78% 38%, rgba(200,169,110,0.055) 0%, transparent 65%),
    radial-gradient(ellipse 35% 40% at 18% 72%, rgba(200,169,110,0.025) 0%, transparent 50%),
    var(--void);
  z-index: 0;
}
html[data-theme="light"] .cs-hero-bg {
  background:
    radial-gradient(ellipse 55% 75% at 78% 38%, rgba(200,169,110,0.12) 0%, transparent 65%),
    radial-gradient(ellipse 35% 40% at 18% 72%, rgba(151,84,84,0.06) 0%, transparent 50%),
    #ffffff;
}

.cs-hero-geo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.cs-hero-geo .geo-outer {
  position: absolute;
  width: 640px; height: 640px;
  top: 50%; left: 78%;
  animation: slowSpin 90s linear infinite;
  opacity: 0.05;
}
.cs-hero-geo .geo-inner {
  position: absolute;
  width: 400px; height: 400px;
  top: 50%; left: 78%;
  animation: slowSpinReverse 55s linear infinite;
  opacity: 0.045;
}

.cs-hero-wrap {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: end;
}

.cs-hero-back {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  transition: color 0.3s;
}
.cs-hero-back::before {
  content: '';
  width: 24px; height: 1px; background: var(--gold);
  display: block;
  transition: width 0.3s;
}
.cs-hero-back:hover { color: var(--gold); }
.cs-hero-back:hover::before { width: 36px; }

.cs-hero-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
  display: block;
}

.cs-hero-title {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--white);
  background: linear-gradient(135deg, var(--white) 0%, var(--gold-bright) 48%, var(--white) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 18px;
}
html[data-theme="light"] .cs-hero-title {
  background: linear-gradient(135deg, #351818 0%, var(--gold-bright) 45%, #975454 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cs-hero-title em {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.7em;
  background: none;
  -webkit-text-fill-color: var(--gold);
  color: var(--gold);
  display: block;
  letter-spacing: 0;
}

.cs-hero-subtitle {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: clamp(1rem, 1.45vw, 1.2rem);
  color: var(--muted);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.cs-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Project meta strip — right column on desktop, stacks on mobile */
.cs-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 28px;
  padding: 28px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}
.cs-meta-item { }
.cs-meta-item--full { grid-column: 1 / -1; }
.cs-meta-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.cs-meta-value {
  font-family: 'Oswald', sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--white);
  letter-spacing: 0.02em;
}
.cs-meta-value a {
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-dim);
  transition: border-color 0.3s, color 0.3s;
}
.cs-meta-value a:hover { color: var(--gold); border-color: var(--gold); }


/* ─── CASE STUDY SECTIONS ───────────────────────────────────── */
.cs-section { position: relative; }
.cs-section.alt { background: var(--deep); }

.cs-section-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 48px;
}
.cs-section-wrap.narrow { max-width: 820px; }
.cs-section-wrap.wide   { max-width: 1300px; }

/* Pull-quote band: min-height keeps it from clipping if content grows */
.cs-section-wrap:has(> .cs-quote) {
  min-height: 428px;
}

.cs-section-num {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  display: block;
}

.cs-section-heading {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 22px;
}
.cs-section-heading em {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-style: italic;
  color: var(--gold);
  letter-spacing: 0;
}

.cs-section-intro {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  color: var(--muted);
  max-width: 640px;
  line-height: 1.75;
  margin-bottom: 44px;
}


/* ─── PROSE ─────────────────────────────────────────────────── */
.cs-prose {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--white);
  max-width: 700px;
}
.cs-prose p { margin-bottom: 1.4em; opacity: 0.86; }
.cs-prose strong { color: var(--gold); font-weight: 600; }
.cs-prose a {
  color: var(--gold);
  border-bottom: 1px solid var(--gold-dim);
  transition: border-color 0.3s;
}
.cs-prose a:hover { border-color: var(--gold); }
.cs-prose h3 {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 2.2em 0 1em;
}

/* Drop-cap on first paragraph of any .cs-prose.lead */
.cs-prose.lead > p:first-child::first-letter {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 3.4em;
  line-height: 0.9;
  float: left;
  margin: 0.08em 0.14em 0 0;
  color: var(--gold);
}


/* ─── CALLOUT / QUOTE ───────────────────────────────────────── */
.cs-callout {
  border-left: 2px solid var(--gold);
  padding: 22px 26px;
  background: var(--glass);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2.4em 0;
  max-width: 700px;
}
.cs-callout-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.cs-callout-text {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--white);
}

.cs-quote {
  font-family: 'Cinzel', serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.35;
  color: var(--white);
  text-align: center;
  max-width: 820px;
  margin: 50px auto;
  position: relative;
  padding: 0 32px;
}
.cs-quote::before, .cs-quote::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin: 24px auto;
  opacity: 0.7;
}


/* ─── FIGURES ───────────────────────────────────────────────── */
.cs-figure {
  margin: 56px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
}
.cs-figure img {
  width: 100%;
  height: auto;
  display: block;
}
.cs-figure-caption {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  background: var(--deep);
}

.cs-figure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 56px 0;
}
.cs-figure-grid .cs-figure { margin: 0; }


/* ─── PROCESS STEPS ─────────────────────────────────────────── */
.cs-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  margin-top: 32px;
}
.cs-step {
  padding: 36px 30px;
  border-right: 1px solid var(--border);
  position: relative;
  transition: background 0.3s;
}
.cs-step:last-child { border-right: none; }
.cs-step:hover { background: var(--panel); }
html[data-theme="light"] .cs-step:hover { background: var(--deep); }

.cs-step-num {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.cs-step-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 12px;
}
.cs-step-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--muted);
}


/* ─── OUTCOMES / METRICS STRIP ──────────────────────────────── */
.cs-outcomes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  backdrop-filter: blur(8px);
  margin-top: 32px;
}
.cs-outcome {
  padding: 32px 26px;
  border-right: 1px solid var(--border);
  text-align: left;
}
.cs-outcome:last-child { border-right: none; }
.cs-outcome-num {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.cs-outcome-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}


/* ─── TAGS / CHIPS ──────────────────────────────────────────── */
.cs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.cs-chip {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  background: var(--glass);
}


/* ─── OUTCOMES CAPTION ──────────────────────────────────────── */
/* Centered note that follows a metrics strip */
.cs-outcomes + .cs-figure-caption {
  margin-top: 1.5rem;
  text-align: center;
}


/* ─── PEER NAV (NEXT CASE STUDY) ────────────────────────────── */
.cs-peer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}
.cs-peer-card {
  display: block;
  padding: 36px 32px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  text-decoration: none;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.cs-peer-card:hover {
  background: var(--panel);
  border-color: var(--gold-dim);
  transform: translateY(-3px);
}
.cs-peer-card--right { text-align: right; }
html[data-theme="light"] .cs-peer-card:hover { background: var(--deep); }
.cs-peer-dir {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.cs-peer-title {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 8px;
}
.cs-peer-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}


/* ─── CONTACT CTA ───────────────────────────────────────────── */
.cs-cta {
  text-align: center;
  padding: 80px 48px;
  background: var(--deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cs-cta-title {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 12px;
}
.cs-cta-title em {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}
.cs-cta-sub {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.7;
}


/* ─── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cs-hero { padding: 120px 28px 48px; }
  .cs-hero-wrap { grid-template-columns: 1fr; gap: 36px; }
  .cs-hero-geo .geo-outer { width: 480px; height: 480px; left: 70%; opacity: 0.04; }
  .cs-hero-geo .geo-inner { width: 300px; height: 300px; left: 70%; opacity: 0.035; }
  .cs-section-wrap { padding: 80px 28px; }
  .cs-figure-grid { grid-template-columns: 1fr; gap: 16px; }
  .cs-peer { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .cs-hero { padding: 110px 20px 40px; min-height: 56vh; }
  .cs-hero-geo .geo-outer,
  .cs-hero-geo .geo-inner { opacity: 0.025; left: 50%; }
  .cs-section-wrap { padding: 64px 20px; }
  .cs-meta { grid-template-columns: 1fr; padding: 22px; }
  .cs-steps { grid-template-columns: 1fr; }
  .cs-step { border-right: none; border-bottom: 1px solid var(--border); }
  .cs-step:last-child { border-bottom: none; }
  .cs-outcomes { grid-template-columns: 1fr 1fr; }
  .cs-outcome { border-bottom: 1px solid var(--border); }
  .cs-cta { padding: 60px 20px; }
  .cs-figure { margin: 36px 0; }
}


/* ============================================================
   HEWMEN CASE STUDY — PAGE-SPECIFIC STYLES
   ============================================================ */


/* ── Hero ─────────────────────────────────────────────────── */
.case-hero {
  min-height: 75vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 100px max(48px, calc(50% - 600px)) 72px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 80% at 75% 35%, rgba(200,169,110,0.06) 0%, transparent 65%),
    radial-gradient(ellipse 30% 40% at 20% 75%, rgba(200,169,110,0.025) 0%, transparent 50%),
    var(--void);
}

.case-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, var(--void) 0%, transparent 50%),
    linear-gradient(to top, var(--void) 0%, transparent 35%);
  pointer-events: none;
  z-index: 1;
}

.case-hero-float {
  position: absolute;
  right: max(48px, calc(50% - 600px));
  top: 50%;
  transform: translateY(-50%);
  width: 810px;
  max-width: min(810px, 85vw);
  opacity: 0.75;
  pointer-events: none;
  filter: saturate(1.4);
  border-radius: 0;
  z-index: 0;
}

@media (max-width: 900px) {
  .case-hero-float { display: none; }
}

.hero-geo {
  position: absolute;
  top: 50%;
  left: 78%;
  transform: translate(-50%, -50%);
  width: 640px;
  height: 640px;
  opacity: 0.05;
  pointer-events: none;
  animation: slowSpin 80s linear infinite;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.2s forwards;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, var(--white) 0%, var(--gold-bright) 48%, var(--white) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease) 0.4s forwards;
}

.hero-subtitle {
  font-family: 'Oswald', sans-serif;
  font-weight: 200;
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  display: block;
  background: none;
  -webkit-text-fill-color: var(--gold);
  color: var(--gold);
  letter-spacing: 0.01em;
  margin-top: 4px;
}

.hero-desc {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  color: var(--muted);
  max-width: 540px;
  line-height: 1.78;
  margin-top: 24px;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease) 0.64s forwards;
}

.hero-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.84s forwards;
}

.hero-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--glass-border);
  padding: 7px 16px;
  border-radius: 40px;
}


/* ── Stat Bar ─────────────────────────────────────────────── */
.stat-bar {
  background: var(--deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-item { text-align: center; }

.stat-num {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 2.2rem;
  color: var(--gold);
  line-height: 1;
  display: block;
}

.stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
  display: block;
}


/* ── Overview ─────────────────────────────────────────────── */
#overview { background: var(--deep); }

.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.overview-cell {
  background: var(--surface);
  padding: 40px 36px;
  position: relative;
  overflow: hidden;
  transition: background 0.4s;
}

.overview-cell::before {
  content: attr(data-num);
  position: absolute;
  top: 8px;
  right: 18px;
  font-family: 'Cinzel', serif;
  font-size: 76px;
  font-weight: 900;
  color: var(--faint);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.overview-cell:hover { background: var(--panel); }
html[data-theme="light"] .overview-cell:hover { background: var(--deep); }

.overview-cell h3 {
  font-family: 'Cinzel', serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.overview-cell p {
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--muted);
  position: relative;
  z-index: 1;
}


/* ── Platform Anatomy ─────────────────────────────────────── */
#platform { background: var(--void); }

.platform-layers {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 48px;
}

.layer-row {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: stretch;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}

.layer-row:last-child { border-bottom: none; }
.layer-row:hover { background: var(--panel); }
html[data-theme="light"] .layer-row:hover { background: var(--deep); }

.layer-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s ease;
}

.layer-row:hover::before { transform: scaleY(1); }

.layer-label {
  padding: 28px 24px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.layer-name {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--white);
}

.layer-type {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.layer-content { padding: 28px 32px; }
.layer-content p { font-size: 0.82rem; line-height: 1.85; color: var(--muted); }
.layer-content p + p { margin-top: 8px; font-size: 0.75rem; }

.layer-meta {
  padding: 28px 24px;
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
}

.layer-tech {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 2px;
  white-space: nowrap;
  text-align: center;
}


/* ── Stack Map ─────────────────────────────────────────────── */
.stack-map {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background-clip: padding-box;
}

.stack-col { background: var(--surface); padding: 28px 24px; }
.stack-col:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.stack-col:last-child  { border-radius: 0 var(--radius) var(--radius) 0; }

.stack-col-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.stack-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.stack-col ul li {
  font-size: 0.78rem;
  line-height: 1.72;
  color: var(--muted);
  padding-left: 14px;
  position: relative;
}

.stack-col ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--rust);
  font-size: 0.6rem;
}


/* ── Design Challenges ────────────────────────────────────── */
#challenge { background: var(--deep); }

.challenge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 32px;
}

.challenge-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 28px 26px;
  position: relative;
  overflow: hidden;
}

.challenge-card.primary {
  border-top: 3px solid var(--rust);
  grid-column: 1 / -1;
}

.challenge-card.solution { border-top: 3px solid var(--teal); }

.cc-num {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.5;
  margin-bottom: 6px;
}

.cc-title {
  font-family: 'Cinzel', serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-bottom: 10px;
}

.cc-body { font-size: 0.8rem; line-height: 1.85; color: var(--muted); }

.insight-row {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

.insight-col h4 {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.insight-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.insight-col ul li {
  font-size: 0.75rem;
  line-height: 1.78;
  color: var(--muted);
  padding-left: 12px;
  position: relative;
}

.insight-col ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--rust);
  font-size: 0.6rem;
}


/* ── Vocabulary Bridge ────────────────────────────────────── */
#vocabulary { background: var(--void); }

.vocab-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.vocab-table thead tr { background: var(--panel); }

.vocab-table thead th {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 16px 24px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.vocab-table tbody tr { background: var(--surface); transition: background 0.3s; }
.vocab-table tbody tr:hover { background: var(--panel); }
html[data-theme="light"] .vocab-table tbody tr:hover { background: var(--deep); }
.vocab-table tbody tr:not(:last-child) td { border-bottom: 1px solid var(--border); }
.vocab-table tbody td { padding: 18px 24px; font-size: 0.82rem; line-height: 1.72; }

.vocab-table .col-what { color: var(--white); font-weight: 500; width: 22%; }
.vocab-table .col-then { color: var(--muted); width: 32%; }
.vocab-table .col-now  { color: var(--gold); width: 22%; font-family: 'DM Mono', monospace; font-size: 0.72rem; letter-spacing: 0.04em; }
.vocab-table .col-why  { color: var(--muted); font-style: italic; width: 24%; font-size: 0.75rem; }


/* ── Proof Callout ────────────────────────────────────────── */
#proof { background: var(--deep); }

.proof-block {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
  position: relative;
  overflow: hidden;
}

.proof-block::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  animation: slowSpin 35s linear infinite;
  opacity: 0.18;
  pointer-events: none;
}

.proof-left h2 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 16px;
}

.proof-left h2 em {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

.proof-left p {
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--muted);
  margin-bottom: 24px;
  font-style: italic;
}

.proof-facts { display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }

.proof-fact {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.proof-fact-icon {
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  margin-top: 2px;
}

.proof-fact-text { font-size: 0.8rem; line-height: 1.72; color: var(--muted); }
.proof-fact-text strong { color: var(--white); font-weight: 600; }


/* ── Brand Banner ─────────────────────────────────────────── */
#brand-banner {
  background: var(--void);
  padding: 64px 48px;
  border-bottom: 1px solid var(--border);
}

.brand-banner-wrap {
  max-width: 1240px;
  margin: 0 auto;
}

.brand-banner-figure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  position: relative;
}

.brand-banner-img {
  width: 100%;
  height: auto;
  display: block;
  background: #14182a;
}

.brand-banner-caption {
  display: grid;
  gap: 8px;
  padding: 24px 32px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}

.bb-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.bb-title {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  color: var(--white);
  line-height: 1.45;
}

.bb-sub {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.7;
}


/* ── Process Artifacts ────────────────────────────────────── */
#process { background: var(--deep); }

.process-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.process-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.3s;
}

.process-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
}

.process-img-wrap {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.process-img-wrap--dark { background: #14182a; }
.process-img-wrap--light { background: #f3f1e7; }

.process-img-wrap img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.process-card figcaption {
  padding: 22px 26px 26px;
  display: grid;
  gap: 8px;
}

.process-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.process-title {
  font-family: 'Cinzel', serif;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--white);
  margin: 0;
}

.process-body {
  font-size: 0.82rem;
  line-height: 1.78;
  color: var(--muted);
}


/* ── Information Architecture ─────────────────────────────── */
#ia { background: var(--void); }

.ia-frame {
  margin: 0 0 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 0;
}

.ia-frame:last-of-type { margin-bottom: 0; }

.ia-frame-img {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  border-right: 1px solid var(--border);
}

.ia-frame-img img {
  max-width: 100%;
  height: auto;
  display: block;
}

.ia-frame figcaption {
  padding: 32px 36px;
  display: grid;
  gap: 10px;
  align-content: center;
}

.ia-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.ia-title {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--white);
  margin: 0;
}

.ia-body {
  font-size: 0.84rem;
  line-height: 1.82;
  color: var(--muted);
}

.ia-body em {
  font-style: italic;
  color: var(--gold);
}


/* ── Surface Sections (Atom · Synapse · HEWMEN · Plans) ──── */
.surface-section { background: var(--deep); }
.surface-section + .surface-section { background: var(--void); }
#plans-reports { background: var(--deep); }

.surface-hero,
.surface-wide {
  margin: 0 0 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.surface-hero img,
.surface-wide img {
  width: 100%;
  height: auto;
  display: block;
  background: #14182a;
  border-bottom: 1px solid var(--border);
}

.surface-hero figcaption,
.surface-wide figcaption {
  padding: 18px 28px;
  font-size: 0.84rem;
  line-height: 1.78;
  color: var(--muted);
  background: var(--panel);
  display: grid;
  gap: 6px;
}

.surface-caption-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.surface-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.surface-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
}

.surface-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
}

.surface-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: top;
  display: block;
  background: #14182a;
  border-bottom: 1px solid var(--border);
}

.surface-card figcaption {
  padding: 18px 22px 22px;
  font-size: 0.8rem;
  line-height: 1.76;
  color: var(--muted);
  display: grid;
  gap: 6px;
  flex: 1;
}

.surface-card figcaption em,
.surface-hero figcaption em,
.surface-wide figcaption em {
  font-style: italic;
  color: var(--gold);
}


/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .case-hero { padding: 100px 28px 60px; }
  .stat-bar { grid-template-columns: repeat(2, 1fr); }
  .overview-grid { grid-template-columns: 1fr; }
  .layer-row { grid-template-columns: 1fr; }
  .layer-meta { display: none; }
  .stack-map { grid-template-columns: 1fr; }
  .stack-col:first-child { border-radius: var(--radius) var(--radius) 0 0; }
  .stack-col:last-child  { border-radius: 0 0 var(--radius) var(--radius); }
  .challenge-grid { grid-template-columns: 1fr; }
  .challenge-card.primary { grid-column: auto; }
  .insight-row { grid-template-columns: 1fr; }
  .proof-block { grid-template-columns: 1fr; gap: 40px; padding: 40px 32px; }

  .process-grid { grid-template-columns: 1fr; }
  .ia-frame { grid-template-columns: 1fr; }
  .ia-frame-img { border-right: none; border-bottom: 1px solid var(--border); }
  .surface-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .case-hero { padding: 90px 20px 48px; }
  .stat-bar { grid-template-columns: repeat(2, 1fr); padding: 24px 20px; }
  .vocab-table .col-why,
  .vocab-table .col-then { display: none; }

  #brand-banner { padding: 48px 20px; }
  .brand-banner-caption { padding: 20px; }
  .process-img-wrap { padding: 16px; }
  .ia-frame-img { padding: 20px; }
  .ia-frame figcaption { padding: 22px 22px 28px; }
  .surface-hero figcaption,
  .surface-wide figcaption { padding: 16px 20px; }
}
