/* ==========================================================
   HERO — Full-viewport Split Hero Section
   phamducanh.vn
   ========================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy-950);
}

/* Background image/video layer */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img,
.hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: blur(2px) brightness(0.3);
}

/* Gradient overlay */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(180deg, 
      rgba(6, 14, 26, 0.6) 0%,
      rgba(6, 14, 26, 0.4) 40%,
      rgba(6, 14, 26, 0.7) 75%,
      rgba(6, 14, 26, 0.95) 100%
    ),
    linear-gradient(90deg,
      rgba(6, 14, 26, 0.85) 0%,
      rgba(6, 14, 26, 0.5) 50%,
      transparent 100%
    );
  z-index: 1;
}

/* Decorative elements */
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.4;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(0, 165, 207, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(231, 111, 81, 0.08) 0%, transparent 50%);
}

/* ── Split Layout (text left, portrait right) ── */
.hero-split {
  position: relative;
  z-index: 2;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding-top: 100px;
  padding-bottom: var(--space-16);
}

/* Content (left side) */
.hero-content {
  flex: 1;
  min-width: 0;
}

/* Tagline */
.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--ocean-300);
  margin-bottom: var(--space-8);
  animation: fadeInUp 0.8s ease both;
  animation-delay: 0.2s;
}

.hero-tagline-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral-400);
  flex-shrink: 0;
}

/* Heading */
.hero-heading {
  font-family: var(--font-heading);
  font-size: var(--text-6xl);
  font-weight: var(--weight-extrabold);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: var(--space-8);
  max-width: 700px;
  animation: fadeInUp 0.8s ease both;
  animation-delay: 0.4s;
}

.hero-heading .highlight {
  background: linear-gradient(135deg, var(--ocean-300), var(--ocean-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Description */
.hero-desc {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.7);
  line-height: var(--leading-relaxed);
  max-width: 540px;
  margin-bottom: var(--space-10);
  animation: fadeInUp 0.8s ease both;
  animation-delay: 0.6s;
}

/* CTA Group */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  animation: fadeInUp 0.8s ease both;
  animation-delay: 0.8s;
}

/* ── Portrait (right side) ── */
.hero-portrait {
  flex: 0 0 auto;
  width: clamp(320px, 35vw, 520px);
  position: relative;
  animation: fadeInRight 1s ease both;
  animation-delay: 0.5s;
}

.hero-portrait-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hero-portrait-frame img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 6s ease;
}

.hero-portrait:hover .hero-portrait-frame img {
  transform: scale(1.03);
}

/* Decorative glow behind portrait */
.hero-portrait-glow {
  position: absolute;
  top: 10%;
  left: -15%;
  right: -15%;
  bottom: -10%;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 119, 182, 0.2) 0%,
    rgba(0, 165, 207, 0.1) 30%,
    transparent 70%
  );
  z-index: -1;
  filter: blur(40px);
  animation: glowPulse 4s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Scroll indicator ── */
.hero-scroll {
  position: absolute;
  bottom: var(--space-10);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  color: rgba(255, 255, 255, 0.4);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  animation: fadeInUp 1s ease both;
  animation-delay: 1.2s;
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), transparent);
  position: relative;
  overflow: hidden;
}

.hero-scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--ocean-400);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0% { top: -100%; }
  50% { top: 100%; }
  100% { top: 100%; }
}

/* ── Hero social sidebar (desktop only) ── */
.hero-social {
  position: absolute;
  right: var(--space-8);
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  animation: fadeIn 1s ease both;
  animation-delay: 1.4s;
}

.hero-social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  transition: all var(--transition-base);
  text-decoration: none;
}

.hero-social-link:hover {
  color: var(--white);
  background: var(--ocean-500);
  border-color: var(--ocean-500);
  transform: scale(1.1);
}

/* ── Animations for hero ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Responsive: Portrait hidden on small screens, stacked on tablets ── */
@media (max-width: 1024px) {
  .hero-split {
    flex-direction: column;
    text-align: center;
    padding-top: 120px;
    gap: var(--space-10);
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-tagline {
    justify-content: center;
  }

  .hero-heading {
    max-width: 100%;
  }

  .hero-desc {
    max-width: 600px;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-portrait {
    width: clamp(260px, 50vw, 380px);
    order: -1; /* Portrait on top on tablet */
  }

  .hero-social {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-split {
    padding-top: 100px;
    padding-bottom: var(--space-20);
    gap: var(--space-6);
  }

  .hero-portrait {
    width: clamp(200px, 60vw, 300px);
  }

  .hero-portrait-frame {
    border-radius: var(--radius-lg);
  }

  .hero-heading {
    font-size: var(--text-4xl);
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
    text-align: center;
  }

  .hero-scroll {
    bottom: var(--space-6);
  }
}
