@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;600;700;900&family=Share+Tech+Mono&display=swap');

:root {
  --rock-dark: #0d0d0d;
  --rock-mid: #1a1612;
  --rock-surface: #2a2318;
  --amber: #e8892a;
  --amber-bright: #ffaa44;
  --amber-glow: rgba(232,137,42,0.15);
  --iron: #8a7a6a;
  --dust: #c4a882;
  --crater: #151210;
  --text-main: #e8ddd0;
  --text-sub: #9a8a78;
  --border: rgba(232,137,42,0.25);
}

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

body {
  font-family: 'Exo 2', sans-serif;
  background: var(--rock-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Starfield canvas ── */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Noise texture overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
}

.wrap {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ── HERO ── */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 50px;
}

.hero-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 4px;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0.8;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 0.9;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: -2px;
}

.hero h1 span {
  color: var(--amber);
  display: block;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-sub);
  margin-top: 16px;
  max-width: 520px;
  line-height: 1.6;
  font-weight: 300;
}

.asteroid-icon {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}

/* ── Classification badge ── */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 50px;
}

.badge {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 2px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--amber);
  background: var(--amber-glow);
  text-transform: uppercase;
}

/* ── Data grid ── */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2px;
  margin-bottom: 50px;
  border: 1px solid var(--border);
}

.data-cell {
  background: var(--rock-mid);
  padding: 20px 18px;
  border-right: 1px solid var(--border);
  transition: background 0.2s;
}

.data-cell:last-child { border-right: none; }
.data-cell:hover { background: var(--rock-surface); }

.data-cell .label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: var(--text-sub);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.data-cell .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--amber-bright);
  line-height: 1.1;
}

.data-cell .unit {
  font-size: 0.75rem;
  color: var(--text-sub);
  font-weight: 300;
}

/* ── Section ── */
.section {
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible { opacity: 1; transform: translateY(0); }

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.section-num {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--amber);
  opacity: 0.6;
}

.section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--amber);
  margin-top: 6px;
}

p {
  color: var(--text-sub);
  line-height: 1.8;
  font-size: 0.95rem;
  font-weight: 300;
  margin-bottom: 14px;
}

/* ── Families table ── */
.families-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.family-card {
  background: var(--rock-mid);
  border: 1px solid var(--border);
  border-top: 3px solid var(--amber);
  padding: 18px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.family-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(232,137,42,0.12);
}

.family-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--amber-bright);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.family-card p {
  font-size: 0.85rem;
  margin: 0;
}

/* ── Timeline ── */
.timeline {
  border-left: 2px solid var(--border);
  padding-left: 24px;
  margin-top: 16px;
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

.timeline-item .year {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  color: var(--amber);
  margin-bottom: 4px;
}

.timeline-item h4 {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.timeline-item p { margin: 0; font-size: 0.85rem; }

/* ── Composition bar chart ── */
.comp-bar-wrap { margin-top: 16px; }

.comp-row {
  display: grid;
  grid-template-columns: 120px 1fr 50px;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.comp-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-sub);
  text-transform: uppercase;
}

.comp-bar-track {
  height: 6px;
  background: var(--rock-surface);
  border-radius: 3px;
  overflow: hidden;
}

.comp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amber), var(--amber-bright));
  border-radius: 3px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}

.comp-pct {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  color: var(--amber);
  text-align: right;
}

/* ── Footer band ── */
.footer-band {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-band span {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-sub);
  letter-spacing: 2px;
  text-transform: uppercase;
}
