/* ============================================================
 * Hero v3 — clean, iOS-clear, light theme
 * ============================================================ */
.hero3 {
  background: var(--bg-app);
  padding: 24px 0 64px;
  border-bottom: 1px solid var(--border);
}

.hero3__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 80px;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 32px;
  min-height: 560px;
}
@media (max-width: 1080px) {
  .hero3__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-top: 16px;
  }
  /* Let the columns + their content shrink to the viewport (no h-overflow). */
  .hero3__copy,
  .hero3__visual,
  .hero3__stage { min-width: 0; }
}

.hero3__copy { max-width: 520px; }

/* Eyebrow — sleek mono bar + uppercase label, as in the earlier version */
.hero3__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.hero3__eyebrow-bar {
  width: 36px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}
.hero3__eyebrow-text {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--fg-2);
  flex-wrap: wrap;
}
.hero3__eyebrow-strong {
  color: var(--accent-strong);
  font-weight: 600;
}
.hero3__eyebrow-sep {
  color: var(--fg-3);
}

/* Headline — the only big type on the page */
.hero3__title {
  font-size: clamp(36px, 4.6vw, 56px);
  font-weight: 660;
  letter-spacing: -0.025em;
  line-height: 1.04;
  color: var(--fg-1);
  margin: 0;
  text-wrap: balance;
  max-width: 19ch;
  hyphens: none;
}
.hero3__title-accent {
  position: relative;
  white-space: nowrap;
  background-image: linear-gradient(
    to top,
    color-mix(in oklab, var(--accent) 24%, transparent) 0%,
    color-mix(in oklab, var(--accent) 24%, transparent) 0.14em,
    transparent 0.14em);
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 100% 100%;
  padding-bottom: 0.02em;
}

.hero3__lede {
  margin: 24px 0 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 46ch;
  text-wrap: pretty;
}

.hero3__cta {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Trust strip — one-line operational posture under the CTAs. */
.hero3__trust {
  margin: 28px 0 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 22px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.10em;
  color: var(--fg-2);
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.hero3__trust::-webkit-scrollbar { display: none; }
.hero3__trust > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.hero3__trust-pip {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 24%, transparent);
}

/* Right column — conversation, with a subtle perspective tilt so the
   whole stack reads as "a step behind" the headline. */
.hero3__visual {
  position: relative;
  width: 100%;
  perspective: 1400px;
  perspective-origin: 30% 50%;
}
.hero3__stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  transform: rotateY(-8deg) rotateX(3deg) scale(0.86);
  transform-origin: 70% center;
  filter: drop-shadow(0 30px 56px rgba(11, 18, 32, 0.12));
  transition: transform 600ms var(--ease-emphasized);
}
.hero3__stage:hover {
  transform: rotateY(-5deg) rotateX(2deg) scale(0.90);
}
@media (max-width: 1080px) {
  .hero3__visual { perspective: none; }
  .hero3__stage {
    transform: none;
    margin: 0 auto;
    max-width: 520px;
  }
  .hero3__stage:hover { transform: none; }
}

/* Composer below the bubble — smaller, more compact surface */
.hero3__composer {
  width: 100%;
}
.hero3__composer > div {
  border-radius: 20px !important;
  padding: 16px 18px 14px !important;
  min-height: 72px !important;
  gap: 4px !important;
}
.hero3__composer textarea {
  font-size: 14px !important;
  min-height: 22px !important;
  height: 22px !important;
  line-height: 1.4 !important;
  overflow: hidden !important;
}

/* ----------------------------------------------------------
 * Agent bubble — light, in-chat analytics card.
 * Compact: no avatar / no name / no timestamp at the top.
 * The 15:42 UTC stamp lives at the END of the sources row.
 * ---------------------------------------------------------- */
.hbub {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow:
    0 1px 0 rgba(11, 18, 32, 0.04),
    0 16px 40px -20px rgba(11, 18, 32, 0.12);
}

.hbub__answer {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fg-1);
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.hbub__answer b {
  font-weight: 620;
  color: var(--fg-1);
}

/* Map analytics — real Esri satellite tiles (SatScene) + HUD overlay */
.hbub__map {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-surface-muted);
  border: 1px solid var(--border);
  aspect-ratio: 12 / 5;
}
.hbub__map-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Cards — three side-by-side */
.hbub__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.hbub__card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--bg-surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 0;
}
.hbub__card-k {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.hbub__card-v {
  font-size: 22px;
  font-weight: 660;
  letter-spacing: -0.025em;
  color: var(--fg-1);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-top: 2px;
}
.hbub__card-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-2);
  letter-spacing: -0.005em;
}
.hbub__card--conf .hbub__card-v {
  color: var(--accent-strong);
  font-size: 18px;
}

/* Confidence ring — circular gauge (matches the BeyondEx app's signature) */
.hbub__ring {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.hbub__ring-svg { width: 42px; height: 42px; display: block; flex-shrink: 0; }
.hbub__ring-num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  fill: var(--accent-strong);
  letter-spacing: -0.02em;
}
.hbub__ring-cap {
  font-size: 11px;
  font-weight: 540;
  color: var(--evidence-green);
  letter-spacing: -0.005em;
}
.hbub__card-d {
  font-size: 10.5px;
  color: var(--fg-3);
  margin-top: 2px;
}
.hbub__card-d--warn { color: var(--caution-amber); }

/* Sparkline — warm red area chart with subtle glow */
.hbub__spark {
  width: 100%;
  height: 36px;
  margin-top: 6px;
  display: block;
  overflow: visible;
}

/* Confidence gauge — clean horizontal bar with subtle thumb */
.hbub__gauge {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hbub__gauge-track {
  position: relative;
  height: 6px;
  border-radius: 9999px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  overflow: visible;
}
.hbub__gauge-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg,
    color-mix(in oklab, var(--accent) 75%, var(--accent-strong)) 0%,
    var(--accent-strong) 100%);
}
.hbub__gauge-thumb {
  position: absolute;
  top: 50%;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--accent-strong);
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.18);
}
.hbub__gauge-ticks {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--fg-3);
  letter-spacing: 0.04em;
  padding: 0 1px;
}

/* Brief header — quiet typographic ribbon */
.hbub__brief {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  letter-spacing: -0.005em;
}
.hbub__brief-doctype {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
}
.hbub__brief-sep { color: var(--fg-3); }
.hbub__brief-aoi {
  font-weight: 600;
  color: var(--fg-1);
}
.hbub__brief-id {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--fg-3);
  letter-spacing: 0.04em;
}

/* Footer rows — Sources / Review as labelled rows */
.hbub__foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.hbub__foot-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 12.5px;
  line-height: 1.4;
}
.hbub__foot-k {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
  min-width: 60px;
}
.hbub__foot-v {
  color: var(--fg-1);
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hbub__foot-tick {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--fg-on-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hbub__src-k {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.hbub__src-list { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.hbub__time {
  font-size: 10.5px;
  color: var(--fg-3);
  margin-left: auto;
}

/* SourceChip — colored pip + tiny icon per family */
.hbub__src {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 2px 8px 2px 7px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--bg-surface-muted);
  color: var(--fg-2);
  font-weight: 540;
}
.hbub__src-glyph { display: inline-flex; align-items: center; }
.hbub__src--public {
  background: var(--trust-blue-soft);
  color: var(--trust-blue);
  border-color: color-mix(in oklab, var(--trust-blue) 22%, var(--border));
}
.hbub__src--sar {
  background: color-mix(in oklab, var(--signal-violet) 10%, var(--bg-surface));
  color: var(--signal-violet-strong);
  border-color: color-mix(in oklab, var(--signal-violet) 28%, var(--border));
}
.hbub__src--optical {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: color-mix(in oklab, var(--accent) 28%, var(--border));
}
.hbub__src--advise {
  background: var(--status-warning-bg);
  color: var(--status-warning-fg);
  border-color: color-mix(in oklab, var(--caution-amber) 22%, var(--border));
}

/* ============================================================
 * "In service of" — numbered sector list, quiet typographic
 * ============================================================ */
.hero3__served {
  padding-top: 48px;
  margin-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.hero3__served-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.hero3__served-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 32px;
}
@media (max-width: 880px) {
  .hero3__served-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .hero3__served-list { grid-template-columns: 1fr; }
}
.hero3__served-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  color: var(--fg-1);
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: color var(--motion-fast) var(--ease-standard);
}
.hero3__served-idx {
  font-size: 11px;
  color: var(--accent-strong);
  letter-spacing: 0.04em;
  flex-shrink: 0;
  width: 22px;
}

/* ----------------------------------------------------------
 * Mobile fit — these live at the END so they win over the base
 * rules above by source order (equal specificity).
 *   · headline drops a size and the accent wraps (no right clip)
 *   · the trust strip wraps instead of horizontal-scroll-clipping
 * ---------------------------------------------------------- */
@media (max-width: 720px) {
  .hero3__title { font-size: clamp(28px, 8vw, 38px); }
  .hero3__title-accent { white-space: normal; }
  .hero3__trust {
    flex-wrap: wrap;
    overflow-x: visible;
    white-space: normal;
    gap: 10px 16px;
  }
}

/* For the Workflow eyebrow reuse — also restore the thin-bar style on
   any reuse of .hero3__eyebrow inside light surfaces */
