/* ===================================================
   THE GREAT MIGRATION — Substack vs X Dashboard
   Noir editorial / data journalism aesthetic
   =================================================== */

/* ---------- CSS Variables ---------- */
:root {
  --bg: #0d0d0d;
  --bg-alt: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1c1c1c;
  --border: rgba(255,255,255,0.07);
  --border-light: rgba(255,255,255,0.12);

  --substack: #00e5c7;
  --substack-dim: rgba(0,229,199,0.15);
  --substack-glow: rgba(0,229,199,0.08);

  --x-red: #e84545;
  --x-dim: rgba(232,69,69,0.15);
  --x-glow: rgba(232,69,69,0.08);

  --threads: #f5a623;
  --threads-dim: rgba(245,166,35,0.15);
  --threads-glow: rgba(245,166,35,0.08);

  --text: #e8e8e8;
  --text-mid: #a0a0a0;
  --text-dim: #666;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --header-h: 64px;
  --radius: 4px;
  --radius-lg: 8px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

/* ---------- Grain Overlay ---------- */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ---------- Sticky Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--header-h);
  background: rgba(13,13,13,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s var(--ease);
}

.site-header.scrolled {
  box-shadow: 0 1px 24px rgba(0,0,0,0.6);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-logo {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  flex-shrink: 0;
}

.logo-substack { color: var(--substack); }
.logo-vs { color: var(--text-dim); margin: 0 4px; }
.logo-x { color: var(--x-red); }

.site-nav {
  display: flex;
  gap: 0;
  margin-left: auto;
}

.site-nav a {
  color: var(--text-mid);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  transition: color 0.2s;
  position: relative;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 1px;
  background: var(--substack);
  transform: scaleX(0);
  transition: transform 0.25s var(--ease);
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text);
  transition: all 0.25s;
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
}

a { color: var(--substack); text-decoration: none; }
a:hover { text-decoration: underline; }

.italic { font-style: italic; }
.accent-substack { color: var(--substack); }
.accent-x { color: var(--x-red); }

/* ---------- Hero Section ---------- */
.hero-section {
  min-height: 100vh;
  padding: calc(var(--header-h) + 80px) 24px 80px;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.hero-dateline {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 24px;
  border-left: 2px solid var(--substack);
  padding-left: 12px;
}

.hero-headline {
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.headline-line {
  display: block;
  animation: fadeSlideIn 0.9s var(--ease) both;
}

.headline-line:nth-child(2) {
  animation-delay: 0.12s;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.5vw, 1.375rem);
  color: var(--text-mid);
  font-weight: 300;
  margin-bottom: 48px;
  line-height: 1.5;
  animation: fadeSlideIn 0.9s var(--ease) 0.25s both;
}

.hero-stats-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 32px;
  margin-bottom: 40px;
  animation: fadeSlideIn 0.9s var(--ease) 0.35s both;
  position: relative;
  overflow: hidden;
}

.hero-stats-bar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--substack), transparent 50%, var(--x-red));
}

.stat-callout {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.substack-stat { align-items: flex-start; }
.x-stat { align-items: flex-end; }

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
}

.substack-stat .stat-number { color: var(--substack); }
.x-stat .stat-number { color: var(--x-red); }

.stat-number sup {
  font-size: 0.5em;
  vertical-align: super;
}

.stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-change {
  font-size: 0.75rem;
  font-weight: 400;
  margin-top: 4px;
}

.stat-change.up { color: var(--substack); }
.stat-change.down { color: var(--x-red); }

.stat-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 32px;
}

.divider-line {
  width: 1px;
  height: 32px;
  background: var(--border-light);
}

.divider-vs {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

.hero-body {
  font-size: 1.0625rem;
  color: var(--text-mid);
  line-height: 1.75;
  max-width: 720px;
  animation: fadeSlideIn 0.9s var(--ease) 0.45s both;
}

.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 48px;
  animation: fadeSlideIn 0.9s var(--ease) 0.6s both;
}

.scroll-hint-text {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 1px solid var(--text-dim);
  border-bottom: 1px solid var(--text-dim);
  transform: rotate(45deg);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(6px); }
}

/* ---------- Content Sections ---------- */
.content-section {
  padding: 100px 24px;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}

.alt-section {
  background: var(--bg-alt);
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.alt-section > * {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.alt-section .chart-grid,
.alt-section .metrics-grid,
.alt-section .exodus-grid,
.alt-section .big-stat-callout,
.alt-section .table-wrapper,
.alt-section .trust-bar-section,
.alt-section .advertisers-charts {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
  padding-left: 2px;
}

.section-headline {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.05;
}

.section-intro {
  font-size: 1.0625rem;
  color: var(--text-mid);
  max-width: 680px;
  line-height: 1.7;
  margin-bottom: 56px;
}

/* ---------- Chart Grid ---------- */
.chart-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}

.two-col {
  grid-template-columns: repeat(2, 1fr);
}

/* ---------- Chart Cards ---------- */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 28px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.chart-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}

.substack-card::before { background: var(--substack); }
.x-card::before { background: var(--x-red); }
.full-width-card { margin-bottom: 0; }
.full-width-card::before { background: linear-gradient(to right, var(--substack), var(--x-red)); }

.chart-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 4px 32px rgba(0,0,0,0.4);
}

.chart-card-header {
  margin-bottom: 20px;
}

.platform-badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  margin-bottom: 10px;
}

.substack-badge {
  background: var(--substack-dim);
  color: var(--substack);
  border: 1px solid rgba(0,229,199,0.3);
}

.x-badge {
  background: var(--x-dim);
  color: var(--x-red);
  border: 1px solid rgba(232,69,69,0.3);
}

.neutral-badge {
  background: rgba(255,255,255,0.05);
  color: var(--text-mid);
  border: 1px solid var(--border);
}

.chart-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.chart-note {
  font-size: 0.8125rem;
  color: var(--text-dim);
  font-style: italic;
}

.chart-wrapper {
  position: relative;
  height: 240px;
}

.chart-wrapper-tall {
  height: 300px;
}

.chart-source {
  font-size: 0.6875rem;
  color: var(--text-dim);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.chart-source a {
  color: var(--text-dim);
  text-decoration: underline;
}

.chart-source a:hover {
  color: var(--substack);
}

/* ---------- Big Stat Callout ---------- */
.big-stat-callout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 24px;
}

.big-stat-item {
  padding: 36px 28px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.2s;
}

.big-stat-item:hover { background: var(--bg-card-hover); }

.big-stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1;
}

.x-big-stat .big-stat-num { color: var(--x-red); }
.substack-big-stat .big-stat-num { color: var(--substack); }

.big-stat-desc {
  font-size: 0.875rem;
  color: var(--text-mid);
  line-height: 1.4;
}

/* ---------- Metrics Grid ---------- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
  opacity: 0;
  transform: translateY(20px);
}

.metric-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), box-shadow 0.25s;
}

.x-metric::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--x-red);
}

.substack-metric::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--substack);
}

.metric-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.metric-icon {
  font-size: 1.125rem;
}

.x-metric .metric-icon { color: var(--x-red); }
.substack-metric .metric-icon { color: var(--substack); }

.metric-value {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 900;
  line-height: 1;
}

.x-metric .metric-value { color: var(--x-red); }
.substack-metric .metric-value { color: var(--substack); }

.metric-label {
  font-size: 0.8125rem;
  color: var(--text-mid);
  line-height: 1.4;
}

.metric-source {
  font-size: 0.6875rem;
  color: var(--text-dim);
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.subsection-headline {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-mid);
}

.trust-bar-section { margin-top: 0; }

/* ---------- Exodus Section ---------- */
.exodus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.exodus-col-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.exodus-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.exodus-item {
  padding: 16px 0 16px 20px;
  border-left: 1px solid var(--border);
  position: relative;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.exodus-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.exodus-item::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 20px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-light);
}

.exodus-date {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.exodus-entity {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.exodus-detail {
  font-size: 0.8125rem;
  color: var(--text-mid);
  line-height: 1.45;
}

.exodus-cards-small {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.person-card {
  padding: 12px 16px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), background 0.2s;
}

.person-card.visible {
  opacity: 1;
  transform: translateX(0);
}

.substack-person {
  background: var(--substack-glow);
  border: 1px solid rgba(0,229,199,0.15);
}

.substack-person:hover {
  background: var(--substack-dim);
}

.x-person {
  background: var(--x-glow);
  border: 1px solid rgba(232,69,69,0.15);
}

.x-person:hover {
  background: var(--x-dim);
}

.person-name {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
}

.substack-person .person-name { color: var(--substack); }
.x-person .person-name { color: var(--x-red); }

.person-detail {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.exodus-divider {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 12px 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  margin-bottom: 8px;
}

/* ---------- Quotes Section ---------- */
.quotes-section {
  text-align: center;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.quotes-section .section-label,
.quotes-section .section-headline,
.quotes-section .section-intro {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.quotes-section .section-intro {
  margin-bottom: 48px;
}

.quotes-carousel {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quote-card {
  position: absolute;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  text-align: left;
}

.quote-card.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}

.quote-mark {
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 0.5;
  color: var(--substack);
  opacity: 0.4;
  font-weight: 900;
}

.quote-text {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.45;
  color: var(--text);
}

.quote-attribution {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.quote-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
}

.quote-title {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.quote-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
}

.quote-nav-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-mid);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.quote-nav-btn:hover {
  border-color: var(--substack);
  color: var(--substack);
  background: var(--substack-glow);
}

.quote-dots {
  display: flex;
  gap: 8px;
}

.quote-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-light);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.quote-dot.active {
  background: var(--substack);
  transform: scale(1.4);
}

/* ---------- Comparison Table ---------- */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  background: var(--bg-card);
}

.comparison-table thead {
  background: var(--bg);
}

.comparison-table th {
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table-metric-col { color: var(--text-dim); width: 30%; }
.table-substack-col { color: var(--substack); width: 35%; }
.table-x-col { color: var(--x-red); width: 35%; }

.table-row td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.4;
}

.table-row:last-child td {
  border-bottom: none;
}

.table-row:hover td {
  background: rgba(255,255,255,0.02);
}

.metric-name {
  color: var(--text-mid);
  font-size: 0.875rem;
  font-weight: 400;
}

.substack-cell { border-left: 2px solid var(--substack-dim); }
.x-cell { border-left: 2px solid var(--x-dim); }

.cell-positive { color: var(--substack); }
.cell-negative { color: var(--x-red); }
.cell-neutral { color: var(--text-dim); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  margin-top: 0;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px 48px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
}

.footer-headline {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-text {
  font-size: 1rem;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 520px;
}

.footer-sources-title {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.footer-sources-text {
  font-size: 0.8125rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.footer-sources-text a {
  color: var(--text-dim);
  text-decoration: underline;
}

.footer-sources-text a:hover {
  color: var(--substack);
}

.footer-updated {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 16px;
  font-style: italic;
}

.footer-bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ---------- Animate-in Base ---------- */
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Threads Color ---------- */
.threads-badge {
  background: var(--threads-dim);
  color: var(--threads);
  border: 1px solid rgba(245,166,35,0.3);
}

.threads-big-stat .big-stat-num { color: var(--threads); }

/* ---------- Brand Cards Grid ---------- */
.brand-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.brand-spend-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--x-red);
  background: var(--x-glow);
  border: 1px solid rgba(232,69,69,0.2);
  padding: 2px 7px;
  border-radius: 2px;
  margin: 2px 0 4px;
}

.brand-cards-section { margin-top: 0; }

/* ---------- Section Sources Footer ---------- */
.section-sources {
  font-size: 0.6875rem;
  color: var(--text-dim);
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  line-height: 1.7;
}

.section-sources a {
  color: var(--text-dim);
  text-decoration: underline;
}

.section-sources a:hover {
  color: var(--substack);
}

/* ---------- Alt-section fixes for new sections ---------- */
.alt-section .brand-cards-grid,
.alt-section .brand-cards-section,
.alt-section .section-sources {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .exodus-grid { grid-template-columns: 1fr; gap: 48px; }
  .big-stat-callout { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .brand-cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
  .hero-stats-bar { flex-direction: column; gap: 28px; }
  .stat-callout { align-items: center; }
  .x-stat { align-items: center; }
  .stat-divider { flex-direction: row; }
  .divider-line { width: 32px; height: 1px; }
  .site-nav { display: none; flex-direction: column; position: absolute; top: var(--header-h); left: 0; right: 0; background: rgba(13,13,13,0.97); padding: 16px; border-bottom: 1px solid var(--border); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .site-nav a::after { display: none; }
  .nav-toggle { display: flex; }
  .quote-card { padding: 28px 24px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bar { flex-direction: column; gap: 4px; }
}

@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .hero-headline { font-size: 3rem; }
  .chart-wrapper { height: 200px; }
  .brand-cards-grid { grid-template-columns: 1fr; }
}
