* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

html, body {
  height: 100%;
}

body {
  line-height: 1.6;
  overflow: hidden; /* vì index chỉ có 1 hero full-screen */
}

/* =========================================================
   VIEWPORT FIX (chống lỗi 100vh trên Windows/Mobile)
   - ưu tiên 100dvh nếu trình duyệt hỗ trợ
   - fallback qua --app-vh do JS set
   ========================================================= */
:root {
  --app-vh: 1vh;
}

/* Slide / Hero full screen */
.slide,
.hero {
  height: 100vh; /* fallback */
  height: 100dvh; /* chuẩn hơn nếu support */
  height: calc(var(--app-vh) * 100); /* fallback ổn định */
}

/* HERO */
.hero {
  position: relative;
  overflow: hidden;
  background: #dfe7ef;
}

.hero__stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.0);
  transition: background 260ms ease;
  pointer-events: none;
  z-index: 1;
}

.hero__asset {
  position: absolute;
  user-select: none;
  pointer-events: none;
  height: auto;
  transform-origin: 50% 100%;
  will-change: transform, filter;
  z-index: 2;
}

.hero__asset--monument {
  left: 27%;
  top: 70%;
  width: min(300px, 35vw);

  --dx: 150px;
  --dy: -10px;

  transform: translate(-50%, -100%) translate(var(--dx), var(--dy));
  transition: transform 260ms ease, filter 260ms ease;

  filter: drop-shadow(0 22px 20px rgba(0, 0, 0, 0.22))
    drop-shadow(0 10px 12px rgba(0, 0, 0, 0.12)) contrast(1.02)
    saturate(1.03);
}

.hero__asset--monument {
  pointer-events: auto;
  cursor: pointer;
}

.hero__asset--monument:hover {
  transform: translate(-50%, -100%) translate(var(--dx), var(--dy))
    translateY(-8px) scale(1.03);

  filter: drop-shadow(0 42px 34px rgba(0, 0, 0, 0.32))
    drop-shadow(0 18px 18px rgba(0, 0, 0, 0.18)) contrast(1.06)
    saturate(1.08);
}

.hero__asset--monument:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 6px;
}

/* CLICK mở: nền tối + asset vẫn nổi bật */
.hero.is-info-open .hero__dim {
  background: rgba(0, 0, 0, 0.45);
}

.hero.is-info-open .hero__asset--monument {
  transform: translate(-50%, -100%) translate(var(--dx), var(--dy))
    translateY(-8px) scale(1.03);

  filter: drop-shadow(0 42px 34px rgba(0, 0, 0, 0.32))
    drop-shadow(0 18px 18px rgba(0, 0, 0, 0.18)) contrast(1.06)
    saturate(1.08);
}

.hero.is-info-open .hero__infoText {
  animation: infoTextReveal 600ms ease forwards;
}

@keyframes infoTextReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
    text-shadow: 0 0 0 rgba(0,0,0,0);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    text-shadow: 0 4px 18px rgba(0,0,0,0.25);
  }
}

/* popup info cạnh asset (vị trí do JS set) */
.hero__info {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 0;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translateY(6px);
  transition: opacity 260ms ease, transform 260ms ease, visibility 0s linear 260ms;

  background: rgba(255, 255, 255, 0.92);
  color: #111;
  padding: 14px 16px;
  border-radius: 12px;
  max-width: 360px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
  backdrop-filter: blur(6px);
}

.hero.is-info-open .hero__info {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transform: translateY(0);
  transition: opacity 260ms ease, transform 260ms ease, visibility 0s;
}

@font-face {
  font-family: "ClassiqueSaigon";
  src: url("fonts/ClassiqueSaigon.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}

.hero__infoText {
  font-size: 18px;
  line-height: 1.4;
  font-family: "ClassiqueSaigon", serif;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.hero__infoClose {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}

/* mobile tweak: GIỮ NGUYÊN phần asset của bạn */
@media (max-width: 768px) {
  .hero__asset--monument {
    left: 50%;
    top: 74%;
    width: min(280px, 62vw);
  }
}

/* nếu thiết bị không hover (mobile), không cần hiệu ứng hover */
@media (hover: none) {
  .hero__asset--monument:hover {
    transform: translate(-50%, -100%) translate(var(--dx), var(--dy));
    filter: drop-shadow(0 22px 20px rgba(0, 0, 0, 0.22))
      drop-shadow(0 10px 12px rgba(0, 0, 0, 0.12)) contrast(1.02)
      saturate(1.03);
  }
}

/* =========================================================
   HERO INTRO ANIMATION (chậm + từ từ)
   chạy 1 lần / session (JS điều khiển class is-booting)
   ========================================================= */
:root {
  --intro-bg-duration: 1800ms;
  --intro-asset-duration: 2200ms;
}

.hero.is-booting .hero__bg {
  animation: heroBgFadeIn var(--intro-bg-duration) ease-out both;
}

.hero.is-booting .hero__asset--monument {
  animation: monumentFloatDown var(--intro-asset-duration) cubic-bezier(.16, 1, .3, 1) both;
}

.hero.is-booting .hero__asset--monument:hover {
  transform: translate(-50%, -100%) translate(var(--dx), var(--dy));
  filter: drop-shadow(0 22px 20px rgba(0, 0, 0, 0.22))
    drop-shadow(0 10px 12px rgba(0, 0, 0, 0.12)) contrast(1.02)
    saturate(1.03);
}

@keyframes heroBgFadeIn {
  from { opacity: 0; filter: saturate(0.92) contrast(0.96) brightness(0.98); }
  to { opacity: 1; filter: saturate(1) contrast(1) brightness(1); }
}

@keyframes monumentFloatDown {
  from {
    opacity: 0;
    transform:
      translate(-50%, -100%)
      translate(var(--dx), var(--dy))
      translateY(-70px);
  }
  55% { opacity: 1; }
  to {
    opacity: 1;
    transform: translate(-50%, -100%) translate(var(--dx), var(--dy));
  }
}

/* Tôn trọng user setting giảm chuyển động */
@media (prefers-reduced-motion: reduce) {
  .hero.is-booting .hero__bg,
  .hero.is-booting .hero__asset--monument {
    animation: none !important;
  }
}
