/*
  Small custom additions that plain Tailwind utility classes can't express.
  Everything else in the UI is styled directly with Tailwind classes in the
  templates.
*/

/* Subtle dot texture behind the hero, for a light background. */
.dot-grid-light {
  background-image: radial-gradient(rgba(11, 18, 32, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* ── Serif accent ─────────────────────────────────────────────────────────
   Italic serif word dropped into the sans-serif headline, for contrast. */
.serif-accent {
  font-family: "Source Serif 4", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* ── Animated hero backdrop ───────────────────────────────────────────────
   Four layers stacked behind the hero content, each moving at a different
   speed so the motion reads as depth rather than one flat sliding texture.
   All of it is decorative: .hero-bg is aria-hidden and pointer-events:none
   so it never intercepts clicks or reaches a screen reader. */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* 1. Dot grid that drifts diagonally, looping seamlessly by translating
      exactly one tile (26px) before restarting. */
.hero-grid {
  position: absolute;
  inset: -60px;
  background-image: radial-gradient(rgba(11, 18, 32, 0.13) 1px, transparent 1px);
  background-size: 26px 26px;
  animation: grid-drift 24s linear infinite;
}
@keyframes grid-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(26px, 26px, 0); }
}

/* 2. Signal rings rippling outward from the centre - a nod to the mobile
      network the payments actually travel over. Three copies on the same
      6s loop, each started 2s apart, so a new ring leaves the centre just
      as the previous one is halfway out. */
.hero-ring {
  position: absolute;
  top: 42%;
  left: 50%;
  width: 340px;
  height: 340px;
  margin: -170px 0 0 -170px;
  border: 1.5px solid #3363e8;
  border-radius: 9999px;
  opacity: 0;
  animation: ring-out 6s ease-out infinite;
}
/* Explicit classes rather than :nth-of-type - every child of .hero-bg is a
   div, so nth-of-type would count the orbs and grid too and land the
   delays on the wrong elements. */
.hero-ring--2 { animation-delay: -2s; }
.hero-ring--3 { animation-delay: -4s; }
@keyframes ring-out {
  0%   { transform: scale(0.3); opacity: 0; }
  12%  { opacity: 0.5; }
  100% { transform: scale(3.4); opacity: 0; }
}

/* 3. Wide arcs that breathe in and out from both edges. */
.hero-arc {
  position: absolute;
  top: 50%;
  height: 820px;
  width: 40%;
  border: 2px solid #3363e8;
  opacity: 0;
  transform: translateY(-50%);
  animation: arc-pulse 7s ease-in-out infinite;
}
.hero-arc--l {
  left: -2px;
  border-left: none;
  border-radius: 0 80% 80% 0 / 0 50% 50% 0;
}
.hero-arc--r {
  right: -2px;
  border-right: none;
  border-radius: 80% 0 0 80% / 50% 0 0 50%;
  animation-delay: -3.5s;
}
@keyframes arc-pulse {
  0%   { opacity: 0;    transform: translateY(-50%) scale(1); }
  18%  { opacity: 0.3; }
  70%  { opacity: 0.14; }
  100% { opacity: 0;    transform: translateY(-50%) scale(0.85); }
}

/* 3. Soft colour orbs drifting slowly on their own paths. */
.hero-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(70px);
}
.hero-orb--a {
  width: 440px; height: 440px;
  background: #bbcffc;
  opacity: 0.55;
  top: -140px; left: 6%;
  animation: orb-a 19s ease-in-out infinite;
}
.hero-orb--b {
  width: 380px; height: 380px;
  background: #dbe6fe;
  opacity: 0.6;
  bottom: -160px; right: 4%;
  animation: orb-b 23s ease-in-out infinite;
}
@keyframes orb-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(45px, 35px) scale(1.08); }
}
@keyframes orb-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-55px, -30px) scale(1.1); }
}

/* 4. A slow diagonal sheen sweeping across everything above. */
.hero-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(51, 99, 232, 0.07) 50%, transparent 65%);
  background-size: 250% 100%;
  animation: sheen 11s ease-in-out infinite;
}
@keyframes sheen {
  0%   { background-position: 130% 0; }
  100% { background-position: -30% 0; }
}

/* ── Marquee ──────────────────────────────────────────────────────────────
   The track holds the chip list twice over and slides exactly -50%, so the
   second copy lands where the first started and the loop is seamless. The
   mask fades both edges instead of cutting chips off mid-word. */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-left 34s linear infinite;
}

/* Speed is per-strip: the country row is long and sits behind the fold, so
   it drifts slowly; the little ticker above the headline moves a bit
   faster because it's short and meant to be read. */
.marquee-track--countries { animation-duration: 150s; }
.marquee-track--ticker    { animation-duration: 45s; }
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-group {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 14px;
}
@keyframes marquee-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Larger flag for the country strip on the landing page. flag-icons sizes
   itself from font-size, so an explicit box is clearer here. */
.country-flag-lg {
  width: 46px;
  height: 34px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* ── Footer ───────────────────────────────────────────────────────────── */

/* The brand mark turns continuously. */
.spin-slow { animation: spin-slow 16s linear infinite; }
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Oversized ghost wordmark drifting across the footer. Same two-copies-
   and-slide--50% trick as the network marquee, just much slower. */
.wordmark-track {
  display: flex;
  width: max-content;
  animation: marquee-left 45s linear infinite;
}
.wordmark {
  font-size: clamp(4rem, 11vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.055);
  padding-right: 3rem;
  white-space: nowrap;
  user-select: none;
}

/* Soft glow anchored to the footer's bottom-right corner. */
.footer-orb {
  position: absolute;
  right: -80px;
  bottom: -140px;
  width: 380px;
  height: 380px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(51, 99, 232, 0.22), transparent 68%);
  pointer-events: none;
}

/* Respect people who've asked their OS to reduce motion. */
@media (prefers-reduced-motion: reduce) {
  .hero-grid,
  .hero-arc,
  .hero-ring,
  .hero-orb,
  .hero-sheen,
  .marquee-track,
  .wordmark-track,
  .spin-slow {
    animation: none !important;
  }
  .hero-arc  { opacity: 0.12; }
  .hero-ring { opacity: 0.18; }
}
