/* ==========================================================================
   AMEEXO COGNITIVE DESIGN SYSTEM
   Futuristic Luxury UI System - Awwwards & Agency Caliber
   ========================================================================== */

html {
  font-size: 16px !important; /* Calibrated standard sleek base size */
}

/* --- Custom Variables & Glow Levels --- */
:root {
  --color-indigo-glow: rgba(0, 0, 0, 0.05);
  --color-teal-glow: rgba(0, 0, 0, 0.03);
  --border-glass: rgba(0, 0, 0, 0.06);
  --border-glow-active: rgba(0, 0, 0, 0.15);
  
  --transition-luxury: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-elastic: all 0.75s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Base Custom Scroll & Body Calibrations --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f8fafc;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6366f1;
}

/* --- High-End Noise Grain Overlay --- */
.noise-overlay {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3联%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.02;
  z-index: 9999;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* --- Ambient Light Fields --- */
.glow-bg-radial {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(20, 184, 166, 0.14) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 35%);
  z-index: 0;
  transition: background 0.5s ease;
}

/* --- Magnetic Inertia Cursors --- */
.custom-cursor {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 999999;
  transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.custom-cursor-dot {
  width: 6px;
  height: 6px;
  background-color: #14b8a6;
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 999999;
  box-shadow: 0 0 10px #14b8a6;
}

.custom-cursor.hovered {
  width: 60px;
  height: 60px;
  background-color: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.9);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
}

/* --- Premium Glassmorphism --- */
.glass-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
}

.glass-modal {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* --- Glowing Border Sweeps --- */
.glowing-border-wrap {
  position: relative;
  overflow: hidden;
}

.glowing-border-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--color-indigo-glow), var(--color-teal-glow)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.glowing-border-wrap:hover::after {
  background: linear-gradient(135deg, #000000, #b1b1b1) border-box;
}

/* --- 3D Rotating Credit Card --- */
.credit-card-container {
  width: 100%;
  height: 180px;
  perspective: 1000px;
}

.virtual-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.virtual-card.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1.5rem;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-front {
  background: linear-gradient(135deg, #18153b 0%, #2b0b38 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.card-chip {
  width: 38px;
  height: 28px;
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  border-radius: 4px;
}

.card-back {
  background: linear-gradient(135deg, #090e1a 0%, #111a2e 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transform: rotateY(180deg);
  padding: 0;
  justify-content: flex-start;
}

/* --- Particle Canvas Hero Elements --- */
.hero-canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* --- Marquee Infinite scrolling --- */
@keyframes marquee-infinite {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 1rem)); }
}

.animate-marquee-slow {
  animation: marquee-infinite 30s linear infinite;
}

/* --- Staggered Text Revel custom helper --- */
.reveal-text-line {
  overflow: hidden;
  position: relative;
  display: inline-block;
}

/* --- AI Chat bubble custom scroll locks --- */
.chat-scroll-container {
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.2) transparent;
}

/* --- Accent Pulsars --- */
.pulsar {
  position: relative;
}

.pulsar::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid #14b8a6;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  pointer-events: none;
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* --- Staggered CSS grids backdrop --- */
.grid-mesh-bg {
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* --- 3D Rotating Glow Cube --- */
.interactive-glow-cube {
  width: 140px;
  height: 140px;
  position: relative;
  transform-style: preserve-3d;
  animation: spin-cube 12s linear infinite;
}

@media (min-width: 640px) {
  .interactive-glow-cube {
    width: 160px;
    height: 160px;
  }
}

.cube-face {
  position: absolute;
  width: 140px;
  height: 140px;
  background: rgba(99, 102, 241, 0.03);
  border: 1.5px solid rgba(99, 102, 241, 0.22);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.05), inset 0 0 10px rgba(99, 102, 241, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #0f172a; /* Slate 900 text for absolute legibility */
  text-transform: uppercase;
  backface-visibility: visible;
  transition: border-color 0.5s ease, background-color 0.5s ease, color 0.5s ease, box-shadow 0.5s ease;
}

@media (min-width: 640px) {
  .cube-face {
    width: 160px;
    height: 160px;
    font-size: 0.75rem;
  }
}

.interactive-glow-cube:hover .cube-face {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.85);
  color: #4f46e5; /* Neon indigo-violet shift */
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.15), inset 0 0 15px rgba(99, 102, 241, 0.08);
}

.face-front  { transform: rotateY(  0deg) translateZ(70px); }
.face-back   { transform: rotateY(180deg) translateZ(70px); }
.face-left   { transform: rotateY(-90deg) translateZ(70px); }
.face-right  { transform: rotateY( 90deg) translateZ(70px); }
.face-top    { transform: rotateX( 90deg) translateZ(70px); }
.face-bottom { transform: rotateX(-90deg) translateZ(70px); }

@media (min-width: 640px) {
  .face-front  { transform: rotateY(  0deg) translateZ(80px); }
  .face-back   { transform: rotateY(180deg) translateZ(80px); }
  .face-left   { transform: rotateY(-90deg) translateZ(80px); }
  .face-right  { transform: rotateY( 90deg) translateZ(80px); }
  .face-top    { transform: rotateX( 90deg) translateZ(80px); }
  .face-bottom { transform: rotateX(-90deg) translateZ(80px); }
}

@keyframes spin-cube {
  0% { transform: rotateX(0deg) rotateY(0deg); }
  100% { transform: rotateX(360deg) rotateY(360deg); }
}

/* ─── Hero floating badge animation ─── */
@keyframes float-badge {
  0%, 100% { transform: translateY(0px);   box-shadow: 0 10px 30px rgba(99,102,241,0.30); }
  50%       { transform: translateY(-8px);  box-shadow: 0 18px 40px rgba(99,102,241,0.45); }
}

/* ─── Course cards horizontal ticker ─── */
@keyframes course-ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── Shimmer spotlight active card effect ─── */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ─── Premium Animated Logo — Graduation Cap & Turning Pages of Wisdom ─── */
@keyframes logo-infinity-float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    filter: drop-shadow(0 3px 6px rgba(99, 102, 241, 0.12));
  }
  25% {
    transform: translate(1px, -3px) rotate(0.8deg) scale(1.02);
    filter: drop-shadow(0 6px 12px rgba(99, 102, 241, 0.18));
  }
  50% {
    transform: translate(0, -5px) rotate(-0.5deg) scale(1.04);
    filter: drop-shadow(0 8px 16px rgba(99, 102, 241, 0.24));
  }
  75% {
    transform: translate(-1px, -3px) rotate(0.3deg) scale(1.02);
    filter: drop-shadow(0 6px 12px rgba(99, 102, 241, 0.18));
  }
}

/* Page flip effect representing turning pages of a book of knowledge */
@keyframes logo-page-flip {
  0%, 100% {
    transform: scaleX(1);
    filter: brightness(1) drop-shadow(0 0 4px rgba(99,102,241,0.25));
  }
  50% {
    transform: scaleX(0.15);
    filter: brightness(1.4) drop-shadow(0 0 12px rgba(20,184,166,0.75));
  }
}

/* Swing tassel representing a graduation mortarboard cap */
@keyframes logo-tassel-swing {
  0%, 100% {
    transform: rotate(0deg);
  }
  33% {
    transform: rotate(18deg);
  }
  66% {
    transform: rotate(-18deg);
  }
}

@keyframes logo-text-knowledge {
  0%, 100% {
    filter: drop-shadow(0 0 2px rgba(99, 102, 241, 0.2));
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.55)) drop-shadow(0 0 3px rgba(20, 184, 166, 0.3));
  }
}

.logo-animated-el {
  animation: logo-infinity-float 4s ease-in-out infinite;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.6s ease;
}

.logo-animated-el path {
  transition: fill 0.3s ease, stroke 0.3s ease;
  stroke-width: 2.5;
  stroke: #4f46e5;
  fill: rgba(99, 102, 241, 0.05);
}

/* On hover, tilt cap elegantly on graduate's head, casting a soft intellectual aura */
.logo-brand-container:hover .logo-animated-el {
  transform: translateY(-4px) scale(1.22) rotate(-8deg) !important; 
  filter: drop-shadow(0 8px 24px rgba(99, 102, 241, 0.45)) drop-shadow(0 -4px 12px rgba(20, 184, 166, 0.3)) !important;
}

/* Mortarboard diamond page-flips like a book */
.logo-brand-container:hover .logo-animated-el path:first-child {
  animation: logo-page-flip 0.8s ease-in-out infinite;
  stroke: #6366f1 !important;
  fill: rgba(20, 184, 166, 0.12) !important;
  transform-origin: 12px 11.25px; /* Center point of the diamond */
}

/* Vertical line swings organically like a graduation cap tassel */
.logo-brand-container:hover .logo-animated-el path:last-child {
  animation: logo-tassel-swing 0.8s ease-in-out infinite;
  stroke: #14b8a6 !important;
  transform-origin: 12px 15.5px; /* Pivot base of tassel */
}

/* Expand subtitle spacing on hover */
.logo-brand-container span:last-child {
  transition: letter-spacing 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.5s ease;
}

.logo-brand-container:hover span:last-child {
  letter-spacing: 0.30em !important;
  color: #6366f1 !important;
}

/* Shimmer AMEEXO text with light of knowledge */
.logo-brand-container:hover span:first-child {
  animation: logo-text-knowledge 1.6s ease-in-out infinite;
}

/* Active loader animations when embedded in preloader or modals (runs permanently) */
.logo-loader-active {
  animation: logo-infinity-float 3s ease-in-out infinite !important;
  filter: drop-shadow(0 8px 24px rgba(99, 102, 241, 0.45)) drop-shadow(0 -4px 12px rgba(20, 184, 166, 0.3)) !important;
}

.logo-loader-active .cap-mortarboard-top {
  animation: logo-page-flip 1.2s ease-in-out infinite !important;
  stroke: #6366f1 !important;
  fill: rgba(20, 184, 166, 0.15) !important;
  transform-origin: 12px 11.25px !important;
}

.logo-loader-active .cap-mortarboard-bottom {
  stroke: #4f46e5 !important;
  fill: rgba(99, 102, 241, 0.05) !important;
}

.logo-loader-active .cap-mortarboard-tassel {
  animation: logo-tassel-swing 1.2s ease-in-out infinite !important;
  stroke: #14b8a6 !important;
  transform-origin: 12px 15.5px !important;
}

/* --- Mobile Dropdown / Modal Fade-in Animation --- */
@keyframes fade-in-tab {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Mobile global overflow guard --- */
@media (max-width: 639px) {
  body {
    overflow-x: hidden;
  }
  
  .subtitle-badge {
    font-size: 0.6rem !important;
  }
}
