/* ============================================================
   Forelab — Landing page
   ClickUp-inspired design + motion system:
   - entrance boot timeline (staggered hero)
   - scroll-scrubbed word reveals on headlines
   - dark agent capability showcase with cursor-reactive panels
   - white -> dark page theme flip
   - hover scene animations on cards
   - count-up stats, marquee, parallax floats, auto-panning wall
   ============================================================ */

:root {
  --ink: #17171c;
  --ink-2: #2c2c33;
  --body: #55565e;
  --fade: #b7bac2;
  --fade-dark: #5c5e6a;

  --bg: #ffffff;
  --bg-gray: #f6f6f8;
  --bg-dark: #0a0a0d;
  --panel-dark: #101014;

  --border: #e9e9ee;
  --border-dark: rgba(255, 255, 255, 0.1);

  --accent: #3454d1;
  --accent-soft: #eef1fd;
  --violet: #7b5cf0;
  --grad: linear-gradient(100deg, #3454d1 0%, #7b5cf0 55%, #c95bd6 100%);

  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --shadow-card: 0 1px 2px rgba(23, 23, 28, 0.05), 0 12px 32px -12px rgba(23, 23, 28, 0.14);
  --shadow-float: 0 2px 6px rgba(23, 23, 28, 0.08), 0 24px 48px -16px rgba(23, 23, 28, 0.22);
}

/* ============================================================
   Base
   ============================================================ */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 6.5rem; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.7s var(--ease);
}

/* Page theme flip (white -> dark while in the dark passage) */
body.theme-dark { background: var(--bg-dark); }

body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3 {
  margin: 0 0 1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

h1 { font-size: clamp(2.5rem, 3.8vw, 3.7rem); }
h3 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); letter-spacing: -0.03em; line-height: 1.12; }

p { margin: 0 0 1rem; color: var(--body); }

.container { width: min(76rem, calc(100% - 3rem)); margin: 0 auto; position: relative; }

.giant {
  max-width: 56rem;
  margin: 0 auto 1rem;
  text-align: center;
  font-size: clamp(2.3rem, 4.6vw, 3.9rem);
}

.giant.light { color: #fff; }

.giant-sub {
  max-width: 36rem;
  margin: 0 auto 2.8rem;
  text-align: center;
  font-size: 1.1rem;
}

.giant-sub.light { color: rgba(255, 255, 255, 0.6); }

.fade-tail { color: var(--fade); }

/* Scroll-scrubbed word reveal */
.words .w { color: var(--fade); transition: color 0.3s var(--ease); }
.words .w.lit { color: var(--ink); }
.words .w.stay { color: var(--fade) !important; }

.giant.light.words .w { color: #3d3d47; }
.giant.light.words .w.lit { color: #fff; }
.giant.light.words .w.stay { color: #62646f !important; }

.mono-label {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--fade-dark);
}

.mono-label.light { color: rgba(255, 255, 255, 0.55); }

.mono-line {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--fade-dark);
  margin: 2.2rem 0 0.9rem;
}

.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
}

.x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #fdeeee;
  color: #d14040;
  font-size: 0.62rem;
  font-weight: 700;
}

/* ============================================================
   Buttons
   ============================================================ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
  transition: transform 0.25s var(--spring), background 0.2s var(--ease), box-shadow 0.25s var(--ease);
}

.dark-button { background: var(--ink); color: #fff; }
.dark-button:hover { background: #000; transform: translateY(-2px) scale(1.02); box-shadow: 0 12px 28px -10px rgba(23,23,28,0.55); }
.dark-button:active { transform: translateY(0) scale(0.99); }

.ghost-button { background: var(--bg-gray); color: var(--ink); }
.ghost-button:hover { background: #ececf1; transform: translateY(-1px); }

.light-button { background: #fff; color: var(--ink); }
.light-button:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 12px 30px -10px rgba(0,0,0,0.55); }

.big-button { padding: 0.95rem 1.8rem; font-size: 1.02rem; border-radius: 14px; }

.link-quiet { font-weight: 600; font-size: 0.94rem; color: var(--body); }
.link-quiet:hover { color: var(--ink); }

.cta-micro { margin: 0; font-size: 0.76rem; line-height: 1.45; color: var(--fade-dark); }

/* ============================================================
   Announcement bar + Header
   ============================================================ */

.announce {
  position: relative;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.55rem 1rem;
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  font-weight: 600;
  overflow: hidden;
}

.announce b { color: #fff; }
.announce-arrow { transition: transform 0.2s var(--ease); }
.announce:hover .announce-arrow { transform: translateX(4px); }

/* shimmer sweep across announcement bar */
.announce::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.08) 50%, transparent 60%);
  transform: translateX(-100%);
  animation: shimmer 5s var(--ease) infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0%, 55% { transform: translateX(-100%); }
  85%, 100% { transform: translateX(100%); }
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  transition: box-shadow 0.25s var(--ease), background-color 0.6s var(--ease);
}

.header.is-scrolled { box-shadow: 0 1px 0 var(--border), 0 8px 24px -16px rgba(23, 23, 28, 0.15); }

/* header adapts while the page is dark */
body.theme-dark .header { background: rgba(10, 10, 13, 0.75); }
body.theme-dark .header.is-scrolled { box-shadow: 0 1px 0 rgba(255,255,255,0.08); }
body.theme-dark .header .logo,
body.theme-dark .nav a,
body.theme-dark .link-quiet { color: #fff; }
body.theme-dark .nav a:hover { color: #9db1f5; }
body.theme-dark .ghost-button { background: rgba(255, 255, 255, 0.12); color: #fff; }
body.theme-dark .dark-button { background: #fff; color: var(--ink); }
body.theme-dark .menu-button span { background: #fff; }

.header-inner { display: flex; align-items: center; gap: 2.2rem; height: 4.2rem; }

/* ============================================================
   Forelab wordmark: Sora Bold, terminal "b" in the mark's ramp
   ------------------------------------------------------------
   Markup: <span>Forela<em>b</em></span>. The <em> is the b, filled
   with the same gradient as the generated wordmark
   (crm/assets/images/wordmark/, tools/generate_forelab_brand.py).
   Browsers without background-clip:text keep a flat brand b.
   Self-hosted Sora 700 (SIL OFL), no third-party font request.
   ============================================================ */
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("crm/assets/fonts/sora-700-latin.woff2") format("woff2");
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: "Sora", var(--sans);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.025em;
  transition: color 0.6s var(--ease);
}

.logo img { width: 1.75rem; height: auto; }
.logo.light { color: #fff; }

.logo span em {
  font-style: normal;
  font-weight: inherit;
  letter-spacing: inherit;
  color: #3454D1;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .logo span em {
    background: linear-gradient(50deg, #2A44A8 0%, #3454D1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .logo.light span em,
  body.theme-dark .header .logo span em {
    background: linear-gradient(50deg, #3454D1 0%, #7D92E8 100%);
  }
}

.nav { display: flex; gap: 1.7rem; margin: 0 auto; }

.nav a { font-size: 0.93rem; font-weight: 600; color: var(--ink-2); transition: color 0.3s; }
.nav a:hover { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 0.9rem; margin-left: auto; }
.header-actions .button { padding: 0.55rem 1.15rem; }

.menu-button {
  display: none;
  margin-left: auto;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menu-button span { width: 1.1rem; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 0.25s var(--ease); }
body.menu-open .menu-button span:first-child { transform: translateY(3.5px) rotate(45deg); }
body.menu-open .menu-button span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.8rem 1.5rem 1.4rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.mobile-menu a:not(.button) { padding: 0.65rem 0; font-weight: 600; border-bottom: 1px solid var(--border); }
.mobile-menu .button { margin-top: 1rem; }
body.menu-open .mobile-menu { display: flex; }

/* ============================================================
   Boot entrance timeline (hero)
   ============================================================ */

[data-boot] {
  opacity: 0;
  transform: translateY(26px);
}

body.booted [data-boot] {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.7s var(--ease) calc(var(--bi, 0) * 110ms),
    transform 0.7s var(--ease) calc(var(--bi, 0) * 110ms);
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  padding: 4.5rem 0 2rem;
  overflow: hidden;
  /* On-brand ambient color wash — blue -> violet -> magenta, drawn from
     --grad. It lives on the hero section only, concentrated near the top and
     fading to transparent, so the color reads on first load and scrolls away
     with the hero as the page moves down. */
  background:
    radial-gradient(1100px 520px at 78% -14%, rgba(52, 84, 209, 0.18), transparent 60%),
    radial-gradient(900px 480px at 12% -8%, rgba(64, 150, 235, 0.15), transparent 62%),
    radial-gradient(820px 460px at 50% -18%, rgba(123, 92, 240, 0.16), transparent 58%),
    radial-gradient(760px 460px at 97% 30%, rgba(201, 91, 214, 0.12), transparent 60%),
    radial-gradient(680px 420px at 24% 40%, rgba(123, 92, 240, 0.08), transparent 62%);
  background-repeat: no-repeat;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 33rem) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-2);
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--grad) border-box;
  border: 1px solid transparent;
  box-shadow: 0 2px 10px -4px rgba(123, 92, 240, 0.35);
  transition: transform 0.25s var(--spring), box-shadow 0.25s var(--ease);
}

.hero-badge:hover { transform: translateY(-2px); box-shadow: 0 6px 18px -6px rgba(123, 92, 240, 0.5); }

.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse-dot 2.2s ease-in-out infinite; }

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 84, 209, 0.45); }
  50% { box-shadow: 0 0 0 5px rgba(52, 84, 209, 0); }
}

.badge-arrow { color: var(--fade-dark); transition: transform 0.2s var(--ease); }
.hero-badge:hover .badge-arrow { transform: translateX(3px); }

.hero-copy h1 { margin-bottom: 1.6rem; }

.hero-checks { display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 1.8rem; }
.hero-checks li { display: flex; align-items: flex-start; gap: 0.65rem; }
.hero-checks .check { margin-top: 0.2rem; }
.hero-checks p { margin: 0; font-size: 0.97rem; color: var(--body); }
.hero-checks b { color: var(--ink); font-weight: 700; }

.hero-cta { display: flex; align-items: center; gap: 1rem; }
.hero-cta.centered { justify-content: center; margin-top: 0.6rem; }

.hero-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; max-width: 30rem; }

.chip {
  appearance: none;
  padding: 0.34rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: border-color 0.2s, background 0.2s, transform 0.25s var(--spring), box-shadow 0.25s;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--accent);
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 0 6px 14px -8px rgba(52, 84, 209, 0.4);
}

.chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chip i {
  display: inline-block;
  width: 0;
  overflow: hidden;
  opacity: 0;
  font-style: normal;
  font-size: 0.7rem;
  transition: width 0.2s var(--ease), opacity 0.2s var(--ease);
}
.chip.active i { width: 0.75rem; opacity: 1; }
.chip:focus-visible {
  outline: 3px solid rgba(52, 84, 209, 0.24);
  outline-offset: 2px;
}

/* Hero visual with mouse parallax + tilt */
.hero-visual { position: relative; }

.hero-shot {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-float);
  transition: transform 0.3s var(--ease);
  will-change: transform;
}

.hero-shot img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.22s var(--ease), transform 0.4s var(--ease);
}

.hero-shot.is-switching img {
  opacity: 0.18;
  transform: scale(0.985) translateY(6px);
}

.float-card {
  position: absolute;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-float);
  animation: floaty 5s ease-in-out infinite;
  will-change: transform;
}

.float-bubble {
  left: -2.4rem;
  bottom: 2.2rem;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  max-width: 15.5rem;
  padding: 0.8rem 0.95rem;
}

.float-bubble p { margin: 0; font-size: 0.78rem; line-height: 1.45; color: var(--body); }
.float-bubble b { color: var(--ink); }

.float-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 0.9rem;
}

.float-chip { right: -1.2rem; top: 1.8rem; padding: 0.65rem 1rem; animation-delay: 1.4s; }
.float-chip b { display: block; font-size: 1.15rem; letter-spacing: -0.03em; color: #1a9c5b; }
.float-chip span { font-size: 0.72rem; font-weight: 600; color: var(--fade-dark); }

@keyframes floaty {
  0%, 100% { transform: translate(var(--px, 0), var(--py, 0)) translateY(0); }
  50% { transform: translate(var(--px, 0), var(--py, 0)) translateY(-9px); }
}

/* Logos / marquee band */
.logos-band { margin-top: 4.5rem; text-align: center; }

.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: inline-flex;
  gap: 3.4rem;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-track span {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #c3c5cd;
  transition: color 0.25s var(--ease);
}

.marquee-track span:hover { color: var(--ink); }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   Problem section — hover scene cards
   ============================================================ */

.problem { padding: 7rem 0 5.5rem; }

.problem-icons { display: flex; justify-content: center; gap: 1rem; margin: 2.6rem 0 3rem; }

.pi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-card);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink-2);
  transform: rotate(var(--r, 0deg)) translateY(var(--sy, 0px));
  transition: transform 0.35s var(--spring), box-shadow 0.3s;
  will-change: transform;
}

.pi:hover { transform: rotate(0deg) translateY(calc(var(--sy, 0px) - 6px)) scale(1.12); box-shadow: var(--shadow-float); }
.pi.is-accent { background: var(--grad); color: #fff; border: 0; }

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  max-width: 62rem;
  margin: 0 auto;
}

.problem-card {
  padding: 1.5rem 1.6rem 1.7rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: #fff;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
  overflow: hidden;
}

.problem-card:hover {
  transform: translateY(-4px);
  border-color: #d8dbe8;
  box-shadow: var(--shadow-float);
}

.pc-scene {
  margin-bottom: 1.1rem;
  border-radius: 12px;
  background: var(--bg-gray);
  overflow: hidden;
}

.pc-scene svg { width: 100%; height: auto; display: block; }

.problem-card h3 { font-size: 1.3rem; margin-bottom: 0.35rem; }
.problem-card p { margin: 0; font-size: 0.93rem; }
.problem-card b { color: var(--ink); }

/* Scene 1: window shuffle on hover */
.pcw { transition: transform 0.5s var(--spring); }
.problem-card:hover .pcw-1 { transform: translate(-8px, 6px) rotate(-2deg); }
.problem-card:hover .pcw-2 { transform: translate(4px, -6px) rotate(1.5deg); }
.problem-card:hover .pcw-3,
.problem-card:hover .pcw-3b,
.problem-card:hover .pcw-3c,
.problem-card:hover .pcw-3d { transform: translate(6px, -4px); }
.pc-cursor { transition: transform 0.6s var(--ease); }
.problem-card:hover .pc-cursor { transform: translate(-60px, -34px); }

/* Scene 2: dashed line draws + nodes pop */
.pc-dash { stroke-dashoffset: 0; }
.problem-card:hover .pc-dash { animation: dash-flow 1.2s linear infinite; }
@keyframes dash-flow { to { stroke-dashoffset: -26; } }
.pc-node { transition: transform 0.4s var(--spring); transform-origin: center; transform-box: fill-box; }
.problem-card:hover .pc-n1 { transform: scale(1.6); }
.problem-card:hover .pc-n2 { transform: scale(1.9); transition-delay: 0.08s; }
.problem-card:hover .pc-n3 { transform: scale(1.6); transition-delay: 0.16s; }
.pc-q { transition: transform 0.45s var(--spring); }
.problem-card:hover .pc-q { transform: translateY(-6px) rotate(-2deg); }

/* Scene 3: bars re-grow on hover */
.pc-bar { transform-origin: bottom; transform-box: fill-box; }
.problem-card:hover .pc-bar { animation: bar-grow 0.7s var(--spring) both; }
.problem-card:hover .pc-b2 { animation-delay: 0.07s; }
.problem-card:hover .pc-b3 { animation-delay: 0.14s; }
.problem-card:hover .pc-b4 { animation-delay: 0.21s; }
.problem-card:hover .pc-b5 { animation-delay: 0.28s; }
@keyframes bar-grow { from { transform: scaleY(0.1); } to { transform: scaleY(1); } }

/* ============================================================
   Platform grid wall (auto-panning)
   ============================================================ */

.platform { padding: 5.5rem 0 6.5rem; }

.wall {
  margin-top: 3rem;
  /* Static, full-bleed grid. This used to be an over-wide strip that panned
     sideways behind an edge mask, so the tiles sat off-centre and half the
     capabilities were cropped at any moment. The wall is a capability
     inventory — it should be readable at a glance, not a carousel. */
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-auto-rows: 6.2rem;
  /* The four 2x2 feature tiles can't always fit the columns left in a row, so
     plain auto-placement leaves holes mid-grid. Dense back-fills them with the
     next small tile. 44 small + 4 featured = 60 slots, which divides exactly
     into both the 10-column and 4-column layouts, so no partial last row. */
  grid-auto-flow: row dense;
  gap: 1px;
  width: 100%;
  margin: 0 auto;
  background: var(--border);
  border-block: 1px solid var(--border);
}

.cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fade-dark);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.cell:hover { background: var(--bg-gray); color: var(--ink); }

.cell i {
  font-style: normal;
  font-size: 1.15rem;
  line-height: 1;
  opacity: 0.75;
  filter: grayscale(0.4);
  transition: transform 0.35s var(--spring), opacity 0.25s, filter 0.25s;
}

.cell:hover i { transform: translateY(-4px) scale(1.25) rotate(-6deg); opacity: 1; filter: none; }

/* Brand cells carry a real logo from the #lg-* sprite instead of a letter.
   The svg sits inside the same <i> so it inherits the hover lift, but an
   inline <svg> has no intrinsic size — without these dimensions it collapses
   to nothing. Colour comes from --sa on the cell (brand accent), and the
   shared grayscale sits on the <i>, so the logo de-saturates with its
   siblings and snaps to full brand colour on hover. */
.cell i > svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  fill: var(--sa, currentColor);
}

.cell.featured {
  grid-column: span 2;
  grid-row: span 2;
  flex-direction: row;
  gap: 0.8rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  position: relative;
  overflow: hidden;
}

.cell.featured::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.65) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease);
  pointer-events: none;
}

.cell.featured:hover::before { transform: translateX(120%); }

.f-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 12px;
  color: #fff;
  font-size: 1.25rem;
  transition: transform 0.4s var(--spring);
}

.cell.featured:hover .f-icon { transform: scale(1.15) rotate(-8deg); }

.f-blue   { background: radial-gradient(120% 120% at 50% 110%, rgba(52, 84, 209, 0.14), transparent 60%), #fff; }
.f-violet { background: radial-gradient(120% 120% at 50% 110%, rgba(123, 92, 240, 0.16), transparent 60%), #fff; }
.f-sky    { background: radial-gradient(120% 120% at 50% 110%, rgba(64, 150, 235, 0.14), transparent 60%), #fff; }
.f-indigo { background: radial-gradient(120% 120% at 50% 110%, rgba(94, 74, 227, 0.14), transparent 60%), #fff; }

.f-blue .f-icon   { background: #3454d1; }
.f-violet .f-icon { background: var(--grad); }
.f-sky .f-icon    { background: #4096eb; }
.f-indigo .f-icon { background: #5e4ae3; }

/* ============================================================
   Solutions tabs
   ============================================================ */

.solutions { padding: 5rem 0 7rem; }

.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-bottom: 2rem; }

.tab {
  padding: 0.48rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.25s var(--spring);
}

.tab:hover { border-color: var(--accent); transform: translateY(-2px); }
.tab.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.solution-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  padding: 3rem 3.2rem;
  border-radius: var(--r-xl);
  background: var(--bg-gray);
}

.sp-left h3 { margin-bottom: 0.9rem; }
.sp-left > p { font-size: 0.98rem; }
.sp-left .mono-label { margin: 1.6rem 0 1.2rem; }
.replaces { font-family: var(--sans); font-weight: 700; letter-spacing: 0; color: var(--ink-2); font-size: 0.85rem; }

.sp-checks { display: flex; flex-direction: column; gap: 0.6rem; }
.sp-checks li { display: flex; align-items: center; gap: 0.65rem; font-size: 0.94rem; color: var(--body); }

.sp-cards { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 1.4rem; }

.sp-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.95rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(23, 23, 28, 0.04);
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--ease);
}

.sp-card:hover { transform: translateY(-3px) scale(1.015); box-shadow: var(--shadow-card); }

/* tab-switch entrance for panel content */
.sp-anim-in .sp-card,
.sp-anim-in .sp-checks li {
  animation: sp-in 0.55s var(--ease) both;
  animation-delay: calc(var(--si, 0) * 70ms);
}

.sp-anim-in .sp-left h3,
.sp-anim-in .sp-left > p { animation: sp-in 0.5s var(--ease) both; }

@keyframes sp-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.sp-ava {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  color: #fff;
  font-size: 0.95rem;
}

.sp-ava svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.a1 { background: var(--grad); }
.a2 { background: #3454d1; }
.a3 { background: #e8913c; }
.a4 { background: #1a9c5b; }

.sp-actions { display: flex; gap: 0.7rem; }

/* ============================================================
   Dark passage: Forelab Agent capability showcase
   ============================================================ */

.dark-pass {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: transparent;
}

.assistant-zone {
  position: relative;
  padding: 0 0 6rem;
}

.agent-showcase::before {
  content: none;
}

.agent-showcase::after {
  content: "";
  position: absolute;
  inset: 100vh 0 0;
  z-index: -1;
  opacity: 0.18;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: linear-gradient(180deg, transparent 4%, #000 30%, #000 80%, transparent);
  mask-image: linear-gradient(180deg, transparent 4%, #000 30%, #000 80%, transparent);
}

.agent-entry-track {
  position: relative;
  height: 150vh;
}

.agent-entry-sticky {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
}

.agent-entry-card {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  width: min(92vw, 74rem);
  height: min(76vh, 46rem);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 40px;
  background:
    radial-gradient(70% 45% at 50% 48%, rgba(123, 92, 240, 0.11), transparent 72%),
    #050507;
  box-shadow: 0 42px 120px -42px rgba(0, 0, 0, 0.72);
  will-change: width, height, border-radius;
}

.agent-entry-container {
  z-index: 1;
}

.agent-capability-stage {
  padding-top: clamp(2rem, 6vw, 5.5rem);
}

.agent-glow {
  position: absolute;
  top: 45%;
  z-index: 0;
  width: 46rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(76px);
  opacity: 0.24;
  animation: agent-glow-drift 12s ease-in-out infinite alternate;
}

.agent-glow-blue { left: -10rem; background: #3454d1; }
.agent-glow-pink { right: -10rem; background: #c95bd6; animation-delay: -6s; }

@keyframes agent-glow-drift {
  from { transform: translate3d(0, -1.5rem, 0) scale(0.94); }
  to { transform: translate3d(2rem, 2rem, 0) scale(1.08); }
}

/* Always rendered: the headline must be readable the instant the section
   comes into view, so it is not gated on scroll progress or intersection.
   The card-growth animation carries the entrance instead. */
.agent-intro {
  max-width: 72rem;
  margin: 0 auto;
  text-align: center;
  opacity: 1;
}

.agent-brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.6rem;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.055em;
}

.agent-brand sup {
  margin-left: 0.2rem;
  font-family: var(--mono);
  font-size: 0.35em;
  letter-spacing: 0.04em;
  vertical-align: top;
  color: #b9c6ff;
}

.agent-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(3.8rem, 7vw, 5.8rem);
  height: clamp(3.8rem, 7vw, 5.8rem);
  border-radius: 1.35rem;
  background: linear-gradient(145deg, #e7ebff, #6d83e5 46%, #9c60db 72%, #e478bd);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0 60px rgba(123, 92, 240, 0.55);
  transform: rotate(-5deg);
}

.agent-mark::after {
  content: "";
  position: absolute;
  inset: 13%;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.agent-mark img {
  position: relative;
  z-index: 1;
  width: 58%;
  filter: brightness(0) invert(1);
  transform: rotate(5deg);
}

.agent-intro h2 {
  max-width: 70rem;
  margin: 0 auto 1.6rem;
  color: #f8f8fb;
  font-size: clamp(3rem, 6.6vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.agent-intro > p {
  max-width: 50rem;
  margin: 0 auto 1.8rem;
  color: rgba(255, 255, 255, 0.58);
  font-size: clamp(1rem, 1.7vw, 1.25rem);
}

.agent-availability {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.43);
}

.agent-available-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.68);
}

.agent-available-label i,
.agent-live-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #55dda0;
  box-shadow: 0 0 12px rgba(85, 221, 160, 0.8);
  animation: pulse-green 2.4s ease-in-out infinite;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 6px rgba(85, 221, 160, 0.45); }
  50% { box-shadow: 0 0 16px rgba(85, 221, 160, 1); }
}

.agent-capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.agent-capability {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: flex;
  min-height: 42rem;
  flex-direction: column;
  overflow: hidden;
  background: rgba(5, 5, 7, 0.96);
  border-right: 1px solid rgba(255, 255, 255, 0.13);
  transition: background 0.35s var(--ease), transform 0.35s var(--ease);
}

.agent-capability-grid.stagger > .agent-capability {
  transition: opacity 0.6s var(--ease), transform 0.35s var(--ease), background 0.35s var(--ease);
}

.agent-capability:last-child { border-right: 0; }

.agent-capability::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(24rem 24rem at var(--mx) var(--my), rgba(123, 92, 240, 0.15), transparent 64%);
  transition: opacity 0.35s var(--ease);
}

.agent-capability:hover,
.agent-capability-grid.stagger.is-visible > .agent-capability:hover { background: rgba(11, 11, 16, 0.98); transform: translateY(-6px); }
.agent-capability:hover::before { opacity: 1; }

.agent-capability-copy {
  position: relative;
  z-index: 1;
  padding: 2.4rem 2.35rem 1rem;
}

.agent-eyebrow {
  margin: 0 0 1.2rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.78);
}

.agent-capability h3 {
  margin-bottom: 0.85rem;
  color: #f3f3f7;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.12;
}

.agent-capability-copy > p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.92rem;
  line-height: 1.62;
}

.agent-window-stack {
  position: relative;
  z-index: 1;
  min-height: 21rem;
  margin-top: auto;
}

.agent-window {
  position: absolute;
  left: 2.2rem;
  right: 2.2rem;
  min-height: 8rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem 1rem 0 0;
  background: linear-gradient(180deg, rgba(24, 24, 31, 0.98), rgba(10, 10, 13, 0.98));
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.7rem;
  transition: transform 0.45s var(--spring), border-color 0.3s var(--ease);
}

.agent-window code { font-family: var(--mono); }
.agent-window-back { top: 5.4rem; transform: translateX(1.6rem); }
.agent-window-mid { top: 8.1rem; transform: translateX(0.8rem); }
.agent-window-front { top: 10.8rem; min-height: 14rem; padding: 1rem 1.1rem 1.2rem; border-color: rgba(123, 92, 240, 0.38); }
.agent-capability:hover .agent-window-back { transform: translate(1.6rem, -0.8rem); }
.agent-capability:hover .agent-window-mid { transform: translate(0.8rem, -0.4rem); }

.window-dots { display: flex; gap: 0.35rem; margin-bottom: 0.65rem; }
.window-dots i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }

.agent-window-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  color: #d8ddf8;
}

.agent-window-title .agent-live-dot { flex: 0 0 auto; }
.agent-window dl { display: grid; gap: 0.6rem; margin: 0.9rem 0; }
.agent-window dl div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.agent-window dt { color: rgba(255, 255, 255, 0.48); }
.agent-window dd { margin: 0; color: #69d8a5; font-family: var(--mono); }
.agent-source-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.agent-source-chips span { padding: 0.22rem 0.45rem; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 999px; color: rgba(255, 255, 255, 0.58); font-size: 0.61rem; }

.agent-router,
.agent-action-console {
  position: relative;
  z-index: 1;
  margin: auto 2.2rem 0;
  padding: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 1rem 1rem 0 0;
  background: linear-gradient(180deg, rgba(25, 25, 31, 0.98), rgba(8, 8, 11, 0.98));
  box-shadow: 0 -20px 55px rgba(0, 0, 0, 0.38);
}

.agent-router-head,
.agent-action-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
  color: rgba(255, 255, 255, 0.52);
  font-family: var(--mono);
  font-size: 0.66rem;
}

.agent-router-head em,
.agent-action-status em {
  font-style: normal;
  color: #65dca8;
  letter-spacing: 0.06em;
}

.agent-tool-row {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.9rem;
  padding: 0 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  animation: agent-tool-route 8s ease-in-out infinite;
}

.agent-tool-row:nth-child(3) { animation-delay: -6s; }
.agent-tool-row:nth-child(4) { animation-delay: -4s; }
.agent-tool-row:nth-child(5) { animation-delay: -2s; }
.agent-tool-row span { font-family: var(--mono); font-size: 0.6rem; color: rgba(255, 255, 255, 0.28); }
.agent-tool-row code { overflow: hidden; font-family: var(--mono); font-size: 0.68rem; text-overflow: ellipsis; }
.agent-tool-row i { font-style: normal; font-family: var(--mono); font-size: 0.56rem; text-transform: uppercase; color: #8ba0f4; }

@keyframes agent-tool-route {
  0%, 16%, 100% { background: rgba(123, 92, 240, 0.12); color: #fff; }
  24%, 92% { background: transparent; color: rgba(255, 255, 255, 0.55); }
}

.agent-router-result {
  margin-top: 0.85rem;
  padding: 0.9rem;
  border-radius: 0.75rem;
  background: linear-gradient(115deg, rgba(52, 84, 209, 0.14), rgba(201, 91, 214, 0.1));
  border: 1px solid rgba(123, 92, 240, 0.2);
}

.agent-router-result span,
.agent-task-preview span {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: #9cacef;
}

.agent-router-result strong { display: block; color: #f0f1f7; font-size: 0.78rem; line-height: 1.35; }
.agent-router-result small { color: rgba(255, 255, 255, 0.4); font-size: 0.62rem; }

.agent-action-console { padding-bottom: 1.25rem; }
.agent-action-status span { color: #d6d9e7; }
.agent-action-command { display: flex; align-items: center; gap: 0.7rem; padding: 0.8rem; border-block: 1px solid rgba(255, 255, 255, 0.08); }
.agent-command-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.65rem; height: 1.65rem; border-radius: 0.55rem; color: #fff; background: var(--grad); }
.agent-action-command div { display: flex; min-width: 0; flex-direction: column; }
.agent-action-command code { color: #e8e9ef; font-family: var(--mono); font-size: 0.7rem; }
.agent-action-command small { color: rgba(255, 255, 255, 0.38); font-size: 0.62rem; }

.agent-task-preview { display: flex; align-items: flex-start; gap: 0.7rem; margin: 0.9rem 0; padding: 0.85rem; border-radius: 0.8rem; background: rgba(255, 255, 255, 0.04); }
.agent-task-check { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 1.65rem; height: 1.65rem; border-radius: 50%; background: rgba(85, 221, 160, 0.13); color: #55dda0; }
.agent-task-preview strong { display: block; color: #f2f2f6; font-size: 0.76rem; line-height: 1.35; }
.agent-task-preview small { color: rgba(255, 255, 255, 0.4); font-size: 0.59rem; }

.agent-action-buttons { display: flex; align-items: center; justify-content: flex-end; gap: 0.55rem; }
.agent-action-buttons span,
.agent-action-buttons b { padding: 0.5rem 0.7rem; border-radius: 0.6rem; font-size: 0.62rem; }
.agent-action-buttons span { color: rgba(255, 255, 255, 0.52); background: rgba(255, 255, 255, 0.06); }
.agent-action-buttons b { color: #fff; background: linear-gradient(100deg, #3454d1, #7b5cf0); box-shadow: 0 8px 24px rgba(52, 84, 209, 0.22); }
.agent-action-tools { display: flex; gap: 0.35rem; margin-top: 1rem; overflow: hidden; }
.agent-action-tools code { flex: 0 0 auto; padding: 0.3rem 0.45rem; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 999px; color: rgba(255, 255, 255, 0.36); font-size: 0.52rem; }

/* Multi-agent marketing operations grid */
.agent-grid-heading {
  max-width: 58rem;
  margin: 0 auto 3.5rem;
  text-align: center;
}

.agent-grid-kicker {
  margin: 0 0 1.1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #9fb0ff;
}

.agent-grid-heading h2 {
  margin: 0 auto 1rem;
  color: #f8f8fb;
  font-size: clamp(2.2rem, 4.8vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.agent-grid-heading > p:not(.agent-grid-kicker) {
  max-width: 46rem;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.55);
  font-size: clamp(0.98rem, 1.5vw, 1.12rem);
  line-height: 1.65;
}

.agent-system-rules {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.6rem;
}

.agent-system-rules span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.68rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
}

.agent-system-rules i {
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 50%;
  background: #55dda0;
  box-shadow: 0 0 10px rgba(85, 221, 160, 0.7);
}

.agent-ops-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-color: rgba(255, 255, 255, 0.13);
  border-radius: 1.45rem;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 38px 110px -52px rgba(0, 0, 0, 0.9);
}

.agent-ops-grid .agent-capability {
  --agent-rgb: 108, 92, 231;
  min-height: 39rem;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(90% 52% at 50% 100%, rgba(var(--agent-rgb), 0.13), transparent 72%),
    rgba(5, 5, 7, 0.98);
}

.agent-ops-grid .agent-capability:nth-child(3n) { border-right: 0; }
.agent-ops-grid .agent-capability:nth-child(n + 4) { border-bottom: 0; }
.agent-card-supervisor { --agent-rgb: 108, 92, 231 !important; }
.agent-card-analytics { --agent-rgb: 52, 84, 209 !important; }
.agent-card-strategy { --agent-rgb: 124, 58, 237 !important; }
.agent-card-specialists { --agent-rgb: 225, 29, 72 !important; }
.agent-card-workspace { --agent-rgb: 14, 165, 233 !important; }
.agent-card-action { --agent-rgb: 22, 163, 74 !important; }

.agent-ops-grid .agent-capability::before {
  background: radial-gradient(25rem 25rem at var(--mx) var(--my), rgba(var(--agent-rgb), 0.2), transparent 66%);
}

.agent-ops-grid .agent-capability-copy { padding-bottom: 1.25rem; }
.agent-ops-grid .agent-eyebrow { color: rgba(var(--agent-rgb), 0.95); }

.agent-motion {
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.agent-ops-grid:not(.is-visible) .agent-motion,
.agent-ops-grid:not(.is-visible) .agent-motion * { animation-play-state: paused; }

/* Supervisor route map */
.agent-supervisor-map {
  min-height: 22rem;
  margin: 0 1.4rem 1.4rem;
  overflow: hidden;
  border: 1px solid rgba(108, 92, 231, 0.22);
  border-radius: 1.15rem;
  background:
    radial-gradient(circle at 50% 48%, rgba(108, 92, 231, 0.17), transparent 38%),
    rgba(255, 255, 255, 0.025);
}

.agent-route-lines,
.agent-context-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.agent-route-lines path {
  fill: none;
  stroke: rgba(159, 176, 255, 0.38);
  stroke-width: 1.2;
  stroke-dasharray: 7 10;
  animation: agent-route-flow 5s linear infinite;
}

.agent-route-lines path:nth-child(2) { animation-delay: -1s; }
.agent-route-lines path:nth-child(3) { animation-delay: -2s; }
.agent-route-lines path:nth-child(4) { animation-delay: -3s; }
.agent-route-lines path:nth-child(5) { animation-delay: -4s; }

@keyframes agent-route-flow { to { stroke-dashoffset: -68; } }

.agent-core-node {
  position: absolute;
  top: 49%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 7.1rem;
  height: 7.1rem;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 32% 25%, #9d8cf8, #6c5ce7 48%, #30226f 100%);
  box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.34), 0 0 52px rgba(108, 92, 231, 0.42);
  transform: translate(-50%, -50%);
  animation: agent-core-pulse 3.2s ease-in-out infinite;
}

.agent-core-node span { font-size: 1.2rem; line-height: 1; }
.agent-core-node b { margin-top: 0.35rem; font-size: 0.78rem; }
.agent-core-node small { margin-top: 0.18rem; color: rgba(255, 255, 255, 0.58); font-family: var(--mono); font-size: 0.49rem; }

@keyframes agent-core-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.3), 0 0 44px rgba(108, 92, 231, 0.34); }
  50% { box-shadow: 0 0 0 12px rgba(108, 92, 231, 0), 0 0 68px rgba(108, 92, 231, 0.56); }
}

.agent-map-node {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 0.62rem;
  background: rgba(15, 15, 21, 0.94);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.62rem;
  animation: agent-node-float 4.5s ease-in-out infinite;
}

.agent-map-node i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 0.38rem;
  font-style: normal;
  font-size: 0.62rem;
}

.node-analytics { top: 10%; left: 6%; animation-delay: -0.5s; }
.node-analytics i { color: #aab7ff; background: rgba(52, 84, 209, 0.25); }
.node-strategy { top: 12%; right: 5%; animation-delay: -1.5s; }
.node-strategy i { color: #cbb6ff; background: rgba(124, 58, 237, 0.25); }
.node-action { right: 4%; bottom: 15%; animation-delay: -2.5s; }
.node-action i { color: #86efac; background: rgba(22, 163, 74, 0.24); }
.node-workspace { left: 5%; bottom: 15%; animation-delay: -3.5s; }
.node-workspace i { color: #7dd3fc; background: rgba(14, 165, 233, 0.22); }
.node-specialists { bottom: 2.2%; left: 50%; transform: translateX(-50%); animation-delay: -4s; }
.node-specialists i { color: #f9a8d4; background: rgba(225, 29, 72, 0.2); }

@keyframes agent-node-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -0.35rem; }
}

.agent-route-caption {
  position: absolute;
  left: 50%;
  bottom: 18%;
  display: flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.34rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(5, 5, 8, 0.85);
  color: rgba(255, 255, 255, 0.4);
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.5rem;
}

.agent-route-caption i { width: 0.35rem; height: 0.35rem; border-radius: 50%; background: #55dda0; box-shadow: 0 0 8px rgba(85, 221, 160, 0.8); }
.agent-route-caption code { color: #b9c6ff; font-family: var(--mono); }

/* Analytics board */
.agent-data-board,
.agent-scenario-board,
.agent-operation-board {
  margin: 0 1.4rem 1.4rem;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.15rem;
  background: linear-gradient(180deg, rgba(21, 22, 30, 0.96), rgba(7, 8, 12, 0.98));
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
}

.agent-data-head,
.agent-scenario-head,
.agent-operation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--mono);
  font-size: 0.61rem;
}

.agent-data-head span { display: inline-flex; align-items: center; gap: 0.45rem; }
.agent-data-head i { width: 0.4rem; height: 0.4rem; border-radius: 50%; background: #55dda0; box-shadow: 0 0 10px rgba(85, 221, 160, 0.8); }
.agent-data-head em,
.agent-scenario-head em,
.agent-operation-head em { font-style: normal; color: #8da2f5; letter-spacing: 0.08em; }

.agent-kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 0.9rem 0; }
.agent-kpi-row div { padding: 0.6rem; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 0.65rem; background: rgba(255, 255, 255, 0.035); }
.agent-kpi-row small { display: block; color: rgba(255, 255, 255, 0.35); font-size: 0.48rem; }
.agent-kpi-row strong { display: block; margin: 0.22rem 0; color: #f7f7fb; font-size: 0.78rem; }
.agent-kpi-row em { color: #55dda0; font-style: normal; font-size: 0.46rem; }

.agent-chart-wrap { position: relative; height: 10rem; overflow: hidden; border-radius: 0.7rem; background: rgba(52, 84, 209, 0.045); }
.agent-chart-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.agent-chart-gridline { fill: none; stroke: rgba(255, 255, 255, 0.065); stroke-width: 1; }
.agent-chart-area { fill: url(#agentChartFill); }
.agent-chart-line { fill: none; stroke: #6f8cff; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 520; animation: agent-chart-draw 5.5s ease-in-out infinite; }

@keyframes agent-chart-draw {
  0% { stroke-dashoffset: 520; opacity: 0.2; }
  32%, 78% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: -40; opacity: 0.4; }
}

.agent-chart-scan { position: absolute; z-index: 2; top: 0; bottom: 0; width: 3.8rem; background: linear-gradient(90deg, transparent, rgba(91, 122, 255, 0.13), transparent); animation: agent-chart-scan 4.5s ease-in-out infinite; }
@keyframes agent-chart-scan { 0%, 8% { left: -4rem; } 75%, 100% { left: calc(100% + 1rem); } }

.agent-anomaly-tag {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid rgba(225, 29, 72, 0.25);
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.11);
  color: #fda4af;
  font-size: 0.47rem;
  animation: agent-anomaly-in 5.5s ease-in-out infinite;
}
.agent-anomaly-tag i { width: 0.32rem; height: 0.32rem; border-radius: 50%; background: #fb7185; }
@keyframes agent-anomaly-in { 0%, 42% { opacity: 0; transform: translateY(-5px); } 55%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* Strategy scenarios */
.agent-scenario-board { padding-bottom: 1.1rem; }
.agent-scenario-row { display: grid; grid-template-columns: 4.6rem 1fr 2.5rem; align-items: center; gap: 0.65rem; margin-top: 0.8rem; color: rgba(255, 255, 255, 0.52); font-size: 0.61rem; }
.agent-scenario-row > div { height: 0.48rem; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.07); }
.agent-scenario-row i { display: block; width: var(--scenario-width); height: 100%; border-radius: inherit; transform-origin: left; animation: agent-scenario-breathe 4.8s ease-in-out infinite; }
.agent-scenario-row b { color: rgba(255, 255, 255, 0.8); font-family: var(--mono); font-size: 0.58rem; text-align: right; }
.scenario-hold { --scenario-width: 48%; }
.scenario-hold i { background: #64748b; }
.scenario-shift { --scenario-width: 74%; }
.scenario-shift i { background: linear-gradient(90deg, #3454d1, #7c3aed); animation-delay: -1.6s; }
.scenario-scale { --scenario-width: 91%; }
.scenario-scale i { background: linear-gradient(90deg, #7c3aed, #c95bd6); animation-delay: -3.2s; }
@keyframes agent-scenario-breathe { 0%, 100% { transform: scaleX(0.7); opacity: 0.55; } 48%, 70% { transform: scaleX(1); opacity: 1; } }

.agent-strategy-verdict { display: flex; align-items: flex-start; gap: 0.65rem; margin-top: 1rem; padding: 0.8rem; border: 1px solid rgba(124, 58, 237, 0.23); border-radius: 0.75rem; background: linear-gradient(110deg, rgba(52, 84, 209, 0.11), rgba(201, 91, 214, 0.08)); }
.agent-strategy-verdict > span { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 1.6rem; height: 1.6rem; border-radius: 0.52rem; color: #fff; background: linear-gradient(145deg, #3454d1, #c95bd6); box-shadow: 0 0 20px rgba(124, 58, 237, 0.35); }
.agent-strategy-verdict small { display: block; margin-bottom: 0.22rem; color: #aebdff; font-family: var(--mono); font-size: 0.47rem; letter-spacing: 0.08em; }
.agent-strategy-verdict strong { display: block; color: rgba(255, 255, 255, 0.76); font-size: 0.65rem; line-height: 1.4; }

/* Specialist deck */
.agent-specialist-deck { min-height: 20rem; margin: 0 1.4rem 1.4rem; padding-top: 0.6rem; }
.agent-specialist-chip {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  margin: -0.12rem 0;
  padding: 0 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, rgba(25, 25, 32, 0.96), rgba(10, 10, 14, 0.96));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.55);
  transform-origin: center;
  animation: agent-specialist-focus 9s ease-in-out infinite;
  animation-delay: var(--delay);
}
.agent-specialist-chip i { display: inline-flex; align-items: center; justify-content: center; width: 1.55rem; height: 1.55rem; border-radius: 0.5rem; color: #fff; background: color-mix(in srgb, var(--agent) 78%, #111); box-shadow: 0 0 18px color-mix(in srgb, var(--agent) 35%, transparent); font-style: normal; font-size: 0.66rem; }
.agent-specialist-chip span { font-size: 0.66rem; font-weight: 700; }
.agent-specialist-chip em { color: color-mix(in srgb, var(--agent) 70%, #fff); font-family: var(--mono); font-style: normal; font-size: 0.49rem; text-transform: uppercase; }
@keyframes agent-specialist-focus { 0%, 13% { z-index: 2; border-color: color-mix(in srgb, var(--agent) 48%, transparent); color: #fff; transform: translateX(0.3rem) scale(1.025); } 19%, 100% { z-index: 1; border-color: rgba(255,255,255,.085); color: rgba(255,255,255,.55); transform: none; } }

.agent-specialist-status { display: flex; align-items: center; justify-content: center; gap: 0.45rem; margin-top: 0.85rem; color: rgba(255, 255, 255, 0.34); font-family: var(--mono); font-size: 0.51rem; }
.agent-specialist-status span { width: 0.38rem; height: 0.38rem; border-radius: 50%; background: #55dda0; box-shadow: 0 0 9px rgba(85, 221, 160, 0.8); }

/* Workspace context hub */
.agent-context-hub { min-height: 21rem; margin: 0 1.4rem 1.4rem; overflow: hidden; border: 1px solid rgba(14, 165, 233, 0.18); border-radius: 1.15rem; background: radial-gradient(circle at 50% 48%, rgba(14, 165, 233, 0.13), transparent 38%), rgba(255, 255, 255, 0.02); }
.agent-context-lines path { fill: none; stroke: rgba(56, 189, 248, 0.3); stroke-width: 1.1; stroke-dasharray: 5 8; animation: agent-route-flow 5.5s linear infinite; }
.agent-context-lines path:nth-child(2) { animation-delay: -1.3s; }
.agent-context-lines path:nth-child(3) { animation-delay: -2.6s; }
.agent-context-lines path:nth-child(4) { animation-delay: -3.9s; }
.agent-context-core { position: absolute; top: 48%; left: 50%; display: flex; align-items: center; justify-content: center; width: 7.4rem; height: 6.4rem; flex-direction: column; border: 1px solid rgba(125, 211, 252, 0.25); border-radius: 1.2rem; background: linear-gradient(145deg, rgba(14, 165, 233, 0.28), rgba(8, 47, 73, 0.78)); box-shadow: 0 0 48px rgba(14, 165, 233, 0.24); transform: translate(-50%, -50%); color: #fff; animation: agent-context-core 4s ease-in-out infinite; }
.agent-context-core span { font-size: 1.1rem; color: #7dd3fc; }
.agent-context-core b { margin-top: 0.3rem; font-size: 0.75rem; }
.agent-context-core small { margin-top: 0.18rem; color: rgba(255,255,255,.48); font-family: var(--mono); font-size: 0.48rem; }
@keyframes agent-context-core { 0%,100% { transform: translate(-50%,-50%) scale(.98); } 50% { transform: translate(-50%,-50%) scale(1.03); } }

.agent-context-node { position: absolute; min-width: 4.2rem; padding: 0.48rem 0.6rem; border: 1px solid rgba(255,255,255,.1); border-radius: 0.7rem; background: rgba(11, 14, 19, 0.94); color: rgba(255,255,255,.64); font-size: 0.58rem; text-align: center; animation: agent-context-node 5s ease-in-out infinite; }
.context-meta { top: 9%; left: 5%; color: #90a3ff; }
.context-tiktok { top: 9%; right: 5%; color: #f9a8d4; animation-delay: -1.2s; }
.context-reports { bottom: 15%; left: 4%; color: #c4b5fd; animation-delay: -2.4s; }
.context-tasks { right: 4%; bottom: 15%; color: #86efac; animation-delay: -3.6s; }
@keyframes agent-context-node { 0%,100% { opacity:.62; transform:scale(.97); } 35%,55% { opacity:1; transform:scale(1.04); border-color:rgba(125,211,252,.3); } }
.agent-permission-pill { position: absolute; bottom: 3.5%; left: 50%; display: flex; align-items: center; gap: 0.4rem; padding: 0.36rem 0.55rem; border: 1px solid rgba(85, 221, 160, 0.16); border-radius: 999px; background: rgba(5, 10, 9, 0.86); color: rgba(255,255,255,.43); transform: translateX(-50%); white-space: nowrap; font-family: var(--mono); font-size: 0.48rem; }
.agent-permission-pill i { width: 0.34rem; height: 0.34rem; border-radius: 50%; background:#55dda0; box-shadow:0 0 9px rgba(85,221,160,.78); }

/* Controlled multi-step operations */
.agent-operation-board { padding: 1rem 1rem 0.9rem; }
.agent-operation-track { position: absolute; top: 3.9rem; bottom: 4.4rem; left: 2rem; width: 2px; overflow: hidden; background: rgba(255,255,255,.08); }
.agent-operation-track i { display:block; width:100%; height:45%; background:linear-gradient(#3454d1,#7c3aed,#16a34a); box-shadow:0 0 12px rgba(124,58,237,.7); animation:agent-operation-flow 5.8s ease-in-out infinite; }
@keyframes agent-operation-flow { 0% { transform:translateY(-110%); } 70%,100% { transform:translateY(250%); } }
.agent-operation-step { position:relative; z-index:1; display:grid; grid-template-columns:1.75rem minmax(0,1fr) auto; align-items:center; gap:.65rem; min-height:3.2rem; padding:.45rem .4rem; color:rgba(255,255,255,.5); animation:agent-operation-focus 6.4s ease-in-out infinite; animation-delay:var(--delay); }
.agent-operation-step > i { display:inline-flex; align-items:center; justify-content:center; width:1.45rem; height:1.45rem; border:1px solid color-mix(in srgb, var(--step) 55%, transparent); border-radius:50%; background:color-mix(in srgb, var(--step) 18%, #09090c); color:#fff; font-family:var(--mono); font-style:normal; font-size:.54rem; box-shadow:0 0 0 4px #0b0b0f; }
.agent-operation-step b { display:block; color:rgba(255,255,255,.76); font-size:.62rem; }
.agent-operation-step small { display:block; margin-top:.16rem; color:rgba(255,255,255,.34); font-size:.52rem; }
.agent-operation-step em { color:color-mix(in srgb, var(--step) 72%, #fff); font-family:var(--mono); font-style:normal; font-size:.48rem; text-transform:uppercase; }
@keyframes agent-operation-focus { 0%,16% { transform:translateX(.25rem); color:#fff; } 23%,100% { transform:none; color:rgba(255,255,255,.5); } }
.agent-approval-row { display:flex; align-items:center; justify-content:space-between; gap:.6rem; margin-top:.65rem; padding-top:.8rem; border-top:1px solid rgba(255,255,255,.08); }
.agent-approval-row span { display:inline-flex; align-items:center; gap:.35rem; color:rgba(255,255,255,.42); font-size:.52rem; }
.agent-approval-row span i { width:.36rem; height:.36rem; border-radius:50%; background:#f59e0b; box-shadow:0 0 9px rgba(245,158,11,.65); }
.agent-approval-row b { padding:.46rem .62rem; border-radius:.55rem; color:#fff; background:linear-gradient(100deg,#3454d1,#7c3aed); box-shadow:0 8px 22px rgba(52,84,209,.26); font-size:.52rem; }

/* ============================================================
   Stack gradient panel (inside dark passage)
   ============================================================ */

.stack { padding: 1rem 0 6rem; }

.stack-panel {
  display: grid;
  isolation: isolate;
  grid-template-columns: minmax(0, 26rem) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  padding: 3.4rem;
  border-radius: var(--r-xl);
  background:
    radial-gradient(90% 130% at 100% 100%, rgba(201, 91, 214, 0.5), transparent 55%),
    radial-gradient(70% 110% at 85% 0%, rgba(52, 84, 209, 0.45), transparent 60%),
    #101018;
  border: 1px solid var(--border-dark);
  overflow: hidden;
}

.stack-copy { position: relative; z-index: 2; }

.stack-copy h2 { color: #fff; font-size: clamp(1.9rem, 3.2vw, 2.7rem); margin: 1.6rem 0 1.4rem; }

.stack-copy ul { display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 1.8rem; }
.stack-copy li { display: flex; align-items: center; gap: 0.65rem; color: rgba(255, 255, 255, 0.75); font-size: 0.95rem; }
.stack-copy .check { background: rgba(255, 255, 255, 0.12); color: #9fe8c3; }

/* Stack scene: sources, the blended view and an agent action, layered in
   perspective as one workspace. Pure HTML/CSS; #stackShot keeps the scroll
   parallax from landing.js. */
.stack-scene {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 27rem;
  pointer-events: none;
  will-change: transform;
}

.ss-backdrop {
  position: absolute;
  inset: -3.4rem -3.4rem -3.4rem -1.5rem;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(58% 62% at 56% 50%, #000 0%, transparent 78%);
  mask-image: radial-gradient(58% 62% at 56% 50%, #000 0%, transparent 78%);
  opacity: 0.5;
}

.ss-backdrop::after {
  content: "";
  position: absolute;
  left: 56%;
  top: 50%;
  width: 26rem;
  height: 26rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 92, 240, 0.42), rgba(52, 84, 209, 0.16) 45%, transparent 70%);
  filter: blur(18px);
}

.ss-tilt {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 35rem);
  transform: perspective(1800px) rotateX(9deg) rotateY(-15deg) rotateZ(1.2deg);
  transform-style: preserve-3d;
}

.ss-card {
  position: relative;
  padding: 1.05rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025) 62%),
    rgba(15, 15, 24, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 34px 60px -30px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  transition: opacity 0.9s var(--ease), scale 0.9s var(--ease);
  animation: ss-float 7s ease-in-out infinite;
}

/* Light catching the top edge of each layer */
.ss-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 1.4rem;
  right: 1.4rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(170, 150, 255, 0.85), transparent);
}

.ss-sources { width: 78%; transform: translateZ(-46px); animation-delay: -1.2s; }
.ss-metrics { width: 88%; margin: -0.85rem 0 0 9%; transform: translateZ(0); animation-delay: -3.4s; }
.ss-action  { width: 74%; margin: -0.85rem 0 0 26%; transform: translateZ(56px); animation-delay: -5.1s; }

@keyframes ss-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

/* Entrance: layers settle in one after another when the panel reveals */
.stack-panel:not(.is-visible) .ss-card { opacity: 0; scale: 0.94; }
.stack-panel.is-visible .ss-sources { transition-delay: 0.15s; }
.stack-panel.is-visible .ss-metrics { transition-delay: 0.3s; }
.stack-panel.is-visible .ss-action  { transition-delay: 0.45s; }

.ss-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.ss-head span { display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap; }

.ss-head em {
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--mono);
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ss-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #9fe8c3;
  box-shadow: 0 0 0 3px rgba(159, 232, 195, 0.14), 0 0 10px rgba(159, 232, 195, 0.6);
}

.ss-dot-violet {
  background: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.16), 0 0 10px rgba(167, 139, 250, 0.65);
}

/* Connected sources */
.ss-marks { display: flex; justify-content: space-between; gap: 0.5rem; }

.ss-marks span {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border: 1px solid color-mix(in srgb, var(--c) 32%, rgba(255, 255, 255, 0.08));
  border-radius: 0.8rem;
  background: color-mix(in srgb, var(--c) 13%, rgba(255, 255, 255, 0.03));
}

.ss-marks svg { width: 1.12rem; height: 1.12rem; fill: var(--c); }

/* Each source pings in turn, like a sync running across the stack */
.ss-marks span::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid var(--c);
  border-radius: inherit;
  opacity: 0;
  animation: ss-sync 6s ease-out infinite;
  animation-delay: calc(var(--i) * 0.8s);
}

@keyframes ss-sync {
  0% { opacity: 0; transform: scale(1); }
  4% { opacity: 0.75; }
  18%, 100% { opacity: 0; transform: scale(1.32); }
}

/* Blended view */
.ss-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }

.ss-kpis div {
  min-width: 0;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.035);
}

.ss-kpis small { display: block; color: rgba(255, 255, 255, 0.46); font-size: 0.6rem; font-weight: 600; }

.ss-kpis b {
  display: block;
  margin: 0.18rem 0 0.12rem;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.ss-kpis span { color: #9fe8c3; font-family: var(--mono); font-size: 0.56rem; }

.ss-chart { display: block; width: 100%; height: auto; margin: 0.8rem 0 0.75rem; overflow: visible; }
.ss-area { fill: url(#ssArea); }

.ss-line {
  fill: none;
  stroke: url(#ssLine);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.8s var(--ease) 0.55s;
}

.stack-panel.is-visible .ss-line { stroke-dashoffset: 0; }

.ss-end { fill: #fff; stroke: #c95bd6; stroke-width: 2; filter: drop-shadow(0 0 5px rgba(201, 91, 214, 0.9)); }

.ss-share { display: flex; gap: 3px; height: 0.42rem; overflow: hidden; border-radius: 99px; }
.ss-share i { width: var(--w); border-radius: 99px; background: var(--c); }

.ss-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin-top: 0.6rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.6rem;
}

.ss-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.ss-legend span::before { content: ""; width: 0.42rem; height: 0.42rem; border-radius: 2px; background: var(--c); }
.ss-legend b { color: rgba(255, 255, 255, 0.82); font-weight: 700; }

/* Agent action */
.ss-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
}

.ss-agent {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.75rem;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 8px 24px -6px rgba(123, 92, 240, 0.75);
  font-size: 0.9rem;
}

.ss-action b { display: block; color: #fff; font-size: 0.78rem; font-weight: 700; line-height: 1.3; }
.ss-action small { display: block; margin-top: 0.18rem; color: rgba(255, 255, 255, 0.46); font-size: 0.62rem; }

.ss-action em {
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(159, 232, 195, 0.24);
  border-radius: 99px;
  color: #9fe8c3;
  background: rgba(159, 232, 195, 0.1);
  font-family: var(--mono);
  font-size: 0.56rem;
  font-style: normal;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  .ss-card, .ss-marks span::after { animation: none; }
  .ss-card { transition: none; }
  .stack-panel:not(.is-visible) .ss-card { opacity: 1; scale: 1; }
  .ss-line { stroke-dashoffset: 0; transition: none; }
}

/* ============================================================
   Compare
   ============================================================ */

.compare { padding: 6rem 0; background: var(--bg); transition: background-color 0.7s var(--ease); }

body.theme-dark .compare { background: transparent; }

.compare-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 2.6rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #fff;
}

.compare-col { padding: 2.4rem 2.6rem; }
.compare-col:first-child { border-right: 1px solid var(--border); background: var(--bg-gray); }

.compare-col h3 { font-size: 1.35rem; margin-bottom: 1.4rem; }

.compare-col ul { display: flex; flex-direction: column; gap: 0.85rem; }
.compare-col li { display: flex; align-items: flex-start; gap: 0.7rem; font-size: 0.94rem; color: var(--body); }
.compare-col li .check, .compare-col li .x { margin-top: 0.15rem; }

/* ============================================================
   FAQ
   ============================================================ */

.faq { padding: 2rem 0 6rem; }

.faq-inner { max-width: 46rem; }

.faq .giant { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 2.4rem; }

.faq-list { border-top: 1px solid var(--border); }

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

.faq-accordion button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: 1.3rem 0;
  border: 0;
  background: none;
  text-align: left;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  cursor: pointer;
}

.faq-accordion button span { position: relative; flex: 0 0 auto; width: 0.85rem; height: 0.85rem; }

.faq-accordion button span::before,
.faq-accordion button span::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--fade-dark);
  transition: transform 0.3s var(--spring);
}

.faq-accordion button span::after { transform: rotate(90deg); }
.faq-accordion.open button span::after { transform: rotate(0); }

/* animated open/close */
.faq-accordion p {
  display: block;
  margin: 0;
  padding: 0 2.4rem 0 0;
  font-size: 0.95rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition: max-height 0.45s var(--ease), opacity 0.35s var(--ease), transform 0.35s var(--ease), padding 0.35s;
}

.faq-accordion.open p { max-height: 12rem; opacity: 1; transform: none; padding-bottom: 1.4rem; }

/* ============================================================
   Final CTA + Footer
   ============================================================ */

.final-cta { padding: 5rem 0 7rem; text-align: center; }
.final-cta .giant { margin-bottom: 2rem; }

.footer { background: var(--bg-gray); border-top: 1px solid var(--border); }

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; padding: 3.6rem 0 2.6rem; }

.footer-brand p { max-width: 17rem; margin-top: 1rem; font-size: 0.9rem; }

.footer-grid a:not(.logo) {
  display: block;
  padding: 0.26rem 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--body);
  transition: color 0.2s, transform 0.2s var(--ease);
}

.footer-grid a:not(.logo):hover { color: var(--ink); transform: translateX(3px); }

.footer-bottom {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem 2rem;
  padding: 1.3rem 0; border-top: 1px solid var(--border);
}
.footer-bottom p { margin: 0; font-size: 0.82rem; color: var(--fade-dark); }
.footer-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.1rem; }
.footer-legal a { font-size: 0.82rem; color: var(--fade-dark); transition: color 0.2s; }
.footer-legal a:hover, .footer-legal a[aria-current="page"] { color: var(--ink); }
@media (max-width: 720px) {
  .footer-bottom { grid-template-columns: 1fr; justify-items: start; }
  .footer-legal { justify-content: flex-start; }
}

/* ============================================================
   Reveal on scroll
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, [data-boot] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .float-card, .marquee-track, .announce::after, .badge-dot, .agent-glow, .agent-live-dot, .agent-available-label i, .agent-tool-row, .agent-motion, .agent-motion * { animation: none !important; }
  .words .w { color: inherit; transition: none; }
  .words .w.stay { color: var(--fade) !important; }
  .agent-entry-track { height: auto; }
  .agent-entry-sticky { position: relative; height: auto; }
  .agent-entry-card { width: 100% !important; height: auto !important; min-height: 80vh; border-radius: 0 !important; }
  .agent-intro { opacity: 1 !important; transform: none !important; }
  .agent-capability, .agent-window { transition: none !important; }
  .hero-shot img, .chip i { transition: none !important; }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-copy { max-width: 34rem; }
  .float-bubble { left: 0.8rem; }
  .float-chip { right: 0.8rem; }
  .agent-ops-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-ops-grid .agent-capability { border-right: 1px solid rgba(255, 255, 255, 0.12); border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
  .agent-ops-grid .agent-capability:nth-child(2n) { border-right: 0; }
  .agent-ops-grid .agent-capability:nth-last-child(-n + 2) { border-bottom: 0; }
  .stack-panel { grid-template-columns: 1fr; gap: 2.6rem; padding: 2.6rem; }
  .stack-scene { min-height: 0; padding: 0.5rem 0 1rem; }
  .ss-tilt { transform: perspective(1800px) rotateX(8deg) rotateY(-9deg) rotateZ(0.8deg); }
}

@media (max-width: 940px) {
  .agent-capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-capability { min-height: 38rem; }
  .agent-capability-copy > p:last-child { max-width: 42rem; }
}

@media (max-width: 820px) {
  .solution-panel { grid-template-columns: 1fr; gap: 2.2rem; padding: 2rem 1.6rem; }
  .problem-grid { grid-template-columns: 1fr; }
  .compare-card { grid-template-columns: 1fr; }
  .compare-col:first-child { border-right: 0; border-bottom: 1px solid var(--border); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .mobile-hide { display: none !important; }
  .menu-button { display: flex; }
  .hero { padding-top: 3rem; }
  .problem-icons { flex-wrap: wrap; }
  .wall-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; grid-auto-rows: 5.4rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .assistant-zone { padding: 0 0 4rem; }
  .agent-brand { margin-bottom: 2rem; }
  .agent-intro h2 { font-size: clamp(2.55rem, 13vw, 4.2rem); }
  .agent-availability { gap: 0.55rem 0.85rem; font-size: 0.62rem; }
  .agent-grid-heading { margin-bottom: 2.4rem; }
  .agent-system-rules { justify-content: flex-start; }
  .agent-grid-heading { text-align: left; }
  .agent-ops-grid { grid-template-columns: 1fr; }
  .agent-ops-grid .agent-capability,
  .agent-ops-grid .agent-capability:nth-child(2n),
  .agent-ops-grid .agent-capability:nth-last-child(-n + 2) { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
  .agent-ops-grid .agent-capability:last-child { border-bottom: 0; }
  .agent-capability { min-height: 39rem; }
  .agent-capability-copy { padding: 2rem 1.4rem 0.8rem; }
  .agent-window { left: 1.25rem; right: 1.25rem; }
  .agent-router, .agent-action-console { margin-inline: 1.25rem; }
  .stack-panel { gap: 2rem; padding: 2rem 1.5rem; }
  .stack-scene { padding: 0 0 0.4rem; }
  .ss-tilt { transform: none; }
  .ss-sources { width: 94%; }
  .ss-metrics { width: 96%; margin-left: 4%; }
  .ss-action  { width: 92%; margin-left: 8%; }
  .ss-card { padding: 0.9rem 0.85rem; }
  .ss-marks span { width: 2.2rem; height: 2.2rem; border-radius: 0.7rem; }
  .ss-marks svg { width: 1rem; height: 1rem; }
  .ss-kpis { gap: 0.35rem; }
  .ss-kpis div { padding: 0.5rem 0.5rem; }
  .ss-kpis b { font-size: 0.9rem; }
  .ss-head em { display: none; }
}

@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  .agent-entry-track { height: 130vh; }
}

/* ============================================================
   Grounded product stage
   Exact CRM screens, composed with restrained physical depth.
   ============================================================ */

.product-stage {
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: 4.2rem 0.3rem 3.2rem;
  perspective: 1400px;
}

.product-stage::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 9% 1% 4%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 38%, rgba(52,84,209,.2), transparent 36%),
    radial-gradient(circle at 72% 62%, rgba(201,91,214,.13), transparent 38%);
  filter: blur(28px);
}

.product-floor {
  position: absolute;
  z-index: -1;
  left: 8%;
  right: 8%;
  bottom: 0.6rem;
  height: 4.8rem;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(30,38,71,.22), rgba(30,38,71,0) 68%);
  filter: blur(8px);
  transform: rotateX(72deg);
}

.product-window-main,
.product-layer {
  border: 1px solid rgba(67, 77, 111, 0.18);
  background: #fff;
  box-shadow: 0 2.1rem 4.5rem -2.2rem rgba(18, 27, 58, 0.48), 0 .45rem 1rem -.65rem rgba(18,27,58,.28);
}

.product-window-main {
  position: relative;
  z-index: 3;
  width: 92%;
  margin-inline: auto;
  border-radius: 1.2rem;
  transform-style: preserve-3d;
}

.product-window-bar {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: .6rem;
  min-height: 2.15rem;
  padding: 0 .72rem;
  border-bottom: 1px solid #eceef5;
  background: linear-gradient(180deg,#fbfbfd,#f5f6fa);
  color: #687086;
}

.product-window-bar small {
  overflow: hidden;
  font-family: var(--mono);
  font-size: .49rem;
  letter-spacing: .035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-window-bar em {
  padding: .2rem .38rem;
  border-radius: 999px;
  background: #edf8f2;
  color: #198754;
  font-family: var(--mono);
  font-size: .42rem;
  font-style: normal;
  letter-spacing: .06em;
}

.product-window-dots { display: flex; gap: .24rem; }
.product-window-dots i { width: .35rem; height: .35rem; border-radius: 50%; background: #d9dce7; }
.product-window-dots i:first-child { background: #ff8178; }
.product-window-dots i:nth-child(2) { background: #f6c75b; }
.product-window-dots i:last-child { background: #61c98b; }

.product-window-main > img,
.product-layer > img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

.product-layer {
  position: absolute;
  z-index: 1;
  width: 48%;
  overflow: hidden;
  border-radius: .9rem;
  opacity: .94;
  pointer-events: none;
  will-change: transform, translate;
  animation: product-layer-breathe 6s var(--ease) infinite;
}

.product-layer .product-window-bar { min-height: 1.75rem; padding-inline: .55rem; }
.product-layer .product-window-bar small { font-size: .39rem; }
.product-layer .product-window-bar em { font-size: .34rem; }
.product-layer .product-window-dots i { width: .27rem; height: .27rem; }

.product-layer-reports {
  top: .3rem;
  left: -1.2rem;
  transform-origin: 100% 75%;
  transform:
    translate3d(calc(var(--layer-px, 0px) + var(--layer-sx, 0px)), calc(var(--layer-py, 0px) + var(--layer-sy, 0px)), -80px)
    rotateY(14deg) rotateZ(-4.2deg) scale(.94);
}

.product-layer-tasks {
  right: -1rem;
  bottom: .5rem;
  transform-origin: 0 30%;
  transform:
    translate3d(calc(var(--layer-px, 0px) + var(--layer-sx, 0px)), calc(var(--layer-py, 0px) + var(--layer-sy, 0px)), -110px)
    rotateY(-14deg) rotateZ(4deg) scale(.92);
  animation-delay: -2.8s;
}

@keyframes product-layer-breathe {
  0%,100% { translate: 0 0; }
  50% { translate: 0 -.42rem; }
}

.product-stage .float-card { z-index: 5; }
.product-stage .float-bubble { left: -1.25rem; bottom: 2.2rem; }
.product-stage .float-chip { right: -.55rem; top: 4.9rem; }

/* The launch-film cover is now a realistic CRM review scene. */
.video-frame > img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 1080px) {
  .product-stage { width: min(100%, 46rem); margin-inline: auto; }
}

@media (max-width: 700px) {
  .product-stage { padding: 3.2rem 0 2.3rem; }
  .product-window-main { width: 94%; }
  .product-layer { width: 52%; }
  .product-layer-reports { top: .6rem; left: -.4rem; }
  .product-layer-tasks { right: -.35rem; bottom: .35rem; }
  .product-stage .float-bubble { left: .45rem; bottom: 1rem; max-width: 13rem; }
  .product-stage .float-chip { top: 3.8rem; right: .35rem; }
  .product-window-bar small { font-size: .43rem; }
}

@media (prefers-reduced-motion: reduce) {
  .product-layer { animation: none !important; }
}
