/* ====== animations.css ====== */

/* -------- Keyframes -------- */
@keyframes auroraDrift {
  0%,100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(60px, -40px) scale(1.1); }
  50% { transform: translate(-30px, 60px) scale(0.95); }
  75% { transform: translate(40px, 30px) scale(1.05); }
}

@keyframes glowLineMove {
  to { transform: translateX(calc(100vw + 600px)); }
}

@keyframes floatPill1 {
  0%, 100% { transform: translateY(0px) rotate(-2deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}

@keyframes floatPill2 {
  0%, 100% { transform: translateY(0px) rotate(2deg); }
  50% { transform: translateY(-16px) rotate(-2deg); }
}

@keyframes floatHero {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

@keyframes pulseShape {
  0%,100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
}

@keyframes bounceScroll {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes scrollText {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes loadProgress {
  0% { width: 0%; }
  50% { width: 60%; }
  100% { width: 100%; }
}

@keyframes pulseText {
  0%,100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes rippleAnim {
  to { transform: scale(6); opacity: 0; }
}

@keyframes floatShape {
  0%,100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(20px, -20px) rotate(90deg); }
  50% { transform: translate(-10px, 30px) rotate(180deg); }
  75% { transform: translate(-20px, -10px) rotate(270deg); }
}

@keyframes whatsappPulse {
  0% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
  50% { box-shadow: 0 4px 30px rgba(37,211,102,0.7); }
  100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-20px) scale(0.95); }
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* -------- Scroll-triggered Animations & Performance -------- */
/* Elements are fully visible in CSS by default; GSAP dynamically animates them on scroll */
[data-anim] {
  will-change: transform, opacity;
}

.section-badge {
  display: inline-flex;
  will-change: transform, opacity;
}

.section-title {
  will-change: transform, opacity;
}

/* ====== DEEP CINEMATIC SPOTLIGHT SHOWCASE & 3D DEPTH ====== */
.spotlight .image.fit.main {
  position: absolute;
  inset: 0;
  overflow: hidden;
  perspective: 1200px;
  transform-style: preserve-3d;
}

.spotlight .image.fit.main img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: contrast(1.08) saturate(1.12) brightness(0.92);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease;
  will-change: transform;
}

.spotlight:hover .image.fit.main img {
  filter: contrast(1.12) saturate(1.18) brightness(0.98);
}

/* Cinematic Multi-Layer Depth Vignette & Ambient Light Shimmer */
.showcase-depth-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: 
    radial-gradient(ellipse 65% 75% at 25% 50%, rgba(32, 96, 136, 0.25) 0%, transparent 60%),
    linear-gradient(to bottom, rgba(12, 38, 56, 0.7) 0%, rgba(12, 38, 56, 0.2) 35%, rgba(12, 38, 56, 0.25) 65%, rgba(12, 38, 56, 0.85) 100%),
    radial-gradient(ellipse at center, transparent 30%, rgba(12, 38, 56, 0.6) 80%, rgba(12, 38, 56, 0.95) 100%);
  box-shadow: inset 0 0 100px rgba(12, 38, 56, 0.8);
}

.showcase-depth-overlay::after {
  content: '';
  position: absolute;
  inset: -50%;
  background: linear-gradient(135deg, transparent 40%, rgba(165, 205, 215, 0.1) 50%, transparent 60%);
  transform: rotate(25deg);
  animation: showcaseLightBeam 10s ease-in-out infinite;
  pointer-events: none;
}

@keyframes showcaseLightBeam {
  0% { transform: translateY(-30%) rotate(25deg); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(30%) rotate(25deg); opacity: 0; }
}

/* 3D Floating Interactive Depth Pills */
.showcase-floating-pill {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(12, 38, 56, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(165, 205, 215, 0.35);
  border-radius: 50px;
  color: #ffffff;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45), 0 0 20px rgba(32, 96, 136, 0.3);
  transform: translateZ(30px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  cursor: default;
}

.showcase-floating-pill:hover {
  background: rgba(12, 38, 56, 0.95);
  border-color: var(--accent);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 30px rgba(197, 168, 128, 0.35);
  transform: translateZ(50px) scale(1.05);
}

.showcase-floating-pill.pill-top {
  top: 18%;
  left: 6%;
  animation: floatPill1 6s ease-in-out infinite;
}

.showcase-floating-pill.pill-middle {
  top: 48%;
  left: 14%;
  padding: 8px 16px;
  border-radius: 30px;
  background: rgba(32, 96, 136, 0.8);
  border-color: rgba(165, 205, 215, 0.5);
  animation: floatPill2 7s ease-in-out infinite 0.5s;
}

.showcase-floating-pill.pill-bottom {
  bottom: 20%;
  left: 8%;
  animation: floatPill1 6.5s ease-in-out infinite 1.2s;
}

.showcase-floating-pill .pill-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradient-primary);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.showcase-floating-pill .pill-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.showcase-floating-pill .pill-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.showcase-floating-pill .pill-desc {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.2;
}

.showcase-floating-pill .pulse-dot-sm {
  width: 7px;
  height: 7px;
  background-color: #22c55e;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px #22c55e;
  animation: mapPulseDot 1.8s infinite;
}

.showcase-floating-pill .pill-badge-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}

@media (max-width: 991px) {
  .showcase-floating-pill {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-anim],
  .section-badge,
  .section-title { 
    opacity: 1 !important; 
    transform: none !important; 
    clip-path: none !important;
  }
  .spotlight .image.fit.main img {
    will-change: auto;
  }
}

/* -------- Scroll Progress -------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  z-index: 100000;
  background: linear-gradient(90deg, var(--primary-light), var(--accent));
  transform-origin: left;
  transform: scaleX(0);
  will-change: transform;
}

/* -------- Mouse Follower -------- */
.mouse-follower {
  position: fixed;
  width: 16px; height: 16px;
  background: var(--primary-light);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%) scale(1);
  mix-blend-mode: difference;
  opacity: 0;
  will-change: transform;
}

.mouse-follower.active {
  opacity: 0.7;
}

.mouse-follower.hover {
  width: 48px; height: 48px;
  background: var(--primary);
  opacity: 0.25;
}

/* -------- Floating Shapes -------- */
.floating-shape {
  display: none !important;
}

/* -------- Lenis Smooth Scroll Core Rules -------- */
html.lenis, html.lenis body {
  height: auto !important;
  min-height: 100% !important;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* -------- Counter Animation Prep -------- */
.counter-number {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* -------- Portfolio Hover 3D -------- */
.portfolio-item {
  perspective: 800px;
  transform-style: preserve-3d;
}

.portfolio-item img {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.portfolio-item:hover img {
  transform: scale(1.06);
}

/* -------- GPU Acceleration Hints -------- */
.hero-image-wrapper,
.floating-ui-badge,
.hero-mesh,
.timeline-card,
.service-card,
.portfolio-item {
  will-change: transform;
  transform: translateZ(0);
}

/* ============================================================
   FOUNDER 3D SCROLL-DRIVEN CONTINUOUS ROTATION & PIN
   ============================================================ */
.founder-section-showcase {
  padding: 100px 0 80px;
  background: var(--bg-light);
  position: relative;
  overflow: visible;
}

[data-theme="dark"] .founder-section-showcase {
  background: var(--body-bg);
}

.founder-sticky-col {
  position: -webkit-sticky;
  position: sticky;
  top: 120px;
  align-self: flex-start;
  z-index: 10;
}

.founder-3d-flip-stage {
  perspective: 1600px;
  -webkit-perspective: 1600px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
  width: 100%;
}

.founder-glow-backdrop {
  position: absolute;
  width: 90%;
  height: 90%;
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.35), rgba(var(--primary-light-rgb), 0.45));
  filter: blur(40px);
  z-index: 1;
  pointer-events: none;
}

.founder-3d-flip-card {
  width: 100%;
  max-width: 430px;
  height: 540px;
  position: relative;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  will-change: transform;
  border-radius: 28px;
  z-index: 2;
  box-shadow: 0 20px 50px rgba(var(--primary-rgb), 0.15);
}

.founder-card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border: 4px solid var(--card-bg);
  box-shadow: 0 20px 50px rgba(var(--primary-rgb), 0.15);
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

/* Front Face (Portrait) */
.founder-card-face.front {
  background: var(--card-bg);
  -webkit-transform: rotateY(0deg) translateZ(1px);
  transform: rotateY(0deg) translateZ(1px);
  z-index: 2;
}

.founder-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.founder-nameplate {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(12, 38, 56, 0.96) 0%, rgba(32, 96, 136, 0.85) 70%, transparent 100%);
  padding: 40px 20px 22px;
  color: #ffffff;
  text-align: center;
  transform: translateZ(30px);
  -webkit-transform: translateZ(30px);
}

.nameplate-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.nameplate-subtitle {
  font-size: 0.85rem;
  color: var(--primary-light);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: block;
}

/* Back Face (NTI Official Honor Portrait at 180 deg) */
.founder-card-face.back {
  background: var(--card-bg);
  -webkit-transform: rotateY(180deg) translateZ(1px);
  transform: rotateY(180deg) translateZ(1px);
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.founder-card-face.back .founder-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.back-honor-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(12, 38, 56, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 8px 16px;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  transform: translateZ(30px);
  -webkit-transform: translateZ(30px);
}

.back-honor-badge i {
  color: var(--gold);
}

.founder-floating-pill {
  position: absolute;
  background: var(--card-bg);
  padding: 10px 18px;
  border-radius: 50px;
  box-shadow: 0 12px 30px rgba(var(--primary-rgb), 0.12), 0 0 0 1px rgba(var(--primary-rgb), 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  z-index: 3;
}

.founder-floating-pill.pill-top {
  top: 15px;
  right: -15px;
  animation: floatPill1 5s ease-in-out infinite;
}

.founder-floating-pill.pill-bottom {
  bottom: 120px;
  left: -15px;
  animation: floatPill2 6s ease-in-out infinite 0.5s;
}

@media (max-width: 991px) {
  .founder-sticky-col {
    position: relative;
    top: 0;
    margin-bottom: 30px;
  }
  .founder-3d-flip-card {
    max-width: 360px;
    height: 460px;
    margin: 0 auto;
  }
  .founder-floating-pill {
    display: none;
  }
}

@media (max-width: 576px) {
  .founder-3d-flip-card {
    max-width: 290px;
    height: 390px;
  }
  .nameplate-title {
    font-size: 1.15rem;
  }
  .nameplate-subtitle {
    font-size: 0.75rem;
  }
}

.degree-card-highlight {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  transition: var(--transition);
}

.degree-card-highlight:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  background: var(--card-bg);
  box-shadow: var(--shadow-hover);
}

.degree-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.12), rgba(var(--primary-light-rgb), 0.2));
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.degree-card-highlight.degree-gold .degree-icon {
  background: rgba(197, 168, 128, 0.15);
  color: var(--gold);
}

.degree-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}

.degree-field {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0;
}

.quote-statement-box {
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05), rgba(var(--primary-light-rgb), 0.08));
  border-right: 4px solid var(--primary);
  border-radius: 0 16px 16px 0;
  padding: 22px 26px;
  position: relative;
  margin-top: 14px;
}

[data-theme="dark"] .quote-statement-box {
  background: rgba(255, 255, 255, 0.03);
}

.quote-mark-icon {
  font-size: 1.6rem;
  color: var(--primary);
  opacity: 0.35;
  margin-bottom: 8px;
  display: block;
}

.quote-statement-text {
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.85;
  color: var(--text);
  margin: 0;
  font-style: italic;
}

/* 8 Expertise Boxes (Harmonized with Service Cards) */
.expertise-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.expertise-box::before {
  content: '';
  position: absolute;
  top: 0; right: 0; width: 0; height: 3px;
  background: var(--gradient-primary);
  transition: width 0.4s ease;
}

.expertise-box:hover {
  transform: translateY(-6px);
  border-color: rgba(var(--primary-rgb), 0.4);
  box-shadow: var(--shadow-hover);
}

.expertise-box:hover::before {
  width: 100%;
}

.expertise-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08), rgba(var(--primary-light-rgb), 0.15));
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 18px;
  transition: var(--transition);
}

.expertise-box:hover .expertise-icon {
  background: var(--gradient-primary);
  color: #ffffff;
  transform: scale(1.08) rotate(-4deg);
}

.expertise-box h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}

.expertise-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* Vision & Mission Dual Cards */
.vision-pod-card {
  background: var(--gradient-primary);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 48px 38px;
  box-shadow: var(--shadow-hover);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.vision-pod-card.vision-pod-light {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.vision-pod-card:hover {
  transform: translateY(-6px);
}

.vision-pod-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.15);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 24px;
}

.vision-pod-light .vision-pod-icon {
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--primary);
}

.vision-pod-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: inherit;
}

.vision-pod-text {
  font-size: 1.12rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.vision-pod-light .vision-pod-text {
  color: var(--text-light);
}
