/* ============================================================
   Meandr Design Tokens + Landing CSS
   Loaded on front-end (wp_enqueue_scripts) and block editor
   (add_editor_style). Dark-first.
   ============================================================ */

/* ── Local font (kept for optional editorial use) ────────── */
@font-face {
  font-family: 'Alexandra';
  src: url('../fonts/alexandra.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* Landing tokens — dark values, always active */
  --bg:        #0a0a0f;
  --card:      #1a1a24;
  --chip:      #27273a;
  --border:    #27273a;
  --indigo:    #818cf8;
  --violet:    #a78bfa;
  --cyan:      #22d3ee;
  --green:     #34d399;
  --red:       #f87171;
  --amber:     #f59e0b;
  --text:      #f1f5f9;
  --muted:     #94a3b8;
  --grad:      linear-gradient(120deg, #818cf8, #a78bfa);
  --grad-brand: linear-gradient(120deg, #a78bfa, #22d3ee); /* wordmark */

  --font-head:  'Outfit', 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;
  --font-brand: 'Pacifico', cursive;
  --radius:     0.75rem;

  /* WP semantic tokens — light values for editor palette */
  --color-brand-indigo: #818cf8;
  --color-brand-violet: #a78bfa;
  --color-brand-cyan:   #22d3ee;
  --color-brand-slate:  #0f172a;

  --color-background:       #ffffff;
  --color-foreground:       #0f172a;
  --color-card:             #ffffff;
  --color-primary:          #6366f1;
  --color-secondary:        #8b5cf6;
  --color-accent:           #06b6d4;
  --color-muted:            #f8fafc;
  --color-muted-foreground: #64748b;
  --color-border:           #e2e8f0;
  --color-ring:             #6366f1;
  --color-destructive:      #ef4444;
  --color-success:          #10b981;
  --color-warning:          #f59e0b;

  --meandr-radius:   var(--radius);
  --meandr-gradient: var(--grad);
}

/* WP block dark overrides — applied via <html data-theme="dark"> */
[data-theme="dark"] {
  --color-background:       #0a0a0f;
  --color-foreground:       #f1f5f9;
  --color-card:             #1a1a24;
  --color-primary:          #818cf8;
  --color-secondary:        #a78bfa;
  --color-accent:           #22d3ee;
  --color-muted:            #27273a;
  --color-muted-foreground: #94a3b8;
  --color-border:           #27273a;
  --color-ring:             #818cf8;
  --color-destructive:      #f87171;
  --color-success:          #34d399;
  --color-warning:          #fbbf24;

  --meandr-gradient: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
  font-family: var(--font-head);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a   { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
ul  { list-style: none; }

/* Hand cursor on every interactive element */
a[href], button, summary, label, [role="button"], [data-tooltip] {
  cursor: pointer;
}

/* ── Layout helpers ──────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-sm { padding: 9px 18px; font-size: 13px; }

.btn-grad {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 28px -8px rgba(129,140,248,0.55);
}
.btn-grad:hover { box-shadow: 0 14px 32px -8px rgba(129,140,248,0.7); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--indigo); background: rgba(129,140,248,0.06); }

.btn-white {
  background: #fff;
  color: #4f46e5;
  font-weight: 700;
  box-shadow: 0 8px 20px -6px rgba(0,0,0,0.4);
}
.btn-white:hover { background: #f0f0ff; }

/* ── Section typography helpers ──────────────────────────── */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--indigo);
  margin-bottom: 12px;
}
.section-heading {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* ── Scroll-reveal ───────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* ═══════════════════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(10,10,15,0.85) 60%, transparent 100%);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.navbar.scrolled {
  background: rgba(10,10,15,0.92);
}
.navbar-inner {
  display: flex;
  align-items: center;
  height: 68px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  gap: 32px;
}
.navbar-brand { flex-shrink: 0; }

.brand-word {
  display: inline-block;
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -0.02em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.nav-link {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: #ffffff; background: rgba(255,255,255,0.1); }
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

/* Tooltip */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: rgba(26,26,36,0.96);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Hamburger */
.navbar-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background 0.2s;
}
.navbar-toggle:hover { background: var(--chip); }
.navbar-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.navbar-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.navbar-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navbar-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════
   HERO SCROLL TRACK
   ══════════════════════════════════════════════════════════ */
.hero-track {
  position: relative;
}
.hero-stage {
  position: relative;
  width: 100%;
  /* One full screen. The navbar is fixed (overlays, takes no flow height), so it's
     NOT subtracted — only the WP admin bar, which actually pushes the page down. */
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}
.admin-bar .hero-stage { height: calc(100vh - 32px); }
@media (max-width: 782px) {
  .admin-bar .hero-stage { height: calc(100vh - 46px); }
}
/* Shared photo-canvas: hero.js sizes it to "cover" the stage at the 2000:1024
   photo ratio, centred. The photo, bubbles and #screen are its children, so they
   all zoom/offset as one unit (+ the static scale(1.05) framing). Its own GPU
   layer holds the static photo — bubbles/laptop composite above without re-raster. */
.hero-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;            /* pre-JS default; hero.js overrides with exact cover px */
  height: 100%;
  transform: translate(-50%, -50%) scale(1.05);
  will-change: transform;
}
/* bg photo fills the canvas exactly (canvas already matches the photo ratio). */
.hero-bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
}

/* heading — absolute inside hero-stage; single text column over the bg image
   (the diagram was moved to the Problem section) */
.hero-heading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 88px 0 40px;
  background: radial-gradient(ellipse 80% 70% at 30% 50%,
    rgba(10,10,15,0.82) 0%, transparent 80%);
  /* own GPU layer so this full-screen gradient (stacked above the bubbles) doesn't
     force them to repaint the backdrop — restores the isolation removed earlier. */
  transform: translateZ(0);
}
.hero-heading > .container { width: 100%; }

.hero-col-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 640px;
}

/* ===== HERO BUBBLES — composited CSS keyframes (literal px, injected by JS) =====
   The @keyframes themselves live in a <style> hero.js builds in literal px (point
   fraction × overlay size) — NO var()/calc, because var() in keyframes isn't
   composited by Chrome (the bubble would repaint the photo every frame). Rebuilt
   on load + at the END of a resize. Animation only starts once .bubbles-ready is
   added (after the keyframes exist). GPU saver: .anim-paused when off-screen.
   The .bub div is a 0×0 anchor; the <img> (sized + width/height attrs, so it can
   never balloon to the PNG's native 128px) is centred on the point via translate. */
.bubbles{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:2}
.bub{position:absolute;left:0;top:0;will-change:transform;opacity:0}
.bub img{display:block;transform:translate(-50%,-50%)}
.bub-lg img{width:22px;height:22px}
.bub-sm img{width:14px;height:14px}
.bubbles.anim-paused .bub{animation-play-state:paused}
/* Animations start only after hero.js has set the point vars (adds .bubbles-ready)
   — so they never snapshot with undefined transform vars (which left every bubble
   stuck at 0,0 until a scroll/devtools recalc). */
.bubbles-ready [data-path="bub_t_c3"]{animation:bub_t_c3 5.2s linear 0.0s infinite}
.bubbles-ready [data-path="bub_t_c6"]{animation:bub_t_c6 6.0s linear 1.3s infinite}
.bubbles-ready [data-path="bub_t_c8"]{animation:bub_t_c8 5.6s linear 2.1s infinite}
.bubbles-ready [data-path="bub_t_c1"]{animation:bub_t_c1 6.8s linear 2.6s infinite}
.bubbles-ready [data-path="spk_t_c3"]{animation:spk_t_c3 7.0s linear 3.0s infinite}
.bubbles-ready [data-path="spk_t_c8"]{animation:spk_t_c8 7.6s linear 4.2s infinite}
.bubbles-ready [data-path="spk_t_c11"]{animation:spk_t_c11 8.0s linear 5.0s infinite}
.pipeline-cards.anim-paused .pipeline-arrow::before{animation-play-state:paused}

/* ===== DIAGRAM (request pipeline) FLOW — no SVG, no filters =====
   The path is drawn by the flowing PNG bubbles themselves; only the endpoint
   glow (wire ↔ node/gate) is a static cqw dot on the aspect-locked stage.
   Bubbles ride WAAPI translate3d (hero.js) — guaranteed composited. */
.diag-flow{position:absolute;inset:0;z-index:1;pointer-events:none}
.dwire-end{position:absolute;border-radius:50%;transform:translate(-50%,-50%);width:1.7cqw;height:1.7cqw;background:radial-gradient(circle,rgba(var(--c),.95),rgba(var(--c),.4) 45%,transparent 70%)}
/* Moving bubble: a 0×0 point JS slides via translate3d; the img is centred + sized in cqw. */
.dflow-bub{position:absolute;left:0;top:0;will-change:transform;opacity:0}
.dflow-bub img{display:block;width:2.3cqw;height:2.3cqw;transform:translate(-50%,-50%)}

/* Laptop screen overlay — mini policy-gate diagram fitted onto the photo's display.
   Position/tilt are the editable vars below; setScreenScale() (hero.js) maps the
   520px block to ~7.85% of stage width via --sc. */
#screen {
  position: absolute;
  z-index: 3;
  width: 520px;
  height: 345px;
  --sx: 66.75%;
  --sy: 52.1%;
  --persp: 1400px;
  --ry: -4.4deg;
  --rx: -0.5deg;
  --rz: -5.5deg;
  --kx: -0.5deg;
  --sc: 0.2;
  left: var(--sx);
  top: var(--sy);
  transform-origin: center center;
  transform: translate3d(-50%,-50%,0) perspective(var(--persp)) rotateY(var(--ry)) rotateX(var(--rx)) rotate(8deg) skew(1deg,-7deg) scale(var(--sc));
  will-change: transform;
  pointer-events: none;
}
.mini {
  width: 520px;
  height: 345px;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(160deg,#14132a,#0e0d20);
  box-shadow: 0 0 0 1px rgba(129,140,248,.3);
}
.mini .gate {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: 200px;
  background: linear-gradient(160deg,#221f3a,#16152c);
  border: 1px solid rgba(167,139,250,.5);
  border-radius: 14px;
  padding: 16px 14px;
}
.mini .gt {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--violet);
  text-align: center;
  margin-bottom: 12px;
  font-weight: 600;
}
.mini .row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 7px;
  color: #cdd2ee;
  opacity: .5;
  margin-bottom: 4px;
  white-space: nowrap;
}
.mini .v { font-weight: 600; }
.mini .a { color: var(--green); }
.mini .b { color: var(--amber); }
.mini .c { color: var(--red); }
.mini .chip {
  position: absolute;
  width: 118px;
  height: 48px;
  border-radius: 11px;
  background: #20203a;
  border: 1px solid #33335a;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
}
.mini .chip i {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(140deg,#818cf8,#a78bfa);
  flex: none;
}
.mini .chip span {
  font-family: var(--font-mono);
  font-size: 14px;
  color: #cdd2ee;
  white-space: nowrap;
}
/* Glow + cyan border as a static overlay, lit via opacity (composited) — so
   NOTHING paints inside #screen's 3D-perspective layer. Animating box-shadow/
   border here forced a full re-raster of that layer every frame (~20% GPU). */
.mini .chip::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 11px;
  border: 1px solid var(--cyan);
  box-shadow: 0 0 12px -2px var(--cyan);
  opacity: 0;
  pointer-events: none;
}
.mini .cL { left: 18px; }
.mini .cR { right: 18px; }
.mini .t0 { top: 24px; }
.mini .t1 { top: 126px; }
.mini .t2 { top: 228px; }

/* row/chip cycle — pure CSS (replaces a JS setInterval). 3.3s loop, each of the
   3 rows + matching chips lit for ~one third, staggered by -1.1s. */
.mini .row,
.mini .chip::after {
  animation-duration: 3.3s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.mini .row         { animation-name: mini-row; }
.mini .chip::after { animation-name: mini-glow; }
.mini .row[data-i="1"], .mini .chip.t1::after { animation-delay: -1.1s; }
.mini .row[data-i="2"], .mini .chip.t2::after { animation-delay: -2.2s; }
/* opacity only → composited; no per-frame paint inside the 3D laptop layer */
@keyframes mini-row  { 0%,27% { opacity: 1; } 33%,100% { opacity: .5; } }
@keyframes mini-glow { 0%,27% { opacity: 1; } 33%,100% { opacity: 0; } }
/* pause with the rest when the hero is off-screen */
#screen.anim-paused .row,
#screen.anim-paused .chip::after { animation-play-state: paused; }

/* below 900px the stage drops the fixed photo ratio (full-height), so the
   precise overlay would drift — hide the laptop AND the bubbles that converge
   on it (no point flying them to an absent screen). */
@media (max-width: 900px) {
  #screen,
  #bubbles { display: none; }
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--indigo);
  margin-bottom: 20px;
}
.hero-heading h1 {
  font-size: clamp(1.9rem, 3.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 20px;
}
.hero-sub {
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  color: var(--muted);
  max-width: 480px;
  margin: 0 0 32px;
  line-height: 1.7;
}
.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  /* #screen is hidden here; height comes from the base rule (100vh − bars) */
  .hero-heading {
    text-align: center;
    padding: 88px 0 40px;
    align-items: center;
  }
  .hero-col-text { max-width: none; }
  .hero-sub  { margin: 0 auto 32px; }
  .hero-btns { justify-content: center; }
}

/* video — fixed fullscreen overlay while playing; JS controls opacity */
.hero-video {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  opacity: 0;
  pointer-events: none;
}
.hero-video video,
.hero-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* arch-section removed — diagram now lives inside the hero right column */

/* ─────────────────────────────────────────────────────────
   ARCHITECTURE DIAGRAM  (diag-* classes, from demo.html)
   ─────────────────────────────────────────────────────── */

/* Wrap: constrain width so the card fits within the 85vh hero
   (subtract heading padding 128px + card titlebar 60px). */
.diag-wrap {
  width: 100%;
  max-width: min(98vw, calc((85vh - 188px) * 1000 / 600));
}

.diag-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #17161f, #0f0f17);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 60px 120px -50px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.04);
}

.diag-bar {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  position: relative;
}
.diag-dots {
  display: flex;
  gap: 9px;
}
.diag-dots i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #34324a;
  font-style: normal;
}
.diag-title {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  color: #8a8aa3;
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.2vw, 18px);
  letter-spacing: .04em;
  pointer-events: none;
}

.diag-stage {
  container-type: inline-size;
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 600;
}
.diag-stage::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 42cqw; height: 36cqw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129,140,248,.26), transparent 72%);
}

/* Nodes */
.diag-node {
  position: absolute;
  z-index: 2;
  border-radius: 15px;
  background: var(--chip);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1.35cqw;
  padding: 0 1.5cqw;
  box-shadow: 0 5cqw 14cqw -9cqw rgba(0,0,0,.6);
}
.diag-node-active {
  border-color: rgba(129,140,248,.55);
  box-shadow: 0 0 0 1px rgba(129,140,248,.35), 0 0 5cqw -1cqw rgba(129,140,248,.7);
}
.diag-ico {
  width: 3.5cqw; height: 3.5cqw;
  border-radius: 1cqw;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  align-self: center;
}
.diag-ico-agent {
  background: linear-gradient(140deg, var(--indigo), var(--violet));
  font-family: var(--font-head);
  font-weight: 700;
  color: #fff;
  font-size: 1.75cqw;
}
.diag-nm {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.55cqw;
  color: var(--text);
  letter-spacing: -.01em;
  line-height: 1.1;
}
.diag-sub {
  font-family: var(--font-mono);
  font-size: 1.1cqw;
  color: var(--muted);
  margin-top: .3cqw;
}

/* Gate */
.diag-gate {
  position: absolute;
  z-index: 2;
  border-radius: 1.3cqw;
  background: linear-gradient(160deg, #221f3a, #171631);
  border: 1px solid rgba(167,139,250,.55);
  box-shadow: 0 0 0 1px rgba(129,140,248,.18), 0 0 6cqw -1cqw rgba(129,140,248,.65),
    inset 0 1px 0 rgba(255,255,255,.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.9cqw 2.2cqw;
}
.diag-gtitle {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--violet);
  font-size: 1.85cqw;
  text-align: center;
  margin-bottom: .7cqw;
  letter-spacing: .01em;
}
.diag-grow {
  font-family: var(--font-mono);
  font-size: 1.5cqw;
  padding: 1.15cqw 0;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  gap: .5cqw;
  white-space: nowrap;
}
.diag-grow:first-of-type { border-top: none; }
.diag-arr   { color: var(--muted); }
.diag-eq    { color: var(--muted); }
.diag-k     { color: var(--text); }
.diag-muted   { color: rgba(148,163,184,.55); }
.diag-allow   { color: var(--green); font-weight: 600; }
.diag-deny    { color: var(--red);   font-weight: 600; }
.diag-approve { color: #f59e0b;      font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   2) PIPELINE SECTION
   ══════════════════════════════════════════════════════════ */
.pipeline {
  scroll-margin-top: 68px;
  padding: 120px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.pipeline-header {
  max-width: 720px;
  margin-bottom: 8px;
}
.pipeline-header .section-heading { margin-bottom: 18px; }
.pipeline-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
}
.pipeline-cards {
  display: flex;
  align-items: stretch;
  margin-top: 52px;
}
.pipeline-card {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* horizontal connector arrows between steps (same look as .aseq-arrow) */
.pipeline-arrow {
  flex: 0 0 auto;
  align-self: center;
  position: relative;
  width: 44px;
  height: 2px;
  margin: 0 16px;
  background: linear-gradient(90deg, var(--border), var(--indigo));
}
.pipeline-arrow::after { /* arrowhead — points right */
  content: "";
  position: absolute;
  top: 50%;
  right: -1px;
  transform: translateY(-50%);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid var(--indigo);
}
.pipeline-arrow::before { /* glow dot flowing along the line (echoes diagram fireflies) */
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--indigo);
  box-shadow: 0 0 8px 2px rgba(129,140,248,0.7);
  will-change: transform;
  animation: pipe-flow-x 2.2s linear infinite;
}
.pipeline-arrow:last-of-type::before { animation-delay: 1.1s; }

/* Compositor-only: travel via translate (was left/top → layout thrash every frame).
   The arrow is 44px wide / 28px tall; the dot rides its own GPU layer, box-shadow
   baked in — so the glow moves for free. */
@keyframes pipe-flow-x {
  0%   { transform: translateX(0);    opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateX(44px); opacity: 0; }
}
@keyframes pipe-flow-y {
  0%   { transform: translateY(0);    opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(28px); opacity: 0; }
}

/* step-by-step reveal: arrows slide in from the left, staggered with cards */
.pipeline-arrow[data-reveal] { transform: translateX(-14px); }
.pipeline-arrow[data-reveal].revealed { transform: none; }

/* stack vertically on smaller screens — arrows rotate to point down */
@media (max-width: 768px) {
  .pipeline-cards { flex-direction: column; align-items: stretch; }
  .pipeline-arrow {
    width: 2px;
    height: 28px;
    margin: 14px 0;
    align-self: center;
    background: linear-gradient(180deg, var(--border), var(--indigo));
  }
  .pipeline-arrow::after {
    top: auto;
    bottom: -1px;
    right: 50%;
    transform: translateX(50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--indigo);
    border-bottom: none;
  }
  .pipeline-arrow::before {
    left: 50%;
    top: 0;
    margin-top: 0;
    margin-left: -3px;
    animation-name: pipe-flow-y;
  }
}
.pipeline-card:hover {
  border-color: rgba(129,140,248,0.3);
  box-shadow: 0 0 32px -8px rgba(129,140,248,0.12);
}
.card-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--indigo);
  margin-bottom: 20px;
}
.pipeline-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.card-subtitle {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--indigo);
  margin-bottom: 16px;
}
.card-body {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.7;
}
.card-config {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.card-config b {
  color: var(--indigo);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   PROBLEM SECTION
   ══════════════════════════════════════════════════════════ */

.problem {
  position: relative;
  padding: 120px 0;
  border-top: 1px solid var(--border);
}

/* heading spans the full width above both columns; below: a narrower
   left column of stacked cards + a wider diagram column on the right */
.problem-inner {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 36px 56px;
  align-items: center;
}

.problem-header {
  grid-column: 1 / -1;
  text-align: left;
  max-width: 900px;
  margin: 0;
}

.problem-header h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.problem-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
}

/* cards stacked vertically, compact, full width within the left column */
.problem-cols {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.problem-col {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}

/* right column diagram — fluid to the column width */
.problem-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
}
.problem-diagram .diag-wrap {
  width: 100%;
  max-width: 100%;
}

.problem-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(124, 102, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--indigo);
  margin-bottom: 14px;
}

.problem-col h3 {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.problem-col p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}

/* mobile: stack to one column — heading, cards, then diagram (DOM order) */
@media (max-width: 900px) {
  .problem-inner { grid-template-columns: 1fr; gap: 40px; }
}

/* ── OPTIONAL variant (default OFF): diagram as a faint blurred background ──
   Toggle by adding class "diagram-as-bg" to the <section class="problem"> in
   patterns/home_problem.php. Default layout is the side-by-side above. */
.problem.diagram-as-bg .problem-inner { grid-template-columns: 1fr; }
.problem.diagram-as-bg .problem-header,
.problem.diagram-as-bg .problem-left { position: relative; z-index: 1; }
.problem.diagram-as-bg .problem-diagram {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.18;
  filter: blur(2px);
  pointer-events: none;
}
.problem.diagram-as-bg .problem-diagram .diag-wrap {
  max-width: min(1100px, 90%);
}

/* ═══════════════════════════════════════════════════════════
   FEATURES SECTION
   ══════════════════════════════════════════════════════════ */
.features {
  padding: 120px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.features-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 64px;
}
.features-header .section-heading { margin-bottom: 18px; }
.features-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  border-color: rgba(129,140,248,0.3);
  box-shadow: 0 0 32px -8px rgba(129,140,248,0.12);
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(124, 102, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--indigo);
  margin-bottom: 20px;
}
.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.feature-card p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   APPROVAL FLOW CALLOUT
   ══════════════════════════════════════════════════════════ */
.approvals {
  padding: 120px 0;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(820px 520px at 78% 22%, rgba(167,139,250,0.12), transparent 62%),
    linear-gradient(180deg, rgba(129,140,248,0.05), transparent 45%),
    var(--bg);
}
.approvals-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.approvals-copy .section-heading { margin-bottom: 24px; }
.approvals-body {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 18px;
}
.approvals-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--indigo);
  transition: gap 0.2s ease, color 0.2s ease;
}
.approvals-link:hover { gap: 12px; color: var(--violet); }

/* sequence visual */
.aseq {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  max-width: 420px;
  margin: 0 auto;
}
.aseq-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--chip);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px -28px rgba(0,0,0,0.8);
}
.aseq-step-gate {
  border-color: rgba(167,139,250,0.55);
  box-shadow: 0 0 0 1px rgba(129,140,248,0.18), 0 0 40px -16px rgba(129,140,248,0.7);
}
.aseq-step-approve { border-color: rgba(52,211,153,0.45); }
.aseq-step-result  { border-color: rgba(129,140,248,0.35); }
.aseq-ico {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}
.aseq-ico-agent   { background: linear-gradient(140deg, var(--indigo), var(--violet)); }
.aseq-ico-gate    { background: linear-gradient(140deg, var(--violet), var(--cyan)); }
.aseq-ico-owner   { background: var(--card); border: 1px solid var(--border); color: var(--indigo); }
.aseq-ico-approve { background: rgba(52,211,153,0.16); color: var(--green); }
.aseq-ico-upstream{ background: var(--card); border: 1px solid var(--border); color: var(--muted); }
.aseq-txt b {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.aseq-txt span {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.aseq-arrow {
  position: relative;
  height: 26px;
  width: 2px;
  margin: 4px 0 4px 35px;
  background: linear-gradient(var(--border), var(--indigo));
}
.aseq-arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--indigo);
}
.aseq-arrow-result { background: linear-gradient(var(--border), var(--green)); }
.aseq-arrow-result::after { border-top-color: var(--green); }
.aseq-tag {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
}
.aseq-tag-pause  { background: rgba(245,158,11,0.14); color: #f59e0b; border: 1px solid rgba(245,158,11,0.35); }
.aseq-tag-replay { background: rgba(129,140,248,0.14); color: var(--indigo); border: 1px solid rgba(129,140,248,0.35); }

@media (max-width: 900px) {
  .approvals-inner { grid-template-columns: 1fr; gap: 48px; }
  .aseq { max-width: 460px; }
}

/* ═══════════════════════════════════════════════════════════
   3) INTEGRATION SECTION
   ══════════════════════════════════════════════════════════ */
.integration {
  scroll-margin-top: 68px;
  padding: 120px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.integration-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.integration-copy .section-heading { margin-bottom: 24px; }
.integration-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.integration-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--muted);
}
.integration-list li::before {
  content: '→';
  color: var(--indigo);
  font-family: var(--font-mono);
  font-size: 13px;
  flex-shrink: 0;
}

.code-block {
  background: #0d0d16;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.code-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(39,39,58,0.35);
}
.code-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.code-dots span {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.code-dots span:nth-child(1) { background: #f87171; }
.code-dots span:nth-child(2) { background: #fbbf24; }
.code-dots span:nth-child(3) { background: #34d399; }
.code-filename {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
pre {
  padding: 20px 22px;
  overflow-x: auto;
}
code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  color: var(--text);
  white-space: pre;
}
.ck { color: var(--indigo); }
.cs { color: var(--cyan); }

.integration-lede {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

/* Code tabs (CSS-only, radio + label) */
.codetabs { position: relative; }
.codetab-radio { position: absolute; top: 0; left: 0; opacity: 0; pointer-events: none; }
.codetab-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.codetab-label {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--card);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.codetab-label:hover { color: var(--text); border-color: rgba(129,140,248,0.4); }

/* All panels share one grid cell → container height = tallest panel,
   so switching tabs never changes the section height. */
.codetab-panels { display: grid; }
.codetab-panel {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.15s ease;
}

#ct-claude:checked  ~ .codetab-strip label[for="ct-claude"],
#ct-cursor:checked  ~ .codetab-strip label[for="ct-cursor"],
#ct-desktop:checked ~ .codetab-strip label[for="ct-desktop"],
#ct-custom:checked  ~ .codetab-strip label[for="ct-custom"] {
  color: var(--text);
  border-color: rgba(167,139,250,0.55);
  background: rgba(129,140,248,0.1);
}
#ct-claude:checked  ~ .codetab-panels .codetab-panel[data-tab="claude"],
#ct-cursor:checked  ~ .codetab-panels .codetab-panel[data-tab="cursor"],
#ct-desktop:checked ~ .codetab-panels .codetab-panel[data-tab="desktop"],
#ct-custom:checked  ~ .codetab-panels .codetab-panel[data-tab="custom"] {
  visibility: visible;
  opacity: 1;
}
/* keyboard focus on the active tab */
.codetab-radio:focus-visible ~ .codetab-strip label {
  outline-offset: 2px;
}

.codetab-note,
.codetab-banner {
  border-radius: 12px;
  padding: 22px 24px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
}
.codetab-note {
  background: #0d0d16;
  border: 1px solid var(--border);
}
.codetab-note code,
.codetab-banner code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--cyan);
  background: rgba(34,211,238,0.16);
  border: 1px solid rgba(34,211,238,0.30);
  padding: 1px 6px;
  border-radius: 5px;
  word-break: break-word;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.codetab-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.3);
}
.codetab-banner-ico {
  flex: none;
  color: var(--warning);
  margin-top: 1px;
}
.codetab-banner code { color: var(--warning); background: rgba(245,158,11,0.18); border-color: rgba(245,158,11,0.38); }

/* ═══════════════════════════════════════════════════════════
   TRUST & SECURITY
   ══════════════════════════════════════════════════════════ */
.trust {
  padding: 120px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.trust-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 64px;
}
.trust-header .section-heading { margin-bottom: 18px; }
.trust-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 920px;
  margin: 0 auto;
}
.trust-block {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.trust-block:hover {
  border-color: rgba(129,140,248,0.3);
  box-shadow: 0 0 32px -8px rgba(129,140,248,0.12);
}
/* centred 5th card */
.trust-block:nth-child(5) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - 12px);
}
.trust-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(124, 102, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--indigo);
  margin-bottom: 20px;
}
.trust-block h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.trust-block p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}
@media (max-width: 680px) {
  .trust-grid { grid-template-columns: 1fr; }
  .trust-block:nth-child(5) { grid-column: auto; width: auto; }
}

/* ═══════════════════════════════════════════════════════════
   4) CTA BAND
   ══════════════════════════════════════════════════════════ */
.cta-band {
  background: var(--grad);
  padding: 88px 0;
}
.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}
.cta-band h2 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 800;
  color: #fff;
  max-width: 720px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.cta-sub {
  color: rgba(255,255,255,0.88);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 520px;
  margin-top: -10px;
}
.cta-email {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  margin-top: -8px;
}
.cta-email a {
  color: #fff;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.5);
  transition: border-color 0.2s;
}
.cta-email a:hover { border-color: #fff; }

/* ═══════════════════════════════════════════════════════════
   FAQ
   ══════════════════════════════════════════════════════════ */
.faq {
  padding: 120px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.faq-header {
  text-align: center;
  margin: 0 auto 56px;
}
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.faq-item[open],
.faq-item:hover { border-color: rgba(129,140,248,0.35); }
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.faq-item[open] summary::after {
  transform: rotate(-135deg);
  border-color: var(--indigo);
}
.faq-a {
  padding: 0 24px 22px;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.75;
}

/* ─── Waitlist ─────────────────────────────────────────── */

.waitlist {
  padding: 112px 0;
  background: radial-gradient(900px 400px at 50% 0%, rgba(124,102,255,.1), transparent 65%);
}
.waitlist-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  text-align: center;
}

/* badge */
.soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--violet);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.soon-pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  flex: none;
}
/* expanding ring — transform + opacity only (compositor; no box-shadow repaint) */
.soon-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(45,212,191,.5);
  will-change: transform, opacity;
  animation: soon-pulse 2.2s ease-out infinite;
}
.waitlist.anim-paused .soon-pulse::after { animation-play-state: paused; }
@keyframes soon-pulse {
  0%   { transform: scale(1);   opacity: .6; }
  100% { transform: scale(3.4); opacity: 0; }
}

.waitlist-copy h2 {
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 16ch;
  margin: 0 auto;
}
.waitlist-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 50ch;
  margin: 16px auto 0;
  line-height: 1.6;
}

/* form card */
.waitlist-form-wrap {
  width: 100%;
  max-width: 520px;
  background: linear-gradient(180deg, var(--card), #100f22);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 34px 30px;
  box-shadow: 0 40px 90px -50px rgba(0,0,0,.9);
}
.waitlist-form-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.waitlist-field {
  display: flex;
  gap: 10px;
}
.waitlist-field input {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 13px 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.waitlist-field input::placeholder { color: #6d6a96; }
.waitlist-field input:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(124,102,255,.18);
}
.waitlist-field input.is-bad {
  border-color: #fb7185;
  box-shadow: 0 0 0 3px rgba(251,113,133,.16);
}
.waitlist-hint {
  font-size: 12px;
  color: #615e8a;
  margin-top: 10px;
}
.waitlist-hint.is-err { color: #fb7185; }

/* success state */
.waitlist-success {
  display: none;
  align-items: center;
  gap: 13px;
  background: rgba(52,211,153,.08);
  border: 1px solid rgba(52,211,153,.3);
  border-radius: 14px;
  padding: 16px 18px;
  animation: wl-pop .3s ease;
}
@keyframes wl-pop {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.waitlist-check {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #34d399;
  display: grid;
  place-items: center;
  color: #062a1f;
}
.waitlist-success-txt b   { display: block; font-size: 15px; font-weight: 600; }
.waitlist-success-txt span { font-size: 13px; color: var(--muted); }

@media (max-width: 480px) {
  .waitlist-field { flex-direction: column; }
  .waitlist-form-wrap { padding: 24px 18px; }
}

/* ═══════════════════════════════════════════════════════════
   COOKIE CONSENT
   ══════════════════════════════════════════════════════════ */
.cookie-consent {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;                       /* above the fixed navbar (100) */
  width: min(680px, calc(100vw - 32px));
  padding: 18px 20px;
  background: linear-gradient(180deg, var(--card), #100f22);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.85);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.cookie-consent.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.cookie-consent-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.cookie-consent-text {
  flex: 1 1 280px;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
}
.cookie-consent-text a {
  color: var(--indigo);
  border-bottom: 1px solid rgba(129, 140, 248, 0.4);
  transition: color 0.2s, border-color 0.2s;
}
.cookie-consent-text a:hover { color: var(--violet); border-color: var(--violet); }
.cookie-consent-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
@media (max-width: 520px) {
  .cookie-consent { bottom: 12px; }
  .cookie-consent-actions { width: 100%; }
  .cookie-consent-actions .btn { flex: 1; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════
   5) FOOTER
   ══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding-top: 64px;
  padding-bottom: 40px;
}
.footer-top {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-brand .brand-word { font-size: 18px; }
.footer-brand p {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}
.footer-nav {
  display: flex;
  gap: 48px;
  justify-content: flex-end;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col h4 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 4px;
}
.footer-col a {
  font-size: 13.5px;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }
.footer-legal {
  display: flex;
  align-items: flex-start;   /* legal links sit on the copyright row; address hangs below */
  justify-content: space-between;
  padding: 20px 0;
  font-size: 12.5px;
  color: var(--muted);
}
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-address {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-style: normal;   /* <address> defaults to italic */
  color: var(--muted);
}
.footer-address-pin {
  flex: none;
  margin-top: 2px;      /* nudge the pin onto the first text line */
  color: var(--indigo);
}
.legal-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.legal-links a {
  color: var(--muted);
  transition: color 0.2s;
}
.legal-links a:hover { color: var(--text); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .integration-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .footer-nav {
    justify-content: flex-start;
    gap: 32px;
    flex-wrap: wrap;
  }
}

@media (max-width: 680px) {
  .navbar-menu {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    background: rgba(10,10,15,0.98);
    padding: 12px 20px 20px;
    border-bottom: 1px solid var(--border);
    z-index: 99;
  }
  .navbar-menu.is-open { display: flex; }
  .navbar-menu .nav-link { width: 100%; padding: 10px 12px; font-size: 15px; }
  .navbar-actions .nav-link { display: none; }
  .navbar-toggle { display: flex; }

  .hero-heading h1 { font-size: clamp(1.9rem, 8vw, 2.8rem); }
  .diag-wrap { max-width: 98vw; }

  .footer-top { gap: 32px; }
  .footer-legal { flex-direction: column; align-items: flex-start; gap: 12px; }
  .legal-links { gap: 12px; }
}

/* ═══════════════════════════════════════════════════════════
   REDUCED MOTION / NO-JS FALLBACKS
   ══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero-heading { opacity: 1 !important; transform: none !important; }
  .ff           { display: none; }
  .pipeline-arrow::before { display: none; } /* stop the flowing glow */
  .bub, .dflow-bub { display: none; } /* hide the moving data-flow bubbles (static wires stay) */
  .mini .row, .mini .chip { animation: none; } /* static laptop screen */
  .soon-pulse::after { animation: none; opacity: 0; } /* stop the badge ring */
  .btn { transition: none; }
  .pipeline-card, .nav-link { transition: none; }
  .cookie-consent { transition: opacity 0.3s ease; transform: translateX(-50%); } /* fade only, no slide */
}

@media (hover: none), (pointer: coarse) {
  .hero-video { display: none !important; }
}

.no-js .hero-track { height: auto; }
.no-js .hero-stage { position: static; height: auto; }
.no-js .hero-heading { position: static; opacity: 1; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ─────────────────────────────────────────────────────────
   INNER PAGES (page / single / blog index)
   Offset the fixed navbar so the title isn't covered, and
   give breathing room above the footer. Front page opts out
   (it uses patterns, not main.wp-block-group).
   ─────────────────────────────────────────────────────── */
main.wp-block-group {
  padding-top: calc(68px + 3rem) !important;
  padding-bottom: 6rem !important;
}

/* ── WP Admin Bar offset ─────────────────────────────────── */
/* When admin bar is visible WP adds margin-top to <html>;   */
/* push the fixed navbar down so it isn't hidden beneath it. */
.admin-bar .navbar { top: 32px; }
.admin-bar .pipeline,
.admin-bar .integration { scroll-margin-top: calc(68px + 32px); }

@media screen and (max-width: 782px) {
  .admin-bar .navbar       { top: 46px; }
  .admin-bar .navbar-menu  { top: calc(46px + 68px); }
  .admin-bar .pipeline,
  .admin-bar .integration  { scroll-margin-top: calc(68px + 46px); }
}

/* ═══════════════════════════════════════════════════════════
   WP BLOCK + MENU ADAPTERS
   ══════════════════════════════════════════════════════════ */

/* Gradient button block style */
.wp-block-button.is-style-gradient .wp-block-button__link,
.wp-block-button.is-style-gradient .wp-element-button {
  background: var(--meandr-gradient) !important;
  color: #ffffff !important;
  border: none !important;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.wp-block-button.is-style-gradient .wp-block-button__link:hover,
.wp-block-button.is-style-gradient .wp-element-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* wp_nav_menu() wraps navbar links in <ul><li> — make flex pass through */
.navbar-menu > ul {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 0;
}
.navbar-menu > ul > li { margin: 0; }

@media (max-width: 680px) {
  .navbar-menu > ul {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
}

/* Footer column menus */
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col li { margin: 0; }

/* Legal links menu */
.legal-links ul {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.legal-links li { margin: 0; }

@media (max-width: 680px) {
  .legal-links ul { gap: 12px; }
}
