/* ─────────────────────────────────────────────────────────────────
   CRO Block 9 — Process Timeline (token-bound, mobile-first)
   The original cro-timeline.css module is not loaded on the live
   page (Grav asset pipeline drops late addCss calls), so this file
   is the single source of truth for block 9 styling. Scoped under
   .block-cro-block-9 only.
   ───────────────────────────────────────────────────────────────── */

.block-cro-block-9 {
  font-family: var(--ds-font-body);
  color: var(--scheme-fg);
  background: var(--scheme-bg);
  overflow: hidden;
}

/* Section header */
.section.block-cro-block-9.light .section-header .section-tag,
.section.block-cro-block-9 .section-header .section-tag,
.block-cro-block-9 .section-header .section-tag,
.block-cro-block-9 .section-tag {
  display: inline-block;
  font-family: var(--ds-font-mono);
  font-size: var(--ds-fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ds-cta);
  background: color-mix(in srgb, var(--ds-cta) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--ds-cta) 30%, transparent);
  border-radius: 999px;
  padding: var(--ds-space-2) var(--ds-space-4);
  margin-bottom: var(--ds-space-3);
}
.section.block-cro-block-9 .section-header .section-title,
.section.block-cro-block-9.light .section-header .section-title,
.block-cro-block-9 .section-header h2,
.block-cro-block-9 .section-title {
  font-family: var(--ds-font-display);
  color: var(--scheme-fg);
}
.section.block-cro-block-9 .section-header .section-subtitle,
.section.block-cro-block-9.light .section-header .section-subtitle,
.block-cro-block-9 .section-subtitle {
  color: var(--scheme-fg-soft);
  font-size: var(--ds-fs-body-lg);
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
}

/* Container */
.block-cro-block-9 .horizontal-timeline-container {
  max-width: 1000px;
  margin: var(--ds-space-6) auto 0;
  position: relative;
}

/* Timeline node row */
.block-cro-block-9 .timeline-nodes {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 3;
  gap: var(--ds-space-2);
  padding: 0 var(--ds-space-2);
}
.block-cro-block-9 .timeline-nodes::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 32px;
  right: 32px;
  height: 2px;
  background: var(--ds-rule);
  z-index: 1;
}
.block-cro-block-9 .timeline-nodes::after {
  content: '';
  position: absolute;
  top: 22px;
  left: 32px;
  height: 2px;
  background: linear-gradient(90deg, var(--ds-trust), var(--ds-cta));
  z-index: 2;
  width: 0%;
  transition: width var(--ds-duration-slow) var(--ds-ease-out);
  border-radius: 2px;
}
.block-cro-block-9 .timeline-nodes[data-step="1"]::after { width: 0%; }
.block-cro-block-9 .timeline-nodes[data-step="2"]::after { width: 22%; }
.block-cro-block-9 .timeline-nodes[data-step="3"]::after { width: 47%; }
.block-cro-block-9 .timeline-nodes[data-step="4"]::after { width: 72%; }
.block-cro-block-9 .timeline-nodes[data-step="5"]::after { width: calc(100% - 64px); }

/* Individual node */
.block-cro-block-9 .timeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-align: center;
  flex: 1;
  position: relative;
  z-index: 4;
  transition: transform var(--ds-duration-fast) var(--ds-ease-out);
}
.block-cro-block-9 .timeline-node:hover { transform: translateY(-2px); }

.block-cro-block-9 .node-circle-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.block-cro-block-9 .node-circle {
  width: 44px;
  height: 44px;
  background: var(--scheme-card-bg);
  border: 2px solid var(--ds-rule);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ds-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ds-ink-mute);
  transition: all var(--ds-duration) var(--ds-ease-out);
  position: relative;
  z-index: 5;
  box-shadow: 0 0 0 4px var(--scheme-bg), var(--ds-shadow-sm);
}
.block-cro-block-9 .node-circle.has-icon { padding: 8px; }
.block-cro-block-9 .node-circle-svg {
  width: 20px;
  height: 20px;
  color: var(--ds-cta);
  stroke: var(--ds-cta);
  fill: none;
  stroke-width: 2;
}
.block-cro-block-9 .timeline-node.active .node-circle {
  border-color: var(--ds-cta);
  color: var(--ds-cta);
  box-shadow: 0 0 0 4px var(--scheme-bg),
              0 0 0 6px color-mix(in srgb, var(--ds-cta) 25%, transparent),
              var(--ds-shadow-md);
  transform: scale(1.08);
}
.block-cro-block-9 .timeline-node.completed .node-circle {
  border-color: var(--ds-trust);
  color: var(--ds-trust);
}
.block-cro-block-9 .timeline-node.completed .node-circle-svg {
  color: var(--ds-trust);
  stroke: var(--ds-trust);
}
.block-cro-block-9 .node-title {
  margin-top: var(--ds-space-3);
  font-family: var(--ds-font-mono);
  font-weight: 600;
  color: var(--ds-ink-mute);
  font-size: var(--ds-fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color var(--ds-duration) var(--ds-ease-out);
}
.block-cro-block-9 .timeline-node.active .node-title { color: var(--ds-cta); font-weight: 700; }
.block-cro-block-9 .timeline-node.completed .node-title { color: var(--ds-trust); }

/* Optional progress ring */
.block-cro-block-9 .node-circle-progress {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  transform: translate(-50%, -50%) rotate(-90deg);
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transition: opacity var(--ds-duration) var(--ds-ease-out);
}
.block-cro-block-9 .timeline-node.active .node-circle-progress { opacity: 1; }
.block-cro-block-9 .node-circle-progress svg { width: 100%; height: 100%; overflow: visible; }
.block-cro-block-9 .node-circle-progress .progress-track { fill: none; stroke: var(--ds-cta); stroke-opacity: 0.18; stroke-width: 2.5; }
.block-cro-block-9 .node-circle-progress .progress-fill { fill: none; stroke: var(--ds-cta); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 201; stroke-dashoffset: 201; }
.block-cro-block-9 .timeline-node.active .node-circle-progress .progress-fill {
  animation: croBlock9Progress 4s linear forwards;
}
@keyframes croBlock9Progress {
  0% { stroke-dashoffset: 201; }
  100% { stroke-dashoffset: 0; }
}

/* Content panes */
.block-cro-block-9 .timeline-content-panes {
  margin-top: var(--ds-space-6);
}
.block-cro-block-9 .timeline-pane {
  display: none;
  background: var(--scheme-card-bg);
  color: var(--scheme-card-fg);
  padding: var(--ds-space-6) var(--ds-space-5);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow-md);
  border-top: 4px solid var(--ds-cta);
  position: relative;
  overflow: hidden;
  animation: croBlock9PaneFade var(--ds-duration) var(--ds-ease-out);
}
.block-cro-block-9 .timeline-pane.active { display: block; }
@keyframes croBlock9PaneFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.block-cro-block-9 .pane-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ds-space-5);
  text-align: center;
  align-items: center;
}

/* Pane icon — CRITICAL: cap unconstrained SVG/IMG */
.block-cro-block-9 .pane-icon { display: flex; justify-content: center; }
.block-cro-block-9 .pane-icon-wrapper {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.block-cro-block-9 .pane-icon-inner {
  width: 64px;
  height: 64px;
  border-radius: var(--ds-radius);
  background: color-mix(in srgb, var(--ds-cta) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--ds-cta) 22%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--ds-duration) var(--ds-ease-out),
              box-shadow var(--ds-duration) var(--ds-ease-out);
}
.block-cro-block-9 .pane-icon-inner:hover {
  transform: translateY(-2px);
  box-shadow: var(--ds-shadow-md);
}
.block-cro-block-9 .pane-icon .timeline-svg-icon,
.block-cro-block-9 .pane-icon .icon-fallback,
.block-cro-block-9 .pane-icon .icon-fallback svg,
.block-cro-block-9 .pane-icon img,
.block-cro-block-9 .pane-icon svg {
  width: 32px;
  height: 32px;
  max-width: 32px;
  max-height: 32px;
  display: block;
  color: var(--ds-cta);
  stroke: var(--ds-cta);
}
/* Hard cap any descendant SVG/IMG inside the pane to prevent runaway sizing */
.block-cro-block-9 .timeline-pane svg,
.block-cro-block-9 .timeline-pane img {
  max-width: 100%;
  height: auto;
}

/* Text */
.block-cro-block-9 .pane-text h3 {
  font-family: var(--ds-font-display);
  font-size: var(--ds-fs-display-md);
  color: var(--ds-ink);
  margin: 0 0 var(--ds-space-3);
  letter-spacing: 0.005em;
  line-height: 1.15;
}
.block-cro-block-9 .pane-text p {
  font-size: var(--ds-fs-body);
  color: var(--ds-ink-soft);
  line-height: 1.65;
  margin: 0 0 var(--ds-space-4);
}

/* Highlight pill */
.block-cro-block-9 .pane-highlight,
.block-cro-block-9 .pane-highlight-link {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
  background: color-mix(in srgb, var(--ds-trust) 10%, transparent);
  color: var(--ds-trust);
  font-family: var(--ds-font-body);
  font-weight: 700;
  padding: var(--ds-space-2) var(--ds-space-4);
  border-radius: 999px;
  font-size: var(--ds-fs-body-sm);
  border: 1px solid color-mix(in srgb, var(--ds-trust) 28%, transparent);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--ds-duration) var(--ds-ease-out),
              border-color var(--ds-duration) var(--ds-ease-out),
              transform var(--ds-duration-fast) var(--ds-ease-out);
}
.block-cro-block-9 .pane-highlight-link:hover {
  background: color-mix(in srgb, var(--ds-trust) 18%, transparent);
  border-color: color-mix(in srgb, var(--ds-trust) 45%, transparent);
  transform: translateY(-1px);
}
.block-cro-block-9 .pane-highlight .highlight-svg-icon,
.block-cro-block-9 .pane-highlight-link .highlight-svg-icon,
.block-cro-block-9 .pane-highlight svg,
.block-cro-block-9 .pane-highlight img {
  width: 14px;
  height: 14px;
  max-width: 14px;
  max-height: 14px;
  flex-shrink: 0;
  color: var(--ds-trust);
  stroke: var(--ds-trust);
}
.block-cro-block-9 .pane-highlight-link .highlight-arrow {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.7;
  stroke: var(--ds-trust);
  transition: transform var(--ds-duration-fast) var(--ds-ease-out);
}
.block-cro-block-9 .pane-highlight-link:hover .highlight-arrow {
  transform: translateX(2px);
  opacity: 1;
}

/* CTA button (last step) */
.block-cro-block-9 .pane-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-2);
  background: var(--ds-cta);
  color: #fff;
  padding: var(--ds-space-3) var(--ds-space-5);
  border-radius: var(--ds-radius);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--ds-fs-body);
  margin-top: var(--ds-space-3);
  box-shadow: var(--ds-shadow-cta);
  transition: background var(--ds-duration) var(--ds-ease-out),
              transform var(--ds-duration-fast) var(--ds-ease-out);
}
.block-cro-block-9 .pane-cta:hover {
  background: var(--ds-cta-dk);
  color: #fff;
  transform: translateY(-1px);
}
.block-cro-block-9 .pane-cta::after {
  content: '→';
  font-size: 1em;
  transition: transform var(--ds-duration-fast) var(--ds-ease-out);
}
.block-cro-block-9 .pane-cta:hover::after { transform: translateX(3px); }

/* Tablet+ */
@media (min-width: 768px) {
  .block-cro-block-9 .timeline-pane {
    padding: var(--ds-space-7);
  }
  .block-cro-block-9 .pane-grid {
    grid-template-columns: 110px 1fr;
    text-align: left;
    align-items: flex-start;
    gap: var(--ds-space-6);
  }
  .block-cro-block-9 .pane-icon { justify-content: flex-start; }
  .block-cro-block-9 .pane-icon-wrapper { width: 96px; height: 96px; }
  .block-cro-block-9 .pane-icon-inner { width: 78px; height: 78px; }
  .block-cro-block-9 .pane-icon .timeline-svg-icon,
  .block-cro-block-9 .pane-icon .icon-fallback,
  .block-cro-block-9 .pane-icon img,
  .block-cro-block-9 .pane-icon svg {
    width: 38px; height: 38px; max-width: 38px; max-height: 38px;
  }
  .block-cro-block-9 .node-circle { width: 56px; height: 56px; font-size: 1.2rem; }
  .block-cro-block-9 .node-circle.has-icon { padding: 10px; }
  .block-cro-block-9 .node-circle-svg { width: 24px; height: 24px; }
  .block-cro-block-9 .node-circle-progress { width: 72px; height: 72px; }
  .block-cro-block-9 .timeline-nodes::before,
  .block-cro-block-9 .timeline-nodes::after {
    top: 28px;
    left: 40px;
    right: 40px;
  }
  .block-cro-block-9 .timeline-nodes[data-step="5"]::after { width: calc(100% - 80px); }
  .block-cro-block-9 .node-title { font-size: 0.78rem; }
  .block-cro-block-9 .pane-text h3 { font-size: 1.7rem; }
  .block-cro-block-9 .pane-text p { font-size: var(--ds-fs-body-lg); }
}

/* Mobile-only: tighten the node row so it fits 375 */
@media (max-width: 480px) {
  .block-cro-block-9 .timeline-nodes { gap: 0; padding: 0; }
  .block-cro-block-9 .node-circle { width: 38px; height: 38px; font-size: 0.95rem; }
  .block-cro-block-9 .node-circle.has-icon { padding: 6px; }
  .block-cro-block-9 .node-circle-svg { width: 16px; height: 16px; }
  .block-cro-block-9 .timeline-nodes::before,
  .block-cro-block-9 .timeline-nodes::after { top: 19px; left: 22px; right: 22px; }
  .block-cro-block-9 .node-title { font-size: 0.66rem; letter-spacing: 0.04em; }
  .block-cro-block-9 .timeline-pane { padding: var(--ds-space-5) var(--ds-space-4); }
  .block-cro-block-9 .pane-text h3 { font-size: 1.35rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .block-cro-block-9 *, .block-cro-block-9 *::before, .block-cro-block-9 *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
