/* Preloader, hero slider, scroll reveals. All motion is off under prefers-reduced-motion. */
[dir="ltr"] .flip-back { transform: scaleX(-1); }

/* ------------------------------------------------------------ preloader */
.preloader { display: none; }
.is-preloading .preloader { display: grid; position: fixed; inset: 0; z-index: 1000; place-items: center; background: var(--forest-deep); color: #fff; transition: transform .7s cubic-bezier(.7,0,.2,1), opacity .4s; }
.is-preloading body { overflow: hidden; }
.preloader.is-done { transform: translateY(-100%); }
.pl-inner { display: grid; justify-items: center; gap: 18px; width: min(280px, 70vw); }
.pl-inner img { width: 56px; height: 56px; animation: pl-pop .5s cubic-bezier(.3,1.6,.5,1) both; }
.pl-line { width: 100%; height: auto; overflow: visible; }
.pl-line path { fill: none; stroke: var(--signal); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: pl-draw 1.1s cubic-bezier(.6,.05,.25,1) .15s forwards; }
.pl-meta { width: 100%; display: flex; justify-content: space-between; font-size: var(--fs-sm); color: rgba(255,255,255,.7); }
.pl-num { color: var(--signal); font-variant-numeric: tabular-nums; }
@keyframes pl-draw { to { stroke-dashoffset: 0; } }
@keyframes pl-pop { from { transform: scale(.4); opacity: 0; } }
/* hold page animations until the preloader lifts */
.is-preloading .hx-slide.is-active .hx-copy > *, .is-preloading .hx-slide.is-active .hx-card { animation-play-state: paused; }

/* ------------------------------------------------------------ hero slider */
.hx { position: relative; color: #fff; background: var(--forest-deep); overflow: hidden; height: clamp(540px, calc(100vh - var(--header-h)), 880px); height: clamp(540px, calc(100svh - var(--header-h)), 880px); display: grid; }
.hx-slides { position: relative; display: grid; }
.hx-slides { min-height: 0; }
.hx-slide { grid-area: 1 / 1; position: relative; display: grid; align-items: center; padding-block: clamp(24px, 5vh, 64px) clamp(120px, 17vh, 150px); opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s .9s; isolation: isolate; }
.hx-slide.is-active { opacity: 1; visibility: visible; transition: opacity .9s ease, visibility 0s; z-index: 1; }
.hx-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hx-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 7.5s linear; }
.hx-slide.is-active .hx-bg img { transform: scale(1); }
.hx-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,20,13,.25) 0%, rgba(7,20,13,.88) 62%), linear-gradient(0deg, rgba(7,20,13,.95) 0%, rgba(7,20,13,0) 45%); }
[dir="ltr"] .hx-bg::after { background: linear-gradient(270deg, rgba(7,20,13,.25) 0%, rgba(7,20,13,.88) 62%), linear-gradient(0deg, rgba(7,20,13,.95) 0%, rgba(7,20,13,0) 45%); }
.hx-grad { position: absolute; inset: 0; background: radial-gradient(60% 80% at 20% 30%, rgba(5,239,98,.25), transparent 60%), radial-gradient(50% 60% at 85% 80%, rgba(5,239,98,.12), transparent 60%), linear-gradient(160deg, #0f3d27, #07140d 70%); }
.hx-grad::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent); }
.hx-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 400px); gap: clamp(28px, 5vw, 80px); align-items: center; }
.hx-copy { display: grid; gap: 18px; justify-items: start; }
.hx-stage { color: var(--signal); }
[dir="rtl"] .hx-stage { justify-self: start; }
.hx-h { font-size: clamp(2rem, min(5vw, 7.4vh), 4.25rem); line-height: 1.08; letter-spacing: -0.01em; max-width: 15ch; text-wrap: balance; }
.hx-p { font-size: clamp(var(--fs-md), 2.2vh, var(--fs-lg)); color: rgba(255,255,255,.82); max-width: 50ch; line-height: 1.6; }
.hx-ctas .btn-line { color: #fff; border-color: rgba(255,255,255,.4); }
/* staggered entrance on the active slide */
.hx-slide.is-active .hx-copy > * { animation: hx-up .8s cubic-bezier(.2,.8,.2,1) both; }
.hx-slide.is-active .hx-copy > :nth-child(1) { animation-delay: .15s; }
.hx-slide.is-active .hx-copy > :nth-child(2) { animation-delay: .25s; }
.hx-slide.is-active .hx-copy > :nth-child(3) { animation-delay: .38s; }
.hx-slide.is-active .hx-copy > :nth-child(4) { animation-delay: .5s; }
.hx-slide.is-active .hx-card { animation: hx-card 1s cubic-bezier(.2,.8,.2,1) .35s both; }
@keyframes hx-up { from { opacity: 0; transform: translateY(28px); } }
@keyframes hx-card { from { opacity: 0; transform: translateY(40px) rotate(-2deg) scale(.96); } }

.hx-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: var(--r-lg); padding: 20px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); display: grid; gap: 16px; }
.hx-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: rgba(255,255,255,.7); }
.hx-card .xa-live { color: #fff; }
.hx-card .xa-live i { animation: hx-pulse 1.6s ease-in-out infinite; }
@keyframes hx-pulse { 50% { box-shadow: 0 0 0 8px rgba(5,239,98,0); } }
.hx-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255,255,255,.12); border-radius: 14px; overflow: hidden; }
.hx-m { background: rgba(7,20,13,.55); padding: 14px; display: grid; gap: 2px; }
.hx-m > span { font-size: var(--fs-xs); color: rgba(255,255,255,.6); }
.hx-m b { font-size: clamp(1.25rem, 2vw, 1.625rem); font-variant-numeric: tabular-nums; line-height: 1.2; }
.hx-big { color: var(--signal); }
.hx-bars { display: flex; align-items: flex-end; gap: 5px; height: 64px; direction: ltr; }
.hx-bars i { flex: 1; height: var(--h); background: linear-gradient(180deg, var(--signal), rgba(5,239,98,.25)); border-radius: 3px 3px 0 0; transform-origin: bottom; }
.hx-slide.is-active .hx-bars i { animation: hx-bar .9s cubic-bezier(.2,.8,.2,1) both; }
.hx-bars i:nth-child(n) { animation-delay: calc(.5s + var(--h) * .006s); }
@keyframes hx-bar { from { transform: scaleY(0); } }
.hx-seats { display: grid; gap: 8px; font-size: var(--fs-xs); color: rgba(255,255,255,.7); }
.hx-seats i { height: 6px; border-radius: 6px; background: rgba(255,255,255,.14); position: relative; overflow: hidden; }
.hx-seats i::after { content: ""; position: absolute; inset: 0; inset-inline-end: 28%; background: var(--signal); border-radius: inherit; }
.hx-slide.is-active .hx-seats i::after { animation: hx-fill 1.4s cubic-bezier(.2,.8,.2,1) .6s both; }
@keyframes hx-fill { from { inset-inline-end: 100%; } }
.hx-chat { display: grid; gap: 8px; }
.hx-chat p { background: #fff; color: #111; padding: 8px 12px; border-radius: 12px; font-size: var(--fs-xs); line-height: 1.5; max-width: 92%; }
.hx-chat p:nth-child(even) { justify-self: end; background: #d9fdd3; }
.hx-slide.is-active .hx-chat p { animation: hx-up .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.9s + var(--d) * .45s); }

.hx-nav { position: absolute; inset-inline: 0; bottom: 0; z-index: 3; padding-block: 28px 22px; background: linear-gradient(0deg, rgba(7,20,13,.85), rgba(7,20,13,0)); }
.hx-nav-in { display: flex; gap: 20px; align-items: flex-end; }
.hx-tabs { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.hx-tab { display: grid; gap: 6px; text-align: start; color: rgba(255,255,255,.55); background: none; border: 0; padding: 0; cursor: pointer; font: inherit; transition: color .3s; }
.hx-tab:hover, .hx-tab.is-active { color: #fff; }
.hx-tab-bar { height: 3px; background: rgba(255,255,255,.2); border-radius: 3px; overflow: hidden; }
.hx-tab-bar i { display: block; height: 100%; width: 100%; background: var(--signal); transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .hx-tab-bar i { transform-origin: right; }
.hx-tab.is-done .hx-tab-bar i { transform: scaleX(1); }
.hx-tab.is-active .hx-tab-bar i { animation: hx-progress var(--hx-dur, 6.5s) linear forwards; }
.hx.is-paused .hx-tab.is-active .hx-tab-bar i { animation-play-state: paused; }
@keyframes hx-progress { to { transform: scaleX(1); } }
.hx-tab-en { font-size: 11px; color: var(--signal); opacity: .8; text-align: start; }
[dir="rtl"] .hx-tab-en { text-align: right; }
.hx-tab-t { font-weight: 600; font-size: var(--fs-sm); }
.hx-ctrl { display: flex; gap: 8px; }
.hx-ctrl .icon-btn { color: #fff; border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.06); }
.hx-pause { width: 10px; height: 12px; border-inline: 3px solid currentColor; }
.hx.is-paused .hx-pause { width: 0; height: 0; border: 0; border-block: 6px solid transparent; border-inline-start: 10px solid currentColor; }

/* ------------------------------------------------------------ scroll reveal + misc */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--rv, 0) * 80ms); }
.js .rv.in { opacity: 1; transform: none; }
.js .xa-chart:not(.in) .xa-line, .js .xa-chart:not(.in) .xa-pt, .js .xa-chart:not(.in) .xa-peak { animation-play-state: paused; }
.site-header { transition: box-shadow .3s, background .3s; }
.site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(0,0,0,.35); }
.card, .plan, .hm-track, .path, .tile { transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .2s; }
.card:hover, .hm-track:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); }
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s ease; }
.btn-primary:hover::after { transform: translateX(120%); }
.wa-float { animation: wa-bob 3.5s ease-in-out 2s infinite; }
@keyframes wa-bob { 0%, 100% { transform: none; } 50% { transform: translateY(-5px); } }

@media (max-width: 900px) {
  .hx { height: auto; min-height: 0; }
  .hx-slide { padding-block: 48px 132px; }
  .hx-body { grid-template-columns: minmax(0, 1fr); }
  .hx-card { display: none; }
  .hx-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .hx-tab-en, .hx-tab-t { display: none; }
  .hx-tab.is-active .hx-tab-t { display: block; position: absolute; bottom: 64px; inset-inline-start: var(--gutter); }
  .hx-nav-in { align-items: center; }
  .hx-ctrl .icon-btn { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .is-preloading .preloader { display: none; }
  .hx-slide, .hx-bg img { transition: none; } .hx-bg img { transform: none; }
  .hx-slide.is-active .hx-copy > *, .hx-slide.is-active .hx-card, .hx-slide.is-active .hx-bars i, .hx-slide.is-active .hx-chat p, .hx-slide.is-active .hx-seats i::after { animation: none; }
  .hx-tab.is-active .hx-tab-bar i { animation: none; transform: scaleX(1); }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .wa-float, .hx-card .xa-live i { animation: none; }
}
.hx-ctrl { margin-inline-end: 72px; } @media (max-width: 900px) { .hx-ctrl { margin-inline-end: 64px; } }
