/* =============================================================================
   Rex! — marketing site styles
   Drafting-sheet aesthetic: cream paper, ink, terracotta accent.
   ============================================================================= */

:root {
  --paper: #FFFFFF;
  --paper-2: #F7F6F2;
  --paper-3: #ECE9E0;
  --ink: #15140F;
  --ink-2: #4A463E;
  --ink-3: #8A857A;
  --rule: #D9D5CA;
  --rule-soft: #E6E2D6;
  --accent: oklch(0.54 0.10 18);
  --accent-soft: oklch(0.54 0.05 18 / 0.18);

  --display: 'SF Pro Display', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'SF Pro Display', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;

  --content: 1320px;
  /* Page-wide horizontal margin. Every section uses this for its left/right
     inset (header, hero, carousel, workflow, footer) so the page stays
     uniformly guttered. */
  --gutter: max(40px, calc((100vw - var(--content)) / 2));
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
html { background: var(--paper); }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--paper); }

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.mono {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-feature-settings: 'tnum' 1;
  color: var(--ink-3);
}

.dot {
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--ink);
  border-radius: 50%;
  margin: 0 8px;
  opacity: 0.4;
  vertical-align: middle;
}

em { font-style: italic; }

/* =============================================================================
   HEADER
   ============================================================================= */
.hdr {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hdr--over {
  position: absolute;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: var(--paper);
  width: 100%;
}
.hdr--over .hdr__nav a { color: var(--paper); }
.hdr--over .hdr__cta { border-color: var(--paper); background: transparent; color: var(--paper); }
.hdr--over .hdr__cta:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.hdr__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hdr__logo img {
  width: 26px; height: 30px;
  object-fit: contain;
  display: block;
}
.hdr__wordmark {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.hdr__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.hdr__nav a {
  opacity: 0.85;
  transition: opacity 0.15s;
}
.hdr__nav a:hover { opacity: 1; }
.hdr__cta {
  opacity: 1 !important;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.hdr__cta:hover { background: var(--accent); border-color: var(--accent); }

/* =============================================================================
   HERO — full-bleed warehouse with stacked cycling words + big rex wordmark
   ============================================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 120px var(--gutter) 72px;
  overflow: hidden;
  isolation: isolate;
  color: var(--paper);
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  display: block;
}
.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15,14,11,0.55) 0%, rgba(15,14,11,0.45) 40%, rgba(15,14,11,0.65) 100%);
  z-index: 1;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: center;
  width: 100%;
  margin: 0;
  min-height: calc(100vh - 192px);
}

.hero__left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* WORD CYCLE — stacked list with base opacity gradient, current one highlighted */
.wc {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.wc__item {
  color: rgba(255,255,255,0.85);
  transition: color 0.45s ease, transform 0.45s ease, opacity 0.45s ease;
  transform: translateX(0);
}
/* base gradient: top items faded, bottom items brighter */
.wc__item:nth-child(1) { opacity: 0.18; }
.wc__item:nth-child(2) { opacity: 0.32; }
.wc__item:nth-child(3) { opacity: 0.50; }
.wc__item:nth-child(4) { opacity: 0.70; }
.wc__item:nth-child(5) { opacity: 0.90; }
/* the currently-cycling word is the accent red */
.wc__item--on {
  color: var(--accent) !important;
  opacity: 1 !important;
  transform: translateX(6px);
}

.hero__wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(80px, 12vw, 160px);
  line-height: 0.85;
  letter-spacing: -0.06em;
  margin: 18px 0 28px;
  color: var(--paper);
}

.hero__lede {
  font-size: 15px;
  line-height: 1.55;
  max-width: 480px;
  color: rgba(255,255,255,0.78);
  margin: 0 0 28px;
}

.hero__actions {
  display: flex;
  gap: 12px;
}
/* "Talk to the team" CTA — thicker red outline at rest, fills accent on hover */
.hero__actions .btn--primary {
  border-color: var(--accent);
  border-width: 2px;
  /* Trim padding by 1px so the button's outer size doesn't grow with the
     thicker border. */
  padding: 15px 21px;
}

/* MASCOT — dino with speech bubble (right side) */
.hero__mascot {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-direction: row-reverse;
  margin-bottom: 32px;
}
.hero__dino-img {
  width: 200px;
  height: auto;
  display: block;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  flex: none;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.4));
}

/* SPEECH BUBBLE */
.bubble {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: 14px 18px;
  max-width: 240px;
  border-radius: 2px;
  animation: bubble-float 4.5s ease-in-out infinite;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.bubble__text {
  margin: 0;
  font-family: var(--display);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}
.bubble__text strong {
  color: var(--accent);
  font-weight: 600;
}
.bubble__tail {
  position: absolute;
  top: 50%;
  right: -8px;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 10px solid var(--paper);
}
@keyframes bubble-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* ghost button variant for use on dark backgrounds — light fill, dark text */
.btn--ghost-on-dark {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.btn--ghost-on-dark:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* =============================================================================
   TEAM BAR — founders + company logos, sits between hero and carousel
   ============================================================================= */
.team-bar {
  padding: 56px var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.team-bar__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.team-bar__row {
  display: flex;
  align-items: center;
  gap: 32px;
}
.team-bar__founders {
  display: flex;
  align-items: center;
  gap: 16px;
}
.team-bar__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  object-fit: cover;
  display: block;
}
.team-bar__logos {
  display: flex;
  align-items: center;
  gap: 32px;
}
.team-bar__divider {
  width: 1px;
  height: 48px;
  background: var(--rule);
  flex: none;
}
.team-bar__logo {
  height: 36px;
  width: auto;
  display: block;
  color: var(--ink);
}
@media (max-width: 720px) {
  .team-bar__inner {
    flex-wrap: wrap;
    gap: 24px;
  }
}

/* =============================================================================
   PROBLEM — market context section
   ============================================================================= */
.problem {
  padding: 80px var(--gutter);
  background: var(--paper);
}
.problem__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.problem__h {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0;
}
.problem__h em {
  font-style: italic;
  font-weight: 300;
  color: var(--ink-2);
}
.problem__body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0;
}
.problem__stat {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.problem__stat-n {
  font-family: var(--display);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
}
.problem__stat-label {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.5;
}
@media (max-width: 720px) {
  .problem__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* =============================================================================
   CAROUSEL — slide deck of rex output diagrams (between hero & workflow)
   ============================================================================= */
.carousel {
  padding: 96px var(--gutter);
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
}
.carousel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 32px;
}
.carousel__stage {
  display: flex;
  align-items: center;
  gap: 20px;
}
/* frame wraps the image + the caption beneath it */
.carousel__frame {
  flex: 1;
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
/* fixed 16:9 stage — images fill it edge-to-edge (cover), no letterboxing */
.carousel__track {
  position: relative;
  width: 100%;
  border: 1px solid var(--ink);
  background: var(--ink);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.carousel__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
}
.carousel__img--on {
  opacity: 1;
  visibility: visible;
}
/* caption sits below the image */
.carousel__cap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 2px 0;
}
.carousel__cap-tag { color: var(--accent); }
.carousel__cap-title {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.carousel__arrow {
  flex: none;
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.carousel__arrow:hover {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}
.carousel__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.carousel__dot {
  width: 9px; height: 9px;
  padding: 0;
  border: 1px solid var(--ink);
  background: transparent;
  border-radius: 50%;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.carousel__dot:hover { transform: scale(1.2); }
.carousel__dot--on {
  background: var(--accent);
  border-color: var(--accent);
}

/* =============================================================================
   BUTTONS
   ============================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--ink);
  border-radius: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
  white-space: nowrap;
}
.btn--lg { padding: 16px 22px; font-size: 15px; }
.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* =============================================================================
   REV MARK (revision triangle)
   ============================================================================= */
.rev-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
}
.rev-mark__n {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  font-size: 9px;
  padding-top: 4px;
  font-weight: 600;
}

/* =============================================================================
   SECTION HEAD
   ============================================================================= */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 56px;
}
.section-head__l { display: flex; align-items: center; }

.h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(36px, 4.8vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 48px;
  text-wrap: pretty;
}
.h2 em { color: var(--ink-2); font-style: italic; font-weight: 300; }

.lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 640px;
  margin: 0 0 48px;
}

/* =============================================================================
   REVIEW SECTION (plan + UI panel)
   ============================================================================= */
.review {
  padding: 96px var(--gutter);
  background: var(--paper);
}

.review__board {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(440px, 1fr);
  gap: 24px;
  align-items: stretch;
}

.review__plan {
  display: flex;
}

/* ---------- UPLOADER (left of review) ---------- */
.uploader {
  position: relative;
  width: 100%;
  min-height: 520px;
  border: 1px dashed var(--ink);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  overflow: hidden;
}
.uploader::before {
  content: '';
  position: absolute;
  inset: 12px;
  background-image:
    linear-gradient(to right, var(--rule-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule-soft) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.7;
  pointer-events: none;
}
.uploader.is-over {
  background: var(--paper-2);
  border-color: var(--accent);
}
.uploader.is-loaded {
  border-style: solid;
  cursor: default;
  background: var(--ink);
}
.uploader.is-loaded::before { display: none; }
.uploader__img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: contain;
  background: var(--ink);
}
.uploader__chip {
  position: absolute;
  top: 12px; right: 12px;
  padding: 6px 10px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  cursor: pointer;
  z-index: 2;
  transition: background 0.12s, color 0.12s;
}
.uploader__chip:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }

.uploader__empty {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.uploader__title {
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin-top: 12px;
}
.uploader__sub {
  opacity: 0.65;
  font-size: 11px;
}
.uploader__hint {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: 10px;
  opacity: 0.5;
  width: 100%;
  max-width: 280px;
}

/* ---------- DOSSIER (dark site information card) ---------- */
.dossier {
  background: #15140F;
  color: #F1ECE2;
  border: 1px solid #15140F;
  display: flex;
  flex-direction: column;
  width: 100%;
  font-size: 13px;
}
.dossier__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(241, 236, 226, 0.1);
}
.dossier__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--accent);
  color: #F1ECE2;
  font-size: 10px;
  letter-spacing: 0.06em;
  position: relative;
}
.dossier__status::before {
  content: '';
  width: 6px; height: 6px;
  background: #F1ECE2;
  border-radius: 50%;
  animation: dossier-blink 1.6s ease-in-out infinite;
}
@keyframes dossier-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.dossier__est { opacity: 0.6; font-size: 11px; }
.dossier__est-v { color: var(--accent); opacity: 1; margin-left: 4px; }

.dossier__map {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.dossier__hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid rgba(241, 236, 226, 0.1);
  border-bottom: 1px solid rgba(241, 236, 226, 0.1);
  font-size: 11px;
}
.dossier__hdr-r {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
}

.dossier__rows {
  list-style: none;
  margin: 0; padding: 0;
}
.dossier__row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 16px;
  padding: 12px 18px;
  align-items: center;
  border-bottom: 1px solid rgba(241, 236, 226, 0.06);
  transition: background 0.12s;
}
.dossier__row:hover { background: rgba(241, 236, 226, 0.03); }
.dossier__code { opacity: 0.95; }
.dossier__name { opacity: 0.6; font-size: 10.5px; }
.dossier__n {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: -0.025em;
  font-weight: 500;
  opacity: 0.95;
}

.dossier__meta {
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dossier__metarow {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
}
.dossier__metarow > span:last-child {
  color: #F1ECE2;
  opacity: 0.9;
  letter-spacing: -0.01em;
}

/* legacy plan-frame retained (unused in this view but kept for ref) */
.plan-frame {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 20px;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.plan-svg {
  width: 100%;
  height: auto;
  display: block;
  flex: 1;
  min-height: 0;
}
.plan-frame__caption {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}

.callout .callout__leader {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: draw 0.8s var(--draw-delay, 0ms) ease-out forwards;
}
[data-reveal]:not(.is-in) .callout .callout__leader { animation: none; }
.callout.is-active circle:first-of-type { transition: r 0.15s; }

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

/* UI panel */
.review__panel { display: flex; }
.ui-panel {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  width: 100%;
  font-size: 14px;
  --rule: rgba(241, 236, 226, 0.14);
}
.ui-panel__hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(241, 236, 226, 0.14);
}
.ui-panel__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 35%, transparent);
}
.ui-panel__tabs {
  display: flex;
  gap: 0;
  padding: 0 16px;
  border-bottom: 1px solid rgba(241, 236, 226, 0.14);
}
.tab {
  padding: 12px 14px 12px 0;
  margin-right: 18px;
  opacity: 0.55;
  position: relative;
  cursor: default;
}
.tab em { font-style: normal; opacity: 0.7; margin-left: 4px; }
.tab--active { opacity: 1; }
.tab--active::after {
  content: '';
  position: absolute;
  left: 0; right: 18px;
  bottom: -1px;
  height: 1px;
  background: var(--accent);
}

.ui-panel__summary {
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 18px 16px;
}
.ui-panel__summary .sumcell {
  display: flex; flex-direction: column; gap: 4px; flex: 1;
}
.sumcell__n {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.03em;
  line-height: 1;
  font-weight: 500;
}
.ui-panel__summary > div + div { /* dividers */ }
.ui-panel__summary > [style*='width: 1px'] { background: rgba(241,236,226,0.14) !important; }

.issue-list {
  list-style: none;
  margin: 0; padding: 0;
  flex: 1;
  overflow-y: auto;
  max-height: 360px;
}
.issue {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(241, 236, 226, 0.08);
  cursor: pointer;
  transition: background 0.12s;
}
.issue:hover { background: rgba(241, 236, 226, 0.04); }
.issue--active {
  background: rgba(241, 236, 226, 0.06);
  box-shadow: inset 2px 0 0 var(--accent);
}
.issue__id {
  color: var(--paper);
  opacity: 0.5;
  padding-top: 2px;
}
.issue--active .issue__id { opacity: 1; color: var(--accent); }
.issue__row1 {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.issue__msg {
  font-size: 14px;
  line-height: 1.5;
  color: var(--paper);
  opacity: 0.92;
}
.issue__meta {
  margin-top: 6px;
  opacity: 0.45;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border: 1px solid currentColor;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pill--critical { color: var(--accent); }
.pill--warn { color: #E0C77B; }
.pill--info { color: #8FB8C7; }

.ui-panel__ft {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  opacity: 0.55;
}

/* =============================================================================
   HOW IT WORKS
   ============================================================================= */
.how {
  padding: 96px var(--gutter);
  background: var(--paper);
}

/* WORKFLOW — 4 numbered info cards, agent step accented */
.how {
  padding: 96px var(--gutter);
  background: var(--paper);
}
.how__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 56px;
}

.wsteps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.wstep {
  position: relative;
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  background: var(--paper);
  color: var(--ink);
  transition: background 0.18s ease;
}
.wstep + .wstep { border-left: 1px solid var(--rule); }
.wstep:hover { background: var(--paper-2); }

/* Agent step — filled accent card */
.wstep--accent {
  background: var(--accent);
  color: var(--paper);
}
.wstep--accent:hover { background: var(--accent); }
.wstep--accent .wstep__tag,
.wstep--accent .wstep__body { color: rgba(255,255,255,0.85); }
.wstep--accent + .wstep,
.wstep + .wstep--accent { border-left-color: transparent; }

.wstep__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}
.wstep__n {
  font-family: var(--display);
  font-size: 36px;
  letter-spacing: -0.04em;
  font-weight: 600;
  line-height: 1;
}
.wstep__tag { color: var(--ink-3); }
.wstep__icon {
  width: 60px;
  height: 60px;
  margin-bottom: 22px;
}
.wstep__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 10px;
}
.wstep__body {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.55;
}
.wstep__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  align-self: flex-start;
  padding: 5px 10px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--paper);
  font-size: 10px;
}
.wstep__pill-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--paper);
  animation: dossier-blink 1.6s ease-in-out infinite;
}

/* Flow diagram (legacy / unused) */
.flow-wrap {
  background: var(--paper);
  padding: 0;
  overflow-x: auto;
}
.flow-svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 1100px;
}
.flow-box {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  padding: 6px 10px;
  box-sizing: border-box;
}
.flow-box--accent { color: var(--paper); }
.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--ink);
  background: var(--paper);
}
.step {
  padding: 24px;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  min-height: 360px;
}
.step:last-child { border-right: none; }
.step__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.step__n {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.03em;
  text-transform: none;
  font-weight: 500;
}
.step__tag { opacity: 0.5; }
.step__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 16px 0 12px;
}
.step__body {
  margin: 0 0 24px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.55;
}
.step__diag {
  margin-top: auto;
  height: 80px;
  border-top: 1px dashed var(--rule);
  padding-top: 16px;
}

/* =============================================================================
   FGI COVERAGE
   ============================================================================= */
.fgi {
  padding: 96px var(--gutter);
  background: var(--paper);
}
.coverage {
  border: 1px solid var(--ink);
  background: var(--paper);
}
.coverage__head,
.coverage__row {
  display: grid;
  grid-template-columns: 120px 1.1fr 1.6fr 220px;
  gap: 24px;
  padding: 16px 24px;
  align-items: center;
}
.coverage__head {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid var(--ink);
}
.coverage__row {
  border-bottom: 1px solid var(--rule);
  transition: background 0.12s;
}
.coverage__row:last-child { border-bottom: none; }
.coverage__row:hover { background: var(--paper-2); }
.coverage__code { font-size: 12px; }
.coverage__name {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -0.015em;
}
.coverage__items { color: var(--ink-2); font-size: 10.5px; }
.coverage__pct {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}
.coverage__bar {
  flex: 1;
  height: 6px;
  background: var(--paper-3);
  position: relative;
  max-width: 140px;
}
.coverage__bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s 0.2s cubic-bezier(.22,.61,.36,1);
}
.is-in .coverage__bar > span { transform: scaleX(1); }

.coverage__note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  color: var(--ink-2);
  font-family: var(--body);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  max-width: 760px;
}
.coverage__note > span:not(.rev-mark) { line-height: 1.5; }
.coverage__note .rev-mark { flex: none; }

/* =============================================================================
   TITLE BLOCK (drafting motif)
   ============================================================================= */
.title-block {
  border: 1px solid var(--ink);
  background: var(--paper);
  display: grid;
  grid-template-rows: auto auto auto;
}
.tb--sm { font-size: 12px; }
.tb__row {
  display: grid;
  grid-template-columns: 80px 1fr;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  align-items: center;
}
.tb__head {
  background: var(--ink);
  color: var(--paper);
  --rule: rgba(241,236,226,0.2);
}
.tb__head .mono { color: var(--paper); }
.tb__title {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: -0.025em;
  line-height: 1.2;
  font-weight: 500;
}
.tb__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.tb__cell {
  display: grid;
  grid-template-columns: 70px 1fr;
  padding: 10px 14px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  align-items: center;
}
.tb__cell:nth-child(2n) { border-right: none; }
.tb__cell:nth-last-child(-n+2) { border-bottom: none; }

/* =============================================================================
   TALK / CTA
   ============================================================================= */
.talk {
  padding: 120px var(--gutter);
  background: var(--paper);
}
.talk__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: stretch;
}
.talk__l { align-self: center; }
.talk__r { display: flex; flex-direction: column; }
.talk__fig { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.talk__fig-frame {
  position: relative;
  background: var(--paper);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.talk__fig-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.15) contrast(1.05);
}
.talk__fig-cap {
  display: flex; gap: 12px; align-items: center;
  padding-top: 8px;
}
.talk__actions {
  display: flex;
  gap: 12px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.contact-card {
  margin-top: 16px;
  border: 1px solid var(--ink);
  background: var(--paper);
}
.contact-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
  align-items: center;
}
.contact-row:last-child { border-bottom: none; }

/* =============================================================================
   BOTTOM CTA — dark market section with call to action
   ============================================================================= */
.bottom-cta {
  padding: 80px var(--gutter);
  background: var(--ink);
  color: var(--paper);
}
.bottom-cta__kicker {
  color: var(--accent);
  margin-bottom: 20px;
}
.bottom-cta__h {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}
.bottom-cta__h em {
  font-style: italic;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
}
.bottom-cta__body {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.6);
  max-width: 520px;
}
.bottom-cta__btn {
  margin-top: 28px;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
.bottom-cta__btn:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
/* =============================================================================
   FOOTER (Capture-Lab style — brand | socials)
   ============================================================================= */
.ftr--min {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px var(--gutter);
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid rgba(241, 236, 226, 0.15);
}
.ftr__wordmark-sm {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.ftr__socials {
  display: flex;
  align-items: center;
  gap: 20px;
}
.ftr__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  opacity: 0.45;
  transition: opacity 0.15s;
}
.ftr__social-link:hover {
  opacity: 1;
}
.ftr__social-link svg {
  width: 18px;
  height: 18px;
  display: block;
}
.ftr__right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.ftr__right a {
  opacity: 0.45;
  transition: opacity 0.15s;
}
.ftr__right a:hover { opacity: 1; }

/* =============================================================================
   FOOTER (legacy)
   ============================================================================= */
.ftr {
  background: var(--ink);
  color: var(--paper);
  padding: 56px var(--gutter) 0;
  --rule: rgba(241,236,226,0.18);
}
.ftr__row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  padding-bottom: 48px;
}
.ftr__l {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 360px;
}
.ftr__wordmark {
  font-family: var(--display);
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}
.ftr__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.ftr__cols > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ftr__cols a {
  color: var(--paper);
  opacity: 0.7;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--body);
  font-size: 14px;
  transition: opacity 0.15s;
}
.ftr__cols a:hover { opacity: 1; color: var(--accent); }
.ftr__strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  opacity: 0.5;
  flex-wrap: wrap;
  gap: 16px;
}

/* =============================================================================
   ENTRANCE REVEAL
   ============================================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(.22,.61,.36,1);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Hero is the entry section — fade it sooner */
.hero { transition: none; }

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 1100px) {
  .review__board { grid-template-columns: 1fr; }
  .hero__inner { grid-template-columns: 1fr; align-items: start; gap: 32px; }
  .hero__mascot { order: -1; align-self: flex-end; margin-bottom: 0; }
  .hero__wordmark { font-size: clamp(100px, 22vw, 180px); }
  .wsteps { grid-template-columns: repeat(2, 1fr); }
  .wstep + .wstep { border-left: none; }
  .wstep:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .wstep:nth-child(2n) { border-left: 1px solid var(--rule); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step { border-right: none; border-bottom: 1px solid var(--rule); }
  .step:nth-child(odd) { border-right: 1px solid var(--rule); }
  .coverage__head, .coverage__row { grid-template-columns: 90px 1fr; gap: 12px; }
  .coverage__items, .coverage__head > :nth-child(3) { display: none; }
  .coverage__pct { grid-column: 2; }
  .talk__inner { grid-template-columns: 1fr; gap: 48px; }
  .ftr__row { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 720px) {
  :root { --gutter: 18px; }
  .hdr__nav a:not(.hdr__cta) { display: none; }
  .hero { padding: 100px var(--gutter) 56px; min-height: 0; }
  .hero__wordmark { font-size: 92px; margin: 12px 0 20px; }
  .hero__dino-img { width: 110px; }
  .bubble { max-width: 180px; padding: 10px 12px; }
  .bubble__text { font-size: 12px; }
  .bubble__tail { right: -7px; border-left-width: 9px; }
  .wc { font-size: 22px; }
  .carousel { padding: 64px var(--gutter); }
  .carousel__arrow { width: 36px; height: 36px; }
  .carousel__stage { gap: 8px; }
  .wsteps { grid-template-columns: 1fr; }
  .wstep + .wstep { border-left: none; border-top: 1px solid var(--rule); }
  .wstep:nth-child(2n) { border-left: none; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: none !important; border-bottom: 1px solid var(--rule); }
  .h2 { font-size: 36px; }
  .talk { padding: 80px var(--gutter); }
}
