/* Travel & Package — feature showcase layout */

@keyframes jx-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes jx-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%      { transform: translate(-12px, 8px) rotate(3deg); }
}

/* ── Page shell ── */
body.ja-body:has(.jx-page) {
  background: #f1f5f9;
  min-height: 100vh;
}

body.ja-body:has(.jx-page) .jg-page-wrap {
  padding-top: 0 !important;
}

.jx-page {
  --jx-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --jx-gutter: clamp(16px, 4vw, 40px);
  --jx-nav: 0px;
  --jx-page-drop: 50px;
  --jx-accent: #2563eb;
  --jx-accent-soft: #eff6ff;
  --jx-accent-mid: #3b82f6;
  --jx-glow: rgba(37, 99, 235, 0.12);

  max-width: 1100px;
  margin: var(--jx-page-drop) auto 0;
  padding:
    calc(var(--jx-nav) + clamp(16px, 3vh, 32px))
    var(--jx-gutter)
    clamp(32px, 5vh, 56px);
  animation: jx-in 0.45s var(--jx-ease) both;
}

body.ja-body:not(.ja-embed):has(.jx-page) .jx-page {
  --jx-nav: var(--jg-nav-h, 64px);
}

.jx-page.jx-package {
  --jx-accent: #059669;
  --jx-accent-soft: #ecfdf5;
  --jx-accent-mid: #10b981;
  --jx-glow: rgba(5, 150, 105, 0.12);
}

/* ── Hero ── */
.jx-hero {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  padding: clamp(28px, 4vw, 40px) clamp(24px, 4vw, 36px);
  margin-bottom: clamp(20px, 3vh, 28px);
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #334155 100%);
  color: #fff;
  animation: jx-in 0.5s var(--jx-ease) both 0.05s;
}

.jx-page.jx-travel .jx-hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(59, 130, 246, 0.45) 0%, transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(99, 102, 241, 0.35) 0%, transparent 40%),
    linear-gradient(135deg, #0c1222 0%, #152238 50%, #1a2744 100%);
}

.jx-page.jx-package .jx-hero {
  background:
    radial-gradient(circle at 88% 15%, rgba(16, 185, 129, 0.4) 0%, transparent 42%),
    radial-gradient(circle at 8% 85%, rgba(245, 158, 11, 0.28) 0%, transparent 38%),
    linear-gradient(135deg, #0a1512 0%, #0f241c 50%, #142820 100%);
}

.jx-hero-mesh {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.jx-hero-icon {
  position: absolute;
  right: clamp(16px, 4vw, 32px);
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(4rem, 12vw, 7rem);
  opacity: 0.08;
  color: #fff;
  animation: jx-drift 12s ease-in-out infinite;
  pointer-events: none;
}

.jx-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.jx-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 14px;
}

.jx-hero h1 {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 0 0 10px;
}

.jx-hero p {
  margin: 0;
  font-size: clamp(0.88rem, 1.5vw, 0.98rem);
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

/* ── Platform features (compact strip) ── */
.jx-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(16px, 2.5vh, 22px);
  animation: jx-in 0.5s var(--jx-ease) both 0.1s;
}

.jx-feat {
  flex: 1 1 calc(25% - 8px);
  min-width: 120px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.04);
}

.jx-feat-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  flex-shrink: 0;
  background: var(--jx-accent-soft);
  color: var(--jx-accent);
}

.jx-feat-text strong {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.jx-feat-text span {
  display: block;
  font-size: 0.58rem;
  color: #94a3b8;
  line-height: 1.25;
}

/* ── Path cards ── */
.jx-paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 20px);
  margin-bottom: clamp(24px, 4vh, 36px);
  animation: jx-in 0.5s var(--jx-ease) both 0.15s;
}

.jx-path {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  transition: transform 0.28s var(--jx-ease), box-shadow 0.28s, border-color 0.28s;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .jx-path:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px var(--jx-glow);
    border-color: color-mix(in srgb, var(--jx-accent) 35%, #e2e8f0);
  }
}

.jx-path:focus-visible {
  outline: 3px solid var(--jx-accent);
  outline-offset: 2px;
}

.jx-path:active {
  transform: translateY(-2px);
}

.jx-path-bar {
  height: 5px;
  width: 100%;
}

.jx-path-a .jx-path-bar { background: linear-gradient(90deg, #3b82f6, #6366f1); }
.jx-path-b .jx-path-bar { background: linear-gradient(90deg, #8b5cf6, #a855f7); }
.jx-package .jx-path-a .jx-path-bar { background: linear-gradient(90deg, #10b981, #059669); }
.jx-package .jx-path-b .jx-path-bar { background: linear-gradient(90deg, #f59e0b, #d97706); }

.jx-path-body {
  padding: clamp(20px, 3vw, 26px);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.jx-path-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.jx-path-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.jx-path-a .jx-path-icon { background: #eff6ff; color: #2563eb; }
.jx-path-b .jx-path-icon { background: #f5f3ff; color: #7c3aed; }
.jx-package .jx-path-a .jx-path-icon { background: #ecfdf5; color: #059669; }
.jx-package .jx-path-b .jx-path-icon { background: #fffbeb; color: #d97706; }

.jx-path-meta h2 {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 0 0 4px;
  line-height: 1.2;
}

.jx-path-role {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--jx-accent);
}

.jx-path-desc {
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.55;
  margin: 0 0 16px;
}

.jx-path-feats {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.jx-path-feats li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.4;
}

.jx-path-feats li i {
  color: var(--jx-accent);
  font-size: 0.72rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.jx-path-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  border-radius: 12px;
  border: none;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  pointer-events: none;
  transition: filter 0.2s;
}

.jx-path-a .jx-path-cta { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.jx-path-b .jx-path-cta { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.jx-package .jx-path-a .jx-path-cta { background: linear-gradient(135deg, #10b981, #047857); }
.jx-package .jx-path-b .jx-path-cta { background: linear-gradient(135deg, #f59e0b, #c2410c); }

@media (hover: hover) {
  .jx-path:hover .jx-path-cta { filter: brightness(1.08); }
}

/* ── Journey flow (6 steps) ── */
.jx-steps-wrap {
  animation: jx-in 0.5s var(--jx-ease) both 0.2s;
}

.jx-steps-title {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0 0 14px;
}

.jx-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px 14px 16px;
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.05);
}

.jx-flow::before {
  content: '';
  position: absolute;
  top: 34px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, #e2e8f0, var(--jx-accent-mid), #e2e8f0);
  opacity: 0.45;
  z-index: 0;
}

.jx-flow-step {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 4px;
}

.jx-flow-num {
  width: 32px;
  height: 32px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  background: #fff;
  border: 2px solid var(--jx-accent);
  color: var(--jx-accent);
}

.jx-flow-step strong {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 0.68rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 3px;
}

.jx-flow-step span {
  display: block;
  font-size: 0.58rem;
  color: #94a3b8;
  line-height: 1.35;
}

/* Escrow info tooltip */
.jx-escrow-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.jx-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  background: var(--jx-accent-soft);
  color: var(--jx-accent);
  border-radius: 50%;
  font-size: 0.55rem;
  cursor: pointer;
  vertical-align: middle;
  flex-shrink: 0;
  transition: transform 0.15s, background 0.15s;
}

.jx-info-btn:hover {
  background: var(--jx-accent);
  color: #fff;
  transform: scale(1.1);
}

.jx-escrow-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: min(280px, 70vw);
  background: #1e293b;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.72rem;
  font-weight: 400;
  color: #94a3b8;
  line-height: 1.55;
  text-align: left;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.jx-escrow-tip strong {
  display: block;
  color: #f1f5f9;
  font-size: 0.74rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.jx-escrow-tip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #1e293b;
}

.jx-escrow-wrap.jx-tip-open .jx-escrow-tip,
.jx-escrow-wrap:hover .jx-escrow-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* legacy step classes kept for compat */
.jx-steps { display: none; }
.jx-step { display: none; }
.jx-step-num { display: none; }

/* ── Flow mask ── */
.sv-flow-mask {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sv-flow-mask.is-visible { display: flex; }

.sv-flow-message {
  background: #fff;
  border-radius: 16px;
  padding: 24px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.18);
  max-width: min(360px, 100%);
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .jx-features { flex-wrap: wrap; }
  .jx-feat { flex: 1 1 calc(50% - 8px); }
  .jx-flow {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 10px;
    padding: 16px 12px;
  }
  .jx-flow::before { display: none; }
}

@media (max-width: 640px) {
  .jx-paths { grid-template-columns: 1fr; }
  .jx-hero-icon { display: none; }
  .jx-feat { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .jx-flow { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 400px) {
  .jx-feat { flex: 1 1 100%; }
  .jx-flow { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .jx-page, .jx-hero, .jx-features, .jx-paths, .jx-steps-wrap, .jx-hero-icon, .jx-path {
    animation: none !important;
    transition: none !important;
  }
}
