/* ============================================================
   workdrive.ai — landing page
   Concept: midnight command center. The whole page lives in the
   product's world — deep ink-navy, glowing logo blues, Geist.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Page (dark) */
  --bg: #070b15;
  --bg-2: #0a101d;
  --surface: #0e1626;
  --surface-2: #131d31;
  --line: rgba(151, 173, 208, 0.14);
  --line-strong: rgba(151, 173, 208, 0.26);
  --ink: #eaf0f9;
  --ink-2: #9aa9c0;
  --ink-3: #6c7b95;

  /* Brand (from the logo gradient) */
  --brand: #4fa8e8;
  --brand-deep: #2563c4;
  --brand-soft: rgba(79, 168, 232, 0.12);
  --brand-grad: linear-gradient(135deg, #4fa8e8 0%, #2563c4 100%);

  /* App frame (slightly lifted from the page) */
  --app-bg: #0d1526;
  --app-surface: #121d33;
  --app-surface-2: #182642;
  --app-line: #22314f;
  --app-line-soft: #1c2a46;
  --app-text: #e8edf6;
  --app-text-2: #a5b2c9;
  --app-text-3: #6b7a96;

  /* Data (validated vs #121D33: all six checks pass) */
  --series-1: #3987e5;
  --series-1-dim: #2c4a7a;
  --series-2: #199e70;
  --status-good: #0ca30c;
  --status-warn: #fab219;
  --good-text: #35c46f;

  /* Type */
  --font-display: "Gabarito", "Onest", sans-serif;
  --font-body: "Onest", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", monospace;

  --container: 1180px;
  --radius: 14px;
  --nav-h: 88px;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

::selection {
  background: rgba(79, 168, 232, 0.35);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Type helpers ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: var(--brand);
  opacity: 0.55;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0.85rem 0 1rem;
  text-wrap: balance;
}

.section-lede {
  color: var(--ink-2);
  max-width: 56ch;
  font-size: 1.08rem;
}

.section {
  padding: 7.5rem 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.62em 1.25em;
  border-radius: 999px;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-grad);
  color: #fff;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 10px 30px -10px rgba(79, 168, 232, 0.55);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 14px 36px -10px rgba(79, 168, 232, 0.7);
}

.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover {
  border-color: var(--brand);
  background: rgba(79, 168, 232, 0.08);
}

.btn .arr {
  transition: transform 0.15s ease;
}

.btn:hover .arr {
  transform: translateX(3px);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(7, 11, 21, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.25s ease,
    background 0.25s ease;
}

.nav.scrolled {
  border-bottom-color: var(--line);
  background: rgba(7, 11, 21, 0.88);
}

.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.logo-plate {
  width: 36px;
  height: 30px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow:
    0 0 0 3px rgba(79, 168, 232, 0.1),
    0 4px 14px -4px rgba(79, 168, 232, 0.35);
}

.logo-plate img {
  width: 30px;
  height: auto;
}

.brand .tld {
  color: var(--brand);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-2);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

/* ---------- Hero ---------- */
.hero {
  /* Fills the first viewport; the ticker sits flush at the fold */
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 2rem) 0 0;
  position: relative;
  overflow: clip;
  display: flex;
  flex-direction: column;
}

.hero::before {
  /* blue nebula behind the card cluster */
  content: "";
  position: absolute;
  top: -18%;
  right: -14%;
  width: 780px;
  height: 780px;
  background: radial-gradient(
    closest-side,
    rgba(37, 99, 196, 0.34),
    rgba(79, 168, 232, 0.1) 55%,
    transparent 75%
  );
  pointer-events: none;
}

.hero::after {
  /* faint grid texture */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(151, 173, 208, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(151, 173, 208, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(
    ellipse 90% 70% at 50% 20%,
    #000 20%,
    transparent 75%
  );
  mask-image: radial-gradient(
    ellipse 90% 70% at 50% 20%,
    #000 20%,
    transparent 75%
  );
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 3.5rem;
  align-items: center;
  flex: 1; /* centers hero content between nav and ticker */
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-2);
  border: 1px solid var(--line);
  background: rgba(14, 22, 38, 0.7);
  border-radius: 999px;
  padding: 0.4em 1em;
  margin-bottom: 1.6rem;
}

.hero-badge .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 rgba(79, 168, 232, 0.5);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(79, 168, 232, 0.45);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(79, 168, 232, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(79, 168, 232, 0);
  }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 4.6vw, 3.9rem);
  line-height: 1.07;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.hero h1 .accent {
  background: linear-gradient(120deg, #79c1f5 0%, #4fa8e8 45%, #3f83e0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  color: var(--ink-2);
  max-width: 54ch;
}

.hero-ctas {
  margin-top: 2.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* Floating product cards (hero right) */
.hero-cards {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  min-width: 0;
}

.hcard {
  background: rgba(16, 25, 43, 0.88);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 24px 60px -24px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 430px;
}

.hcard p {
  color: var(--ink);
}

.hcard-ask {
  transform: rotate(-1.2deg);
  margin-right: 3.2rem;
}

.hcard-ai {
  transform: rotate(0.8deg);
  border-color: rgba(79, 168, 232, 0.35);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 24px 64px -20px rgba(37, 99, 196, 0.45);
}

.hcard-stat {
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  transform: rotate(-0.8deg);
  margin-right: 5.5rem;
}

.hwho {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink-3);
  margin-bottom: 0.25rem;
}

.havatar {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.66rem;
  font-weight: 600;
}

.havatar.user {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.havatar.ai {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 0 18px rgba(79, 168, 232, 0.45);
}

.hsteps {
  list-style: none;
  margin-top: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--good-text);
}

.href-chip {
  font-size: 0.68rem;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.05em 0.5em;
}

.hstat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.hstat-lab {
  font-size: 0.78rem;
  color: var(--ink-2);
}

.hstat-lab b {
  color: var(--good-text);
  font-weight: 600;
}

/* Employee-ask ticker */
.ticker {
  margin-top: 1.5rem;
  border-block: 1px solid var(--line);
  padding: 0.9rem 0;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
}

.ticker-row {
  display: flex;
  gap: 3.5rem;
  width: max-content;
  animation: ticker 46s linear infinite;
}

.ticker span {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-2);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}

.ticker span::before {
  content: "›";
  color: var(--brand);
  font-weight: 600;
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

/* ============================================================
   PRODUCT TOUR — pinned scrollytelling
   ============================================================ */
.tour-track {
  height: 520vh;
  position: relative;
}

.tour-stage {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  overflow: hidden;
}

.tour-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
  width: 100%;
  transform: translateY(-3vh); /* optical center; shrinks the entry gap */
}

/* Slim kicker above the pinned stage (normal flow — fills the
   entry gap the stage's vertical centering would otherwise leave) */
.tour-intro {
  padding-top: 5rem;
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.tour-intro .section-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  max-width: none;
}

.tour-caption {
  position: relative;
  padding: 0.95rem 0 0.95rem 1.4rem;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.tour-caption::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line-strong);
}

.tour-caption .fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 0%;
  background: var(--brand);
}

.tour-caption h3 {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.55em;
}

.tour-caption h3 .idx {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--brand);
}

.tour-caption p {
  margin-top: 0.3rem;
  font-size: 0.92rem;
  color: var(--ink-2);
  line-height: 1.5;
}

.tour-caption.is-active {
  opacity: 1;
}

/* ---------- App window ---------- */
.app-frame {
  background: var(--app-bg);
  border-radius: 16px;
  border: 1px solid rgba(151, 173, 208, 0.2);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 0 0 6px rgba(79, 168, 232, 0.05),
    0 32px 90px -30px rgba(0, 0, 0, 0.8),
    0 40px 120px -32px rgba(37, 99, 196, 0.35);
  overflow: hidden;
  color: var(--app-text);
  font-size: 0.84rem;
  line-height: 1.5;
}

/* Chrome bar */
.app-chrome {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--app-line-soft);
}

.app-chrome .dots {
  display: flex;
  gap: 6px;
}

.app-chrome .dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2c3a57;
}

.app-chrome .dots i:nth-child(1) {
  background: #e5654e;
}
.app-chrome .dots i:nth-child(2) {
  background: #f0b429;
}
.app-chrome .dots i:nth-child(3) {
  background: #3ac569;
}

.app-chrome .urlbar {
  flex: 1;
  max-width: 340px;
  margin-inline: auto;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--app-text-2);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--app-line-soft);
  border-radius: 8px;
  padding: 0.32em 1em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}

.app-chrome .urlbar svg {
  width: 10px;
  height: 10px;
  opacity: 0.7;
}

.app-chrome .avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-grad);
  font-size: 0.62rem;
  font-weight: 600;
  color: #fff;
  display: grid;
  place-items: center;
}

/* Frame body: sidebar + views */
.app-body {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  height: min(620px, 70vh);
}

.app-side {
  border-right: 1px solid var(--app-line-soft);
  padding: 0.9rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255, 255, 255, 0.015);
}

.app-side .side-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem 0.9rem;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--app-text);
}

.app-side .side-brand .logo-plate {
  width: 26px;
  height: 22px;
  border-radius: 6px;
  border: 0;
  box-shadow: none;
}

.app-side .side-brand .logo-plate img {
  width: 20px;
}

.side-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.48rem 0.6rem;
  border-radius: 8px;
  color: var(--app-text-2);
  font-weight: 500;
  font-size: 0.8rem;
  transition:
    background 0.25s ease,
    color 0.25s ease;
}

.side-item svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.side-item.is-active {
  background: rgba(57, 135, 229, 0.14);
  color: var(--app-text);
}

.side-item.is-active svg {
  color: var(--series-1);
}

.side-sep {
  margin: 0.7rem 0.6rem;
  border-top: 1px solid var(--app-line-soft);
}

.side-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--app-text-3);
  padding: 0.2rem 0.6rem 0.4rem;
}

.side-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.6rem;
  color: var(--app-text-2);
  font-size: 0.76rem;
}

.side-foot .avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 600;
  display: grid;
  place-items: center;
}

/* View stack */
.app-views {
  position: relative;
  overflow: hidden;
}

.app-view {
  position: absolute;
  inset: 0;
  padding: 1.05rem 1.2rem;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.app-view.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.view-tab {
  display: none; /* shown only in static fallback */
}

.view-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.view-title h4 {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.view-title .meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--app-text-3);
}

/* Cards inside views */
.panel {
  background: var(--app-surface);
  border: 1px solid var(--app-line-soft);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

/* ----- View 1: Assistant ----- */
.chat-flow {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-width: 560px;
}

.msg {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.msg .who {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.6rem;
  font-weight: 600;
}

.msg.user .who {
  background: #2c3a57;
  color: var(--app-text);
}

.msg.ai .who {
  background: var(--brand-grad);
  color: #fff;
}

.msg .bubble {
  background: var(--app-surface);
  border: 1px solid var(--app-line-soft);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  font-size: 0.8rem;
}

.msg.user .bubble {
  background: rgba(57, 135, 229, 0.13);
  border-color: rgba(57, 135, 229, 0.25);
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.plan-step {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.76rem;
  color: var(--app-text-2);
  font-family: var(--font-mono);
}

.plan-step .st {
  flex: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.plan-step.done .st {
  color: var(--good-text);
}
.plan-step.run .st {
  color: var(--series-1);
}
.plan-step.wait .st {
  color: var(--app-text-3);
}

.approval {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.65rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(250, 178, 25, 0.35);
  background: rgba(250, 178, 25, 0.07);
  border-radius: 9px;
  font-size: 0.76rem;
}

.approval .lab {
  display: flex;
  align-items: center;
  gap: 0.5em;
  color: var(--app-text-2);
}

.approval .lab svg {
  width: 13px;
  height: 13px;
  color: var(--status-warn);
}

.approval .acts {
  display: flex;
  gap: 0.45rem;
}

.chip {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.32em 0.9em;
  border-radius: 999px;
}

.chip.ok {
  background: var(--series-1);
  color: #fff;
}
.chip.no {
  border: 1px solid var(--app-line);
  color: var(--app-text-2);
}

.outcome {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: var(--good-text);
}

.outcome svg {
  width: 14px;
  height: 14px;
}

.outcome .ref {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--app-text-2);
  border: 1px solid var(--app-line);
  border-radius: 6px;
  padding: 0.1em 0.55em;
}

/* ----- View 2: Dashboard ----- */
.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
}

.kpi .lab {
  font-size: 0.7rem;
  color: var(--app-text-2);
}

.kpi .val {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 0.1rem;
}

.kpi .delta {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  margin-top: 0.15rem;
  color: var(--good-text);
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.kpi .delta.muted {
  color: var(--app-text-3);
}

.kpi .spark {
  margin-top: 0.45rem;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 0.7rem;
  flex: 1;
  min-height: 0;
}

.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.chart-head h5 {
  font-size: 0.78rem;
  font-weight: 600;
}

.chart-head .rng {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--app-text-3);
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  overflow: hidden;
}

.feed-row {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.72rem;
  color: var(--app-text-2);
}

.feed-row .dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 0.35em;
  background: var(--series-1);
}

.feed-row .dot.g {
  background: var(--status-good);
}
.feed-row .dot.w {
  background: var(--status-warn);
}

.feed-row b {
  color: var(--app-text);
  font-weight: 600;
}

.feed-row time {
  margin-left: auto;
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--app-text-3);
}

/* horizontal intent bars (CSS marks; rounded data-end, square baseline) */
.intents {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.intent {
  display: grid;
  grid-template-columns: 118px 1fr 34px;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.7rem;
  color: var(--app-text-2);
}

.intent .track {
  height: 8px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.05);
}

.intent .bar {
  height: 100%;
  background: var(--series-1);
  border-radius: 0 4px 4px 0;
}

.intent .num {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--app-text-2);
  text-align: right;
}

/* ----- View 3: Reports ----- */
.report-prompt {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--app-text-2);
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
}

.report-prompt .caret {
  color: var(--series-1);
  font-weight: 600;
}

.report-prompt .go {
  margin-left: auto;
  background: var(--series-1);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.68rem;
  border-radius: 999px;
  padding: 0.3em 0.95em;
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 0.7rem;
  flex: 1;
  min-height: 0;
}

.legend {
  display: flex;
  gap: 1rem;
  font-size: 0.66rem;
  color: var(--app-text-2);
}

.legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  margin-right: 0.4em;
  vertical-align: -1px;
}

.legend .s1 i {
  background: var(--series-1);
}
.legend .s2 i {
  background: var(--series-2);
}

.rtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.7rem;
}

.rtable th {
  text-align: left;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-text-3);
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid var(--app-line-soft);
}

.rtable td {
  padding: 0.42rem 0.4rem;
  border-bottom: 1px solid var(--app-line-soft);
  color: var(--app-text-2);
}

.rtable td:first-child {
  color: var(--app-text);
  font-weight: 500;
}

.rtable td.n {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.rtable .up {
  color: var(--good-text);
}

.export-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.export-row .x {
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid var(--app-line);
  color: var(--app-text-2);
  border-radius: 999px;
  padding: 0.3em 0.9em;
  display: inline-flex;
  gap: 0.4em;
  align-items: center;
}

.export-row .x svg {
  width: 11px;
  height: 11px;
}

.chart-note {
  margin-top: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--app-text-3);
}

/* ----- View 4: Governance ----- */
.gov-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 0.7rem;
  flex: 1;
  min-height: 0;
}

.gov-col {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 0;
}

.ptable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.7rem;
}

.ptable th,
.ptable td {
  padding: 0.4rem 0.45rem;
  border-bottom: 1px solid var(--app-line-soft);
  text-align: center;
}

.ptable th {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-text-3);
}

.ptable th:first-child,
.ptable td:first-child {
  text-align: left;
  color: var(--app-text);
  font-weight: 500;
}

.ptable td:first-child {
  white-space: nowrap;
}

.perm {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: 0.62rem;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.perm.allow {
  color: var(--good-text);
}
.perm.approve {
  color: var(--status-warn);
}
.perm.deny {
  color: var(--app-text-3);
}

.policy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.45rem 0;
  font-size: 0.74rem;
  color: var(--app-text-2);
  border-bottom: 1px solid var(--app-line-soft);
}

.policy:last-child {
  border-bottom: 0;
}

.policy b {
  color: var(--app-text);
  font-weight: 600;
}

.toggle {
  flex: none;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: var(--series-1);
  position: relative;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
}

.toggle.off {
  background: #2c3a57;
}
.toggle.off::after {
  right: auto;
  left: 2px;
}

.audit {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--app-text-2);
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  overflow: hidden;
}

.audit-row {
  display: flex;
  gap: 0.45rem;
  white-space: nowrap;
}

.audit-row time {
  color: var(--app-text-3);
  flex: none;
}
.audit-row .act {
  color: var(--series-1);
  flex: none;
}
.audit-row .ok {
  color: var(--good-text);
  margin-left: auto;
  flex: none;
}
.audit-row .wr {
  color: var(--status-warn);
  margin-left: auto;
  flex: none;
}

/* ============================================================
   Static fallback (mobile / prefers-reduced-motion)
   ============================================================ */
html.tour-static .tour-track {
  height: auto;
}

html.tour-static .tour-stage {
  position: static;
  height: auto;
  overflow: visible;
  padding: 4rem 0;
}

html.tour-static .tour-grid {
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
  transform: none;
}

html.tour-static .tour-caption {
  opacity: 1;
  cursor: default;
}
html.tour-static .tour-caption .fill {
  display: none;
}

html.tour-static .app-body {
  display: block;
  height: auto;
}

html.tour-static .app-side {
  display: none;
}

html.tour-static .app-views {
  position: static;
}

html.tour-static .app-view {
  position: static;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  border-top: 1px solid var(--app-line);
  min-height: 0;
}

html.tour-static .app-view:first-of-type {
  border-top: 0;
}

html.tour-static .view-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--series-1);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .ticker-row {
    animation: none;
    flex-wrap: wrap;
    width: auto;
  }
  .hero-badge .pulse {
    animation: none;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================================
   Page sections below the tour
   ============================================================ */

/* Problem */
.problem-grid {
  margin-top: 3.2rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.problem-cell {
  padding: 1.9rem 2rem;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  position: relative;
}

.problem-cell:nth-child(2n) {
  border-right: 0;
}
.problem-cell:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.problem-cell .num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--brand);
}

.problem-cell h3 {
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 600;
  margin: 0.5rem 0 0.4rem;
  letter-spacing: -0.01em;
}

.problem-cell p {
  font-size: 0.95rem;
  color: var(--ink-2);
}

.problem-punch {
  margin-top: 2.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  max-width: 44ch;
}

.problem-punch em {
  font-style: normal;
  color: var(--brand);
}

/* How it works */
.how-flow {
  margin-top: 3.4rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
  position: relative;
}

.how-step {
  position: relative;
  padding-top: 1.4rem;
}

.how-step::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 12px;
  right: -1.6rem;
  height: 1px;
  background: var(--line-strong);
}

.how-step:last-child::before {
  right: 0;
}

.how-step::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2.5px solid var(--brand);
  background: var(--bg);
  box-shadow: 0 0 12px rgba(79, 168, 232, 0.5);
}

.how-step .k {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}

.how-step h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0.35rem 0 0.45rem;
}

.how-step p {
  font-size: 0.93rem;
  color: var(--ink-2);
}

/* Integrations */
.integrations {
  background: var(--bg-2);
}

.int-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}

.int-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.int-card:hover {
  transform: translateY(-2px);
  border-color: rgba(79, 168, 232, 0.4);
  box-shadow: 0 12px 30px -14px rgba(37, 99, 196, 0.35);
}

.int-card .glyph {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.82rem;
}

.int-card .glyph.white {
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.int-card .glyph.white img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.int-card .glyph.now {
  background: #62d84e;
  color: #032d42;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: -0.02em;
}

.int-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
}

.int-card p {
  font-size: 0.78rem;
  color: var(--ink-3);
}

.int-note {
  margin-top: 1.6rem;
  font-size: 0.9rem;
  color: var(--ink-3);
  font-family: var(--font-mono);
}

/* Governance deep-dive */
.gov-band {
  background:
    radial-gradient(
      ellipse 70% 60% at 85% 0%,
      rgba(37, 99, 196, 0.14),
      transparent 70%
    ),
    var(--bg);
}

.gov-band .eyebrow {
  color: var(--brand);
}
.gov-band .eyebrow::before {
  background: var(--brand);
}
.gov-band .section-lede {
  color: var(--ink-2);
}

.gov-features {
  margin-top: 3.2rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.gov-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.9rem 2rem 2rem;
  transition: border-color 0.18s ease;
}

.gov-card:hover {
  border-color: rgba(79, 168, 232, 0.35);
}

.gov-card .ic {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}

.gov-card .ic svg {
  width: 18px;
  height: 18px;
}

.gov-card h3 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.gov-card h3 .sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.2em 0.65em;
}

.gov-card p {
  font-size: 0.9rem;
  color: var(--ink-2);
}

.gov-points {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.gov-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.65em;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.gov-points li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  margin-top: 0.55em;
  border-radius: 50%;
  background: var(--brand);
}

/* Compliance chips (governance band) */
.compliance {
  margin-top: 2.6rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.comp-lab {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  margin-right: 0.6rem;
}

.comp-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.35em 1em;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.comp-chip::before {
  content: "✓";
  color: var(--good-text);
  font-size: 0.8em;
}

/* Agents */
.agent-grid {
  margin-top: 3.2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.agent-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.6rem 1.6rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.agent-card:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 168, 232, 0.4);
  box-shadow: 0 18px 44px -20px rgba(37, 99, 196, 0.4);
}

.agent-card .tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}

.agent-card h3 {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.agent-card p {
  font-size: 0.93rem;
  color: var(--ink-2);
  flex: 1;
}

.agent-card .ask {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-2);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5em 0.8em;
}

.agent-card .ask::before {
  content: "“";
  color: var(--brand);
}

.agent-card .ask::after {
  content: "”";
  color: var(--brand);
}

/* FAQ */
.faq-wrap {
  margin-top: 3rem;
  max-width: 760px;
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .plus {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
}

.faq-item[open] summary .plus {
  transform: rotate(45deg);
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: #fff;
}

.faq-item .faq-a {
  padding: 0 0 1.4rem;
  color: var(--ink-2);
  max-width: 62ch;
  font-size: 0.98rem;
}

/* Final CTA */
.final {
  text-align: center;
  padding: 8.5rem 0;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.final::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -46%;
  transform: translateX(-50%);
  width: 940px;
  height: 600px;
  background: radial-gradient(
    closest-side,
    rgba(57, 135, 229, 0.3),
    transparent 74%
  );
  pointer-events: none;
}

.final-inner {
  position: relative;
}

.final .logo-plate {
  width: 58px;
  height: 48px;
  border-radius: 13px;
  margin: 0 auto 1.8rem;
}

.final .logo-plate img {
  width: 46px;
}

.final h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 22ch;
  margin: 0 auto;
  text-wrap: balance;
}

.final p {
  margin: 1.3rem auto 0;
  color: var(--ink-2);
  max-width: 48ch;
  font-size: 1.08rem;
}

.final .hero-ctas {
  justify-content: center;
}

/* Footer */
.footer {
  background: #05080f;
  color: var(--ink-3);
  border-top: 1px solid var(--line);
  padding: 2.2rem 0;
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer .brand {
  color: var(--ink);
  font-size: 0.95rem;
}

.footer .brand .logo-plate {
  width: 28px;
  height: 24px;
  border-radius: 6px;
  box-shadow: none;
}

.footer .brand .logo-plate img {
  width: 22px;
}

.footer-links {
  display: flex;
  gap: 1.6rem;
}

.footer-links a:hover {
  color: var(--ink-2);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero-cards {
    align-items: flex-start;
    max-width: 520px;
  }
  .hcard-ask {
    margin-right: 0;
  }
  .hcard-stat {
    margin-right: 0;
  }
}

@media (max-width: 1024px) {
  .tour-grid {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 2.2rem;
  }
  .app-body {
    grid-template-columns: 150px minmax(0, 1fr);
  }
  .int-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .how-flow {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 2.6rem;
  }
  .how-step:nth-child(2)::before {
    right: 0;
  }
  .gov-features {
    grid-template-columns: repeat(2, 1fr);
  }
  .agent-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .section {
    padding: 5.5rem 0;
  }
  .nav-links {
    display: none;
  }
  .problem-grid {
    grid-template-columns: 1fr;
  }
  .problem-cell {
    border-right: 0 !important;
  }
  .problem-cell:not(:last-child) {
    border-bottom: 1px solid var(--line) !important;
  }
  .int-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gov-features {
    grid-template-columns: 1fr;
  }
  .agent-grid {
    grid-template-columns: 1fr;
  }
  .kpis {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  .kpi .val {
    font-size: 1.15rem;
  }
  .kpi .spark {
    display: none;
  }
  .app-view .panel {
    overflow-x: auto;
  }
  .chart-head,
  .view-title,
  .report-prompt {
    flex-wrap: wrap;
    row-gap: 0.3rem;
  }
  .dash-grid,
  .report-grid,
  .gov-grid {
    grid-template-columns: 1fr;
  }
  .how-flow {
    grid-template-columns: 1fr;
  }
  .how-step::before {
    display: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }
  .hero {
    padding-top: calc(var(--nav-h) + 4rem);
  }
  .int-grid {
    grid-template-columns: 1fr;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .nav .btn-ghost {
    display: none;
  }
  .nav .btn {
    width: auto;
  }
}
