/* ============================================================
   MANDARUM — Design System
   The agent OS for the enterprise
   Flat. Editorial. AI-native. No gradients. No shadows.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Color — flat, premium, monochrome with single signal accent */
  --ink:          #0A0A0A;
  --ink-2:        #1A1A1A;
  --graphite:     #3A3A3A;
  --muted:        #6B6B6B;
  --muted-2:      #9A9A95;
  --line:         #E6E5E0;
  --line-2:       #ECEBE6;
  --surface:      #FFFFFF;
  --bg:           #FAFAF7;
  --bg-2:         #F2F1EC;
  --ink-inv:      #FAFAF7;

  --accent:       #FF4D1F;        /* Mandarum signal orange */
  --accent-ink:   #FFFFFF;
  --ok:           #18794E;
  --warn:         #B8580C;
  --err:          #B42318;

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Scale (clamped, fluid) */
  --fs-xs:    12px;
  --fs-sm:    13px;
  --fs-base:  15px;
  --fs-md:    17px;
  --fs-lg:    20px;
  --fs-xl:    24px;
  --fs-2xl:   32px;
  --fs-3xl:   clamp(34px, 4vw, 48px);
  --fs-4xl:   clamp(44px, 6vw, 72px);
  --fs-5xl:   clamp(56px, 8vw, 104px);

  /* Spacing — 4px base */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 20px;  --s-6: 24px;  --s-7: 32px;  --s-8: 40px;
  --s-9: 48px;  --s-10: 64px; --s-11: 80px; --s-12: 96px;
  --s-13: 128px; --s-14: 160px;

  /* Radii — modest, premium */
  --r-1: 4px;
  --r-2: 6px;
  --r-3: 10px;
  --r-4: 14px;
  --r-pill: 999px;

  /* Layout */
  --container: 1240px;
  --container-narrow: 880px;
  --nav-h: 64px;

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
  --t-fast: 140ms;
  --t-med: 220ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
::selection { background: var(--ink); color: var(--ink-inv); }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
  line-height: 1.05;
}
h1 { font-size: var(--fs-4xl); letter-spacing: -0.035em; font-weight: 600; }
h2 { font-size: var(--fs-3xl); letter-spacing: -0.03em; }
h3 { font-size: var(--fs-2xl); letter-spacing: -0.025em; }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
p  { margin: 0; }
.mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: -0.01em; }

/* Utility text */
.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  color: var(--muted);
}
.lead { font-size: var(--fs-lg); color: var(--graphite); line-height: 1.5; max-width: 64ch; }
.dim  { color: var(--muted); }
.fine { font-size: var(--fs-xs); color: var(--muted); }

/* ---------- Layout ---------- */
.container       { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--s-6); }
.container-narrow{ width: 100%; max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--s-6); }
.section { padding: var(--s-12) 0; border-top: 1px solid var(--line); }
.section.first { border-top: 0; padding-top: var(--s-10); }
.section.compact { padding: var(--s-10) 0; }
.section-head { display: flex; flex-direction: column; gap: var(--s-3); margin-bottom: var(--s-9); max-width: 760px; }
.section-head .eyebrow + h2 { margin-top: var(--s-2); }

.grid { display: grid; gap: var(--s-6); }
.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: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.row { display: flex; gap: var(--s-4); align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.divide > * + * { border-top: 1px solid var(--line); padding-top: var(--s-6); margin-top: var(--s-6); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border: 1px solid var(--ink);
  background: var(--ink); color: var(--ink-inv);
  border-radius: var(--r-2);
  font-size: var(--fs-sm); font-weight: 500;
  letter-spacing: -0.005em;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:hover { background: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.accent:hover { background: #E94319; border-color: #E94319; }
.btn.lg { height: 48px; padding: 0 20px; font-size: var(--fs-base); }
.btn.sm { height: 32px; padding: 0 12px; font-size: var(--fs-xs); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

.arrow::after { content: "→"; margin-left: 6px; transition: transform var(--t-fast) var(--ease); display: inline-block; }
.arrow:hover::after { transform: translateX(3px); }
.link {
  display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  color: var(--ink);
  transition: border-color var(--t-fast) var(--ease);
}
.link:hover { border-color: var(--ink); }

/* ---------- Tags / Badges ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--surface);
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  font-family: var(--font-mono); font-size: 11px;
  color: var(--graphite); background: var(--bg);
}
.badge.live { color: var(--ok); }
.badge.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); display: inline-block; margin-right: 6px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-6);
}
.card.flat { background: var(--bg); }
.card.tight { padding: var(--s-5); }
.card h3, .card h4 { margin-bottom: var(--s-2); }
.card p { color: var(--muted); }

/* Bento — flat, border-only */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s-4); }
.bento .cell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-7);
  min-height: 220px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.bento .c-3 { grid-column: span 3; }
.bento .c-2 { grid-column: span 2; }
.bento .c-4 { grid-column: span 4; }
.bento .c-6 { grid-column: span 6; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .bento .cell { grid-column: span 1 !important; }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-6);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; font-size: 15px; }
.brand-mark {
  width: 22px; height: 22px;
  border: 1.5px solid var(--ink);
  border-radius: 5px;
  display: grid; place-items: center;
  position: relative;
}
.brand-mark::before { content: ""; position: absolute; inset: 4px; border: 1.5px solid var(--ink); border-radius: 2px; }
.brand-mark::after { content: ""; position: absolute; inset: 8px; background: var(--accent); border-radius: 1px; }

.nav-links { display: flex; align-items: center; gap: var(--s-6); }
.nav-links a { font-size: var(--fs-sm); color: var(--graphite); transition: color var(--t-fast) var(--ease); }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-links, .nav-cta .btn:not(.primary-cta) { display: none; }
  .nav-toggle {
    display: inline-flex; width: 36px; height: 36px;
    border: 1px solid var(--line); border-radius: var(--r-2);
    align-items: center; justify-content: center;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ""; display: block; width: 16px; height: 1.5px; background: var(--ink); position: relative;
  }
  .nav-toggle span::before { position: absolute; top: -5px; }
  .nav-toggle span::after { position: absolute; top: 5px; }
  .mobile-menu {
    display: none;
    border-top: 1px solid var(--line);
    background: var(--bg);
    padding: var(--s-5) var(--s-6);
  }
  .mobile-menu.open { display: block; }
  .mobile-menu a { display: block; padding: 10px 0; color: var(--ink); border-bottom: 1px solid var(--line-2); font-size: var(--fs-md); }
  .mobile-menu .btn { margin-top: var(--s-4); width: 100%; }
}

/* ---------- Hero ---------- */
.hero {
  padding: var(--s-13) 0 var(--s-12);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.hero h1 { max-width: 18ch; }
.hero .lead { margin-top: var(--s-5); }
.hero .btn-row { margin-top: var(--s-7); }
.hero-meta {
  margin-top: var(--s-10);
  display: flex; align-items: center; gap: var(--s-6); flex-wrap: wrap;
  padding-top: var(--s-6); border-top: 1px solid var(--line);
  color: var(--muted); font-size: var(--fs-xs);
  font-family: var(--font-mono); letter-spacing: 0.04em;
}

/* Grid backdrop — subtle, flat */
.grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at top, #000 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at top, #000 30%, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}

/* ---------- Metrics ---------- */
.metrics {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--r-3);
  overflow: hidden; background: var(--surface);
}
.metrics .m {
  padding: var(--s-6);
  border-right: 1px solid var(--line);
}
.metrics .m:last-child { border-right: 0; }
.metrics .m .v { font-family: var(--font-display); font-size: var(--fs-2xl); letter-spacing: -0.025em; }
.metrics .m .k { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-top: 6px; }
@media (max-width: 900px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metrics .m:nth-child(2) { border-right: 0; }
  .metrics .m:nth-child(1), .metrics .m:nth-child(2) { border-bottom: 1px solid var(--line); }
}

/* ---------- Logos strip ---------- */
.logos {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s-6);
  align-items: center;
  padding: var(--s-7) 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.logos .logo {
  font-family: var(--font-display);
  font-weight: 600; letter-spacing: -0.02em;
  font-size: 18px; color: var(--muted-2);
  text-align: center;
  opacity: .9;
}
@media (max-width: 900px) { .logos { grid-template-columns: repeat(3, 1fr); gap: var(--s-4); } }

/* ---------- Feature blocks ---------- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-10);
  align-items: center;
  padding: var(--s-10) 0;
  border-top: 1px solid var(--line);
}
.feature:first-child { border-top: 0; }
.feature .num { font-family: var(--font-mono); color: var(--muted); font-size: 12px; }
.feature h3 { margin: var(--s-3) 0; }
.feature p { color: var(--graphite); }
.feature .visual {
  border: 1px solid var(--line); border-radius: var(--r-3);
  background: var(--surface); padding: var(--s-7);
  min-height: 360px;
}
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; gap: var(--s-6); } .feature .visual { min-height: 280px; } }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.plan {
  border: 1px solid var(--line); border-radius: var(--r-3);
  background: var(--surface);
  padding: var(--s-7);
  display: flex; flex-direction: column; gap: var(--s-5);
}
.plan.featured { border-color: var(--ink); }
.plan h3 { font-size: var(--fs-xl); }
.plan .price { display: flex; align-items: baseline; gap: 6px; }
.plan .price .n { font-family: var(--font-display); font-size: 40px; letter-spacing: -0.03em; }
.plan .price .u { color: var(--muted); font-size: var(--fs-sm); font-family: var(--font-mono); }
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.plan ul li { display: flex; gap: 10px; color: var(--graphite); font-size: var(--fs-sm); }
.plan ul li::before { content: "→"; color: var(--muted-2); }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }

/* ---------- Tabs ---------- */
.tabs { border-bottom: 1px solid var(--line); display: flex; gap: var(--s-5); }
.tab {
  padding: 10px 0; margin-bottom: -1px;
  font-size: var(--fs-sm); color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.tab:hover { color: var(--ink); }
.tab-panel { display: none; padding-top: var(--s-6); }
.tab-panel.active { display: block; }

/* ---------- Accordion ---------- */
.acc { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-trigger {
  width: 100%; text-align: left;
  padding: var(--s-5) 0;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  font-size: var(--fs-md); color: var(--ink);
  font-weight: 500;
}
.acc-trigger .ic { width: 16px; height: 16px; position: relative; flex-shrink: 0; }
.acc-trigger .ic::before, .acc-trigger .ic::after { content: ""; position: absolute; background: var(--ink); }
.acc-trigger .ic::before { top: 50%; left: 0; right: 0; height: 1.5px; transform: translateY(-50%); }
.acc-trigger .ic::after  { left: 50%; top: 0; bottom: 0; width: 1.5px; transform: translateX(-50%); transition: transform var(--t-fast) var(--ease); }
.acc-item.open .acc-trigger .ic::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }
.acc-content { max-height: 0; overflow: hidden; transition: max-height var(--t-med) var(--ease); color: var(--graphite); }
.acc-content > div { padding: 0 0 var(--s-5); max-width: 70ch; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: var(--fs-xs); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.input, .textarea, .select {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  font-size: var(--fs-base);
  color: var(--ink);
  transition: border-color var(--t-fast) var(--ease);
}
.input:focus, .textarea:focus, .select:focus { outline: 0; border-color: var(--ink); }
.textarea { min-height: 120px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- Code / terminal ---------- */
.code {
  background: var(--ink); color: var(--ink-inv);
  border-radius: var(--r-3);
  padding: var(--s-6);
  font-family: var(--font-mono); font-size: 13px;
  line-height: 1.6;
  overflow: auto;
}
.code .c-key { color: #FFB48A; }
.code .c-str { color: #B5E48C; }
.code .c-com { color: #8A8A85; }
.code .c-fn  { color: #9ECBFF; }
.terminal {
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  overflow: hidden;
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.terminal-bar .dots { display: flex; gap: 5px; margin-right: 8px; }
.terminal-bar .dots span { width: 10px; height: 10px; border: 1px solid var(--line); border-radius: 50%; }

/* ---------- Comparison table ---------- */
.compare {
  width: 100%; border-collapse: collapse;
  border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden;
  background: var(--surface);
}
.compare th, .compare td {
  padding: var(--s-4) var(--s-5);
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.compare th { background: var(--bg); font-weight: 500; color: var(--graphite); font-family: var(--font-mono); text-transform: uppercase; font-size: 11px; letter-spacing: 0.1em; }
.compare td.y { color: var(--ok); font-weight: 500; }
.compare td.n { color: var(--muted-2); }
.compare tr:last-child td { border-bottom: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--ink-inv); padding: var(--s-12) 0 var(--s-7); }
.footer a { color: var(--ink-inv); opacity: .75; font-size: var(--fs-sm); transition: opacity var(--t-fast) var(--ease); }
.footer a:hover { opacity: 1; }
.footer .brand { color: var(--ink-inv); }
.footer .brand-mark { border-color: var(--ink-inv); }
.footer .brand-mark::before { border-color: var(--ink-inv); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: var(--s-7); margin-bottom: var(--s-10); }
.footer h5 { color: var(--ink-inv); font-size: var(--fs-sm); margin-bottom: var(--s-4); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 500; opacity: .6; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: var(--s-4);
  padding-top: var(--s-6); border-top: 1px solid rgba(255,255,255,.1);
  font-size: var(--fs-xs); opacity: .6; flex-wrap: wrap;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Dashboard preview (flat mock) ---------- */
.dash {
  border: 1px solid var(--line); border-radius: var(--r-3);
  background: var(--surface); overflow: hidden;
}
.dash-top { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.dash-top .crumbs { display: flex; gap: 6px; align-items: center; }
.dash-body { display: grid; grid-template-columns: 220px 1fr; min-height: 420px; }
.dash-side { border-right: 1px solid var(--line); padding: var(--s-5); display: flex; flex-direction: column; gap: 4px; background: var(--bg); }
.dash-side a { padding: 8px 10px; border-radius: var(--r-2); font-size: var(--fs-sm); color: var(--graphite); }
.dash-side a.active { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.dash-main { padding: var(--s-6); display: flex; flex-direction: column; gap: var(--s-5); }
.dash-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.kpi { border: 1px solid var(--line); border-radius: var(--r-3); padding: var(--s-4); }
.kpi .v { font-family: var(--font-display); font-size: 24px; letter-spacing: -0.02em; }
.kpi .k { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.08em; margin-top: 2px; }
.kpi .delta { font-size: 11px; color: var(--ok); margin-top: 6px; font-family: var(--font-mono); }
.dash-list { border: 1px solid var(--line); border-radius: var(--r-3); }
.dash-list .item { display: grid; grid-template-columns: 18px 1fr auto auto; gap: var(--s-3); align-items: center; padding: 12px var(--s-4); border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.dash-list .item:last-child { border-bottom: 0; }
.dash-list .item .ix { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.dash-list .item .ix.warn { background: var(--warn); }
.dash-list .item .ix.run { background: var(--accent); animation: pulse 1.4s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (max-width: 900px) { .dash-body { grid-template-columns: 1fr; } .dash-side { display: none; } .dash-row { grid-template-columns: 1fr; } }

/* ---------- Marquee (clients) ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: var(--s-6) 0; }
.marquee-track { display: flex; gap: var(--s-12); white-space: nowrap; animation: scroll 40s linear infinite; }
.marquee .logo { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; font-size: 22px; color: var(--muted-2); }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Small UI bits ---------- */
.kbd {
  display: inline-flex; align-items: center; justify-content: center;
  height: 20px; min-width: 20px; padding: 0 6px;
  border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 4px;
  font-family: var(--font-mono); font-size: 11px; color: var(--graphite);
  background: var(--surface);
}
.icon-tile {
  width: 36px; height: 36px;
  border: 1px solid var(--line); border-radius: var(--r-2);
  display: grid; place-items: center;
  background: var(--bg);
}
.icon-tile svg { width: 18px; height: 18px; stroke: var(--ink); }

/* ---------- Page header (interior pages) ---------- */
.page-head {
  padding: var(--s-11) 0 var(--s-9);
  border-bottom: 1px solid var(--line);
}
.page-head .eyebrow { margin-bottom: var(--s-3); }
.page-head h1 { font-size: var(--fs-3xl); max-width: 24ch; }
.page-head .lead { margin-top: var(--s-4); }

/* ---------- Empty/loader ---------- */
.spinner {
  width: 16px; height: 16px;
  border: 1.5px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Auth ---------- */
.auth-shell {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-side { border-right: 1px solid var(--line); padding: var(--s-12) var(--s-9); display: flex; flex-direction: column; justify-content: space-between; background: var(--bg-2); }
.auth-form { padding: var(--s-12) var(--s-9); display: flex; align-items: center; justify-content: center; }
.auth-form .inner { width: 100%; max-width: 380px; }
@media (max-width: 900px) { .auth-shell { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- Workflow diagram ---------- */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); }
.flow .node {
  border: 1px solid var(--line); border-radius: var(--r-2);
  padding: var(--s-4); background: var(--surface);
  font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--graphite);
  position: relative;
}
.flow .node .lbl { color: var(--muted); font-size: 10px; margin-bottom: 6px; }
.flow .node .v { color: var(--ink); font-family: var(--font-display); font-size: 14px; letter-spacing: -0.01em; text-transform: none; }
.flow .node + .node::before {
  content: "→"; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  color: var(--muted-2); font-family: var(--font-mono);
}
@media (max-width: 900px) { .flow { grid-template-columns: 1fr; } .flow .node + .node::before { display: none; } }

/* ---------- Misc reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Print-safe focus ---------- */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 4px;
}
