/**
 * BizHub marketing multipage — Cartographic Quiet (J).
 *
 * Назначение: sticky nav, page heroes, value stepper, capability matrix,
 * FAQ accordion, reveal-on-scroll, figure frames, demo-stage сцены продукта.
 * Токены — из site.css (paper/forest/gold).
 *
 * Демо-модули (.demo-stage): inbox / smartlink / onboard / platforms /
 * opportunity / sites / ads / audit. Playback — marketing.js initDemos().
 * Интерактив: ★, Approve, строки platforms, Pause в ads; timeline .is-current.
 * data-demo="…|ads|audit". Статусы сцены — не marketing pills в hero.
 *
 * Анти-паттерны: pill-clusters в hero, purple, glow, emoji, oversized figures.
 * prefers-reduced-motion → статичный финальный кадр (см. @media ниже).
 * См. docs/DESIGN.md, docs/MARKETING-SITE.md.
 */

/* ——— Map texture: WebP default, PNG fallback ——— */
.site-shell::before,
.auth-page::before,
.review-page::before {
  background-image: url("/brand/map-texture.png");
  background-image: -webkit-image-set(
    url("/brand/map-texture-sm.webp") 1x,
    url("/brand/map-texture-lg.webp") 2x
  );
  background-image: image-set(
    url("/brand/map-texture-sm.webp") 1x,
    url("/brand/map-texture-lg.webp") 2x,
    url("/brand/map-texture.png") 1x
  );
}

@media (min-width: 901px) {
  .site-shell::before,
  .auth-page::before,
  .review-page::before {
    background-image: url("/brand/map-texture-lg.webp");
    background-image: image-set(
      url("/brand/map-texture-lg.webp") 1x,
      url("/brand/map-texture.png") 1x
    );
  }
}

/* Чуть тише карта — LCP/вес */
.site-shell::before { opacity: 0.78; }
.auth-page::before { opacity: 0.42; }
.review-page::before { opacity: 0.28; }

/* ——— Sticky marketing nav ——— */
.mkt-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(240, 239, 232, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out);
}

.mkt-nav.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(240, 239, 232, 0.96);
  box-shadow: 0 8px 24px rgba(29, 48, 39, 0.06);
}

.mkt-nav .nav {
  padding: 0.85rem 0;
}

.mkt-nav .nav-links a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--gold);
  padding-bottom: 0.15rem;
}

.mkt-nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.mkt-nav-toggle span {
  display: block;
  width: 1.1rem;
  height: 1.5px;
  background: var(--ink);
  position: relative;
}
.mkt-nav-toggle span::before,
.mkt-nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
}
.mkt-nav-toggle span::before { top: -5px; }
.mkt-nav-toggle span::after { top: 5px; }

.mkt-nav-panel {
  display: contents;
}

/* Inner marketing pages */
.mkt-page { min-height: 50vh; }

.section.forest .btn-ghost {
  border-color: rgba(232, 237, 232, 0.35);
  color: #e8ede8;
}
.section.forest .btn-ghost:hover {
  border-color: #e8ede8;
  background: rgba(232, 237, 232, 0.08);
}

/* ——— Page hero (inner pages, compact) ——— */
.page-hero {
  padding: 2.75rem 0 2.25rem;
  max-width: 40rem;
}

.page-hero .kicker {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 0.85rem;
  color: var(--ink);
}

.page-hero .lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 48ch;
}

.page-hero .hero-rule {
  margin-bottom: 1.15rem;
}

/* Home: chips out of first viewport — quiet text line below fold */
.platforms-line {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 52ch;
}
.platforms-line a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.platforms-line a:hover { color: var(--ink); }

/* ——— Value path stepper (not cards) ——— */
.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  margin-top: 0.5rem;
}

.stepper-item {
  padding: 1.35rem 1.15rem 0.25rem 0;
  border-right: 1px solid var(--line);
  position: relative;
}
.stepper-item:last-child { border-right: 0; padding-right: 0; }
.stepper-item:first-child { padding-left: 0; }

.stepper-num {
  display: block;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-deep);
  letter-spacing: 0.04em;
  margin-bottom: 0.55rem;
}

.stepper-item h3 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
}

.stepper-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 26ch;
}
.stepper-item .illu {
  margin-bottom: 0.65rem;
  opacity: 0.88;
}

/* Page hero: маленькая illu рядом с kicker */
.page-hero .map-vignette {
  margin-bottom: 0.35rem;
}
.page-hero .illu {
  width: 2.6rem;
  height: 2.6rem;
}

/* Benefit marks → pin instead of gold bar when .illu present */
.benefit .illu {
  width: 1.85rem;
  height: 1.85rem;
  margin-bottom: 0.55rem;
}

/* Contour: floating illu */
.contour-illu {
  float: right;
  margin: 0 0 0.75rem 1rem;
  width: 3.25rem;
  height: 3.25rem;
  opacity: 0.8;
}

/* ——— Split: text + figure ——— */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}
.split-flip { grid-template-columns: 0.95fr 1.05fr; }
.split-flip .figure-frame { margin-left: 0; margin-right: auto; }

.split-copy h2 { margin-top: 0; }
.split-copy .lead { margin-bottom: 1.25rem; }

/* Horizon wipe — тонкая золотая линия при появлении секции */
.horizon {
  position: relative;
}
.horizon::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--gold) 35%,
    var(--gold) 65%,
    transparent 100%
  );
  transform: scaleX(0.15);
  transform-origin: center;
  opacity: 0.55;
  transition: transform 0.85s var(--ease-out);
}
.horizon.is-in::before,
.horizon.reveal.is-in::before {
  transform: scaleX(1);
}

.split-points {
  list-style: none;
  margin: 0;
  padding: 0;
}
.split-points li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.15rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  border-top: 1px solid var(--line);
}
.split-points li:first-child { border-top: 0; }
.split-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 0.55rem;
  height: 2px;
  background: var(--gold);
}

/* ——— Cartographic illu (мелкие интерфейсные картинки) ———
 * SVG в /brand/illu/: pin, route, topo, card, inbox.
 * Встраиваются в figure, stepper, page-hero — не stock-фото.
 */
.illu {
  display: block;
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  color: var(--ink);
  opacity: 0.92;
}
.illu-sm { width: 2.25rem; height: 2.25rem; }
.illu-lg { width: 4.5rem; height: 4.5rem; }

.map-vignette {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1.25rem;
}
.map-vignette p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 36ch;
}

/* Product UI figure — inset + topo wash + map corner */
.figure-frame {
  position: relative;
  width: min(100%, 28rem);
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-elev);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    180deg,
    #000 0%,
    #000 72%,
    rgba(0, 0, 0, 0.35) 100%
  );
  mask-image: linear-gradient(
    180deg,
    #000 0%,
    #000 72%,
    rgba(0, 0, 0, 0.35) 100%
  );
}
.figure-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("/brand/illu/topo.svg");
  background-size: 140% auto;
  background-position: 60% 20%;
  background-repeat: no-repeat;
  opacity: 0.55;
  pointer-events: none;
}
.figure-frame::after {
  content: "";
  position: absolute;
  right: 0.65rem;
  top: 0.65rem;
  z-index: 2;
  width: 2.4rem;
  height: 2.4rem;
  background: url("/brand/illu/pin.svg") center / contain no-repeat;
  opacity: 0.85;
  pointer-events: none;
}
.figure-frame .ui-mock { position: relative; z-index: 1; }

.figure-frame figcaption {
  position: absolute;
  left: 0.85rem;
  bottom: 0.65rem;
  z-index: 2;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* CSS mock of overview — paper + лёгкая сетка карты */
.ui-mock {
  padding: 1rem 1rem 2.5rem;
  background:
    linear-gradient(180deg, rgba(246, 245, 239, 0.92) 0%, var(--surface-elev) 55%),
    linear-gradient(90deg, rgba(29, 48, 39, 0.035) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(29, 48, 39, 0.035) 1px, transparent 1px) 0 0 / 18px 18px,
    var(--surface);
  min-height: 14rem;
}

.ui-mock-bar {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.ui-mock-bar i {
  display: block;
  height: 0.45rem;
  border-radius: 2px;
  background: var(--line-strong);
}
.ui-mock-bar i:nth-child(1) { width: 3.2rem; background: var(--ink); }
.ui-mock-bar i:nth-child(2) { width: 2.4rem; }
.ui-mock-bar i:nth-child(3) { width: 2.8rem; }

.ui-mock-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.65rem;
}
.ui-mock-list {
  grid-template-columns: 1fr;
}
.ui-mock-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.65);
  min-height: 4.5rem;
}
.ui-mock-panel strong {
  display: block;
  font-family: var(--display);
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}
.ui-mock-panel span {
  display: block;
  height: 0.35rem;
  background: var(--gold-soft);
  border-radius: 2px;
  margin-top: 0.4rem;
  width: 70%;
}
.ui-mock-panel span:nth-of-type(2) { width: 45%; background: var(--line); }

/* ——— H6 pricing ——— */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0 3rem;
}
.pricing-card {
  padding: 1.35rem 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.pricing-illu {
  width: 2rem;
  height: 2rem;
  margin: 0;
  opacity: 0.88;
}
.pricing-card h2 {
  font-family: var(--display);
  font-size: 1.25rem;
  margin: 0;
}
.pricing-price {
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}
.pricing-price span {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
}
.pricing-blurb {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.pricing-card ul {
  margin: 0.25rem 0 0.75rem;
  padding-left: 1.1rem;
  flex: 1;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.pricing-card li { margin: 0.25rem 0; }
.pricing-card-hl {
  border-color: rgba(193, 163, 95, 0.55);
  box-shadow: var(--shadow-soft);
  background: linear-gradient(180deg, rgba(193, 163, 95, 0.1), var(--surface) 40%);
}
.pricing-badge {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 600;
}
.btn-block { display: block; text-align: center; width: 100%; }

/* ——— Contour blocks (product page) ——— */
.contour {
  padding: 2.25rem 0;
  border-top: 1px solid var(--line);
}
.contour:first-of-type { border-top: 0; padding-top: 0; }

.contour-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
}

.contour h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}
.contour p {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 42ch;
}
.contour .outcome {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-left: 2px solid var(--gold);
  padding-left: 0.75rem;
}

.flag-note {
  display: inline;
  font-size: 0.82rem;
  color: var(--muted);
}

.matrix-legend {
  margin: 0 0 1rem;
  font-size: 0.88rem;
}
.matrix-legend .leg-yes { color: var(--ok); font-weight: 600; }
.matrix-legend .leg-soft { color: var(--warn); font-weight: 600; }
.matrix-legend .leg-no { color: var(--muted); font-weight: 600; }

/* ——— Capability matrix ——— */
.matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-elev);
}

.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 640px;
}

.matrix th,
.matrix td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.matrix th {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.82rem;
  background: var(--bg-deep);
  color: var(--ink);
}

.matrix tr:last-child td { border-bottom: 0; }
.matrix td:first-child {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.matrix .mode {
  color: var(--muted);
  font-size: 0.85rem;
}

.matrix .yes { color: var(--ok); }
.matrix .soft { color: var(--warn); }
.matrix .no { color: var(--muted); }

/* Platform detail blocks + corner illu */
.plat-block {
  position: relative;
  padding: 1.75rem 3.5rem 1.75rem 0;
  border-top: 1px solid var(--line);
}
.plat-block .illu {
  position: absolute;
  right: 0;
  top: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  opacity: 0.75;
}
.plat-block h3 {
  font-family: var(--display);
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
}
.plat-block p {
  margin: 0;
  color: var(--muted);
  max-width: 54ch;
  font-size: 0.95rem;
}

/* ——— Timeline (how-it-works) ——— */
.timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--line);
}

.timeline li {
  position: relative;
  padding: 0 0 2rem 1.5rem;
  transition: opacity 0.35s var(--ease-out);
  opacity: 0.72;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li.is-current {
  opacity: 1;
}
.timeline li.is-current .t-num {
  color: var(--ink);
}
.timeline li.is-current .timeline-illu {
  box-shadow: 0 0 0 2px rgba(193, 163, 95, 0.45);
}

/* Cartographic step markers: SVG illu replaces gold dots. */
.timeline li::before { display: none; }
.timeline-illu {
  position: absolute;
  left: -0.15rem;
  top: 0.15rem;
  width: 1.85rem;
  height: 1.85rem;
  margin: 0;
  transform: translateX(-50%);
  background: var(--bg);
  border-radius: 50%;
  padding: 0.12rem;
  box-sizing: border-box;
  opacity: 0.95;
  z-index: 1;
}
.timeline .t-num {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-deep);
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.timeline h3 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 1.1rem;
}

.timeline p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 48ch;
}

.time-badge {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  border-top: 2px solid var(--gold);
  padding-top: 0.65rem;
}

/* ——— Audience scenarios (/for) ——— */
.scenario {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}
.scenario:first-of-type { border-top: 0; padding-top: 0; }
.scenario-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.scenario-illu {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  opacity: 0.9;
}
.scenario-next {
  margin: 1rem 0 0;
  font-size: 0.88rem;
}
.scenario-next a { text-decoration: underline; text-underline-offset: 2px; }

.scenario h3,
.scenario-head h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  margin: 0;
}

.scenario-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
}

.scenario-col h4 {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.scenario-col p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ——— Security list ——— */
.trust-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.trust-list li {
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}
.trust-list li:first-child { border-top: 0; }
.trust-list strong {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}
.trust-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 56ch;
}

/* ——— FAQ accordion ——— */
.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0.15rem 0;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  padding: 1rem 1.5rem 1rem 0;
  position: relative;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-deep);
  font-weight: 500;
  font-size: 1.25rem;
}
.faq details[open] summary::after { content: "−"; }

.faq details p {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 54ch;
  padding-right: 1.5rem;
}

/* ——— Reveal ——— */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ——— Footer marketing links ——— */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.footer-nav a { color: var(--ink-soft); }
.footer-nav a:hover { color: var(--ink); }

.footer .wrap-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
}

/* ——— Auth shell align ———
 * Полная ширина: бренд слева, тихие ссылки на marketing справа.
 * Не дублируем sticky mkt-nav — форма остаётся героем страницы.
 */
.auth-page .auth-top {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.1rem 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.auth-page .auth-top .brand { font-size: 1.05rem; }
.auth-page .auth-top .brand img {
  width: 32px;
  height: 32px;
}
.auth-top-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.auth-top-links a:hover { color: var(--ink); }
.auth-top-links .btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
}
@media (max-width: 520px) {
  .auth-top-links .hide-xs { display: none; }
}

/* Focus a11y */
.mkt-nav a:focus-visible,
.btn:focus-visible,
.faq summary:focus-visible,
.mkt-nav-toggle:focus-visible,
.demo-replay:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ——— Demo stages (product scenes, not screenshots) ———
 * HTML: .demo-stage[data-demo="inbox|smartlink|onboard|platforms|opportunity|sites|ads|audit"]
 * Playback: marketing.js initDemos() → data-frame + aria-live.
 * .demo-pill-status только внутри сцены (не hero pills).
 */
.demo-stage {
  position: relative;
  width: min(100%, 28rem);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(246, 245, 239, 0.95) 0%, var(--surface-elev) 60%),
    var(--surface-elev);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  padding: 0 0 0.85rem;
}
.demo-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/brand/illu/topo.svg");
  background-size: 130% auto;
  background-position: 70% 10%;
  background-repeat: no-repeat;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}
.demo-chrome,
.demo-body,
.demo-foot {
  position: relative;
  z-index: 1;
}
.demo-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(240, 239, 232, 0.65);
}
.demo-chrome-title {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.demo-pill-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-deep);
  border: 1px solid var(--gold-soft);
  background: rgba(193, 163, 95, 0.12);
  padding: 0.22rem 0.5rem;
  border-radius: 2px;
  white-space: nowrap;
}
.demo-pill-status::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}
.demo-stage.is-playing .demo-pill-status::before {
  animation: demo-pulse 1.4s var(--ease-out) infinite;
}
.demo-body {
  padding: 0.9rem 1rem 0.35rem;
  min-height: 11.5rem;
}
.demo-rows {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.demo-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.45);
  font-size: 0.86rem;
  color: var(--ink-soft);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out),
    border-color 0.35s var(--ease-out), background 0.35s var(--ease-out);
}
.demo-stage[data-frame] .demo-row.is-shown {
  opacity: 1;
  transform: none;
  animation: demo-slide-in 0.45s var(--ease-out);
}
.demo-row.is-active {
  border-color: var(--gold-soft);
  background: rgba(193, 163, 95, 0.1);
}
.demo-row strong {
  display: block;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.15rem;
}
.demo-meta {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.demo-stars {
  font-family: var(--display);
  font-size: 0.78rem;
  color: var(--gold-deep);
  letter-spacing: 0.06em;
  flex-shrink: 0;
  line-height: 1.4;
}
.demo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.35rem;
  padding: 0.35rem 0.7rem;
  font-family: var(--ui);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: default;
  transition: border-color 0.3s var(--ease-out), background 0.3s var(--ease-out),
    color 0.3s var(--ease-out);
}
.demo-btn.is-hot {
  border-color: var(--gold);
  background: rgba(193, 163, 95, 0.18);
  color: var(--ink);
}
.demo-btn.is-done {
  border-color: var(--forest);
  background: rgba(29, 48, 39, 0.08);
  color: var(--forest);
}
.demo-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 1rem 0;
  min-height: 2rem;
}
.demo-caption {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  max-width: 36ch;
  line-height: 1.35;
}
.demo-replay {
  flex-shrink: 0;
  margin: 0;
  padding: 0.3rem 0.55rem;
  font-family: var(--ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.demo-replay:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}
.demo-replay:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Smart-link demo */
.demo-stars-pick {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.demo-star-btn {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.5);
  font-family: var(--display);
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.3s var(--ease-out), background 0.3s var(--ease-out),
    color 0.3s var(--ease-out);
}
.demo-star-btn:hover,
.demo-star-btn:focus-visible {
  border-color: var(--gold);
  color: var(--ink);
  outline: none;
}
.demo-btn[role="button"] {
  cursor: pointer;
}
.demo-star-btn.is-on {
  border-color: var(--gold);
  background: rgba(193, 163, 95, 0.16);
  color: var(--gold-deep);
}
.demo-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8rem;
}
.demo-route-arrow {
  color: var(--gold-deep);
  font-weight: 600;
  opacity: 0.35;
  transition: opacity 0.35s var(--ease-out);
}
.demo-route.is-maps .demo-route-arrow,
.demo-route.is-private .demo-route-arrow {
  opacity: 1;
}
.demo-route-end {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.65rem;
  color: var(--muted);
  transition: border-color 0.35s var(--ease-out), background 0.35s var(--ease-out),
    color 0.35s var(--ease-out);
}
.demo-route.is-maps .demo-route-end--maps,
.demo-route.is-private .demo-route-end--private {
  border-color: var(--gold-soft);
  background: rgba(193, 163, 95, 0.12);
  color: var(--ink);
}

/* Onboard / progress */
.demo-progress {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}
.demo-progress-seg {
  flex: 1;
  height: 3px;
  background: var(--line);
  border-radius: 1px;
  overflow: hidden;
}
.demo-progress-seg > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width 0.45s var(--ease-out);
}
.demo-stage[data-frame="1"] .demo-progress-seg:nth-child(1) > i,
.demo-stage[data-frame="2"] .demo-progress-seg:nth-child(-n+2) > i,
.demo-stage[data-frame="3"] .demo-progress-seg:nth-child(-n+3) > i,
.demo-stage[data-frame="4"] .demo-progress-seg > i {
  width: 100%;
}
.demo-step-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.demo-step-list li {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  padding: 0.4rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
  opacity: 0.45;
  transition: opacity 0.35s var(--ease-out), color 0.35s var(--ease-out);
}
.demo-step-list li:first-child { border-top: 0; }
.demo-step-list .t-num {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold-deep);
  min-width: 1.5rem;
}
.demo-stage[data-frame="1"] .demo-step-list li:nth-child(1),
.demo-stage[data-frame="2"] .demo-step-list li:nth-child(-n+2),
.demo-stage[data-frame="3"] .demo-step-list li:nth-child(-n+3),
.demo-stage[data-frame="4"] .demo-step-list li {
  opacity: 1;
  color: var(--ink-soft);
}
.demo-stage[data-frame="1"] .demo-step-list li:nth-child(1),
.demo-stage[data-frame="2"] .demo-step-list li:nth-child(2),
.demo-stage[data-frame="3"] .demo-step-list li:nth-child(3),
.demo-stage[data-frame="4"] .demo-step-list li:nth-child(4) {
  color: var(--ink);
}

/* Platforms pulse rows */
.demo-plat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.25s var(--ease-out);
}
.demo-plat-row:first-child { border-top: 0; }
.demo-plat-row:hover,
.demo-plat-row:focus-visible {
  background: rgba(193, 163, 95, 0.1);
  outline: none;
}
.demo-plat-row.is-pulse {
  background: rgba(29, 48, 39, 0.04);
}
.demo-plat-mode {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.demo-plat-row.is-live .demo-plat-mode { color: var(--forest); }
.demo-plat-row.is-assist .demo-plat-mode { color: var(--gold-deep); }
.demo-plat-row.is-pulse .demo-plat-mode::before {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 0.05em;
  animation: demo-pulse 1.2s var(--ease-out) infinite;
}

/* Opportunity / sites chain */
.demo-chain {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.demo-chain-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  font-size: 0.84rem;
  color: var(--muted);
  opacity: 0.35;
  transform: translateX(-6px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out),
    border-color 0.35s var(--ease-out), color 0.35s var(--ease-out);
}
.demo-chain-item.is-shown {
  opacity: 1;
  transform: none;
  color: var(--ink-soft);
}
.demo-chain-item.is-active {
  border-color: var(--gold-soft);
  color: var(--ink);
}
.demo-chain-item strong {
  display: block;
  font-family: var(--display);
  font-size: 0.78rem;
  margin-bottom: 0.1rem;
  color: var(--ink);
}

/* Example callout + mini-cases (content scale, not cards-as-decoration) */
.example {
  margin: 0.85rem 0 0;
  padding: 0.65rem 0 0.15rem 0.85rem;
  border-left: 2px solid var(--gold);
  font-size: 0.9rem;
  color: var(--ink-soft);
  max-width: 48ch;
}
.example strong {
  display: block;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.mini-cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  margin-top: 1.25rem;
}
.mini-case {
  padding: 1.15rem 1.1rem 0.25rem 0;
  border-right: 1px solid var(--line);
}
.mini-case:last-child { border-right: 0; padding-right: 0; }
.mini-case:first-child { padding-left: 0; }
.mini-case h3 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
}
.mini-case p {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 32ch;
}
.mini-case a {
  font-size: 0.86rem;
  font-weight: 600;
}
.io-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0 0;
  border-top: 1px solid var(--line);
}
.io-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.io-table th,
.io-table td {
  text-align: left;
  padding: 0.75rem 0.85rem 0.75rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-soft);
}
.io-table th {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.io-table td:first-child,
.io-table th:first-child {
  width: 42%;
  color: var(--muted);
}
.plat-example {
  margin: 0.45rem 0 0;
  font-size: 0.86rem;
  color: var(--muted);
  max-width: 52ch;
}
.scenario-day {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 56ch;
}
.scenario-tasks {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
}
.scenario-tasks li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
.scenario-tasks li:first-child { border-top: 0; }
.scenario-tasks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 0.45rem;
  height: 2px;
  background: var(--gold);
}

/* Hero rule draw-in (once) + stepper stagger on reveal */
.hero .hero-rule,
.page-hero .hero-rule {
  transform-origin: left center;
  animation: hero-rule-draw 0.9s var(--ease-out) 1;
}
.stepper.is-in .stepper-item,
.stepper.reveal.is-in .stepper-item,
.reveal.is-in .stepper-item {
  animation: demo-slide-in 0.5s var(--ease-out) both;
}
.reveal.is-in .stepper-item:nth-child(1) { animation-delay: 0.05s; }
.reveal.is-in .stepper-item:nth-child(2) { animation-delay: 0.12s; }
.reveal.is-in .stepper-item:nth-child(3) { animation-delay: 0.19s; }
.reveal.is-in .stepper-item:nth-child(4) { animation-delay: 0.26s; }

.demo-stage-wrap {
  margin: 1.25rem 0 0;
}
.demo-stage-wrap .demo-stage { margin-left: 0; }
.demo-lede {
  margin: 0 0 0.35rem;
  max-width: 52ch;
}

/* Text map of demos — not cards, not pill-cluster */
.demo-tour {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.demo-tour li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.demo-tour a {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.demo-tour a:hover {
  border-bottom-color: var(--gold);
}
.demo-tour .muted {
  font-size: 0.8rem;
}

/* Sticky nav offset for in-page demo anchors */
#demo,
#demo-tour,
#reviews,
#catalog,
#opportunities,
#ads,
#sites,
#ads-demo,
#cases,
#path {
  scroll-margin-top: 5.5rem;
}

@keyframes demo-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}
@keyframes demo-slide-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes demo-progress {
  from { width: 0; }
  to { width: 100%; }
}
@keyframes hero-rule-draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ——— Reduced motion ——— */
@media (prefers-reduced-motion: reduce) {
  .site-shell::before { animation: none !important; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .horizon::before {
    transform: scaleX(1);
    transition: none;
  }
  .btn-primary:hover,
  .btn-gold:hover { transform: none; }
  .btn-primary:hover .btn-arrow,
  .btn-gold:hover .btn-arrow { transform: none; }
  html { scroll-behavior: auto; }
  .hero .hero-rule,
  .page-hero .hero-rule {
    animation: none !important;
    transform: none;
  }
  .reveal.is-in .stepper-item,
  .demo-stage.is-playing .demo-pill-status::before,
  .demo-plat-row.is-pulse .demo-plat-mode::before,
  .demo-stage[data-frame] .demo-row.is-shown {
    animation: none !important;
  }
  .demo-row,
  .demo-chain-item {
    transition: none;
    opacity: 1;
    transform: none;
  }
  .demo-stage.demo-reduced .demo-row,
  .demo-stage.demo-reduced .demo-chain-item {
    opacity: 1;
    transform: none;
  }
}

/* ——— Responsive ——— */
@media (max-width: 900px) {
  .mkt-nav-toggle { display: inline-flex; }

  .mkt-nav-panel {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 1.25rem 1.25rem;
    box-shadow: var(--shadow-soft);
  }
  .mkt-nav.is-open .mkt-nav-panel { display: block; }

  .mkt-nav-panel .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }
  .mkt-nav-panel .nav-links .hide-sm { display: inline; }

  .stepper { grid-template-columns: 1fr 1fr; }
  .stepper-item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 1.1rem 1rem 1.1rem 0;
  }
  .stepper-item:nth-child(odd) { padding-right: 1rem; }
  .stepper-item:nth-last-child(-n+2) { border-bottom: 0; }

  .split,
  .split-flip { grid-template-columns: 1fr; gap: 1.75rem; }
  .figure-frame,
  .split-flip .figure-frame { margin: 0 auto; width: 100%; }

  .contour-grid { grid-template-columns: 1fr; }
  .scenario-grid { grid-template-columns: 1fr; gap: 1rem; }
  .pricing-grid { grid-template-columns: 1fr; }
  .mini-cases { grid-template-columns: 1fr; }
  .mini-case {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
  }
  .mini-case:last-child { border-bottom: 0; }
}

@media (max-width: 560px) {
  .stepper { grid-template-columns: 1fr; }
  .stepper-item,
  .stepper-item:nth-child(odd) {
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
  }
  .stepper-item:last-child { border-bottom: 0; }

  .demo-stage {
    max-width: 100%;
  }
  .demo-chrome {
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .demo-route {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .demo-route-arrow {
    display: none;
  }
}
