/* ==========================================================================
   AtomScape Landing Page — Apple HIG / macOS 26 Liquid Glass
   ========================================================================== */
:root {
  color-scheme: light dark;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  --bg-page: #f5f5f7;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.78);
  --bg-glass: rgba(255, 255, 255, 0.72);
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-glass: rgba(255, 255, 255, 0.85);
  --shadow-glass: 0 12px 36px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --shadow-card: 0 4px 20px rgba(15, 23, 42, 0.04);

  --text-primary: #1d1d1f;
  --text-secondary: #515154;
  --text-tertiary: #86868b;

  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.09);
  --accent-border: rgba(0, 113, 227, 0.22);
  --teal: #0a84ff;
  --emerald: #10b981;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-page: #0a0a0c;
    --bg-elevated: #141418;
    --bg-card: rgba(28, 28, 34, 0.72);
    --bg-glass: rgba(26, 26, 32, 0.68);
    --border-subtle: rgba(255, 255, 255, 0.1);
    --border-glass: rgba(255, 255, 255, 0.14);
    --shadow-glass: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    --shadow-card: 0 8px 28px rgba(0, 0, 0, 0.35);

    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #6e6e73;

    --accent: #2997ff;
    --accent-hover: #47a7ff;
    --accent-soft: rgba(41, 151, 255, 0.14);
    --accent-border: rgba(41, 151, 255, 0.3);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  overflow-x: hidden;
}

/* Floating Liquid Glass Navbar */
.nav-wrap {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 20px;
  pointer-events: none;
}

.nav-bar {
  pointer-events: auto;
  width: 100%;
  max-width: 1080px;
  height: 56px;
  padding: 0 12px 0 18px;
  border-radius: 999px;
  background: var(--bg-glass);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0071e3, #5e5ce6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.32);
}

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

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

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-ghost {
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.btn-ghost:hover { color: var(--text-primary); border-color: var(--text-tertiary); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 550;
  padding: 8px 16px;
  border-radius: 999px;
  transition: transform 0.14s ease, background 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.28);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 113, 227, 0.36);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  font-size: 14.5px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 999px;
  backdrop-filter: blur(16px);
  transition: all 0.16s ease;
}
.btn-secondary:hover { border-color: var(--accent-border); color: var(--accent); }

.btn-lg {
  font-size: 15px;
  padding: 12px 24px;
}

/* Layout Containers */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 132px 0 72px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.hero h1 {
  margin: 0 auto 18px;
  max-width: 820px;
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.hero-sub {
  margin: 0 auto 32px;
  max-width: 660px;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 52px;
}

/* Interactive Potential Energy Surface Showcase Card */
.pes-showcase {
  position: relative;
  border-radius: 26px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-glass);
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.pes-canvas {
  display: block;
  width: 100%;
  height: 360px;
}

.pes-overlay-top {
  position: absolute;
  top: 16px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.pes-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  padding: 5px 11px;
  border-radius: 999px;
}

.pes-legend {
  position: absolute;
  bottom: 16px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  pointer-events: none;
}

.pes-metric {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: 10px;
}

/* Metrics Strip */
.metrics-strip {
  padding: 20px 0 64px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: var(--shadow-card);
}

.metric-val {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.metric-label {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Section Headers */
.section {
  padding: 72px 0;
}

.section-header {
  max-width: 680px;
  margin-bottom: 40px;
}

.section-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.14;
}

.section-desc {
  margin: 0;
  font-size: 16px;
  color: var(--text-secondary);
}

/* 5-Stage Pipeline Grid */
.stages-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.stage-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 20px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.stage-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border);
}

.stage-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  width: fit-content;
  padding: 3px 9px;
  border-radius: 999px;
}

.stage-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.stage-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Engine Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.bento-7 { grid-column: span 7; }
.bento-5 { grid-column: span 5; }
.bento-4 { grid-column: span 4; }

.bento-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.bento-card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  padding: 5px 10px;
  border-radius: 8px;
}

/* Bottom CTA */
.cta-box {
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.1), rgba(94, 92, 230, 0.08));
  border: 1px solid var(--accent-border);
  border-radius: 28px;
  padding: 56px 32px;
  text-align: center;
  margin: 32px 0 64px;
}

.cta-box h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.cta-box p {
  margin: 0 auto 28px;
  max-width: 560px;
  font-size: 16px;
  color: var(--text-secondary);
}

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 28px 0 40px;
  font-size: 13px;
  color: var(--text-tertiary);
}

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

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}
.footer-links a:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 960px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .stages-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-7, .bento-5, .bento-4 { grid-column: span 12; }
  .nav-links { display: none; }
}

@media (max-width: 600px) {
  .metrics-grid, .stages-grid { grid-template-columns: 1fr; }
  .pes-canvas { height: 260px; }
}
