/* =========================================================
   Permitix — Landing
   Design system: Clarity. Authority. Precision.
   All tokens live on :root so the Tweaks panel can override.
   ========================================================= */

:root {
  /* ── PALETTE — Insomniac Permitting ───────────────────────
     Brand anchors:
       Navy    #0B2645   → ink / brand
       Sky     #5DADE2   → brand-2 / info (decorative)
       Emerald #2EBD82   → accent-2 (decorative); #1A7348 for text (WCAG AA)
     All text tokens verified ≥ 4.5:1 on --bg (#F5F8FC).
  ──────────────────────────────────────────────────────── */
  --bg:          #F5F8FC;          /* cool white, slight blue tint          */
  --bg-2:        #EAF1F9;          /* card / surface                        */
  --bg-3:        #D8E8F5;          /* deeper surface                        */
  --ink:         #0B2645;          /* primary text  — contrast ~14 : 1 ✓   */
  --ink-2:       #1C3B5C;          /* secondary     — contrast ~11 : 1 ✓   */
  --ink-3:       #3D5973;          /* muted         — contrast  ~7 : 1 ✓   */
  --rule:        rgba(11,38,68,0.10);
  --rule-strong: rgba(11,38,68,0.18);

  --brand:       #0B2645;          /* deep navy                             */
  --brand-2:     #1A527A;          /* medium blue                           */
  --brand-soft:  #D0E8F8;          /* sky tint                              */
  --accent:      #1484CE;          /* sky blue accent                       */
  --accent-2:    #1484CE;          /* sky blue accent (decorative / fills)  */

  --green:       #2EBD82;          /* emerald — pill decoration             */
  --green-text:  #1A7348;          /* accessible dark green — pill text     */
  --ok:          #1A7348;          /* accessible green, same as --accent    */
  --warn:        #B06800;
  --danger:      #C0392B;
  --info:        #5DADE2;          /* sky blue — decorative only            */

  /* TYPOGRAPHY */
  --font-sans:    'Geist', 'Public Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Geist', 'Public Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    'Geist Mono', 'Roboto Mono', ui-monospace, monospace;

  /* WRAPPER WIDTH */
  --wrap:         1360px;
  --wrap-narrow:  920px;

  /* SHAPE */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 22px;

  /* SHADOW */
  --shadow-1: 0 1px 2px rgba(11,38,68,0.06), 0 1px 1px rgba(11,38,68,0.04);
  --shadow-2: 0 6px 18px rgba(11,38,68,0.08), 0 2px 4px rgba(11,38,68,0.05);
  --shadow-3: 0 24px 64px rgba(11,38,68,0.12), 0 6px 16px rgba(11,38,68,0.06);

  /* TRANSITIONS */
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* =========================================================
   RESET
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  /* clip stops horizontal scroll without creating a scroll container —
     overflow:hidden would break position:sticky on the nav */
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--ink); color: var(--bg); }

/* =========================================================
   LAYOUT PRIMITIVES
   ========================================================= */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: var(--wrap-narrow); margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) {
  .wrap, .wrap-narrow { padding: 0 20px; }
}

/* =========================================================
   FEDERAL BANNER (preserved from original spec)
   ========================================================= */
.fed-banner {
  background: #0B1220;
  color: rgba(255,255,255,0.72);
  font-size: 12px;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  white-space: nowrap;
  overflow: hidden;
}
.fed-banner svg { width: 16px; height: 11px; opacity: .85; flex-shrink: 0; }
.fed-banner a { color: rgba(255,255,255,0.6); text-decoration: underline; }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Default = hero state (dark). Keeps background solid before JS runs → no white flash. */
  background: var(--brand);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition:
    background .35s ease,
    border-color .35s ease;
}
/* ── Light state once scrolled past the hero ── */
.nav.nav-scrolled {
  background: rgba(245,248,252,0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--rule);
}
/* Hero state — :not(.nav-scrolled) beats the base rules (0,2,x > 0,1,x) */
.nav:not(.nav-scrolled) .nav-brand      { color: #fff; }
.nav:not(.nav-scrolled) .nav-brand-mark { background: rgba(255,255,255,0.92); color: var(--brand); }
.nav:not(.nav-scrolled) .nav-links a    { color: rgba(255,255,255,0.68); }
.nav:not(.nav-scrolled) .nav-links a:hover,
.nav:not(.nav-scrolled) .nav-links a.is-active {
  background: rgba(255,255,255,0.10);
  color: #fff;
}
/* nav dark → btn-primary-contrast (already default class, no override needed) */
/* Scrolled state — dark colours */
.nav.nav-scrolled .nav-brand      { color: var(--ink); }
.nav.nav-scrolled .nav-brand-mark { background: var(--brand); color: #fff; }
.nav.nav-scrolled .nav-links a    { color: var(--ink-2); }
.nav.nav-scrolled .nav-links a:hover,
.nav.nav-scrolled .nav-links a.is-active {
  background: var(--bg-2);
  color: var(--ink);
}
/* nav light → switch to btn-primary */
.nav.nav-scrolled .nav-cta { background: #0B2645; color: #F5F8FC; }
.nav.nav-scrolled .nav-cta:hover { background: var(--accent-2); color: #F5F8FC; }
.nav-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 32px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 16px;
}
.nav-logo {
  display: block;
  height: 40px;
  width: auto;
  transition: content .0s;
}
/* scrolled nav — switch to navy logo */
.nav.nav-scrolled .nav-logo {
  content: url('Logo/Permitix Logo - navy.svg');
}
.nav-brand-mark {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--brand);
  display: grid; place-items: center;
  color: white;
  transition: background .35s ease, color .35s ease;
}
.nav-brand-mark svg { width: 16px; height: 16px; }
.nav-links {
  display: flex;
  gap: 4px;
  margin: 0 auto;
  list-style: none;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  border-radius: 999px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-links a:hover { background: var(--bg-2); color: var(--ink); }
/* Desktop CTA */
.nav-cta {
  flex-shrink: 0;
}
.nav-cta svg { width: 12px; height: 12px; }

/* ── Mobile right group ── */
/* Hidden by default — shown only at ≤1100px */
.nav-right {
  display: none;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
/* Mobile CTA (rightmost, always full text) */
.nav-cta-mob {
  flex-shrink: 0;
  white-space: nowrap;
}
.nav-cta-mob svg { width: 12px; height: 12px; }

/* Toggle button — shrinks to available space, truncates label */
.nav-mob-wrap  { position: relative; min-width: 0; flex-shrink: 1; }
.nav-mob-btn   {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.30);
  background: transparent;
  color: #F5F8FC;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}
.nav-mob-btn:hover {
  background: rgba(20,132,206,0.20);
  border-color: var(--accent-2);
}
/* Label truncates when space is tight */
.nav-mob-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}
.nav-mob-icon { width: 16px; height: 16px; flex-shrink: 0; }
.icon-close   { display: none; }

/* open state */
.nav-mob-btn[aria-expanded="true"] .icon-open  { display: none; }
.nav-mob-btn[aria-expanded="true"] .icon-close { display: block; }

/* scrolled state — toggle */
.nav.nav-scrolled .nav-mob-btn {
  color: var(--ink);
  border-color: rgba(11,38,68,0.25);
}
.nav.nav-scrolled .nav-mob-btn:hover {
  background: var(--bg-2);
  border-color: var(--accent-2);
  color: var(--ink);
}
/* scrolled state — mobile CTA */
.nav.nav-scrolled .nav-cta-mob { background: #0B2645; color: #F5F8FC; }
.nav.nav-scrolled .nav-cta-mob:hover { background: var(--accent-2); color: #F5F8FC; }

/* drawer — anchored to the toggle button */
.nav-mob-drawer {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: rgba(245,248,252,0.96);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 32px rgba(11,38,68,0.12);
  overflow: hidden;
  display: none;
  z-index: 100;
}
.nav-mob-drawer.is-open { display: block; }
.nav-mob-links {
  list-style: none;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-mob-links a {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
  border-radius: var(--r-md);
  transition: background .15s ease, color .15s ease;
}
.nav-mob-links a:hover,
.nav-mob-links a.is-active {
  background: var(--bg-2);
  color: var(--ink);
}

@media (max-width: 1100px) {
  /* Desktop links + desktop CTA → hidden */
  .nav-links              { display: none !important; }
  .nav-inner > .nav-cta  { display: none !important; }
  /* Mobile group → shown; takes remaining space after logo + 16px gap */
  .nav-inner { gap: 0; }
  .nav-brand { flex-shrink: 0; margin-right: 16px; }
  .nav-right { display: flex; flex: 1; justify-content: flex-end; min-width: 0; }
}

/* =========================================================
   COMMON TYPE
   ========================================================= */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent);
}
.eyebrow.on-dark { color: rgba(255,255,255,0.65); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.05;
  font-weight: 500;
}

.display {
  font-size: clamp(1.9rem, 3.4vw, 3.1rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
  font-weight: 500;
  text-wrap: balance;
  max-width: 26ch;
  margin-left: auto;
  margin-right: auto;
}
.display em {
  font-style: normal;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2.section-h {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-weight: 500;
  text-wrap: balance;
}
h2.section-h em {
  font-style: normal;
  color: #1484CE; /* sky-blue accent — ✓ AA */
}

h3 {
  font-size: 1.05rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.lead {
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  color: var(--ink-2);
  line-height: 1.55;
  text-wrap: pretty;
  max-width: 64ch;
}
.lead.centered { margin-left: auto; margin-right: auto; }

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "ss01";
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 14px; height: 14px; }

/* primary-contrast — для тёмного фона (hero, CTA) */
.btn-primary-contrast { background: #F5F8FC; color: #0B2645; }
.btn-primary-contrast:hover { background: var(--accent-2); color: #F5F8FC; }

/* primary — для светлого фона */
.btn-primary { background: #0B2645; color: #F5F8FC; }
.btn-primary:hover { background: var(--accent-2); color: #F5F8FC; }

/* secondary — для тёмного фона */
.btn-secondary {
  background: transparent;
  color: #F5F8FC;
  border: 1px solid rgba(245,248,252,0.30);
}
.btn-secondary:hover {
  background: rgba(20,132,206,0.30);
  color: #F5F8FC;
  border-color: var(--accent-2);
}

/* secondary-contrast — для светлого фона */
.btn-secondary-contrast {
  background: transparent;
  color: #0B2645;
  border: 1px solid rgba(11,38,68,0.30);
}
.btn-secondary-contrast:hover {
  background: rgba(20,132,206,0.12);
  color: #0B2645;
  border-color: var(--accent-2);
}

/* =========================================================
   DOT GRID BACKGROUND (Stripe-inspired)
   Reacts to --mx/--my from JS (in % within section).
   ========================================================= */
.dotfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
  --mx: 50%;
  --my: 50%;
  background-image: radial-gradient(circle, color-mix(in oklab, var(--ink) 18%, transparent) 1px, transparent 1.4px);
  background-size: 22px 22px;
  background-position: 0 0;
  -webkit-mask-image: radial-gradient(circle at var(--mx) var(--my), black 0%, transparent 55%);
          mask-image: radial-gradient(circle at var(--mx) var(--my), black 0%, transparent 55%);
  opacity: .55;
  transition: -webkit-mask-image .2s linear, mask-image .2s linear;
}
.dotfield.faint {
  opacity: .3;
  -webkit-mask-image: radial-gradient(ellipse at var(--mx) var(--my), black 0%, transparent 70%);
          mask-image: radial-gradient(ellipse at var(--mx) var(--my), black 0%, transparent 70%);
}
.dotfield.full {
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 25%, black 75%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, black 25%, black 75%, transparent 100%);
}

/* On dark surfaces */
.dotfield.on-dark {
  background-image: radial-gradient(circle, rgba(255,255,255,0.22) 1px, transparent 1.4px);
}

/* =========================================================
   SECTION SCAFFOLDING
   ========================================================= */
section { position: relative; padding: 96px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } }

.section-head {
  display: grid;
  gap: 16px;
  margin-bottom: 56px;
}
.section-head.centered { justify-items: center; text-align: center; }
.section-head.centered .lead { margin-left: auto; margin-right: auto; }

/* Section divider line (refined, with anchor tick) */
.sect-divider {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-text);
  padding: 5px 14px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--green) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--green) 30%, transparent);
}
.sect-divider .tick  { font-feature-settings: "tnum"; }
.sect-divider .line  { display: none; }
/* Dark-background variant — same as hero-tagline */
#about .sect-divider,
#cta .sect-divider {
  color: var(--green);
  background: color-mix(in oklab, var(--green) 14%, transparent);
  border-color: color-mix(in oklab, var(--green) 32%, transparent);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  z-index: 1;               /* paints hero above problem section in overlap zone */
  padding: 64px 0 0;
  text-align: center;
  overflow: visible;
  background: var(--brand);            /* #0B2645 dark navy */
}
/* Diagonal cut: matches Problem section background */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 220px;
  background: #e9f0f8;
  /* left edge: 55% from top (≈ 121px), right edge: 0% (top of element)
     → diagonal rises ~121px left-to-right ≈ 5° on 1280px screen */
  clip-path: polygon(0 55%, 100% 0%, 100% 100%, 0 100%);
  pointer-events: none;
  z-index: 5;
}
/* Flow-field canvas — sits behind all hero content */
.hero-canvas {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  z-index: 0;
}

/* White dots on dark background */
.hero .dotfield {
  z-index: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.20) 1px, transparent 1.4px);
  opacity: .45;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, black 0%, transparent 68%);
          mask-image: radial-gradient(ellipse at 50% 40%, black 0%, transparent 68%);
}
.hero-inner { position: relative; padding-bottom: 0; }
/* note: no z-index here — keeps hero-preview in the hero stacking context
   so its z-index:10 sits above the ::after diagonal (z-index:5) */

/* Headline white on dark */
.hero .display { color: white; }
.hero .display em {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: #5DADE2;
}

/* Pill — dark glass style */
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.72);
  margin-bottom: 28px;
}
/* Emerald dot — bright on dark (6.6 : 1 ✓) */
.hero-pill-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--green);
  display: grid; place-items: center;
  position: relative;
}
.hero-pill-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--green) 40%, transparent);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: .8; }
  50%      { transform: scale(1.6); opacity: 0; }
}

/* Tagline — bright emerald on navy (6.6 : 1 ✓) */
.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 22px auto 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  padding: 6px 16px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--green) 14%, transparent);
  border: 1px solid color-mix(in oklab, var(--green) 30%, transparent);
}
@media (max-width: 1100px) {
  .hero-tagline {
    background: none;
    border: none;
    padding: 0;
  }
}

.hero-sub {
  max-width: 64ch;
  margin: 22px auto 0;
  color: rgba(255,255,255,0.70);
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.6;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}
/* Button overrides for dark hero background */

/* Hero product preview — Gantt mini */
.hero-preview {
  margin-top: 38px;
  position: relative;
  z-index: 10;
  border-radius: 16px;
  background: linear-gradient(180deg, white 0%, var(--bg) 100%);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  text-align: left;
}
.hero-preview-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}
.hero-preview-chrome .dot { width: 9px; height: 9px; border-radius: 50%; }
.hero-preview-chrome .dot.r { background: #FF5F57; }
.hero-preview-chrome .dot.y { background: #FFBD2E; }
.hero-preview-chrome .dot.g { background: #28CA41; }
.hero-preview-chrome .url { margin-left: 12px; }
.hero-preview-chrome .right {
  margin-left: auto;
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px;
  color: var(--ink-3);
}
.hero-preview-chrome .pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ok) 25%, transparent);
}

/* =========================================================
   MULTI-AGENCY GANTT MINI (hero + tabs)
   ========================================================= */
.gantt {
  display: grid;
  grid-template-columns: 240px 1fr;
  font-size: 12.5px;
  background: white;
}
.gantt-head, .gantt-row {
  display: contents;
}
.gantt-th, .gantt-rh {
  padding: 10px 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--bg-2);
}
.gantt-cell, .gantt-rc {
  padding: 10px 16px;
  border-bottom: 1px solid var(--rule);
  position: relative;
  min-height: 38px;
  display: flex; align-items: center;
}
.gantt-rh {
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  background: white;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gantt-rh .ag {
  display: inline-block;
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
  padding: 1px 6px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  white-space: nowrap;
}
.gantt-track {
  position: relative;
  height: 22px;
  width: 100%;
  background:
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc((100% - 4px)/5 - 1px),
      var(--rule) calc((100% - 4px)/5 - 1px),
      var(--rule) calc((100% - 4px)/5)
    );
  border-radius: 3px;
}
.gantt-bar {
  position: absolute;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 500;
  color: white;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
  overflow: hidden;
  text-overflow: ellipsis;
}
.gantt-bar.complete   { background: #2E7D32; }
.gantt-bar.progress   { background: #2563EB; }
.gantt-bar.delay      { background: #C0392B; }
.gantt-bar.scheduled  { background: #94A3B8; color: white; }
.gantt-bar.await      { background: #C77700; }
.gantt-bar .chk { margin-right: 4px; font-weight: 700; }

.gantt-years {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-2);
}
.gantt-years span { text-align: left; }

/* Hero gantt — larger row height to match design spec (54 px vs 43 px in data tables) */
#hero-gantt .gantt-rh,
#hero-gantt .gantt-rc { padding-top: 16px; padding-bottom: 16px; }

/* Cause-of-delay chip floating over hero gantt */
.cod-chip {
  position: absolute;
  z-index: 3;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: var(--shadow-2);
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 220px;
}
.cod-chip::before {
  content: "";
  position: absolute;
  left: -7px; top: 14px;
  width: 12px; height: 12px;
  background: white;
  border-left: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  transform: rotate(45deg);
}
.cod-chip.hero-cod::before {
  left: auto; right: -7px;
  border-left: 0; border-bottom: 0;
  border-right: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  transform: rotate(45deg);
}
.cod-chip .label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.cod-chip .value { color: var(--danger); font-weight: 600; }
@media (max-width: 900px) { .hero-cod { display: none; } }

/* =========================================================
   PROBLEM (cards + tabs)
   ========================================================= */
#problem { background: #e9f0f8; padding-top: 260px; }

.problem-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  gap: 16px;
  margin-top: 24px;
  margin-bottom: 120px;
}
@media (max-width: 1100px) {
  .problem-cards { grid-template-columns: 1fr; }
}

/* ── Base card ── */
.prob-card {
  position: relative;
  border-radius: var(--r-lg);
  padding: 36px 32px 32px;
  border: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.prob-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }


/* Heading */
.prob-card h3 {
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 14px;
}

/* Body text */
.prob-card p {
  font-size: 15.5px;
  line-height: 1.62;
  margin-bottom: 0;
}

/* Callout / example box */
.prob-card .example {
  margin-top: 18px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.56);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.9);
}

/* Example label — JetBrains Mono + dot marker */
.prob-card .example-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.prob-card .example-label::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Example text */
.prob-card .example-text {
  font-size: 14px;
  line-height: 1.55;
  font-style: italic;
  margin-bottom: 0;
}

/* Card body — grows to fill card, pushes .example and .addressed to bottom */
.prob-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* "Addressed by" always sticks to bottom */
/* Desktop only: push .example to the same baseline across all columns */
@media (min-width: 1101px) {
  .prob-card-body > p {
    margin-bottom: auto; /* all free space goes here — after text, before .example */
  }
  .prob-card .example {
    margin-top: 28px; /* guaranteed min gap from text above */
  }
}

/* "Addressed by" block — pinned to bottom of card */
.prob-card .addressed {
  flex-shrink: 0;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.prob-card .addressed::before { display: none; }

.prob-card .addressed-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.prob-card .addressed-feature {
  font-size: 15.5px;
  line-height: 1.62;
  font-weight: 500;
}

/* ── Card 1 — Blue ── */
/* ── All cards — same tinted matte background ── */
/* =========================================================
   CARD-PROBLEM-1  — unified matte #f8fbfd + noise texture
   ========================================================= */
.card-problem-1 .prob-card:nth-child(1),
.card-problem-1 .prob-card:nth-child(2),
.card-problem-1 .prob-card:nth-child(3) {
  border: none;
}
.card-problem-1 .prob-card:nth-child(1) { background-color: #dce8f7; }
.card-problem-1 .prob-card:nth-child(2) { background-color: #faeee0; }
.card-problem-1 .prob-card:nth-child(3) { background-color: #dff0e4; }
.card-problem-1 .prob-card:nth-child(1)::after,
.card-problem-1 .prob-card:nth-child(2)::after,
.card-problem-1 .prob-card:nth-child(3)::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.28'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  background-repeat: repeat;
  z-index: 0;
}
/* Card 1 — Blue */
.card-problem-1 .prob-card:nth-child(1) h3    { color: #0e3d82; }
.card-problem-1 .prob-card:nth-child(1) p,
.card-problem-1 .prob-card:nth-child(1) .example-text { color: var(--ink-3); }
.card-problem-1 .prob-card:nth-child(1) .example-label { color: #1f58cc; }
.card-problem-1 .prob-card:nth-child(1) .example-label::before { background: #1f58cc; }
.card-problem-1 .prob-card:nth-child(1) .addressed-label { color: #1f58cc; }
.card-problem-1 .prob-card:nth-child(1) .addressed-feature { color: var(--ink-2); }
/* Card 2 — Amber */
.card-problem-1 .prob-card:nth-child(2) h3    { color: #6e3000; }
.card-problem-1 .prob-card:nth-child(2) p,
.card-problem-1 .prob-card:nth-child(2) .example-text { color: var(--ink-3); }
.card-problem-1 .prob-card:nth-child(2) .example-label { color: #c06200; }
.card-problem-1 .prob-card:nth-child(2) .example-label::before { background: #c06200; }
.card-problem-1 .prob-card:nth-child(2) .addressed-label { color: #c06200; }
.card-problem-1 .prob-card:nth-child(2) .addressed-feature { color: var(--ink-2); }
/* Card 3 — Green */
.card-problem-1 .prob-card:nth-child(3) h3    { color: #284d10; }
.card-problem-1 .prob-card:nth-child(3) p,
.card-problem-1 .prob-card:nth-child(3) .example-text { color: var(--ink-3); }
.card-problem-1 .prob-card:nth-child(3) .example-label { color: #4a7a14; }
.card-problem-1 .prob-card:nth-child(3) .example-label::before { background: #4a7a14; }
.card-problem-1 .prob-card:nth-child(3) .addressed-label { color: #4a7a14; }
.card-problem-1 .prob-card:nth-child(3) .addressed-feature { color: var(--ink-2); }

/* =========================================================
   CARD-PROBLEM-2  — white→transparent gradient + noise + thin border
   ========================================================= */
.card-problem-2 .prob-card:nth-child(1),
.card-problem-2 .prob-card:nth-child(2),
.card-problem-2 .prob-card:nth-child(3) {
  background: linear-gradient(135deg, #ffffff 0%, transparent 100%);
  border: 1px solid rgba(11,38,68,0.12);
}
/* No ::before needed */
.card-problem-2 .prob-card:nth-child(1)::before,
.card-problem-2 .prob-card:nth-child(2)::before,
.card-problem-2 .prob-card:nth-child(3)::before {
  display: none;
}
/* Noise texture overlay */
.card-problem-2 .prob-card:nth-child(1)::after,
.card-problem-2 .prob-card:nth-child(2)::after,
.card-problem-2 .prob-card:nth-child(3)::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.28'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  background-repeat: repeat;
  z-index: 0;
}
/* Example block — no fill, no border */
.card-problem-2 .prob-card .example {
  border: none;
}
.card-problem-2 .prob-card:nth-child(1) .example { background: rgba(20,84,206,0.07); }
.card-problem-2 .prob-card:nth-child(2) .example { background: rgba(192,98,0,0.07); }
.card-problem-2 .prob-card:nth-child(3) .example { background: rgba(74,122,20,0.07); }
/* Card 1 — Blue */
.card-problem-2 .prob-card:nth-child(1) h3    { color: #0e3d82; }
.card-problem-2 .prob-card:nth-child(1) p,
.card-problem-2 .prob-card:nth-child(1) .example-text { color: var(--ink-3); }
.card-problem-2 .prob-card:nth-child(1) .example-label { color: #1f58cc; }
.card-problem-2 .prob-card:nth-child(1) .example-label::before { background: #1f58cc; }
.card-problem-2 .prob-card:nth-child(1) .addressed-label { color: #1f58cc; }
.card-problem-2 .prob-card:nth-child(1) .addressed-feature { color: var(--ink-2); }
/* Card 2 — Amber */
.card-problem-2 .prob-card:nth-child(2) h3    { color: #6e3000; }
.card-problem-2 .prob-card:nth-child(2) p,
.card-problem-2 .prob-card:nth-child(2) .example-text { color: var(--ink-3); }
.card-problem-2 .prob-card:nth-child(2) .example-label { color: #c06200; }
.card-problem-2 .prob-card:nth-child(2) .example-label::before { background: #c06200; }
.card-problem-2 .prob-card:nth-child(2) .addressed-label { color: #c06200; }
.card-problem-2 .prob-card:nth-child(2) .addressed-feature { color: var(--ink-2); }
/* Card 3 — Green */
.card-problem-2 .prob-card:nth-child(3) h3    { color: #284d10; }
.card-problem-2 .prob-card:nth-child(3) p,
.card-problem-2 .prob-card:nth-child(3) .example-text { color: var(--ink-3); }
.card-problem-2 .prob-card:nth-child(3) .example-label { color: #4a7a14; }
.card-problem-2 .prob-card:nth-child(3) .example-label::before { background: #4a7a14; }
.card-problem-2 .prob-card:nth-child(3) .addressed-label { color: #4a7a14; }
.card-problem-2 .prob-card:nth-child(3) .addressed-feature { color: var(--ink-2); }

/* =========================================================
   TABS (Steep-style): left clickable list, right preview
   ========================================================= */
.tabs-block {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 56px;
  align-items: start;
  margin-top: 56px;
}
@media (max-width: 1100px) {
  .tabs-block { grid-template-columns: 1fr; gap: 32px; }
}
.tab-list { display: flex; flex-direction: column; gap: 6px; }
.tab-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 18px 22px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background .25s var(--ease), border-color .25s var(--ease);
  position: relative;
}
.tab-item .tab-num {
  position: absolute;
  left: -22px;
  top: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  font-feature-settings: "tnum";
}
.tab-item h4 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.tab-item .tab-arrow {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  width: 16px; height: 16px;
  color: var(--accent);
}
.tab-item p {
  color: var(--ink-3);
  font-size: 0.92rem;
  line-height: 1.55;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .35s var(--ease), opacity .25s var(--ease), margin-top .25s var(--ease);
}
.tab-item.active {
  background: white;
  border-color: var(--rule);
  box-shadow: var(--shadow-1);
}
.tab-item.active .tab-arrow { opacity: 1; transform: translateX(0); }
.tab-item.active p { max-height: 200px; opacity: 1; margin-top: 6px; }

/* Progress dash showing autoplay timer */
.tab-item .tab-progress {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 8px;
  height: 2px;
  background: var(--rule);
  overflow: hidden;
  border-radius: 1px;
  opacity: 0;
  transition: opacity .2s var(--ease);
}
.tab-item.active .tab-progress { opacity: 1; }
.tab-item .tab-progress .fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .1s linear;
}

.tab-preview {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--rule);
  background: white;
  overflow: hidden;
  min-height: 460px;
  box-shadow: var(--shadow-2);
}
.tab-pane {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.tab-pane.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* =========================================================
   STATS (4-up)
   ========================================================= */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 80px;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: white;
  overflow: hidden;
}
@media (max-width: 1100px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat {
  padding: 32px 28px;
  border-right: 1px solid var(--rule);
  position: relative;
}
.stat:last-child { border-right: 0; }
@media (max-width: 1100px) {
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(odd) { border-bottom: 1px solid var(--rule); }
  .stat:nth-child(2) { border-bottom: 1px solid var(--rule); }
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #1484CE;
  margin-bottom: 8px;
  font-feature-settings: "tnum";
}
.stat-num .sup { color: #1484CE; }
.stat-desc { font-size: 0.9rem; color: var(--ink-3); line-height: 1.55; }
.stat-marker {
  position: absolute;
  top: 16px; right: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ── Dark hero variant ── */
.stats.stats-dark {
  position: relative;
  z-index: 2;
  margin: 80px -32px 0;
  background: transparent;
  border: none;
  border-radius: 0;
}
.stats.stats-dark .stat {
  background: transparent;
  border-right: none;
  padding: 24px 32px;
  max-width: 380px;
  min-width: 220px;
}
.stats.stats-dark .stat-num,
.stats.stats-dark .stat-num .sup {
  color: #5DADE2;
}
.stats.stats-dark .stat-desc {
  color: rgba(255,255,255,0.55);
  font-size: 14.5px;
}
.stats.stats-dark .stat-marker {
  display: none;
}
@media (max-width: 1100px) {
  .stats.stats-dark {
    grid-template-columns: 1fr 1fr;
    margin-left: -20px;
    margin-right: -20px;
  }
  .stats.stats-dark .stat { padding: 20px; }
}

/* =========================================================
   SOLUTION (5 features as tabs + walkthrough + screenshot)
   ========================================================= */
#solution { background: var(--bg-2); }

/* ───── FEATURES ↔ ACTS cross-linked block ───── */
.feat-acts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-top: 56px;
  position: relative;
}
.feat-acts .connector-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}
.feat-acts .connector-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
  opacity: 0.9;
}
.feat-acts .connector-dot {
  fill: var(--accent);
  opacity: 0;
}
.feat-acts .connector-dot.visible { opacity: 1; }
.feat-acts .fa-left, .feat-acts .fa-right { position: relative; z-index: 2; }
@media (max-width: 1100px) {
  .feat-acts { grid-template-columns: 1fr; gap: 24px; }
  .feat-acts .connector-svg { display: none; }
}
.fa-col-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}
.fa-col-head .label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  flex: 1 0 100%;
  margin-bottom: -4px;
}
.fa-col-head h3 {
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.fa-col-head .meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
}

.fa-list { display: flex; flex-direction: column; gap: 8px; }

/* Feature card (LEFT — collapsible) */
.feat-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: white;
  cursor: pointer;
  transition:
    border-color .22s var(--ease),
    background .22s var(--ease),
    box-shadow .22s var(--ease),
    padding .25s var(--ease),
    transform .22s var(--ease);
  position: relative;
  overflow: hidden;
}
/* Shimmer sweep on hover */
.feat-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(20,132,206,0.07) 40%,
    rgba(20,132,206,0.12) 50%,
    rgba(20,132,206,0.07) 60%,
    transparent 100%
  );
  transform: translateX(-110%);
  transition: transform .45s var(--ease);
  pointer-events: none;
}
.feat-item:hover {
  border-color: rgba(20,132,206,0.45);
  background: linear-gradient(135deg, rgba(20,132,206,0.06) 0%, white 52%);
  box-shadow: inset 3px 0 0 #1484CE, 0 10px 32px rgba(20,132,206,0.13);
  transform: translateX(5px);
}
.feat-item:hover::after { transform: translateX(110%); }
.feat-item:hover .fi-title { color: #1484CE; }
/* Active state stays locked — no slide */
.feat-item.active:hover {
  transform: none;
  background: white;
}
.feat-item .fi-desc,
.feat-item .fi-tag {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  transition:
    max-height .4s var(--ease),
    opacity .25s var(--ease),
    margin .3s var(--ease),
    padding .3s var(--ease);
  pointer-events: none;
}
.feat-item.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink), var(--shadow-2);
  background: white;
  padding: 20px 22px;
}
.feat-item.active .fi-desc {
  max-height: 240px;
  opacity: 1;
  margin-bottom: 12px;
  pointer-events: auto;
}
.feat-item.active .fi-tag {
  max-height: 32px;
  opacity: 1;
  pointer-events: auto;
}

/* Act card (RIGHT — always visible) */
.act-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 18px 20px 16px;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  background: white;
  cursor: default;
  transition: border-color .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease);
  position: relative;
}
.act-item.related {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 5%, white);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 35%, transparent);
}

/* feature item internals */
.fi-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.fi-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  font-feature-settings: "tnum";
  flex-shrink: 0;
}
.fi-title {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.3;
  transition: color .22s var(--ease);
}
.fi-desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.fi-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.fi-link {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fi-link::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent);
}
.fi-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-2);
  color: var(--ink-3);
  border: 1px solid var(--rule);
}
.feat-item.active .fi-tag { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* act item internals */
.ai-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}
.ai-num {
  background: var(--ink);
  color: var(--bg);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
}
.ai-name {
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.08em;
}
.ai-time { margin-left: auto; }
.ai-quote {
  font-size: 0.94rem;
  color: var(--ink);
  line-height: 1.55;
  font-style: italic;
  padding-left: 12px;
  border-left: 2px solid var(--rule-strong);
  margin-bottom: 10px;
}
.ai-quote strong { font-style: normal; font-weight: 600; }
.act-item.related .ai-quote { border-left-color: var(--accent); }
.ai-detail {
  font-size: 0.83rem;
  color: var(--ink-3);
  line-height: 1.55;
  margin-bottom: 10px;
}
.ai-link {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ai-link::before {
  content: "↗";
  font-size: 12px;
}
.ai-link.empty { color: var(--ink-3); }
.ai-link.empty::before { content: "—"; color: var(--ink-3); }

/* Progress timeline above acts */
.acts-progress {
  height: 3px;
  background: var(--rule);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 14px;
  position: relative;
}
.acts-progress-fill {
  height: 100%;
  background: var(--accent);
  width: 10%;
  transition: width .4s var(--ease);
  border-radius: 2px;
}

/* Pulse animation on cross-highlight */
@keyframes flash {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, #1A7348 60%, transparent), 0 0 0 1px color-mix(in oklab, #1A7348 35%, transparent); }
  100% { box-shadow: 0 0 0 14px transparent, 0 0 0 1px color-mix(in oklab, #1A7348 35%, transparent); }
}
.act-item.pulse {
  animation: flash .8s var(--ease);
}

.walkthrough {
  margin-top: 80px;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: white;
  padding: 32px;
}
.walkthrough-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
}
.walkthrough-head h3 { font-size: 1.4rem; font-weight: 500; letter-spacing: -0.02em; }
.walkthrough-head .time { font-family: var(--font-mono); color: var(--ink-3); font-size: 12px; margin-left: auto; }

.acts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
}
@media (max-width: 1100px) { .acts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .acts { grid-template-columns: 1fr; } }
.act {
  background: white;
  padding: 24px 22px;
  display: flex; flex-direction: column; gap: 8px;
  transition: background .2s var(--ease);
  cursor: pointer;
}
.act:hover { background: var(--bg); }
.act .act-head {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}
.act .act-num {
  background: var(--ink);
  color: var(--bg);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
}
.act .act-label { color: var(--ink); font-weight: 600; }
.act .act-time { margin-left: auto; }
.act .act-vo {
  font-size: 0.93rem;
  color: var(--ink);
  line-height: 1.5;
  font-style: italic;
  padding-left: 12px;
  border-left: 2px solid var(--rule-strong);
}
.act .act-vo strong { font-style: normal; font-weight: 600; }
.act .act-detail {
  font-size: 0.82rem;
  color: var(--ink-3);
  line-height: 1.5;
}

/* Executive Dashboard screenshot frame */
.exec-frame {
  margin-top: 80px;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: white;
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.exec-frame-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
}
.exec-frame-chrome .dot { width: 9px; height: 9px; border-radius: 50%; }
.exec-frame .body { padding: 24px 28px 28px; }

/* Stylized Executive Dashboard mock (kpi rows + sector chart) */
.exec-kpi {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.exec-kpi.quality { margin-top: 14px; }
.exec-card {
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 16px 18px;
  background: white;
  position: relative;
  overflow: hidden;
}
.exec-card.quality { border-top: 2px solid var(--ok); }
.exec-card .kpi-top {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 8px;
}
.exec-card .kpi-num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}
.exec-card .kpi-delta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ok);
}
.exec-card .kpi-spark {
  height: 30px;
  margin: 8px 0;
}
.exec-card .kpi-label {
  font-size: 0.85rem;
  color: var(--ink);
  margin-bottom: 2px;
  font-weight: 500;
}
.exec-card .kpi-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-3);
}
.exec-section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 22px 0 10px;
}

.exec-chart {
  margin-top: 20px;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 18px 22px;
  background: white;
}

/* =========================================================
   INTEGRATIONS
   ========================================================= */
#integrations { background: var(--bg); }
.int-cat {
  margin-bottom: 28px;
}
.int-cat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 14px;
}
.int-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
@media (max-width: 1100px) { .int-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .int-grid { grid-template-columns: repeat(2, 1fr); } }
.int-card {
  background: white;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
  cursor: default;
}
.int-card:hover {
  transform: translateY(-2px);
  border-color: var(--rule-strong);
  box-shadow: var(--shadow-2);
}
.int-card svg { width: 36px; height: 36px; }
.int-card .name { font-size: 0.82rem; font-weight: 600; color: var(--ink); text-align: center; }
.int-card .meta { font-size: 0.72rem; color: var(--ink-3); text-align: center; }

.int-cta {
  margin-top: 28px;
  border: 1px solid var(--rule);
  background: white;
  border-radius: var(--r-lg);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.int-cta .ti { font-weight: 600; font-size: 1rem; margin-bottom: 4px; }
.int-cta .sub { font-size: 0.9rem; color: var(--ink-3); }

/* =========================================================
   STANDARDS
   ========================================================= */
#standards { background: var(--bg-2); }
.mfr-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 40px;
}
@media (max-width: 1100px) { .mfr-grid { grid-template-columns: 1fr 1fr; } }
.mfr-card {
  background: white;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 22px 22px 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mfr-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-2);
}
.mfr-card .badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 10px;
}
.mfr-card h3 { font-size: 1.02rem; margin-bottom: 10px; font-weight: 600; }
.mfr-card p { font-size: 0.88rem; color: var(--ink-2); line-height: 1.55; }


/* =========================================================
   IMPLEMENTATION
   ========================================================= */
#implementation { background: var(--bg); }
.phases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 40px;
}
@media (max-width: 1100px) { .phases { grid-template-columns: 1fr; } }
.phase {
  background: white;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  position: relative;
  overflow: hidden;
}
.phase::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-2);
}
.phase .phase-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 4px;
}
.phase h3 { font-size: 1.1rem; margin-bottom: 12px; font-weight: 600; }
.phase p { font-size: 0.92rem; color: var(--ink-2); line-height: 1.6; }

.compliance {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 48px;
}
@media (max-width: 1100px) { .compliance { grid-template-columns: 1fr 1fr; } }
.comply {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0 20px 0 0;
}
.comply h4 { font-size: 0.94rem; font-weight: 600; margin-bottom: 6px; color: var(--accent-2); }
.comply p { font-size: 0.82rem; color: var(--ink-3); line-height: 1.5; }

/* =========================================================
   ABOUT — dark navy
   ========================================================= */
#about {
  background: var(--brand);
  color: rgba(255,255,255,0.78);
  overflow: hidden;
  position: relative;
}
#about .dotfield.on-dark { z-index: 0; }
#about .wrap { position: relative; z-index: 1; }
#about h2.section-h { color: white; }
#about h2.section-h em { color: rgba(255,255,255,0.55); }
#about .lead { color: rgba(255,255,255,0.7); }
#about .eyebrow { color: rgba(255,255,255,0.55); }
#about .eyebrow::before { background: var(--accent-2); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent-2) 22%, transparent); }

.caps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}
@media (max-width: 1100px) { .caps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .caps { grid-template-columns: 1fr; } }
.cap {
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.18);
}
.cap h4 {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.015em;
}
.cap p { color: rgba(255,255,255,0.65); font-size: 0.88rem; line-height: 1.6; }

.agency-strip {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 28px;
}
.agency-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 16px;
}
.agency-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.agency-pill {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 6px 12px;
  border-radius: 999px;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.agency-pill:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.25); }

/* =========================================================
   CTA
   ========================================================= */
#cta {
  background: var(--ink);
  color: rgba(255,255,255,0.78);
  text-align: center;
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}
#cta .dotfield.on-dark { z-index: 0; }
#cta .wrap { position: relative; z-index: 1; }
#cta h2 { color: white; max-width: 22ch; margin: 16px auto 20px; font-size: clamp(2rem, 4.5vw, 3.6rem); }
#cta p { color: rgba(255,255,255,0.68); margin: 0 auto 32px; max-width: 56ch; font-size: 1.05rem; line-height: 1.65; }
#cta .cta-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: #050C18;
  color: rgba(255,255,255,0.55);
  padding: 28px 0;
  font-size: 13px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-mark {
  display: flex; align-items: center; gap: 10px;
}
.footer-mark .m {
  width: 22px; height: 22px;
  background: var(--accent);
  border-radius: 5px;
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 11px;
}
.footer-center { font-size: 12px; color: rgba(255,255,255,0.4); }
.footer-right { font-size: 12px; color: rgba(255,255,255,0.4); text-align: right; }
.footer-right a { color: rgba(255,255,255,0.55); text-decoration: underline; }

/* =========================================================
   REVEAL ANIMATIONS — soft fade + gentle rise.
   Uses @keyframes (not transition) so animation-fill-mode:both
   guarantees the hidden "from" state renders before playback,
   even if .visible is added before the first paint.
   Defaults to visible when JS is off.
   ========================================================= */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes revealDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* No-JS fallback: everything visible */
.reveal { opacity: 1; transform: none; }

/* JS on: hide + animate on .visible */
html.js-anim .reveal         { opacity: 0; transform: translateY(18px); }
html.js-anim .reveal.visible { animation: revealUp .65s ease-out both; }

/* Stagger — text first */
html.js-anim .r-d1.visible { animation-delay: .05s; }  /* headline      */
html.js-anim .r-d2.visible { animation-delay: .15s; }  /* tagline + sub */
html.js-anim .r-d3.visible { animation-delay: .25s; }  /* CTA buttons   */

/* Hero preview (image) — after text */
html.js-anim .hero-preview.visible { animation-delay: .50s; }

/* Nav — slides in on load; backwards = hidden only during delay, no lingering fill */
html.js-anim .nav-inner {
  animation: revealDown .45s ease-out backwards;
  animation-delay: .25s;
}

/* =========================================================
   FLOATING SETTINGS BUTTON + PANEL (in-page tweaks)
   ========================================================= */
.fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(11,18,32,0.22), 0 2px 6px rgba(11,18,32,0.12);
  transition: transform .25s var(--ease), background .2s var(--ease);
  border: 0;
}
.fab:hover { transform: translateY(-2px) rotate(40deg); background: var(--brand); }
.fab svg { width: 22px; height: 22px; }
.fab .accent-dot {
  position: absolute;
  top: 4px; right: 4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--ink);
}

.settings {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 60;
  width: 340px;
  max-width: calc(100vw - 44px);
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(11,18,32,0.22), 0 4px 12px rgba(11,18,32,0.08);
  padding: 18px 20px 20px;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
  font-family: var(--font-sans);
  max-height: calc(100vh - 130px);
  overflow-y: auto;
}
.settings.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.settings-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.settings-close {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink-3);
  padding: 4px;
  display: grid;
  place-items: center;
  border-radius: 4px;
}
.settings-close:hover { color: var(--ink); background: var(--bg-2); }
.settings-close svg { width: 14px; height: 14px; }

.set-group { margin-bottom: 16px; }
.set-group:last-child { margin-bottom: 0; }
.set-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 10px;
}
.set-palette-current {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 8px;
}

.swatch-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.swatch {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  background: transparent;
  transition: border-color .2s var(--ease), transform .15s var(--ease);
}
.swatch:hover { transform: translateY(-1px); }
.swatch.active { border-color: var(--ink); }
.swatch-colors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  border-radius: 5px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.swatch-colors span { display: block; width: 100%; height: 100%; }

.option-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.option-btn {
  text-align: left;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.option-btn:hover { border-color: var(--rule-strong); }
.option-btn.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}
.option-btn .preview {
  font-size: 11px;
  color: var(--ink-3);
  font-family: var(--font-mono);
}
.option-btn.active .preview { color: rgba(255,255,255,0.6); }

.width-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.width-row .option-btn {
  justify-content: center;
  padding: 10px 6px;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}
.width-row .option-btn .preview { font-size: 10px; }

.set-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
}
.set-toggle-label {
  font-size: 13px;
  color: var(--ink-2);
}
.set-toggle {
  position: relative;
  width: 34px;
  height: 20px;
  border: none;
  border-radius: 999px;
  background: rgba(11,38,68,0.18);
  transition: background .15s;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.set-toggle[data-on="1"] { background: #34c759; }
.set-toggle i {
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.22);
  transition: transform .15s;
  pointer-events: none;
}
.set-toggle[data-on="1"] i { transform: translateX(14px); }

.set-reset {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 9px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink-3);
  cursor: pointer;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.set-reset:hover { color: var(--ink); border-color: var(--ink); }

@media (max-width: 600px) {
  .fab { right: 16px; bottom: 16px; }
  .settings { right: 16px; bottom: 80px; width: calc(100vw - 32px); }
}

/* =========================================================
   UTILITIES
   ========================================================= */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.muted { color: var(--ink-3); }
.hidden { display: none !important; }
