/* Parabable — Global Styles */
/* Dark mode default, monochrome + green accent */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --bg: #09090b;
  --bg-elevated: #111113;
  --bg-surface: #18181b;
  --border: #27272a;
  --border-subtle: #1e1e21;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --accent: #10b981;
  --accent-dim: #059669;
  --accent-subtle: rgba(16, 185, 129, 0.1);
  --alert: #ef4444;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1200px;
  --content-width: 800px;
}

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

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  font-weight: 400;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 300;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 400;
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

h4 {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

p {
  color: var(--text-secondary);
  max-width: 65ch;
  margin-bottom: 1rem;
}

p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

strong { color: var(--text-primary); font-weight: 500; }

code, .mono {
  font-family: var(--mono);
  font-size: 0.875em;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.narrow {
  max-width: var(--content-width);
}

.section {
  padding: 5rem 0;
}

.section--lg {
  padding: 7rem 0;
}

.section + .section {
  border-top: 1px solid var(--border-subtle);
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.nav__logo {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav__logo:hover {
  color: var(--text-primary);
}

.nav__links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  align-items: center;
}

.nav__links a {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 400;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--text-primary);
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.25rem;
}

.nav__toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav__toggle { display: block; }
  .nav__links {
    display: none;
    position: absolute;
    top: 3.5rem;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }
  .nav__links.open { display: flex; }
  .nav__links a { font-size: 1rem; padding: 0.375rem 0; }
}

/* Hero */
.hero {
  padding: 8rem 0 6rem;
  text-align: center;
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero p {
  max-width: 50ch;
  margin: 0 auto 2rem;
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.hero__tagline {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
  display: block;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--sans);
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
}

.btn--primary:hover {
  background: var(--accent-dim);
  color: var(--bg);
}

.btn--secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  color: var(--text-primary);
  border-color: var(--text-tertiary);
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Cards */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2rem;
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: var(--border);
}

.card h3 {
  font-family: var(--serif);
}

.card p {
  font-size: 0.9375rem;
}

/* Grid layouts */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* Divider */
.divider {
  width: 3rem;
  height: 1px;
  background: var(--accent);
  margin: 2rem 0;
}

/* Badge / Tag */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

/* Metric */
.metric {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0;
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer__brand {
  max-width: 320px;
}

.footer__brand-name {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.footer__brand p {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  line-height: 1.6;
}

.footer__nav {
  display: flex;
  gap: 3rem;
}

.footer__nav-group h5 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

.footer__nav-group ul {
  list-style: none;
}

.footer__nav-group li {
  margin-bottom: 0.375rem;
}

.footer__nav-group a {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.footer__nav-group a:hover {
  color: var(--text-primary);
}

.footer__bottom {
  width: 100%;
  padding-top: 2rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer__bottom p {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

@media (max-width: 640px) {
  .footer__inner { flex-direction: column; }
  .footer__nav { flex-direction: column; gap: 1.5rem; }
}

/* Page header (non-home pages) */
.page-header {
  padding: 5rem 0 3rem;
  text-align: center;
}

.page-header h1 {
  margin-bottom: 1rem;
}

.page-header p {
  max-width: 55ch;
  margin: 0 auto;
  font-size: 1.0625rem;
}

/* Prose */
.prose {
  max-width: var(--content-width);
}

.prose h2 { margin-top: 3rem; margin-bottom: 1rem; }
.prose h3 { margin-top: 2rem; margin-bottom: 0.75rem; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol {
  color: var(--text-secondary);
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.prose li { margin-bottom: 0.375rem; }
.prose blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* Architecture visualization (CSS only) */
.arch-viz {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 3rem auto;
  padding: 2rem;
}

.arch-layer {
  position: relative;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  background: var(--bg-elevated);
}

.arch-layer__label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.arch-layer__title {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--text-primary);
  margin-top: 0.25rem;
}

.arch-layer__desc {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

.arch-engines {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 480px) {
  .arch-engines { grid-template-columns: repeat(2, 1fr); }
}

.arch-engine {
  padding: 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--bg-surface);
  text-align: center;
}

.arch-engine__name {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--accent);
  display: block;
  margin-bottom: 0.125rem;
}

.arch-engine__label {
  font-size: 0.8125rem;
  color: var(--text-primary);
}

/* Animated subtle pulse on accent elements */
@keyframes subtlePulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.pulse {
  animation: subtlePulse 4s ease-in-out infinite;
}

/* Simulation visualization - abstract nodes */
.sim-viz {
  position: relative;
  width: 100%;
  height: 200px;
  margin: 2rem 0;
  overflow: hidden;
}

.sim-node {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
}

@keyframes drift {
  0% { transform: translate(0, 0); opacity: 0.3; }
  25% { opacity: 0.6; }
  50% { transform: translate(10px, -8px); opacity: 0.4; }
  75% { opacity: 0.7; }
  100% { transform: translate(0, 0); opacity: 0.3; }
}

.sim-node:nth-child(odd) { animation: drift 8s ease-in-out infinite; }
.sim-node:nth-child(even) { animation: drift 12s ease-in-out infinite reverse; }

/* Use case card with link */
.use-case-card {
  text-decoration: none;
  display: block;
}

.use-case-card .card { height: 100%; }

.use-case-card:hover .card {
  border-color: var(--accent);
}

/* Table */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
}

th {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  color: var(--text-secondary);
}

/* Form */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 0.875rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* Utility */
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }

/* Visually hidden */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
