/* ============================================================================
   OmniCore Systems — CANONICAL DESIGN TOKENS (single source of truth)
   Source: DESIGN.md §1–15 + Penpot OMNICORE FOUNDATIONS — DESIGN SYSTEM
   (file 6d1bbf95-fb03-8160-8008-9935ca218206)

   Consumers (must consume THIS file, never fork it):
   - apps/website/build.py  → concatenates into dist/assets/css/style.css
   - apps/outbound-gateway/src/canonical-tokens.js → preview engine (generated
     by scripts/sync-canonical-tokens.js; drift-checked)

   Light theme is the default. Dark theme follows the OS preference.
   WCAG 2.2 AA both themes.
   ========================================================================== */

/* --- Tokens (light — default) --- */
:root {
  /* Brand */
  --brand: #0A1628;            /* color-brand-primary — deep navy */
  --brand-secondary: #1A365D;  /* color-brand-secondary */
  --accent: #DD6B20;           /* color-brand-accent — use sparingly */
  --primary: var(--accent);    /* CTAs, highlights, focus */
  --primary-strong: #C05621;   /* accent hover (same hue, darker) */

  /* Surfaces & text (light) */
  --background: #FFFFFF;
  --surface: #F7FAFC;
  --surface-elevated: #EDF2F7;
  --foreground: #1A202C;
  --foreground-muted: #4A5568;
  --foreground-faint: #A0AEC0;
  --border: #E2E8F0;
  --border-strong: #CBD5E0;
  --secondary: #EDF2F7;

  /* Status */
  --success: #38A169;
  --warning: #D69E2E;
  --danger: #E53E3E;
  --info: #3182CE;

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Spacing scale (4px base) */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
  --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-16: 64px;
  --space-24: 96px;

  /* Radius */
  --radius-sm: 4px; --radius-control: 8px; --radius-card: 8px;
  --radius-panel: 16px; --radius-overlay: 20px; --radius-pill: 9999px;

  /* Elevation */
  --shadow-sm: 0 1px 3px rgba(10, 22, 40, 0.08), 0 1px 2px rgba(10, 22, 40, 0.04);
  --shadow-lg: 0 10px 40px rgba(10, 22, 40, 0.16);

  /* Motion */
  --motion-fast: 100ms; --motion-normal: 200ms; --motion-slow: 300ms; --motion-deliberate: 400ms;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-entrance: cubic-bezier(0.16, 1, 0.3, 1);

  --max-width: 1200px;
  --gutter: 24px;
}

/* --- Dark theme (OS preference) --- */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #0A1628;
    --surface: #12203A;
    --surface-elevated: #1A2C4C;
    --foreground: #F7FAFC;
    --foreground-muted: #A0AEC0;
    --foreground-faint: #718096;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --primary: #DD6B20;
    --primary-strong: #ED8936;
    --secondary: #1A2C4C;
    --brand: #DD6B20;
    --success: #48BB78;
    --warning: #ECC94B;
    --danger: #FC8181;
    --info: #63B3ED;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.6);
  }
}
/* ============================================================================
   OmniCore Systems — Public Website (component styles)
   Canonical design tokens are NOT defined here — they are consumed from
   design/tokens.css (single source of truth, DESIGN.md §1–15 + Penpot
   OMNICORE FOUNDATIONS — DESIGN SYSTEM, file 6d1bbf95-fb03-8160-8008-9935ca218206).
   build.py concatenates design/tokens.css + this file into dist.
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--primary); color: #0A1628; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Typography --- */
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(30px, 5vw, 44px); }
h2 { font-size: clamp(24px, 3.5vw, 32px); }
h3 { font-size: 20px; }
h4 { font-size: 16px; }

.display { font-size: clamp(36px, 6vw, 56px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.lead { font-size: 18px; color: var(--foreground-muted); line-height: 1.6; }
.muted { color: var(--foreground-muted); }
.small { font-size: 14px; }
.caption { font-size: 12px; color: var(--foreground-faint); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-feature-settings: "liga" 0, "calt" 0; }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space-16) 0; }
.section-tight { padding: var(--space-8) 0; }
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.flex { display: flex; align-items: center; gap: var(--space-4); }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.center { text-align: center; }
.mt-2 { margin-top: var(--space-2); } .mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); } .mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); } .mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); } .mb-8 { margin-bottom: var(--space-8); }

/* --- Header / nav --- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--background) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: var(--space-4); }
.brand { display: flex; align-items: center; gap: var(--space-3); font-weight: 600; color: var(--foreground); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; }
.brand-name { font-size: 16px; letter-spacing: -0.01em; }
.brand-name .accent { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: var(--space-2); list-style: none; }
.nav-links a:not(.btn) {
  display: inline-block; padding: var(--space-2) var(--space-3);
  color: var(--foreground-muted); font-size: 14px; font-weight: 500;
  border-radius: var(--radius-control); transition: color var(--motion-fast) var(--ease-standard);
}
.nav-links a:not(.btn):hover { color: var(--foreground); text-decoration: none; }
.nav-links a:not(.btn).active { color: var(--foreground); background: var(--secondary); }
.nav-cta { margin-left: var(--space-2); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--foreground); border-radius: var(--radius-control); padding: var(--space-2) var(--space-3); font-size: 14px; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: var(--space-2) var(--gutter) var(--space-4);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: var(--space-3); }
  .nav-cta { margin: var(--space-2) 0 0; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 40px; padding: 0 var(--space-4);
  border-radius: var(--radius-control);
  font-size: 15px; font-weight: 500; line-height: 1; border: 1px solid transparent;
  transition: background var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #0A1628; }
.btn-primary:hover { background: var(--primary-strong); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--foreground); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--foreground-muted); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--foreground); border-color: transparent; }
.btn-ghost:hover { background: var(--secondary); text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 85%, #000); text-decoration: none; }
.btn-sm { height: 36px; padding: 0 var(--space-3); font-size: 14px; }
.btn-lg { height: 48px; padding: 0 var(--space-6); font-size: 16px; }

/* --- Cards --- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: var(--space-2); }
.card p { color: var(--foreground-muted); font-size: 15px; }
.card .card-icon { width: 40px; height: 40px; border-radius: var(--radius-control); background: var(--secondary); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-4); color: var(--primary); }

/* --- Badges / status --- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  border: 1px solid var(--border); color: var(--foreground-muted);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-available { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); }
.badge-pilot { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 40%, transparent); }
.badge-dev { color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, transparent); }
.badge-verified { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); }
.badge-partial { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 40%, transparent); }
.badge-blocked { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }

/* --- Hero --- */
.hero { padding: var(--space-24) 0 var(--space-16); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 300px at 80% 0%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 70%),
    radial-gradient(400px 200px at 10% 100%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 70%);
}
.hero .container { position: relative; }
.hero h1 { margin-bottom: var(--space-6); }
.hero .lead { max-width: 640px; margin-bottom: var(--space-8); }
.hero-actions { display: flex; gap: var(--space-4); flex-wrap: wrap; }

/* --- Hero stats --- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-4); margin-top: var(--space-12); }
.stat { border-left: 2px solid var(--border); padding-left: var(--space-4); }
.stat .value { font-family: var(--font-mono); font-size: 28px; font-weight: 600; color: var(--foreground); }
.stat .label { font-size: 13px; color: var(--foreground-muted); margin-top: 2px; }

/* --- Feature rows --- */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: center; }
.feature-row.reverse .feature-text { order: 2; }
.feature-row.reverse .feature-visual { order: 1; }
.feature-text h2 { margin-bottom: var(--space-4); }
.feature-text p { color: var(--foreground-muted); margin-bottom: var(--space-4); }
.feature-text ul { list-style: none; margin: var(--space-4) 0; }
.feature-text li { padding: var(--space-2) 0; color: var(--foreground-muted); display: flex; gap: var(--space-3); align-items: flex-start; }
.feature-text li::before { content: "→"; color: var(--primary); font-family: var(--font-mono); }
.feature-visual {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-panel);
  padding: var(--space-8); box-shadow: var(--shadow-lg); min-height: 240px;
  display: flex; align-items: center; justify-content: center;
}
@media (max-width: 900px) {
  .feature-row { grid-template-columns: 1fr; gap: var(--space-8); }
  .feature-row.reverse .feature-text { order: 1; }
  .feature-row.reverse .feature-visual { order: 2; }
}

/* --- Flow diagram (visual) --- */
.flow { display: flex; flex-direction: column; gap: var(--space-3); width: 100%; }
.flow-step {
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--surface-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-control); padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono); font-size: 13px;
}
.flow-step .step-num { color: var(--primary); font-weight: 600; }
.flow-step .step-arrow { color: var(--foreground-muted); margin-left: auto; }

/* --- Table --- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-card); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--foreground-muted); background: var(--surface); }
tr:last-child td { border-bottom: none; }
td { color: var(--foreground-muted); }
td strong { color: var(--foreground); }

/* --- Forms --- */
.form { display: grid; gap: var(--space-4); max-width: 560px; }
.form-group { display: grid; gap: var(--space-2); }
.form-group label { font-size: 14px; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
  font-family: inherit; font-size: 15px; color: var(--foreground);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-control); padding: var(--space-3) var(--space-4);
  transition: border-color var(--motion-fast) var(--ease-standard);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-note { font-size: 13px; color: var(--foreground-muted); }
.form-error { color: var(--danger); font-size: 14px; }
.form-success { color: var(--success); font-size: 15px; padding: var(--space-4); border: 1px solid color-mix(in srgb, var(--success) 40%, transparent); border-radius: var(--radius-control); background: color-mix(in srgb, var(--success) 8%, transparent); }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--border); padding: var(--space-12) 0 var(--space-8); margin-top: var(--space-16); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-8); }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--foreground-muted); margin-bottom: var(--space-4); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--space-2); }
.footer-col a { color: var(--foreground-muted); font-size: 14px; }
.footer-col a:hover { color: var(--foreground); }
.footer-bottom { margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; font-size: 13px; color: var(--foreground-muted); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }

/* --- Page header (interior pages) --- */
.page-header { padding: var(--space-16) 0 var(--space-8); }
.page-header h1 { margin-bottom: var(--space-4); }
.page-header .lead { max-width: 720px; }
.breadcrumb { font-size: 13px; color: var(--foreground-muted); margin-bottom: var(--space-4); }
.breadcrumb a { color: var(--foreground-muted); }
.breadcrumb a:hover { color: var(--brand); }

/* --- Callout --- */
.callout {
  border: 1px solid var(--border); border-left: 3px solid var(--primary);
  border-radius: var(--radius-control); padding: var(--space-4) var(--space-6);
  background: var(--surface); margin: var(--space-6) 0;
}
.callout-warning { border-left-color: var(--warning); }
.callout-success { border-left-color: var(--success); }
.callout p { color: var(--foreground-muted); font-size: 14px; }

/* --- FAQ --- */
.faq details { border: 1px solid var(--border); border-radius: var(--radius-control); margin-bottom: var(--space-3); background: var(--surface); }
.faq summary { padding: var(--space-4) var(--space-6); font-weight: 600; cursor: pointer; font-size: 15px; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq details p { padding: var(--space-4) var(--space-6); color: var(--foreground-muted); font-size: 14px; }

/* --- Timeline --- */
.timeline { list-style: none; border-left: 2px solid var(--border); margin-left: var(--space-2); }
.timeline li { position: relative; padding: 0 0 var(--space-6) var(--space-6); }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); border: 2px solid var(--background); }
.timeline h4 { margin-bottom: var(--space-1); }
.timeline p { color: var(--foreground-muted); font-size: 14px; }

/* --- Code block --- */
pre {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-6); overflow-x: auto;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.6; color: var(--foreground);
}
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--secondary); padding: 2px 6px; border-radius: 4px; }
pre code { background: none; padding: 0; }

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* --- Print --- */
@media print {
  .site-header, .site-footer, .hero-actions, .nav-cta { display: none; }
  body { background: #fff; color: #000; }
}