/* ── FoundationOS — Design System ──────────────────────────────── */
/* Global layout and components only. Theme colors live in per-page CSS files. */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Layout */
  --radius: 12px;
  --radius-sm: 8px;

  /* Semantic (same across all pages) */
  --green: #34d399;
  --green-glow: rgba(52,211,153,.12);
  --yellow: #fbbf24;
  --yellow-glow: rgba(251,191,36,.10);
  --red: #f87171;
  --red-glow: rgba(248,113,113,.10);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100vh;
  position: relative;
}

/* ── Atmosphere — glowing ambient orbs ── */
.atmo {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.atmo .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
}
.atmo .orb-1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  top: -250px;
  right: -200px;
  animation: float-1 25s ease-in-out infinite;
  opacity: .5;
}
.atmo .orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  bottom: -150px;
  left: -150px;
  animation: float-2 30s ease-in-out infinite;
  opacity: .35;
}
.atmo .orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  top: 50%;
  left: 60%;
  animation: float-3 35s ease-in-out infinite;
  opacity: .2;
}
@keyframes float-1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -20px); }
}
@keyframes float-2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, 30px); }
}
@keyframes float-3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(15px, 15px); }
}

/* ── Sparkle — tiny twinkling stars ── */
.sparkle {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.sparkle-dot {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: twinkle var(--dur, 4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes twinkle {
  0%, 100% { opacity: 0; }
  20% { opacity: .6; }
  40% { opacity: .1; }
  60% { opacity: .4; }
  80% { opacity: 0; }
}

/* ── App Container (scroll-snap) ── */
#app {
  position: relative;
  z-index: 1;
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
}

/* ── Pill Slider (Mental Model Spectrum) ── */
.pill-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  padding: 10px 16px;
  background: transparent;
  pointer-events: none;
}
.pill-nav .nav-rail {
  display: flex;
  align-items: center;
  gap: 0;
  pointer-events: auto;
  background: rgba(0,0,0,.5);
  border-radius: 999px;
  padding: 3px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.pill-nav a {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: all .35s ease;
  white-space: nowrap;
  letter-spacing: .02em;
}
.pill-nav a:hover { color: var(--text); }
.pill-nav a.active {
  color: #fff;
  background: var(--accent);
  font-weight: 600;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ── Dot Navigation ── */
#nav {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
#nav a {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  opacity: .35;
  transition: .22s;
  cursor: pointer;
  display: block;
}
#nav a.active {
  opacity: 1;
  background: var(--accent);
  transform: scale(1.4);
  box-shadow: 0 0 8px var(--accent);
}

/* ── Slides ── */
.slide {
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 90px;
  position: relative;
  background: rgba(var(--surface-r), var(--surface-g), var(--surface-b), .75);
}
.slide.hero { background: rgba(var(--surface-r), var(--surface-g), var(--surface-b), .85); }
.slide.bg-alt { background: rgba(var(--bg-r), var(--bg-g), var(--bg-b), .75); }
.slide.footer { text-align: center; }

/* ── Typography ── */
.label {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .68rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}
h1 {
  font-size: clamp(2.2rem, 4.5vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: 1.04;
  margin-bottom: 8px;
}
h2 {
  font-size: clamp(1.3rem, 2.5vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: 18px;
}
p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 700px;
  margin-bottom: 14px;
}
.large {
  font-size: 1.12rem;
  max-width: 800px;
  line-height: 1.7;
}

/* ── Hero Stats ── */
.hero-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: .85rem;
  color: var(--muted);
}
.hero-stats strong { color: var(--text); font-weight: 700; }

/* ── Grids ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }

/* ── Cards ── */
.card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.card-title {
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--accent);
}
.card-body {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.5;
}
.card-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
}
.card-label {
  font-size: .68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 4px;
}
.card-sub {
  font-size: .72rem;
  color: var(--muted-deep);
  margin-top: 2px;
}

/* ── Stack Diagram ── */
.stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 20px 0;
}
.stack-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  min-width: 340px;
}
.s-name {
  font-weight: 800;
  width: 80px;
  font-size: .85rem;
}
.s-role {
  font-size: .75rem;
  color: var(--muted);
  flex: 1;
}
.s-arrow {
  font-size: .6rem;
  color: var(--muted);
  padding: 1px 0;
}

/* ── Comparison Box ── */
.compare-box {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 20px;
}
.compare-box .col {
  flex: 1;
  padding: 18px;
}
.compare-box .col:first-child {
  background: var(--surface-2);
  border-right: 1px solid var(--line);
}
.compare-box .col.bad .hdr { color: var(--red); }
.compare-box .col.good .hdr { color: var(--green); }
.compare-box .hdr {
  font-size: .78rem;
  font-weight: 800;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.compare-box ul { list-style: none; }
.compare-box li {
  padding: 4px 0;
  font-size: .78rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line-sub);
}
.compare-box li:last-child { border-bottom: none; }

/* ── Live Data ── */
.live-data {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 18px;
  font-family: monospace;
  font-size: .75rem;
  max-width: 420px;
}
.live-data .row {
  display: flex;
  gap: 14px;
  padding: 4px 0;
}
.live-data .key { color: var(--muted); width: 140px; }
.live-data .val { color: var(--text); }
.live-data .val.green { color: var(--green); }

/* ── Pricing ── */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.plan {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.plan.featured {
  border-color: var(--accent);
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
}
.plan-name {
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--accent);
}
.plan-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}
.plan-price small {
  font-size: .9rem;
  font-weight: 400;
  color: var(--muted);
}
.plan ul { list-style: none; }
.plan li {
  padding: 4px 0;
  font-size: .78rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line-sub);
}
.plan li.cta-li {
  border-bottom: none;
  padding-top: 8px;
}
.plan li.cta-li a {
  color: var(--accent);
  text-decoration: none;
}

/* ── Tech Callout ── */
.tech-callout {
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 18px;
}
.tech-callout pre {
  font-family: monospace;
  font-size: .75rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
}

/* ── CTA ── */
.cta-box {
  text-align: center;
  margin-top: 28px;
}
.cta-box .cta {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  transition: .2s;
}
.cta-box .cta:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ── Audience Cards (Landing Page) ── */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  max-width: 900px;
  width: 100%;
}
.audience-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.audience-card:hover {
  border-color: var(--card-accent, var(--accent));
  transform: translateY(-2px);
}
.audience-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.audience-card p {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}
.audience-card .tag {
  display: inline-block;
  margin-top: 12px;
  font-size: .72rem;
  font-weight: 600;
}

/* ── Footer ── */
.footer-small {
  font-size: .75rem;
  color: var(--muted-deep);
  margin-top: 8px;
}

/* ── Responsive ── */
@media (max-width: 850px) {
  .slide { padding: 50px 24px; }
  .grid-3, .grid-4, .pricing { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  #nav { right: 6px; }
  .stack-row { min-width: auto; flex-wrap: wrap; }
  .compare-box { flex-direction: column; }
  .compare-box .col:first-child {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .pill-nav {
    padding: 8px 8px;
    overflow-x: auto;
    justify-content: flex-start;
  }
  .pill-nav .nav-rail {
    border-radius: 999px;
    padding: 2px;
  }
  .pill-nav a {
    font-size: .7rem;
    padding: 4px 10px;
  }
}

@media (max-width: 600px) {
  .audience-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 6px; }
}
