/* ==========================================================================
   EXCELSIOR RESEARCH UNIFIED — 3D HERO & LIGHT AGENCY PRELOADER
   ========================================================================== */

/* 1. Dynamic Executive Preloader */
.preloader {
  position: fixed;
  inset: 0;
  background-color: #ffffff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 4vw, 3rem);
  transition: transform 0.85s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.85s cubic-bezier(0.77, 0, 0.175, 1);
}

.preloader.loaded {
  transform: translateY(-100%);
  pointer-events: none;
}

.preloader-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preloader-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.preloader-center {
  margin: auto 0;
}

.preloader-count {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 900;
  line-height: 0.9;
  background: linear-gradient(135deg, #0f172a 0%, #0284c7 50%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.04em;
}

.preloader-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: 1.5rem;
}

.preloader-statement {
  font-family: var(--font-heading);
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preloader-status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #0284c7;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 2. Hero Section */
.hero-section {
  position: relative;
  min-height: 92vh;
  padding-top: clamp(6.2rem, 10vw, 7.8rem);
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 75% 25%, rgba(14, 165, 233, 0.08) 0%, rgba(248, 250, 252, 0.5) 50%, transparent 70%);
}

.hero-glow-sphere {
  position: absolute;
  top: 10%;
  right: 5%;
  width: min(650px, 80vw);
  height: min(650px, 80vw);
  background: radial-gradient(circle, rgba(14, 165, 233, 0.16) 0%, rgba(37, 99, 235, 0.05) 50%, transparent 75%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(1.5rem, 3.5vw, 3rem);
  position: relative;
  z-index: 2;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.hero-badge-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.hero-title {
  margin-top: 0.2rem;
  color: #0f172a;
}

.hero-lead {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.15rem);
  line-height: 1.65;
  color: #334155;
  max-width: 580px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.35rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.9rem 1.85rem;
  border-radius: var(--radius-full);
  font-size: 0.96rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0ea5e9 0%, #0f172a 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35);
  transition: all var(--trans-normal);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(14, 165, 233, 0.55);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius-full);
  font-size: 0.96rem;
  font-weight: 600;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: all var(--trans-normal);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #0ea5e9;
  color: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.15);
}

/* Hero Key Metrics Strip */
.hero-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
}

.stat-label {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.2rem;
  font-weight: 500;
}

/* 3. 3D Globe WebGL Container — Shifted Upwards */
.hero-3d-visual {
  position: relative;
  width: 100%;
  height: clamp(420px, 52vh, 600px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -1.5rem; /* Shifted upwards to align with headline */
}

#three-globe-container {
  width: 100%;
  height: 100%;
  cursor: default;
  touch-action: pan-y;
}

.globe-instruction-pill {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(14, 165, 233, 0.25);
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  pointer-events: none;
  white-space: nowrap;
}

/* Responsive Hero Layout */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  
  .hero-content {
    align-items: center;
    order: 1;
  }
  
  .hero-lead {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-cta-group {
    justify-content: center;
  }
  
  .hero-stats-strip {
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-3d-visual {
    height: 290px;
    order: 2;
    margin-top: 0.5rem;
    pointer-events: none;
  }

  #three-globe-container canvas {
    pointer-events: none;
  }
}

@media (max-width: 540px) {
  .hero-stats-strip {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
  }

  .hero-3d-visual {
    height: 240px;
  }
}
