/* ============================================================
   Northern Virginia Data Center Energy — v3
   style.css
   ============================================================ */

/* ─── Custom properties ─────────────────────────────────── */

:root {
  --blue:        #2563EB;
  --blue-light:  #93C5FD;
  --blue-dark:   #1E40AF;
  --slate:       #94A3B8;
  --slate-dark:  #475569;
  --navy:        #0D1B35;
  --navy-mid:    #0F2647;
  --amber:       #D97706;
  --amber-light: #FCD34D;
  --red:         #DC2626;
  --text:        #1a1a1a;
  --text-muted:  #64748B;
  --border:      #E2E8F0;
  --bg-light:    #F8FAFC;
}

/* ─── Reset ─────────────────────────────────────────────── */

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

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

body {
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  background: #ffffff;
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Typography ─────────────────────────────────────────── */

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  color: #111111;
}

p {
  margin-bottom: 1.4rem;
}

p:last-child {
  margin-bottom: 0;
}

/* ─── Layout ─────────────────────────────────────────────── */

.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--wide {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── Hero ───────────────────────────────────────────────── */

.hero {
  background-color: var(--navy);
  background-image:
    radial-gradient(rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  color: #ffffff;
  padding: 5rem 0 4rem;
  border-bottom: 3px solid var(--blue);
  position: relative;
}

.kicker {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-light);
  margin-bottom: 1.25rem;
}

.hero h1 {
  color: #ffffff;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  max-width: 760px;
}

.deck {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.72);
  max-width: 620px;
  margin-bottom: 1.25rem;
  font-weight: 400;
}

.dateline {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 0;
}

/* ─── Hero stat row ──────────────────────────────────────── */

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 2.25rem 0 0;
  margin-top: 2.75rem;
  border-top: 1px solid rgba(255,255,255,0.14);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  animation: fadeUp 0.7s ease-out both;
}

.stat:nth-child(1) { animation-delay: 0.15s; }
.stat:nth-child(2) { animation-delay: 0.32s; }
.stat:nth-child(3) { animation-delay: 0.50s; }

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

.stat-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.9rem, 4vw, 2.65rem);
  font-weight: 900;
  color: #60A5FA;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.52);
  line-height: 1.45;
}

/* ─── Story sections ─────────────────────────────────────── */

.story-section {
  padding: 3.75rem 0;
  border-top: 1px solid var(--border);
}

.story-section:first-of-type {
  border-top: none;
}

.story-section--chart {
  background: #ffffff;
}

.story-section h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  letter-spacing: -0.015em;
  margin-bottom: 1.5rem;
  color: #111;
}

.intro-lead {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a1a1a;
  font-style: italic;
  margin-bottom: 1.4rem;
}

/* ─── Blockquote ──────────────────────────────────────────── */

blockquote {
  border-left: 3px solid var(--blue);
  margin: 2.25rem 0;
  padding: 0.75rem 1.5rem;
  background: #F0F7FF;
  border-radius: 0 4px 4px 0;
}

blockquote p {
  font-style: italic;
  font-size: 1.05rem;
  color: #1e293b;
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

blockquote cite {
  display: block;
  font-size: 0.78rem;
  font-style: normal;
  color: var(--text-muted);
  font-family: 'Inter', system-ui, sans-serif;
  margin-top: 0.6rem;
}

/* ─── Callout ────────────────────────────────────────────── */

.callout {
  background: #F0F7FF;
  border-radius: 8px;
  padding: 1.75rem 2rem;
  margin: 2.25rem 0;
  border: 1px solid #DBEAFE;
}

.callout-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--blue-dark);
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.callout p {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.88rem;
  color: var(--slate-dark);
  margin-bottom: 0;
  line-height: 1.55;
}

/* ─── Chart wrapper ──────────────────────────────────────── */

.chart-wrap {
  margin: 2.5rem 0;
  position: relative;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.chart-header-text {
  flex: 1;
  min-width: 0;
}

.chart-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-dark);
  margin-bottom: 0.3rem;
}

.chart-note {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  color: #94A3B8;
  line-height: 1.4;
  margin-bottom: 0;
}

.chart-source {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.72rem;
  color: #94A3B8;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.chart-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.chart-container svg {
  display: block;
  max-width: 100%;
}

/* ─── Chart legend ───────────────────────────────────────── */

.chart-legend {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  color: var(--slate-dark);
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

.legend-item--dashed {
  gap: 0.5rem;
}

.legend-dash-line {
  width: 22px;
  height: 2px;
  flex-shrink: 0;
  background: repeating-linear-gradient(
    90deg,
    var(--slate-dark) 0,
    var(--slate-dark) 5px,
    transparent 5px,
    transparent 9px
  );
  opacity: 0.7;
}

/* ─── Scenario toggle ────────────────────────────────────── */

.scenario-toggle {
  display: flex;
  gap: 2px;
  background: #F1F5F9;
  border-radius: 7px;
  padding: 3px;
  flex-shrink: 0;
}

.toggle-btn {
  padding: 5px 13px;
  border: none;
  border-radius: 5px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  background: transparent;
  color: #94A3B8;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.toggle-btn:hover {
  color: var(--slate-dark);
}

.toggle-btn--active {
  background: #ffffff;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0,0,0,0.10);
}

/* ─── Methodology ────────────────────────────────────────── */

.methodology {
  background: var(--bg-light);
  padding: 3.5rem 0;
  border-top: 1px solid var(--border);
}

.methodology h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.methodology p,
.methodology li {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.83rem;
  color: var(--slate-dark);
  line-height: 1.68;
}

.methodology ul {
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
}

.methodology li {
  margin-bottom: 0.5rem;
}

/* ─── Footer ─────────────────────────────────────────────── */

footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-light);
}

footer p {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  color: #94A3B8;
  margin-bottom: 0;
}

/* ─── Responsive ─────────────────────────────────────────── */

@media (max-width: 660px) {
  html {
    font-size: 16px;
  }

  .hero {
    padding: 3.5rem 0 3rem;
  }

  .stat-row {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }

  .stat-row .stat:nth-child(3) {
    grid-column: span 2;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.12);
  }

  .deck {
    font-size: 0.95rem;
  }

  .chart-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  blockquote {
    padding: 0.75rem 1rem;
  }

  .callout {
    padding: 1.25rem 1.25rem;
  }
}

@media (max-width: 400px) {
  .stat-row {
    grid-template-columns: 1fr;
  }

  .stat-row .stat:nth-child(3) {
    grid-column: span 1;
  }
}
