/* =====================================================================
   Cognasium India – ANIMATIONS
   Only transform / opacity / clip-path are animated, so it stays smooth on phones.
   Everything here is switched off for people who turn on "reduce motion"
   (see the block at the bottom).
   ===================================================================== */

/* ---------- 1. Hero entrance ---------- */
/* Title lines slide up one after another */
.hero-title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero-title .line > span {
  display: inline-block; transform: translateY(105%);
  animation: lineUp .7s cubic-bezier(.2,.9,.2,1) forwards;
  animation-delay: calc(var(--i) * 110ms + 100ms);
}
@keyframes lineUp { to { transform: translateY(0); } }

/* "TAKE IT INTERNATIONAL." wipes in, then a shine sweeps across it every few seconds */
.hero-title .accent {
  position: relative; overflow: hidden;
  clip-path: inset(0 100% 0 0);
  animation: wipeIn .7s cubic-bezier(.7,0,.2,1) .55s forwards;
}
@keyframes wipeIn { to { clip-path: inset(0 0 0 0); } }
.hero-title .accent::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 35%, rgba(255,213,31,.38) 50%, transparent 65%);
  background-size: 250% 100%; background-position: 150% 0;
  animation: sheen 4.5s ease-in-out 1.6s infinite;
}
@keyframes sheen { 0%, 60% { background-position: 150% 0; } 100% { background-position: -60% 0; } }

/* Paragraphs fade up */
.fade-up { opacity: 0; transform: translateY(14px); animation: fadeUp .6s ease-out forwards; animation-delay: var(--d, 0s); }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* Chips pop in; the LIVE chip gets a pulsing red "on air" dot */
.chips li { opacity: 0; transform: scale(.7); animation: chipPop .45s cubic-bezier(.3,1.6,.5,1) forwards; animation-delay: calc(var(--i) * 90ms + .8s); }
@keyframes chipPop { to { opacity: 1; transform: scale(1); } }
.chips li.live { display: inline-flex; align-items: center; gap: 7px; }
.chips li.live::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #FF4D4D;
  box-shadow: 0 0 0 0 rgba(255,77,77,.7); animation: livePulse 1.5s infinite;
}
@keyframes livePulse { 70% { box-shadow: 0 0 0 7px rgba(255,77,77,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,77,0); } }

/* Hero photo drops in, floats gently, and tilts towards the mouse on desktop */
.hero-photo { perspective: 900px; }
.hero-photo img {
  --rx: 0deg; --ry: 0deg;
  animation: photoIn .9s cubic-bezier(.2,.9,.3,1.2) .2s backwards, floaty 6s ease-in-out 1.2s infinite;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .25s ease-out;
}
@keyframes photoIn { from { opacity: 0; transform: translateY(-30px) rotate(-8deg) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

/* ---------- 2. Floating "debate" decorations in the hero ---------- */
.hero-deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.bubble {
  position: absolute; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 56px; height: 42px; padding: 0 12px; border-radius: 21px;
  background: #fff; border: 2.5px solid var(--c-navy); box-shadow: 3px 3px 0 var(--c-navy);
  font-family: var(--f-display); font-weight: 800; font-size: 22px; color: var(--c-navy);
  animation: drift 7s ease-in-out infinite;
}
.bubble::after {
  content: ""; position: absolute; bottom: -8px; left: 14px; width: 12px; height: 12px; background: inherit;
  border-right: 2.5px solid var(--c-navy); border-bottom: 2.5px solid var(--c-navy); transform: rotate(45deg);
}
.bubble.alt { background: var(--c-navy); color: var(--c-yellow); }
.bubble.alt::after { left: auto; right: 14px; }
.bubble i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: typing 1.2s infinite; }
.bubble i:nth-child(2) { animation-delay: .15s; }
.bubble i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-5px); opacity: 1; } }
@keyframes drift { 0%, 100% { transform: translate(0,0) rotate(-3deg); } 50% { transform: translate(6px,-14px) rotate(3deg); } }
.b1 { left: 5%;  top: 16%; animation-delay: -1s; }
.b2 { left: 10%; top: 64%; animation-duration: 8s; }
.b3 { right: 7%; top: 72%; animation-duration: 6.5s; animation-delay: -2s; }
.b4 { right: 9%; top: 12%; animation-duration: 9s; animation-delay: -3s; }

.ring { position: absolute; border-radius: 50%; border: 3px dashed rgba(0,23,77,.22); animation: spin 28s linear infinite; }
.r1 { width: 220px; height: 220px; left: -60px; bottom: -70px; }
.r2 { width: 160px; height: 160px; right: -40px; top: 34%; animation-direction: reverse; animation-duration: 22s; }
@keyframes spin { to { transform: rotate(360deg); } }

.spark {
  position: absolute; width: 18px; height: 18px; background: var(--c-navy);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: twinkle 2.6s ease-in-out infinite;
}
.s1 { left: 22%; top: 7%; }
.s2 { right: 24%; bottom: 9%; animation-delay: .9s; width: 14px; height: 14px; }
.s3 { left: 15%; bottom: 28%; animation-delay: 1.6s; width: 12px; height: 12px; }
@keyframes twinkle { 0%, 100% { transform: scale(.6) rotate(0); opacity: .35; } 50% { transform: scale(1.15) rotate(45deg); opacity: 1; } }

.globe, .mic { position: absolute; width: 64px; height: 64px; fill: none; stroke: var(--c-navy); stroke-width: 3; stroke-linecap: round; opacity: .5; }
.globe { right: 5%; top: 44%; animation: spinY 9s linear infinite; }
.mic { left: 5%; top: 40%; animation: drift 6s ease-in-out infinite; }
@keyframes spinY { to { transform: rotateY(360deg); } }

/* Phones/tablets: keep only a couple of small ones, away from the text */
@media (max-width: 899px) {
  .b1, .b2, .b3, .mic, .globe, .s3, .r2 { display: none; }
  .b4 { right: 20px; top: auto; bottom: 16px; scale: .8; }
  .s1 { left: auto; right: 40%; top: 6px; }
}
@media (max-width: 599px) { .b4, .s2 { display: none; } }

/* ---------- 3. Moving ribbon of programmes ---------- */
.marquee { background: var(--c-navy); color: var(--c-yellow); overflow: hidden; border-bottom: 3px solid var(--c-yellow); }
.marquee-track { display: flex; width: max-content; animation: marquee 34s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  display: inline-flex; align-items: center; white-space: nowrap; padding: 10px 0;
  font-family: var(--f-display); font-weight: 800; font-stretch: 78%; text-transform: uppercase; font-size: 20px; letter-spacing: .04em;
}
.marquee-track span::after { content: "\2726"; color: #fff; margin: 0 22px; font-size: 14px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 4. Header ---------- */
.header-cta .wa-ico { transition: transform .3s ease; }
.header-cta:hover .wa-ico { transform: rotate(-12deg) scale(1.15); }

/* ---------- 5. Scroll reveal (class added by JS, so no-JS visitors see everything) ---------- */
.reveal {
  opacity: 0; transform: translateY(28px) scale(.98);
  transition: opacity .6s ease-out, transform .6s cubic-bezier(.2,.9,.3,1);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.from-left { transform: translateX(-34px); }
.reveal.pop { transform: scale(.85); }
.reveal.in.from-left, .reveal.in.pop { transform: none; }
.paper-card.reveal.in { transform: rotate(-.6deg); }
/* after the reveal, let hover transitions run at normal speed */
.reveal.in.done { transition-delay: 0s; transition-duration: .25s; }

/* ---------- 6. Cards come alive on hover ---------- */
.wyg-card { transition: transform .25s ease, background-color .25s ease, border-color .25s ease, opacity .6s ease-out; }
.wyg-card:hover { transform: translateY(-6px); background: rgba(255,255,255,.1); border-color: var(--c-yellow); }
.wyg-card:hover img, .logo-grid li:hover img { animation: bob .8s ease-in-out; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-6px) rotate(-6deg); } 70% { transform: translateY(2px) rotate(3deg); } }
.logo-grid li { transition: transform .25s ease, box-shadow .25s ease, opacity .6s ease-out; }
.logo-grid li:hover { transform: translateY(-4px); box-shadow: 0 6px 0 var(--c-yellow); }
.t-card:hover, .steps li:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 8px 0 var(--c-navy); }
.price-card { position: relative; }
.price-card:hover { transform: translateY(-4px); box-shadow: 0 11px 0 var(--c-navy); }
.paper-card.in { animation: settle .7s cubic-bezier(.3,1.4,.5,1); }
@keyframes settle { from { transform: rotate(4deg) translateY(30px); } to { transform: rotate(-.6deg); } }

/* Step numbers spin in */
.steps li.in::before { animation: numPop .55s cubic-bezier(.3,1.6,.5,1) calc(var(--d, 0s) + .2s) both; }
@keyframes numPop { from { transform: scale(0) rotate(-120deg); } to { transform: scale(1) rotate(0); } }

/* Badge on the main price card bounces gently */
.price-badge { animation: tagBounce 2.4s ease-in-out infinite; }
@keyframes tagBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* Who-we-train rows slide in one by one */
.who-row { opacity: 0; transform: translateX(-16px); transition: opacity .45s ease-out, transform .45s ease-out; transition-delay: var(--d, 0s); }
.paper-card.in .who-row { opacity: 1; transform: none; }

/* ---------- 7. Question tiles: staggered pop-in every time a step appears ---------- */
.quiz-step:not([hidden]) .tile { animation: tileIn .45s cubic-bezier(.3,1.4,.5,1) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes tileIn { from { opacity: 0; transform: translateY(16px) scale(.92); } to { opacity: 1; transform: none; } }
.quiz-step:not([hidden]) .tile[aria-pressed="true"] { animation: pop .28s ease-out; }
.tile img { transition: transform .3s ease; }
.tile:hover img { transform: rotate(-8deg) scale(1.1); }
.eyebrow { animation: eyebrowIn .4s ease-out both; }
@keyframes eyebrowIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 8. Confetti burst on the result card ---------- */
.result-card { position: relative; overflow: visible; }
.result-card .result-head { border-radius: 6px 6px 0 0; }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.confetti i {
  position: absolute; left: 50%; top: 38%; width: 9px; height: 14px; border-radius: 2px;
  background: var(--c); opacity: 0;
  animation: confetti 1.5s cubic-bezier(.15,.7,.3,1) forwards; animation-delay: var(--delay);
}
@keyframes confetti {
  0%   { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); }
}

/* ---------- 9. Stats / price count-up use JS; final CTA radar rings ---------- */
.cta-pulse { position: relative; }
.cta-pulse::before, .cta-pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--r-sm); border: 3px solid var(--c-yellow);
  animation: radar 2.4s ease-out infinite; pointer-events: none;
}
.cta-pulse::after { animation-delay: 1.2s; }
@keyframes radar { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(1.1, 1.6); } }

/* ---------- 10. Sticky WhatsApp bar: little nudge every few seconds ---------- */
.sticky-wa .btn { animation: nudge 4.5s ease-in-out 2.5s infinite; }
@keyframes nudge {
  0%, 86%, 100% { transform: translateY(0) rotate(0); }
  89% { transform: translateY(-3px) rotate(-4deg); }
  92% { transform: translateY(-3px) rotate(4deg); }
  95% { transform: translateY(0) rotate(-2deg); }
}

/* ---------- 11. FAQ ---------- */
.faq-q[aria-expanded="true"] + .faq-a p { animation: fadeUp .35s ease-out both; }
.faq-item { transition: box-shadow .2s ease, transform .2s ease, opacity .6s ease-out; }
.faq-item:hover { box-shadow: 0 4px 0 var(--c-navy); }

/* ---------- Reduced motion: everything visible, nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-deco, .confetti, .cta-pulse::before, .cta-pulse::after { display: none !important; }
  .marquee-track { animation: none !important; }
  .hero-title .line > span, .hero-title .accent, .chips li, .fade-up, .reveal, .who-row,
  .hero-photo img, .tile, .eyebrow {
    opacity: 1 !important; transform: none !important; clip-path: none !important; translate: none !important;
  }
}
