/* ==============================================
   HERO.CSS — Hero Section
   Yến Sào Yến Duyên
   ============================================== */

/* ==============================================
   1. HERO BASE
   ============================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ==============================================
   2. BACKGROUND & OVERLAY
   ============================================== */

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  /* Subtle parallax via JS — transform set in main.js */
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(43, 36, 32, 0.75) 0%,
    rgba(74, 66, 58, 0.65) 40%,
    rgba(43, 36, 32, 0.6) 100%
  );
}

/* ==============================================
   3. CORNER ORNAMENTS (Hoa văn Huế)
   ============================================== */

.hero-ornament {
  position: absolute;
  width: 120px;
  height: 120px;
  opacity: 0.15;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120' fill='none'%3E%3Cpath d='M0 0 L40 0 L40 4 L4 4 L4 40 L0 40 Z' fill='%23D4AF37'/%3E%3Cpath d='M8 8 L32 8 L32 12 L12 12 L12 32 L8 32 Z' fill='%23D4AF37' opacity='0.6'/%3E%3Ccircle cx='20' cy='20' r='6' fill='none' stroke='%23D4AF37' stroke-width='1.5' opacity='0.8'/%3E%3Ccircle cx='20' cy='20' r='2' fill='%23D4AF37' opacity='0.6'/%3E%3Cpath d='M40 0 Q60 20 40 40' stroke='%23D4AF37' stroke-width='1' fill='none' opacity='0.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 1;
}

.hero-ornament--tl {
  top: var(--space-32);
  left: var(--space-32);
}

.hero-ornament--tr {
  top: var(--space-32);
  right: var(--space-32);
  transform: scaleX(-1);
}

.hero-ornament--bl {
  bottom: var(--space-80);
  left: var(--space-32);
  transform: scaleY(-1);
}

.hero-ornament--br {
  bottom: var(--space-80);
  right: var(--space-32);
  transform: scale(-1);
}

/* ==============================================
   4. HERO CONTENT
   ============================================== */

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-top: var(--space-64);
  padding-bottom: var(--space-96);
  max-width: 860px;
  margin: 0 auto;
}

.hero-subtitle {
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-20);
  display: block;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-white);
  margin-bottom: var(--space-24);
  text-shadow: 0 2px 20px rgba(43, 36, 32, 0.4);
}

.hero-desc {
  font-size: clamp(var(--text-base), 1.5vw, var(--text-md));
  color: rgba(250, 246, 241, 0.85);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-48);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-20);
  flex-wrap: wrap;
}

/* ==============================================
   5. SCROLL INDICATOR
   ============================================== */

.hero-scroll {
  position: absolute;
  bottom: var(--space-40);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-scroll-line {
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, var(--color-gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%   { opacity: 1; transform: scaleY(1); transform-origin: top; }
  50%  { opacity: 0.4; }
  100% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* ==============================================
   6. RESPONSIVE
   ============================================== */

@media (max-width: 1023px) {
  .hero-ornament {
    width: 80px;
    height: 80px;
    opacity: 0.12;
  }

  .hero-ornament--tl,
  .hero-ornament--tr {
    top: var(--space-24);
  }

  .hero-ornament--tl,
  .hero-ornament--bl {
    left: var(--space-24);
  }

  .hero-ornament--tr,
  .hero-ornament--br {
    right: var(--space-24);
  }
}

@media (max-width: 767px) {
  .hero {
    min-height: 100svh;
    align-items: flex-end;
  }

  .hero-bg-img {
    /* Trước là 70% center, canh cho ảnh nhà hàng cũ — ảnh đảo yến
       mới bố cục cân giữa hơn nên đưa về center. */
    object-position: center 25%;
  }

  .hero-overlay {
    background: linear-gradient(
      to top,
      rgba(43, 36, 32, 0.92) 0%,
      rgba(43, 36, 32, 0.65) 50%,
      rgba(43, 36, 32, 0.3) 100%
    );
  }

  .hero-content {
    text-align: left;
    padding-bottom: calc(var(--space-80) + 60px);
    padding-top: var(--space-40);
    max-width: 100%;
  }

  .hero-subtitle {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .hero-desc {
    font-size: var(--text-sm);
    margin-left: 0;
    margin-right: 0;
    /* Hide line breaks on mobile */
    br { display: none; }
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-12);
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-ornament {
    width: 56px;
    height: 56px;
    opacity: 0.1;
  }

  .hero-ornament--bl,
  .hero-ornament--br {
    bottom: calc(var(--space-80) + 60px);
  }

  .hero-scroll {
    bottom: calc(var(--space-24) + 60px);
  }
}

@media (max-width: 479px) {
  .hero-ornament--bl,
  .hero-ornament--br {
    display: none;
  }
}

/* Landscape mobile */
@media (max-height: 600px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    align-items: center;
  }

  .hero-content {
    padding-top: var(--space-32);
    padding-bottom: var(--space-64);
  }

  .hero-title {
    font-size: 2rem;
    margin-bottom: var(--space-16);
  }

  .hero-desc {
    display: none;
  }

  .hero-scroll {
    display: none;
  }
}
