/* ================================================
   HERO VIDEO + INTRO + GLOBE — Sagar Kumar Dalai
   ================================================ */

html, body { background: #ffffff !important; }
video { background: #ffffff; }

/* ── HERO SCROLL FRAMES (canvas-based) ──────────── */
#colorlib-hero.hero-video-section {
  padding: 0 !important;
  margin: 0 !important;
  width: 100%;
  position: relative;
  background: #fff;
  display: block;
  height: auto;            /* let the inner scroll-wrap drive height */
}

/* Tall wrapper that creates scroll distance.
   400vh → user scrolls through 198 frames in 3 viewports of scroll. */
#hero-scroll-wrap {
  position: relative;
  width: 100%;
  height: 400vh;
  background: #fff;
}

/* Hero stage — JS toggles between absolute (above/below) and fixed (inside).
   Sits 64px below viewport top so it never overlaps the fixed top-nav.
   Background image = first frame, shows instantly while JS/canvas warm up. */
#hero-sticky {
  position: absolute;
  top: 64px;
  left: 0;
  width: 100%;
  height: calc(100vh - 64px);
  overflow: hidden;
  background: #fff url('../portfolio-video/ezgif-frame-001.jpg') center/cover no-repeat;
  z-index: 1;
}

#hero-frames {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
  z-index: 2;
}

/* Fallback <img> — guaranteed visible even with no JS / no canvas */
#hero-fallback-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
  pointer-events: none;
  background: #fff;
}

/* Loading overlay */
#hero-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.92);
  z-index: 3;
  transition: opacity 0.4s ease 0.2s, visibility 0s linear 0.6s;
}
#hero-loader.hidden {
  opacity: 0;
  visibility: hidden;
}
.hero-loader-text {
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  letter-spacing: 5px;
  color: #007bff;
}
.hero-loader-track {
  width: 220px;
  height: 3px;
  background: #e0eaff;
  border-radius: 2px;
  overflow: hidden;
}
.hero-loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #007bff, #00aaff);
  transition: width 0.15s linear;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: 'Quicksand', Arial, sans-serif;
  font-size: 0.7rem;
  color: #fff;
  letter-spacing: 4px;
  text-transform: uppercase;
  padding: 8px 18px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  pointer-events: none;
  animation: bobUp 2s ease-in-out infinite;
}
@keyframes bobUp {
  0%, 100% { transform: translateX(-50%) translateY(0);   opacity: 0.7; }
  50%      { transform: translateX(-50%) translateY(-6px); opacity: 1; }
}

/* ── INTRO SECTION (below video) ────────────────── */
.colorlib-intro {
  background: #ffffff;
  padding: 7em 0 6em;
  text-align: center;
  position: relative;
  z-index: 2;
}

.intro-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.intro-greeting {
  display: inline-block;
  font-family: 'Quicksand', Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #007bff;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  padding: 6px 16px;
  background: #f0f6ff;
  border-radius: 22px;
}

.intro-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 700;
  color: #0a0a0a;
  line-height: 1.05;
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}
.intro-name span {
  color: #007bff;
}

.intro-role {
  font-family: 'Quicksand', Arial, sans-serif;
  font-size: clamp(0.9rem, 1.6vw, 1.1rem);
  color: #444;
  letter-spacing: 0.05em;
  margin-bottom: 1.3rem;
  font-weight: 500;
}

.intro-tagline {
  font-family: 'Quicksand', Arial, sans-serif;
  font-size: 1.02rem;
  line-height: 1.7;
  color: #666;
  margin: 0 auto 2.2rem;
  max-width: 640px;
}

.intro-cta {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary-pill,
.btn-ghost-pill {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 28px;
  font-family: 'Quicksand', Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: transform 0.18s, box-shadow 0.18s, background 0.2s, color 0.2s;
  cursor: pointer;
}

.btn-primary-pill {
  background: #007bff;
  color: #fff !important;
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.25);
}
.btn-primary-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 123, 255, 0.35);
  background: #0066d9;
  color: #fff !important;
}

.btn-ghost-pill {
  background: transparent;
  color: #333 !important;
  border: 1.5px solid #ddd;
}
.btn-ghost-pill:hover {
  transform: translateY(-2px);
  border-color: #007bff;
  color: #007bff !important;
}

/* ── GLOBE SECTION ──────────────────────────────── */
.colorlib-globe {
  padding: 5em 0 3em;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.globe-header {
  text-align: center;
  margin-bottom: 0.5em;
}
.globe-header .heading-meta {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: #2c98f0;
  margin-bottom: 0.5em;
}
.globe-header h2 { margin-bottom: 0.25em; }
.globe-header .globe-tagline {
  font-family: 'Quicksand', Arial, sans-serif;
  font-size: 0.95rem;
  color: #777;
  margin: 0;
}

#globe-container {
  position: relative;
  width: 100%;
  height: 580px;
  margin: 1.5em auto 0;
  max-width: 860px;
}

#globe-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0, 80, 200, 0.10);
}

#lightning-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: 20px;
}

#globe-label {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
  color: #0044dd;
  letter-spacing: 4px;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(0, 100, 255, 0.35);
  background: rgba(255, 255, 255, 0.88);
  padding: 6px 20px;
  border-radius: 22px;
  border: 1px solid rgba(0, 100, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 768px) {
  #colorlib-hero.hero-video-section { height: 70vh; }
  #hero-pin-wrap { height: 70vh; }
  .colorlib-intro { padding: 5em 0 4em; }
  .intro-tagline { font-size: 0.95rem; }
  #globe-container { height: 360px; }
  #globe-label {
    font-size: 0.7rem;
    letter-spacing: 2px;
    padding: 5px 14px;
  }
}
