/* ============================================================
   Ospiri — Design System
   Deep navy + oxide accent. Infrastructure-grade restraint.
   ============================================================ */

:root {
  /* Colors */
  --bg: #0a1628;
  --bg-raised: #11203a;
  --bg-card: #0f1d34;
  --bg-elevated: #14253f;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8ecf1;
  --text-muted: #8a9bb4;
  --text-subtle: #5e7290;
  --accent: #c46e4a;
  --accent-bright: #e08560;
  --accent-dim: rgba(196, 110, 74, 0.14);
  --accent-glow: rgba(196, 110, 74, 0.32);
  --success: #4ade80;
  --warning: #fbbf24;
  --danger: #f87171;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Monaco, Consolas, monospace;

  /* Layout */
  --max-width: 1200px;
  --content-width: 760px;
  --gutter: clamp(20px, 4vw, 48px);

  /* Radius */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(196, 110, 74, 0.07), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 30%, rgba(70, 100, 180, 0.05), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* ----------- Layout primitives ----------- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section {
  padding: clamp(64px, 10vw, 128px) 0;
  position: relative;
}

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

/* ----------- Typography ----------- */

h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.25rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  letter-spacing: -0.025em;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  letter-spacing: -0.02em;
}

h4 {
  font-size: 1.125rem;
  letter-spacing: -0.015em;
}

p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.65;
}

p.lead {
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 640px;
}

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

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

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-raised);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--accent-bright);
}

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

/* ----------- Eyebrow / status pill ----------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-muted);
  padding: 6px 12px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ----------- Header / nav ----------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(10, 22, 40, 0.72);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: -0.04em;
}

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

.brand-mark {
  width: 28px;
  height: 28px;
  display: block;
}

.brand-name {
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 450;
  transition: color 0.15s ease;
}

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

.nav-cta-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
}

/* ----------- Buttons ----------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: var(--font-sans);
  letter-spacing: -0.005em;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-bright);
  color: #fff;
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

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

.btn-secondary:hover {
  background: var(--bg-raised);
  color: var(--text);
  border-color: var(--text-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-large {
  padding: 14px 24px;
  font-size: 1rem;
}

/* ----------- Hero ----------- */

.hero {
  padding-top: clamp(64px, 10vw, 120px);
  padding-bottom: clamp(64px, 10vw, 120px);
  text-align: left;
}

.hero-eyebrow {
  margin-bottom: 28px;
}

.hero h1 {
  margin-bottom: 24px;
  max-width: 18ch;
}

.hero .lead {
  margin-bottom: 40px;
  max-width: 56ch;
}

.hero-form {
  margin-top: 8px;
}

/* ----------- Waitlist form ----------- */

.waitlist-form {
  display: flex;
  gap: 8px;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 6px;
  transition: border-color 0.15s ease;
}

.waitlist-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.waitlist-form input[type="email"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  padding: 10px 14px;
  min-width: 0;
}

.waitlist-form input[type="email"]::placeholder {
  color: var(--text-subtle);
}

.waitlist-form button {
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.15s ease;
  white-space: nowrap;
}

.waitlist-form button:hover {
  background: var(--accent-bright);
}

.waitlist-note {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

.waitlist-success {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 8px;
  color: var(--success);
  font-size: 0.9375rem;
}

.waitlist-success.is-visible {
  display: block;
}

/* ----------- Section heading block ----------- */

.section-heading {
  margin-bottom: 56px;
  max-width: 720px;
}

.section-heading .eyebrow {
  margin-bottom: 20px;
}

.section-heading h2 {
  margin-bottom: 16px;
}

.section-heading p.lead {
  color: var(--text-muted);
}

/* ----------- 3-up grid ----------- */

.three-up {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 820px) {
  .three-up {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-card-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 24px;
  color: var(--accent-bright);
}

.feature-card h3 {
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* ----------- Isolation layers list ----------- */

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

@media (max-width: 720px) {
  .layer-list {
    grid-template-columns: 1fr;
  }
}

.layer {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.layer-num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  min-width: 24px;
}

.layer h4 {
  margin-bottom: 6px;
}

.layer p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.layer.coming-soon {
  opacity: 0.6;
  border-style: dashed;
}

.layer .roadmap-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ----------- Stats band ----------- */

.stats-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

@media (max-width: 720px) {
  .stats-band {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.stat {
  text-align: left;
}

.stat-value {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-value .accent {
  color: var(--accent-bright);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ----------- GTM lanes (3-up large) ----------- */

.gtm-lanes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

@media (max-width: 900px) {
  .gtm-lanes {
    grid-template-columns: 1fr;
  }
}

.gtm-lane {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease;
}

.gtm-lane:hover {
  border-color: var(--accent);
}

.gtm-lane-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.gtm-lane h3 {
  margin-bottom: 12px;
}

.gtm-lane p {
  font-size: 0.9375rem;
  margin-bottom: 24px;
  flex: 1;
}

.gtm-lane-link {
  font-size: 0.9375rem;
  color: var(--accent-bright);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gtm-lane-link:hover {
  color: var(--text);
}

.gtm-lane-link::after {
  content: '→';
  transition: transform 0.15s ease;
}

.gtm-lane-link:hover::after {
  transform: translateX(2px);
}

/* ----------- Team / two-up ----------- */

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

@media (max-width: 720px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.team-card h3 {
  margin-bottom: 4px;
}

.team-card .role {
  font-size: 0.875rem;
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

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

/* ----------- Manifesto / quote block ----------- */

.manifesto {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  padding: 32px 40px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.45;
  color: var(--text);
  letter-spacing: -0.015em;
  font-weight: 400;
  max-width: 720px;
  margin: 0 auto;
}

/* ----------- CTA section ----------- */

.cta-section {
  text-align: center;
  padding: clamp(80px, 12vw, 160px) 0;
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, rgba(196, 110, 74, 0.08), transparent 70%);
}

.cta-section h2 {
  margin-bottom: 20px;
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
}

.cta-section p.lead {
  margin: 0 auto 40px;
  max-width: 540px;
}

.cta-section .waitlist-form {
  margin: 0 auto;
}

.cta-section .waitlist-note {
  text-align: center;
}

/* ----------- Article body (keyword pages) ----------- */

.article-hero {
  padding: clamp(64px, 9vw, 112px) 0 clamp(48px, 6vw, 80px);
}

.article-hero .eyebrow {
  margin-bottom: 24px;
}

.article-hero h1 {
  margin-bottom: 24px;
  max-width: 22ch;
}

.article-hero .lead {
  max-width: 60ch;
}

.article-body {
  padding: 0 0 clamp(64px, 8vw, 96px);
}

.article-body .container-narrow > * + * {
  margin-top: 28px;
}

.article-body h2 {
  margin-top: 56px;
  margin-bottom: 20px;
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
}

.article-body h3 {
  margin-top: 40px;
  margin-bottom: 12px;
}

.article-body p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.article-body ul {
  padding-left: 24px;
  color: var(--text-muted);
}

.article-body li {
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: 8px;
}

.article-body li::marker {
  color: var(--accent);
}

.article-body .callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 24px 28px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 32px 0;
}

.article-body .callout p {
  color: var(--text);
  font-size: 1.0625rem;
  margin: 0;
}

/* ----------- Related links (keyword pages) ----------- */

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

@media (max-width: 600px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}

.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: block;
  color: var(--text);
  transition: border-color 0.15s ease;
}

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

.related-card-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.related-card h4 {
  margin-bottom: 4px;
}

.related-card p {
  font-size: 0.875rem;
  margin: 0;
}

/* ----------- Footer ----------- */

.site-footer {
  padding: 64px 0 48px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 320px;
  margin-top: 12px;
}

.footer-col h5 {
  font-size: 0.75rem;
  color: var(--text-subtle);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  font-family: var(--font-mono);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

@media (max-width: 600px) {
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ----------- Utilities ----------- */

.text-accent { color: var(--accent-bright); }
.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.mono { font-family: var(--font-mono); }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 32px; }
.mt-8 { margin-top: 64px; }

/* ----------- Inter font ----------- */
@import url('https://rsms.me/inter/inter.css');
@font-face {
  font-family: 'JetBrains Mono';
  src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
