/* ============================================================
   §6 · Trust / local-first — "Your clients' data never leaves
   your team." — HM-440 (LP-08).

   The deepest, darkest moment of the page: this fold OWNS the
   ground descent from --hive-900 (held by §5 Pillars above) down
   into near-black --ink (inherited by §7 Proof below), so the two
   seams are invisible. Off-white text on this ground clears WCAG
   AA with wide margin; --muted-dark bodies clear it too (>=6:1 at
   the darkest point). Teal (--hive-500) is used ONLY as diagram
   fill/line — never as text — per DESIGN.md.
   ============================================================ */

.trust {
  background-image: linear-gradient(
    to bottom,
    var(--hive-900) 0%,
    var(--ink) 100%
  );
  /* a touch more room than the standard rhythm so the vault reads deepest */
  padding-block: clamp(5rem, 12vh, 9rem);
  overflow-x: clip;
}

.trust__inner {
  max-width: 60ch;
  margin-inline: auto;
  text-align: center;
}

.trust__title {
  color: var(--offwhite);
  text-wrap: balance;
}

.trust__lead {
  margin: var(--space-lg) auto 0;
  max-width: 52ch;
  color: var(--offwhite);
  font-size: var(--fs-h4);
  line-height: 1.5;
  text-wrap: balance;
}

/* ---- peer-to-peer sync diagram (decorative) ----
   Three identical devices, direct teal links, and a deliberately
   empty centre — no cloud, no hub. The absence is the message. */
.trust__diagram {
  max-width: 360px;
  margin: var(--space-3xl) auto 0;
}

.trust__diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

.trust__sync line {
  stroke: var(--hive-500);
  stroke-width: 2;
  stroke-linecap: round;
}

.trust__packet circle {
  fill: var(--hive-500);
  opacity: 0.6;
}

.trust__device rect {
  fill: var(--ink-2);
  stroke: var(--hive-300);
  stroke-width: 2;
}

.trust__device .trust__device-foot {
  fill: var(--hive-300);
  stroke: none;
}

.trust__device .trust__node {
  fill: var(--hive-500);
  stroke: none;
}

/* ---- Mobile: a vertical device stack replaces the triangle (< 768px) ----
   Same message — the vault on each teammate's machine, synced directly, no cloud.
   The triangle's "empty centre" idea becomes an explicit peer-to-peer caption. */
.trust__stack { display: none; }

@media (max-width: 767px) {
  .trust__diagram { display: none; }
  .trust__stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 20rem;
    margin: var(--space-3xl) auto 0;
  }
}

.trust__peer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  background: rgba(238, 241, 243, 0.02);
}
.trust__peer-icon { width: 2.15rem; height: auto; flex: none; }
.trust__peer-icon rect { fill: var(--ink-2); stroke: var(--hive-300); stroke-width: 2; }
.trust__peer-icon .trust__peer-node { fill: var(--hive-500); stroke: none; }   /* the vault */
.trust__peer-icon .trust__peer-base { fill: var(--hive-300); stroke: none; }
.trust__peer-who { color: var(--offwhite); font-weight: 600; font-size: 0.95rem; }
.trust__peer-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--hive-300);
}
.trust__peer-status::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--hive-500);          /* teal live-sync dot (fill/data) */
  box-shadow: 0 0 6px rgba(31, 122, 130, 0.7);
  animation: trust-live 2.4s ease-in-out infinite;
}
@keyframes trust-live { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* the direct peer-to-peer sync link between devices */
.trust__link {
  align-self: center;
  width: 2px;
  height: 1.5rem;
  background: var(--hive-500);
  opacity: 0.7;
}

.trust__stack-cap {
  margin: var(--space-lg) 0 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--muted-dark);
}

@media (prefers-reduced-motion: reduce) {
  .trust__peer-status::before { animation: none; opacity: 1; }
}

/* ---- the three facts: substantial statements, no cards, no icons ---- */
.trust__facts {
  margin: var(--space-4xl) auto 0;
  max-width: 46ch;
  text-align: left;
}

.trust__fact {
  padding-block: var(--space-xl);
  border-top: 1px solid var(--line-dark);
}

.trust__fact:last-child {
  border-bottom: 1px solid var(--line-dark);
}

.trust__fact-lead {
  margin: 0;
  color: var(--offwhite);
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.trust__fact-body {
  /* shorthand also clears the UA dd margin-inline-start indent */
  margin: var(--space-sm) 0 0;
  color: var(--muted-dark);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

@media (min-width: 768px) {
  .trust__facts {
    max-width: 54ch;
  }

  /* lead phrase and its sentence sit side by side — a statement, not a card */
  .trust__fact {
    display: grid;
    grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
    column-gap: var(--space-2xl);
    align-items: baseline;
  }

  .trust__fact-body {
    margin: 0;
  }
}
