/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(36px, 6vw, 84px) clamp(56px, 7vw, 104px);
}

/* Soft neutral ground + faint dot grid + a whisper of brand red behind the globe */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(48% 60% at 76% 46%, rgba(216, 38, 26, 0.075), transparent 70%),
    radial-gradient(40% 55% at 4% 0%, #f1f2f4 0%, transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #fafafb 100%);
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(20, 20, 20, 0.1) 1px, transparent 1.3px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(60% 65% at 74% 46%, #000 0%, transparent 78%);
  mask-image: radial-gradient(60% 65% at 74% 46%, #000 0%, transparent 78%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-line) 20%, var(--c-line) 80%, transparent);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}

/* --------------------------------------------------------------------------
   Copy column
   -------------------------------------------------------------------------- */

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero-title {
  margin: 0;
  color: var(--c-ink);
  font-size: clamp(2.6rem, 1.3rem + 4.3vw, 4.85rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-title .line {
  display: block;
  overflow: hidden;
  /* room for descenders inside the clipping mask */
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

.hero-title .line-inner {
  display: inline-block;
  animation: line-up 1.05s var(--ease-out) 0.1s both;
}

.hero-title .line + .line .line-inner {
  animation-delay: 0.22s;
}

.hero-title .accent {
  color: var(--c-red);
}

/* optical kerning for the full stops at display size */
.hero-title .punct {
  margin-left: -0.05em;
}

.hero-lede {
  max-width: 31em;
  margin: 24px 0 0;
  color: var(--c-muted);
  font-size: clamp(1.02rem, 0.95rem + 0.35vw, 1.18rem);
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* Trust indicators -------------------------------------------------------- */

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin: 44px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--c-line);
  list-style: none;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--c-muted);
  font-size: 0.9rem;
  line-height: 1.3;
}

.trust-item strong {
  display: block;
  color: var(--c-ink);
  font-weight: 700;
}

.trust-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  background: #fff;
  color: var(--c-red);
  box-shadow: var(--shadow-sm);
  font-size: 1rem;
}

/* Staggered entrance for supporting elements */
.reveal {
  animation: fade-up 0.9s var(--ease-out) both;
  animation-delay: var(--delay, 0s);
}

/* --------------------------------------------------------------------------
   Visual column — globe, orbit, notes, floating symbols
   All sizes inside the stage use container units (cqi) so the composition
   scales as one piece.
   -------------------------------------------------------------------------- */

.hero-visual {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 640px;
}

.visual-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  container-type: inline-size;
  animation: visual-in 1.4s var(--ease-out) 0.2s both;
}

/* Globe ------------------------------------------------------------------- */

.globe {
  position: absolute;
  inset: 13%;
  z-index: 1;
  border-radius: 50%;
}

.globe-sphere,
.globe-canvas,
.globe-shine {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.globe-sphere {
  background: radial-gradient(circle at 34% 28%, #ffffff 0%, #f7f7f8 28%, #e9eaed 60%, #d6d8dc 86%, #c9ccd1 100%);
  box-shadow:
    0 50px 90px -40px rgba(20, 20, 20, 0.45),
    0 24px 60px -30px rgba(216, 38, 26, 0.3),
    inset -22px -30px 70px rgba(20, 20, 20, 0.12),
    inset 12px 14px 36px rgba(255, 255, 255, 0.9);
}

.globe-shine {
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 36%),
    radial-gradient(circle at 72% 86%, rgba(20, 20, 20, 0.08), transparent 55%);
}

/* Orbit ------------------------------------------------------------------- */

.orbit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.orbit--back {
  z-index: 0;
}

.orbit--front {
  z-index: 2;
}

/* Currency composition ----------------------------------------------------
   One fan, two currencies. Both assets are 1514 × 1039 cut-outs of an already
   fanned stack. They share a single base point low on the globe's right side:
   the euro stack opens up and to the left (behind), the dollar stack opens to
   the right (in front). Each <img> rotates about the corner that sits on that
   shared base, so the pair reads as one hand-spread fan rather than two decks.
   The figure fills the stage, so every value below is a % of the stage.
   Hidden until an image loads (js/hero-media.js). One entrance, then still.
   For a photo shot on white rather than a cut-out, add data-blend="multiply".
   -------------------------------------------------------------------------- */

.currency-photo {
  position: absolute;
  inset: 0;
  z-index: 3; /* above the globe and the front orbit line */
  margin: 0;
  pointer-events: none;
}

.currency-photo img {
  --rot: 0deg;
  position: absolute;
  height: auto; /* intrinsic 1514 × 1039 ratio preserved */
  rotate: var(--rot);
  opacity: 0;
  /* one light source for both: tight contact shadow + soft ambient */
  filter:
    drop-shadow(0 1px 1.5px rgba(20, 20, 20, 0.16))
    drop-shadow(0 18px 22px rgba(20, 20, 20, 0.16));
}

/* Euro — back half of the fan, opening up and to the left */
.currency-photo img:nth-child(1) {
  --rot: 13deg;
  left: 4%;
  top: 46%;
  width: 58%;
  z-index: 1;
  transform-origin: 88% 94%;
}

/* Dollar — front half of the fan, opening to the right */
.currency-photo img:nth-child(2) {
  --rot: -3deg;
  left: 46%;
  top: 52%;
  width: 58%;
  z-index: 2;
  transform-origin: 20% 96%;
}

/* Only one image available: a single fan on the same base */
.currency-photo.is-single img {
  --rot: -4deg;
  left: 30%;
  top: 50%;
  width: 64%;
}

/* Single entrance once images are ready; both halves spread from the base */
.currency-photo.is-loaded img {
  animation: fan-in 1.15s var(--ease-out) both;
}

.currency-photo.is-loaded img:nth-child(2) {
  animation-delay: 0.08s;
}

.currency-photo[data-blend="multiply"] img {
  mix-blend-mode: multiply;
  filter: none;
}

/* Floating currency symbols ----------------------------------------------- */

.chip {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  width: max(40px, 10.5cqi);
  aspect-ratio: 1;
  border: 1px solid rgba(20, 20, 20, 0.06);
  border-radius: 3cqi;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--c-ink-2);
  font-size: max(17px, 4.4cqi);
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 14px 30px -16px rgba(20, 20, 20, 0.35);
  animation: chip-float var(--dur, 7s) var(--ease-in-out) var(--delay, 0s) infinite;
}

.chip--sm {
  width: max(34px, 8cqi);
  border-radius: max(10px, 2.4cqi);
  font-size: max(14px, 3.4cqi);
}

.chip--red {
  border-color: transparent;
  background: var(--c-red);
  color: #fff;
  box-shadow: 0 16px 30px -14px rgba(216, 38, 26, 0.6);
}

.chip--inr { top: 14%; left: 5%;  --dur: 7.5s; }
.chip--usd { top: 4%;  right: 12%; --dur: 8.5s; --delay: -2s; }
.chip--eur { top: 50%; left: -1%; --dur: 9s;   --delay: -4s; }
.chip--gbp { top: 30%; right: 1%; --dur: 7s;   --delay: -1s; }
.chip--jpy { bottom: 7%; left: 18%; --dur: 8s; --delay: -5s; }

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */

@keyframes line-up {
  from { transform: translateY(110%); }
  to   { transform: none; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes visual-in {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fan-in {
  from { opacity: 0; translate: 0 2cqi; rotate: calc(var(--rot) * 0.6); }
  to   { opacity: 1; translate: 0 0;     rotate: var(--rot); }
}

@keyframes chip-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -1.8cqi; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Tablet: stack, visual below copy */
@media (max-width: 959.98px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .hero-copy {
    max-width: 640px;
  }

  .hero-visual {
    justify-self: center;
    max-width: 540px;
  }
}

/* Mobile */
@media (max-width: 599.98px) {
  .hero-lede {
    margin-top: 18px;
  }

  .hero-ctas {
    margin-top: 26px;
  }

  .hero-ctas .btn {
    flex: 1 1 190px;
  }

  .trust-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-top: 32px;
    padding-top: 24px;
  }

  .hero-visual {
    max-width: 440px;
  }

  /* Same fan, simplified: a narrower spread, larger relative to the stage, and
     kept inside the stage so no denomination meets the viewport edge. */
  .currency-photo img {
    filter:
      drop-shadow(0 1px 1px rgba(20, 20, 20, 0.16))
      drop-shadow(0 10px 14px rgba(20, 20, 20, 0.15));
  }

  .currency-photo img:nth-child(1) {
    --rot: 11deg;
    left: 2%;
    top: 49%;
    width: 57%;
  }

  .currency-photo img:nth-child(2) {
    --rot: -2deg;
    left: 42%;
    top: 53%;
    width: 58%;
  }
}
