/* =============================================================================
   BEC DIGITAL CAMPUS — PREMIUM ANIMATED OPENING INTRO (ANDROID & WEB)
   Bhubaneswar Engineering College, Odisha • https://becsys.online/
   Theme: Premium Royal Blue, Sapphire & White • Engineering Digital Mesh
   ============================================================================= */

:root {
  --bec-intro-bg-dark: #030712;
  --bec-intro-bg-navy: #070e1e;
  --bec-intro-blue-deep: #0f2b6b;
  --bec-intro-blue-primary: #1d4ed8;
  --bec-intro-blue-accent: #0284c7;
  --bec-intro-cyan: #38bdf8;
  --bec-intro-cyan-glow: rgba(56, 189, 248, 0.45);
  --bec-intro-white: #ffffff;
  --bec-intro-safe-top: var(--android-safe-top, env(safe-area-inset-top, 0px));
  --bec-intro-safe-bottom: var(--android-safe-bottom, env(safe-area-inset-bottom, 0px));
}

/* -----------------------------------------------------------------------------
   1. INTRO FULLSCREEN OVERLAY
   ----------------------------------------------------------------------------- */
.bec-intro-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 99999999;
  background: radial-gradient(ellipse at 50% 28%, #1d4ed8 0%, #0f2b6b 35%, #0b1a3d 60%, #060d1f 85%, #020617 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  box-sizing: border-box;
  padding: calc(16px + var(--bec-intro-safe-top)) 24px calc(20px + var(--bec-intro-safe-bottom));
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.42s cubic-bezier(0.4, 0, 0.2, 1), transform 0.42s cubic-bezier(0.4, 0, 0.2, 1), filter 0.42s ease-out;
  user-select: none;
  -webkit-user-select: none;
  font-family: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #ffffff;
}

.bec-intro-overlay.dismissed {
  opacity: 0 !important;
  transform: scale(1.04) !important;
  filter: blur(8px) !important;
  pointer-events: none !important;
}

.bec-intro-overlay.hidden {
  display: none !important;
}

/* -----------------------------------------------------------------------------
   2. AMBIENT GLOWING ORBS & FLOWING SHAPES
   ----------------------------------------------------------------------------- */
.bec-intro-ambient-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.bec-intro-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.6;
  will-change: transform;
}

.bec-intro-orb-1 {
  width: 340px;
  height: 340px;
  top: -80px;
  right: -80px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.45) 0%, rgba(29, 78, 216, 0.2) 65%, transparent 100%);
  animation: becOrbFloat1 7.5s ease-in-out infinite alternate;
}

.bec-intro-orb-2 {
  width: 360px;
  height: 360px;
  bottom: -90px;
  left: -80px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(2, 132, 199, 0.2) 65%, transparent 100%);
  animation: becOrbFloat2 8.5s ease-in-out infinite alternate;
}

.bec-intro-orb-center {
  width: 260px;
  height: 260px;
  top: 36%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, rgba(37, 99, 235, 0.15) 60%, transparent 100%);
  filter: blur(50px);
  animation: becCenterPulse 3.2s ease-in-out infinite alternate;
}

@keyframes becOrbFloat1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-35px, 45px) scale(1.15); }
}

@keyframes becOrbFloat2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -40px) scale(1.12); }
}

@keyframes becCenterPulse {
  0% { transform: translate(-50%, -50%) scale(0.88); opacity: 0.45; }
  100% { transform: translate(-50%, -50%) scale(1.22); opacity: 0.8; }
}

/* -----------------------------------------------------------------------------
   3. ENGINEERING DIGITAL CAMPUS SCHEMATIC (SVG Background)
   ----------------------------------------------------------------------------- */
.bec-intro-mesh-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0.52;
}

/* Engineering Coordinate Grid */
.bec-grid-line {
  stroke: rgba(147, 197, 253, 0.08);
  stroke-width: 0.8;
}

/* Radar Telemetry Scan Rings */
.bec-radar-ring {
  fill: none;
  stroke: rgba(56, 189, 248, 0.22);
  stroke-width: 1;
  stroke-dasharray: 4 6;
  transform-origin: 200px 360px;
  animation: becRotateRadar 28s linear infinite;
}

.bec-radar-ring-alt {
  animation-direction: reverse;
  animation-duration: 22s;
  stroke: rgba(99, 102, 241, 0.24);
}

@keyframes becRotateRadar {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Connected Data Bus Lines */
.bec-mesh-line {
  stroke: rgba(147, 197, 253, 0.38);
  stroke-width: 1.35;
  stroke-dasharray: 6 4;
  animation: becDashMove 18s linear infinite;
}

.bec-mesh-bus {
  stroke: rgba(56, 189, 248, 0.5);
  stroke-width: 1.5;
}

@keyframes becDashMove {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: 320; }
}

/* Pulsing Campus Nodes */
.bec-mesh-node {
  fill: #38bdf8;
  filter: drop-shadow(0 0 7px #38bdf8);
  transform-origin: center;
  animation: becNodePulse 2.4s ease-in-out infinite;
}

.bec-mesh-node-core {
  fill: #60a5fa;
  filter: drop-shadow(0 0 10px #38bdf8);
}

.bec-mesh-node-pulse {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 1.2;
  opacity: 0.8;
  transform-origin: center;
  animation: becNodeWave 2.4s ease-out infinite;
}

@keyframes becNodePulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.35); opacity: 1; }
}

@keyframes becNodeWave {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* -----------------------------------------------------------------------------
   4. FLOATING PARTICLES
   ----------------------------------------------------------------------------- */
.bec-particle {
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 0 8px #38bdf8;
  opacity: 0.7;
}

.bec-particle-1 { width: 3.5px; height: 3.5px; top: 16%; left: 20%; animation: becParticleFloat 4.2s infinite ease-in-out; }
.bec-particle-2 { width: 4.5px; height: 4.5px; top: 26%; right: 16%; animation: becParticleFloat 5.2s 0.7s infinite ease-in-out; }
.bec-particle-3 { width: 2.5px; height: 2.5px; top: 56%; left: 14%; animation: becParticleFloat 4.6s 1.2s infinite ease-in-out; }
.bec-particle-4 { width: 3.5px; height: 3.5px; top: 70%; right: 22%; animation: becParticleFloat 4.4s 0.4s infinite ease-in-out; }
.bec-particle-5 { width: 3px; height: 3px; top: 38%; left: 84%; animation: becParticleFloat 5.5s 1.5s infinite ease-in-out; }
.bec-particle-6 { width: 2px; height: 2px; top: 82%; left: 32%; animation: becParticleFloat 4.8s 0.9s infinite ease-in-out; }

@keyframes becParticleFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.35; }
  50% { transform: translateY(-18px) scale(1.3); opacity: 0.95; }
}

/* -----------------------------------------------------------------------------
   5. TOP BAR & SKIP PILL
   ----------------------------------------------------------------------------- */
.bec-intro-top-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  z-index: 10;
}

.bec-intro-skip-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #e2e8f0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bec-intro-skip-btn:active {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(0.95);
}

/* -----------------------------------------------------------------------------
   6. CENTER HERO CONTENT: LOGO, RINGS & TITLES
   ----------------------------------------------------------------------------- */
.bec-intro-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 10;
  margin: auto 0;
  max-width: 380px;
  width: 100%;
}

/* Precision Rotating Engineering Rings around Logo */
.bec-intro-logo-container {
  position: relative;
  width: 136px;
  height: 136px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.bec-intro-ring-outer {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1.5px dashed rgba(56, 189, 248, 0.42);
  animation: becSpinRing 18s linear infinite;
}

.bec-intro-ring-inner {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.8px solid rgba(147, 197, 253, 0.25);
  border-top-color: #38bdf8;
  border-bottom-color: #60a5fa;
  animation: becSpinRingRev 9s linear infinite;
}

.bec-intro-logo-badge {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: #ffffff;
  padding: 8px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 40px -8px rgba(29, 78, 216, 0.55), 0 0 0 4px rgba(56, 189, 248, 0.25), 0 0 25px rgba(56, 189, 248, 0.4);
  animation: becLogoReveal 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

.bec-intro-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

@keyframes becLogoReveal {
  0% { transform: scale(0.65); opacity: 0; }
  65% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes becSpinRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes becSpinRingRev {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

/* Typography Reveal */
.bec-intro-institution {
  font-size: 0.74rem;
  font-weight: 800;
  color: #7dd3fc;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0;
  animation: becTextReveal 0.8s 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: flex;
  align-items: center;
  gap: 7px;
}

.bec-intro-institution i {
  color: #38bdf8;
  font-size: 0.8rem;
}

.bec-intro-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, #ffffff 35%, #bae6fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  animation: becTextReveal 0.8s 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.bec-intro-tagline {
  font-size: 1.02rem;
  font-weight: 600;
  color: #93c5fd;
  letter-spacing: 0.04em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  opacity: 0;
  animation: becTextReveal 0.8s 0.48s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.bec-tagline-dot {
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

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

/* Sleek Telemetry Progress Bar */
.bec-intro-progress-wrap {
  width: 150px;
  height: 4px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 26px;
  position: relative;
  opacity: 0;
  animation: becTextReveal 0.6s 0.58s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.bec-intro-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8 0%, #60a5fa 50%, #818cf8 100%);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.85);
  animation: becFillTrack 1.8s 0.15s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

@keyframes becFillTrack {
  0% { width: 0%; }
  40% { width: 55%; }
  75% { width: 88%; }
  100% { width: 100%; }
}

.bec-intro-status-text {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0;
  animation: becTextReveal 0.6s 0.62s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* -----------------------------------------------------------------------------
   7. FOOTER AFFILIATION BADGE
   ----------------------------------------------------------------------------- */
.bec-intro-footer {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.02em;
  opacity: 0;
  animation: becTextReveal 0.8s 0.68s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.bec-intro-footer i {
  color: #38bdf8;
  font-size: 0.84rem;
}

/* -----------------------------------------------------------------------------
   8. RESPONSIVE OPTIMIZATION
   ----------------------------------------------------------------------------- */
@media (max-height: 640px) {
  .bec-intro-logo-container {
    width: 108px;
    height: 108px;
    margin-bottom: 14px;
  }
  .bec-intro-logo-badge {
    width: 82px;
    height: 82px;
  }
  .bec-intro-title {
    font-size: 1.85rem;
    margin-bottom: 4px;
  }
  .bec-intro-tagline {
    font-size: 0.9rem;
  }
  .bec-intro-progress-wrap {
    margin-top: 16px;
  }
}

/* -----------------------------------------------------------------------------
   9. ACCESSIBILITY: REDUCED MOTION SUPPORT
   ----------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .bec-intro-overlay {
    transition: opacity 0.3s ease-out !important;
    transform: none !important;
    filter: none !important;
  }
  .bec-intro-orb,
  .bec-intro-ring-outer,
  .bec-intro-ring-inner,
  .bec-radar-ring,
  .bec-mesh-line,
  .bec-mesh-node,
  .bec-mesh-node-pulse,
  .bec-particle {
    animation: none !important;
  }
  .bec-intro-logo-badge,
  .bec-intro-institution,
  .bec-intro-title,
  .bec-intro-tagline,
  .bec-intro-progress-wrap,
  .bec-intro-status-text,
  .bec-intro-footer {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .bec-intro-progress-bar {
    width: 100% !important;
    animation: none !important;
  }
}
