/* ==========================================================================
   DMX – design system
   Palette taken from the DMX app (Bootswatch "Spacelab" + its dashboards):
     steel blue #446e9b (navbar, primary) · chart green #198754 (accent)
     amber #ffc107 · blue #0d6efd · purple #6f42c1 · red #dc3545 (data colours)
   Light page with steel-navy "on-dark" bands. No build step.
   Motion is progressive enhancement and respects prefers-reduced-motion.
   ========================================================================== */

/* ---------- Self-hosted fonts (Geist & Geist Mono) ---------- */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/geist-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/geist-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/geist-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Gradient color-space interpolation tokens ---------- */
:root {
  --in-oklab: ;
  --in-oklch: ;
}
@supports (background: linear-gradient(in oklab, white, black)) {
  :root {
    --in-oklab: in oklab;
    --in-oklch: in oklch;
  }
}

/* ---------- Tokens: light (default) ---------- */
:root,
.on-light {
  color-scheme: light;
  accent-color: var(--primary);

  --bg:            #f8fafc;
  --bg-2:          #f1f5f9;
  --surface:       #ffffff;
  --surface-2:     #f1f5f9;
  --border:        #e2e8f0;
  --border-strong: #cbd5e1;

  --text:      #0f172a;
  --text-soft: #334155;
  --muted:     #52637a;

  --primary:        #1e4f8a;   /* rich sapphire-cobalt (modernized from Spacelab #446e9b) */
  --primary-strong: #153b69;
  --accent:         #0f8a5f;   /* crisp emerald-teal */
  --kicker:         #0f766e;

  /* data colours (as used in the app's charts / KPI cards), text-safe on light */
  --c-blue:   #1d4ed8;
  --c-green:  #0f8a5f;
  --c-amber:  #b45309;
  --c-purple: #6d28d9;
  --c-red:    #be123c;
  --c-steel:  #1e4f8a;

  --ok:   #0f8a5f;
  --info: #1d4ed8;
  --warn: #b45309;
  --idle: #52637a;

  --gradient:      linear-gradient(100deg var(--in-oklch), #1e4f8a 0%, #0f8a5f 100%);
  --gradient-text: linear-gradient(100deg var(--in-oklch), #1d4ed8 0%, #0d9488 55%, #15803d 100%);
  --grid-line:     rgb(15 23 42 / 0.055);

  --btn-bg:    linear-gradient(180deg var(--in-oklab), #1e3a5f 0%, #11243e 100%);
  --btn-fg:    #ffffff;
  --btn-ring:  rgb(17 36 62 / 0.32);

  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.05), 0 4px 12px rgb(15 23 42 / 0.04);
  --shadow:    0 4px 8px -2px rgb(15 23 42 / 0.06), 0 22px 48px -16px rgb(15 23 42 / 0.18);
}

/* ---------- Tokens: dark bands (deep obsidian navy) ---------- */
.on-dark {
  color-scheme: dark;
  accent-color: var(--accent);

  --bg:            #0b1726;
  --bg-2:          #112236;
  --surface:       rgb(255 255 255 / 0.055);
  --surface-2:     rgb(255 255 255 / 0.1);
  --border:        rgb(255 255 255 / 0.12);
  --border-strong: rgb(255 255 255 / 0.22);

  --text:      #f8fafc;
  --text-soft: #cbd5e1;
  --muted:     #94a3b8;

  --primary:        #93c5fd;
  --primary-strong: #bfdbfe;
  --accent:         #34d399;
  --kicker:         #6ee7b7;

  --ok:   #34d399;
  --info: #93c5fd;
  --warn: #fcd34d;
  --idle: #94a3b8;

  --gradient:      linear-gradient(100deg var(--in-oklch), #93c5fd 0%, #34d399 100%);
  --gradient-text: linear-gradient(100deg var(--in-oklch), #93c5fd 0%, #6ee7b7 55%, #34d399 100%);
  --grid-line:     rgb(255 255 255 / 0.06);

  --btn-bg:    #ffffff;
  --btn-fg:    #0f172a;
  --btn-ring:  rgb(52 211 153 / 0.42);

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.35);
  --shadow:    0 30px 80px -24px rgb(0 0 0 / 0.75);

  background-color: var(--bg);
  color: var(--text);
}

:root {
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;

  --container: 1200px;
  --gutter:    clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(5rem, 11vw, 9rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  interpolate-size: allow-keywords;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 6rem;
  @media (prefers-reduced-motion: no-preference) { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-size-adjust: from-font;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 600; color: var(--text); }

::selection { background: rgb(30 79 138 / 0.18); color: var(--text); }
.on-dark ::selection { background: rgb(52 211 153 / 0.28); color: #ffffff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.mono  { font-family: var(--font-mono); font-size-adjust: from-font; letter-spacing: -0.01em; }
.muted { color: var(--muted); }

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.icon { width: 1.25em; height: 1.25em; flex: none; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-sm);
  &:focus { top: 1rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border: 1px solid transparent; /* keeps a visible edge in forced-colors mode */
  border-radius: 999px;
  font: 500 0.95rem/1 var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, translate 0.2s var(--ease-out), box-shadow 0.2s, filter 0.2s;

  .icon { width: 1em; height: 1em; transition: translate 0.2s var(--ease-out); }
  &:hover .icon { translate: 3px 0; }
}

.btn--sm { padding: 0.5rem 0.95rem; font-size: 0.875rem; }
.btn--lg { padding: 0.95rem 1.5rem; font-size: 1rem; }

.btn--primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.2), 0 8px 24px -8px var(--btn-ring);
  &:hover { translate: 0 -1px; filter: brightness(1.06); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25), 0 14px 34px -8px var(--btn-ring); }
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  &:hover { background: var(--surface-2); border-color: var(--primary); }
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.85rem var(--gutter) 0;
}

.nav-shell {
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: rgb(11 23 38 / 0.68);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

/* Header gets denser once the page scrolls (decorative, progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    @keyframes nav-solidify {
      to {
        background-color: rgb(11 23 38 / 0.92);
        border-color: var(--border-strong);
        box-shadow: 0 12px 40px -14px rgb(11 23 38 / 0.65);
      }
    }
    .nav-shell {
      animation: nav-solidify linear both;
      animation-timeline: scroll(root);
      animation-range: 0 160px;
    }
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.logo-mark { width: 34px; height: 34px; }
.brand__name { font-weight: 600; font-size: 1.1rem; letter-spacing: 0.04em; }
.brand__by {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  padding-left: 0.6rem;
  border-left: 1px solid var(--border-strong);
  @media (width < 560px) { display: none; }
}

.nav__list {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  scroll-target-group: auto;
}
.nav__sentinel {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  pointer-events: none;
}
.nav__link {
  display: block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-soft);
  transition: color 0.2s, background-color 0.2s;
  &:hover,
  &:is(:target-current, .\:target-current) {
    color: var(--text);
    background: var(--surface-2);
  }
}

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

.nav-mobile { position: relative; display: none; }
.nav-mobile__toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  list-style: none;
  &::-webkit-details-marker { display: none; }
}
.nav-mobile__close { display: none; }
.nav-mobile[open] .nav-mobile__open  { display: none; }
.nav-mobile[open] .nav-mobile__close { display: block; }
.nav-mobile__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.75rem);
  width: min(80vw, 300px);
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #1a3149;
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.6);
  a:not(.btn) { padding: 0.7rem 0.85rem; border-radius: var(--radius-sm); color: var(--text-soft); }
  a:not(.btn):hover { background: var(--surface-2); color: var(--text); }
  .btn { justify-content: center; margin-top: 0.5rem; }
}

@media (width < 900px) {
  .nav { display: none; }
  .nav-mobile { display: block; }
  .nav-actions > .btn { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(4rem, 10vw, 7.5rem);
  margin-top: -4.5rem;           /* slide under the floating header */
  padding-bottom: var(--section-y);
  overflow: clip;
  isolation: isolate;
  background:
    radial-gradient(120% 75% at 50% 0% var(--in-oklab), #1e3f66 0%, #112640 42%, var(--bg) 74%);
}
.hero__inner { position: relative; text-align: center; padding-top: 4.5rem; }

.hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 30%, transparent 75%);
}
.hero__aurora {
  position: absolute;
  inset: -20% -10% auto;
  height: 80%;
  background:
    radial-gradient(40% 50% at 25% 40%, rgb(59 130 246 / 0.32), transparent 70%),
    radial-gradient(35% 45% at 75% 35%, rgb(16 185 129 / 0.26), transparent 70%),
    radial-gradient(30% 40% at 50% 8%,  rgb(255 255 255 / 0.08), transparent 70%);
  filter: blur(40px);
  @media (prefers-reduced-motion: no-preference) {
    animation: aurora 18s ease-in-out infinite alternate;
  }
}
@keyframes aurora {
  from { transform: translate3d(-3%, 0, 0) scale(1); }
  to   { transform: translate3d(3%, 4%, 0) scale(1.08); }
}

.eyebrow-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.9rem 0.4rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-soft);
}

.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 12px var(--ok);
  &::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    @media (prefers-reduced-motion: no-preference) {
      animation: ping 2s var(--ease-out) infinite;
    }
  }
}
@keyframes ping {
  to { transform: scale(2.8); opacity: 0; }
}

.hero__title {
  margin-top: 1.75rem;
  font-size: clamp(2.6rem, 7.2vw, 5.6rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero__lede {
  max-width: 640px;
  margin: 1.75rem auto 0;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--text-soft);
  text-wrap: pretty;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.hero__proof {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.75rem;
  margin-top: 2.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  li { display: inline-flex; align-items: center; gap: 0.4rem; }
  .icon { color: var(--ok); width: 1rem; height: 1rem; }
}

/* ---------- Product preview (real app screenshot) ---------- */
.preview {
  position: relative;
  max-width: 1120px;
  margin: clamp(3.5rem, 8vw, 5.5rem) auto 0;
}
.preview__glow {
  position: absolute;
  inset: 12% 6% -8%;
  background: linear-gradient(100deg, #6d94bf, #198754);
  filter: blur(90px);
  opacity: 0.4;
  border-radius: 50%;
  z-index: -1;
}
.preview__window {
  border-radius: var(--radius-lg);
  border: 1px solid rgb(255 255 255 / 0.28);
  background: #ffffff;
  box-shadow: 0 0 0 8px rgb(255 255 255 / 0.06), 0 50px 120px -30px rgb(0 0 0 / 0.65);
  overflow: hidden;
}
.preview__bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #dee4eb;
  background: linear-gradient(180deg, #ffffff, #eef1f5);
  .dot { width: 10px; height: 10px; border-radius: 50%; background: #c5d0db; }
  .dot:nth-child(1) { background: #ff5f57; }
  .dot:nth-child(2) { background: #febc2e; }
  .dot:nth-child(3) { background: #28c840; }
}
.preview__url {
  margin-inline: auto;
  padding: 0.2rem 0.8rem;
  border-radius: 6px;
  border: 1px solid #dee4eb;
  background: #ffffff;
  font-size: 0.72rem;
  color: #627080;
}
.preview__img { width: 100%; height: auto; }

/* ---------- Zoom trigger & badge (lightbox affordance) ---------- */
.zoom-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: zoom-in;
}
.zoom-badge {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.22);
  background: rgb(19 37 57 / 0.82);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 16px -4px rgb(0 0 0 / 0.35);
  opacity: 0;
  translate: 0 4px;
  transition: opacity 0.2s, translate 0.2s var(--ease-out);
  pointer-events: none;
  .icon { width: 13px; height: 13px; }
}
.zoom-trigger:hover .zoom-badge,
.zoom-trigger:focus-visible .zoom-badge {
  opacity: 1;
  translate: 0 0;
}

/* Floating widgets cropped from the app, layered over the hero screenshot */
.float {
  position: absolute;
  padding: 6px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgb(255 255 255 / 0.7);
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.12), 0 30px 60px -20px rgb(10 25 45 / 0.55);
  img { width: 100%; height: auto; border-radius: 9px; }
}
.float--kpi   { top: 16%; right: -3%; width: clamp(190px, 21%, 250px); rotate: 1.5deg; }
.float--gauge { bottom: -14%; left: -3%; width: clamp(210px, 25%, 300px); rotate: -1.5deg; }
/* Phones/tablets: the widgets sit side by side under the screenshot instead of floating */
@media (width < 900px) {
  .preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: start;
  }
  .preview__window { grid-column: 1 / -1; }
  .float { position: static; width: auto; rotate: none; }
}

/* ---------- Analytics widget mosaic ---------- */
.mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}
.widget {
  --c: var(--c-steel);
  grid-column: span 2;
  display: grid;
  align-content: space-between;
  gap: 0.9rem;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid var(--border);
  border-top: 3px solid var(--c);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: translate 0.3s var(--ease-out), box-shadow 0.3s;
  &:hover { translate: 0 -3px; box-shadow: var(--shadow); }

  /* never upscale the (small) source crops by more than ~1.6× */
  img { width: 100%; max-width: calc(var(--w) * 1.6); height: auto; margin-inline: auto; }
  figcaption { font-size: 0.75rem; color: var(--muted); }
}
.widget--wide   { grid-column: span 3; }
.widget--green  { --c: var(--c-green); }
.widget--blue   { --c: var(--c-blue); }
.widget--amber  { --c: var(--c-amber); }
.widget--purple { --c: var(--c-purple); }
.widget--steel  { --c: var(--c-steel); }
@media (width < 960px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); }
  .widget, .widget--wide { grid-column: span 1; }
  .widget--wide { grid-column: 1 / -1; }
}
.mosaic__hint { display: none; margin: -0.25rem 0 0.75rem; font-size: 0.78rem; color: var(--muted); }
/* Phones: swipeable row instead of five stacked cards */
@media (width < 600px) {
  .mosaic {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 86%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    margin-inline: calc(-1 * var(--gutter));
    padding: 0.25rem var(--gutter) 1rem;
  }
  .widget, .widget--wide { grid-column: auto; scroll-snap-align: start; }
  .widget:hover { translate: none; }
  .mosaic__hint { display: block; }
}

/* ---------- Channels ---------- */
.channels {
  padding-block: 2.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.channels__label {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.integrations {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.integration {
  --c: var(--c-steel);
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-top: 3px solid var(--c);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.5;
  strong { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: 0.15rem; }
}
.integration__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  color: var(--c);
  background: color-mix(in oklab, var(--c) 11%, white);
  border: 1px solid color-mix(in oklab, var(--c) 24%, white);
  .icon { width: 20px; height: 20px; }
}
.integration--amber { --c: var(--c-amber); }
.integration--blue  { --c: var(--c-blue); }
.integration--steel { --c: var(--c-steel); }
@media (width < 860px) {
  .integrations { grid-template-columns: 1fr; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); position: relative; }
#analytics,
#how,
#security,
#faq,
#demo {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 600px;
}
.section--alt {
  background:
    radial-gradient(60% 50% at 50% 0%, rgb(68 110 155 / 0.08), transparent 70%),
    var(--bg-2);
  border-block: 1px solid var(--border);
}
.section.on-dark {
  background:
    radial-gradient(60% 60% at 80% 20%, rgb(25 135 84 / 0.16), transparent 70%),
    radial-gradient(50% 60% at 10% 90%, rgb(109 148 191 / 0.28), transparent 70%),
    var(--bg);
}

.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.kicker {
  font-size: 0.78rem;
  color: var(--kicker);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.section-title {
  margin-top: 1rem;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.section-lede {
  margin-top: 1.25rem;
  max-width: 560px;
  font-size: 1.1rem;
  color: var(--text-soft);
  text-wrap: pretty;
}

/* ---------- Bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.tile {
  --c: var(--c-steel);
  position: relative;
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-top: 3px solid var(--c);   /* echoes the app's KPI cards */
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.3s, translate 0.3s var(--ease-out);

  /* hairline gradient edge on hover */
  &::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--gradient);
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
  }
  &:hover { translate: 0 -3px; box-shadow: var(--shadow); }
  &:hover::before { opacity: 1; }

  h3 { margin-top: 1.25rem; font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; }
  p  { margin-top: 0.5rem; color: var(--text-soft); font-size: 0.97rem; }
}
.tile--wide { grid-column: span 2; }
.tile--blue   { --c: var(--c-blue); }
.tile--green  { --c: var(--c-green); }
.tile--amber  { --c: var(--c-amber); }
.tile--purple { --c: var(--c-purple); }
.tile--red    { --c: var(--c-red); }
.tile--steel  { --c: var(--c-steel); }
.tile--split {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: end;
}
.tile__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in oklab, var(--c) 11%, white);
  border: 1px solid color-mix(in oklab, var(--c) 24%, white);
  color: var(--c);
  .icon { width: 22px; height: 22px; }
}

.tile__shot {
  margin-top: 1.5rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  img { width: 100%; height: auto; border-radius: 6px; }
}
.spark { width: 100%; height: 140px; }

.syncs {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.75rem;
  font-size: 0.8rem;
  li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
  }
  .icon { width: 1rem; height: 1rem; color: var(--ok); flex-shrink: 0; }
}

.sync-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-soft);
  white-space: nowrap;
  &::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ok);
  }
}

/* ---------- Capabilities sub-grid (inside #platform) ---------- */
.capabilities {
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--border);
}
.capabilities__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.5rem;
}
.capabilities__lede {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-soft);
}
.capabilities__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.capability {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.55;
  strong {
    display: block;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.2rem;
    letter-spacing: -0.01em;
  }
}
.capability__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--primary);
  background: color-mix(in oklab, var(--primary) 10%, white);
  border: 1px solid color-mix(in oklab, var(--primary) 22%, white);
  .icon { width: 19px; height: 19px; }
}
@media (width < 960px) {
  .capabilities__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (width < 640px) {
  .capabilities__grid { grid-template-columns: 1fr; }
}

/* ---------- Cross-industry trust band (inside #how) ---------- */
.trust-band {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: clamp(2.5rem, 5vw, 3.75rem);
  border-top: 1px solid var(--border);
}
.trust-band__header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.25rem;
}
.trust-band__lede {
  margin-top: 0.65rem;
  color: var(--text-soft);
  font-size: 1.02rem;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.trust-card {
  padding: 1.65rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, border-color 0.25s;
}
.trust-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.trust-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  margin-bottom: 1.25rem;
  .icon { width: 22px; height: 22px; }
}
.trust-card h4 {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
}
.trust-card p {
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0;
}
@media (width < 860px) {
  .trust-grid { grid-template-columns: 1fr; }
}

@media (width < 960px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile--split { grid-template-columns: 1fr; }
}
@media (width < 640px) {
  .bento { grid-template-columns: 1fr; }
  .tile--wide { grid-column: auto; }
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  position: relative;
}
.step {
  position: relative;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  h3 { margin-top: 1.5rem; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; }
  p  { margin-top: 0.5rem; color: var(--text-soft); }
}
.step__num {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(180deg var(--in-oklab), #1e3a5f 0%, #11243e 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 6px 18px -6px rgb(17 36 62 / 0.5);
}
/* connector line between steps */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(2rem + 22px);
  left: calc(2rem + 56px);
  right: -1rem;
  height: 2px;
  background: linear-gradient(90deg var(--in-oklab), rgb(30 79 138 / 0.4), transparent);
}
@media (width < 860px) {
  .steps { grid-template-columns: 1fr; }
  .step:not(:last-child)::after { display: none; }
}

/* ---------- Split / security ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.checklist {
  display: grid;
  gap: 0.9rem;
  margin-top: 2rem;
  li { display: flex; gap: 0.85rem; align-items: flex-start; color: var(--text-soft); }
  .icon { color: var(--accent); margin-top: 0.15rem; }
}

.tenancy {
  position: relative;
  display: grid;
  gap: 1.25rem;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 60% at 50% 0%, rgb(109 148 191 / 0.18), transparent 70%),
    var(--bg-2);
}
.tenancy__core {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-soft);
  background: var(--surface);
  .logo-mark { width: 22px; height: 22px; }
}
.tenancy__ring {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  position: relative;
  padding-top: 1.25rem;
  /* fan-out lines from the control plane */
  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 1.25rem;
    border: 1px dashed var(--border-strong);
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
  }
}
.tenant {
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgb(19 37 57 / 0.75);
  font-size: 0.85rem;
  color: var(--text-soft);
  .icon { color: var(--muted); width: 20px; height: 20px; }
}
.tenant__meta { font-size: 0.7rem; color: var(--muted); }
.tenant--you {
  border-color: rgb(95 208 143 / 0.6);
  background: linear-gradient(135deg, rgb(25 135 84 / 0.22), rgb(68 110 155 / 0.2));
  color: var(--text);
  box-shadow: 0 0 40px -10px rgb(95 208 143 / 0.6);
  .icon { color: var(--accent); }
}
@media (width < 900px) {
  .split { grid-template-columns: 1fr; }
}

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 860px; }
.faq { display: grid; gap: 0.75rem; }
.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s;
  &[open] { border-color: var(--primary); }

  summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.4rem;
    font-weight: 500;
    font-size: 1.05rem;
    cursor: pointer;
    list-style: none;
    &::-webkit-details-marker { display: none; }
    .icon { color: var(--muted); transition: rotate 0.25s var(--ease-out), color 0.2s; }
  }
  &[open] summary .icon { rotate: 45deg; color: var(--primary); }
  &::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size 0.3s var(--ease-out), content-visibility 0.3s allow-discrete;
  }
  &[open]::details-content { block-size: auto; }
  p { padding: 0 1.4rem 1.3rem; color: var(--text-soft); }
}
@media (prefers-reduced-motion: reduce) {
  .faq__item::details-content { transition: none !important; }
}

/* ---------- CTA ---------- */
.cta {
  position: relative;
  padding: clamp(3rem, 8vw, 5.5rem) clamp(1.5rem, 5vw, 4rem);
  border-radius: calc(var(--radius-lg) + 8px);
  background:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    radial-gradient(120% 120% at 50% 0% var(--in-oklab), #1e3f66 0%, #112640 42%, var(--bg) 76%);
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 40px 80px -30px rgb(11 23 38 / 0.55);
}
.cta__glow {
  position: absolute;
  inset: auto 15% -60% 15%;
  height: 100%;
  background: linear-gradient(100deg, #6d94bf, #198754);
  filter: blur(90px);
  opacity: 0.5;
  z-index: -1;
}
.cta__title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-wrap: balance;
}
.cta__lede { margin-top: 1rem; font-size: 1.15rem; color: var(--text-soft); }

.cta__grid {
  display: grid;
  grid-template-columns: 1fr minmax(0, 460px);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.cta__pitch .cta__title { margin-top: 1rem; }
.cta__pitch .checklist { margin-top: 1.75rem; }
@media (width < 900px) {
  .cta__grid { grid-template-columns: 1fr; }
}

/* ---------- Demo request form ---------- */
.demo-card {
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 70px -30px rgb(0 0 0 / 0.6);
}
.demo-form { display: grid; gap: 1.1rem; }

.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.9rem; font-weight: 500; }
.field__req { color: var(--c-red); }
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 1px solid #9aa8b8;   /* ≥3:1 against white */
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 1rem;              /* ≥16px – prevents iOS zoom */
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea {
  resize: vertical;
  field-sizing: content;
  height: auto;
  min-block-size: 4lh;
  max-block-size: 10lh;
}
.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(68 110 155 / 0.3);
}

/* Errors: client-side only after interaction (:user-invalid), server-side via aria-invalid */
.field__error {
  display: none;
  margin: 0;
  font-size: 0.85rem;
  color: var(--c-red);
}
.field__error.is-server { display: block; }
.field :is(input, textarea):user-invalid,
.field :is(input, textarea)[aria-invalid="true"] {
  border-color: var(--c-red);
  background: #fdf0f1;
}
.field :is(input, textarea):user-invalid ~ .field__error.is-client { display: block; }
/* don't show the client message twice when the server already reported this field */
.field :is(input, textarea)[aria-invalid="true"] ~ .field__error.is-client { display: none; }

.demo-form__alert {
  margin: 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid color-mix(in oklab, var(--c-red) 40%, white);
  border-radius: var(--radius-sm);
  background: #fdf0f1;
  color: var(--c-red);
  font-size: 0.9rem;
}
.demo-form__submit { justify-content: center; width: 100%; }
.demo-form__submit:disabled { opacity: 0.7; cursor: progress; }
.demo-form__note { margin: 0; font-size: 0.8rem; color: var(--muted); }

/* Honeypot – visually hidden, never displayed */
.demo-form__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.demo-success {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  padding: 1.5rem 0.5rem;
  text-align: center;
  h3 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; }
  p { color: var(--text-soft); }
}
.demo-success__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--c-green);
  box-shadow: 0 10px 24px -8px rgb(25 135 84 / 0.6);
  .icon { width: 28px; height: 28px; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}
.footer-brand p { margin-top: 1rem; max-width: 340px; color: var(--muted); font-size: 0.92rem; }
.footer-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.6rem;
  a { color: var(--text-soft); font-size: 0.95rem; transition: color 0.2s; }
  a:hover { color: var(--text); }
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}
@media (width < 700px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- Lightbox modal (<dialog>) ---------- */
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgb(10 20 32 / 0.82);
  backdrop-filter: blur(6px);
}
.lightbox {
  max-width: min(94vw, 1360px);
  max-height: 90vh;
  margin: auto;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: #132539;
  color: var(--text);
  box-shadow: 0 40px 100px -20px rgb(0 0 0 / 0.75);
  overflow: auto;
}
.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: #1a3149;
}
.lightbox__caption {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.lightbox__close {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.15s;
  &:hover { background: rgb(255 255 255 / 0.18); }
  .icon { width: 15px; height: 15px; }
}
.lightbox__body {
  padding: 1rem;
  background: #ffffff;
  img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(90vh - 5.5rem);
    height: auto;
    margin-inline: auto;
    border-radius: var(--radius-sm);
  }
}

/* ---------- 404 ---------- */
.not-found {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  .code {
    font-family: var(--font-mono);
    font-size: clamp(5rem, 16vw, 10rem);
    font-weight: 500;
    line-height: 1;
  }
  .section-lede { margin-inline: auto; }
}

/* ---------- Scroll reveal (decorative, progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-up {
      from { opacity: 0; translate: 0 40px; scale: 0.98; }
    }
    .reveal {
      animation: reveal-up auto var(--ease-out) backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
  }
}

/* ---------- Forced colors (Windows High Contrast) ---------- */
@media (forced-colors: active) {
  .gradient-text { color: CanvasText; background: none; }
  .nav-shell, .tile, .step, .faq__item, .cta, .tenant, .kpi, .panel { border: 1px solid CanvasText; }
  .btn--primary { border-color: ButtonText; }
}
