/* TREK Train journey demo (merged from the 3D booking-flow page). All rules are scoped to .journey. */

.journey { --primary: #0086ff; --primary-dark: #006fd6; --primary-soft: #e6f3ff; --secondary: #64748b; --ink: #0f172a; --ink-2: #334155; --divider: #f3f4f6; --ok: #16a34a; --warn: #f59e0b; --accent: #ffc83d;  --sky-top: #dbeeff; --sky-bottom: #f7fbff; --ground: #e3eedc; --ground-edge: #cfdcc6; --sea: #3d9cff; --sand: #f2e2b3; --hill: #b9d3a6; --hill-top: #cde3bc; --leaf-1: #34a853; --leaf-2: #2a8c45; --trunk: #7a5230;  --bld-top: #ffffff; --bld-front: #e3ebf5; --bld-side: #c9d7e8; --bld-back: #b6c6da; --window: #9ccaff;  --card: rgba(255, 255, 255, 0.86); --card-border: rgba(255, 255, 255, 0.6); --shadow: 0 10px 40px rgba(15, 23, 42, 0.12); --phone-w: 340px; }
.journey * { margin: 0; padding: 0; box-sizing: border-box; }
.journey { width: 100%; height: 100%; overflow: hidden; font-family: 'Plus Jakarta Sans', 'Segoe UI', Roboto, sans-serif; color: var(--ink); background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom) 70%); }
.journey button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.journey .viewport-3d { position: absolute; inset: 0; perspective: 2200px; perspective-origin: 50% 35%; display: flex; justify-content: center; align-items: center; padding: 150px 0 60px calc(var(--phone-w) + 48px); overflow: hidden; user-select: none; }
.journey .scene-pivot { width: 0; height: 0; transform-style: preserve-3d; transform: scale(var(--s, 1)) rotateX(58deg) rotateZ(-32deg); }
.journey .ground { position: absolute; width: 1000px; height: 520px; left: -500px; top: -260px; transform-style: preserve-3d; background: radial-gradient(circle at 50% 30%, rgba(255,255,255,0.35), transparent 60%), var(--ground); border-radius: 18px; box-shadow: 0 0 0 10px var(--ground-edge), 30px 40px 80px rgba(15, 23, 42, 0.18); transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1); }
.journey[data-focus="durban"] .ground { transform: translate3d(70px, 30px, 0); }
.journey[data-focus="route"]  .ground { transform: translate3d(0, 0, 0); }
.journey[data-focus="homes"]  .ground { transform: scale3d(1.6, 1.6, 1.6) translate3d(210px, 80px, 0); }
.journey[data-focus="jnb"]    .ground { transform: scale3d(1.6, 1.6, 1.6) translate3d(-310px, 60px, 0); }
.journey .sea { position: absolute; left: 0; top: 0; width: 70px; height: 520px; border-radius: 18px 0 0 18px; background: repeating-linear-gradient(170deg, rgba(255,255,255,0.25) 0 2px, transparent 2px 22px), var(--sea); animation: j-waves 6s linear infinite; }
@keyframes j-waves { to { background-position: 0 44px, 0 0; } }
.journey .beach { position: absolute; left: 70px; top: 0; width: 22px; height: 520px; background: var(--sand); }
.journey .box-3d { position: absolute; width: var(--w); height: var(--d); transform-style: preserve-3d; }
.journey .face { position: absolute; left: 0; top: 0; }
.journey .box-3d > .top { width: var(--w); height: var(--d); transform: translateZ(var(--h)); }
.journey .box-3d > .front { width: var(--w); height: var(--h); top: calc(var(--d) - var(--h)); transform-origin: bottom center; transform: rotateX(-90deg); }
.journey .box-3d > .back { width: var(--w); height: var(--h); transform-origin: top center; transform: rotateX(90deg); }
.journey .box-3d > .left { width: var(--h); height: var(--d); transform-origin: center left; transform: rotateY(-90deg); }
.journey .box-3d > .right { width: var(--h); height: var(--d); left: calc(var(--w) - var(--h)); transform-origin: center right; transform: rotateY(90deg); }
.journey .bld > .top { background: var(--bld-top); }
.journey .bld > .back { background: var(--bld-back); }
.journey .bld > .left { background: var(--bld-back); }
.journey .bld > .front { background-color: var(--bld-front); background-image: repeating-linear-gradient(90deg, var(--bld-front) 0 5px, transparent 5px 13px), repeating-linear-gradient(0deg, var(--bld-front) 0 6px, var(--window) 6px 13px); }
.journey .bld > .right { background-color: var(--bld-side); background-image: repeating-linear-gradient(0deg, var(--bld-side) 0 5px, transparent 5px 13px), repeating-linear-gradient(90deg, var(--bld-side) 0 6px, #86b6ea 6px 13px); }
.journey .bld.blue > .top { background: var(--primary-soft); }
.journey .bld.tall > .front { --window: #7fbcff; }
.journey .hill > .top { background: var(--hill-top); }
.journey .hill > .front { background: var(--hill); }
.journey .hill > .right { background: #a8c595; }
.journey .hill > .left, .journey .hill > .back { background: #9dba8a; }
.journey .track { position: absolute; left: 96px; top: 246px; width: 880px; height: 28px; background: repeating-linear-gradient(90deg, #8b6b4a 0 4px, transparent 4px 12px) center / 100% 20px no-repeat, #c8c0b2; transform: translateZ(1px); border-radius: 3px; }
.journey .track::before, .journey .track::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; background: var(--secondary); }
.journey .track::before { top: 6px; }
.journey .track::after { bottom: 6px; }
.journey .route-glow { position: absolute; inset: -6px; border-radius: 8px; background: rgba(0, 134, 255, 0.28); box-shadow: 0 0 24px rgba(0, 134, 255, 0.6); opacity: 0; transition: opacity 0.5s; }
.journey[data-step="1"] .route-glow { opacity: 1; animation: j-glow 1.6s ease-in-out infinite; }
@keyframes j-glow { 50% { opacity: 0.35; } }
.journey .platform > .top { background: #f8fafc; box-shadow: inset 0 3px 0 var(--accent); }
.journey .platform > .front { background: #cbd5e1; }
.journey .platform > .right, .journey .platform > .left, .journey .platform > .back { background: #b8c2cf; }
.journey .canopy > .top { background: var(--primary); }
.journey .canopy > .front { background: var(--primary-dark); }
.journey .canopy > .right, .journey .canopy > .left, .journey .canopy > .back { background: #005bb0; }
.journey .pole > .face { background: #94a3b8; }
.journey .gate > .top { background: #0f172a; }
.journey .gate > .face { background: #1e293b; }
.journey .gate > .front { background: #334155; }
.journey[data-step="6"] .gate > .top { background: var(--ok); box-shadow: 0 0 18px var(--ok); }
.journey .j-train { position: absolute; left: 136px; top: 249px; transform-style: preserve-3d; transform: translate3d(0, 0, 2px); transition: transform 7s cubic-bezier(0.55, 0, 0.35, 1); }
.journey[data-step="7"] .j-train { transform: translate3d(560px, 0, 2px); }
.journey .coach > .top { background: #e9f4ff; }
.journey .coach > .front, .journey .coach > .back { background: linear-gradient(180deg, var(--primary) 0 22%, transparent 22% 58%, var(--primary) 58% 78%, var(--accent) 78% 86%, var(--primary) 86%), repeating-linear-gradient(90deg, #0f2a4a 0 9px, #dff0ff 9px 12px); }
.journey .coach > .left, .journey .coach > .right { background: var(--primary-dark); }
.journey .coach.loco > .right { background: linear-gradient(180deg, #0f2a4a 0 45%, var(--primary-dark) 45%); }
.journey .coach.selected > .top { background: var(--accent); box-shadow: 0 0 20px var(--accent); }
.journey:not([data-step="2"]) .coach.selected > .top { background: #e9f4ff; box-shadow: none; transition: background 0.4s; }
.journey[data-step="7"] .j-train, .journey[data-step="7"] .progress i { transition-delay: 2.2s; }
.journey .walkway { position: absolute; background: #efe3c8; border-radius: 4px; transform: translateZ(0.5px); }
.journey .house > .top { background: #fde7d6; }
.journey .house > .front { background: linear-gradient(#6b3f22, #6b3f22) 50% 100% / 7px 12px no-repeat, linear-gradient(var(--window), var(--window)) 16% 30% / 6px 6px no-repeat, linear-gradient(var(--window), var(--window)) 84% 30% / 6px 6px no-repeat, #fff7ed; }
.journey .house > .right { background: linear-gradient(var(--window), var(--window)) 50% 30% / 6px 6px no-repeat, #f3e3cf; }
.journey .house > .left, .journey .house > .back { background: #e8d3b9; }
.journey .roof > .face { background: #c4553a; }
.journey .roof > .top { background: #e0714f; }
.journey .person { --z: 1px; opacity: 0; }
.journey .person .fig { display: block; }
.journey .person.left .fig { transform: scaleX(-1); }
.journey .person.walking .fig svg { animation: j-stride 0.34s ease-in-out infinite alternate; }
@keyframes j-stride { to { transform: translateY(-2px); } }
.journey .person .you { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 2px; font-size: 9px; font-weight: 800; background: var(--accent); color: var(--ink); padding: 1px 6px; border-radius: 999px; }
.journey .tree { position: absolute; width: 24px; height: 24px; transform-style: preserve-3d; }
.journey .tree .leaf { position: absolute; left: 0; top: -18px; width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-bottom: 30px solid var(--leaf-1); transform-origin: bottom center; transform: translateZ(9px) rotateX(-90deg); }
.journey .tree .leaf + .leaf { border-bottom-color: var(--leaf-2); transform: translateZ(9px) rotateZ(90deg) rotateX(-90deg); }
.journey .tree .trunk { position: absolute; left: 10px; top: 0; width: 4px; height: 12px; background: var(--trunk); transform-origin: bottom center; transform: rotateX(-90deg); }
.journey .bb { position: absolute; transform-origin: 0 0; transform: translateZ(var(--z, 60px)) rotateZ(32deg) rotateX(-58deg) translate(-50%, -100%); white-space: nowrap; pointer-events: none; }
.journey .city-tag { background: #fff; border-radius: 14px; padding: 8px 14px; box-shadow: var(--shadow); text-align: center; border-bottom: 3px solid var(--primary); }
.journey .city-tag b { display: block; font-size: 18px; font-weight: 800; }
.journey .city-tag span { font-size: 11px; color: var(--secondary); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.journey[data-step="1"] .city-tag { animation: j-bob 1.6s ease-in-out infinite; }
@keyframes j-bob { 50% { transform: translateY(-8px); } }
.journey .sign { font-size: 11px; font-weight: 700; color: #fff; background: var(--ink); padding: 4px 9px; border-radius: 6px; }
.journey .pop { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 7px 14px 7px 8px; font-size: 13px; font-weight: 700; box-shadow: var(--shadow); opacity: 0; margin-top: 10px; transition: opacity 0.4s, margin 0.4s; }
.journey .pop i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; color: #fff; background: var(--primary); }
.journey .pop.ok i { background: var(--ok); }
.journey .pop.warn i { background: var(--warn); }
.journey[data-step="2"] #pop-seat, .journey[data-step="3"] #pop-hold, .journey[data-step="4"] #pop-paid, .journey[data-step="5"] #pop-ticket, .journey[data-step="6"] #pop-valid, .journey[data-step="7"] #pop-remind { opacity: 1; margin-top: 0; }
.journey .hud { position: absolute; inset: 0; pointer-events: none; display: grid; grid-template-columns: var(--phone-w) 1fr; grid-template-rows: auto 1fr auto; gap: 20px 28px; padding: 20px 24px; }
.journey .card { pointer-events: auto; background: var(--card); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--card-border); border-radius: 18px; box-shadow: var(--shadow); }
.journey header.card { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; }
.journey .brand { display: flex; align-items: center; gap: 12px; }
.journey .brand-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--primary); display: grid; place-items: center; color: #fff; }
.journey .brand-name { font-weight: 800; font-size: 18px; letter-spacing: 0.02em; }
.journey .brand-name em { font-style: normal; color: var(--primary); }
.journey .brand-sub { font-size: 12px; color: var(--secondary); font-weight: 500; }
.journey .route-chip { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; background: var(--primary-soft); color: var(--primary-dark); padding: 8px 14px; border-radius: 999px; }
.journey .route-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.journey .route-chip .line { width: 28px; border-top: 2px dashed var(--primary); }
.journey .phone { grid-row: 2; align-self: center; pointer-events: auto; width: var(--phone-w); height: min(640px, 100%); background: #0f172a; border-radius: 42px; padding: 10px; box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35); display: flex; }
.journey .screen { flex: 1; background: #fff; border-radius: 33px; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.journey .status-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 22px 4px; font-size: 12px; font-weight: 700; }
.journey .notch { width: 80px; height: 22px; background: #0f172a; border-radius: 12px; }
.journey .app-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 18px 12px; border-bottom: 1px solid var(--divider); }
.journey .app-bar h2 { font-size: 17px; font-weight: 800; }
.journey .step-count { font-size: 11px; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: 4px 9px; border-radius: 999px; }
.journey .screens { flex: 1; position: relative; overflow: hidden; }
.journey .scr { position: absolute; inset: 0; padding: 16px 18px; overflow-y: auto; opacity: 0; transform: translateX(24px); transition: opacity 0.35s, transform 0.35s; pointer-events: none; display: flex; flex-direction: column; gap: 12px; }
.journey .scr.active { opacity: 1; transform: none; pointer-events: auto; }
.journey .label { font-size: 11px; color: var(--secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.journey .field { border: 1px solid #e2e8f0; border-radius: 14px; padding: 10px 14px; }
.journey .field b { display: block; font-size: 15px; }
.journey .row { display: flex; gap: 10px; }
.journey .row > * { flex: 1; }
.journey .seg { display: flex; background: var(--divider); border-radius: 12px; padding: 4px; }
.journey .seg span { flex: 1; text-align: center; font-size: 12px; font-weight: 700; padding: 7px; border-radius: 9px; color: var(--secondary); }
.journey .seg span.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.journey .train-opt { border: 1.5px solid #e2e8f0; border-radius: 14px; padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 13px; }
.journey .train-opt.pick { border-color: var(--primary); background: var(--primary-soft); }
.journey .train-opt .t { font-weight: 800; font-size: 15px; }
.journey .train-opt .p { font-weight: 800; color: var(--primary-dark); text-align: right; }
.journey .train-opt .m { color: var(--secondary); font-size: 12px; }
.journey .btn { display: block; width: 100%; background: var(--primary); color: #fff; font-weight: 700; font-size: 14px; text-align: center; padding: 13px; border-radius: 14px; margin-top: auto; box-shadow: 0 6px 16px rgba(0, 134, 255, 0.3); }
.journey .btn.green { background: var(--ok); box-shadow: 0 6px 16px rgba(22, 163, 74, 0.3); }
.journey .coach-tabs { display: flex; gap: 8px; }
.journey .coach-tabs span { flex: 1; text-align: center; padding: 8px; border-radius: 10px; font-size: 12px; font-weight: 700; background: var(--divider); color: var(--secondary); }
.journey .coach-tabs span.on { background: var(--ink); color: #fff; }
.journey .seats { display: grid; grid-template-columns: repeat(2, 1fr) 14px repeat(2, 1fr); gap: 7px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 16px; }
.journey .seat { height: 28px; border-radius: 7px 7px 4px 4px; background: #e2e8f0; font-size: 10px; font-weight: 700; display: grid; place-items: center; color: var(--secondary); }
.journey .seat.free { background: #fff; border: 1.5px solid #cbd5e1; }
.journey .seat.mine { background: var(--accent); color: var(--ink); }
.journey .aisle { visibility: hidden; }
.journey .legend { display: flex; gap: 14px; font-size: 11px; color: var(--secondary); font-weight: 600; }
.journey .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.journey .timer { text-align: center; padding: 20px 10px; border-radius: 20px; background: #fff7e6; border: 1px solid #fde7b0; }
.journey .timer b { font-size: 46px; font-weight: 800; color: #b45309; font-variant-numeric: tabular-nums; display: block; }
.journey .timer span { font-size: 12px; color: #92400e; font-weight: 600; }
.journey .bar { height: 6px; background: #fde7b0; border-radius: 9px; overflow: hidden; margin-top: 12px; }
.journey .bar i { display: block; height: 100%; width: 100%; background: var(--warn); transition: width 1s linear; }
.journey .summary { font-size: 13px; display: grid; gap: 8px; }
.journey .summary div { display: flex; justify-content: space-between; color: var(--ink-2); }
.journey .summary .total { border-top: 1px dashed #cbd5e1; padding-top: 8px; font-weight: 800; color: var(--ink); font-size: 15px; }
.journey .checkout { border-radius: 16px; border: 1px solid #e2e8f0; padding: 14px; display: grid; gap: 10px; }
.journey .checkout .head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--secondary); font-weight: 600; }
.journey .checkout .head b { color: #011b33; font-size: 13px; }
.journey .card-input { background: var(--divider); border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; color: var(--ink-2); }
.journey .secure { font-size: 11px; color: var(--secondary); text-align: center; }
.journey .ticket { border-radius: 18px; background: linear-gradient(160deg, var(--primary), #0062c4); color: #fff; padding: 16px; position: relative; }
.journey .ticket .stub { display: flex; justify-content: space-between; align-items: center; }
.journey .ticket .city { font-size: 22px; font-weight: 800; }
.journey .ticket .small { font-size: 11px; opacity: 0.8; font-weight: 600; }
.journey .ticket .meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; font-size: 12px; }
.journey .ticket .meta b { display: block; font-size: 14px; }
.journey .ticket .cut { border-top: 2px dashed rgba(255,255,255,0.4); margin: 14px -16px; }
.journey .ticket .code { display: flex; align-items: center; gap: 14px; }
.journey .ticket canvas { background: #fff; border-radius: 8px; padding: 4px; width: 84px; height: 84px; image-rendering: pixelated; }
.journey .ticket .code b { font-size: 20px; letter-spacing: 0.08em; display: block; }
.journey .badge { display: inline-block; font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: #dcfce7; color: #166534; text-transform: uppercase; letter-spacing: 0.06em; }
.journey .reminders { display: grid; gap: 8px; }
.journey .rem { display: flex; gap: 10px; align-items: center; font-size: 12px; padding: 10px 12px; border-radius: 12px; background: var(--divider); color: var(--ink-2); font-weight: 600; }
.journey .rem i { font-style: normal; width: 26px; height: 26px; border-radius: 8px; background: #fff; display: grid; place-items: center; font-size: 13px; }
.journey .rem.done { background: var(--primary-soft); color: var(--primary-dark); }
.journey .scanner { border-radius: 18px; background: #0f172a; height: 170px; position: relative; display: grid; place-items: center; overflow: hidden; }
.journey .scanner canvas { width: 92px; height: 92px; background: #fff; border-radius: 8px; padding: 4px; image-rendering: pixelated; }
.journey .scanner::before { content: ""; position: absolute; inset: 30px 70px; border: 3px solid var(--ok); border-radius: 14px; }
.journey .scanner::after { content: ""; position: absolute; left: 70px; right: 70px; height: 2px; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: j-scan 1.8s ease-in-out infinite alternate; }
@keyframes j-scan { from { top: 34px; } to { top: 134px; } }
.journey .valid { display: flex; gap: 12px; align-items: center; background: #dcfce7; border-radius: 14px; padding: 12px 14px; color: #166534; font-size: 13px; }
.journey .valid b { display: block; font-size: 15px; }
.journey .valid i { font-style: normal; width: 34px; height: 34px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 18px; flex: none; }
.journey .progress { height: 8px; background: var(--divider); border-radius: 9px; overflow: hidden; }
.journey .progress i { display: block; height: 100%; width: 0; background: var(--primary); border-radius: 9px; transition: width 7s cubic-bezier(0.55, 0, 0.35, 1); }
.journey[data-step="7"] .progress i { width: 100%; }
.journey .phone-nav { display: flex; gap: 10px; padding: 12px 18px 18px; border-top: 1px solid var(--divider); }
.journey .phone-nav button { flex: 1; padding: 11px; border-radius: 12px; font-weight: 700; font-size: 13px; background: var(--divider); color: var(--ink-2); }
.journey .phone-nav button.next { background: var(--ink); color: #fff; }
.journey .phone-nav button:disabled { opacity: 0.4; cursor: default; }
.journey .steps { grid-column: 1 / -1; grid-row: 3; display: flex; align-items: center; gap: 6px; padding: 8px; overflow-x: auto; scrollbar-width: none; }
.journey .steps::-webkit-scrollbar { display: none; }
.journey .step { flex: 1; min-width: 112px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; text-align: left; transition: background 0.3s; }
.journey .step .n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--divider); color: var(--secondary); font-size: 12px; font-weight: 800; display: grid; place-items: center; transition: background 0.3s, color 0.3s; }
.journey .step b { display: block; font-size: 13px; font-weight: 700; }
.journey .step span { display: block; font-size: 11px; color: var(--secondary); font-weight: 500; }
.journey .step.done .n { background: var(--primary-soft); color: var(--primary); }
.journey .step.on { background: var(--primary-soft); }
.journey .step.on .n { background: var(--primary); color: #fff; }
.journey .play { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--ink); color: #fff; display: grid; place-items: center; margin-left: 4px; }
.journey .note { position: absolute; right: 26px; bottom: 104px; font-size: 11px; color: var(--secondary); font-weight: 600; pointer-events: none; }
@media (max-width: 900px) {
  .journey { --phone-w: 100%; }
  .journey .viewport-3d { padding: 90px 0 50vh 0; }
  .journey .hud > * { min-width: 0; }
  .journey .hud { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto auto; padding: 12px 16px; gap: 10px; }
  .journey header.card { padding: 10px 14px; }
  .journey .brand-sub { display: none; }
  .journey .route-chip .line { width: 12px; }
  .journey .route-chip { font-size: 11px; padding: 6px 10px; gap: 6px; }
  .journey .route-chip .dot { display: none; }
  .journey .phone { grid-row: 4; height: 46vh; border-radius: 26px; padding: 6px; }
  .journey .screen { border-radius: 21px; }
  .journey .status-bar { display: none; }
  .journey .steps { grid-row: 3; }
  .journey .step { min-width: 0; flex: none; }
  .journey .step > div { display: none; }
  .journey .step.on > div { display: block; }
  .journey .note { display: none; }
}

/* Embedded-section overrides: the demo lives in a framed panel, not the whole window */
.journey-section { padding: 140px clamp(24px, 8vw, 140px); background: linear-gradient(180deg, #070717, #0b1030 60%, #070717); }
.journey-section .feature-heading { margin-bottom: 60px; }
.journey { position: relative; width: 100%; height: 900px; overflow: hidden; border-radius: 28px; box-shadow: 0 40px 120px rgba(0, 134, 255, .18), 0 0 0 1px rgba(170, 194, 255, .2); isolation: isolate; }
.journey .viewport-3d { padding-top: 40px; }
@media (max-width: 900px) {
  .journey { height: 980px; border-radius: 20px; }
  .journey .viewport-3d { padding: 10px 0 570px 0; }
  .journey .phone { height: 450px; }
}

/* ===== Acts: camera, speech bubbles, phones, coins, staff scan, full train ===== */
/* Camera: transform = scale(k) translate(groundCentre - focusPoint); ground centre is (500, 260) */
.journey[data-focus="search"] .ground { transform: scale3d(3.3, 3.3, 3.3) translate3d(104px, 92px, 0); }    /* lawn in front of homes (396,168) */
.journey[data-focus="talk"]   .ground { transform: scale3d(3.6, 3.6, 3.6) translate3d(102px, 80px, 0); }    /* group (398,180) */
.journey[data-focus="hold"]   .ground { transform: scale3d(2.4, 2.4, 2.4) translate3d(200px, 55px, 0); }    /* group + coach B (300,205) */
.journey[data-focus="pay"]    .ground { transform: scale3d(3.2, 3.2, 3.2) translate3d(150px, 100px, 0); }   /* payer + app (350,160) */
.journey[data-focus="homes"]  .ground { transform: scale3d(2.4, 2.4, 2.4) translate3d(200px, 80px, 0); }    /* walk to station (300,180) */
.journey[data-focus="check"]  .ground { transform: scale3d(3.4, 3.4, 3.4) translate3d(315px, 60px, 0); }    /* ticket gate (185,200) */
.journey[data-focus="board"]  .ground { transform: scale3d(2.8, 2.8, 2.8) translate3d(240px, 25px, 0); }    /* platform (260,235) */
.journey[data-focus="jnb"]    .ground { transform: scale3d(2.6, 2.6, 2.6) translate3d(-360px, 70px, 0); }   /* Park Station exit (860,190) */
.journey[data-focus="ride"]   .ground { transform: scale3d(2.6, 2.6, 2.6) translate3d(-360px, 70px, 0); transition: transform 7.3s cubic-bezier(0.55, 0, 0.35, 1); }


.journey .say { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%) scale(.6); transform-origin: 50% 100%; opacity: 0; background: #fff; color: var(--ink); font-size: 9px; font-weight: 700; padding: 3px 7px; border-radius: 8px; box-shadow: 0 4px 12px rgba(15, 23, 42, .2); transition: opacity .25s, transform .25s cubic-bezier(.34, 1.56, .64, 1); white-space: nowrap; }
.journey .say::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -4px; border: 4px solid transparent; border-top-color: #fff; }
.journey .say.show { opacity: 1; transform: translateX(-50%) scale(1); }
.journey .say.ok { background: #dcfce7; color: #166534; }
.journey .say.ok::after { border-top-color: #dcfce7; }
.journey .say.warn { background: #fff7e6; color: #b45309; }
.journey .say.warn::after { border-top-color: #fff7e6; }

.journey .person .fig { position: relative; }
.journey .handset { display: none; position: absolute; left: 13px; top: 13px; width: 5px; height: 8px; border-radius: 1.5px; background: #0f172a; border: 1px solid #9ccaff; box-shadow: 0 0 8px 2px rgba(0, 134, 255, .7); z-index: 1; }
.journey .person.searching .handset { display: block; animation: j-glow 1.4s ease-in-out infinite; }

.journey .staff .fig::after { content: ""; position: absolute; left: 80%; top: 52%; width: 26px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #22c55e, transparent); box-shadow: 0 0 10px #22c55e; opacity: 0; transition: opacity .15s; }
.journey .staff.beam .fig::after { opacity: 1; }

.journey .app-tile { opacity: 0; transition: opacity .4s; text-align: center; }
.journey[data-step="4"] .app-tile { opacity: 1; }
.journey .app-tile .tile { position: relative; width: 34px; height: 34px; margin: 0 auto 3px; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 800; font-size: 18px; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 134, 255, .45); }
.journey .app-tile .tile i { position: absolute; right: -6px; top: -6px; width: 16px; height: 16px; border-radius: 50%; background: var(--ok); font-size: 10px; font-style: normal; display: grid; place-items: center; transform: scale(0); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.journey .app-tile.got .tile { animation: j-bob .5s ease-in-out 2; }
.journey .app-tile.got .tile i { transform: scale(1); }
.journey .app-tile span { font-size: 9px; font-weight: 800; color: var(--ink); background: #fff; padding: 1px 6px; border-radius: 999px; }

.journey .coin { --z: 30px; transition: left 1.1s ease-in-out, top 1.1s ease-in-out; }
.journey .coin span { display: grid; place-items: center; width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3b0, #f5b800 60%, #c98a00); color: #7a4b00; font-size: 8px; font-weight: 800; box-shadow: 0 0 8px rgba(245, 184, 0, .8); animation: j-hop 1.1s ease-in-out; }
@keyframes j-hop { 50% { transform: translateY(-22px) scale(1.25); } }

.journey .checkout .seg { margin: 0; }
.journey .coins-row { display: flex; align-items: center; gap: 6px; padding: 6px 2px; font-size: 12px; }
.journey .coins-row span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #7a4b00; background: radial-gradient(circle at 35% 30%, #fff3b0, #f5b800 60%, #c98a00); animation: j-coinslide 1.6s ease-in-out infinite; }
.journey .coins-row span:nth-child(2) { animation-delay: .2s; }
.journey .coins-row span:nth-child(3) { animation-delay: .4s; }
.journey .coins-row i { font-style: normal; color: var(--secondary); margin-left: auto; }
.journey .coins-row b { background: var(--primary); color: #fff; font-size: 11px; padding: 4px 8px; border-radius: 8px; }
@keyframes j-coinslide { 50% { transform: translateX(10px); } }

.journey[data-step="3"] .coach.selected > .top { background: var(--warn); box-shadow: 0 0 22px var(--warn); animation: j-glow 1.2s ease-in-out infinite; }
.journey .j-train.full .coach > .front, .journey .j-train.full .coach > .back {
  background:
    radial-gradient(circle, #6b4423 0 2px, transparent 2.6px) -1.5px 5px / 12px 8px repeat-x,
    linear-gradient(180deg, var(--primary) 0 22%, transparent 22% 58%, var(--primary) 58% 78%, var(--accent) 78% 86%, var(--primary) 86%),
    repeating-linear-gradient(90deg, #0f2a4a 0 9px, #dff0ff 9px 12px);
}

/* ===== Flat overlay for labels and bubbles (fixed size, always on top) ===== */
.journey .j-overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.journey .j-overlay .pin { position: absolute; left: 0; top: 0; width: max-content; will-change: transform; white-space: nowrap; }
.journey .bb.anchor { width: 1px; height: 1px; }
.journey .j-overlay .say { font-size: 11px; padding: 4px 9px; border-radius: 9px; bottom: 6px; }
.journey .j-overlay .city-tag { padding: 5px 11px; border-radius: 10px; border-bottom-width: 2px; }
.journey .j-overlay .city-tag b { font-size: 13px; }
.journey .j-overlay .city-tag span { font-size: 8.5px; }
.journey .j-overlay .sign { font-size: 10px; padding: 3px 7px; }
.journey .j-overlay .pop { font-size: 11px; padding: 5px 11px 5px 6px; margin-bottom: 4px; }
.journey .j-overlay .pop i { width: 18px; height: 18px; font-size: 10px; }
.journey .j-overlay .app-tile .tile { width: 30px; height: 30px; font-size: 16px; }

/* Check: passenger holds up the phone, scanner beam reaches it */
.journey .person.showing .handset { display: block; background: #fff; border-color: #22c55e; box-shadow: 0 0 10px 3px rgba(34, 197, 94, .8); top: 9px; }
.journey .staff .fig::after { width: 30px; }
.journey[data-step="6"] .canopy > .face, .journey[data-step="7"] .canopy > .face { opacity: .3; transition: opacity .5s; }

.journey .j-overlay .you-tag { display: block; margin-bottom: 3px; font-size: 10px; font-weight: 800; background: var(--accent); color: var(--ink); padding: 1px 7px; border-radius: 999px; box-shadow: 0 2px 6px rgba(15, 23, 42, .2); }

/* Light site theme for the section around the demo */
.journey-section { background: linear-gradient(180deg, #f5f9ff, #eaf3ff 60%, #f5f9ff); }
.journey-section .feature-heading h2 { color: #0f172a; }
.journey-section .feature-heading h2 em { color: #0086ff; }
.journey-section .feature-heading p { color: #475569; }
.journey { box-shadow: 0 40px 100px rgba(0, 134, 255, .14), 0 0 0 1px #dbe5f0; }

/* Step bar removed: free its space */
.journey .note { bottom: 20px; }
@media (max-width: 900px) { .journey .viewport-3d { padding-bottom: 490px; } }

/* Full-bleed demo: panel runs edge to edge of the window */
.journey-section .journey { width: 100vw; margin-left: calc(50% - 50vw); border-radius: 0; box-shadow: none; border-top: 1px solid #dbe5f0; border-bottom: 1px solid #dbe5f0; }
.journey-section { padding-bottom: 0; }
@media (max-width: 900px) { .journey-section .journey { border-radius: 0; } }

/* Phone frame in TREK blue instead of black */
.journey .phone { background: linear-gradient(160deg, #3aa0ff, #0086ff 45%, #006fd6); box-shadow: 0 30px 70px rgba(0, 134, 255, .35), inset 0 0 0 1px rgba(255, 255, 255, .25); }
.journey .notch { background: #006fd6; }
.journey .phone { padding: 5px; border-radius: 40px; }
.journey .screen { border-radius: 35px; }
@media (max-width: 900px) {
  .journey .phone { padding: 3px; border-radius: 24px; }
  .journey .screen { border-radius: 21px; }
}

/* Phone frame back to black (kept thin) */
.journey .phone { background: #0f172a; box-shadow: 0 30px 70px rgba(15, 23, 42, .3); }
.journey .notch { background: #0f172a; }

/* ===== Demo train restyled to match the hero train: silver body, light-blue glass, blue + cyan stripe ===== */
.journey .coach > .top { background: linear-gradient(90deg, #f4f8ff, #e3eaf5); }
.journey .coach > .front, .journey .coach > .back {
  background:
    linear-gradient(180deg, transparent 0 62%, #0086ff 62% 71%, #26d9ff 71% 75%, transparent 75%),
    linear-gradient(180deg, transparent 0 20%, rgba(255,255,255,0) 20% 55%, transparent 55%),
    repeating-linear-gradient(90deg, #d9ecff 0 2px, #bfe2ff 2px 10px, #ffe2a0 10px 12px, #bfe2ff 12px 20px, #d9ecff 20px 22px) 0 20% / 100% 35% no-repeat,
    linear-gradient(180deg, #f4f8ff 0%, #cfd9ea 70%, #8c99b4 100%);
}
.journey .coach > .left, .journey .coach > .right { background: linear-gradient(180deg, #e7edf7, #b6c2d6); }
.journey .coach.loco > .right { background: linear-gradient(180deg, #bfe2ff 0 48%, #26d9ff 48% 52%, #cfd9ea 52%); }
.journey:not([data-step="2"]) .coach.selected > .top { background: linear-gradient(90deg, #f4f8ff, #e3eaf5); }
.journey .j-train.full .coach > .front, .journey .j-train.full .coach > .back {
  background:
    radial-gradient(circle, #6b4423 0 2px, transparent 2.6px) 1px 6px / 10px 8px repeat-x,
    linear-gradient(180deg, transparent 0 62%, #0086ff 62% 71%, #26d9ff 71% 75%, transparent 75%),
    repeating-linear-gradient(90deg, #d9ecff 0 2px, #bfe2ff 2px 10px, #ffe2a0 10px 12px, #bfe2ff 12px 20px, #d9ecff 20px 22px) 0 20% / 100% 35% no-repeat,
    linear-gradient(180deg, #f4f8ff 0%, #cfd9ea 70%, #8c99b4 100%);
}

/* ===== Demo train = hero train: passengers always visible, TREK logo, sloped nose ===== */
.journey .coach > .front, .journey .coach > .back,
.journey .j-train.full .coach > .front, .journey .j-train.full .coach > .back {
  background:
    radial-gradient(circle, #1d2b4a 0 1.6px, transparent 2.1px) 2px 6px / 20px 8px repeat-x,
    linear-gradient(180deg, transparent 0 62%, #0086ff 62% 71%, #26d9ff 71% 75%, transparent 75%),
    repeating-linear-gradient(90deg, #d9ecff 0 2px, #bfe2ff 2px 10px, #ffe2a0 10px 12px, #ffe2a0 12px 20px, #d9ecff 20px 22px) 0 20% / 100% 35% no-repeat,
    linear-gradient(180deg, #f4f8ff 0%, #cfd9ea 70%, #8c99b4 100%);
}
.journey .coach.loco > .front, .journey .coach.loco > .back,
.journey .j-train.full .coach.loco > .front, .journey .j-train.full .coach.loco > .back {
  background:
    radial-gradient(circle, #1d2b4a 0 1.6px, transparent 2.1px) 100% 6px / 20px 8px repeat-x,
    linear-gradient(180deg, transparent 0 62%, #0086ff 62% 71%, #26d9ff 71% 75%, transparent 75%),
    repeating-linear-gradient(90deg, #d9ecff 0 2px, #bfe2ff 2px 10px, #ffe2a0 10px 12px, #ffe2a0 12px 20px, #d9ecff 20px 22px) 100% 20% / 52% 35% no-repeat,
    linear-gradient(180deg, #f4f8ff 0%, #cfd9ea 70%, #8c99b4 100%);
}
.journey .loco-logo { position: absolute; left: 4px; top: 5px; font: 800 5.5px/1 'Plus Jakarta Sans', Arial, sans-serif; letter-spacing: 1.6px; color: #0b1530; }
.journey .coach.loco > .back .loco-logo { left: auto; right: 4px; }
.journey .coach.loco > .right { background: linear-gradient(180deg, #e7edf7, #b6c2d6); }

/* Nose: x 188-210 along the track. Glass slopes from roof height 24 down to 10 */
.journey .nose > .top { background: #dfe7f3; }
.journey .nose > .front, .journey .nose > .back { background: linear-gradient(180deg, #f4f8ff 0 8%, #0086ff 8% 40%, #26d9ff 40% 52%, #cfd9ea 52%, #8c99b4); }
.journey .nose > .right { background: radial-gradient(circle at 50% 45%, #fff 0 1.6px, rgba(38,217,255,.7) 2.4px, transparent 4.5px), linear-gradient(180deg, #e7edf7, #9eabc2); }
.journey .nose > .left { background: #cfd9ea; }
.journey .nose-glass { position: absolute; left: 188px; top: 0; width: 26px; height: 22px; transform-origin: 0 50%; transform: translateZ(24px) rotateY(32.3deg); background: linear-gradient(90deg, #d9efff, #9fd2ff); box-shadow: inset 2px 0 0 #26d9ff, inset -1px 0 0 #8fc6f5; }
.journey .nose-side { position: absolute; left: 188px; width: 22px; height: 14px; background: linear-gradient(90deg, #bfe2ff, #9fd2ff); }
.journey .nose-side.f { top: 8px; transform-origin: bottom center; transform: translateZ(10px) rotateX(-90deg); clip-path: polygon(0 0, 0 100%, 100% 100%); }
.journey .nose-side.b { top: 0; transform-origin: top center; transform: translateZ(10px) rotateX(90deg); clip-path: polygon(0 0, 100% 0, 0 100%); }
.journey .nose-lamp { position: absolute; left: 210px; top: 6px; width: 30px; height: 10px; transform: translateZ(5px); background: linear-gradient(90deg, rgba(255,255,255,.75), rgba(38,217,255,.15) 60%, transparent); clip-path: polygon(0 35%, 100% 0, 100% 100%, 0 65%); filter: blur(1px); opacity: .8; }
.journey .loco-logo { background: #eef3fb; padding: 1px 1px 1px 2px; border-radius: 1px; z-index: 1; }

/* ===== Performance ===== */
.journey .sea { animation: none; }                                       /* animated background repainted inside the 3D scene */
.journey .j-overlay .pin { will-change: transform; contain: layout style; }
.journey.is-offscreen *, .journey.is-offscreen *::before, .journey.is-offscreen *::after { animation-play-state: paused !important; }
.journey .face { backface-visibility: hidden; }

/* ===== Graphics memory: prevents blank (checkerboard) areas while scrolling ===== */
.journey .ground { box-shadow: 0 0 0 10px var(--ground-edge); }          /* the 80px blurred shadow became a huge texture when zoomed */
.journey.is-offscreen .viewport-3d, .journey.is-offscreen .j-overlay { visibility: hidden; }   /* frees the 3D scene's GPU memory off screen */
