/* App journey — full-bleed immersive walkthrough, no boxes */

.app-journey {
  position: relative;
  width: 100%;
  min-height: min(88vh, 780px);
  padding: 1.25rem 0 2rem;
  overflow: hidden;
}

/* Ambient layer — edge to edge */
.journey-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.journey-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
}

.journey-orb--gold {
  width: min(480px, 55vw);
  height: min(480px, 55vw);
  top: -140px;
  inset-inline-start: -100px;
  background: var(--glow-gold);
  animation: jOrbDrift 14s ease-in-out infinite alternate;
}

.journey-orb--green {
  width: min(400px, 45vw);
  height: min(400px, 45vw);
  bottom: -120px;
  inset-inline-end: -80px;
  background: var(--glow-green);
  animation: jOrbDrift 14s ease-in-out infinite alternate-reverse;
}

@keyframes jOrbDrift {
  from { transform: translate(0, 0); }
  to { transform: translate(40px, 24px); }
}

.journey-route {
  position: absolute;
  bottom: 18%;
  left: 0;
  width: 100%;
  height: 120px;
  opacity: 0.35;
}

.journey-route-line {
  animation: routeDash 20s linear infinite;
}

@keyframes routeDash {
  to { stroke-dashoffset: -200; }
}

.j-float {
  position: absolute;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
  animation: jFloat 8s ease-in-out infinite;
}

.j-float--1 { width: 80px; height: 80px; top: 20%; inset-inline-end: 12%; animation-delay: 0s; }
.j-float--2 { width: 48px; height: 48px; top: 55%; inset-inline-start: 8%; animation-delay: -2s; border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.j-float--3 { width: 24px; height: 24px; top: 30%; inset-inline-start: 45%; animation-delay: -4s; background: color-mix(in srgb, var(--gold) 15%, transparent); }

@keyframes jFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
  50% { transform: translateY(-16px) rotate(8deg); opacity: 0.9; }
}

/* Header — open, centered */
.journey-head {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
  margin: 0 auto 1.5rem;
  padding: 0 1.25rem;
}

.journey-headline {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: clamp(0.92rem, 2vw, 1.05rem);
}

/* Stage */
.journey-stage {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.journey-slides {
  position: relative;
  min-height: clamp(420px, 52vh, 520px);
}

.journey-slide {
  position: absolute;
  inset: 0;
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px);
  transition: opacity 0.65s ease, transform 0.65s ease, visibility 0.65s;
}

html[dir="rtl"] .journey-slide {
  transform: translateX(-24px);
}

.journey-slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  z-index: 2;
  pointer-events: auto;
}

.journey-slide:not(.active) {
  pointer-events: none;
  z-index: 0;
}

/* Narrative — no card, pure typography */
.journey-narrative {
  max-width: 540px;
}

.journey-icon-ring {
  position: relative;
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  color: var(--gold-light);
}

.journey-icon-ring::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed color-mix(in srgb, var(--gold) 40%, transparent);
  animation: ringSpin 12s linear infinite;
}

@keyframes ringSpin {
  to { transform: rotate(360deg); }
}

.journey-icon-ring svg {
  width: 100%;
  height: 100%;
}

.journey-step-num {
  position: absolute;
  bottom: -4px;
  inset-inline-end: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--primary-btn-fg);
  background: var(--gold);
}

.journey-kicker {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.journey-narrative h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.65rem, 3.8vw, 2.65rem);
  font-weight: 900;
  line-height: 1.15;
}

.journey-narrative > p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.journey-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: grid;
  gap: 0.55rem;
}

.journey-features li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(10px);
}

.journey-slide.active .journey-features li {
  animation: featIn 0.5s ease forwards;
}

.journey-slide.active .journey-features li:nth-child(1) { animation-delay: 0.15s; }
.journey-slide.active .journey-features li:nth-child(2) { animation-delay: 0.28s; }
.journey-slide.active .journey-features li:nth-child(3) { animation-delay: 0.41s; }

@keyframes featIn {
  to { opacity: 1; transform: translateY(0); }
}

.jf-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--gold-light);
}

.jf-icon svg {
  width: 18px;
  height: 18px;
}

.journey-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* App preview — floats open, bleeds to edge */
.journey-app {
  position: relative;
  margin-inline-end: calc(-1 * clamp(0px, 4vw, 60px));
}

.journey-app::before {
  content: "";
  position: absolute;
  inset: -15% -5% -5%;
  background: radial-gradient(circle at 50% 50%, var(--glow-gold), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.journey-app > [data-preview] {
  position: relative;
  z-index: 1;
}

.journey-app .app-window {
  border: 1px solid color-mix(in srgb, var(--gold) 18%, var(--border2));
  box-shadow: var(--shadow);
  background: var(--card);
  animation: appDrift 7s ease-in-out infinite;
}

.journey-app .system-flow--vertical {
  min-height: auto;
  padding: 0.75rem 1rem 1rem;
  border: none;
  border-radius: 0;
  background: transparent;
}

.journey-app .system-flow--vertical .system-node {
  width: 100%;
  max-width: 280px;
}

.journey-app .system-flow--vertical .system-arrow--down {
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.1rem 0;
}

/* System architecture pipeline — step 1 preview */
.sys-pipeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  padding: 0.35rem 0.15rem;
}

.sys-step {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border2);
  background: var(--card);
}

.sys-step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 900;
  background: var(--surface-muted);
  color: var(--text-muted);
  flex-shrink: 0;
}

.sys-step-body {
  min-width: 0;
}

.sys-step-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
}

.sys-step-desc {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.sys-step-tag {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  border-radius: 5px;
  background: var(--surface-muted);
  color: var(--text-muted2);
  white-space: nowrap;
}

.sys-step--ai {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--border2));
  background: var(--badge-gold-bg);
}

.sys-step--ai .sys-step-num {
  background: var(--gold);
  color: var(--primary-btn-fg);
}

.sys-step--ai .sys-step-tag {
  background: color-mix(in srgb, var(--gold) 20%, transparent);
  color: var(--gold-light);
}

.sys-step--mt5 {
  border-color: color-mix(in srgb, var(--green) 45%, var(--border2));
  background: var(--badge-green-bg);
}

.sys-step--mt5 .sys-step-num {
  background: var(--green);
  color: var(--bg);
}

.sys-step--mt5 .sys-step-tag {
  background: color-mix(in srgb, var(--green) 18%, transparent);
  color: var(--green);
}

.sys-link {
  display: flex;
  align-items: center;
  padding-inline-start: 1.45rem;
  height: 16px;
}

.sys-link-line {
  display: block;
  width: 2px;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-light), color-mix(in srgb, var(--gold) 25%, transparent));
}

.journey-app .app-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Floating callouts removed — caused overlap with previews */
.journey-callout {
  display: none;
}

@keyframes appDrift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Active slide UI animations */
.journey-slide.active [data-preview="system"] .sys-link-line {
  animation: flowPulse 1.2s ease-in-out infinite;
}

.journey-slide.active [data-preview="ai"] .app-progress span {
  animation: barGrow 2s ease forwards;
}

.journey-slide.active [data-preview="dashboard"] .app-signal-card {
  animation: signalPop 0.55s ease 0.35s both;
}

.journey-slide.active [data-preview="mt5"] .app-btn-primary {
  animation: btnPulse 1.5s ease-in-out infinite;
}

.journey-slide.active [data-preview="risk"] .app-progress span {
  animation: barGrow 2.5s ease forwards;
}

@keyframes flowPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; color: var(--gold-light); }
}

@keyframes barGrow {
  from { width: 0 !important; }
}

@keyframes signalPop {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 35%, transparent); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

/* Bottom rail — minimal dots, no box */
.journey-rail {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 1.75rem auto 0;
  padding: 0 1.25rem;
}

.journey-rail-line {
  height: 2px;
  background: var(--border2);
  border-radius: 999px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.journey-rail-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: inherit;
  transition: width 0.12s linear;
}

.journey-rail-steps {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
}

.journey-dot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.journey-dot span:last-child {
  font-size: 0.65rem;
  font-weight: 700;
  white-space: nowrap;
}

.j-dot-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border2);
  background: transparent;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.j-dot-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}

.journey-dot:hover .j-dot-icon,
.journey-dot.active .j-dot-icon {
  border-color: var(--gold);
  background: var(--badge-gold-bg);
  color: var(--gold-light);
  transform: scale(1.08);
}

.journey-dot.active {
  color: var(--gold-light);
}

@media (min-width: 900px) {
  .journey-slide {
    grid-template-columns: 0.95fr 1.05fr;
  }
}

@media (max-width: 899px) {
  .journey-slides {
    min-height: clamp(520px, 70vh, 640px);
  }

  .journey-slide {
    grid-template-columns: 1fr;
    align-content: start;
    overflow-y: auto;
    padding-bottom: 1rem;
  }

  .journey-app {
    margin-inline: 0;
  }

  .journey-narrative {
    order: 2;
  }

  .journey-app {
    order: 1;
    margin-bottom: 0.5rem;
  }

  .journey-dot span:last-child {
    display: none;
  }
}
