/* m00labs — shared site stylesheet
   Tokens inlined from /workspace/design-system/tokens.css (m00labs / OpenAI-schema brand).
   Typography: Inter (body/UI) + Source Serif Pro (hero display moments only).
   Weights capped at 600. Single accent teal #10a37f (deep #0a7a5e for AA text links).
   No gradients, no photography, no decorative animation (DESIGN.md ## Imagery). */

:root {
  /* Surface */
  --bg: #ffffff;
  --surface: #f5f5f5;
  --surface-warm: #fafafa;
  /* Foreground */
  --fg: #0d0d0d;
  --fg-2: #1a1a1a;
  --muted: #6e6e6e;
  /* Border */
  --border: #e5e5e5;
  --border-soft: #ededed;
  /* Accent */
  --accent: #10a37f;
  --accent-on: #ffffff;
  --accent-hover: #0a7a5e;
  --link: #0a7a5e;
  --link-active: #035442;
  /* Semantic */
  --danger: #ef4146;
  --success: #10a37f;
  /* Typography */
  --font-display: "Source Serif Pro", Georgia, ui-serif, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  /* Type scale */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 28px;
  --text-3xl: 34px;
  --text-4xl: 44px;
  --text-5xl: 56px;
  /* Radii (tokens.css: 16 cards, 12 buttons/inputs) */
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  /* Layout */
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 32px);
  --section-pad: clamp(72px, 9vw, 112px);
  /* Misc */
  --header-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(10, 122, 94, 0.35); }
a:hover { color: var(--link-active); }
:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 2px; border-radius: 4px; }
::placeholder { color: #9b9b9b; }

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding-left: 1.25rem; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--fg); color: #ffffff; }
.btn-primary:hover { background: #262626; color: #ffffff; }
.btn-teal { background: var(--fg); color: #ffffff; }
.btn-outline { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-outline:hover { border-color: var(--fg); background: var(--surface-warm); }
.btn-light { background: #ffffff; color: var(--fg); }
.btn-light:hover { background: #e8e8e8; color: var(--fg); }
.btn-ghost-light { background: transparent; color: #ffffff; border-color: rgba(255, 255, 255, 0.4); }
.btn-ghost-light:hover { border-color: #ffffff; background: rgba(255, 255, 255, 0.08); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: var(--text-sm); }
.btn-lg { min-height: 54px; padding: 15px 28px; font-size: var(--text-lg); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}
.brand {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
}
.brand:hover { color: var(--fg); }
.wm-accent { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: var(--fg);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
}
.site-nav a:hover { background: var(--surface-warm); color: var(--fg); }
.site-nav a[aria-current="page"] { color: var(--link-active); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--surface-warm); }
.nav-toggle .bar { display: block; width: 20px; height: 2px; background: var(--fg); margin: 3px 0; border-radius: 2px; transition: transform 0.15s ease, opacity 0.15s ease; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Hero (home) ---------- */
.hero { padding: clamp(56px, 8vw, 96px) 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--accent); }
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 5.2vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin-bottom: 24px;
}
.lede { font-size: var(--text-lg); line-height: 1.6; color: var(--muted); max-width: 34em; }
.hero .lede { margin-bottom: 32px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.trustbar { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 0; margin: 0; list-style: none; border-top: 1px solid var(--border-soft); padding-top: 20px; }
.trustbar li { display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-sm); font-weight: 500; color: var(--fg-2); }
.trustbar svg { flex: none; }

.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; }

/* ---------- Sections ---------- */
.section { padding: var(--section-pad) 0; }
.section-tight { padding: 48px 0; }
.section-pearl { background: var(--surface-warm); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.section-head { max-width: 46em; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 36px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: var(--text-lg); }
.h2, h2 { font-size: clamp(28px, 3.4vw, 36px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.h3, h3 { font-size: var(--text-xl); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.section-link { margin-top: 24px; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.card {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { border-color: var(--border); box-shadow: 0 12px 32px rgba(13, 13, 13, 0.05); }
.card .card-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--surface-warm); display: inline-flex; align-items: center; justify-content: center; }
.card .card-icon svg { width: 24px; height: 24px; stroke: var(--accent); }
.card h3 { margin-bottom: 4px; }
.card p { color: var(--muted); font-size: var(--text-base); line-height: 1.55; flex: 1; }
.card .tag { font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-hover); }
.card-link { font-weight: 500; font-size: var(--text-base); text-decoration: none; }
.card-link::after { content: " →"; }

/* ---------- Differentiator rows ---------- */
.diff-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px 32px; }
.diff-item { border-top: 1px solid var(--border); padding-top: 22px; }
.diff-item .diff-icon { margin-bottom: 14px; }
.diff-item .diff-icon svg { width: 26px; height: 26px; stroke: var(--accent); }
.diff-item h3 { margin-bottom: 8px; }
.diff-item p { color: var(--muted); line-height: 1.6; }

/* ---------- Steps / process ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.04em;
}
.step h3 { margin: 12px 0 8px; }
.step p { color: var(--muted); line-height: 1.6; }

/* ---------- Final CTA band ---------- */
.cta-band { background: var(--fg); color: #ffffff; }
.cta-band .section-head h2, .cta-band h2 { color: #ffffff; }
.cta-band .section-head p { color: rgba(255, 255, 255, 0.72); }
.cta-band .cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.cta-band a.plain-light { color: rgba(255, 255, 255, 0.8); }
.cta-mail { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: var(--text-base); color: rgba(255, 255, 255, 0.85); }
.cta-mail:hover { color: #ffffff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--fg); color: rgba(255, 255, 255, 0.78); padding: 72px 0 32px; font-size: var(--text-sm); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 40px; margin-bottom: 56px; }
.footer-brand { color: #ffffff; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; display: inline-block; margin-bottom: 14px; }
.site-footer p.summary { line-height: 1.65; max-width: 34em; margin-bottom: 18px; color: rgba(255, 255, 255, 0.72); }
.site-footer h4 { color: #ffffff; font-size: var(--text-sm); font-weight: 600; margin-bottom: 14px; letter-spacing: 0.02em; }
.footer-nav { display: grid; gap: 6px; }
.site-footer a { color: rgba(255, 255, 255, 0.78); text-decoration: none; }
.site-footer a:hover { color: #ffffff; text-decoration: underline; text-underline-offset: 3px; }
.footer-contact a { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.14); padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: rgba(255, 255, 255, 0.55); }

/* ---------- Subpage page-head ---------- */
.page-head { padding: clamp(48px, 7vw, 80px) 0 clamp(28px, 4vw, 48px); }
.crumbs { font-size: var(--text-sm); color: var(--muted); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--link-active); text-decoration: underline; }
.page-head h1 { font-size: clamp(34px, 4.4vw, 48px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; margin-bottom: 16px; }
.page-head .lede { max-width: 44em; margin: 0; }

/* ---------- Prose / content layouts ---------- */
.prose { max-width: 46em; }
.prose p, .prose ul, .prose ol, .prose h2, .prose h3, .prose h4, .prose figure { margin-bottom: 18px; }
.prose p { color: var(--fg-2); }
.prose ul li, .prose ol li { margin-bottom: 8px; color: var(--fg-2); }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.prose-block h2 { margin-bottom: 18px; }
.split-list { display: grid; gap: 14px; }
.scope-panel { border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 28px 26px; background: var(--bg); }
.scope-panel h3 { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.scope-panel ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.scope-panel li { padding-left: 26px; position: relative; color: var(--fg-2); line-height: 1.55; }
.scope-panel.in li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 14px; height: 8px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.scope-panel.out li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 14px; height: 2px; background: var(--danger); }
.scope-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 32px 0; }
.scope-panel .muted-note { font-size: var(--text-sm); color: var(--muted); margin-top: 14px; display: block; }

/* Fit / not-fit two-col */
.fit-list { display: grid; gap: 12px; }
.fit-list li { list-style: none; position: relative; padding-left: 26px; }
.fit-list li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 14px; height: 8px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

/* ---------- Packages page ---------- */
.pkg { border-top: 1px solid var(--border); padding: clamp(40px, 6vw, 64px) 0; }
.pkg:first-of-type { border-top: 0; }
.pkg-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.pkg h2 { margin-bottom: 10px; }
.pkg .pkg-sub { color: var(--muted); font-size: var(--text-lg); margin-bottom: 22px; max-width: 30em; }
.pkg .prose p { margin-bottom: 12px; }
.pkg-lists { display: grid; gap: 16px; }
.pkg-cta { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.pkg-cta .note { font-size: var(--text-sm); color: var(--muted); }

/* ---------- Insights ---------- */
.article { border-top: 1px solid var(--border); padding: clamp(40px, 6vw, 64px) 0; }
.article:first-of-type { border-top: 0; }
.article-head { margin-bottom: 20px; }
.article-head .kicker { font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-hover); margin-bottom: 10px; display: block; }
.article-head h2 { margin-bottom: 10px; }
.article-body { max-width: 46em; }
.article-body p { margin-bottom: 16px; }
.article-body h3 { margin: 26px 0 10px; }

/* ---------- Contact / forms ---------- */
.form-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.form-card { border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: clamp(24px, 3vw, 36px); background: var(--bg); }
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-weight: 500; font-size: var(--text-sm); margin-bottom: 8px; }
.form-field .req { color: var(--danger); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--fg);
  background: var(--bg);
  appearance: none;
}
.form-field textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.form-field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230d0d0d' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 42px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--accent-hover); box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.14); }
.form-field .field-error { display: none; color: var(--danger); font-size: var(--text-sm); margin-top: 6px; }
.form-field.has-error input, .form-field.has-error select, .form-field.has-error textarea { border-color: var(--danger); }
.form-field.has-error .field-error { display: block; }
.form-status { display: none; border-radius: var(--radius-sm); padding: 14px 16px; font-size: var(--text-base); margin: 4px 0 20px; line-height: 1.5; }
.form-status.is-visible { display: block; }
.form-status.success { background: #e9f7f1; color: #065f46; border: 1px solid #b6e5d2; }
.form-status.error { background: #fdecec; color: #8c1d18; border: 1px solid #f5c6c4; }
.contact-channels { display: grid; gap: 22px; }
.contact-channel h3 { margin-bottom: 6px; }
.contact-channel p { color: var(--muted); }
.contact-channel a { font-weight: 500; word-break: break-all; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .content-grid, .form-wrap, .pkg-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 560px; }
  .scope-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px var(--gutter) 20px;
    box-shadow: 0 24px 40px rgba(13, 13, 13, 0.08);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 13px 8px; border-radius: var(--radius-sm); font-size: var(--text-base); }
  .nav-toggle { display: inline-flex; }
  .header-cta-desktop { display: none; }
  .header-inner { min-height: 64px; }
  :root { --header-h: 64px; }
  .trustbar { gap: 10px 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .btn { width: 100%; }
  .hero-ctas .btn { width: auto; flex: 1 1 100%; }
  .cta-actions .btn { width: auto; flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, a { transition: none; }
}
