/* journey.css — home hero «یک روز با OnTime» (web/js/journey.js).
   Light and dark: the canvas paints the city in the active skin's colours and
   everything here uses the same tokens (--bg, --sf, --ink, --mu, --ln, --br,
   --bs, --ac). All motion is written by journey.js as a function of scroll,
   so nothing here transitions except the loader fading out. */
.tj { --tj-glass: color-mix(in srgb, var(--sf) 84%, transparent); --tj-edge: color-mix(in srgb, var(--ink) 9%, transparent);
  --tj-ok: var(--ok, #16A34A); --tj-shadow: 0 18px 50px -24px rgba(15, 31, 58, .35);
  position: relative; background: var(--bg); color: var(--ink); }
:root[data-theme="dark"] .tj { --tj-glass: color-mix(in srgb, var(--sf) 78%, transparent); --tj-edge: color-mix(in srgb, #fff 10%, transparent);
  --tj-shadow: 0 22px 60px -26px rgba(0, 0, 0, .75); }
.tj-track { position: relative; height: 420vh; }
.tj-scene { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; perspective: 1100px; perspective-origin: 50% 80%; }
.tj-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* keeps the words readable over the city, in the page colour */
.tj-shade { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 46% at 50% 58%, color-mix(in srgb, var(--bg) 72%, transparent), transparent 70%),
    linear-gradient(0deg, color-mix(in srgb, var(--bg) 80%, transparent) 0%, transparent 30%); }

/* glass panel shared by the clock, the cards and the step list */
.tj-clock, .tj-card, .tj-steps { background: var(--tj-glass); border: 1px solid var(--tj-edge); box-shadow: var(--tj-shadow);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }

/* ------------------------------------------------------------ headline */
.tj-head { position: absolute; inset-inline: 0; bottom: 30%; padding: 0 24px; text-align: center; transform-origin: 50% 100%; will-change: transform, opacity; }
.tj-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  color: var(--br); background: var(--bs); }
.tj-kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ac); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ac) 25%, transparent); }
.tj-head h1 { margin: 18px 0 12px; font-size: clamp(40px, 5.8vw, 82px); line-height: 1.2; font-weight: 900; letter-spacing: -1px; color: var(--ink); }
.tj-head h1 em { font-style: normal; color: var(--br); }
.tj-head p { margin: 0 auto; max-width: 600px; font-size: clamp(15px, 1.3vw, 18px); line-height: 2; color: var(--mu); }
.tj-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.tj-head p.tj-bizin { margin-top: 14px; font-size: 14px; line-height: 1.8; }
.tj-bizin a { display: inline-flex; align-items: center; gap: 5px; margin-inline-start: 4px; color: var(--br); font-weight: 800; text-decoration: none;
  border-bottom: 1.5px solid color-mix(in srgb, var(--br) 35%, transparent); }
.tj-bizin a:hover { border-bottom-color: var(--br); }
.tj-bizin .ic-svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------ story clock */
.tj-clock { position: absolute; top: 88px; inset-inline-end: 4vw; display: grid; justify-items: end; gap: 2px; padding: 10px 16px; border-radius: 18px; }
.tj-clock span { font-size: 12px; font-weight: 700; color: var(--mu); }
.tj-clock b { font-size: 28px; line-height: 1.15; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; direction: ltr; letter-spacing: .5px; }
.tj-clock b::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-inline-start: 6px; vertical-align: middle; border-radius: 50%; background: var(--br); }
.tj-late .tj-clock b::after { background: var(--tj-ok); }

/* ------------------------------------------------------------ step cards */
.tj-cards { position: absolute; top: 180px; inset-inline-end: 4vw; width: 330px; }
.tj-card { position: absolute; top: 0; inset-inline: 0; display: grid; gap: 12px; padding: 18px; border-radius: 22px; opacity: 0; visibility: hidden; will-change: opacity, transform; }
.tj-card b { font-size: 16px; font-weight: 800; color: var(--ink); }
.tj-card-k { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--mu); }
.tj-card-k .ic-svg { width: 15px; height: 15px; color: var(--br); }
.tj-card-s { font-size: 13px; line-height: 1.9; color: var(--mu); }
.tj-slots { display: flex; flex-wrap: wrap; gap: 6px; }
.tj-slots span { padding: 6px 12px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--ink); border: 1px solid var(--ln); background: var(--bg); }
.tj-slots .on { background: var(--br); border-color: var(--br); color: #fff; }
.tj-ok { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--tj-ok); }
.tj-ok .ic-svg { width: 16px; height: 16px; }
.tj-note { grid-template-columns: auto 1fr; align-items: start; }
.tj-note-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--br); background: var(--bs); }
.tj-note-ic .ic-svg { width: 20px; height: 20px; }
.tj-note small { display: block; font-size: 11.5px; color: var(--mu); }
.tj-note span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.9; color: var(--mu); }
.tj-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tj-modes span { display: grid; gap: 2px; justify-items: start; padding: 10px 12px; border-radius: 14px; font-size: 13px; font-weight: 800; color: var(--ink);
  border: 1px solid var(--ln); background: var(--bg); }
.tj-modes span.on { border-color: var(--br); background: var(--bs); }
.tj-modes i { font-style: normal; font-size: 20px; }
.tj-modes em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--mu); }
.tj-eta { font-size: 13px; color: var(--mu); }
.tj-eta b { font-size: 15px; color: var(--br); }
.tj-ring { position: relative; width: 74px; height: 74px; }
.tj-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tj-ring circle { fill: none; stroke: var(--ln); stroke-width: 4; }
.tj-ring circle.v { stroke: var(--br); stroke-linecap: round; stroke-dasharray: 113; stroke-dashoffset: 28; }
.tj-ring span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-size: 18px; font-weight: 900; line-height: 1.1; color: var(--ink); }
.tj-ring small { font-size: 10px; font-weight: 600; color: var(--mu); }
.tj-sum b { font-size: 17px; }
.tj-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tj-stats span { display: grid; gap: 2px; padding: 10px 6px; border-radius: 14px; text-align: center; font-size: 11.5px; color: var(--mu);
  background: color-mix(in srgb, var(--tj-ok) 9%, transparent); border: 1px solid color-mix(in srgb, var(--tj-ok) 24%, transparent); }
.tj-stats em { font-style: normal; font-size: 20px; font-weight: 900; line-height: 1.3; color: var(--tj-ok); }
.tj-sum p { margin: 0; font-size: 15px; font-weight: 800; color: var(--ink); }
.tj-sum .tj-ctas { justify-content: flex-start; margin-top: 2px; }

/* ------------------------------------------------------------ process list */
.tj-steps { position: absolute; bottom: 28px; inset-inline-start: 4vw; width: 380px; margin: 0; padding: 14px 16px; list-style: none; border-radius: 24px;
  opacity: 0; visibility: hidden; will-change: opacity, transform; }
.tj-steps-line { position: absolute; top: 30px; bottom: 30px; inset-inline-start: 32px; width: 2px; border-radius: 2px; background: var(--ln); }
.tj-steps-fill { position: absolute; inset: 0; border-radius: inherit; background: var(--br); transform-origin: 50% 0; transform: scaleY(0); }
.tj-steps li { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; padding: 5px 0; color: var(--mu); }
.tj-steps .n { position: relative; z-index: 1; width: 32px; height: 26px; display: grid; place-items: center; border-radius: 999px; font-size: 12px; font-weight: 800;
  color: var(--mu); background: var(--sf); border: 1px solid var(--ln); }
.tj-steps b { display: block; font-size: 14px; line-height: 26px; font-weight: 700; }
.tj-steps p { margin: 0; max-height: 0; overflow: hidden; font-size: 12.5px; line-height: 1.9; color: var(--mu); }
.tj-steps li.done { color: var(--ink); }
.tj-steps li.done .n { color: var(--br); background: var(--bs); border-color: transparent; }
.tj-steps li.on { color: var(--ink); }
.tj-steps li.on b { font-weight: 900; }
.tj-steps li.on .n { color: #fff; background: var(--br); border-color: var(--br); box-shadow: 0 0 0 5px var(--bs); }
.tj-steps li.on p { max-height: 80px; margin-top: 2px; }

/* ------------------------------------------------------------ scroll cue */
.tj-cue { position: absolute; bottom: 30px; inset-inline: 0; margin: auto; width: max-content; display: grid; justify-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--mu); text-decoration: none; }
.tj-cue i { display: block; width: 120px; height: 3px; border-radius: 3px; background: var(--br); transform-origin: 50% 50%; transform: scaleX(var(--drain, 1)); }

/* ------------------------------------------------------------ loader */
.tj-loader { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: var(--bg);
  transition: opacity .6s ease; animation: tjFailsafe .6s ease 4.2s forwards; }
html:not(.tj-loading) .tj-loader:not(.gone) { display: none; }
.tj-loader.gone { opacity: 0; pointer-events: none; }
.tj-ell { position: absolute; border-radius: 50%; }
.tj-ell-a { width: 300px; height: 112px; border: 2px dotted color-mix(in srgb, var(--br) 45%, transparent); }
.tj-ell-b { width: 160px; height: 160px; border: 2px dotted color-mix(in srgb, var(--ac) 55%, transparent); }
.tj-mark { width: 60px; height: 60px; animation: tjSpin 1.6s cubic-bezier(.6, 0, .4, 1) infinite; }
.tj-mark .sq { fill: var(--br); }
.tj-mark .cv { fill: none; stroke: var(--ac); }
@keyframes tjSpin { to { transform: rotate(360deg); } }
@keyframes tjFailsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } } /* never trap the page if the script fails */

/* ------------------------------------------------------------ search band after the scene */
.h-findband { padding: 56px 20px; background: var(--bg); border-top: 1px solid var(--ln); }
.h-findband-in { max-width: 860px; margin: 0 auto; text-align: center; }
.h-findband h2 { margin: 12px 0 6px; font-size: clamp(22px, 3vw, 32px); color: var(--ink); }
.h-findband p { margin: 0 auto 18px; max-width: 600px; color: var(--mu); }
.h-findband .h-search { max-width: 680px; margin: 0 auto; }
.h-findband .h-quick { justify-content: center; margin-inline: auto; max-width: 720px; }

/* ------------------------------------------------------------ phone (≤ 760px) */
@media (max-width: 760px) {
  .tj-head { bottom: auto; top: 96px; padding: 0 18px; }
  .tj-head h1 { font-size: clamp(38px, 11vw, 48px); margin: 14px 0 10px; letter-spacing: -.5px; }
  .tj-head p { font-size: 15px; max-width: 34ch; }
  .tj-head .btn-lg { padding: 11px 18px; font-size: 14px; }
  .tj-clock { top: 76px; inset-inline-end: 18px; padding: 6px 12px; border-radius: 14px; }
  .tj-clock b { font-size: 21px; }
  .tj-cards { top: auto; bottom: 132px; inset-inline: 18px; width: auto; }
  .tj-card { top: auto; bottom: 0; padding: 14px; border-radius: 20px; }
  .tj-steps { inset-inline: 18px; bottom: 22px; width: auto; padding: 10px 12px; border-radius: 20px; }
  .tj-steps li { padding: 3px 0; }
  .tj-steps li:not(.on) { display: none; } /* one step at a time on a phone */
  .tj-steps-line { display: none; }
  .tj-steps li.on p { max-height: 60px; }
  .tj-cue { bottom: 22px; }
  body.tj-on .ot-desk { opacity: 0 !important; pointer-events: none; } /* Nila steps aside while the story plays */
}
html, body { overflow-x: clip; }

/* ------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  .tj-mark { animation: none; }
  .tj-loader { transition: none; }
}
@media print { .tj-loader, .tj-track { display: none; } }

/* ================================================================ animations
   The headline rises in once the loader fades; each card animates its own
   content while it is the active step. With reduced motion the endless loops
   stop and the rest gets calmer (like Nila: calmer, not frozen). */
.tj-ln { display: inline-block; }
.tj-mouse { position: relative; width: 22px; height: 34px; border-radius: 12px; border: 2px solid color-mix(in srgb, var(--ink) 35%, transparent); }
.tj-mouse::after { content: ""; position: absolute; top: 6px; left: 50%; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; background: var(--br); }
.tj .btn-primary { position: relative; overflow: hidden; }

@media all {
  /* headline */
  .tj-ln, .tj-rise { animation: tjRise .95s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0s); }
  html.tj-loading .tj-ln, html.tj-loading .tj-rise { animation-play-state: paused; }
  .tj-head h1 em::after { content: ""; display: block; height: .14em; margin-top: -.06em; border-radius: 99px; background: color-mix(in srgb, var(--ac) 55%, transparent);
    transform: scaleX(0); transform-origin: right; animation: tjLine .9s cubic-bezier(.6, 0, .2, 1) 1.1s forwards; }
  html.tj-loading .tj-head h1 em::after { animation-play-state: paused; }
  .tj-kicker::before { animation: tjPulse 1.8s ease-out infinite; }
  .tj .btn-primary::after { content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(120%);
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%); animation: tjShine 3.8s ease-in-out 2s infinite; }

  /* clock */
  .tj-clock b.tick { animation: tjTick .38s cubic-bezier(.3, 1.6, .5, 1); }
  .tj-clock b::after { animation: tjBlink 1s steps(2) infinite; }

  /* step list: the new number pops, its line fades in */
  .tj-steps li.on .n { animation: tjPop .55s cubic-bezier(.3, 1.7, .5, 1); }
  .tj-steps li.on p { animation: tjIn .45s .08s both; }

  /* cards: children come in one after another */
  .tj-card.is-on > * { animation: tjIn .5s cubic-bezier(.2, .8, .2, 1) both; }
  .tj-card.is-on > :nth-child(2) { animation-delay: .07s; }
  .tj-card.is-on > :nth-child(3) { animation-delay: .14s; }
  .tj-card.is-on > :nth-child(4) { animation-delay: .21s; }
  .tj-card.is-on > :nth-child(5) { animation-delay: .28s; }
  /* 01 booking: the slots pop, the chosen one pulses, the check appears */
  .tj-card.is-on .tj-slots span { animation: tjPop .45s cubic-bezier(.3, 1.6, .5, 1) both; }
  .tj-card.is-on .tj-slots span:nth-child(2) { animation-delay: .08s; }
  .tj-card.is-on .tj-slots span:nth-child(3) { animation-delay: .16s; }
  .tj-card.is-on .tj-slots span:nth-child(4) { animation-delay: .24s; }
  .tj-card.is-on .tj-slots .on { animation: tjPop .45s cubic-bezier(.3, 1.6, .5, 1) .08s both, tjGlow 1.6s ease-out .6s infinite; }
  .tj-card.is-on .tj-ok { animation: tjIn .5s .45s both; }
  /* 02 reminder: the bell rings, ripples spread */
  .tj-note-ic { position: relative; }
  .tj-note.is-on .tj-note-ic { animation: tjBell 1.1s ease-in-out .25s 2; }
  .tj-note.is-on .tj-note-ic::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--br); animation: tjRipple 1.4s ease-out .2s infinite; }
  /* 03 leaving: the car on the chosen option drives */
  .tj-card.is-on .tj-modes .on i { display: inline-block; animation: tjDrive 1.3s ease-in-out infinite; }
  .tj-card.is-on .tj-modes .on { animation: tjPop .45s cubic-bezier(.3, 1.6, .5, 1) .1s both; }
  /* 04 service: the timer ring fills */
  .tj-card.is-on .tj-ring circle.v { animation: tjFill 1.6s cubic-bezier(.3, .8, .3, 1) .2s both; }
  /* 05 back home: the arrows turn once */
  .tj-card.is-on .tj-card-k .ic-svg { animation: tjTurn .9s cubic-bezier(.3, .8, .3, 1) .15s both; }
  /* 06 summary: the three zeros bounce in */
  .tj-card.is-on .tj-stats span { animation: tjPop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
  .tj-card.is-on .tj-stats span:nth-child(2) { animation-delay: .1s; }
  .tj-card.is-on .tj-stats span:nth-child(3) { animation-delay: .2s; }

  /* scroll cue: the wheel rolls, the arrow nods */
  .tj-mouse::after { animation: tjWheel 1.6s ease-in-out infinite; }
}

@keyframes tjRise { from { opacity: 0; transform: translateY(28px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes tjLine { to { transform: scaleX(1); } }
@keyframes tjPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ac) 55%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
@keyframes tjShine { 0% { transform: translateX(120%); } 40%, 100% { transform: translateX(-120%); } }
@keyframes tjTick { 0% { transform: translateY(-5px); opacity: .4; } 100% { transform: none; opacity: 1; } }
@keyframes tjBlink { 50% { opacity: .25; } }
@keyframes tjPop { 0% { transform: scale(.7); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes tjIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes tjGlow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--br) 50%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
@keyframes tjBell { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
@keyframes tjRipple { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes tjDrive { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-6px); } }
@keyframes tjFill { from { stroke-dashoffset: 113; } to { stroke-dashoffset: 28; } }
@keyframes tjTurn { from { transform: rotate(-180deg); } to { transform: none; } }
@keyframes tjWheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(10px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
/* Reduced motion: theme.css turns every animation off site-wide. In the hero
   the short one-time animations come back, calmer and without loops, so the
   story still feels alive (the same rule Nila follows: calmer, not frozen). */
@media (prefers-reduced-motion: reduce) {
  .tj .tj-ln, .tj .tj-rise { animation: tjRiseCalm .6s cubic-bezier(.2, .8, .2, 1) var(--d, 0s) both !important; }
  .tj .tj-head h1 em::after { animation: tjLine .7s cubic-bezier(.6, 0, .2, 1) .9s forwards !important; }
  html.tj-loading .tj .tj-ln, html.tj-loading .tj .tj-rise, html.tj-loading .tj .tj-head h1 em::after { animation-play-state: paused !important; }
  .tj .tj-clock b.tick { animation: tjTick .3s ease-out !important; }
  .tj .tj-steps li.on .n { animation: tjPop .45s cubic-bezier(.3, 1.6, .5, 1) !important; }
  .tj .tj-steps li.on p { animation: tjIn .4s .06s both !important; }
  .tj .tj-card.is-on > * { animation: tjIn .45s cubic-bezier(.2, .8, .2, 1) both !important; }
  .tj .tj-card.is-on > :nth-child(2) { animation-delay: .06s !important; }
  .tj .tj-card.is-on > :nth-child(3) { animation-delay: .12s !important; }
  .tj .tj-card.is-on > :nth-child(4) { animation-delay: .18s !important; }
  .tj .tj-card.is-on > :nth-child(5) { animation-delay: .24s !important; }
  .tj .tj-card.is-on .tj-slots span { animation: tjPop .4s cubic-bezier(.3, 1.6, .5, 1) both !important; }
  .tj .tj-card.is-on .tj-slots span:nth-child(2) { animation-delay: .07s !important; }
  .tj .tj-card.is-on .tj-slots span:nth-child(3) { animation-delay: .14s !important; }
  .tj .tj-card.is-on .tj-slots span:nth-child(4) { animation-delay: .21s !important; }
  .tj .tj-card.is-on .tj-ok { animation: tjIn .45s .4s both !important; }
  .tj .tj-note.is-on .tj-note-ic { animation: tjBell .9s ease-in-out .2s 1 !important; }
  .tj .tj-note.is-on .tj-note-ic::after { animation: tjRipple 1.3s ease-out .2s 2 both !important; }
  .tj .tj-card.is-on .tj-modes .on { animation: tjPop .4s cubic-bezier(.3, 1.6, .5, 1) .08s both !important; }
  .tj .tj-card.is-on .tj-ring circle.v { animation: tjFill 1.4s cubic-bezier(.3, .8, .3, 1) .15s both !important; }
  .tj .tj-card.is-on .tj-card-k .ic-svg { animation: tjTurn .8s cubic-bezier(.3, .8, .3, 1) .1s both !important; }
  .tj .tj-card.is-on .tj-stats span { animation: tjPop .45s cubic-bezier(.3, 1.6, .5, 1) both !important; }
  .tj .tj-card.is-on .tj-stats span:nth-child(2) { animation-delay: .09s !important; }
  .tj .tj-card.is-on .tj-stats span:nth-child(3) { animation-delay: .18s !important; }
  .tj .tj-mouse::after { animation: tjWheel 2s ease-in-out 3 !important; }
}
@keyframes tjRiseCalm { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }