/* ============================================================
   LEVERAGE — PREMIUM ANIMATION LAYER
   Loaded AFTER styles.css. Extends motion + adds atmosphere.
   Safe: all effects respect prefers-reduced-motion.
   ============================================================ */

/* ---------- Extended tokens ---------- */
:root {
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-expo: cubic-bezier(.16, 1, .3, 1);
  --ease-anticipate: cubic-bezier(.36, 0, .66, -.56);
  --duration-fast: .3s;
  --duration-base: .6s;
  --gold-grad: linear-gradient(120deg, #C9A227 0%, #E9C86B 45%, #C9A227 100%);
  --gold-grad-animated: linear-gradient(90deg, #C9A227 0%, #E9C86B 50%, #C9A227 100%);
  --glass-bg: rgba(255, 255, 255, .08);
  --glass-border: rgba(201, 162, 39, .2);
  --glass-blur: blur(20px);
  --shadow-gold-sm: 0 4px 16px rgba(201, 162, 39, .15);
  --shadow-gold-md: 0 12px 40px rgba(201, 162, 39, .2);
  --shadow-gold-lg: 0 24px 80px rgba(201, 162, 39, .25);
  --wa-green: #25D366;
  --wa-green-dark: #128C46;
}

/* ---------- Ambient canvas ---------- */
#ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
#ambient-canvas.ready { opacity: 1; }

/* Fine grain noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--gold-grad);
  z-index: 1200;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(201, 162, 39, .6);
}

/* ---------- Gold shimmer text ---------- */
.gold-shimmer {
  background: var(--gold-grad-animated);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shimmerMove 4s linear infinite;
}
@keyframes shimmerMove {
  to { background-position: 200% center; }
}

/* ---------- Magnetic buttons ---------- */
.btn.magnetic { position: relative; will-change: transform; }
.btn.magnetic .btn-label { display: inline-flex; align-items: center; gap: 10px; will-change: transform; }

/* Shimmer sweep on gold buttons */
.btn-gold.lux::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
  transition: none;
  pointer-events: none;
}
.btn-gold.lux:hover::after { animation: sweep .8s var(--ease-out); }
@keyframes sweep { to { left: 130%; } }

/* ---------- Cursor ripple ---------- */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  transform: scale(0);
  pointer-events: none;
  animation: rippleOut .6s var(--ease-out) forwards;
}
@keyframes rippleOut {
  to { transform: scale(2.4); opacity: 0; }
}

/* ---------- Card 3D tilt ---------- */
.tilt { transform-style: preserve-3d; will-change: transform; }
.tilt .course-badge, .tilt .course-meta, .tilt h3, .tilt p, .tilt .card-link {
  transform: translateZ(28px);
}
.course-card.tilt { transition: box-shadow .35s var(--ease); }

/* ---------- Nav magnetic underline ---------- */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .35s var(--ease-out);
}
.nav-item.active > .nav-link::after,
.nav-link:hover::after { transform: scaleX(1); }

/* ---------- Hero parallax hooks ---------- */
.hero-logo-visual { will-change: transform; }
.hero-content { will-change: transform; }

/* ---------- Stat counter glow on view ---------- */
.stat-card.in-view { box-shadow: var(--shadow-gold-md); border-color: rgba(201, 162, 39, .35); }

/* ---------- Testimonial carousel ---------- */
.quote-track { display: flex; transition: transform .6s var(--ease-expo); will-change: transform; }
.quote-viewport { overflow: hidden; }
.quote-card { flex: 0 0 100%; }
.quote-dots { display: flex; gap: 10px; justify-content: center; margin-top: 28px; }
.quote-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); cursor: pointer; transition: all .3s var(--ease); }
.quote-dot.active { background: var(--gold); width: 28px; border-radius: 6px; }

/* ---------- Blur-up images ---------- */
img.blur-up { filter: blur(14px); transform: scale(1.04); transition: filter .8s var(--ease-out), transform .8s var(--ease-out); }
img.blur-up.loaded { filter: blur(0); transform: scale(1); }

/* ---------- Page-transition veil ---------- */
.page-veil {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-veil .veil-logo { width: 120px; opacity: .9; filter: drop-shadow(0 0 30px rgba(201, 162, 39, .4)); }
.page-veil.active { animation: veilIn .5s var(--ease) forwards; }
.page-veil.leaving { animation: veilOut .5s var(--ease) forwards; }
@keyframes veilIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes veilOut { from { opacity: 1; } to { opacity: 0; } }

/* ---------- Reveal helpers (GSAP off fallback) ---------- */
.fx-hidden { opacity: 0; }
.fx-hidden.in { opacity: 1; }

/* ---------- Premium hover for footer links ---------- */
.footer a.lux { position: relative; display: inline-block; }
.footer a.lux::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .3s var(--ease-out);
}
.footer a.lux:hover::after { transform: scaleX(1); }

/* ---------- FIX: oversized card-link arrow icons ----------
   Base styles.css only sizes .course-card .card-link svg (16px).
   Other .card-link arrows (news / partner / trainer) inherit the
   SVG's intrinsic (huge) size. Constrain them globally. */
.card-link svg,
.news-card .card-link svg,
.partner-tile .card-link svg,
.trainer-card .card-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---------- Reduced motion: kill premium effects ---------- */
@media (prefers-reduced-motion: reduce) {
  #ambient-canvas, body::before { display: none !important; }
  .gold-shimmer { animation: none; -webkit-text-fill-color: var(--gold); color: var(--gold); }
  .scroll-progress { display: none; }
  .btn-gold.lux::after { display: none; }
  .tilt { transform: none !important; }
  .quote-track { transition: none; }
  .wa-float, .to-top { animation: none !important; }
}

/* ============================================================
   FLOATING ACTION BUTTONS — premium, cohesive pair
   ============================================================ */

/* Back-to-top (LEFT) */
.to-top {
  right: auto !important;
  left: 26px !important;
  bottom: 26px !important;
  width: 54px !important;
  height: 54px !important;
  border-radius: 50% !important;
  background: linear-gradient(145deg, #0E2E5F 0%, #0A2348 100%) !important;
  border: 1.5px solid rgba(201, 162, 39, .5) !important;
  color: #E9C86B !important;
  box-shadow: 0 10px 26px rgba(10, 35, 72, .45), inset 0 1px 0 rgba(255, 255, 255, .06) !important;
  transition: transform .35s var(--ease-spring), box-shadow .3s var(--ease), background .25s !important;
}
.to-top:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 16px 34px rgba(10, 35, 72, .55), 0 0 0 6px rgba(201, 162, 39, .12) !important;
  border-color: #E9C86B !important;
}
.to-top svg { width: 22px; height: 22px; transform: rotate(-90deg); }

/* WhatsApp (RIGHT) — polished green disc + pulsing ring halo */
.wa-float {
  bottom: 26px !important;
  right: 26px !important;
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 30% 25%, #34E07A 0%, var(--wa-green) 45%, var(--wa-green-dark) 100%) !important;
  border: none !important;
  box-shadow: 0 10px 26px rgba(37, 211, 102, .5), inset 0 2px 4px rgba(255, 255, 255, .25) !important;
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease) !important;
}
/* expanding ring halo */
.wa-float::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, .55);
  animation: waRing 2.4s var(--ease-out) infinite !important;
  pointer-events: none;
}
.wa-float img { width: 32px; height: 32px; object-fit: contain; display: block; }
.wa-float:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 14px 36px rgba(37, 211, 102, .65), inset 0 2px 4px rgba(255, 255, 255, .3) !important;
}
.wa-float:hover::after { animation-play-state: paused !important; }

@keyframes waRing {
  0%   { transform: scale(1);   opacity: .7; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

@media (max-width: 768px) {
  .to-top { left: 16px !important; bottom: 18px !important; width: 48px !important; height: 48px !important; }
  .wa-float { right: 16px !important; bottom: 18px !important; width: 54px !important; height: 54px !important; }
}

/* ---------- Spam honeypot (hidden from humans, tempting to bots) ---------- */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ---------- Leadership / Our Team ---------- */
.team-grid { display: flex; justify-content: center; margin-top: 44px; }
.team-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 38px;
  max-width: 880px;
  width: 100%;
  box-shadow: 0 18px 50px rgba(14,30,55,.08);
}
.team-photo {
  width: 200px; height: 200px;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  border: 3px solid rgba(201,162,39,.45);
  box-shadow: 0 10px 30px rgba(14,30,55,.25);
  flex: 0 0 auto;
}
.team-photo img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 16%;
  transform: scale(1.35); transform-origin: center 16%;
  display: block;
}
.team-initials {
  font-size: 64px; font-weight: 800; letter-spacing: 2px;
  color: var(--gold);
  font-family: var(--font-display, inherit);
}
.team-body h3 { font-size: 28px; margin-bottom: 4px; }
.team-role {
  color: var(--gold-2, #b8860b);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: 13px;
  margin-bottom: 18px;
}
.team-bio { color: var(--muted); margin-bottom: 14px; line-height: 1.7; }
.team-stats {
  list-style: none; padding: 0; margin: 0 0 20px;
  display: flex; gap: 28px; flex-wrap: wrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.team-stats li { display: flex; flex-direction: column; }
.tstat-num { font-size: 26px; font-weight: 800; color: var(--navy);; }
.tstat-lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.team-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.team-tags span {
  font-size: 12px; padding: 5px 12px; border-radius: 999px;
  background: rgba(201,162,39,.1); color: #8a6d1a; border: 1px solid rgba(201,162,39,.25);
}
@media (max-width: 680px) {
  .team-card { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 28px; }
  .team-photo { width: 150px; height: 150px; }
  .team-stats { justify-content: center; }
  .team-tags { justify-content: center; }
}

/* ---------- Founder snippet (homepage) ---------- */
.founder-strip {
  display: flex; align-items: center; gap: 28px;
  background: linear-gradient(120deg, rgba(201,162,39,.08), rgba(14,30,55,.04));
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 16px;
  padding: 28px 34px;
  max-width: 920px; margin: 0 auto;
}
.founder-av {
  flex: 0 0 auto;
  width: 72px; height: 72px; border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  border: 2px solid rgba(201,162,39,.45);
}
.founder-av img { width: 100%; height: 100%; object-fit: cover; object-position: center 16%; transform: scale(1.4); transform-origin: center 16%; display: block; }
.founder-txt { flex: 1; }
.founder-quote { font-size: 18px; line-height: 1.6; color: var(--navy); font-style: italic; margin-bottom: 8px; }
.founder-by { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.founder-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--gold-2, #b8860b); font-weight: 600; font-size: 14px;
  text-decoration: none;
}
.founder-link svg { width: 16px; height: 16px; }
.founder-link:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .founder-strip { flex-direction: column; text-align: center; padding: 24px; }
}
