/* REV JAMi-PROFILE-1.15 - interaction, header and alignment polish
   Additive override loaded after profile.css, partner-logo-align.css and profile-motion-polish.css. */

:root {
  --jami-edge-glow: rgba(72,199,194,0.18);
  --jami-edge-glow-strong: rgba(72,199,194,0.34);
  --jami-card-dark-a: rgba(3, 11, 12, 0.98);
  --jami-card-dark-b: rgba(5, 16, 17, 0.96);
}

/* Sticky header gets a subtle show-control pulse instead of sitting flat. */
.site-top-profile {
  isolation: isolate;
  overflow: visible;
  background:
    radial-gradient(circle at 88% 45%, rgba(72,199,194,0.10), transparent 11rem),
    linear-gradient(180deg, rgba(3,7,8,0.985), rgba(4,10,11,0.94)) !important;
}

.site-top-profile::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .72;
  background:
    linear-gradient(90deg, transparent 0%, rgba(72,199,194,0.18) 44%, rgba(255,255,255,0.30) 50%, rgba(72,199,194,0.12) 56%, transparent 100%);
  transform: translateX(-125%);
  animation: jamiHeaderSweep 6.8s ease-in-out infinite;
  mix-blend-mode: screen;
}

.site-top-profile::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(72,199,194,0.30), rgba(238,42,138,0.24), transparent);
  opacity: .86;
  animation: jamiHeaderLinePulse 3.8s ease-in-out infinite;
}

.top-title {
  position: relative;
  z-index: 2;
  text-shadow: 0 0 16px rgba(72,199,194,0.24);
  animation: jamiHeaderTitleBreath 3.6s ease-in-out infinite;
}

.menu-toggle {
  z-index: 2;
  transition: transform 240ms ease, filter 240ms ease;
}

.menu-toggle::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 18px;
  background: radial-gradient(circle, rgba(72,199,194,0.16), transparent 70%);
  opacity: .78;
  transform: scale(.82);
  animation: jamiMenuHalo 2.8s ease-in-out infinite;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.08);
}

@keyframes jamiHeaderSweep {
  0%, 56% { transform: translateX(-125%); opacity: 0; }
  68% { opacity: .78; }
  88%, 100% { transform: translateX(125%); opacity: 0; }
}

@keyframes jamiHeaderLinePulse {
  0%, 100% { opacity: .40; filter: blur(0); }
  50% { opacity: .95; filter: blur(.4px); }
}

@keyframes jamiHeaderTitleBreath {
  0%, 100% { letter-spacing: .22em; text-shadow: 0 0 12px rgba(72,199,194,0.18); }
  50% { letter-spacing: .235em; text-shadow: 0 0 20px rgba(72,199,194,0.34); }
}

@keyframes jamiMenuHalo {
  0%, 100% { opacity: .28; transform: scale(.80); }
  50% { opacity: .80; transform: scale(1.02); }
}

/* Stop the halfway green/cyan internal tint. Keep the cards black with edge glow only. */
.solve-layer::before,
.eco-tile::before,
.rail-card::before,
.stat-card::before,
.brand-card::before,
.contact-card::before {
  content: none !important;
  display: none !important;
  background: none !important;
  animation: none !important;
  opacity: 0 !important;
}

.solve-layer,
.eco-tile,
.rail-card,
.stat-card,
.brand-card,
.contact-card {
  --jami-card-edge: 0deg;
  background:
    linear-gradient(145deg, var(--jami-card-dark-b), var(--jami-card-dark-a)) padding-box,
    conic-gradient(from var(--jami-card-edge),
      rgba(72,199,194,0.14) 0deg,
      rgba(72,199,194,0.05) 135deg,
      rgba(72,199,194,0.10) 255deg,
      rgba(72,199,194,0.42) 312deg,
      rgba(238,42,138,0.22) 340deg,
      rgba(255,255,255,0.26) 356deg,
      rgba(72,199,194,0.14) 360deg) border-box !important;
  border: 1px solid transparent !important;
  box-shadow:
    0 20px 68px rgba(0,0,0,0.40),
    0 0 0 1px rgba(72,199,194,0.055),
    0 0 22px rgba(72,199,194,0.045) !important;
  animation:
    jamiCardEdge 18s linear infinite,
    jamiCleanCardPulse 2.8s ease-in-out infinite !important;
  will-change: transform, filter, box-shadow;
}

.solve-layer:nth-child(2),
.eco-tile:nth-child(2),
.rail-card:nth-child(2),
.stat-card:nth-child(2),
.brand-card:nth-child(2) { animation-delay: .24s, .24s !important; }

.solve-layer:nth-child(3),
.eco-tile:nth-child(3),
.rail-card:nth-child(3),
.stat-card:nth-child(3),
.brand-card:nth-child(3) { animation-delay: .48s, .48s !important; }

.eco-tile:nth-child(4) { animation-delay: .72s, .72s !important; }
.eco-tile:nth-child(5) { animation-delay: .96s, .96s !important; }
.eco-tile:nth-child(6) { animation-delay: 1.20s, 1.20s !important; }
.eco-tile:nth-child(7) { animation-delay: 1.44s, 1.44s !important; }
.eco-tile:nth-child(8) { animation-delay: 1.68s, 1.68s !important; }

@keyframes jamiCleanCardPulse {
  0%, 100% {
    filter: brightness(1);
    box-shadow:
      0 20px 68px rgba(0,0,0,0.40),
      0 0 0 1px rgba(72,199,194,0.055),
      0 0 18px rgba(72,199,194,0.045) !important;
  }
  50% {
    filter: brightness(1.04);
    box-shadow:
      0 26px 84px rgba(0,0,0,0.50),
      0 0 0 1px rgba(72,199,194,0.18),
      0 0 36px rgba(72,199,194,0.16),
      0 0 12px rgba(255,255,255,0.035) !important;
  }
}

.solve-layer:hover,
.solve-layer:focus-visible,
.solve-layer.is-active,
.eco-tile:hover,
.eco-tile:focus-visible,
.eco-tile.is-active,
.rail-card:hover,
.rail-card:focus-visible,
.rail-card.is-active,
.stat-card:hover,
.stat-card:focus-visible,
.brand-card:hover,
.brand-card:focus-visible,
.contact-card:hover,
.contact-card:focus-visible {
  transform: translateY(-3px) scale(1.008) !important;
  box-shadow:
    0 30px 92px rgba(0,0,0,0.54),
    0 0 0 1px rgba(72,199,194,0.25),
    0 0 52px rgba(72,199,194,0.20),
    0 0 16px rgba(255,255,255,0.045) !important;
}

/* Why cards are now tappable layers like What We Solve. */
.rail-card {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.rail-card p {
  max-width: 31rem;
}

.rail-card:active,
.solve-layer:active,
.eco-tile:active {
  transform: translateY(0) scale(.992) !important;
}

/* Count-up figures should feel stable while animating. */
.count-up {
  display: inline-block;
  min-width: 3.4ch;
  font-variant-numeric: tabular-nums;
}

/* Brand wall: visually normalize Access / Amazon / Vivo to the same weight. */
.brand-wall-three .brand-card {
  min-height: 128px !important;
  display: grid !important;
  place-items: center !important;
}

.brand-wall-three .brand-card img {
  width: min(260px, 76%) !important;
  height: 72px !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  filter: brightness(1.22) drop-shadow(0 0 18px rgba(255,255,255,0.08)) !important;
}

@media (max-width: 420px) {
  .brand-wall-three .brand-card img {
    width: min(250px, 76%) !important;
    height: 68px !important;
  }
}

/* Bottom collective marks: lift Malachite to match NG Apps and Sirenic more closely. */
.partner-logos img:nth-child(1) {
  width: 154px !important;
  transform: translateY(2px) !important;
}

.partner-logos img:nth-child(2) {
  width: 74px !important;
}

.partner-logos img:nth-child(3) {
  width: 60px !important;
}

@media (max-width: 420px) {
  .partner-logos img:nth-child(1) { width: 140px !important; }
  .partner-logos img:nth-child(2) { width: 68px !important; }
  .partner-logos img:nth-child(3) { width: 56px !important; }
}

/* Bottom CTA gets more presence but stays clean. */
.contact-card {
  box-shadow:
    0 34px 120px rgba(0,0,0,0.62),
    0 0 0 1px rgba(72,199,194,0.10),
    0 0 48px rgba(72,199,194,0.10) !important;
}

.contact-card .button-primary {
  animation: jamiCtaBreath 2.8s ease-in-out infinite !important;
}

@keyframes jamiCtaBreath {
  0%, 100% {
    filter: brightness(1);
    box-shadow: 0 18px 54px rgba(72,199,194,0.24);
  }
  50% {
    filter: brightness(1.08);
    box-shadow: 0 24px 76px rgba(72,199,194,0.38), 0 0 16px rgba(255,255,255,0.10);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-top-profile::before,
  .site-top-profile::after,
  .top-title,
  .menu-toggle::before,
  .solve-layer,
  .eco-tile,
  .rail-card,
  .stat-card,
  .brand-card,
  .contact-card,
  .contact-card .button-primary {
    animation: none !important;
  }
}
