/* ==========================================================================
   Components
   ========================================================================== */

/* --------------------------------------------------------------------------
   Header — mounted once, never re-rendered by the router
   -------------------------------------------------------------------------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

/* Three zones: brand, nav, actions. The outer two are equal-width tracks so
   the nav sits on the true centre line of the header rather than wherever the
   brand happens to end. */
.site-head__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Between the widest phone and a comfortable desktop the seven links get tight
   before they get unreadable. Tightening the tracking buys the room without
   dropping to the menu earlier than necessary. */
@media (min-width: 1081px) and (max-width: 1240px) {
  .site-head__inner { gap: 14px; }
  .site-nav { gap: 16px; }
  .site-head__end { gap: 12px; }
}

/* --------------------------------------------------------------------------
   The logo
   --------------------------------------------------------------------------
   Ink or Paper, never red — the guide is explicit, and `--logo-ground` is what
   makes the slice read as a cut rather than a stripe. Set the ground to whatever
   surface the logo is sitting on.
   -------------------------------------------------------------------------- */
.logo { display: block; height: auto; overflow: visible; }
.logo__word,
.logo__qualifier {
  font-family: var(--font-display);
  font-weight: 800;
}
.logo__qualifier {
  font-weight: 700;
  letter-spacing: 7px;          /* +30% of 26px, per the guide */
}

.logo--ink   .logo__word, .logo--ink   .logo__qualifier { fill: var(--ink); }
.logo--paper .logo__word, .logo--paper .logo__qualifier { fill: var(--paper); }
.logo--ink   .logo__slice { fill: var(--logo-ground, var(--paper)); }
.logo--paper .logo__slice { fill: var(--logo-ground, var(--ink)); }

.mark { display: block; }
.mark__letter { font-family: var(--font-display); font-weight: 800; }
.mark--ink   .mark__plate  { fill: var(--ink); }
.mark--ink   .mark__letter { fill: var(--paper); }
.mark--ink   .mark__slice  { fill: var(--ink); }
.mark--paper .mark__plate  { fill: var(--paper); }
.mark--paper .mark__letter { fill: var(--ink); }
.mark--paper .mark__slice  { fill: var(--paper); }

/* Clear space equal to the height of the "o" — the guide's rule, expressed as
   the padding nothing else may enter. */
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  justify-self: start;
  padding: .55em 0;
}
.lockup .mark { width: 26px; height: 26px; flex: none; }
.lockup .logo { width: 78px; flex: none; }
.lockup .mark, .lockup .logo { transition: opacity var(--dur) var(--ease); }
a:hover > .lockup .mark, a:hover > .lockup .logo { opacity: .72; }

@media (max-width: 480px) {
  .lockup .logo { width: 68px; }
  .lockup .mark { width: 24px; height: 24px; }
}


.site-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2vw, 30px);
  font-size: var(--t-meta);
}
.site-nav a {
  position: relative;
  color: var(--ink-body);
  padding-block: 22px;          /* full-height hit target, not a 13px line */
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 18px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a[aria-current='page'] { color: var(--ink); font-weight: 600; }
.site-nav a[aria-current='page']::after { transform: scaleX(1); }

/* The nav also carries a "Book a demo" for the mobile menu. On desktop that
   would be a second copy of the button already in the header, so it is hidden
   until the menu exists. */
.site-nav .btn { display: none; }

.site-head__end {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-head__account button {
  font-size: var(--t-fine);
  color: var(--ink-muted);
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}
.site-head__account button:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  margin-right: -10px;
  align-items: center; justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: background var(--dur) var(--ease);
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ''; position: absolute; left: 0;
  width: 18px; height: 1.5px; background: var(--ink);
  transition: transform var(--dur) var(--ease);
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after  { top:  5px; }
.nav-toggle[aria-expanded='true'] span { background: transparent; }
.nav-toggle[aria-expanded='true'] span::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] span::after  { transform: translateY(-5px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: var(--t-body);
  font-weight: 600;
  padding: 13px 26px;
  border: 1px solid transparent;
  text-align: center;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--solid { background: var(--ink); color: #fff; }
.btn--solid:hover { background: var(--accent); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--sm { padding: 9px 20px; font-size: .78125rem; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-row--center { justify-content: center; }

.link-arrow {
  font-size: var(--t-body);
  font-weight: 600;
  align-self: flex-start;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.link-arrow:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* --------------------------------------------------------------------------
   Stat band
   -------------------------------------------------------------------------- */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
/* The first figure lines up with the shell edge, so the band reads as part of
   the page rather than a separate slab. */
.stats__cell {
  padding: 30px 26px;
  border-right: 1px solid var(--line);
}
.stats__cell:first-child { padding-left: 0; }
.stats__cell:last-child  { padding-right: 0; border-right: 0; }
.stats__value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stats__label { font-size: var(--t-fine); color: var(--ink-muted); margin-top: 6px; }

@media (max-width: 860px) {
  .stats__inner { grid-template-columns: 1fr 1fr; }
  .stats__cell { padding: 22px 18px; }
  .stats__cell:nth-child(2n + 1) { padding-left: 0; }
  .stats__cell:nth-child(2n) { padding-right: 0; border-right: 0; }
  .stats__cell:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .stats__value { font-size: 1.75rem; }
}

/* --------------------------------------------------------------------------
   Index list — the "what we do" rows
   -------------------------------------------------------------------------- */
.rows { display: flex; flex-direction: column; }

.row {
  display: grid;
  grid-template-columns: 96px 1fr 1.2fr 40px;
  gap: 24px;
  align-items: center;
  padding: 26px 0;
  border-top: 1px solid var(--line-strong);
  transition: padding-inline var(--dur) var(--ease), background var(--dur) var(--ease);
}
.rows > .row:last-child { border-bottom: 1px solid var(--line-strong); }
a.row:hover { background: var(--wash); padding-inline: 16px; }
a.row:hover .row__cue { transform: translate(3px, -3px); color: var(--accent); }

.row__idx { font-family: var(--font-label); font-size: var(--t-meta); font-weight: 500; color: var(--accent); }
.row__idx--muted { color: var(--ink-muted); }
.row__name { font-family: var(--font-display); font-weight: 700; font-size: var(--t-card); letter-spacing: -.015em; }
.row__desc { font-size: var(--t-body); line-height: 1.55; color: var(--ink-body); }
.row__cue  { font-size: 1.125rem; color: var(--ink-muted); transition: transform var(--dur) var(--ease), color var(--dur) var(--ease); }

/* the "what it does" A/B/C/D rows */
.row--steps { grid-template-columns: 80px 1fr 1.4fr; align-items: baseline; padding: 22px 0; }
.row--steps .row__name { font-size: var(--t-sub); }

@media (max-width: 860px) {
  .row, .row--steps {
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    align-items: start;
  }
  .row__idx  { grid-row: 1; }
  .row__name { grid-row: 1; }
  .row__desc { grid-column: 2; }
  .row__cue  { display: none; }
  a.row:hover { padding-inline: 0; }
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  border: 1px solid var(--line-strong);
  padding: clamp(22px, 2.6vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--paper);
}
a.card { transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
a.card:hover { border-color: var(--ink); box-shadow: var(--lift-card); transform: translateY(-2px); }
.card__kicker {
  font-family: var(--font-label);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
.card__foot {
  font-family: var(--font-label);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Imaging figures + annotation overlays
   -------------------------------------------------------------------------- */
.figure {
  position: relative;
  display: flex;
  justify-content: center;
  overflow: hidden;
}
.figure--masked {
  -webkit-mask-image: radial-gradient(ellipse 82% 82% at 50% 50%, #000 52%, transparent 98%);
          mask-image: radial-gradient(ellipse 82% 82% at 50% 50%, #000 52%, transparent 98%);
}
.figure--framed {
  border: 1px solid var(--line);
  padding: 8px;
  box-shadow: var(--lift-panel);
  background: var(--paper);
}

.figure__tag {
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--font-label);
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
  background: rgba(15, 23, 42, .55);
  padding: 4px 8px;
}



.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.8s steps(1, end) infinite;
}
@keyframes blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .25; } }

/* --------------------------------------------------------------------------
   App chrome — the product screenshots on each product page
   -------------------------------------------------------------------------- */
.app {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  box-shadow: var(--lift-app);
}
.app__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.app__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--slate-200); flex: none; }
.app__url {
  margin-left: 14px;
  font-size: .6875rem;
  color: var(--ink-muted);
  background: var(--wash);
  border-radius: 6px;
  padding: 4px 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app__body { display: grid; grid-template-columns: 1fr 340px; }
.app__body--narrow { grid-template-columns: 1fr 320px; }
.app__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 320px;
}
.app__stage--lit {
  background: radial-gradient(ellipse at 50% 40%, #fff 0%, var(--slate-50) 75%);
  height: clamp(320px, 52vh, 500px);
}
.app__stage--dark { background: var(--imaging); padding: 0; height: 460px; overflow: hidden; }
.app__side {
  border-left: 1px solid var(--line-soft);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--panel);
}
.app__side-title { font-family: var(--font-display); font-weight: 700; font-size: .8125rem; letter-spacing: -.01em; }
.app__foot {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 18px;
  border-top: 1px solid var(--line-soft);
  font-size: .6875rem;
  color: var(--ink-muted);
}

@media (max-width: 900px) {
  .app__body, .app__body--narrow { grid-template-columns: 1fr; }
  .app__side { border-left: 0; border-top: 1px solid var(--line-soft); }
  .app__stage--dark { height: 300px; }
  .app__stage--lit { height: clamp(280px, 44vh, 360px); }
  .app__stage--survey { height: clamp(300px, 52vh, 420px); }
}

/* app-internal controls (rounded — distinct from the marketing surface) */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  border-radius: 99px;
  padding: 10px 16px;
  font-size: .75rem;
  font-weight: 600;
  transition: background var(--dur) var(--ease);
}
.pill:hover { background: var(--accent); }
.pill--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-control); }
.pill--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill--xs { padding: 3px 10px; font-size: .65625rem; }
.pill--sm { padding: 5px 12px; font-size: .65625rem; }
.pill--block { width: 100%; }
.pill[disabled] { opacity: .4; pointer-events: none; }

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  padding: 2px 8px;
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  background: var(--ink-muted);
  white-space: nowrap;
}
.tag--review { background: var(--status-review); }
.tag--mild   { background: var(--status-mild); }
.tag--ok     { background: var(--status-ok); }

.tile {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px;
  background: var(--paper);
  transition: border-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.tile--alert { border-color: var(--line-alert); background: var(--tint-alert); }
.tile--dark  { background: var(--ink); color: #fff; border-color: var(--ink); }
.tile--dark .fine { color: var(--ink-faint); }
.tile--muted { opacity: .5; }
.tile__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tile__name { font-size: .78125rem; font-weight: 600; }

.meter { height: 4px; border-radius: 99px; background: var(--slate-50); margin-top: 5px; overflow: hidden; }
.meter__fill { height: 100%; border-radius: 99px; background: var(--ink); transition: width 500ms var(--ease); }
.meter__fill--review { background: var(--status-review); }
.meter__fill--mild   { background: var(--status-mild); }
.meter__fill--ok     { background: var(--status-ok); }

.note {
  background: var(--wash);
  border-radius: 8px;
  padding: 12px;
  font-size: .71875rem;
  line-height: 1.5;
  color: var(--ink-body);
}
.note b { color: var(--ink); }

/* --------------------------------------------------------------------------
   Demo drawer — its own mount point, opens without touching the route view
   -------------------------------------------------------------------------- */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(460px, 100%);
  background: var(--paper);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--dur) var(--ease);
  box-shadow: -24px 0 60px rgba(15, 23, 42, .14);
}
.drawer.is-open { transform: none; }

.drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.drawer__body { padding: 22px var(--gutter); overflow-y: auto; flex: 1; }
.drawer__close { font-size: 1.5rem; line-height: 1; color: var(--ink-muted); padding: 4px 8px; }
.drawer__close:hover { color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field__label { font-size: var(--t-fine); font-weight: 600; }
.field__hint  { font-size: .6875rem; color: var(--ink-muted); }
.field input, .field select, .field textarea {
  border: 1px solid var(--line-control);
  background: var(--paper);
  padding: 11px 12px;
  font-size: var(--t-body);
  border-radius: 0;
  width: 100%;
  transition: border-color var(--dur) var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }
.field textarea { min-height: 84px; resize: vertical; }
.field--error input, .field--error select { border-color: var(--accent); }
.field__error { font-size: .6875rem; color: var(--accent); font-weight: 600; }

/* --------------------------------------------------------------------------
   Toast — mounts to its own root, never re-renders the page
   -------------------------------------------------------------------------- */
.toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: min(420px, calc(100vw - 32px));
}
.toast {
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  font-size: var(--t-meta);
  box-shadow: var(--lift-app);
  animation: toast-in 300ms var(--ease) both;
  width: 100%;
}
.toast--leaving { animation: toast-out 220ms var(--ease) both; }
@keyframes toast-in  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-foot {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 32px);
  flex-wrap: wrap;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: var(--t-fine);
  color: var(--ink-muted);
  max-width: var(--shell);
  margin-inline: auto;
}
.foot-logo { display: block; flex: none; }
.foot-logo .logo { width: 84px; }
.site-foot a:hover { color: var(--accent); }
.site-foot__end { margin-left: auto; }
@media (max-width: 620px) {
  .site-foot__end { margin-left: 0; width: 100%; }
}

/* --------------------------------------------------------------------------
   Mobile navigation
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .site-head__inner { grid-template-columns: 1fr auto; gap: 12px; }
  .nav-toggle { display: flex; }
  .site-head__end > .btn { display: none; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px var(--gutter) 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    box-shadow: 0 24px 40px rgba(15, 23, 42, .08);
  }
  .site-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }

  .site-nav a {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.0625rem;
    color: var(--ink);
  }
  .site-nav a::after { display: none; }
  .site-nav a[aria-current='page'] { color: var(--accent); }

  .site-nav .btn { display: inline-flex; margin-top: 20px; padding-block: 15px; }
}

/* --------------------------------------------------------------------------
   Small screens — spacing, tap targets, stacking
   -------------------------------------------------------------------------- */
@media (max-width: 560px) {
  .btn-row { gap: 10px; }
  .btn-row .btn { flex: 1 1 auto; min-width: 0; padding-inline: 18px; }
  .btn { padding-block: 15px; }

  .band-head { margin-bottom: 24px; row-gap: 6px; }
  .card { gap: 10px; }

  .drawer__head, .drawer__body { padding-inline: 20px; }
  .toasts { bottom: 16px; }
  .toast { font-size: var(--t-fine); padding: 11px 14px; }

  .site-foot { gap: 12px 18px; padding-block: 22px 28px; }
  .app__foot .pill { display: none; }
  .app__side { padding: 16px; }
  .app__stage { padding: 16px; min-height: 240px; }
  .site-foot__end { margin-left: 0; width: 100%; padding-top: 4px; }
}
