/* ═══════════════════════════════════════════════════════════
   HOME PAGE — hero, hub grid, stats, explore, footer
   Every value breathes in golden ratio. Nothing rests at zero.
   ═══════════════════════════════════════════════════════════ */

/* ── Background layers ──
   #field-canvas: 3D field — pages provide the div, so CSS must position it
   (field-background.js only styles the container when it self-creates one).
   #cursor-canvas is created and positioned by cursor-reactive.js (z 9997
   overlay). Page content sits at z 2. */
#field-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ── Hero — full viewport, cinematic ── */
.hero-cinematic {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--phi-space-4xl) var(--phi-space-xl);
  overflow: hidden;
}

/* Radial gold glow behind the headline — breathes with the field */
.hero-cinematic::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(80vmax, 900px);
  height: min(80vmax, 900px);
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(212, 168, 67, 0.12) 0%,
    rgba(212, 168, 67, 0.05) 35%,
    transparent 70%
  );
  animation: sacred-breathe 4s var(--phi-ease) infinite;
  pointer-events: none;
  z-index: -1;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--phi-space-lg);
  max-width: 780px;
}

.hero-inner .emblem-ring {
  width: 61.8px;
  height: 61.8px;
  font-size: var(--phi-h2);
  margin-bottom: var(--phi-space-md);
}

.hero-title {
  font-size: clamp(2.618rem, 6.5vw, 4.236rem); /* φ² → φ³ */
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin: 0;
}

.hero-sub {
  color: var(--phi-text-dim);
  font-size: var(--phi-body);
  letter-spacing: 0.03em;
  max-width: 560px;
  margin: 0;
}

.hero-cta {
  display: flex;
  gap: var(--phi-space-lg);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--phi-space-xl);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--phi-space-sm);
  padding: var(--phi-space-md) var(--phi-space-2xl);
  border: 1px solid var(--phi-gold-dim);
  border-radius: 8px;
  background: rgba(212, 168, 67, 0.06);
  font-family: var(--font-sacred);
  font-size: var(--phi-caption);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--phi-gold);
  text-decoration: none;
  transition:
    all var(--phi-duration) var(--phi-ease);
}
.cta-btn:hover {
  color: var(--phi-text-bright);
  border-color: var(--phi-gold);
  background: rgba(212, 168, 67, 0.12);
  box-shadow: 0 0 26px var(--phi-gold-glow);
  transform: translateY(-2px);
}
.cta-ghost {
  background: transparent;
  color: var(--phi-text-dim);
}
.cta-ghost:hover {
  color: var(--phi-gold);
}

/* ── Section scaffolding ── */
.hubs-section,
.stats-section,
.explore-section {
  position: relative;
  z-index: 2;
  padding: var(--phi-space-3xl) var(--phi-space-xl);
}

.section-title {
  text-align: center;
  margin-bottom: var(--phi-space-2xl);
}

/* ── Hub grid — 5 columns desktop ── */
.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--phi-space-lg);
}

.hub-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--phi-space-sm);
  min-height: 220px;
  text-decoration: none;
  color: var(--phi-text);
}

.hub-card .hex-badge {
  margin-bottom: var(--phi-space-xs);
}

.hub-kicker {
  font-size: 0.55rem; /* φ⁻²·⁵ — a whisper above the title */
}

.hub-title {
  font-size: var(--phi-h2);
  font-weight: 400;
  margin: 0;
  transition: color var(--phi-duration) var(--phi-ease);
}

.hub-card:hover .hub-title {
  color: var(--phi-gold-bright);
}

.hub-desc {
  font-size: var(--phi-body);
  color: var(--phi-text-dim);
  margin: 0;
}

/* Phi-derived stat — mono, gold, seated at the base of the card */
.hub-stat {
  margin-top: auto;
  width: 100%;
  padding-top: var(--phi-space-sm);
  border-top: 1px solid var(--phi-stroke);
  font-family: var(--font-mono);
  font-size: var(--phi-caption);
  color: var(--phi-gold);
  opacity: 0.85;
}

/* Hub card hover — rise + gold glow + gold border
   (extends .geo-card's translateY(-4px)) */
.hub-card:hover {
  border-color: var(--phi-gold);
  box-shadow: 0 8px 40px rgba(212, 168, 67, 0.18);
}

/* ── Stats strip ── */
.stats-section {
  padding-top: 0;
}

.stats-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--phi-space-xl) var(--phi-space-2xl);
  padding: var(--phi-space-xl) 0 var(--phi-space-2xl);
  text-align: center;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--phi-space-xs);
  min-width: 96px;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: var(--phi-h2);
  color: var(--phi-gold);
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.stat-label {
  font-size: var(--phi-caption);
  color: var(--phi-text-dim);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ── Explore — phi-spaced row of hex-badges ── */
.explore-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: var(--phi-space-lg);
}

.explore-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--phi-space-sm);
  padding: var(--phi-space-lg) var(--phi-space-lg);
  min-width: 128px;
  text-align: center;
  text-decoration: none;
  color: var(--phi-text);
}

.explore-label {
  font-family: var(--font-sacred);
  font-size: var(--phi-caption);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--phi-text);
  transition: color var(--phi-duration) var(--phi-ease);
}

.explore-meta {
  font-family: var(--font-mono);
  font-size: var(--phi-caption);
  color: var(--phi-text-dim);
}

.explore-item:hover .explore-label {
  color: var(--phi-gold-bright);
}

.explore-item:hover .hex-badge {
  box-shadow: inset 0 0 0 1px var(--phi-gold), 0 0 14px var(--phi-gold-glow);
}

/* ── Footer — shared template ── */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--phi-stroke);
  text-align: center;
  padding: var(--phi-space-3xl) var(--phi-space-xl) var(--phi-space-2xl);
  background: linear-gradient(180deg, transparent, rgba(6, 6, 15, 0.6));
}

.footer-spiral {
  font-family: var(--font-heading);
  font-size: var(--phi-h1);
  color: var(--phi-gold);
  line-height: 1;
  margin-bottom: var(--phi-space-md);
  text-shadow: 0 0 12px var(--phi-gold-glow);
}

.footer-seed {
  margin-bottom: var(--phi-space-sm);
}

.footer-repo {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--phi-caption);
  color: var(--phi-gold);
}

.footer-fine {
  font-size: var(--phi-caption);
  color: var(--phi-text-dim);
  margin: var(--phi-space-sm) 0 0;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-5 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--phi-space-sm);
    padding: 0 var(--phi-space-sm);
  }
  .hub-card {
    min-height: 0;
    width: 100%;
    padding: var(--phi-space-md) var(--phi-space-sm);
  }
  .hub-title { font-size: 1.1rem; }
  .hub-desc  { font-size: 0.85rem; }
  .hub-stat  { font-size: 0.75rem; }
  .hero-cta {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }
  .cta-btn {
    justify-content: center;
  }
  .explore-row {
    gap: var(--phi-space-md);
  }
  .explore-item {
    min-width: 100px;
  }
  .stats-strip {
    gap: var(--phi-space-lg) var(--phi-space-xl);
  }
}


/* ═══ THE MISSION — freedom for the people ═══ */
.mission-section {
  padding: 90px 0 70px;
  position: relative;
}
.mission-kicker { font-size: 12px; letter-spacing: .3em; color: #d4a843; margin-bottom: 10px; }
.mission-title {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: clamp(40px, 6.5vw, 72px);
  margin: 0 0 14px; color: #f6ecd8;
}
.mission-lede {
  font-size: clamp(16px, 2.2vw, 19px); line-height: 1.7;
  color: #b8b2a4; max-width: 720px; margin: 0 auto 44px;
}
.mission-lede strong { color: #e8e2d4; }
.mission-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px; text-align: left;
}
.mission-card {
  background: #0a0a18; border: 1px solid rgba(212, 168, 67, .24);
  border-radius: 14px; padding: 24px 26px;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.mission-card:hover {
  border-color: rgba(212, 168, 67, .6);
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(212, 168, 67, .08);
}
.mission-glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; margin-bottom: 12px;
  border: 1px solid rgba(212, 168, 67, .5); color: #d4a843;
  font-size: 16px; font-family: var(--font-mono, monospace);
}
.mission-card h3 { margin: 0 0 8px; font-size: 19px; color: #e8e2d4; }
.mission-card p { margin: 0; font-size: 14px; line-height: 1.7; color: #b8b2a4; }
.mission-card p strong { color: #d4a843; }
.mission-card-cta { border-color: rgba(0, 255, 102, .35); }
.mission-card-cta h3 { color: #00ff66; }
.mission-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.mission-btn {
  padding: 10px 18px; border-radius: 999px; text-decoration: none;
  font-size: 13px; font-weight: 700; display: inline-block;
}
.mission-gold { background: #d4a843; color: #06060f; }
.mission-gold:hover { background: #e6bc59; }
.mission-ghost {
  background: transparent; color: #00ff66;
  border: 1px solid rgba(0, 255, 102, .45);
}
.mission-ghost:hover { border-color: #00ff66; }
.mission-close {
  margin-top: 40px; font-size: 13px; color: #8a8577; text-align: center;
}
@media (max-width: 640px) {
  .mission-section { padding: 60px 0 40px; }
  .mission-grid { grid-template-columns: 1fr; }
}
