/* ==========================================================================
   Motion layer — 3D hero scene, counters, reveals, micro-interactions
   ========================================================================== */

/* ---- Hero 3D WebGL scene (signature element) ----
   Permanently dark regardless of the site's light/dark toggle — this is a
   fixed design choice for the hero band, not part of the theme system. */
.hero-3d-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #10192E 0%, #0B1120 60%, #070B14 100%);
  padding-top: var(--header-h);
}
.hero-3d-canvas-holder {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero-3d-canvas-holder canvas { display: block; }
.hero-3d-overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 760px;
  padding: 80px 24px 60px;
}
.hero-3d-eyebrow { color: var(--secondary); justify-content: center; }
.hero-3d-heading { color: #FFFFFF; margin-top: 18px; }
.hero-3d-lead { color: #94A3B8; margin: 22px auto 0; }
.hero-3d-btn-secondary {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
}
.hero-3d-btn-secondary:hover { background: rgba(255,255,255,0.14); transform: translateY(-2px); }
.hero-3d-stats {
  display: flex; gap: 40px; margin-top: 48px; flex-wrap: wrap; justify-content: center;
}
.hero-3d-stats .stat-value, .hero-3d-stat-value { color: #fff; }
.hero-3d-stat-label { color: #94A3B8; font-size: 0.88rem; margin-top: 2px; }

/* ---- Split 55/45 hero layout (landing page) ---- */
.hero-3d-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center;
  max-width: 1320px; padding: 120px 24px 60px;
}
.hero-3d-overlay-left { text-align: left; max-width: none; padding: 0; }
.hero-3d-overlay-left .hero-3d-eyebrow { justify-content: flex-start; }
.hero-3d-overlay-left .hero-3d-lead { margin-left: 0; }
.hero-3d-cta-row { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .hero-3d-grid { grid-template-columns: 1fr; padding-top: 100px; }
  .hero-3d-overlay-left { text-align: center; }
  .hero-3d-overlay-left .hero-3d-eyebrow { justify-content: center; }
  .hero-3d-overlay-left .hero-3d-lead { margin-left: auto; margin-right: auto; }
  .hero-3d-cta-row, .hero-3d-stats { justify-content: center; }
  .hero-3d-mockup-wrap { height: 320px; margin-top: 20px; }
}

/* ---- Floating glass dashboard mockup (hero right side) ---- */
.hero-3d-mockup-wrap { position: relative; height: 480px; }
.hero-mockup { position: relative; width: 100%; height: 100%; }
.hero-mockup-card {
  position: absolute;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 16px; padding: 18px 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  color: #fff;
}
.hero-mockup-main { top: 8%; left: 2%; width: 78%; height: 58%; animation: mockup-float 6s ease-in-out infinite; }
.hero-mockup-float-1 { top: 0; right: 0; width: 170px; animation: mockup-float 5s ease-in-out infinite; animation-delay: -1s; }
.hero-mockup-float-2 { bottom: 10%; left: 0; width: 180px; animation: mockup-float 7s ease-in-out infinite; animation-delay: -3s; }
.hero-mockup-float-3 { bottom: -2%; right: 4%; width: 195px; animation: mockup-float 6.5s ease-in-out infinite; animation-delay: -2s; }
@keyframes mockup-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@media (prefers-reduced-motion: reduce) {
  .hero-mockup-main, .hero-mockup-float-1, .hero-mockup-float-2, .hero-mockup-float-3 { animation: none; }
}
.hero-mockup-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.hero-mockup-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--secondary); box-shadow: 0 0 8px var(--secondary); }
.hero-mockup-title { font-size: 0.85rem; font-weight: 600; color: #E2E8F0; }
.hero-mockup-bars { display: flex; align-items: flex-end; gap: 10px; height: 65%; }
.hero-mockup-bar { flex: 1; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--primary-glow), var(--primary)); opacity: 0.85; }
.hero-mockup-label { font-size: 0.72rem; color: #94A3B8; text-transform: uppercase; letter-spacing: 0.05em; }
.hero-mockup-value { font-size: 0.95rem; font-weight: 700; color: #fff; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.hero-mockup-badge { font-size: 0.7rem; background: rgba(0,200,150,0.2); color: var(--secondary); padding: 2px 6px; border-radius: 6px; }

/* Orchestrated load-in sequence — staggered entrance, delay set inline per element by hero-3d.js */
.hero-3d-entrance {
  opacity: 0;
  transform: translateY(18px);
  animation: hero-entrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes hero-entrance {
  to { opacity: 1; transform: translateY(0); }
}

/* Cursor-reactive glow — soft, subtle, follows the mouse within the hero only */
.hero-3d-cursor-glow {
  position: absolute;
  width: 420px; height: 420px;
  margin-left: -210px; margin-top: -210px;
  background: radial-gradient(circle, rgba(13,235,236,0.14) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

/* No-JS / reduced-motion / load-failure fallback: the radial gradient
   background above already reads as an intentional dark hero on its own,
   so nothing looks "broken" if the canvas never mounts. */
.hero-3d-canvas-holder.hero-3d-static {
  background:
    radial-gradient(circle at 30% 30%, rgba(8, 117, 119,0.18), transparent 45%),
    radial-gradient(circle at 70% 65%, rgba(0,200,150,0.14), transparent 45%);
}

/* ---- Counters ---- */
.stat-value {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.1rem, 3.4vw, 2.8rem);
  letter-spacing: -0.03em;
  color: var(--slate-900);
  font-variant-numeric: tabular-nums;
}

/* ---- Scroll reveal (fallback for AOS-style attrs without external lib) ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Marquee for partner colleges ---- */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---- Mobile menu ---- */
.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0;
  background: var(--bg);
  z-index: 90;
  padding: 24px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.mobile-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mobile-menu a {
  display: block; padding: 16px 4px; font-size: 1.1rem; font-weight: 600;
  border-bottom: 1px solid var(--slate-200);
}

/* ==========================================================================
   Premium interaction system — buttons, glass cards, backgrounds
   ========================================================================== */

/* ---- Premium buttons: gradient, lift, ripple, magnetic pull ---- */
.btn { position: relative; overflow: hidden; }
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  transform: scale(0);
  animation: btn-ripple-anim 0.6s ease-out;
  pointer-events: none;
}
@keyframes btn-ripple-anim {
  to { transform: scale(3); opacity: 0; }
}
.btn-primary {
  background-size: 200% 200%;
  animation: btn-gradient-shift 6s ease infinite;
}
@keyframes btn-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary { animation: none; }
}

/* ---- Premium glass cards: gradient border, top glow, hover lift ---- */
.card-premium {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease;
  border: 1px solid var(--slate-200);
}
.card-premium::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-glow), var(--secondary));
  opacity: 0; transition: opacity 0.3s ease;
}
.card-premium::after {
  content: '';
  position: absolute; top: -40%; left: 50%; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(13,235,236,0.16), transparent 70%);
  transform: translateX(-50%);
  opacity: 0; transition: opacity 0.3s ease;
  pointer-events: none;
}
.card-premium:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(8,117,119,0.12), 0 8px 20px rgba(15,23,42,0.08);
  border-color: rgba(13,235,236,0.3);
}
.card-premium:hover::before,
.card-premium:hover::after { opacity: 1; }
[data-theme="dark"] .card-premium { background: var(--surface); }

/* ---- Aurora / mesh gradient background — dark sections only, low opacity ---- */
.aurora-bg {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.aurora-bg::before, .aurora-bg::after {
  content: '';
  position: absolute;
  width: 60%; height: 60%;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
  animation: aurora-drift 18s ease-in-out infinite;
}
.aurora-bg::before {
  background: var(--primary-glow);
  top: -10%; left: -10%;
}
.aurora-bg::after {
  background: var(--secondary);
  bottom: -10%; right: -10%;
  animation-delay: -9s;
}
@keyframes aurora-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6%, 8%) scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .aurora-bg::before, .aurora-bg::after { animation: none; }
}

/* Subtle grid pattern overlay */
.grid-pattern {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 40%, transparent 90%);
}

/* Noise texture — SVG turbulence, extremely low opacity, adds tactile depth */
.noise-overlay {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.035; mix-blend-mode: overlay; z-index: 5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Marquee items: dim by default, brand color + scale on hover ---- */
/* ---- Footer social icons ---- */
.footer-social-icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #94A3B8;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.footer-social-icon:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px);
}

.marquee-item {
  font-family: var(--font-mono); font-weight: 600; font-size: 1.1rem;
  color: var(--slate-300);
  transition: color 0.3s ease, transform 0.3s ease;
}
.marquee-item:hover { color: var(--primary); transform: scale(1.08); }

/* ---- Gradient text highlight ---- */
.text-gradient {
  background: linear-gradient(120deg, var(--primary-glow), var(--secondary));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---- Glowing numbered circle (How It Works timeline) ---- */
.timeline-wrap { position: relative; }
.timeline-connector {
  position: absolute; top: 27px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-glow) 15%, var(--primary-glow) 85%, transparent);
  opacity: 0.35;
  z-index: 0;
}
.timeline-circle {
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.2rem;
  background: var(--surface);
  border: 2px solid var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 6px rgba(8,117,119,0.08), 0 0 24px rgba(13,235,236,0.25);
  position: relative; z-index: 1;
  margin-bottom: 18px;
}

/* ---- Testimonial carousel ---- */
.testimonial-carousel { position: relative; overflow: hidden; }
.testimonial-track { display: flex; transition: transform 0.5s cubic-bezier(0.16,1,0.3,1); }
.testimonial-slide { flex: 0 0 100%; padding: 4px; }
.carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }
.carousel-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--slate-300);
  border: none; cursor: pointer; transition: all 0.25s ease; padding: 0;
}
.carousel-dot.active { background: var(--primary); width: 24px; border-radius: 4px; }
.testimonial-slide { max-width: 640px; margin: 0 auto; }

/* ---- CTA section: dark gradient with aurora + noise, matches hero language ---- */
.cta-premium {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #10192E 0%, #0B1120 60%, #070B14 100%);
  border: 1px solid rgba(255,255,255,0.08);
}
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--slate-200);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 3; box-shadow: var(--shadow-md);
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel-arrow:hover { background: var(--primary); color: #fff; transform: translateY(-50%) scale(1.08); }
.carousel-arrow-prev { left: -8px; }
.carousel-arrow-next { right: -8px; }
@media (max-width: 700px) {
  .carousel-arrow { display: none; }
}
