/* ============================================
   APEXOS — WARM-PROSPECT DEMO / WALKTHROUGH PAGE
   ============================================
   Page-scoped styles for /demo. Consumes .compare-*,
   .roi-*, .pb-*, and .cert-* from their own stylesheets
   via `<%- include ... %>`. Only paints `.demo-*` classes
   so embedded blocks render identically to how they do on
   their standalone pages.
   ============================================ */

.demo-page {
  min-height: 100vh;
  background: var(--black);
}

/* ============================================================
   HERO + INLINE STEP RAIL
   ============================================================ */

.demo-hero {
  position: relative;
  padding: 96px 48px 80px;
  text-align: center;
  overflow: hidden;
}

.demo-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(245,166,35,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,166,35,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

.demo-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
}

.demo-tag {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--amber);
  margin-bottom: 24px;
}

.demo-headline {
  font-family: var(--font-head);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: 20px;
}

.demo-sub {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 640px;
  margin: 0 auto 40px;
}

/* The three-pill rail that sits inside the hero. Sticky on desktop so
   the "you are here" pill tracks the user's reading position; on mobile
   it falls back to a horizontally scrolling row. */
.demo-step-rail {
  margin: 0 auto;
  max-width: 880px;
}

.demo-step-rail-inner {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  position: sticky;
  top: 12px;
  z-index: 5;
}

.demo-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  background: var(--black-2);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: var(--font-head);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
}

.demo-step-pill:hover {
  background: var(--black-3);
  color: #ffffff;
  border-color: var(--amber-border);
}

.demo-step-pill-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--black-3);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 700;
  flex-shrink: 0;
}

.demo-step-pill-label {
  font-size: 13px;
  white-space: nowrap;
}

.demo-step-pill-active {
  background: var(--amber-dim);
  border-color: var(--amber-border);
  color: #ffffff;
}

.demo-step-pill-active .demo-step-pill-num {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--black);
}

/* ============================================================
   PER-STEP CONTAINERS
   ============================================================ */

.demo-step {
  padding: 80px 48px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  border-top: 1px solid var(--amber-border);
}

.demo-step-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Step intro band — small tag, mid-weight heading, muted body. */
.demo-step-band {
  text-align: left;
  max-width: 760px;
}

.demo-step-tag {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--amber);
  display: block;
  margin-bottom: 14px;
}

.demo-step-headline {
  font-family: var(--font-head);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 12px;
}

.demo-step-sub {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 640px;
  margin: 0;
}

/* The .compare-table-section layout lives in compare.css; this is just
   a slim wrapper modifier so the table sits inside the .demo-step-inner
   column and the "open the full comparison" link can hang beneath it. */
.demo-step-table {
  padding: 0;
  max-width: none;
  margin: 0;
}

/* Trailing "open the full X →" link inside step 1. */
.demo-step-link-out {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0;
}

.demo-step-link-out a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.15s, color 0.15s;
}

.demo-step-link-out a:hover {
  color: #ffffff;
  border-bottom-color: var(--amber);
}

/* Wrapper for the embedded certifications block in step 3 — visual
   separation from the procurement block above it. The .certifications
   partial paints its own .black-2 background + 100px vertical padding,
   so we leave breathing room above and let it bleed down into the next
   .demo-step gap normally. */
.demo-step-certifications {
  margin-top: 48px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 720px) {
  .demo-hero { padding: 64px 20px 56px; }
  .demo-step { padding: 56px 20px; }

  .demo-step-link-out { font-size: 12px; }

  /* On phones the rail prefers a horizontally scrollable row over
     sticky + wrap. Keeps each pill readable without truncating labels. */
  .demo-step-rail-inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    position: static;
  }

  .demo-step-pill {
    flex: 0 0 auto;
    padding: 9px 14px;
  }

  .demo-step-pill-label { font-size: 12px; }

  /* Stack the comparison table to single-column on phones — overrides
     the .compare-row grid markup with a one-column flow so the matrix
     remains readable. */
  .demo-step-table .compare-row {
    grid-template-columns: 1fr;
  }

  .demo-step-table .compare-dim {
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
  }

  .demo-step-table .compare-cell {
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 14px 16px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .demo-step-table .compare-cell-primary { background: var(--amber-dim); }

  .demo-step-certifications {
    margin-left: -20px;
    margin-right: -20px;
    margin-bottom: -56px;
  }
}
