/* The home page hero: three products in turn (Trade Copier, Custom bots, Backtest Analyzer).
   Slides share one grid cell, so the hero is as tall as the tallest slide and nothing jumps when they change. */
.hero .wrap.hs { display: block; }
.hero { overflow-x: clip; }
.hs-stage { display: grid; touch-action: pan-y; min-width: 0; }
/* pinned while scrolling through the products (big screens; the page script sets top and --hs-run) */
.hero.hs-pin::after { content: ""; display: block; height: var(--hs-run, 0px); }   /* room to scroll through (padding wouldn't hold a sticky box) */
.hero.hs-pin .wrap.hs { position: sticky; z-index: 1; }
.hero.hs-pin .hs-tabs { margin-top: 24px; }
.hs.hs-manual .hs-tab[aria-selected="true"] .hs-fill { animation: none; width: 100%; }
.hs-slide > * { min-width: 0; }   /* the code panel's long lines mustn't widen the column */
.hs-slide {
  grid-area: 1 / 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; visibility: hidden;
  /* --hs-d: wait for the old slide to leave · --hs-t: when the words start · --hs-c: from the picture's column to the
     middle of the hero · --hs-from: the side the words come in from */
  --hs-d: .35s; --hs-t: 1.05s; --hs-c: calc(-50% - 24px); --hs-from: -34px;
}
.hs-slide.is-on, .hs-slide.is-out { visibility: visible; }
.hs-slide.is-out { pointer-events: none; }
.hs:not(.hs-moved) .hs-slide { --hs-d: 0s; }   /* the first slide on page load has nothing to wait for */
/* Copier and Analyzer have the picture on the left and the words on the right; Custom bots the other way round */
.hs-slide.vis-left { grid-template-columns: 1fr 1.05fr; --hs-c: calc(50% + 24px); --hs-from: 34px; }
.vis-left > .hs-visual { grid-column: 1; grid-row: 1; }
.vis-left > .hs-text { grid-column: 2; grid-row: 1; }

/* Each slide comes in as a short sequence: the picture zooms in at the middle, glides to its side, then the words come
   in from the other side, the headline word by word and the chips one after another. The old slide fades out first. */
.is-on > .hs-visual { animation: hs-vis-in 1.7s var(--hs-d) both; }
@keyframes hs-vis-in {
  0% { opacity: 0; translate: var(--hs-c) 0; scale: .82; animation-timing-function: cubic-bezier(.2, .8, .3, 1); }
  34% { opacity: 1; translate: var(--hs-c) 0; scale: 1.05; }
  44% { opacity: 1; translate: var(--hs-c) 0; scale: 1.05; animation-timing-function: cubic-bezier(.65, 0, .25, 1); }
  100% { opacity: 1; translate: 0 0; scale: 1; }
}
.hs-text > * { --k: 0; }
.hs-text > :nth-child(2) { --k: 1; }
.hs-text > :nth-child(3) { --k: 7; }   /* after the headline's words */
.hs-text > :nth-child(4) { --k: 8; }
.hs-text > :nth-child(5) { --k: 9; }
.hs-text > :nth-child(6) { --k: 10; }
.is-on > .hs-text > * { animation: hs-side .75s cubic-bezier(.2, .8, .3, 1) both; animation-delay: calc(var(--hs-d) + var(--hs-t) + var(--k) * 90ms); }
.is-on > .hs-text > .is-split { animation: none; }
.is-split .w { display: inline-block; }
.is-split .grad { background-image: none; }
.is-split .gw { background-image: var(--g); -webkit-background-clip: text; background-clip: text; color: transparent; background-repeat: no-repeat; }
.is-on .is-split .w { animation: hs-rise .7s cubic-bezier(.2, .8, .3, 1) both; animation-delay: calc(var(--hs-d) + var(--hs-t) + 90ms + var(--i) * 55ms); }
.is-on .chips.is-split span { animation: hs-rise .55s cubic-bezier(.2, .8, .3, 1) both; animation-delay: calc(var(--hs-d) + var(--hs-t) + 900ms + var(--i) * 45ms); }
@keyframes hs-side { from { opacity: 0; translate: var(--hs-from) 0; filter: blur(6px); } to { opacity: 1; translate: 0 0; filter: none; } }
@keyframes hs-rise { from { opacity: 0; translate: 0 .55em; filter: blur(5px); } to { opacity: 1; translate: 0 0; filter: none; } }
.is-out > .hs-visual { animation: hs-vis-out .4s ease both; }
.is-out > .hs-text { animation: hs-text-out .32s ease both; }
@keyframes hs-vis-out { to { opacity: 0; scale: .92; } }
@keyframes hs-text-out { to { opacity: 0; translate: calc(var(--hs-from) * -.5) 0; filter: blur(4px); } }
/* the other slides' headlines look like the first slide's h1 (one h1 per page) */
.hero .hs-title {
  font-family: "Jost", "Inter", sans-serif; text-transform: uppercase; text-wrap: balance;
  font-size: clamp(27px, 3.1vw, 42px); line-height: 1.32; letter-spacing: .16em; max-width: 21ch; font-weight: 700;
}
.hero .hs-title .grad { font-weight: 700; }

/* the product tabs under the slides; the bar fills while a slide is shown, then the next one comes */
.hs-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 44px; max-width: 760px; }
.hs-tab {
  appearance: none; background: transparent; border: 0; padding: 0 0 4px; text-align: left; cursor: pointer;
  color: var(--mute); font: 500 14px/1.3 "Inter", sans-serif; letter-spacing: .02em;
}
.hs-tab small { display: block; font-size: 12px; color: var(--mute); opacity: .75; margin-top: 2px; font-weight: 400; }
.hs-tab:hover, .hs-tab[aria-selected="true"] { color: #fff; }
.hs-track { display: block; height: 2px; border-radius: 2px; background: var(--hair-soft); margin-bottom: 10px; overflow: hidden; }
.hs-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #A9C6EA, #fff); }
.hs-tab[aria-selected="true"] .hs-fill { animation: hs-fill var(--hs-time, 8s) linear forwards; }
.hs.is-paused .hs-tab[aria-selected="true"] .hs-fill { animation-play-state: paused; }
@keyframes hs-fill { from { width: 0; } to { width: 100%; } }

/* ---------- drawn product panels (slides 2 and 3) ---------- */
.mock {
  position: relative; border: 1px solid var(--hair); border-radius: 20px; box-shadow: var(--lift);
  background: linear-gradient(160deg, #1B2A44 0%, #131D2F 100%); padding: 0 0 18px; overflow: hidden;
  font-family: "Inter", sans-serif; color: var(--ink);
}
.mock-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--hair-soft); background: rgba(10, 16, 28, .35); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(200, 218, 240, .22); }
.mock-bar span { margin-left: 8px; font-size: 12.5px; color: var(--mute); }
.mock-bar b { margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8FD6B8; }

/* bot: code, then the backtest curve, then a Telegram alert */
.code {
  margin: 0; padding: 16px 18px 4px; font: 12.5px/1.75 ui-monospace, "Cascadia Code", Consolas, monospace; color: #C9D6EA;
  white-space: pre; overflow: hidden;
}
.code .l { display: block; }
.code .k { color: #9DB7FF; } .code .t { color: #8FD6B8; } .code .f { color: #F2D38A; } .code .n { color: #F2A07B; } .code .c { color: #6F819D; }
.bt { margin: 10px 18px 0; padding: 12px 14px 8px; border-radius: 14px; background: var(--well); border: 1px solid var(--hair-soft); }
.bt-head { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--mute); }
.bt-head b { color: #8FD6B8; font-weight: 600; }
.bt svg { display: block; width: 100%; height: 86px; margin-top: 6px; }
.bt .curve { fill: none; stroke: #8FD6B8; stroke-width: 2; stroke-linejoin: round; stroke-dasharray: 900; stroke-dashoffset: 0; }
.bt .area { fill: url(#hsArea); }
.toast {
  position: absolute; right: 14px; top: 56px; max-width: 290px; display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: 14px; background: rgba(23, 35, 58, .96); border: 1px solid var(--hair); box-shadow: 0 14px 30px rgba(5, 9, 18, .55);
  font-size: 12px; line-height: 1.45; color: var(--mute);
}
.toast svg { flex: none; width: 26px; height: 26px; }
.toast b { display: block; color: #fff; font-weight: 600; font-size: 12.5px; }

/* analyzer: the file, the headline numbers, the yearly matrix */
.drop {
  display: flex; align-items: center; gap: 10px; margin: 16px 18px 0; padding: 10px 14px; border-radius: 12px;
  border: 1px dashed var(--hair); font-size: 12.5px; color: var(--mute);
}
.drop b { color: #fff; font-weight: 600; }
.drop em { margin-left: auto; font-style: normal; color: #8FD6B8; font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 18px 0; }
.kpis div { padding: 10px 12px; border-radius: 12px; background: var(--well); border: 1px solid var(--hair-soft); }
.kpis span { display: block; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.kpis b { display: block; margin-top: 3px; font: 600 16px/1.2 ui-monospace, Consolas, monospace; color: #fff; }
.kpis .up { color: #8FD6B8; } .kpis .down { color: #F2909C; }
.ym { margin: 12px 18px 0; display: grid; grid-template-columns: 38px repeat(12, 1fr) 54px; gap: 4px; font-size: 10.5px; color: var(--mute); }
.ym > span { text-align: center; }
.ym > span:first-child, .ym .yr { text-align: left; }
.ym .yr { color: var(--ink); font-weight: 600; align-self: center; }
.ym i { display: block; height: 22px; border-radius: 5px; background: rgba(200, 218, 240, .07); }
.ym i.p1 { background: rgba(143, 214, 184, .28); } .ym i.p2 { background: rgba(143, 214, 184, .5); } .ym i.p3 { background: rgba(143, 214, 184, .78); }
.ym i.n1 { background: rgba(242, 144, 156, .32); } .ym i.n2 { background: rgba(242, 144, 156, .6); }
.ym .tot { align-self: center; text-align: right; font: 600 11.5px ui-monospace, Consolas, monospace; color: #8FD6B8; }
.ym .tot.neg { color: #F2909C; }
.an-foot { margin: 12px 18px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.an-foot span { font-size: 11.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--hair-soft); color: var(--mute); }
.an-foot span.on { color: #fff; border-color: var(--hair); background: rgba(200, 218, 240, .08); }

/* entrance of the panel's parts when its slide comes in */
.is-on .code .l { animation: hs-in .4s ease both; animation-delay: calc(var(--i, 0) * 70ms); }
.is-on .bt .curve { animation: hs-draw 1.6s ease-out .6s both; }
.is-on .toast { animation: hs-pop .5s cubic-bezier(.2, .9, .3, 1.2) 2.1s both; }
.is-on .kpis div { animation: hs-in .45s ease both; animation-delay: calc(.25s + var(--i, 0) * 90ms); }
.is-on .ym i { animation: hs-cell .35s ease both; animation-delay: calc(.6s + var(--i, 0) * 18ms); }
@keyframes hs-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes hs-draw { from { stroke-dashoffset: 900; } to { stroke-dashoffset: 0; } }
@keyframes hs-pop { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes hs-cell { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

@media (max-width: 980px) {
  .hs-slide, .hs-slide.vis-left { grid-template-columns: 1fr; gap: 36px; --hs-c: 0px; --hs-t: .5s; --hs-from: 0px; }
  .vis-left > .hs-visual, .vis-left > .hs-text { grid-column: auto; grid-row: auto; }
  .hs-visual { max-width: 640px; }
}
@media (max-width: 760px) {
  .hero .hs-title { letter-spacing: .1em; font-size: 25px; }
  .hs-tabs { gap: 8px; margin-top: 32px; }
  .hs-tab { font-size: 12.5px; }
  .hs-tab small { display: none; }
  .code { font-size: 11px; padding: 12px 14px 2px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .ym { grid-template-columns: 32px repeat(12, 1fr) 46px; gap: 3px; font-size: 9.5px; }
  .ym i { height: 16px; border-radius: 4px; }
  .toast { position: static; margin: 12px 14px 0; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .is-on > .hs-visual, .is-on > .hs-text > *, .is-on .is-split .w, .is-on .chips.is-split span,
  .is-out > .hs-visual, .is-out > .hs-text { animation: none; }
  .hs-slide.is-out { visibility: hidden; }
  .is-on .code .l, .is-on .bt .curve, .is-on .toast, .is-on .kpis div, .is-on .ym i { animation: none; }
  .hs-tab[aria-selected="true"] .hs-fill { animation: none; width: 100%; }
}

/* ---------- copier slide: the copy flow (master on the left, slaves on the right; lines drawn by the page script) ---------- */
.mock-bar b.live { display: inline-flex; align-items: center; gap: 6px; }
.mock-bar b.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8FD6B8; box-shadow: 0 0 0 0 rgba(143, 214, 184, .6); animation: hs-live 1.8s ease-out infinite; }
@keyframes hs-live { to { box-shadow: 0 0 0 8px rgba(143, 214, 184, 0); } }
.cf { position: relative; display: grid; grid-template-columns: 1fr 1.08fr; column-gap: 54px; align-items: center; padding: 20px 18px 2px; }
.cf-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.cf-lines path { fill: none; stroke: rgba(200, 218, 240, .2); stroke-width: 1.5; stroke-dasharray: 4 5; transition: stroke .3s; }
.cf-lines path.hot { stroke: rgba(169, 198, 234, .7); }
.cf-lines .pkt { fill: #fff; filter: drop-shadow(0 0 6px rgba(169, 198, 234, .95)); }
.cf-slaves { display: grid; gap: 10px; }
.acct { position: relative; z-index: 1; padding: 11px 12px; border-radius: 14px; background: var(--well); border: 1px solid var(--hair-soft); }
.acct.master { border-color: var(--hair); background: rgba(27, 42, 68, .9); padding: 14px; }
.acct-h { display: flex; align-items: center; gap: 9px; }
.acct-h img { border-radius: 7px; flex: none; object-fit: contain; background: #fff; padding: 2px; }   /* as in the Platforms section */
.acct-h img.wide { padding: 4px 5px; }
.acct-h b { display: block; font-size: 12.5px; font-weight: 600; color: #fff; line-height: 1.25; }
.acct-h small { display: block; font-size: 11px; color: var(--mute); line-height: 1.3; }
.order { display: flex; align-items: center; gap: 7px; margin-top: 9px; font-size: 12px; color: var(--mute); white-space: nowrap; min-height: 21px; }
.order .sym { color: var(--ink); font: 600 12px ui-monospace, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; }
.order .lots { margin-left: auto; font: 500 11.5px ui-monospace, Consolas, monospace; }
.order .side:empty { display: none; }
.order .side { font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; }
.order .side.buy { color: #8FD6B8; background: rgba(143, 214, 184, .14); }
.order .side.sell { color: #F2909C; background: rgba(242, 144, 156, .14); }
.order .side.part { color: #F2D38A; background: rgba(242, 211, 138, .14); }
.acct-f { margin-top: 5px; font-size: 10.5px; color: #8FD6B8; min-height: 14px; }
.acct.master .acct-f { color: var(--mute); }
.acct.flash { animation: hs-flash .9s ease; }
@keyframes hs-flash { 0% { border-color: #A9C6EA; box-shadow: 0 0 0 3px rgba(169, 198, 234, .25); } 100% { border-color: var(--hair-soft); box-shadow: none; } }
.acct.master.flash { animation-name: hs-flash-m; }
@keyframes hs-flash-m { 0% { border-color: #fff; box-shadow: 0 0 0 4px rgba(169, 198, 234, .3); } 100% { border-color: var(--hair); box-shadow: none; } }
@media (max-width: 760px) {
  .cf { column-gap: 26px; padding: 14px 12px 0; grid-template-columns: .95fr 1.05fr; }
  .acct, .acct.master { padding: 9px; }
  .acct-h { gap: 7px; }
  .acct-h img { width: 22px; height: 22px; }
  .acct-h img.wide { width: 44px; }
  .acct-h b { font-size: 11.5px; }
  .acct-h small { font-size: 10px; }
  .order { flex-wrap: wrap; gap: 4px 6px; font-size: 11px; }
  .order .lots { margin-left: 0; font-size: 10.5px; }
  .acct-f { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .mock-bar b.live::before, .acct.flash { animation: none; }
}

/* ---------- the live scenes (hero-scenes/*.html), in front of the drawn panels, which are the fallback ---------- */
.hs-live { display: none; position: relative; width: 100%; aspect-ratio: 520 / 430; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--hair); box-shadow: var(--lift); background: #141E30; }
.hs-live iframe { position: absolute; left: 0; top: 0; width: 520px; height: 430px; border: 0; transform-origin: 0 0; pointer-events: none; }
.has-live .hs-live { display: block; }
.has-live .mock, .has-live .shot { display: none; }
