/* === BASE.CSS — Shared components & typography === */

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Body */
body {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 19px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* === HERO === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 60px 40px 80px;
  overflow: hidden;
  background: var(--hero-gradient);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--hero-overlay);
  pointer-events: none;
}

.hero-badge {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 4px;
  color: var(--accent-secondary);
  text-transform: uppercase;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
  animation: fadeSlideUp 0.8s ease-out 0.2s both;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  line-height: 1.05;
  color: var(--highlight);
  max-width: 900px;
  position: relative;
  z-index: 1;
  animation: fadeSlideUp 0.8s ease-out 0.4s both;
}

.hero-title em {
  font-style: italic;
  color: var(--accent-primary);
}

.hero-subtitle {
  font-family: 'Source Serif 4', serif;
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin-top: 28px;
  position: relative;
  z-index: 1;
  animation: fadeSlideUp 0.8s ease-out 0.6s both;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-secondary);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  animation: fadeSlideUp 0.8s ease-out 0.8s both;
}

.hero-meta span { opacity: 0.4; }

/* Hero decorations */
.chip-stack {
  position: absolute;
  right: 5%;
  top: 15%;
  width: 300px;
  height: 400px;
  opacity: 0.06;
  z-index: 0;
  animation: floatChip 8s ease-in-out infinite;
}

.chip-stack div {
  width: 180px;
  height: 30px;
  background: var(--accent-primary);
  margin: 6px auto;
  border-radius: 2px;
}

.radiation-rings {
  position: absolute;
  right: 8%;
  top: 20%;
  width: 280px;
  height: 280px;
  opacity: 0.06;
  z-index: 0;
  animation: pulseRing 6s ease-in-out infinite;
}

.radiation-rings div {
  position: absolute;
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.radiation-rings div:nth-child(1) { width: 60px; height: 60px; }
.radiation-rings div:nth-child(2) { width: 120px; height: 120px; opacity: 0.7; }
.radiation-rings div:nth-child(3) { width: 190px; height: 190px; opacity: 0.4; }
.radiation-rings div:nth-child(4) { width: 260px; height: 260px; opacity: 0.2; }

/* Robinhood chart lines */
.chart-lines {
  position: absolute;
  right: 5%;
  top: 15%;
  width: 300px;
  height: 400px;
  opacity: 0.05;
  z-index: 0;
  animation: floatChart 8s ease-in-out infinite;
}

.chart-lines div {
  position: absolute;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 1px;
  transform-origin: left center;
}

.chart-lines div:nth-child(1) { width: 200px; bottom: 80%; left: 10%; transform: rotate(-25deg); }
.chart-lines div:nth-child(2) { width: 120px; bottom: 60%; left: 30%; transform: rotate(-35deg); }
.chart-lines div:nth-child(3) { width: 160px; bottom: 45%; left: 15%; transform: rotate(-15deg); }
.chart-lines div:nth-child(4) { width: 180px; bottom: 30%; left: 25%; transform: rotate(-40deg); }
.chart-lines div:nth-child(5) { width: 140px; bottom: 15%; left: 5%; transform: rotate(-20deg); }
.chart-lines div:nth-child(6) { width: 100px; bottom: 70%; left: 50%; transform: rotate(-30deg); }

/* AMD chiplet grid */
.chiplet-grid {
  position: absolute;
  right: 5%;
  top: 15%;
  width: 300px;
  height: 400px;
  opacity: 0.05;
  z-index: 0;
  animation: floatChiplet 8s ease-in-out infinite;
}

.chiplet-grid div {
  position: absolute;
  width: 40px;
  height: 40px;
  background: var(--accent-primary);
  border-radius: 3px;
}

.chiplet-grid div:nth-child(1)  { top: 0%;   left: 10%; }
.chiplet-grid div:nth-child(2)  { top: 0%;   left: 35%; }
.chiplet-grid div:nth-child(3)  { top: 0%;   left: 60%; }
.chiplet-grid div:nth-child(4)  { top: 0%;   left: 85%; }
.chiplet-grid div:nth-child(5)  { top: 18%;  left: 10%; }
.chiplet-grid div:nth-child(6)  { top: 18%;  left: 35%; }
.chiplet-grid div:nth-child(7)  { top: 18%;  left: 60%; }
.chiplet-grid div:nth-child(8)  { top: 18%;  left: 85%; }
.chiplet-grid div:nth-child(9)  { top: 36%;  left: 10%; }
.chiplet-grid div:nth-child(10) { top: 36%;  left: 35%; }
.chiplet-grid div:nth-child(11) { top: 36%;  left: 60%; }
.chiplet-grid div:nth-child(12) { top: 36%;  left: 85%; }
.chiplet-grid div:nth-child(13) { top: 54%;  left: 22%; }
.chiplet-grid div:nth-child(14) { top: 54%;  left: 47%; }
.chiplet-grid div:nth-child(15) { top: 54%;  left: 72%; }
.chiplet-grid div:nth-child(16) { top: 72%;  left: 22%; }

/* === ARTICLE BODY === */
.article-body p {
  margin-bottom: 1.6em;
  color: var(--text-primary);
}

.article-body strong {
  color: var(--highlight);
  font-weight: 600;
}

/* === SECTION NUMBERS === */
.section-header {
  margin: 60px 0 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border-subtle);
}

.section-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 80px;
  line-height: 1;
  color: var(--accent-primary);
  opacity: 0.25;
  display: block;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  line-height: 1.2;
  color: var(--highlight);
  margin-top: -10px;
}

/* First section header on a page — no top border/margin */
.article-body > .section-header:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* === CALLOUT BOXES === */
.callout {
  background: var(--bg-callout);
  border-left: 3px solid var(--accent-primary);
  padding: 28px 32px;
  margin: 40px 0;
  border-radius: 0 8px 8px 0;
  font-size: 17px;
}

.callout-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

/* Callout variants */
.callout.red {
  border-left-color: #c4453a;
  background: #1a1214;
}
.callout.red .callout-label { color: #c4453a; }

.callout.blue {
  border-left-color: #4a7fb5;
  background: #121519;
}
.callout.blue .callout-label { color: #4a7fb5; }

.callout.orange {
  border-left-color: #d4763a;
  background: #1a140f;
}
.callout.orange .callout-label { color: #d4763a; }

.callout.cyan {
  border-left-color: #3ab8d4;
  background: #0f1519;
}
.callout.cyan .callout-label { color: #3ab8d4; }

/* === STAT BLOCKS === */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin: 48px 0;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 24px;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
}

.stat-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.4rem;
  color: var(--accent-primary);
  line-height: 1.1;
}

.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* === INLINE HIGHLIGHTS === */
.gold { color: #d4a84b; }
.red { color: #c4453a; }
.green { color: #3dd68c; }

.highlight-box {
  display: inline;
  background: linear-gradient(transparent 60%, rgba(212,168,75,0.2) 60%);
  padding: 0 2px;
}

/* === PULL QUOTE === */
.pull-quote {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-style: italic;
  color: var(--accent-primary);
  border-left: none;
  text-align: center;
  padding: 48px 32px;
  margin: 56px 0;
  position: relative;
  line-height: 1.4;
}

.pull-quote::before,
.pull-quote::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: var(--accent-primary);
  margin: 0 auto;
  opacity: 0.3;
}

.pull-quote::before { margin-bottom: 28px; }
.pull-quote::after { margin-top: 28px; }

/* === COMPARISON TABLE === */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 40px 0;
  font-size: 16px;
}

.compare-table th {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--border-subtle);
}

.compare-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.compare-table tr:hover td {
  background: var(--table-hover);
}

.compare-table .value-highlight {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--accent-primary);
}

/* === TIMELINE === */
.timeline {
  position: relative;
  padding-left: 32px;
  margin: 48px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--timeline-gradient);
  opacity: 0.3;
}

.timeline-item {
  position: relative;
  margin-bottom: 28px;
  padding-left: 20px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -37px;
  top: 8px;
  width: 10px;
  height: 10px;
  background: var(--accent-primary);
  border-radius: 50%;
}

.timeline-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent-primary);
  letter-spacing: 1px;
}

.timeline-text {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* === VERSUS BLOCK === */
.versus-block {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  margin: 48px 0;
  align-items: stretch;
}

.versus-side {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 28px 24px;
  border-radius: 8px;
}

.versus-side h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.versus-side.old h4 { color: #d4763a; }
.versus-side.new h4 { color: #3dd68c; }

.versus-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  color: var(--text-secondary);
  opacity: 0.3;
}

.versus-item {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding-left: 16px;
  position: relative;
}

.versus-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.versus-side.old .versus-item::before { background: #d4763a; opacity: 0.5; }
.versus-side.new .versus-item::before { background: #3dd68c; opacity: 0.5; }

/* === RISK METER === */
.risk-meter {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 32px;
  margin: 48px 0;
}

.risk-meter h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 3px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.risk-bar {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  gap: 14px;
}

.risk-bar-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  width: 140px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.risk-bar-track {
  flex: 1;
  height: 8px;
  background: var(--border-subtle);
  border-radius: 4px;
  overflow: hidden;
}

.risk-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease-out;
}

.risk-bar-fill.critical { background: linear-gradient(90deg, #d4763a, #c4453a); }
.risk-bar-fill.high { background: linear-gradient(90deg, #c9b84a, #d4763a); }
.risk-bar-fill.moderate { background: linear-gradient(90deg, #3dd68c, #c9b84a); }

/* === ANIMATIONS === */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes floatChip {
  0%, 100% { transform: translateY(0) rotate(12deg); }
  50% { transform: translateY(-20px) rotate(12deg); }
}

@keyframes pulseRing {
  0%, 100% { transform: scale(1); opacity: 0.06; }
  50% { transform: scale(1.08); opacity: 0.1; }
}

@keyframes floatChart {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-15px) rotate(-5deg); }
}

@keyframes floatChiplet {
  0%, 100% { transform: translateY(0) rotate(6deg); }
  50% { transform: translateY(-18px) rotate(6deg); }
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero { padding: 40px 20px 60px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .chip-stack { display: none; }
  .radiation-rings { display: none; }
  .chart-lines { display: none; }
  .chiplet-grid { display: none; }
  .versus-block {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .versus-divider {
    padding: 8px 0;
  }
  .risk-bar-label { width: 110px; font-size: 11px; }
}
