/* eTravos · Animation & Effects — Targeted Edition */

/* 1. EASING TOKENS */
:root {
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --dur-fast: 220ms;
  --dur-mid: 420ms;
  --dur-slow: 680ms;
}

/* 2. KEYFRAMES */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideRight {
  from { opacity: 0; transform: translateX(36px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideLeft {
  from { opacity: 0; transform: translateX(-36px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

/* Float keyframes — used ONLY on hero mockup cards & phone */
@keyframes floatLeft {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  50%       { transform: rotate(-5deg) translateY(-8px); }
}
@keyframes floatRight {
  0%, 100% { transform: rotate(5deg) translateY(0); }
  50%       { transform: rotate(5deg) translateY(-8px); }
}
@keyframes floatBottom {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50%       { transform: rotate(-2deg) translateY(-6px); }
}
@keyframes phoneTilt {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50%       { transform: rotate(-8deg) translateY(-8px); }
}

/* Float for WhatsApp button only */
@keyframes waBounce {
  0%, 100% { transform: scale(1); }
  40%       { transform: scale(1.14); }
  70%       { transform: scale(0.95); }
}

/* Utility animations */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0   rgba(35, 163, 90, 0.4); }
  50%       { box-shadow: 0 0 0 6px rgba(35, 163, 90, 0);   }
}
@keyframes barGrow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}
@keyframes progressFill {
  from { width: 0; }
  to   { width: 78%; }
}
@keyframes eyebrowIn {
  from { opacity: 0; letter-spacing: .08em; }
  to   { opacity: 1; letter-spacing: .14em; }
}
@keyframes megaReveal {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px) scale(0.98); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0)     scale(1); }
}
@keyframes topBannerIn {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes orbPulse {
  0%, 100% { opacity: 0.18; transform: scale(1); }
  50%       { opacity: 0.26; transform: scale(1.12); }
}

/* ─────────────────────────────────────────────────────── */
/* 3. PAGE LOAD SEQUENCE                                   */
/* ─────────────────────────────────────────────────────── */
.top         { animation: topBannerIn var(--dur-mid)  var(--ease-out-expo)        both; }
.nav         { animation: fadeIn      var(--dur-fast) ease                 80ms  both; }
.eyebrow     { animation: eyebrowIn  600ms            var(--ease-out-expo) 200ms both; }
.hero h1     { animation: fadeUp     var(--dur-slow)  var(--ease-out-expo) 300ms both; }
.hero p      { animation: fadeUp     var(--dur-slow)  var(--ease-out-expo) 420ms both; }
.hero .btns  { animation: fadeUp     var(--dur-slow)  var(--ease-out-expo) 520ms both; }
.hero-art    { animation: slideRight var(--dur-slow)  var(--ease-out-expo) 350ms both; }

/* ─────────────────────────────────────────────────────── */
/* 4. FLOATING — ONLY on hero mockup cards & phone mock   */
/* ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  /* These three are the designed "floating card" UI elements in the hero */
  .float-left   { animation: floatLeft   4.5s ease-in-out infinite; }
  .float-right  { animation: floatRight  5.2s ease-in-out infinite 0.6s; }
  .float-bottom { animation: floatBottom 4s   ease-in-out infinite 1s; }
  /* Phone mockup in the hero */
  .phone-mock   { animation: phoneTilt   4.8s ease-in-out infinite 0.3s; }
  /* WhatsApp fixed action button — gentle attention bounce */
  .float-wa     { animation: waBounce    4s   ease-in-out infinite 2.5s; }
}

/* WhatsApp stop float on hover */
.float-wa {
  transition: transform 200ms var(--ease-spring), box-shadow 200ms ease;
}
.float-wa:hover {
  animation: none;
  transform: scale(1.12);
  box-shadow: 0 18px 40px rgba(27, 215, 96, 0.42);
}

/* ─────────────────────────────────────────────────────── */
/* 5. MINI BAR CHART & PROGRESS (hero mockup internals)   */
/* ─────────────────────────────────────────────────────── */
.status-dot { animation: pulseGlow 2s ease-in-out infinite; }

.progress span { animation: progressFill 1.6s var(--ease-out-expo) 1.4s both; }

.mini-bar { transform-origin: bottom; animation: barGrow 700ms var(--ease-spring) both; }
.mini-bar:nth-child(1) { animation-delay: 1000ms; }
.mini-bar:nth-child(2) { animation-delay: 1070ms; }
.mini-bar:nth-child(3) { animation-delay: 1140ms; }
.mini-bar:nth-child(4) { animation-delay: 1210ms; }
.mini-bar:nth-child(5) { animation-delay: 1280ms; }
.mini-bar:nth-child(6) { animation-delay: 1350ms; }
.mini-bar:nth-child(7) { animation-delay: 1420ms; }
.mini-bar:nth-child(8) { animation-delay: 1490ms; }

/* KPI shimmer inside product mockup only */
.product-kpi strong {
  background: linear-gradient(90deg, var(--ink) 40%, var(--orange) 50%, var(--ink) 60%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 2.5s linear infinite 1.5s;
}

/* ─────────────────────────────────────────────────────── */
/* 6. SCROLL REVEAL                                        */
/* ─────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 600ms var(--ease-out-expo), transform 600ms var(--ease-out-expo);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 600ms var(--ease-out-expo), transform 600ms var(--ease-out-expo);
}
.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 600ms var(--ease-out-expo), transform 600ms var(--ease-out-expo);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.93);
  transition: opacity 520ms var(--ease-spring), transform 520ms var(--ease-spring);
}
.reveal.is-visible       { opacity: 1; transform: translateY(0); }
.reveal-left.is-visible  { opacity: 1; transform: translateX(0); }
.reveal-right.is-visible { opacity: 1; transform: translateX(0); }
.reveal-scale.is-visible { opacity: 1; transform: scale(1); }

.stagger-1 { transition-delay:  60ms; }
.stagger-2 { transition-delay: 130ms; }
.stagger-3 { transition-delay: 200ms; }
.stagger-4 { transition-delay: 270ms; }
.stagger-5 { transition-delay: 340ms; }
.stagger-6 { transition-delay: 410ms; }

/* ─────────────────────────────────────────────────────── */
/* 7. CARD HOVER — lift on hover, no continuous float      */
/* ─────────────────────────────────────────────────────── */
.card {
  transition: transform 260ms var(--ease-spring),
              box-shadow 260ms ease,
              border-color 260ms ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(11, 18, 32, 0.12),
              0 0 0 1px rgba(255, 122, 24, 0.18);
  border-color: rgba(255, 122, 24, 0.22);
}
.card h3 { transition: color 200ms ease; }
.card:hover h3 { color: var(--orange); }

/* Step cards — lift on hover only */
.step {
  transition: transform 260ms var(--ease-spring),
              box-shadow 260ms ease,
              background 260ms ease;
  position: relative;
  overflow: hidden;
}
.step::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.05), transparent 60%);
  opacity: 0;
  transition: opacity 280ms ease;
  pointer-events: none;
}
.step:hover { transform: translateY(-5px); box-shadow: 0 18px 44px rgba(11, 18, 32, 0.09); background: #fffbf7; }
.step:hover::before { opacity: 1; }
.step b { display: inline-block; transition: transform 280ms var(--ease-spring); }
.step:hover b { transform: scale(1.25) rotate(-4deg); }

/* Library & India links — slide lift on hover */
.library a {
  transition: transform 200ms var(--ease-spring),
              border-color 200ms ease,
              background 200ms ease,
              box-shadow 200ms ease;
}
.library a:hover {
  border-color: var(--orange);
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(255, 122, 24, 0.12);
  background: #fff9f5;
}
.india-links a { transition: border-color 180ms ease, color 180ms ease, transform 180ms var(--ease-spring); }
.india-links a:hover { border-color: var(--orange) !important; color: var(--orange) !important; transform: translateY(-2px); }

/* ─────────────────────────────────────────────────────── */
/* 8. BUTTONS — hover lift only, no continuous animation   */
/* ─────────────────────────────────────────────────────── */
.btn {
  transition: transform 200ms var(--ease-spring),
              box-shadow 200ms ease,
              background 200ms ease,
              color 200ms ease;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}
.btn:hover::after { opacity: 1; }
.btn.primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(255, 122, 24, 0.38);
}
.btn.secondary:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.10);
}
.cta .btn.primary:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 16px 40px rgba(255, 122, 24, 0.46);
}

.navcta { transition: transform 200ms var(--ease-spring), box-shadow 200ms ease, background 200ms ease; }
.navcta:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(255, 122, 24, 0.28); background: #ff8f35; }

/* Chat fixed button — hover only */
.chat { transition: background 200ms ease, transform 200ms var(--ease-spring), box-shadow 200ms ease; }
.chat:hover { background: var(--orange); color: #101622; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(255,122,24,0.3); }

/* ─────────────────────────────────────────────────────── */
/* 9. NAV MEGA MENU                                        */
/* ─────────────────────────────────────────────────────── */
.mega.show { animation: megaReveal 260ms var(--ease-out-expo) both; }
.mega a {
  position: relative;
  transition: color 160ms ease, padding-left 160ms ease;
}
.mega a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 2px;
  width: 0; height: 1.5px;
  background: var(--orange);
  transition: width 200ms ease;
}
.mega a:hover::after { width: 100%; }
.mega a:hover { padding-left: 4px; }
.navbtn { transition: background 160ms ease; }
.logo { transition: transform 280ms var(--ease-spring), filter 280ms ease; }
.logo:hover { transform: scale(1.04); filter: brightness(1.08); }

/* ─────────────────────────────────────────────────────── */
/* 10. FORM                                                */
/* ─────────────────────────────────────────────────────── */
.formbox { transition: box-shadow 280ms ease; animation: slideRight 680ms var(--ease-out-expo) 300ms both; }
.formbox:focus-within { box-shadow: 0 28px 70px rgba(11, 18, 32, 0.13), 0 0 0 2px rgba(255, 122, 24, 0.16); }
.formbox input,
.formbox select,
.formbox textarea { transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease; }
.formbox input:focus,
.formbox select:focus,
.formbox textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.14);
  background: #fffdf9;
}
.formbox button { transition: transform 180ms var(--ease-spring), box-shadow 180ms ease, background 180ms ease; }
.formbox button:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 20px rgba(255, 122, 24, 0.35); background: #ff8f35; }
.formbox button:active { transform: translateY(0) scale(0.99); }

/* ─────────────────────────────────────────────────────── */
/* 11. PRODUCT MOCKUP INTERNALS                            */
/* ─────────────────────────────────────────────────────── */
.side-item { transition: background 180ms ease, color 180ms ease; }
.ui-action { transition: transform 160ms var(--ease-spring), box-shadow 160ms ease, background 160ms ease; }
.ui-action:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(245, 130, 32, 0.35); background: #e07318; }
.ui-list-row { transition: background 180ms ease, transform 180ms var(--ease-spring); }
.ui-list-row:hover { background: #f8faff; transform: translateX(2px); }
.browser-dot { transition: background 180ms ease; }
.product-browser:hover .browser-dot:nth-child(1) { background: #ff5f57; }
.product-browser:hover .browser-dot:nth-child(2) { background: #ffbd2e; }
.product-browser:hover .browser-dot:nth-child(3) { background: #28c840; }

/* ─────────────────────────────────────────────────────── */
/* 12. VISUAL & ARTICLE                                    */
/* ─────────────────────────────────────────────────────── */
.visual { transition: box-shadow 280ms ease, transform 280ms var(--ease-spring); }
.visual:hover { box-shadow: 0 28px 60px rgba(11, 18, 32, 0.11); transform: translateY(-3px); }
.article-art img { transition: transform 450ms var(--ease-out-expo), box-shadow 450ms ease; }
.article-art img:hover { transform: scale(1.025); box-shadow: 0 28px 60px rgba(11, 18, 32, 0.16); }

/* ─────────────────────────────────────────────────────── */
/* 13. CTA SECTION — orbs only (not button float)         */
/* ─────────────────────────────────────────────────────── */
.cta { position: relative; overflow: hidden; }
.cta::before {
  content: '';
  position: absolute;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 24, 0.14), transparent 70%);
  right: -70px; top: -90px;
  animation: orbPulse 6s ease-in-out infinite;
  pointer-events: none;
}
.cta::after {
  content: '';
  position: absolute;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 24, 0.09), transparent 70%);
  left: -50px; bottom: -70px;
  animation: orbPulse 7s ease-in-out infinite 2.5s;
  pointer-events: none;
}

/* ─────────────────────────────────────────────────────── */
/* 14. HERO — grid overlay + single background orb        */
/* ─────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none; z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero::after {
  content: '';
  position: absolute;
  width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 24, 0.11) 0%, transparent 68%);
  right: 6%; top: 8%;
  animation: orbPulse 8s ease-in-out infinite;
  pointer-events: none; z-index: 0;
}

/* ─────────────────────────────────────────────────────── */
/* 15. FOOTER                                              */
/* ─────────────────────────────────────────────────────── */
.footer a { transition: color 160ms ease, transform 160ms ease; display: inline-block; }
.footer a:hover { color: #fff; transform: translateX(3px); }

/* ─────────────────────────────────────────────────────── */
/* 16. KICKER UNDERLINE (scroll-triggered)                 */
/* ─────────────────────────────────────────────────────── */
.kicker { position: relative; display: inline-block; }
.kicker::after {
  content: '';
  position: absolute; left: 0; bottom: -3px;
  width: 0; height: 1.5px;
  background: var(--orange);
  transition: width 400ms var(--ease-out-expo);
}
.kicker.is-visible::after { width: 100%; }

/* ─────────────────────────────────────────────────────── */
/* 17. SCROLL PROGRESS BAR                                 */
/* ─────────────────────────────────────────────────────── */
#et-progress-bar {
  position: fixed; top: 0; left: 0;
  height: 2.5px; width: 0%;
  background: linear-gradient(90deg, var(--orange), #ffb36f);
  z-index: 9999;
  transition: width 80ms linear;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 6px rgba(255, 122, 24, 0.45);
}

/* ─────────────────────────────────────────────────────── */
/* 18. PAGE OVERLAY                                        */
/* ─────────────────────────────────────────────────────── */
#et-page-overlay { position: fixed; inset: 0; background: var(--navy); z-index: 9998; pointer-events: none; opacity: 0; transition: opacity 280ms ease; }
#et-page-overlay.active { opacity: 1; pointer-events: all; }

/* ─────────────────────────────────────────────────────── */
/* 19. FAQ                                                 */
/* ─────────────────────────────────────────────────────── */
.faq details { transition: background 180ms ease; }
.faq details[open] { background: #fffdf9; }
.faq summary { transition: color 180ms ease; }
.faq summary:hover { color: var(--orange); }

/* ─────────────────────────────────────────────────────── */
/* 20. MISC                                                */
/* ─────────────────────────────────────────────────────── */
.notice { animation: scaleIn 280ms var(--ease-spring); }
.pill { transition: background 160ms ease, color 160ms ease, transform 160ms var(--ease-spring); }
.pill:hover { background: var(--orange); color: #fff; transform: scale(1.06); }
.toc a { position: relative; transition: color 160ms ease, padding-left 160ms ease; }
.toc a::after { content: ''; position: absolute; left: 0; bottom: 1px; width: 0; height: 1.5px; background: var(--orange); transition: width 200ms ease; }
.toc a:hover { color: var(--orange) !important; padding-left: 5px; }
.toc a:hover::after { width: 100%; }
.next a { transition: transform 220ms var(--ease-spring), box-shadow 220ms ease, border-color 220ms ease; }
.next a:hover { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(11, 18, 32, 0.09); border-color: rgba(255, 122, 24, 0.25); }
.download .btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 10px 24px rgba(255, 122, 24, 0.32); }

/* Resource cover orb breathe */
.resource-cover::after { animation: orbPulse 5s ease-in-out infinite; }

/* ─────────────────────────────────────────────────────── */
/* 21. REDUCE MOTION                                       */
/* ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}