/* Home hero as a swipeable carousel: Trading (Africa map), Services (build scene), Talk to us (chat). */
.hero { position: relative; padding: 0; overflow: hidden; }
.hero-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide {
  flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always;
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; min-height: 600px; padding: 84px 0 104px;
}
.hero-slide > .hero-inner { position: relative; z-index: 2; width: 100%; max-width: 680px; }
.hero .hero-title { font-size: 46px; line-height: 1.12; margin-bottom: 20px; }
.hero-actions { flex-wrap: wrap; }

/* wide screens: text on the left, the animation on the right */
@media (min-width: 1000px) {
  .hero-slide > .hero-inner { max-width: var(--max-width, 1120px); }
  .hero-slide > .hero-inner > * { max-width: 540px; }
}

/* arrows */
.hero-arrow {
  position: absolute; top: 50%; z-index: 6; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%;
  display: none; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, 0.85); border: 1px solid var(--card-border, #e2dac4); color: var(--ink, #17150f);
  box-shadow: 0 8px 22px rgba(23, 21, 15, 0.12); transition: transform 0.2s ease, background 0.2s ease;
}
.hero-arrow svg { width: 20px; height: 20px; }
.hero-arrow:hover { background: #fff; transform: scale(1.06); }
.hero-arrow.prev { left: 16px; } .hero-arrow.next { right: 16px; }
@media (min-width: 1000px) { .hero-arrow { display: grid; } }

/* three dashes under the hero: the active one fills up as the timer */
.hero-ctrl { position: absolute; left: 0; right: 0; bottom: 20px; z-index: 6; display: flex; justify-content: center; gap: 10px; padding: 0 12px; }
.hero-dot {
  display: flex; align-items: center; width: 72px; min-height: 44px; padding: 0 3px;
  background: none; border: 0; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.hero-dot i { display: block; position: relative; width: 100%; height: 4px; border-radius: 2px; background: rgba(23, 21, 15, 0.16); overflow: hidden; transition: background 0.3s ease; }
.hero-dot:hover i { background: rgba(23, 21, 15, 0.28); }
.hero-dot i::after { content: ""; position: absolute; inset: 0; transform: scaleX(0); transform-origin: left; background: var(--amber-dark, #d9a52f); }
.hero-dot.is-active i::after { animation: hero-fill var(--dur, 8000ms) linear forwards; }
.hero.is-paused .hero-dot.is-active i::after { animation-play-state: paused; }
@keyframes hero-fill { to { transform: scaleX(1); } }

/* slide 3: a chat that plays out */
.tk-scene {
  position: absolute; z-index: 1; right: max(2vw, calc((100% - var(--max-width, 1120px)) / 2 - 20px)); top: 50%;
  width: min(430px, 42vw); height: 410px; margin-top: -215px; pointer-events: none;
}
.tk-phone {
  position: absolute; left: 50%; top: 0; width: 270px; height: 400px; margin-left: -135px; border-radius: 30px; padding: 9px;
  background: #221f17; border: 1px solid #3a3626; box-shadow: 0 30px 60px rgba(23, 21, 15, 0.3);
}
.tk-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 4px; border-radius: 20px 20px 6px 6px; background: #2b2820; color: #f2ecdb; }
.tk-avatar { width: 30px; height: 30px; border-radius: 50%; background: #e8b84b url("/logo-mark.png") center / 70% no-repeat; }
.tk-top b { display: block; font-size: 13px; line-height: 1.1; } .tk-top small { color: #7fd29b; font-size: 11px; }
.tk-chat { height: calc(100% - 56px); border-radius: 6px 6px 21px 21px; background: #141209; padding: 12px 10px; display: flex; flex-direction: column; gap: 9px; overflow: hidden; }
.tk-msg { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: 12.5px; line-height: 1.4; opacity: 0; transform: translateY(12px) scale(0.96); transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.9, 0.2, 1.1); }
.tk-msg.me { align-self: flex-end; background: #e8b84b; color: #1a1305; border-bottom-right-radius: 4px; }
.tk-msg.them { align-self: flex-start; background: #2d2a1f; color: #ece6d3; border-bottom-left-radius: 4px; }
.tk-msg.on { opacity: 1; transform: none; }
.tk-typing { align-self: flex-start; display: none; gap: 4px; padding: 11px 14px; border-radius: 14px; background: #2d2a1f; }
.tk-typing.on { display: inline-flex; }
.tk-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9a937a; animation: tk-dot 1s ease-in-out infinite; }
.tk-typing i:nth-child(2) { animation-delay: 0.15s; } .tk-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes tk-dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
.tk-mail {
  position: absolute; right: 0; top: 36px; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: #fff; color: #17150f; border: 1px solid #e2dac4; box-shadow: 0 14px 30px rgba(23, 21, 15, 0.16);
  opacity: 0; transform: translateY(14px) rotate(-6deg); transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.9, 0.2, 1.2);
}
.tk-mail svg { width: 26px; height: 26px; }
.tk-mail.on { opacity: 1; transform: none; animation: tk-float 4s ease-in-out 0.6s infinite; }
@keyframes tk-float { 50% { transform: translateY(-6px) rotate(3deg); } }
.tk-pill {
  position: absolute; left: 0; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 99px;
  background: #fff; border: 1px solid #e2dac4; font-size: 12px; font-weight: 700; color: #17150f; box-shadow: 0 14px 30px rgba(23, 21, 15, 0.16);
  opacity: 0; transform: translateY(12px) scale(0.94); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.9, 0.2, 1.2);
}
.tk-pill i { width: 9px; height: 9px; border-radius: 50%; background: #2fa56a; }
.tk-pill.on { opacity: 1; transform: none; }
.tk-pill.on i { animation: sv-ping 1.8s ease-out infinite; }
.tk-scene.is-reset .tk-msg, .tk-scene.is-reset .tk-mail, .tk-scene.is-reset .tk-pill { opacity: 0; transition-duration: 0.4s; }

/* phones and tablets: text first, the animation underneath */
@media (max-width: 999px) {
  .hero-slide { flex-direction: column-reverse; align-items: stretch; justify-content: center; min-height: 0; padding: 56px 0 96px; gap: 8px; }
  .hero .hero-title, .hero h1 { font-size: 30px; margin-bottom: 14px; }
  .hero-sub { font-size: 16px; margin-bottom: 22px; }
  .hero-actions { flex-direction: row; gap: 10px; }
  .hero-actions .btn { flex: 1 1 0; padding-left: 10px; padding-right: 10px; font-size: 15px; text-align: center; }
  .hero-slide { padding-top: 40px; padding-bottom: 84px; }
  .hero-ctrl { gap: 6px; } .hero-dot { width: 64px; }
  .sv-scene, .tk-scene { position: relative; right: auto; top: auto; margin: 8px auto 0; width: min(430px, calc(100% - 32px)); height: 230px; }
  .sv-browser { height: 200px; top: 0; width: 100%; }
  .sv-phone, .sv-code { display: none; }
  .sv-live { right: 8px; bottom: 4px; }
  .tk-phone { height: 230px; width: 230px; margin-left: -115px; }
  .tk-chat { padding: 8px; gap: 6px; } .tk-msg { font-size: 11.5px; padding: 6px 10px; }
  .tk-mail { display: none; }
  .tk-pill { bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .tk-msg, .tk-mail, .tk-pill { opacity: 1; transform: none; transition: none; }
  .tk-mail.on { animation: none; }
  .hero-dot.is-active i::after { animation: none; transform: scaleX(1); }
}
