/* ================================================================
   APGI — Autonomous Physics General Intelligence
   Apple-tier premium dark site
   ================================================================ */

:root {
  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --bg-card: #111111;
  --text: #f5f5f7;
  --text-secondary: #86868b;
  --text-muted: #48484a;
  --accent: #db2777;
  --border: rgba(255, 255, 255, 0.06);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ── Nav ─────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(0, 0, 0, 0.72);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  background: var(--text);
  color: var(--bg) !important;
  padding: 7px 18px;
  border-radius: 980px;
  font-weight: 600 !important;
  font-size: 12px !important;
  letter-spacing: 0.3px;
  transition: opacity 0.2s;
}

.nav-cta:hover {
  opacity: 0.85;
  color: var(--bg) !important;
}

/* ── Mesh Canvas ─────────────────────────────────────────────── */

.mesh-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.mesh-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

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

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 120px 40px 80px;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.hero-title {
  margin-bottom: 24px;
}

.hero-ghost {
  font-size: clamp(72px, 12vw, 140px);
  font-weight: 900;
  letter-spacing: -4px;
  line-height: 1;
  color: var(--text);
}

.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 22px);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 40px;
}

.hero-desc {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 64px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-stat-value {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  font-family: var(--mono);
}

.hero-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 6px;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  z-index: 2;
}

/* ── Sections ────────────────────────────────────────────────── */

.section {
  padding: 140px 40px;
}

.section-dark {
  background: var(--bg-elevated);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

.section-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.section-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 32px;
}

.section-body {
  font-size: 19px;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 720px;
  margin-bottom: 24px;
}

/* ── Comparison ──────────────────────────────────────────────── */

.comparison {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  margin-top: 40px;
}

.comparison-col {
  flex: 1;
  padding: 48px 40px;
}

.comparison-col-highlight {
  background: rgba(255, 255, 255, 0.02);
}

.comparison-divider {
  width: 1px;
  background: var(--border);
}

.comparison-header {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 28px;
  letter-spacing: -0.3px;
}

.comparison-col:first-child .comparison-header {
  color: var(--text-muted);
}

.comparison-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comparison-list li {
  font-size: 15px;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}

.comparison-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.comparison-col-highlight .comparison-list li::before {
  background: var(--text);
}

.comparison-col-highlight .comparison-list li {
  color: var(--text);
}

/* ── Specs Grid ──────────────────────────────────────────────── */

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.spec {
  background: var(--bg);
  padding: 56px 44px;
  display: flex;
  flex-direction: column;
}

.spec-value {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -2px;
  font-family: var(--mono);
  line-height: 1;
  margin-bottom: 8px;
}

.spec-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}

.spec-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Validation ──────────────────────────────────────────────── */

.results-header {
  display: flex;
  gap: 40px;
  margin: 64px 0;
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.result-metric {
  display: flex;
  flex-direction: column;
}

.result-metric-value {
  font-size: 40px;
  font-weight: 900;
  font-family: var(--mono);
  letter-spacing: -1px;
  line-height: 1;
}

.result-metric-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-top: 10px;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: border-color 0.3s, transform 0.3s;
}

.event-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.event-year {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text-muted);
  letter-spacing: 1px;
}

.event-name {
  font-size: 18px;
  font-weight: 700;
  margin: 8px 0 12px;
  letter-spacing: -0.3px;
}

.event-detail {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Architecture ────────────────────────────────────────────── */

.arch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 64px;
}

.arch-card {
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: border-color 0.3s;
}

.arch-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.arch-number {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text-muted);
  margin-bottom: 16px;
}

.arch-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.arch-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Lineage ─────────────────────────────────────────────────── */

.lineage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 48px;
}

.lineage-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.3s;
}

.lineage-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.lineage-year {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--accent);
  letter-spacing: 1px;
}

.lineage-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 8px 0 12px;
  letter-spacing: -0.3px;
}

.lineage-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.lineage-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 16px;
  transition: color 0.2s;
}

.lineage-card:hover .lineage-link {
  color: var(--text);
}

/* ── Statement ───────────────────────────────────────────────── */

.section-statement {
  padding: 180px 40px;
  text-align: center;
}

.statement-quote {
  max-width: 720px;
  margin: 0 auto 48px;
  border: none;
  padding: 0;
}

.statement-jobs {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.2px;
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0 20px;
}

.statement-cite {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-style: normal;
  opacity: 0.6;
}

.statement-text {
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1.5px;
  color: var(--text);
  max-width: 800px;
  margin: 0 auto 24px;
}

.statement-sub {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

/* ── Deployment ──────────────────────────────────────────────── */

.deploy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 48px;
}

.deploy-item {
  background: var(--bg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.deploy-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.deploy-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

/* ── Contact ─────────────────────────────────────────────────── */

.contact-section {
  text-align: center;
}

.contact-section .section-body {
  margin-left: auto;
  margin-right: auto;
}

.contact-btn {
  display: inline-block;
  margin-top: 32px;
  padding: 16px 48px;
  background: var(--text);
  color: var(--bg);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 980px;
  letter-spacing: 0.3px;
  transition: opacity 0.2s, transform 0.2s;
}

.contact-btn:hover {
  opacity: 0.88;
  transform: scale(1.02);
}

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

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--text);
}

.footer-tagline {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Reveal Animations ───────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

/* Stagger children */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }

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

@media (max-width: 768px) {
  .nav-inner { padding: 0 20px; }
  .nav-links { gap: 16px; }
  .nav-links a:not(.nav-cta) { display: none; }

  .hero { padding: 120px 24px 80px; }
  .hero-stats { flex-wrap: wrap; gap: 24px; }
  .hero-stat-divider { display: none; }
  .hero-desc br { display: none; }

  .section { padding: 80px 24px; }

  .comparison {
    flex-direction: column;
  }
  .comparison-divider {
    width: 100%;
    height: 1px;
  }
  .comparison-col { padding: 32px 28px; }

  .specs-grid { grid-template-columns: 1fr; }
  .spec { padding: 40px 32px; }
  .spec-value { font-size: 44px; }

  .results-header { flex-wrap: wrap; gap: 24px; }

  .events-grid { grid-template-columns: 1fr; }
  .event-card { padding: 24px; }

  .arch-grid { grid-template-columns: 1fr; }
  .arch-card { padding: 28px; }

  .lineage-grid { grid-template-columns: 1fr; }
  .lineage-card { padding: 24px; }

  .deploy-grid { grid-template-columns: 1fr; }

  .section-statement { padding: 100px 24px; }

  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
  .footer-left { flex-direction: column; gap: 4px; }
}

@media (max-width: 480px) {
  .hero-ghost { letter-spacing: -2px; }
  .hero-subtitle { letter-spacing: 2px; font-size: 14px; }
  .hero-stat-value { font-size: 28px; }
  .section-title { letter-spacing: -1px; }
  .spec-value { font-size: 36px; }
  .result-metric-value { font-size: 32px; }
}
