/**
 * Profit Alerts — pro polish layer (home + shared public pages).
 * Loads LAST. Mobile-first refinements, motion, app-download section v2.
 * v20260611
 */

/* ════════════════════════════════════════════════════
   TICKER TAPE — newsroom live chip + hover pause
   ════════════════════════════════════════════════════ */
.pa-ticker-tape {
  position: relative;
  z-index: 5;
  /* base mask fades both edges; the live chip sits at the left edge, so
     keep only the right-side fade (the chip's own gradient handles the left) */
  mask-image: linear-gradient(to right, #000 0%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 94%, transparent 100%);
}

.pa-ticker-tape:hover .pa-ticker-tape__track {
  animation-play-state: paused;
}

.pa-ticker-tape__livechip {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.85rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #34d399;
  background: rgba(6, 9, 18, 0.97);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

/* soft fade so items slide "under" the chip */
.pa-ticker-tape__livechip::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 0;
  bottom: 0;
  width: 28px;
  background: linear-gradient(90deg, rgba(6, 9, 18, 0.97), transparent);
  pointer-events: none;
}

.pa-ticker-tape__livechip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
  animation: paProPulse 2.2s ease-in-out infinite;
}

@keyframes paProPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.78); }
}

/* note: no padding on the track — it animates translateX(-50%) and any
   one-sided padding breaks the seamless loop; items slide under the chip */

/* ════════════════════════════════════════════════════
   HERO — mobile gets the signal card back
   ════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .pa-landing-redesign-hero__visual {
    display: block;
    max-width: 430px;
    margin: 2.5rem auto 0;
  }
  .pa-landing-redesign-mock__ticker { font-size: 2.25rem; }
}

@media (max-width: 480px) {
  .pa-landing-redesign-hero__cta-row { flex-direction: column; }
  .pa-landing-redesign-hero__cta-row .pa-landing-redesign-btn {
    width: 100%;
  }
  .pa-hero-ghost-link { justify-content: center; width: 100%; }
  .pa-hero-trust { justify-content: center; flex-wrap: wrap; }
}

/* tactile press feedback for touch */
.pa-landing-redesign-btn:active {
  transform: scale(0.98);
  transition-duration: 0.08s;
}

/* hero mock card — desktop tilt target (JS sets inline transform).
   The infinite float / fill-both entrance animations would override an
   inline transform forever, so on fine pointers keep only the entrance
   with fill:backwards (releases the transform once finished). */
@media (pointer: fine) {
  .pa-landing-redesign-mock[data-tilt] {
    animation: pa-scale-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards 0.25s;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
  }
}

/* ════════════════════════════════════════════════════
   APP DOWNLOAD SECTION v2
   ════════════════════════════════════════════════════ */
.pa-app-badges2 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
}

.pa-store-badge2 {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 172px;
  padding: 0.7rem 1.35rem 0.7rem 1.05rem;
  background: #0b101d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  text-decoration: none;
  color: #e2eaf6;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s,
    box-shadow 0.25s;
}

.pa-store-badge2::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.pa-store-badge2:hover {
  transform: translateY(-3px);
  border-color: rgba(14, 165, 233, 0.5);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45), 0 0 28px rgba(14, 165, 233, 0.14);
}

.pa-store-badge2:hover::before { transform: translateX(100%); }

.pa-store-badge2:active { transform: translateY(-1px) scale(0.98); }

.pa-store-badge2__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  opacity: 0.92;
}

.pa-store-badge2__kicker {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(14, 165, 233, 0.85);
  line-height: 1;
  margin-bottom: 3px;
}

.pa-store-badge2__name {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}

@media (max-width: 768px) {
  .pa-app-badges2 { justify-content: center; }
  .pa-store-badge2 { flex: 1 1 auto; justify-content: center; max-width: 240px; }
}

/* ── Phone mockup: incoming push notification loop ── */
.pa-app-mockup { position: relative; }

.pa-app-mockup__push {
  position: absolute;
  top: 30px;
  left: 9px;
  right: 9px;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 11px;
  background: rgba(13, 19, 32, 0.97);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 18px rgba(16, 185, 129, 0.12);
  opacity: 0;
  transform: translateY(-130%);
  animation: paPushLoop 9s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  animation-delay: 1.4s;
  pointer-events: none;
}

@keyframes paPushLoop {
  0%   { opacity: 0; transform: translateY(-130%) scale(0.96); }
  5%   { opacity: 1; transform: translateY(0) scale(1); }
  42%  { opacity: 1; transform: translateY(0) scale(1); }
  50%  { opacity: 0; transform: translateY(-130%) scale(0.96); }
  100% { opacity: 0; transform: translateY(-130%) scale(0.96); }
}

.pa-app-mockup__push-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
}

.pa-app-mockup__push-title {
  display: block;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
}

.pa-app-mockup__push-text {
  display: block;
  font-size: 6.5px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.35;
}

/* mockup slightly bigger on phones — it IS the pitch there */
@media (max-width: 768px) {
  .pa-app-mockup { width: 240px !important; }
}

/* ════════════════════════════════════════════════════
   SECTION RHYTHM — tighter, intentional mobile spacing
   ════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .pa-landing-redesign-hero__title { font-size: clamp(2.1rem, 9.5vw, 2.75rem); }
  .pa-landing-redesign-hero__lead  { font-size: 1.02rem; }
  .pa-landing-redesign-section__lead { font-size: 1.05rem; }
  .pa-app-section { padding: 4rem 0 !important; }
}

/* features grid: force 1col on mobile even with inline grid style */
@media (max-width: 760px) {
  .pa-landing-redesign-benefits[style] {
    grid-template-columns: 1fr !important;
  }
}

/* ════════════════════════════════════════════════════
   HERO TITLE — word-by-word rise reveal
   ════════════════════════════════════════════════════ */
.pa-landing-redesign-hero__title.pa-words-ready {
  /* the per-word animation replaces the whole-title fade */
  animation: none !important;
  opacity: 1 !important;
}

.pa-w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  /* breathing room so ascenders/descenders aren't clipped at rest */
  padding: 0.08em 0 0.12em;
  margin: -0.08em 0 -0.12em;
}

.pa-w-in {
  display: inline-block;
  transform: translateY(112%);
  animation: paWordUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(0.12s + var(--wi, 0) * 0.06s);
}

@keyframes paWordUp {
  to { transform: translateY(0); }
}

/* ════════════════════════════════════════════════════
   HERO MOCK — sentiment sparkline that draws itself
   ════════════════════════════════════════════════════ */
.pa-mock-spark {
  margin-top: 0.9rem;
  position: relative;
}

.pa-mock-spark__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.pa-mock-spark__label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 234, 246, 0.4);
}

.pa-mock-spark__delta {
  font-size: 0.68rem;
  font-weight: 800;
  color: #34d399;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  animation: paSparkFade 0.6s ease forwards 2.5s;
}

.pa-mock-spark svg {
  width: 100%;
  height: 58px;
  display: block;
  overflow: visible;
}

.pa-mock-spark__line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: paSparkDraw 1.9s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.9s;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.45));
}

@keyframes paSparkDraw {
  to { stroke-dashoffset: 0; }
}

.pa-mock-spark__area {
  opacity: 0;
  animation: paSparkFade 0.9s ease forwards 2.3s;
}

@keyframes paSparkFade {
  to { opacity: 1; }
}

.pa-mock-spark__dot {
  opacity: 0;
  animation: paSparkFade 0.4s ease forwards 2.7s;
}

.pa-mock-spark__ring {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: paSparkRing 2.4s ease-out infinite 2.8s;
}

@keyframes paSparkRing {
  0%   { opacity: 0.7; transform: scale(0.4); }
  70%  { opacity: 0;   transform: scale(2.6); }
  100% { opacity: 0;   transform: scale(2.6); }
}

/* ════════════════════════════════════════════════════
   TICKER — terminal-style price update flash
   ════════════════════════════════════════════════════ */
.pa-ticker-tape__item {
  border-radius: 6px;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.pa-ticker-tape__item.is-flash--up {
  background: rgba(16, 185, 129, 0.16);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.25);
  transform: scale(1.07);
}

.pa-ticker-tape__item.is-flash--down {
  background: rgba(244, 63, 94, 0.14);
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.22);
  transform: scale(1.07);
}

/* ════════════════════════════════════════════════════
   LIVE FEED ROTATION — incoming card (FLIP partner)
   ════════════════════════════════════════════════════ */
.pa-cycle-in {
  animation: paCycleIn 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes paCycleIn {
  from { opacity: 0; transform: translateY(-14px) scale(0.97); }
}

/* ════════════════════════════════════════════════════
   MAGNETIC CTAs
   ════════════════════════════════════════════════════ */
@media (pointer: fine) {
  .pa-magnetic {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.2s ease,
                border-color 0.2s ease,
                box-shadow 0.2s ease;
    will-change: transform;
  }
}

/* ════════════════════════════════════════════════════
   REDUCED MOTION
   ════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .pa-ticker-tape__livechip-dot { animation: none; }
  .pa-app-mockup__push {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .pa-store-badge2,
  .pa-store-badge2::before { transition: none; }
  .pa-landing-redesign-mock[data-tilt] { transition: none; transform: none !important; }

  .pa-w-in { animation: none; transform: none; }
  .pa-mock-spark__line { animation: none; stroke-dashoffset: 0; }
  .pa-mock-spark__area,
  .pa-mock-spark__dot,
  .pa-mock-spark__delta { animation: none; opacity: 1; }
  .pa-mock-spark__ring { animation: none; opacity: 0; }
  .pa-ticker-tape__item { transition: none; }
  .pa-cycle-in { animation: none; }
  .pa-magnetic { transition: none; transform: none !important; }
}
