/* ============================================================
   QUELLRA — Design System
   AI support that resolves before customers ask.
   Pure CSS. No gradients. No shadows. Swiss / editorial / AI-native.
   ============================================================ */

/* -------------------- TOKENS -------------------- */
:root {
  /* Color */
  --ink:        #0E0F11;
  --ink-2:      #1A1C1F;
  --graphite:   #2A2D32;
  --slate:      #4A4E55;
  --muted:      #6B6F76;
  --mute-2:     #8A8E94;
  --hairline:   #D6D4CC;
  --border:     #E2E0D9;
  --paper-3:    #EFEDE7;
  --paper-2:    #F2F0EA;
  --paper:      #F7F6F2;
  --white:      #FFFFFF;

  --accent:     #C84A1B;   /* ember terracotta */
  --accent-2:   #A53C13;
  --accent-ink: #2D0F05;
  --signal:     #1F6B3A;   /* success / live */
  --warn:       #B7791F;

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

  /* Scale (clamped fluid) */
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-14: 14px;
  --fs-15: 15px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-20: 20px;
  --fs-24: clamp(22px, 1.6vw, 24px);
  --fs-32: clamp(26px, 2.4vw, 32px);
  --fs-40: clamp(30px, 3.2vw, 40px);
  --fs-56: clamp(38px, 5.2vw, 56px);
  --fs-72: clamp(48px, 7.2vw, 72px);
  --fs-96: clamp(60px, 9vw, 96px);

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

  /* Layout */
  --container: 1240px;
  --container-wide: 1360px;
  --container-narrow: 880px;
  --gutter: 24px;

  /* Radius */
  --r-0: 0px;
  --r-1: 2px;
  --r-2: 4px;
  --r-3: 6px;
  --r-4: 8px;

  /* Lines */
  --bw: 1px;
  --line: 1px solid var(--border);
  --line-strong: 1px solid var(--ink);
  --line-hair: 1px solid var(--hairline);
}

/* -------------------- RESET -------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "ss01","cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; list-style: none; }
hr { border: 0; border-top: var(--line); margin: 0; }
::selection { background: var(--ink); color: var(--paper); }

/* -------------------- TYPOGRAPHY -------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}
.h-display { font-size: var(--fs-96); letter-spacing: -0.035em; line-height: 0.95; font-weight: 500; }
.h1 { font-size: var(--fs-72); letter-spacing: -0.03em; line-height: 1.0; }
.h2 { font-size: var(--fs-56); letter-spacing: -0.025em; line-height: 1.05; }
.h3 { font-size: var(--fs-40); letter-spacing: -0.02em; line-height: 1.1; }
.h4 { font-size: var(--fs-24); letter-spacing: -0.015em; line-height: 1.2; }
.h5 { font-size: var(--fs-18); letter-spacing: -0.01em; line-height: 1.3; }

p { margin: 0 0 1em 0; }
.lead { font-size: var(--fs-20); line-height: 1.5; color: var(--graphite); letter-spacing: -0.005em; }
.sub  { font-size: var(--fs-18); line-height: 1.55; color: var(--slate); }
.body { font-size: var(--fs-16); line-height: 1.65; color: var(--graphite); }
.small { font-size: var(--fs-13); color: var(--muted); }
.kicker {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.kicker .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 999px; display: inline-block; }
.mono { font-family: var(--font-mono); font-size: var(--fs-13); letter-spacing: -0.01em; }
.serif-ital { font-style: italic; font-family: Georgia, "Times New Roman", serif; font-weight: 400; }

/* -------------------- LAYOUT -------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container.wide { max-width: var(--container-wide); }
.container.narrow { max-width: var(--container-narrow); }
.section { padding: var(--s-20) 0; }
.section-lg { padding: var(--s-24) 0; }
.section-xl { padding: var(--s-32) 0; }
.section-sm { padding: var(--s-12) 0; }

.grid { display: grid; gap: var(--s-6); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-6 { grid-template-columns: repeat(6, 1fr); }
.g-12 { grid-template-columns: repeat(12, 1fr); gap: var(--gutter); }

.flex { display: flex; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.gap-6 { gap: var(--s-6); }
.gap-8 { gap: var(--s-8); }
.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; }

.muted { color: var(--muted); }
.center { text-align: center; }
.right  { text-align: right; }

.bg-paper { background: var(--paper); }
.bg-paper-2 { background: var(--paper-2); }
.bg-paper-3 { background: var(--paper-3); }
.bg-ink { background: var(--ink); color: var(--paper); }
.bg-white { background: var(--white); }
.bg-ink h1, .bg-ink h2, .bg-ink h3, .bg-ink h4 { color: var(--paper); }
.bg-ink .muted { color: var(--mute-2); }

.divider { border-top: var(--line); }
.divider-strong { border-top: var(--line-strong); }

/* -------------------- TOP MARQUEE -------------------- */
.topbar {
  border-bottom: var(--line);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.04em;
  color: var(--muted);
}
.topbar .row { display: flex; justify-content: space-between; padding: 10px 0; }
.topbar a { color: var(--ink); border-bottom: 1px solid transparent; }
.topbar a:hover { border-color: var(--ink); }
.topbar .dot { width: 6px; height: 6px; background: var(--signal); border-radius: 999px; display: inline-block; margin-right: 8px; vertical-align: middle; }

/* -------------------- NAV -------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: var(--line);
  backdrop-filter: saturate(1.05);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-sans); font-weight: 600; font-size: var(--fs-18); letter-spacing: -0.02em; color: var(--ink); }
.brand .mark {
  width: 22px; height: 22px; border: 1.5px solid var(--ink); border-radius: 50%;
  display: inline-grid; place-items: center; position: relative;
}
.brand .mark::after { content: ""; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }
.brand .word { letter-spacing: -0.025em; }

.nav-links { display: flex; align-items: center; gap: var(--s-6); }
.nav-links a {
  font-size: var(--fs-14);
  color: var(--graphite);
  padding: 8px 2px;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--ink); border-color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: var(--s-3); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: var(--line);
  border-radius: var(--r-2);
  align-items: center; justify-content: center;
}
.nav-toggle span { width: 16px; height: 1.5px; background: var(--ink); position: relative; }
.nav-toggle span::before,
.nav-toggle span::after { content: ""; position: absolute; left: 0; width: 16px; height: 1.5px; background: var(--ink); }
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

/* -------------------- BUTTONS -------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px;
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid var(--ink);
  border-radius: var(--r-1);
  color: var(--ink);
  background: transparent;
  transition: background 0.12s linear, color 0.12s linear, border-color 0.12s linear;
  white-space: nowrap;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(2px); }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }

.btn-accent { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-2); border-color: var(--accent-2); }

.btn-ghost { border-color: var(--border); color: var(--graphite); }
.btn-ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }

.btn-lg { height: 48px; padding: 0 22px; font-size: var(--fs-15); }
.btn-sm { height: 32px; padding: 0 12px; font-size: var(--fs-13); }
.btn-block { width: 100%; justify-content: center; }

.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
  font-size: var(--fs-14);
  color: var(--ink);
}
.text-link:hover { color: var(--accent); border-color: var(--accent); }

/* -------------------- HERO -------------------- */
.hero {
  border-bottom: var(--line);
  padding: var(--s-20) 0 var(--s-16);
  position: relative;
}
.hero-grid { display: grid; grid-template-columns: 1fr; gap: var(--s-10); }
.hero h1.h-display { max-width: 16ch; }
.hero .lead { max-width: 56ch; margin-top: var(--s-6); }
.hero-meta { display: flex; flex-wrap: wrap; gap: var(--s-6); margin-top: var(--s-8); padding-top: var(--s-6); border-top: var(--line); }
.hero-meta .item { font-family: var(--font-mono); font-size: var(--fs-12); letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.hero-meta .item b { color: var(--ink); font-weight: 600; }

.hero-cta { display: flex; gap: var(--s-3); margin-top: var(--s-8); flex-wrap: wrap; }

/* -------------------- LOGO STRIP -------------------- */
.logos {
  border-top: var(--line);
  border-bottom: var(--line);
  padding: var(--s-8) 0;
  background: var(--paper);
}
.logos .row { display: grid; grid-template-columns: auto repeat(6, 1fr); align-items: center; gap: var(--s-6); }
.logos .label { font-family: var(--font-mono); font-size: var(--fs-12); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.logo-mark {
  font-family: var(--font-sans); font-weight: 600; font-size: var(--fs-18); letter-spacing: -0.02em;
  color: var(--slate); opacity: 0.85;
  border-left: var(--line); padding: var(--s-3) var(--s-4);
}

/* -------------------- CARDS -------------------- */
.card {
  background: var(--white);
  border: var(--line);
  border-radius: var(--r-2);
  padding: var(--s-8);
}
.card.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.card.flat { background: transparent; border: var(--line); }
.card .eyebrow { font-family: var(--font-mono); font-size: var(--fs-12); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.card h3 { margin-top: var(--s-3); }
.card p { color: var(--graphite); }
.card.dark p { color: var(--mute-2); }

.feature-row {
  display: grid; grid-template-columns: 60px 1fr; gap: var(--s-6);
  padding: var(--s-8) 0; border-top: var(--line);
}
.feature-row:last-child { border-bottom: var(--line); }
.feature-row .idx { font-family: var(--font-mono); font-size: var(--fs-12); color: var(--muted); letter-spacing: 0.06em; }
.feature-row h4 { margin-bottom: var(--s-2); }
.feature-row .body { max-width: 60ch; }

/* Bento grid */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: var(--s-3);
}
.bento .cell {
  border: var(--line); background: var(--white); border-radius: var(--r-2);
  padding: var(--s-6); display: flex; flex-direction: column; justify-content: space-between;
}
.bento .cell.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.bento .cell.muted { background: var(--paper-2); }
.bento .span-3 { grid-column: span 3; }
.bento .span-4 { grid-column: span 4; }
.bento .span-2 { grid-column: span 2; }
.bento .span-6 { grid-column: span 6; }
.bento .row-2 { grid-row: span 2; }

/* -------------------- PRICING -------------------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: var(--line); border-left: var(--line); }
.price-cell { border-right: var(--line); border-bottom: var(--line); padding: var(--s-8); background: var(--paper); }
.price-cell.featured { background: var(--ink); color: var(--paper); }
.price-cell.featured .muted { color: var(--mute-2); }
.price-cell .tier { font-family: var(--font-mono); font-size: var(--fs-12); letter-spacing: 0.1em; text-transform: uppercase; }
.price-cell .price { font-size: var(--fs-56); letter-spacing: -0.03em; line-height: 1; margin: var(--s-4) 0 var(--s-2); font-weight: 500; }
.price-cell .price small { font-size: var(--fs-14); color: var(--muted); font-weight: 400; letter-spacing: 0; }
.price-cell ul.checks li {
  font-size: var(--fs-14); color: var(--graphite); padding: 8px 0; border-top: var(--line-hair);
  display: flex; align-items: flex-start; gap: 8px;
}
.price-cell.featured ul.checks li { color: var(--mute-2); border-color: #2A2D32; }
.price-cell ul.checks li::before { content: "+"; color: var(--accent); font-family: var(--font-mono); }

/* -------------------- TABLE -------------------- */
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-14); }
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: var(--line); vertical-align: top; }
.table th { font-family: var(--font-mono); font-size: var(--fs-12); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.table tr:hover td { background: var(--paper-2); }
.table .check { color: var(--signal); }
.table .x { color: var(--mute-2); }

/* -------------------- FAQ ACCORDION -------------------- */
.acc { border-top: var(--line); }
.acc-item { border-bottom: var(--line); }
.acc-q { display: flex; justify-content: space-between; align-items: center; padding: var(--s-6) 0; cursor: pointer; gap: var(--s-6); }
.acc-q h4 { font-size: var(--fs-20); font-weight: 500; }
.acc-q .ico { width: 24px; height: 24px; border: var(--line); border-radius: 50%; display: grid; place-items: center; transition: transform 0.2s ease; }
.acc-item.open .acc-q .ico { transform: rotate(45deg); border-color: var(--ink); }
.acc-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.acc-item.open .acc-a { max-height: 600px; }
.acc-a-inner { padding: 0 0 var(--s-8); max-width: 70ch; color: var(--graphite); }

/* -------------------- TABS -------------------- */
.tabs { display: flex; gap: var(--s-2); border-bottom: var(--line); margin-bottom: var(--s-6); flex-wrap: wrap; }
.tab {
  padding: 10px 0; margin-right: var(--s-6);
  font-family: var(--font-mono); font-size: var(--fs-12); text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }

/* -------------------- METRIC BLOCKS -------------------- */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-top: var(--line-strong); border-bottom: var(--line); }
.metric { padding: var(--s-8) var(--s-6); border-right: var(--line); }
.metric:last-child { border-right: 0; }
.metric .n { font-family: var(--font-sans); font-size: var(--fs-56); letter-spacing: -0.03em; line-height: 1; font-weight: 500; }
.metric .n sup { font-size: var(--fs-20); color: var(--accent); vertical-align: super; margin-left: 4px; font-weight: 500; }
.metric .l { margin-top: var(--s-3); font-family: var(--font-mono); font-size: var(--fs-12); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* -------------------- TAGS / BADGES -------------------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 8px;
  font-family: var(--font-mono); font-size: var(--fs-12); letter-spacing: 0.04em;
  border: var(--line); border-radius: 999px; color: var(--graphite);
}
.tag.live::before { content: ""; width: 6px; height: 6px; background: var(--signal); border-radius: 50%; }
.tag.new  { color: var(--accent); border-color: var(--accent); }

/* -------------------- FORMS -------------------- */
.form { display: flex; flex-direction: column; gap: var(--s-4); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--font-mono); font-size: var(--fs-12); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select {
  font: inherit; font-size: var(--fs-15);
  background: var(--white);
  border: var(--line);
  border-radius: var(--r-2);
  padding: 12px 14px;
  color: var(--ink);
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink); }
.field .hint { font-size: var(--fs-12); color: var(--muted); }
.field.error input { border-color: var(--accent); }

/* -------------------- CODE BLOCKS -------------------- */
.code {
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  line-height: 1.65;
  background: var(--ink);
  color: #E9E8E2;
  border: 1px solid var(--ink);
  border-radius: var(--r-2);
  padding: var(--s-6);
  overflow-x: auto;
}
.code .k { color: #E0A35C; } /* keyword */
.code .s { color: #B7D996; } /* string */
.code .c { color: #6F7178; font-style: italic; } /* comment */
.code .n { color: #C9C7BD; }

.code-frame { border: var(--line); border-radius: var(--r-2); overflow: hidden; }
.code-frame .head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: var(--line); background: var(--paper-2);
  font-family: var(--font-mono); font-size: var(--fs-12); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em;
}
.code-frame .code { border-radius: 0; border: 0; }

/* -------------------- WORKFLOW DIAGRAM -------------------- */
.flow {
  border: var(--line); border-radius: var(--r-2); padding: var(--s-8); background: var(--white);
  display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s-3); align-items: stretch;
}
.flow .node {
  border: var(--line); border-radius: var(--r-2); padding: var(--s-4);
  display: flex; flex-direction: column; gap: 6px; background: var(--paper);
  position: relative;
}
.flow .node h5 { font-size: var(--fs-14); }
.flow .node .lbl { font-family: var(--font-mono); font-size: var(--fs-12); color: var(--muted); }
.flow .node.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.flow .node.dark .lbl { color: var(--mute-2); }

/* -------------------- DASHBOARD MOCK -------------------- */
.dash {
  border: var(--line); border-radius: var(--r-2); overflow: hidden; background: var(--white);
}
.dash .topnav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: var(--line);
  font-family: var(--font-mono); font-size: var(--fs-12); color: var(--muted);
}
.dash .body { display: grid; grid-template-columns: 220px 1fr; min-height: 480px; }
.dash .side { border-right: var(--line); padding: var(--s-4); background: var(--paper); }
.dash .side .grp { font-family: var(--font-mono); font-size: var(--fs-12); color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin: var(--s-4) 0 var(--s-2); }
.dash .side ul li { padding: 6px 8px; font-size: var(--fs-13); color: var(--graphite); border-radius: var(--r-2); }
.dash .side ul li.active { background: var(--ink); color: var(--paper); }
.dash .main { padding: var(--s-6); }
.dash .kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); margin-bottom: var(--s-4); }
.dash .kpi { border: var(--line); border-radius: var(--r-2); padding: var(--s-4); }
.dash .kpi .l { font-family: var(--font-mono); font-size: var(--fs-12); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.dash .kpi .v { font-size: var(--fs-32); font-family: var(--font-sans); margin-top: 4px; letter-spacing: -0.02em; }
.dash .kpi .d { font-family: var(--font-mono); font-size: var(--fs-12); color: var(--signal); margin-top: 4px; }

.bar { height: 80px; display: flex; align-items: flex-end; gap: 4px; padding: 6px 0; border-top: var(--line-hair); border-bottom: var(--line-hair); margin-top: var(--s-4); }
.bar i { display: block; width: 100%; background: var(--ink); }
.bar i.accent { background: var(--accent); }

/* Tickets table inside dashboard */
.tix { width: 100%; border-collapse: collapse; font-size: var(--fs-13); margin-top: var(--s-4); }
.tix th, .tix td { padding: 10px 8px; border-bottom: var(--line); text-align: left; }
.tix th { font-family: var(--font-mono); font-size: var(--fs-12); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
.tix .pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border: var(--line); border-radius: 999px; font-family: var(--font-mono); font-size: var(--fs-12); }
.tix .pill.live::before { content:""; width:6px; height:6px; background: var(--signal); border-radius: 50%; }
.tix .pill.act { color: var(--accent); border-color: var(--accent); }
.tix .pill.idle { color: var(--muted); }

/* -------------------- TESTIMONIAL -------------------- */
.quote {
  border-top: var(--line); border-bottom: var(--line);
  padding: var(--s-12) 0;
}
.quote q {
  font-family: var(--font-sans);
  font-size: var(--fs-40);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
  display: block;
  max-width: 30ch;
  quotes: """ """;
}
.quote q::before { content: open-quote; color: var(--accent); }
.quote q::after  { content: close-quote; color: var(--accent); }
.quote .who { margin-top: var(--s-6); display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-14); color: var(--muted); }
.quote .who b { color: var(--ink); font-weight: 500; }

/* -------------------- FOOTER -------------------- */
.footer { background: var(--ink); color: var(--paper); padding: var(--s-20) 0 var(--s-8); }
.footer h5 { color: var(--paper); font-size: var(--fs-14); font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: var(--s-4); }
.footer a { color: var(--mute-2); font-size: var(--fs-14); display: block; padding: 4px 0; }
.footer a:hover { color: var(--paper); }
.footer .top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: var(--s-8); padding-bottom: var(--s-12); border-bottom: 1px solid #2A2D32; }
.footer .word-big { font-family: var(--font-sans); font-size: var(--fs-72); letter-spacing: -0.04em; line-height: 0.9; font-weight: 500; }
.footer .word-big em { color: var(--accent); font-style: normal; }
.footer .legal { display: flex; justify-content: space-between; align-items: center; padding-top: var(--s-6); font-size: var(--fs-12); font-family: var(--font-mono); color: var(--mute-2); letter-spacing: 0.06em; }
.footer .legal a { display: inline; padding: 0; margin-left: var(--s-4); }

/* -------------------- PAGE HEADER (subpages) -------------------- */
.page-head { padding: var(--s-16) 0 var(--s-12); border-bottom: var(--line); }
.page-head .kicker { margin-bottom: var(--s-4); }
.page-head h1 { max-width: 22ch; }
.page-head .lead { margin-top: var(--s-6); max-width: 56ch; }

/* -------------------- BLOG -------------------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: var(--line); border-left: var(--line); }
.post {
  border-right: var(--line); border-bottom: var(--line);
  padding: var(--s-8);
  display: flex; flex-direction: column; gap: var(--s-3);
  background: var(--paper);
  transition: background 0.15s;
}
.post:hover { background: var(--white); }
.post .meta { font-family: var(--font-mono); font-size: var(--fs-12); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.post h3 { font-size: var(--fs-24); }
.post .excerpt { color: var(--graphite); font-size: var(--fs-14); }
.post .read { margin-top: auto; font-family: var(--font-mono); font-size: var(--fs-12); text-transform: uppercase; color: var(--ink); letter-spacing: 0.08em; }

/* -------------------- ROADMAP / CHANGELOG -------------------- */
.timeline { border-left: 1px solid var(--border); padding-left: var(--s-8); margin-left: 8px; }
.timeline .entry { padding-bottom: var(--s-10); position: relative; }
.timeline .entry::before {
  content: ""; position: absolute; left: -41px; top: 6px; width: 12px; height: 12px;
  border: 1.5px solid var(--ink); background: var(--paper); border-radius: 50%;
}
.timeline .entry.now::before { background: var(--accent); border-color: var(--accent); }
.timeline .date { font-family: var(--font-mono); font-size: var(--fs-12); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.timeline h4 { margin: var(--s-2) 0 var(--s-3); }

/* -------------------- DOCS LAYOUT -------------------- */
.docs { display: grid; grid-template-columns: 240px 1fr 220px; gap: var(--s-10); padding: var(--s-12) 0; }
.docs aside { font-size: var(--fs-14); position: sticky; top: 90px; align-self: start; }
.docs aside .grp { font-family: var(--font-mono); font-size: var(--fs-12); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--s-3); margin-top: var(--s-6); }
.docs aside ul li a { display: block; padding: 4px 0; color: var(--graphite); }
.docs aside ul li a:hover, .docs aside ul li a.active { color: var(--ink); border-left: 2px solid var(--accent); padding-left: 10px; margin-left: -12px; }
.docs main h2 { margin-top: var(--s-10); }
.docs main h3 { margin-top: var(--s-8); font-size: var(--fs-24); }
.docs main p, .docs main li { font-size: var(--fs-16); line-height: 1.7; color: var(--graphite); }
.docs main ul { list-style: disc; padding-left: 20px; margin: var(--s-3) 0; }
.docs main code { font-family: var(--font-mono); font-size: 0.9em; background: var(--paper-2); padding: 2px 6px; border-radius: var(--r-1); border: var(--line-hair); }

/* -------------------- AUTH PAGES -------------------- */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 68px); }
.auth-side { background: var(--ink); color: var(--paper); padding: var(--s-12); display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h2 { color: var(--paper); }
.auth-side .quote-mini { font-size: var(--fs-20); line-height: 1.4; max-width: 32ch; }
.auth-form { padding: var(--s-12); display: flex; flex-direction: column; justify-content: center; max-width: 520px; }

/* -------------------- UTILITY -------------------- */
.hide-mobile { display: initial; }
.show-mobile { display: none; }
.mt-2{margin-top:var(--s-2)}.mt-3{margin-top:var(--s-3)}.mt-4{margin-top:var(--s-4)}.mt-6{margin-top:var(--s-6)}.mt-8{margin-top:var(--s-8)}.mt-10{margin-top:var(--s-10)}.mt-12{margin-top:var(--s-12)}.mt-16{margin-top:var(--s-16)}
.mb-2{margin-bottom:var(--s-2)}.mb-3{margin-bottom:var(--s-3)}.mb-4{margin-bottom:var(--s-4)}.mb-6{margin-bottom:var(--s-6)}.mb-8{margin-bottom:var(--s-8)}.mb-12{margin-bottom:var(--s-12)}

/* Focus visible */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Skip link */
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; }

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 1024px) {
  .docs { grid-template-columns: 220px 1fr; }
  .docs aside.toc { display: none; }
  .bento { grid-template-columns: repeat(4, 1fr); }
  .bento .span-3 { grid-column: span 4; }
  .bento .span-4 { grid-column: span 4; }
  .bento .span-6 { grid-column: span 4; }
}
@media (max-width: 880px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links { display: flex; position: absolute; left: 0; right: 0; top: 68px; background: var(--paper); border-bottom: var(--line); flex-direction: column; gap: 0; padding: var(--s-4) var(--gutter); }
  .nav.open .nav-links a { padding: 14px 0; border-bottom: var(--line); }
  .g-2, .g-3, .g-4, .g-6 { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(1), .metric:nth-child(2) { border-bottom: var(--line); }
  .posts { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .dash .body { grid-template-columns: 1fr; }
  .dash .side { border-right: 0; border-bottom: var(--line); display: none; }
  .dash .kpis { grid-template-columns: repeat(2, 1fr); }
  .footer .top { grid-template-columns: 1fr 1fr; }
  .footer .word-big { font-size: var(--fs-40); grid-column: 1 / -1; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .logos .row { grid-template-columns: 1fr; gap: var(--s-3); }
  .logo-mark { border-left: 0; border-top: var(--line); padding: var(--s-3) 0; }
  .h-display { font-size: var(--fs-56); }
  .h1 { font-size: var(--fs-40); }
  .h2 { font-size: var(--fs-32); }
  .footer .legal { flex-direction: column; gap: var(--s-3); text-align: center; }
  .topbar .row { font-size: 11px; }
  .topbar .hide-mobile { display: none; }
  .show-mobile { display: initial; }
  .bento { grid-template-columns: 1fr; }
  .bento .span-2, .bento .span-3, .bento .span-4, .bento .span-6 { grid-column: span 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
