/* ============================================ */
/* STUDIFY TUTORS — CUSTOM STYLES              */
/* Modern Techie / Digital Premium aesthetic    */
/* ============================================ */

/* --- Base --- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

::selection {
  background: rgba(0, 212, 255, 0.2);
  color: #0A1628;
}

/* --- Hero Background Grid --- */
.hero-grid {
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: grid-drift 20s linear infinite;
}

@keyframes grid-drift {
  0% { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}

/* --- Navbar scroll effect --- */
#navbar {
  transition: all 0.3s ease;
}
#navbar.scrolled {
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* --- Animations --- */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-fade-in { animation: fade-in 0.8s ease forwards; }
.animate-slide-up { animation: slide-up 0.8s ease forwards; }
.animate-slide-in-left { animation: slide-in-left 0.8s ease forwards; }

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 400ms; }

/* --- Scroll-triggered reveal --- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(90px) scale(0.94);
  filter: blur(6px);
  transition:
    opacity    2.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform  2.8s cubic-bezier(0.16, 1, 0.3, 1),
    filter     2.0s ease;
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0px);
}

.reveal-from-left {
  opacity: 0;
  transform: translateX(-80px) scale(0.96);
  filter: blur(4px);
  transition:
    opacity    2.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform  2.8s cubic-bezier(0.16, 1, 0.3, 1),
    filter     2.0s ease;
}
.reveal-from-left.revealed {
  opacity: 1;
  transform: translateX(0) scale(1);
  filter: blur(0px);
}

.reveal-from-right {
  opacity: 0;
  transform: translateX(80px) scale(0.96);
  filter: blur(4px);
  transition:
    opacity    2.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform  2.8s cubic-bezier(0.16, 1, 0.3, 1),
    filter     2.0s ease;
}
.reveal-from-right.revealed {
  opacity: 1;
  transform: translateX(0) scale(1);
  filter: blur(0px);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.20s; }
.stagger-3 { transition-delay: 0.35s; }
.stagger-4 { transition-delay: 0.50s; }
.stagger-5 { transition-delay: 0.65s; }

/* --- FAQ Accordion --- */
.faq-item {
  transition: all 0.2s ease;
}
.faq-item:hover {
  border-color: rgba(0, 212, 255, 0.3);
}
.faq-item.active {
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.05);
}
.faq-icon {
  transition: transform 0.3s ease;
}
.faq-item.active .faq-icon {
  transform: rotate(180deg);
}
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.active .faq-content {
  max-height: 300px;
}

/* --- Glassmorphism cards (Phase 2+) --- */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- Booking form multi-step --- */
.step-indicator {
  transition: all 0.3s ease;
}
.step-indicator.active {
  background: #00D4FF;
  color: #0A1628;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}
.step-indicator.completed {
  background: #0A1628;
  color: #00D4FF;
}

/* --- Pulse dot --- */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* --- Package card hover lift --- */
.package-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.package-card:hover {
  transform: translateY(-4px);
}

/* --- Gradient text --- */
.gradient-text {
  background: linear-gradient(135deg, #00D4FF 0%, #00B8DB 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Loading spinner --- */
.spinner {
  border: 3px solid rgba(0, 212, 255, 0.1);
  border-top: 3px solid #00D4FF;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Form styles --- */
input, select, textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #00D4FF;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* --- Custom scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* ============================================ */
/* ENHANCED ANIMATIONS & VISUAL EFFECTS        */
/* ============================================ */

/* --- Floating Orbs (Hero) — slow GPU-composited pulse --- */
@keyframes orb-pulse-1 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1);    opacity: 0.55; }
  50%       { transform: translate3d(28px, -36px, 0) scale(1.14); opacity: 0.75; }
}
@keyframes orb-pulse-2 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1);    opacity: 0.45; }
  50%       { transform: translate3d(-36px, 28px, 0) scale(1.11); opacity: 0.65; }
}
@keyframes orb-pulse-3 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1);    opacity: 0.35; }
  50%       { transform: translate3d(18px, -22px, 0) scale(1.09); opacity: 0.55; }
}
@keyframes orb-pulse-4 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1);    opacity: 0.30; }
  50%       { transform: translate3d(-22px, 18px, 0) scale(1.12); opacity: 0.48; }
}

.orb-1 { animation: orb-pulse-1 38s ease-in-out infinite; will-change: transform, opacity; }
.orb-2 { animation: orb-pulse-2 30s ease-in-out infinite; will-change: transform, opacity; }
.orb-3 { animation: orb-pulse-3 24s ease-in-out infinite; will-change: transform, opacity; }
.orb-4 { animation: orb-pulse-4 44s ease-in-out infinite; will-change: transform, opacity; }

/* --- Card Shine on Hover --- */
.card-shine {
  position: relative;
  overflow: hidden;
}
.card-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.07) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: rotate(25deg);
  transition: left 0.7s ease;
  pointer-events: none;
}
.card-shine:hover::after {
  left: 125%;
}

/* --- CTA Glow Pulse --- */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.2), 0 4px 20px rgba(0,0,0,0.15); }
  50%       { box-shadow: 0 0 55px rgba(0, 212, 255, 0.55), 0 0 110px rgba(0, 212, 255, 0.15), 0 4px 20px rgba(0,0,0,0.15); }
}
.btn-glow {
  animation: glow-pulse 3.5s ease-in-out infinite;
}

/* --- Step Card Hover --- */
.step-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  border-radius: 1.25rem;
}
.step-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.08);
}

/* --- Feature Item Hover --- */
.feature-item {
  transition: transform 0.28s ease, background 0.28s ease;
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  margin: -0.5rem -0.75rem;
}
.feature-item:hover {
  transform: translateX(6px);
  background: rgba(0, 212, 255, 0.04);
}

/* --- Pricing Card Hover Lift + Glow --- */
.pricing-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.pricing-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 212, 255, 0.15);
}

/* --- Why Studify item hover --- */
.why-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.why-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 212, 255, 0.08);
}

/* --- Section accent glow (top highlight line) --- */
.section-top-glow {
  position: relative;
}
.section-top-glow::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  max-width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.35), transparent);
}

/* --- Accessible focus indicators --- */
:focus-visible {
  outline: 2px solid #00D4FF;
  outline-offset: 2px;
}

/* Inputs already have a custom focus style — preserve it */
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-grid {
    background-size: 40px 40px;
  }
}
