/* ═══════════════════════════════════════════════════════════════
   STOPE Project — Shared Styles
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Brand Colors */
  --stope-black: #0a0a0a;
  --stope-dark: #141414;
  --stope-charcoal: #1e1e1e;
  --stope-gray-900: #252525;
  --stope-gray-800: #2d2d2d;
  --stope-gray-700: #3a3a3a;
  --stope-gray-600: #555;
  --stope-gray-500: #777;
  --stope-gray-400: #999;
  --stope-gray-300: #bbb;
  --stope-gray-200: #ddd;
  --stope-gray-100: #eee;
  --stope-white: #f5f5f5;

  --stope-gold: #d4a843;
  --stope-gold-light: #e8c96a;
  --stope-gold-dark: #a07e2e;
  --stope-amber: #f59e0b;
  --stope-copper: #c77d4a;
  --stope-rust: #b45309;

  --stope-blue: #3b82f6;
  --stope-blue-dark: #1e40af;
  --stope-cyan: #06b6d4;
  --stope-green: #22c55e;
  --stope-green-dark: #15803d;
  --stope-red: #ef4444;
  --stope-purple: #8b5cf6;

  /* Status Colors */
  --status-complete: #22c55e;
  --status-in-progress: #3b82f6;
  --status-planned: #8b5cf6;
  --status-parked: #6b7280;

  /* Gradients */
  --gradient-gold: linear-gradient(135deg, #d4a843 0%, #e8c96a 50%, #a07e2e 100%);
  --gradient-dark: linear-gradient(180deg, #141414 0%, #0a0a0a 100%);
  --gradient-card: linear-gradient(145deg, #1e1e1e 0%, #252525 100%);

  /* Typography */
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Borders */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(212,168,67,0.15);
}

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

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

body {
  font-family: var(--font-body);
  background: var(--stope-black);
  color: var(--stope-gray-200);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Navigation ───────────────────────────────────────────── */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--stope-gray-800);
  padding: 0 var(--space-xl);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
  color: var(--stope-gold);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 2px;
}

.nav-brand .brand-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-gold);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--stope-black);
  font-weight: 900;
}

.nav-brand .brand-logo {
  height: 28px;
  width: auto;
  color: var(--stope-white);
}

.nav-links {
  display: flex;
  gap: var(--space-xs);
  list-style: none;
}

.nav-links a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--stope-gray-400);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  letter-spacing: 0.3px;
}

.nav-links a:hover {
  color: var(--stope-white);
  background: var(--stope-gray-800);
}

.nav-links a.active {
  color: var(--stope-gold);
  background: rgba(212,168,67,0.1);
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--stope-gray-300);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ─── Hero Sections ────────────────────────────────────────── */
.hero {
  padding: calc(64px + var(--space-3xl)) var(--space-xl) var(--space-3xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(212,168,67,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(59,130,246,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--stope-white);
  margin-bottom: var(--space-md);
  letter-spacing: -1px;
  line-height: 1.1;
}

.hero h1 .gold { color: var(--stope-gold); }
.hero h1 .blue { color: var(--stope-blue); }

.hero .subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--stope-gray-400);
  max-width: 700px;
  margin: 0 auto var(--space-xl);
  line-height: 1.6;
}

.hero .meta {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.hero .meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--stope-gray-500);
}

.hero .meta-item strong {
  color: var(--stope-gold);
  font-weight: 600;
}

/* ─── Sections ─────────────────────────────────────────────── */
.section {
  padding: var(--space-3xl) var(--space-xl);
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--stope-white);
  margin-bottom: var(--space-sm);
}

.section-header p {
  color: var(--stope-gray-400);
  font-size: 1rem;
  max-width: 600px;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--gradient-gold);
  border: none;
  margin: var(--space-md) 0;
  border-radius: 2px;
}

/* ─── Cards ────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-lg);
}

.card-grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.card {
  background: var(--gradient-card);
  border: 1px solid var(--stope-gray-800);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--stope-gray-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-gold);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover::before { opacity: 1; }

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(212,168,67,0.1);
  border: 1px solid rgba(212,168,67,0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  font-size: 1.3rem;
  color: var(--stope-gold);
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--stope-white);
  margin-bottom: var(--space-sm);
}

.card p {
  color: var(--stope-gray-400);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ─── Status Badges ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-complete {
  background: rgba(34,197,94,0.12);
  color: var(--status-complete);
  border: 1px solid rgba(34,197,94,0.25);
}

.badge-in-progress {
  background: rgba(59,130,246,0.12);
  color: var(--status-in-progress);
  border: 1px solid rgba(59,130,246,0.25);
}

.badge-planned {
  background: rgba(139,92,246,0.12);
  color: var(--status-planned);
  border: 1px solid rgba(139,92,246,0.25);
}

.badge-parked {
  background: rgba(107,114,128,0.12);
  color: var(--status-parked);
  border: 1px solid rgba(107,114,128,0.25);
}

.badge-first-target {
  background: rgba(212,168,67,0.12);
  color: var(--stope-gold);
  border: 1px solid rgba(212,168,67,0.25);
}

.badge-poc-complete {
  background: rgba(6,182,212,0.12);
  color: var(--stope-cyan);
  border: 1px solid rgba(6,182,212,0.25);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ─── Progress Bars ────────────────────────────────────────── */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--stope-gray-800);
  border-radius: 3px;
  overflow: hidden;
  margin: var(--space-sm) 0;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease;
  background: var(--gradient-gold);
}

.progress-fill.green { background: linear-gradient(90deg, #15803d, #22c55e); }
.progress-fill.blue { background: linear-gradient(90deg, #1e40af, #3b82f6); }
.progress-fill.purple { background: linear-gradient(90deg, #6d28d9, #8b5cf6); }

/* ─── Tables ───────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table thead th {
  background: var(--stope-gray-900);
  color: var(--stope-gray-300);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  border-bottom: 1px solid var(--stope-gray-700);
  position: sticky;
  top: 64px;
  z-index: 10;
}

.data-table tbody td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--stope-gray-800);
  vertical-align: top;
}

.data-table tbody tr {
  transition: background 0.15s;
}

.data-table tbody tr:hover {
  background: rgba(212,168,67,0.04);
}

/* ─── Expandable / Accordion ───────────────────────────────── */
.accordion {
  border: 1px solid var(--stope-gray-800);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  background: var(--stope-charcoal);
  cursor: pointer;
  transition: background 0.2s;
  user-select: none;
}

.accordion-header:hover {
  background: var(--stope-gray-800);
}

.accordion-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--stope-white);
}

.accordion-chevron {
  width: 20px;
  height: 20px;
  color: var(--stope-gray-500);
  transition: transform 0.3s;
}

.accordion.open .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background: var(--stope-dark);
}

.accordion.open .accordion-body {
  max-height: 2000px;
}

.accordion-content {
  padding: var(--space-lg) var(--space-xl);
}

/* ─── Tabs ─────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: var(--space-xs);
  border-bottom: 1px solid var(--stope-gray-800);
  margin-bottom: var(--space-xl);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  padding: var(--space-sm) var(--space-lg);
  background: none;
  border: none;
  color: var(--stope-gray-500);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: var(--font-body);
}

.tab-btn:hover {
  color: var(--stope-gray-200);
}

.tab-btn.active {
  color: var(--stope-gold);
  border-bottom-color: var(--stope-gold);
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active { display: block; }

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

/* ─── Stats Row ────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-md);
  margin: var(--space-xl) 0;
}

.stat-card {
  background: var(--stope-charcoal);
  border: 1px solid var(--stope-gray-800);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
}

.stat-card .stat-value {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--stope-gold);
  font-family: var(--font-mono);
}

.stat-card .stat-label {
  font-size: 0.78rem;
  color: var(--stope-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: var(--space-xs);
}

/* ─── Flow Diagram ─────────────────────────────────────────── */
.flow-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  padding: var(--space-xl) 0;
}

.flow-node {
  background: var(--stope-charcoal);
  border: 1px solid var(--stope-gray-700);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  text-align: center;
  min-width: 120px;
}

.flow-node.highlight {
  border-color: var(--stope-gold);
  box-shadow: var(--shadow-glow);
}

.flow-node .flow-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--stope-white);
}

.flow-node .flow-sub {
  font-size: 0.72rem;
  color: var(--stope-gray-500);
  margin-top: 2px;
}

.flow-arrow {
  color: var(--stope-gold);
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ─── Porter's Five Forces Diagram ─────────────────────────── */
.porter-diagram {
  display: grid;
  grid-template-areas:
    ". new-entrants ."
    "suppliers rivalry buyers"
    ". substitutes .";
  grid-template-columns: 1fr 1.5fr 1fr;
  grid-template-rows: auto 1fr auto;
  gap: var(--space-lg);
  max-width: 900px;
  margin: var(--space-xl) auto;
  min-height: 500px;
}

.porter-card {
  background: var(--gradient-card);
  border: 1px solid var(--stope-gray-700);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  position: relative;
}

.porter-card h3 {
  font-size: 0.95rem;
  color: var(--stope-white);
  margin-bottom: var(--space-sm);
}

.porter-card .porter-level {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.porter-card .porter-level.low { color: var(--stope-green); }
.porter-card .porter-level.medium { color: var(--stope-amber); }
.porter-card .porter-level.medium-high { color: var(--stope-copper); }
.porter-card .porter-level.high { color: var(--stope-red); }

.porter-card ul {
  list-style: none;
  padding: 0;
}

.porter-card li {
  font-size: 0.78rem;
  color: var(--stope-gray-400);
  padding: 4px 0;
  padding-left: var(--space-md);
  position: relative;
}

.porter-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--stope-gold);
}

.porter-new-entrants { grid-area: new-entrants; }
.porter-suppliers { grid-area: suppliers; }
.porter-rivalry {
  grid-area: rivalry;
  border-color: var(--stope-gold);
  box-shadow: var(--shadow-glow);
}
.porter-buyers { grid-area: buyers; }
.porter-substitutes { grid-area: substitutes; }

/* ─── Code Blocks ──────────────────────────────────────────── */
.code-block {
  background: var(--stope-dark);
  border: 1px solid var(--stope-gray-800);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--stope-gray-300);
  overflow-x: auto;
  line-height: 1.6;
  margin: var(--space-md) 0;
}

.code-block .keyword { color: var(--stope-purple); }
.code-block .string { color: var(--stope-green); }
.code-block .comment { color: var(--stope-gray-600); font-style: italic; }
.code-block .type { color: var(--stope-cyan); }
.code-block .number { color: var(--stope-amber); }

/* ─── Callouts ─────────────────────────────────────────────── */
.callout {
  background: rgba(212,168,67,0.06);
  border: 1px solid rgba(212,168,67,0.15);
  border-left: 3px solid var(--stope-gold);
  border-radius: var(--radius-sm);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
}

.callout.info {
  background: rgba(59,130,246,0.06);
  border-color: rgba(59,130,246,0.15);
  border-left-color: var(--stope-blue);
}

.callout.warning {
  background: rgba(245,158,11,0.06);
  border-color: rgba(245,158,11,0.15);
  border-left-color: var(--stope-amber);
}

.callout-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--stope-gold);
  margin-bottom: var(--space-xs);
}

.callout.info .callout-title { color: var(--stope-blue); }
.callout.warning .callout-title { color: var(--stope-amber); }

.callout p {
  font-size: 0.88rem;
  color: var(--stope-gray-300);
}

/* ─── Timeline ─────────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--stope-gray-800);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-2xl);
}

.timeline-dot {
  position: absolute;
  left: -33px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--stope-gold);
  background: var(--stope-dark);
}

.timeline-dot.complete { background: var(--status-complete); border-color: var(--status-complete); }
.timeline-dot.in-progress { background: var(--status-in-progress); border-color: var(--status-in-progress); }
.timeline-dot.planned { background: transparent; border-color: var(--stope-gray-600); }

.timeline-item h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--stope-white);
  margin-bottom: var(--space-xs);
}

.timeline-item p {
  font-size: 0.88rem;
  color: var(--stope-gray-400);
}

/* ─── Footer ───────────────────────────────────────────────── */
.footer {
  padding: var(--space-2xl) var(--space-xl);
  border-top: 1px solid var(--stope-gray-800);
  text-align: center;
  color: var(--stope-gray-600);
  font-size: 0.8rem;
}

.footer strong { color: var(--stope-gold); }

/* ─── Utility ──────────────────────────────────────────────── */
.text-gold { color: var(--stope-gold); }
.text-blue { color: var(--stope-blue); }
.text-green { color: var(--stope-green); }
.text-gray { color: var(--stope-gray-500); }
.text-white { color: var(--stope-white); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.78rem; }
.text-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }

/* ─── Layer Diagram ────────────────────────────────────────── */
.layer-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 700px;
  margin: var(--space-xl) auto;
}

.layer {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-sm);
  transition: transform 0.2s;
}

.layer:hover { transform: translateX(4px); }

.layer-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--stope-gold);
  width: 24px;
  text-align: center;
}

.layer-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--stope-white);
  min-width: 160px;
}

.layer-desc {
  font-size: 0.8rem;
  color: var(--stope-gray-500);
}

.layer-0 { background: rgba(212,168,67,0.12); border: 1px solid rgba(212,168,67,0.25); }
.layer-1 { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2); }
.layer-2 { background: rgba(139,92,246,0.08); border: 1px solid rgba(139,92,246,0.2); }
.layer-3 { background: rgba(6,182,212,0.08); border: 1px solid rgba(6,182,212,0.2); }
.layer-4 { background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2); }

/* ─── Whitepaper-specific ──────────────────────────────────── */
.prose {
  max-width: 800px;
  margin: 0 auto;
}

.prose h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--stope-white);
  margin: var(--space-2xl) 0 var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--stope-gray-800);
}

.prose h2:first-child { border-top: none; padding-top: 0; }

.prose h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--stope-gray-200);
  margin: var(--space-xl) 0 var(--space-sm);
}

.prose p {
  margin-bottom: var(--space-md);
  color: var(--stope-gray-300);
  font-size: 0.95rem;
}

.prose ul, .prose ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
}

.prose li {
  color: var(--stope-gray-300);
  font-size: 0.93rem;
  margin-bottom: var(--space-xs);
}

.prose strong { color: var(--stope-white); }

.prose .figure {
  margin: var(--space-xl) 0;
  text-align: center;
}

.prose .figure-caption {
  font-size: 0.8rem;
  color: var(--stope-gray-500);
  font-style: italic;
  margin-top: var(--space-sm);
}

/* ─── Animations ───────────────────────────────────────────── */
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .porter-diagram {
    grid-template-areas:
      "rivalry"
      "new-entrants"
      "suppliers"
      "buyers"
      "substitutes";
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .card-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10,10,10,0.98);
    padding: var(--space-md);
    border-bottom: 1px solid var(--stope-gray-800);
  }
  .nav-mobile-toggle { display: block; }
  .hero { padding: calc(64px + var(--space-xl)) var(--space-md) var(--space-xl); }
  .section { padding: var(--space-xl) var(--space-md); }
  .flow-container { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
}

/* ─── Print ────────────────────────────────────────────────── */
@media print {
  .top-nav, .nav-mobile-toggle { display: none; }
  body { background: white; color: #333; }
  .hero { padding-top: var(--space-xl); }
  .card { border: 1px solid #ccc; box-shadow: none; }
  .card:hover { transform: none; }
}
