/* ============================================================
   VAULT DMCA — design tokens + base
   ============================================================ */

:root {
  /* Surfaces — deep blue-black */
  --bg: oklch(8% 0.018 258);
  --bg-1: oklch(10% 0.020 258);
  --bg-2: oklch(13% 0.022 258);
  --bg-3: oklch(16% 0.024 258);
  --surface: oklch(12% 0.020 258 / 0.6);
  --surface-strong: oklch(14% 0.022 258 / 0.8);

  /* Borders */
  --border: oklch(22% 0.025 258);
  --border-strong: oklch(30% 0.030 258);
  --hairline: oklch(100% 0 0 / 0.06);

  /* Text */
  --fg: oklch(97% 0.005 258);
  --fg-muted: oklch(70% 0.015 258);
  --fg-dim: oklch(52% 0.018 258);
  --fg-faint: oklch(40% 0.020 258);

  /* Accents — overridden by Tweaks via JS */
  --accent-1: oklch(82% 0.150 210);   /* cyan */
  --accent-2: oklch(68% 0.205 295);   /* violet */
  --accent-grad: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
  --accent-glow: oklch(70% 0.18 250 / 0.35);

  /* Status */
  --ok: oklch(78% 0.16 155);
  --warn: oklch(82% 0.16 80);
  --danger: oklch(70% 0.20 20);
  --info: var(--accent-1);

  /* Type */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Geist", "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* Shadows */
  --shadow-card: 0 1px 0 0 oklch(100% 0 0 / 0.04) inset, 0 20px 50px -25px oklch(0% 0 0 / 0.6);
  --shadow-glow: 0 0 60px -10px var(--accent-glow);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}
::selection { background: var(--accent-2); color: white; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
*::-webkit-scrollbar-track { background: transparent; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }

/* ============================================================
   Background — global grid + glow
   ============================================================ */
.bg-canvas {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 80% 0%, var(--accent-glow), transparent 70%),
    radial-gradient(ellipse 50% 50% at 0% 100%, oklch(50% 0.18 295 / 0.18), transparent 70%),
    var(--bg);
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.5;
  background-image:
    linear-gradient(to right, oklch(100% 0 0 / 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(100% 0 0 / 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 30%, black 30%, transparent 90%);
}

/* ============================================================
   Type utilities
   ============================================================ */
.display { font-family: var(--font-display); letter-spacing: -0.03em; line-height: 1.02; font-weight: 500; }
.mono { font-family: var(--font-mono); letter-spacing: 0; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.gradient-text {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: var(--r-md);
  font-weight: 500; font-size: 13.5px;
  letter-spacing: -0.005em;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--accent-grad);
  color: oklch(12% 0.02 258);
  font-weight: 600;
  box-shadow: 0 0 0 1px oklch(100% 0 0 / 0.1) inset, 0 12px 30px -10px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 0 0 1px oklch(100% 0 0 / 0.2) inset, 0 16px 40px -10px var(--accent-glow); }
.btn-secondary {
  background: var(--surface-strong);
  border-color: var(--border);
  color: var(--fg);
  backdrop-filter: blur(12px);
}
.btn-secondary:hover { border-color: var(--border-strong); background: var(--bg-2); }
.btn-ghost { color: var(--fg-muted); }
.btn-ghost:hover { color: var(--fg); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 14.5px; }
.btn-icon {
  width: 36px; height: 36px; padding: 0; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
}
.btn-icon:hover { border-color: var(--border-strong); background: var(--bg-2); }

/* ============================================================
   Cards / Glass
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.card-strong {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
}
.glass-hairline {
  position: relative;
}
.glass-hairline::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, oklch(100% 0 0 / 0.12), transparent 30%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}

/* ============================================================
   Chips / pills / badges
   ============================================================ */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  white-space: nowrap;
}
.chip-accent {
  border-color: oklch(from var(--accent-1) l c h / 0.4);
  color: var(--accent-1);
  background: oklch(from var(--accent-1) l c h / 0.08);
}
.chip-ok    { color: var(--ok);    border-color: oklch(from var(--ok) l c h / 0.4);    background: oklch(from var(--ok) l c h / 0.08); }
.chip-warn  { color: var(--warn);  border-color: oklch(from var(--warn) l c h / 0.4);  background: oklch(from var(--warn) l c h / 0.08); }
.chip-danger{ color: var(--danger);border-color: oklch(from var(--danger) l c h / 0.4);background: oklch(from var(--danger) l c h / 0.08); }

.dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.dot-pulse { box-shadow: 0 0 0 0 currentColor; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 oklch(from currentColor l c h / 0.6); }
  70%  { box-shadow: 0 0 0 10px oklch(from currentColor l c h / 0); }
  100% { box-shadow: 0 0 0 0 oklch(from currentColor l c h / 0); }
}

/* ============================================================
   Inputs
   ============================================================ */
.input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--fg);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { border-color: var(--accent-1); box-shadow: 0 0 0 3px oklch(from var(--accent-1) l c h / 0.15); }
.input::placeholder { color: var(--fg-faint); }
textarea.input { padding-top: 10px; padding-bottom: 10px; height: auto; min-height: 80px; resize: vertical; }

/* ============================================================
   Layout helpers
   ============================================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
}
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.gap-5 { gap: 20px; } .gap-6 { gap: 24px; } .gap-8 { gap: 32px; }

.divider {
  height: 1px; background: var(--border); width: 100%;
}

/* ============================================================
   App shell
   ============================================================ */
#app { min-height: 100vh; }

/* Top nav */
.topnav {
  position: sticky; top: 0; z-index: 60;
  height: 60px;
  background: oklch(from var(--bg) l c h / 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--accent-grad);
  display: grid; place-items: center;
  color: oklch(12% 0.02 258);
  box-shadow: 0 0 20px -5px var(--accent-glow);
}

.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-link {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--fg-muted);
  transition: color .15s ease, background .15s ease;
  cursor: pointer;
}
.nav-link:hover { color: var(--fg); background: var(--bg-2); }
.nav-link.active { color: var(--fg); background: var(--bg-2); }

.lang-toggle {
  display: inline-flex; padding: 3px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px;
}
.lang-toggle button {
  padding: 4px 10px; border-radius: 999px; color: var(--fg-dim);
}
.lang-toggle button.on { background: var(--bg-3); color: var(--fg); }

/* ============================================================
   Marketing — sections
   ============================================================ */
.section { padding: 96px 0; position: relative; }
.section-tight { padding: 64px 0; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-family: var(--font-display); font-size: clamp(32px, 4vw, 52px); margin: 12px 0 16px; letter-spacing: -0.03em; line-height: 1.05; font-weight: 500; }
.section-head p { color: var(--fg-muted); font-size: 16px; margin: 0; }

/* Hero */
.hero {
  position: relative;
  padding: 80px 0 56px;
  overflow: hidden;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 6.5vw, 88px);
  letter-spacing: -0.04em;
  line-height: 0.98;
  margin: 0 0 24px;
  font-weight: 500;
  text-wrap: balance;
}
.hero p.lead {
  font-size: 17px;
  color: var(--fg-muted);
  max-width: 540px;
  margin: 0 0 32px;
  text-wrap: pretty;
}
.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.hero-stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-top: 4px;
}

/* Hero dashboard mockup floating */
.hero-mock {
  position: relative;
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, oklch(14% 0.022 258 / 0.9), oklch(10% 0.020 258 / 0.9));
  border: 1px solid var(--border);
  box-shadow:
    0 1px 0 0 oklch(100% 0 0 / 0.06) inset,
    0 60px 120px -40px oklch(0% 0 0 / 0.8),
    0 0 80px -10px var(--accent-glow);
}

/* Pillar cards (problem/solution) */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.pillar {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  position: relative;
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}
.pillar:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.pillar-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--accent-1);
  margin-bottom: 16px;
}
.pillar h3 { font-family: var(--font-display); font-weight: 500; font-size: 18px; margin: 0 0 8px; letter-spacing: -0.01em; }
.pillar p { color: var(--fg-muted); font-size: 13.5px; margin: 0; }

/* FAQ */
.faq-item {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; cursor: pointer;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: left;
}
.faq-a {
  color: var(--fg-muted); font-size: 14px; padding-top: 12px;
  max-width: 720px;
}

/* Footer */
.footer {
  padding: 48px 0 80px;
  border-top: 1px solid var(--border);
  margin-top: 64px;
}

/* ============================================================
   Pricing
   ============================================================ */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.price-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  display: flex; flex-direction: column;
  position: relative;
}
.price-card.featured {
  background: linear-gradient(180deg, oklch(from var(--accent-2) l c h / 0.06), var(--surface));
  border-color: oklch(from var(--accent-1) l c h / 0.5);
  box-shadow: 0 0 60px -20px var(--accent-glow);
}
.price-tier {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  color: var(--fg-muted);
}
.price-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 6px 0 4px;
}
.price-amount {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}
.price-amount sub { font-family: var(--font-body); font-size: 13px; color: var(--fg-muted); font-weight: 400; vertical-align: baseline; margin-left: 4px; }

.price-features { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-direction: column; gap: 10px; }
.price-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--fg-muted); }
.price-features li svg { flex-shrink: 0; color: var(--accent-1); margin-top: 2px; }

/* Pricing comparison table */
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.compare th, .compare td {
  padding: 14px 16px; text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare th { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg-dim); font-weight: 400; }
.compare th.tier-h { color: var(--fg); font-family: var(--font-display); font-size: 14px; text-transform: none; letter-spacing: -0.01em; font-weight: 500; }
.compare tr:hover td { background: var(--bg-1); }
.compare td.row-label { color: var(--fg); font-weight: 500; }

/* ============================================================
   Dashboard
   ============================================================ */
.dash-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 60px);
}
.dash-side {
  border-right: 1px solid var(--border);
  background: oklch(from var(--bg) l c h / 0.4);
  padding: 20px 14px;
  position: sticky; top: 60px; height: calc(100vh - 60px);
  overflow-y: auto;
}
.dash-main { padding: 28px 32px 80px; min-width: 0; }
.dash-main-inner { max-width: 1280px; }

.side-section { margin-bottom: 24px; }
.side-section-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
  padding: 0 10px 8px;
}
.side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--fg-muted);
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
  position: relative;
}
.side-link:hover { background: var(--bg-2); color: var(--fg); }
.side-link.active { background: var(--bg-2); color: var(--fg); }
.side-link.active::before {
  content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px;
  background: var(--accent-grad);
}
.side-link .badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--bg-3);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--fg-muted);
}
.side-link .badge.alert { color: var(--danger); background: oklch(from var(--danger) l c h / 0.12); }

/* Dashboard headers */
.dash-h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
}
.dash-h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0;
}

/* KPI cards */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi {
  padding: 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.kpi-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-dim); }
.kpi-value { font-family: var(--font-display); font-size: 34px; font-weight: 500; letter-spacing: -0.02em; margin-top: 8px; }
.kpi-delta { font-family: var(--font-mono); font-size: 11px; margin-top: 4px; color: var(--ok); }
.kpi-delta.down { color: var(--danger); }
.kpi-spark { position: absolute; bottom: 0; right: 0; opacity: 0.5; pointer-events: none; }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--fg-dim); font-weight: 400;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: oklch(from var(--bg-1) l c h / 0.5);
}
.tbl td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.tbl tr:hover td { background: oklch(from var(--bg-2) l c h / 0.4); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .row-cta { opacity: 0; transition: opacity .15s; }
.tbl tr:hover .row-cta { opacity: 1; }

/* Inline thumb */
.thumb {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--fg-dim);
  font-family: var(--font-mono); font-size: 10px;
  flex-shrink: 0;
  overflow: hidden;
}

/* Status pipeline */
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pipe-col {
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface);
  padding: 14px;
  min-height: 200px;
}
.pipe-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pipe-title { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; }
.pipe-count { font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim); }
.pipe-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: grab;
  transition: border-color .15s, transform .15s;
}
.pipe-card:hover { border-color: var(--border-strong); transform: translateX(2px); }
.pipe-card-title { font-size: 12.5px; font-weight: 500; }
.pipe-card-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-dim); margin-top: 4px; display: flex; gap: 8px; }

/* Sparkline / charts */
.spark-bg { fill: none; }
.area { fill: var(--accent-1); opacity: 0.15; }
.area-line { fill: none; stroke: var(--accent-1); stroke-width: 1.5; }

/* ============================================================
   Modal
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: oklch(0% 0 0 / 0.6);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: 24px;
  animation: fadeIn .2s ease;
}
.modal {
  width: 100%; max-width: 640px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: 0 60px 120px -20px oklch(0% 0 0 / 0.8), 0 0 80px -10px var(--accent-glow);
  overflow: hidden;
  animation: slideUp .25s ease;
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-body { padding: 24px; max-height: 70vh; overflow-y: auto; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Onboarding stepper */
.stepper { display: flex; gap: 8px; align-items: center; }
.step-dot {
  width: 24px; height: 4px; border-radius: 2px;
  background: var(--bg-3);
  transition: background .25s;
}
.step-dot.active { background: var(--accent-grad); }
.step-dot.done { background: var(--accent-1); }

/* Toast / alert */
.toast-stack {
  position: fixed; right: 24px; bottom: 24px; z-index: 110;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent-1);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  display: flex; gap: 12px; align-items: flex-start;
  min-width: 280px; max-width: 360px;
  pointer-events: auto;
  box-shadow: 0 12px 30px -10px oklch(0% 0 0 / 0.6);
  animation: slideInRight .3s ease;
}
.toast.danger { border-left-color: var(--danger); }
.toast.ok { border-left-color: var(--ok); }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* Live feed shimmer */
.live-row { animation: liveIn .5s ease; }
@keyframes liveIn { from { background: oklch(from var(--accent-1) l c h / 0.15); } to { background: transparent; } }

/* Logo strip */
.logo-strip {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px;
  padding: 28px 0;
  align-items: center;
  opacity: 0.55;
}
.logo-strip > div {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--fg-muted);
  filter: grayscale(1);
}

/* Image slot styling */
image-slot {
  border: 1px solid var(--border);
  background: var(--bg-2);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr !important; }
  .price-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: 1fr; }
  .dash-shell { grid-template-columns: 1fr; }
  .dash-side { display: none; }
  .nav-links { display: none; }
  .logo-strip { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .hero-stats { grid-template-columns: 1fr; gap: 12px; }
}

/* Helpers */
.center { text-align: center; }
.relative { position: relative; }
.flex-1 { flex: 1; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden-mobile { }
@media (max-width: 720px) { .hidden-mobile { display: none !important; } }


/* ============================================================
   Blog
   ============================================================ */
.blog-list-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 96px;
}
.blog-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 48px;
}
@media (max-width: 720px) {
  .blog-list { grid-template-columns: 1fr; gap: 20px; }
}
.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.blog-card:hover {
  border-color: var(--accent-1);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px -8px oklch(from var(--accent-1) l c h / 0.18);
}
.blog-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, oklch(from var(--accent-1) l c h / 0.18), oklch(from var(--accent-2) l c h / 0.18)), var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.blog-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, oklch(from var(--bg-1) l c h / 0.45), transparent 35%);
  pointer-events: none;
}
.blog-cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--fg-dim);
  text-transform: uppercase;
  opacity: 0.45;
}
.blog-card-content {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.blog-card .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  text-transform: uppercase;
}
.blog-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 0;
  line-height: 1.25;
  text-wrap: balance;
}
.blog-card p {
  color: var(--fg-muted);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0;
  flex: 1;
}
.blog-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.blog-empty {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px 120px;
  text-align: center;
  color: var(--fg-muted);
}

/* Blog single article hero */
.blog-hero-wrap {
  max-width: 1080px;
  margin: 64px auto 0;
  padding: 0 24px;
}
.blog-hero {
  width: 100%;
  aspect-ratio: 21 / 9;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-2);
  position: relative;
}
.blog-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 720px) {
  .blog-hero { aspect-ratio: 16 / 9; border-radius: 12px; }
}

/* Blog single article body */
.blog-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 120px;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg-muted);
}
.blog-back {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
  text-transform: uppercase;
  text-decoration: none;
  margin-bottom: 24px;
  transition: color .15s ease;
}
.blog-back:hover { color: var(--accent-1); }
.blog-article > h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin: 0 0 16px;
  text-wrap: balance;
}
.blog-article > .meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  text-transform: uppercase;
  margin-bottom: 32px;
}
.blog-article > .meta + .blog-tags {
  margin-bottom: 56px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 56px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.blog-article h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 56px 0 14px;
  line-height: 1.2;
}
.blog-article h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin: 40px 0 12px;
}
.blog-article p { margin: 0 0 20px; }
.blog-article a {
  color: var(--accent-1);
  text-decoration: underline;
  text-decoration-color: oklch(from var(--accent-1) l c h / 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color .15s ease;
}
.blog-article a:hover { text-decoration-color: var(--accent-1); }
.blog-article ul, .blog-article ol { padding-left: 24px; margin: 0 0 24px; }
.blog-article li { margin: 0 0 8px; }
.blog-article strong { color: var(--fg); }
.blog-article code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--fg);
}
.blog-article pre {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  margin: 24px 0;
}
.blog-article pre code {
  padding: 0; border: none; background: none; font-size: inherit;
}
.blog-article blockquote {
  border-left: 3px solid var(--accent-1);
  padding: 14px 22px;
  margin: 24px 0;
  color: var(--fg);
  font-style: italic;
  background: oklch(from var(--accent-1) l c h / 0.04);
  border-radius: 0 10px 10px 0;
}
.blog-article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}
.blog-article img {
  max-width: 100%;
  border-radius: 12px;
  margin: 24px 0;
}
.blog-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  text-transform: uppercase;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-2);
}

/* Footer responsive */
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
}

/* ============================================================
   Mobile responsive — overrides
   ============================================================ */

/* Tablet / piccolo desktop */
@media (max-width: 960px) {
  /* Pillar grids (problem, solution, trust, dashboard kpi) stack a 2 colonne */
  .pillar-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
  /* La sezione enterprise sulla pricing (1.5fr 1fr → stack) */
  .glass-hairline[style*="grid-template-columns:1.5fr"] { grid-template-columns: 1fr !important; gap: 24px !important; }
}

/* Mobile */
@media (max-width: 720px) {
  /* Container padding ridotto */
  .container { padding-left: 20px; padding-right: 20px; }

  /* Section padding ridotto */
  .section { padding-top: 56px; padding-bottom: 56px; }

  /* Pillar grids stack a 1 colonna */
  .pillar-grid { grid-template-columns: 1fr !important; gap: 14px !important; }

  /* KPI grid: max 2 colonne (era 4) */
  .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Hero stats col singola */
  .hero-stats { grid-template-columns: 1fr !important; gap: 16px !important; }

  /* TopNav adjustments */
  .topnav-inner { gap: 12px; }
  .topnav .row.gap-3 { gap: 8px !important; }
  .lang-toggle button { padding: 4px 9px; font-size: 11px; }
  .btn-sm { padding: 7px 11px !important; font-size: 12px !important; }

  /* Section heads — titoli più piccoli */
  .section-head h2 { font-size: clamp(26px, 7vw, 36px) !important; line-height: 1.1; }
  .section-head { margin-bottom: 32px !important; }

  /* Compare table su pricing — scroll orizzontale */
  .card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .compare { min-width: 560px; }

  /* Dashboard snapshot — scroll orizzontale (mantiene layout desktop) */
  .card-strong { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .card-strong > div[style*="grid-template-columns"] { min-width: 760px; }

  /* HeroMock — riduzione padding interna */
  .hero-mock { padding: 18px !important; font-size: 13px; }

  /* Logo strip mobile: 2 colonne */
  .logo-strip { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }

  /* Footer row finale (copyright + status) — stacked */
  .footer .row { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* Final CTA card padding più stretto */
  .glass-hairline[style*="padding:72px"] { padding: 48px 24px !important; }
  .glass-hairline[style*="padding:48px"] { padding: 32px 24px !important; }
  .glass-hairline[style*="padding:32px"] { padding: 24px 20px !important; }

  /* Hero h1 — clamp già nel CSS, ma forzo line-height più stretto */
  .hero h1.display { line-height: 1.05; }

  /* Testimonial card — testo più piccolo */
  .glass-hairline[style*="padding:48px"] .display { font-size: 18px !important; line-height: 1.45 !important; }

  /* Form signup — padding ridotto */
  form.glass-hairline { padding: 20px !important; }

  /* Blog cover image più piatta */
  .blog-cover { aspect-ratio: 16 / 10; }
  .blog-card-content { padding: 20px 22px 22px; }
  .blog-card h3 { font-size: 19px; }
}

/* Smartphone piccoli */
@media (max-width: 480px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .section { padding-top: 44px; padding-bottom: 44px; }
  /* Niente override del padding qui — il .container fornisce gli spazi laterali */
  .blog-article { padding: 40px 16px 80px; }
  .blog-article > h1 { font-size: clamp(26px, 8vw, 34px) !important; }
  .blog-list-wrap, .blog-hero-wrap { padding-left: 16px; padding-right: 16px; }
  .price-card { padding: 24px !important; }
  .hero-mock { font-size: 12px !important; }
  /* CTA grandi più compatti */
  .btn-lg { padding: 12px 18px !important; font-size: 14px !important; }
}

/* Riduce immagine hero blog a 16:10 su touch (più focused) */
@media (max-width: 720px) {
  .blog-hero { aspect-ratio: 16 / 10; }
}

/* Touch / tap target minimo 44px su elementi cliccabili */
@media (hover: none) and (pointer: coarse) {
  .btn, .nav-link, .lang-toggle button, .faq-q, .blog-card, input, textarea, select, button {
    min-height: 36px;
  }
  .btn-lg { min-height: 48px; }
}

/* ============================================================
   Mobile hamburger menu
   ============================================================ */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--fg);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  transition: background .15s ease, border-color .15s ease;
}
.mobile-menu-btn:hover {
  background: var(--bg-3);
  border-color: var(--border-strong);
}
.mobile-menu {
  display: none;
}
.mobile-menu-backdrop {
  display: none;
}

@media (max-width: 720px) {
  .mobile-menu-btn {
    display: inline-flex;
  }
  .mobile-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: oklch(from var(--bg) l c h / 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    padding: 12px 18px 24px;
    display: flex !important;
    flex-direction: column;
    gap: 4px;
    z-index: 70;
    transform: translateY(-110%);
    transition: transform .22s cubic-bezier(0.22, 0.61, 0.36, 1);
    pointer-events: none;
    visibility: hidden;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .mobile-menu.open {
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
  }
  .mobile-menu-backdrop {
    display: block;
    position: fixed;
    inset: 60px 0 0 0;
    background: oklch(from var(--bg) l c h / 0.5);
    backdrop-filter: blur(2px);
    z-index: 65;
  }
  .mobile-menu-link {
    padding: 14px 14px;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 500;
    color: var(--fg);
    text-decoration: none;
    border-radius: 10px;
    transition: background .15s ease;
  }
  .mobile-menu-link.active {
    color: var(--accent-1);
    background: oklch(from var(--accent-1) l c h / 0.08);
  }
  .mobile-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 10px 4px;
  }
  .mobile-menu-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px 14px;
  }
  .mobile-menu-label {
    font-size: 11px;
    color: var(--fg-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .mobile-menu-cta {
    margin: 6px 4px 4px;
    justify-content: center;
    width: calc(100% - 8px);
  }
}

/* ============================================================
   Dashboard preview: nascondi su mobile (troppo wide per stare leggibile)
   ============================================================ */
@media (max-width: 720px) {
  #dashboard-preview { display: none; }
  /* Rimuove anche l'overflow horizontal-scroll sul card-strong (non più necessario) */
  .card-strong { overflow-x: visible; }
  .card-strong > div[style*="grid-template-columns"] { min-width: 0; }
}

/* ============================================================
   HeroMock — ridurre overflow del live-row su mobile
   ============================================================ */
@media (max-width: 720px) {
  .hero-mock { padding: 14px !important; }
  .hero-mock .live-row { padding: 6px 2px !important; gap: 8px !important; font-size: 11px !important; }
  .hero-mock .live-row .mono { width: 50px !important; font-size: 9.5px !important; }
}

/* ============================================================
   Brand mark visibile sempre — restore visibility
   ============================================================ */
.brand span { display: inline; }

/* HeroMock — assicurarsi che non sfori orizzontalmente nel grid cell */
.hero-grid > div { min-width: 0; }
.hero-mock { max-width: 100%; box-sizing: border-box; }
