/* PeopleFlow 2.0 — landing */

:root {
  /* Palette definitiva: Midnight + accents teal/emerald del ribbon marchio.
     Gradient logo: #22D3EE (cyan) → #14B8A6 (teal) → #10B981 (emerald). */
  --bg: oklch(0.17 0.01 240);         /* midnight — leggermente più cool per matchare teal */
  --bg-2: oklch(0.21 0.012 240);
  --ink: oklch(0.96 0.008 200);        /* off-white cool */
  --ink-2: oklch(0.74 0.012 200);
  --line: oklch(0.3 0.015 240);
  --accent: oklch(0.72 0.13 187);      /* teal — centro del gradient ribbon */
  --accent-2: oklch(0.74 0.15 163);    /* emerald — fine del gradient ribbon */
  --accent-ink: oklch(0.17 0.01 240);

  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --maxw: 1280px;
  --pad-x: clamp(20px, 4vw, 64px);

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.78em;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.serif { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; }

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

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(10px);
  background: color-mix(in oklch, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: inherit;
}
.logo > span:not(.logo-v) {
  line-height: 1;
}
/* Ribbon logo mark — V1 stroke gradient */
.logo-ribbon {
  display: block;
  width: 34px;
  height: 15px;
  flex: 0 0 auto;
  transform: translateY(1px);
  transition: transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.logo:hover .logo-ribbon {
  transform: translateY(1px) scale(1.04);
}
.logo-v {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 12px;
  align-self: center;
  transform: translateY(1px);
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--ink-2);
}
.nav-links a:hover { color: var(--ink); }
@media (max-width: 820px) { .nav-links { display: none; } }

.nav-right { display: flex; align-items: center; gap: 14px; }

.lang {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  font-size: 12px;
}
.lang button {
  border: 0;
  background: transparent;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-2);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}
.lang button.on { background: var(--ink); color: var(--bg); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.small { padding: 8px 14px; font-size: 13px; }
.btn-arrow { transition: transform .2s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------- Section chrome ---------- */
section { padding: clamp(72px, 9vw, 128px) 0; position: relative; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--accent);
}
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 400; }
h1 { font-size: clamp(48px, 7.5vw, 104px); line-height: 1.02; letter-spacing: -0.02em; }
h2 { font-size: clamp(38px, 5vw, 68px); line-height: 1.05; letter-spacing: -0.015em; }
h3 { font-size: clamp(22px, 2vw, 26px); line-height: 1.2; }
.sub {
  color: var(--ink-2);
  font-size: clamp(16px, 1.15vw, 18px);
  max-width: 62ch;
  text-wrap: pretty;
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(56px, 6vw, 88px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 span.b { display: block; color: var(--accent); font-style: italic; }
.hero .sub { margin-top: 24px; }
.hero-cta { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }

.chart-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
  padding: 20px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
}
.chart-head {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px;
}
.chart-head .live {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; color: var(--accent-2);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 var(--accent-2);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--accent-2) 70%, transparent); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
#hero-chart { flex: 1; min-height: 240px; }

.hero-stats {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
@media (max-width: 720px) { .hero-stats { grid-template-columns: 1fr; gap: 20px; } }
.hstat-v { font-family: var(--font-display); font-size: clamp(40px, 5vw, 56px); line-height: 1; }
.hstat-l { color: var(--ink-2); font-size: 14px; margin-top: 6px; }

/* ---------- Problem ---------- */
.problem-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
@media (max-width: 820px) { .problem-grid { grid-template-columns: 1fr; } }
.problem-item {
  background: var(--bg);
  padding: 32px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.problem-item .n {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.problem-item h3 { margin-top: 40px; }
.problem-item p { color: var(--ink-2); margin: 12px 0 0; font-size: 15px; }

/* ---------- Showcase image (contained, max-width come le altre sezioni) ---------- */
.showcase {
  padding: clamp(32px, 5vw, 64px) var(--pad-x);
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.showcase-inner {
  position: relative;
  overflow: hidden;
  max-width: var(--maxw);
  margin: 0 auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
}
.showcase-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: min(72vh, 720px);
  object-fit: cover;
  filter: saturate(1.02);
}
.showcase-caption {
  position: absolute;
  left: clamp(20px, 4vw, 48px);
  bottom: clamp(20px, 3vw, 40px);
  right: clamp(20px, 4vw, 48px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  pointer-events: none;
  flex-wrap: wrap;
}
.showcase-caption .quote {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 32px);
  line-height: 1.2;
  color: var(--ink);
  max-width: 22ch;
  background: color-mix(in oklch, var(--bg) 82%, transparent);
  backdrop-filter: blur(6px);
  padding: 14px 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}
.showcase-caption .quote em {
  font-style: italic;
  color: var(--accent);
}
.showcase-caption .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: color-mix(in oklch, var(--bg) 82%, transparent);
  backdrop-filter: blur(6px);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.showcase-caption .meta .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2);
  animation: pulse 1.6s infinite;
}
@media (max-width: 720px) {
  .showcase-caption { position: static; padding: 20px; background: var(--bg); }
  .showcase-caption .quote { background: transparent; border: 0; padding: 0; }
  .showcase-caption .meta { background: transparent; border: 0; padding: 0; }
}

/* ---------- Platform ---------- */
.head-row { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; }
.head-row .sub { margin-top: 0; }
.head-title { max-width: 20ch; }

.features {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 980px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } }
.feature {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 240px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -30px color-mix(in oklch, var(--ink) 40%, transparent); }
.feature .k {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-2);
  letter-spacing: 0.14em;
}
.feature h3 { font-size: 24px; }
.feature p { margin: 0; color: var(--ink-2); font-size: 15px; flex: 1; }
.feature .tag {
  align-self: flex-start;
  font-family: var(--font-mono); font-size: 11px;
  padding: 4px 10px; border-radius: 999px;
  background: color-mix(in oklch, var(--accent) 15%, transparent);
  color: var(--accent);
}

/* ---------- Architecture ---------- */
.arch {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.arch-flow {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  position: relative;
}
@media (max-width: 900px) { .arch-flow { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .arch-flow { grid-template-columns: 1fr; } }
.arch-node {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color .3s ease, transform .3s ease;
}
.arch-node.active {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -30px color-mix(in oklch, var(--accent) 60%, transparent);
}
.arch-node .idx {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--ink-2);
  letter-spacing: 0.14em;
}
.arch-node h3 { font-size: 22px; margin-top: 16px; }
.arch-node p { font-size: 13px; color: var(--ink-2); margin: 8px 0 0; font-family: var(--font-mono); line-height: 1.5; }
.arch-node .tag {
  align-self: flex-start;
  font-family: var(--font-mono); font-size: 10px;
  padding: 3px 8px; border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  margin-top: 20px;
  letter-spacing: 0.1em;
}
.arch-arrow {
  position: absolute;
  top: 50%;
  right: -16px;
  transform: translateY(-50%);
  width: 16px; height: 1px;
  background: var(--line);
  z-index: 1;
}
.arch-arrow::after {
  content: "";
  position: absolute;
  right: 0; top: -3px;
  width: 6px; height: 6px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  transform: rotate(45deg);
}
@media (max-width: 900px) { .arch-arrow { display: none; } }

.arch-pulse {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 12px var(--accent);
  transition: left 3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  opacity: 0;
}
.arch-pulse.on { opacity: 1; }

/* ---------- AI ---------- */
.ai-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 900px) { .ai-grid { grid-template-columns: 1fr; } }
.ai-bullets { margin-top: 32px; list-style: none; padding: 0; }
.ai-bullets li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
}
.ai-bullets li:last-child { border-bottom: 1px solid var(--line); }
.ai-bullets li::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.chat-window {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 30px 60px -40px color-mix(in oklch, var(--ink) 40%, transparent);
}
.chat-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: 0.06em;
}
.chat-dots { display: flex; gap: 5px; }
.chat-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.chat-dots span:first-child { background: color-mix(in oklch, var(--accent) 70%, var(--line)); }
.chat-body { padding: 24px; display: flex; flex-direction: column; gap: 18px; min-height: 380px; }
.msg { display: flex; gap: 12px; opacity: 0; transform: translateY(6px); transition: all .5s ease; }
.msg.show { opacity: 1; transform: translateY(0); }
.msg.user { justify-content: flex-end; }
.bubble {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.5;
}
.msg.user .bubble {
  background: var(--ink);
  color: var(--bg);
  border-bottom-right-radius: 4px;
}
.msg.ai .bubble {
  background: var(--bg-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.msg.ai .bubble strong {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--accent);
  font-size: 1.15em;
}
.chat-input {
  border-top: 1px solid var(--line);
  padding: 14px 18px;
  color: var(--ink-2);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-caret {
  display: inline-block;
  width: 2px; height: 14px;
  background: var(--accent);
  animation: blink 1s infinite;
}
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

/* ---------- Security ---------- */
.sec-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 900px) { .sec-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .sec-grid { grid-template-columns: 1fr; } }
.sec-item {
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg);
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background .2s ease;
}
.sec-item:hover { background: var(--bg-2); }
.sec-item .t { font-family: var(--font-mono); font-size: 13px; color: var(--accent); letter-spacing: 0.04em; }
.sec-item .d { font-size: 13px; color: var(--ink-2); margin-top: 12px; }

/* ---------- Compare ---------- */
.compare-wrap {
  margin-top: 56px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.compare-table th, .compare-table td {
  padding: 20px 24px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  font-weight: 400;
  background: var(--bg-2);
}
.compare-table thead th.us {
  color: var(--accent);
  background: color-mix(in oklch, var(--accent) 10%, var(--bg));
}
.compare-table tbody tr:hover { background: var(--bg-2); }
.compare-table td.us {
  background: color-mix(in oklch, var(--accent) 8%, var(--bg));
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
}
.compare-table td.them {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 13px;
}
.compare-table td.label { font-weight: 500; }
.tick {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: middle;
}

@media (max-width: 720px) {
  .compare-table th, .compare-table td { padding: 14px; }
  .compare-table { font-size: 13px; }
}

/* ---------- Stats ---------- */
.stats {
  background: var(--ink);
  color: var(--bg);
  border-radius: 0;
}
.stats .eyebrow { color: color-mix(in oklch, var(--accent) 80%, white); }
.stats .eyebrow::before { background: color-mix(in oklch, var(--accent) 80%, white); }
.stats h2 { color: var(--bg); }
.stats-grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .stats-grid { grid-template-columns: 1fr; } }
.stat-item {
  border-top: 1px solid color-mix(in oklch, var(--bg) 20%, transparent);
  padding-top: 20px;
}
.stat-v {
  font-family: var(--font-display);
  font-size: clamp(64px, 8vw, 108px);
  line-height: 1;
  color: var(--accent);
}
.stat-l { font-size: 15px; margin-top: 8px; }
.stat-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: color-mix(in oklch, var(--bg) 60%, var(--ink));
  margin-top: 8px;
  letter-spacing: 0.06em;
}

/* ---------- FAQ ---------- */
.faq-list { margin-top: 56px; border-top: 1px solid var(--line); }
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  cursor: pointer;
}
.faq-q {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.3;
}
.faq-plus {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--accent);
  transition: transform .3s ease;
  flex-shrink: 0;
}
.faq-item.open .faq-plus { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, margin-top .4s ease;
  color: var(--ink-2);
  font-size: 15.5px;
  max-width: 68ch;
}
.faq-item.open .faq-a { max-height: 400px; margin-top: 16px; }

/* ---------- Final CTA ---------- */
.final {
  background: var(--accent);
  color: var(--accent-ink);
  text-align: center;
  border-radius: 0;
}
.final .eyebrow { color: var(--accent-ink); }
.final .eyebrow::before { background: var(--accent-ink); }
.final h2 { color: var(--accent-ink); max-width: 18ch; margin: 0 auto; }
.final .sub {
  color: color-mix(in oklch, var(--accent-ink) 80%, var(--accent));
  margin: 24px auto 40px;
  text-align: center;
}
.final .btn.primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ---------- Footer ---------- */
.footer {
  padding: 72px 0 40px;
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand p { color: var(--ink-2); font-size: 14px; margin: 12px 0 0; max-width: 40ch; }
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 16px;
  font-weight: 400;
}
.footer ul { list-style: none; padding: 0; margin: 0; font-size: 14px; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--ink); }
.footer ul a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  text-transform: uppercase;
  flex-wrap: wrap;
}

/* ---------- Reveal on scroll ---------- */
/* Safe by default: content is visible. Only when the JS observer has
   initialised (`.js-reveal-ready` on <html>) do we hide `.reveal` elements
   until they get `.in`. That way, if JS fails or the observer never fires,
   the page still renders. */
.reveal { transition: opacity .8s ease, transform .8s ease; }
html.js-reveal-ready .reveal { opacity: 0; transform: translateY(20px); }
html.js-reveal-ready .reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Trust row in hero ---------- */
.hero-trust {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-trust span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  flex-shrink: 0;
}

/* ---------- Social proof ---------- */
.proof {
  padding: clamp(48px, 6vw, 80px) 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
@media (max-width: 900px) { .proof-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (max-width: 500px) { .proof-grid { grid-template-columns: 1fr; } }
.proof-item {
  padding: 0 4px;
  border-left: none;
}
.proof-v {
  font-family: var(--font-display);
  font-size: clamp(44px, 5.5vw, 64px);
  line-height: 1;
  color: var(--ink);
}
.proof-v .accent { color: var(--accent); }
.proof-l {
  font-size: 14px;
  color: var(--ink-2);
  margin-top: 10px;
  max-width: 24ch;
}

/* ---------- BI integration ---------- */
.bi-badges {
  margin: 40px 0 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.bi-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  transition: all .2s ease;
}
.bi-badge:hover {
  background: var(--bg-2);
  color: var(--ink);
  border-color: var(--accent);
}
.bi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .bi-grid { grid-template-columns: 1fr; } }
.bi-item {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
}
.bi-item h3 { font-size: 22px; margin-bottom: 10px; }
.bi-item p { color: var(--ink-2); font-size: 14.5px; margin: 0; }

/* ---------- Testimonials ---------- */
.testi-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .testi-grid { grid-template-columns: 1fr; } }
.testi {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.testi-mark {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 0.5;
  color: var(--accent);
  height: 24px;
}
.testi-quote {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.35;
  color: var(--ink);
  margin: 0;
  flex: 1;
  text-wrap: pretty;
}
.testi-author {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.testi-name {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.testi-role {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 4px;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in oklch, var(--ink) 55%, transparent);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.modal-overlay.on {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 40px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(10px);
  transition: transform .3s ease;
  box-shadow: 0 40px 80px -30px color-mix(in oklch, var(--ink) 60%, transparent);
}
.modal-overlay.on .modal { transform: translateY(0); }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--ink-2);
  transition: all .15s ease;
}
.modal-close:hover { background: var(--bg-2); color: var(--ink); }
.modal h3 {
  font-size: clamp(28px, 3vw, 34px);
  line-height: 1.1;
  margin-bottom: 8px;
}
.modal-sub { color: var(--ink-2); margin: 0 0 24px; font-size: 15px; }

.form-field { margin-bottom: 16px; }
.form-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: border-color .15s ease, background .15s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-2);
}
.form-field textarea { resize: vertical; min-height: 80px; }
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
  margin: 20px 0;
  line-height: 1.4;
}
.form-check input { margin-top: 3px; accent-color: var(--accent); }
.form-check a { color: var(--accent); text-decoration: underline; }
.form-required {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
  margin-top: 12px;
}
.form-success {
  text-align: center;
  padding: 20px 0;
}
.form-success .icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: color-mix(in oklch, var(--accent-2) 20%, transparent);
  color: var(--accent-2);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.hp { position: absolute; left: -9999px; }

/* ---------- Sticky CTA (mobile) ---------- */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  z-index: 40;
  display: none;
  transform: translateY(100%);
  transition: transform .3s ease;
}
.sticky-cta.on { transform: translateY(0); }
.sticky-cta .btn { width: 100%; justify-content: center; padding: 14px; }
@media (max-width: 720px) { .sticky-cta { display: block; } }

/* ---------- Cookie banner ---------- */
.cookie {
  position: fixed;
  left: 20px; right: 20px; bottom: 20px;
  max-width: 640px;
  margin: 0 auto;
  padding: 18px 22px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-md);
  z-index: 45;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 24px 48px -20px color-mix(in oklch, var(--ink) 60%, transparent);
  transform: translateY(140%);
  transition: transform .35s ease;
}
.cookie.on { transform: translateY(0); }
.cookie p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  flex: 1;
}
.cookie a { color: var(--accent); text-decoration: underline; }
.cookie-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.cookie .btn {
  padding: 8px 14px;
  font-size: 12px;
  border-radius: 999px;
}
.cookie .btn.ghost {
  background: transparent;
  color: var(--bg);
  border-color: color-mix(in oklch, var(--bg) 30%, transparent);
}
.cookie .btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
@media (max-width: 640px) {
  .cookie { flex-direction: column; align-items: stretch; }
  .cookie-actions { justify-content: flex-end; }
  body:has(.sticky-cta.on) .cookie { bottom: 84px; }
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 12px;
  transition: top .2s ease;
}
.skip-link:focus { top: 20px; }

/* ---------- Footer legal row ---------- */
.footer-legal {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  text-transform: uppercase;
  text-align: center;
}

/* Footer 4-col */
.footer-grid {
  grid-template-columns: 1.6fr repeat(4, 1fr);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Reveal on scroll ---------- */
/* (moved above; keeping utilities below) */

/* ---------- Utility ---------- */
.mt-24 { margin-top: 24px; }
.mt-56 { margin-top: 56px; }
