/* =================================================================
   PARADIGM-THEATER.CSS
   Dedicated styles for paradigm.html (The Shift) scrollytelling.
   Three theaters: Degradation, Legibility Layers, Reactive vs Coherent.
   All Safari-compatible: -webkit- prefixes, no flex gap, explicit colors.
   ================================================================= */

/* ========== PARADIGM HERO ========== */

.paradigm-hero {
  background-color: #1a5c57;
  background: linear-gradient(135deg, #1a5c57 0%, #0f3d39 100%);
  color: white;
  padding: 6rem 2rem 4rem;
  text-align: center;
}

.paradigm-hero-content {
  max-width: 720px;
  margin: 0 auto;
}

.paradigm-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: white;
}

.paradigm-hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.7;
  color: rgba(255,255,255,0.88);
  margin: 0;
}

/* ========== PARADIGM CHAPTERS ========== */

.paradigm-chapter {
  padding: 4rem 0;
}

.paradigm-chapter .container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ========== 2D vs 3D POLES ========== */

.paradigm-poles {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  margin: 2.5rem 0;
}

.paradigm-poles > * + * {
  margin-left: 2rem;
}

.paradigm-pole {
  -webkit-flex: 1;
  flex: 1;
  padding: 2rem;
  border-radius: 12px;
}

.paradigm-pole h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.paradigm-pole .pole-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
}

.paradigm-pole-old {
  background: #f5f0e8;
  border-left: 4px solid #c9a96e;
}

.paradigm-pole-old h3 {
  color: #8a6914;
}

.paradigm-pole-new {
  background: #eef6f5;
  border-left: 4px solid #1a5c57;
}

.paradigm-pole-new h3 {
  color: #1a5c57;
}

@media (max-width: 700px) {
  .paradigm-poles {
    -webkit-flex-direction: column;
    flex-direction: column;
  }
  .paradigm-poles > * + * {
    margin-left: 0;
    margin-top: 1.5rem;
  }
}

/* ========== CTA BUTTONS ========== */

.paradigm-cta {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

.paradigm-cta > * + * {
  margin-left: 1rem;
}

@media (max-width: 500px) {
  .paradigm-cta {
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
  }
  .paradigm-cta > * + * {
    margin-left: 0;
    margin-top: 0.75rem;
  }
}


/* =================================================================
   DEGRADATION THEATER (Chapter 2)
   Inverse of index card theater. Card degrades as you scroll.
   ================================================================= */

.degrade-theater {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  position: relative;
}

.degrade-card-column {
  -webkit-flex: 0 0 340px;
  flex: 0 0 340px;
  position: -webkit-sticky;
  position: sticky;
  top: 100px;
  height: -webkit-fit-content;
  height: fit-content;
  z-index: 10;
}

.degrade-narrative-column {
  -webkit-flex: 1;
  flex: 1;
  padding-left: 3rem;
  min-height: 100vh;
}

/* The degrading card */
.degrade-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
  transition: all 0.6s ease;
}

.degrade-card.is-degrading-1 {
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.degrade-card.is-degrading-2 {
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  opacity: 0.92;
}

.degrade-card.is-degrading-3 {
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
  opacity: 0.82;
}

.degrade-card.is-degrading-4 {
  box-shadow: 0 0 4px rgba(0,0,0,0.06);
  opacity: 0.65;
  -webkit-filter: grayscale(0.3);
  filter: grayscale(0.3);
}

.degrade-card.is-degraded {
  box-shadow: none;
  opacity: 0.45;
  -webkit-filter: grayscale(0.6) blur(1px);
  filter: grayscale(0.6) blur(1px);
}

.degrade-card-header {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #eee;
}

.degrade-card-header > * + * {
  margin-left: 0.75rem;
}

.degrade-chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.5s ease;
  background: #e8f5e9;
  color: #2e7d32;
}

.degrade-chip.is-fading {
  background: #fff3e0;
  color: #e65100;
}

.degrade-chip.is-lost {
  background: #fce4ec;
  color: #c62828;
}

.degrade-chip.is-theater {
  background: #eeeeee;
  color: #757575;
}

.degrade-chip.is-gone {
  background: #e0e0e0;
  color: #9e9e9e;
  text-decoration: line-through;
}

.degrade-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
}

/* Degrading fields */
.degrade-field {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.5s ease;
}

.degrade-field .field-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 0.25rem;
}

.degrade-field .field-value {
  font-size: 0.9rem;
  color: #333;
  transition: all 0.5s ease;
}

.degrade-field.is-blurred .field-value {
  color: #aaa;
  font-style: italic;
}

.degrade-field.is-struck .field-value {
  text-decoration: line-through;
  color: #ccc;
}

.degrade-field.is-replaced .field-value {
  color: #c62828;
}

/* Overlay that visually degrades the card */
.degrade-overlay {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  pointer-events: none;
  transition: all 0.6s ease;
  border-radius: 12px;
}

.degrade-overlay.noise-1 {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 4px,
    rgba(0,0,0,0.015) 4px,
    rgba(0,0,0,0.015) 5px
  );
}

.degrade-overlay.noise-2 {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.03) 3px,
    rgba(0,0,0,0.03) 4px
  );
}

.degrade-overlay.noise-3 {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.05) 2px,
    rgba(0,0,0,0.05) 3px
  );
}

/* Degradation steps */
.degrade-step {
  min-height: 70vh;
  padding: 2rem 0;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: center;
  justify-content: center;
}

.degrade-step:first-child {
  padding-top: 4rem;
}

.degrade-step:last-child {
  min-height: 50vh;
}

.degrade-step-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  margin: 0 0 1rem;
}

.degrade-step p {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.88);
  margin: 0 0 1rem;
}

.degrade-step-num {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  background: rgba(255,255,255,0.15);
  color: white;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}


/* =================================================================
   LEGIBILITY THEATER (Chapter 4)
   Layers of visibility revealing through Aria's case.
   ================================================================= */

.legibility-theater {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  position: relative;
}

.legibility-visual-column {
  -webkit-flex: 0 0 320px;
  flex: 0 0 320px;
  position: -webkit-sticky;
  position: sticky;
  top: 100px;
  height: -webkit-fit-content;
  height: fit-content;
  z-index: 10;
}

.legibility-narrative-column {
  -webkit-flex: 1;
  flex: 1;
  padding-left: 3rem;
  min-height: 100vh;
}

/* The layer visual */
.legibility-visual {
  background: #1a3d3a;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.legibility-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1.25rem;
}

.legibility-layer {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: all 0.5s ease;
  opacity: 0.3;
  background: rgba(255,255,255,0.04);
}

.legibility-layer > * + * {
  margin-left: 0.75rem;
}

.legibility-layer.is-active {
  opacity: 1;
  background: rgba(255,255,255,0.1);
}

.legibility-layer.is-revealed {
  opacity: 1;
  background: rgba(212,168,83,0.15);
  border-left: 3px solid #d4a853;
}

.layer-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  line-height: 36px;
  text-align: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.5s ease;
}

.legibility-layer.is-active .layer-icon,
.legibility-layer.is-revealed .layer-icon {
  background: #d4a853;
  color: #1a3d3a;
}

.layer-text {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.layer-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  transition: color 0.5s ease;
}

.legibility-layer.is-active .layer-label,
.legibility-layer.is-revealed .layer-label {
  color: white;
}

.layer-desc {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  transition: color 0.5s ease;
}

.legibility-layer.is-active .layer-desc,
.legibility-layer.is-revealed .layer-desc {
  color: rgba(255,255,255,0.7);
}

/* Legibility meter */
.legibility-meter {
  margin-top: 1.25rem;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.legibility-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d4a853, #e8c878);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.legibility-meter-label {
  display: block;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-top: 0.5rem;
  transition: color 0.5s ease;
}

/* Legibility steps */
.legibility-step {
  min-height: 70vh;
  padding: 2rem 0;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: center;
  justify-content: center;
}

.legibility-step:first-child {
  padding-top: 4rem;
}

.legibility-step:last-child {
  min-height: 50vh;
}

.legibility-step h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  margin: 0 0 1rem;
}

.legibility-step p {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.88);
  margin: 0 0 1rem;
}


/* =================================================================
   GOVERN THEATER (Chapter 5)
   Reactive vs Coherent — Aria's distress signal.
   ================================================================= */

.govern-theater {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  position: relative;
}

.govern-visual-column {
  -webkit-flex: 0 0 340px;
  flex: 0 0 340px;
  position: -webkit-sticky;
  position: sticky;
  top: 100px;
  height: -webkit-fit-content;
  height: fit-content;
  z-index: 10;
}

.govern-narrative-column {
  -webkit-flex: 1;
  flex: 1;
  padding-left: 3rem;
  min-height: 100vh;
}

/* Signal bar */
.govern-visual {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.govern-signal-bar {
  margin-bottom: 1.5rem;
}

.govern-signal-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 0.5rem;
}

.govern-signal-level {
  height: 24px;
  background: #f0f0f0;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.govern-signal-fill {
  height: 100%;
  width: 12%;
  background: #ef5350;
  border-radius: 4px;
  transition: width 0.6s ease, background 0.6s ease;
}

.govern-signal-fill.is-warning {
  background: #ef5350;
}

.govern-signal-fill.is-calm {
  background: #66bb6a;
}

.govern-signal-pct {
  position: absolute;
  right: 8px;
  top: 50%;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  font-size: 0.75rem;
  font-weight: 700;
  color: #333;
}

.govern-signal-threshold {
  margin-top: 0.35rem;
}

.govern-threshold-mark {
  font-size: 0.7rem;
  color: #c62828;
  font-weight: 600;
}

/* Split view */
.govern-split {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  border-top: 1px solid #eee;
  padding-top: 1rem;
}

.govern-path {
  -webkit-flex: 1;
  flex: 1;
  padding: 1rem 0.75rem;
  text-align: center;
  border-radius: 8px;
  transition: all 0.5s ease;
}

.govern-path-divider {
  width: 1px;
  background: #eee;
  margin: 0 0.5rem;
}

.govern-path-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.govern-path-reactive .govern-path-label {
  color: #c62828;
}

.govern-path-coherent .govern-path-label {
  color: #1a5c57;
}

.govern-path-status {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #666;
  transition: all 0.5s ease;
}

.govern-path.is-active-reactive {
  background: #fce4ec;
}

.govern-path.is-active-coherent {
  background: #e8f5e9;
}

.govern-path.is-outcome-bad {
  background: #ffebee;
  border: 2px solid #ef5350;
}

.govern-path.is-outcome-good {
  background: #e8f5e9;
  border: 2px solid #66bb6a;
}

/* Govern steps */
.govern-step {
  min-height: 70vh;
  padding: 2rem 0;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: center;
  justify-content: center;
}

.govern-step:first-child {
  padding-top: 4rem;
}

.govern-step:last-child {
  min-height: 50vh;
}

.govern-step h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a2a2a;
  margin: 0 0 1rem;
}

.govern-step p {
  font-size: 1rem;
  line-height: 1.75;
  color: #444;
  margin: 0 0 1rem;
}

.govern-step-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.govern-step-badge.reactive {
  background: #fce4ec;
  color: #c62828;
}

.govern-step-badge.coherent {
  background: #e8f5e9;
  color: #2e7d32;
}


/* =================================================================
   AUDIENCE TRIO (Chapter 6)
   Three cards: Leaders, Builders, Communities.
   ================================================================= */

.audience-trio {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-justify-content: center;
  justify-content: center;
  margin: 0 -0.75rem;
}

.audience-card {
  -webkit-flex: 1 1 300px;
  flex: 1 1 300px;
  margin: 0.75rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.audience-card:hover {
  -webkit-transform: translateY(-4px);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.audience-card-header {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.audience-card-header > * + * {
  margin-left: 0.75rem;
}

.audience-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 800;
  color: #1a3d3a;
}

.audience-leaders .audience-icon {
  background: #d4a853;
}

.audience-builders .audience-icon {
  background: #81c784;
}

.audience-communities .audience-icon {
  background: #90caf9;
}

.audience-card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  margin: 0;
}

.audience-card-body {
  padding: 1.5rem;
}

.audience-card-body p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 0 1rem;
}

.audience-old {
  color: rgba(255,255,255,0.7);
}

.audience-new {
  color: rgba(255,255,255,0.9);
}

.audience-aria {
  color: #d4a853;
  font-style: italic;
  font-size: 0.85rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}


/* =================================================================
   RESPONSIVE — MOBILE STACKING
   ================================================================= */

@media (max-width: 800px) {
  /* All theaters stack vertically on mobile */
  .degrade-theater,
  .legibility-theater,
  .govern-theater {
    -webkit-flex-direction: column;
    flex-direction: column;
    padding: 0 1.5rem 3rem;
  }

  .degrade-card-column,
  .legibility-visual-column,
  .govern-visual-column {
    -webkit-flex: none;
    flex: none;
    position: relative;
    top: auto;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 2rem;
  }

  .degrade-narrative-column,
  .legibility-narrative-column,
  .govern-narrative-column {
    padding-left: 0;
    min-height: auto;
  }

  .degrade-step,
  .legibility-step,
  .govern-step {
    min-height: auto;
    padding: 1.5rem 0;
  }

  /* Audience cards stack */
  .audience-trio {
    -webkit-flex-direction: column;
    flex-direction: column;
    margin: 0;
  }

  .audience-card {
    margin: 0.5rem 0;
    -webkit-flex: none;
    flex: none;
  }
}


/* =================================================================
   SAFARI BULLETPROOF OVERRIDES
   Explicit colors, no CSS variables in critical paths.
   ================================================================= */

/* Dark sections: explicit backgrounds */
#ch-interface {
  background-color: #1a5c57 !important;
}

#ch-visible {
  background-color: #1a5c57 !important;
}

#ch-who-changes {
  background-color: #1a5c57 !important;
}

/* Ensure all text in dark sections is visible */
#ch-interface h2,
#ch-interface h3,
#ch-visible h2,
#ch-visible h3,
#ch-who-changes h2,
#ch-who-changes h3 {
  color: white !important;
}

#ch-interface p,
#ch-visible p {
  color: rgba(255,255,255,0.88) !important;
}

#ch-who-changes .audience-card-header h3 {
  color: white !important;
}

#ch-who-changes .audience-old {
  color: rgba(255,255,255,0.7) !important;
}

#ch-who-changes .audience-new {
  color: rgba(255,255,255,0.9) !important;
}

#ch-who-changes .audience-aria {
  color: #d4a853 !important;
}

#ch-who-changes .insight-box p {
  color: rgba(255,255,255,0.95) !important;
}

/* Footer text visibility on teal */
.footer h4,
.footer h5 {
  color: white !important;
}

.footer p,
.footer a,
.footer li {
  color: rgba(255,255,255,0.8) !important;
}

.footer a:hover {
  color: white !important;
}

.footer-bottom p {
  color: rgba(255,255,255,0.6) !important;
}
