/* ==========================================================================
   BRAVION INDUSTRY - High-Performance Modern Stylesheet
   Best-in-Class Animations, 3D Physics, Continuous Scroll & Hover Effects
   Fully Responsive Across All Devices (320px - 1920px)
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Variables)
   -------------------------------------------------------------------------- */
:root {
  --primary-blue: #087CA8;
  --dark-blue: #075985;
  --deep-navy: #0B1F33;
  --bright-blue: #0EA5E9;
  --cyan-accent: #06B6D4;
  --light-blue: #E0F2FE;
  --bg-light: #F8FAFC;
  --white: #FFFFFF;
  --dark-text: #0F172A;
  --secondary-text: #475569;
  --success-green: #16A34A;
  --border-light: rgba(15, 23, 42, 0.08);
  --border-card: rgba(8, 124, 168, 0.12);
  --card-shadow: 0 10px 25px -5px rgba(11, 31, 51, 0.05), 0 8px 10px -6px rgba(11, 31, 51, 0.02);
  --card-shadow-hover: 0 25px 50px -12px rgba(8, 124, 168, 0.22), 0 0 0 1.5px rgba(14, 165, 233, 0.35);
}

/* --------------------------------------------------------------------------
   Base Styles & Viewport Protection
   -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--dark-text);
  background-color: var(--bg-light);
  overflow-x: hidden;
  width: 100%;
}

body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure mobile input focus doesn't trigger iOS Safari auto-zoom */
@media screen and (max-width: 767px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Accessibility: Focus styles */
:focus-visible {
  outline: 2px solid var(--bright-blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--deep-navy);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  z-index: 9999;
  transition: top 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
}

.skip-link:focus {
  top: 1rem;
}

/* --------------------------------------------------------------------------
   CONTINUOUS SCROLL REVEAL (Up & Down Triggers)
   -------------------------------------------------------------------------- */
/* Base for all scroll animated items */
.scroll-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Visible state */
.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
  filter: blur(0);
}

/* Upward reveal (default) */
.scroll-reveal-up {
  opacity: 0;
  transform: translateY(36px);
}

/* Downward reveal */
.scroll-reveal-down {
  opacity: 0;
  transform: translateY(-30px);
}

/* Left to right reveal */
.scroll-reveal-left {
  opacity: 0;
  transform: translateX(-40px);
}

/* Right to left reveal */
.scroll-reveal-right {
  opacity: 0;
  transform: translateX(40px);
}

/* Scale & Pop reveal */
.scroll-reveal-scale {
  opacity: 0;
  transform: scale(0.92);
}

/* Staggered transition delays */
.delay-50  { transition-delay: 50ms; }
.delay-100 { transition-delay: 100ms; }
.delay-150 { transition-delay: 150ms; }
.delay-200 { transition-delay: 200ms; }
.delay-250 { transition-delay: 250ms; }
.delay-300 { transition-delay: 300ms; }
.delay-350 { transition-delay: 350ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* --------------------------------------------------------------------------
   SUPERIOR HOVER ANIMATIONS ("Hover Par Sabse Jyada Animation")
   -------------------------------------------------------------------------- */

/* Premium Card Hover Lift & Glow */
.bravion-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 1.125rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.35s ease;
  position: relative;
  overflow: hidden;
}

.bravion-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--bright-blue), var(--cyan-accent));
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  z-index: 10;
}

.bravion-card:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(14, 165, 233, 0.35);
}

.bravion-card:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Card Icon Micro-Interaction */
.card-icon-wrapper {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), 
              background-color 0.3s ease, 
              color 0.3s ease, 
              box-shadow 0.35s ease;
}

.bravion-card:hover .card-icon-wrapper {
  transform: scale(1.18) rotate(5deg);
  background-color: var(--primary-blue) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 20px -3px rgba(8, 124, 168, 0.35);
}

/* Navy Card Hover for Dark Theme Sections */
.bravion-card-navy {
  background: linear-gradient(145deg, #0B1F33 0%, #081726 100%);
  border: 1px solid rgba(14, 165, 233, 0.2);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.35s ease;
}

.bravion-card-navy:hover {
  transform: translateY(-7px) scale(1.02);
  box-shadow: 0 25px 45px -10px rgba(6, 182, 212, 0.25);
  border-color: rgba(6, 182, 212, 0.5);
}

/* Button Shimmer Light-Sweep Effect */
.btn-shimmer {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.25s ease;
}

.btn-shimmer::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    60deg, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.45) 50%, 
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.btn-shimmer:hover::before {
  opacity: 1;
  animation: shimmerSweep 0.85s ease-in-out forwards;
}

.btn-shimmer:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-shimmer:active {
  transform: translateY(1px) scale(0.98);
}

@keyframes shimmerSweep {
  0% {
    left: -60%;
  }
  100% {
    left: 140%;
  }
}

/* Technology Pill Interactive Bounce */
.tech-pill {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), 
              background-color 0.2s ease, 
              color 0.2s ease, 
              border-color 0.2s ease, 
              box-shadow 0.25s ease;
}

.tech-pill:hover {
  transform: translateY(-4px) scale(1.08);
  background-color: var(--light-blue) !important;
  color: var(--primary-blue) !important;
  border-color: rgba(14, 165, 233, 0.4) !important;
  box-shadow: 0 6px 15px -3px rgba(8, 124, 168, 0.2);
}

/* Problem-Solution Card Interactive Flip/Shift */
.solution-box {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.3s ease, 
              background-color 0.3s ease, 
              box-shadow 0.3s ease;
}

.bravion-card:hover .solution-box {
  transform: translateY(-3px) scale(1.01);
  border-color: var(--bright-blue);
  background-color: rgba(224, 242, 254, 0.6);
  box-shadow: 0 8px 20px -4px rgba(8, 124, 168, 0.15);
}

/* Process Step Interactive Ring Glow */
.process-num-badge {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), 
              color 0.3s ease;
}

.bravion-card:hover .process-num-badge {
  transform: scale(1.2) translateY(-2px);
  color: var(--bright-blue) !important;
}

/* Stat Box Pulse Hover */
.stat-box {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.3s ease;
}

.stat-box:hover {
  transform: translateY(-6px) scale(1.04);
  border-color: var(--bright-blue);
  box-shadow: 0 20px 35px -8px rgba(8, 124, 168, 0.2);
}

/* --------------------------------------------------------------------------
   Hero Visual & Interactive 3D Canvas
   -------------------------------------------------------------------------- */
.hero-glass-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 25px 50px -15px rgba(11, 31, 51, 0.12), 0 0 0 1px rgba(8, 124, 168, 0.1);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

.hero-node-badge {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(14, 165, 233, 0.28);
  box-shadow: 0 10px 25px -5px rgba(8, 124, 168, 0.15);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), 
              border-color 0.25s ease, 
              box-shadow 0.35s ease;
}

.hero-node-badge:hover {
  transform: translateY(-6px) scale(1.07);
  border-color: var(--primary-blue);
  box-shadow: 0 18px 35px -5px rgba(8, 124, 168, 0.28);
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(0.8deg);
  }
}

@keyframes floatReverse {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(10px) rotate(-0.8deg);
  }
}

@keyframes pulseSubtle {
  0%, 100% {
    opacity: 0.92;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

@keyframes flowDash {
  to {
    stroke-dashoffset: -24;
  }
}

.animate-float-slow {
  animation: floatSlow 5.5s ease-in-out infinite;
}

.animate-float-reverse {
  animation: floatReverse 6.5s ease-in-out infinite;
}

.animate-pulse-subtle {
  animation: pulseSubtle 3s ease-in-out infinite;
}

.dash-flow {
  stroke-dasharray: 6 6;
  animation: flowDash 1s linear infinite;
}

/* --------------------------------------------------------------------------
   Mobile App Mockup Frame (Responsive)
   -------------------------------------------------------------------------- */
.phone-mockup {
  border: 10px solid #0B1F33;
  border-radius: 40px;
  box-shadow: 0 25px 60px -15px rgba(11, 31, 51, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.2);
  background: #ffffff;
  overflow: hidden;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  width: 100%;
  max-width: 320px;
}

@media (max-width: 380px) {
  .phone-mockup {
    border-width: 8px;
    border-radius: 32px;
    max-width: 275px;
  }
}

.phone-mockup:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 35px 70px -15px rgba(8, 124, 168, 0.38);
}

.phone-notch {
  width: 130px;
  height: 20px;
  background-color: #0B1F33;
  margin: 0 auto;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  position: relative;
  z-index: 20;
}

/* --------------------------------------------------------------------------
   FAQ Accordion Transitions
   -------------------------------------------------------------------------- */
.faq-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
}

.faq-content.open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.faq-inner {
  overflow: hidden;
}

.faq-chevron {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.faq-chevron.rotate {
  transform: rotate(180deg);
}

/* FAQ item hover accent */
.faq-item {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.faq-item:hover {
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 8px 25px -5px rgba(8, 124, 168, 0.12);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Sticky Header Transition
   -------------------------------------------------------------------------- */
.header-scrolled {
  background-color: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 25px -4px rgba(11, 31, 51, 0.08);
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}

/* --------------------------------------------------------------------------
   Floating Radar Pulse Buttons (WhatsApp & Back To Top)
   -------------------------------------------------------------------------- */
.floating-actions-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.85rem;
  z-index: 90;
}

@media (max-width: 640px) {
  .floating-actions-container {
    bottom: 4.75rem; /* Avoid overlap with mobile 'Get a Quote' bar */
    right: 1rem;
    gap: 0.6rem;
  }
}

.btn-float {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.25s ease, 
              opacity 0.25s ease;
  position: relative;
}

/* Pulsing radar waves on WhatsApp float */
.btn-radar::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 2px solid #10B981;
  opacity: 0.7;
  animation: radarWave 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  pointer-events: none;
}

@keyframes radarWave {
  0% {
    transform: scale(0.9);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.btn-float:hover {
  transform: scale(1.14);
  box-shadow: 0 18px 35px -5px rgba(0, 0, 0, 0.35);
}

#back-to-top {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* --------------------------------------------------------------------------
   Typewriter Logo & Blinking Cursor
   -------------------------------------------------------------------------- */
@keyframes cursorBlink {
  0%, 45% {
    opacity: 1;
  }
  50%, 95% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.animate-cursor-blink {
  animation: cursorBlink 0.9s infinite;
  display: inline-block;
  margin-left: 2px;
  line-height: 1;
}

.logo-cursor {
  display: inline-block;
  margin-left: 2px;
  font-weight: 800;
  line-height: 1;
  animation: cursorBlink 0.9s infinite;
}

/* --------------------------------------------------------------------------
   Bravion Education For Students Modal & Floating Badge
   -------------------------------------------------------------------------- */
#edu-modal.is-open {
  opacity: 1 !important;
  pointer-events: auto !important;
}

#edu-modal.is-open #edu-modal-card {
  transform: scale(1) translateY(0) !important;
}

/* Floating Student Portal Pill (Bottom-Left) */
.btn-float-edu {
  position: fixed;
  bottom: 1.5rem;
  left: 1.25rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.15rem;
  background: linear-gradient(135deg, #0B1F33 0%, #087CA8 100%);
  color: #ffffff !important;
  border-radius: 9999px;
  box-shadow: 0 10px 25px -5px rgba(8, 124, 168, 0.4), 0 0 0 1px rgba(14, 165, 233, 0.25);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-float-edu:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 16px 35px -5px rgba(8, 124, 168, 0.55), 0 0 0 1.5px rgba(14, 165, 233, 0.5);
}

#edu-modal-card::-webkit-scrollbar {
  width: 5px;
}
#edu-modal-card::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 9999px;
}
#edu-modal-card::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}
#edu-modal-card::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

@media (max-width: 640px) {
  .btn-float-edu {
    bottom: 4.75rem; /* Clear mobile quote bar */
    left: 0.75rem;
    padding: 0.45rem 0.8rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 380px) {
  .btn-float-edu {
    bottom: 4.5rem;
    left: 0.5rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.7rem;
  }
}

/* Redirection Bar Smooth Width */
.redirect-bar-fill {
  transition: width 1s linear;
}

/* --------------------------------------------------------------------------
   Prefers Reduced Motion Accessibility
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  
  .btn-radar::after,
  .dash-flow,
  .animate-float-slow,
  .animate-float-reverse,
  .animate-pulse-subtle {
    animation: none !important;
  }
}
