/* ==========================================================================
   Modern homepage hero — loaded last so it overrides earlier hero rules.
   Scoped to body[data-page="home"] .home-hero only.
   ========================================================================== */

html[lang] body[data-page="home"] section.home-hero {
  --hero-gold: #ffc34d;
  --hero-gold-deep: #f5ad24;
  align-items: center;
  background: #030c1e;
  isolation: isolate;
  min-height: clamp(620px, 90vh, 860px);
  padding: 124px 0 88px;
}

/* ---- background image: slow cinematic zoom ------------------------------ */
html[lang] body[data-page="home"] section.home-hero > img {
  animation: heroZoom 24s ease-out both;
  object-position: 70% center;
  transform-origin: 70% 40%;
  z-index: -3;
}

/* ---- overlays: readable on the left, image shines on the right ----------- */
html[lang] body[data-page="home"] section.home-hero::after {
  background:
    radial-gradient(60% 70% at 85% 15%, rgba(255, 195, 77, 0.20), transparent 60%),
    radial-gradient(50% 60% at 0% 100%, rgba(11, 75, 168, 0.35), transparent 65%),
    linear-gradient(100deg, rgba(3, 12, 30, 0.94) 0%, rgba(4, 28, 64, 0.82) 36%, rgba(4, 28, 64, 0.34) 66%, rgba(3, 12, 30, 0.08) 100%);
  z-index: -2;
}

html[lang] body[data-page="home"] section.home-hero::before {
  background: linear-gradient(to top, rgba(3, 12, 30, 0.75), transparent);
  bottom: 0;
  content: "";
  height: 180px;
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  z-index: -1;
}

html[lang] body[data-page="home"] section.home-hero .home-container {
  position: relative;
  z-index: 2;
}

html[lang] body[data-page="home"] section.home-hero .hero-content {
  max-width: 900px;
  padding-block: 0;
}

/* ---- eyebrow pill -------------------------------------------------------- */
html[lang] body[data-page="home"] section.home-hero .eyebrow {
  align-items: center;
  animation: heroUp 0.8s 0.05s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 195, 77, 0.45);
  border-radius: 999px;
  color: var(--hero-gold);
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 700;
  gap: 10px;
  letter-spacing: 0.06em;
  line-height: 1.5;
  margin: 0 0 22px;
  padding: 8px 18px 8px 14px;
  text-transform: uppercase;
}

html[lang] body[data-page="home"] section.home-hero .eyebrow::before {
  animation: heroPulse 2.4s ease-in-out infinite;
  background: var(--hero-gold);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255, 195, 77, 0.6);
  content: "";
  flex: none;
  height: 8px;
  width: 8px;
}

html[lang="km"] body[data-page="home"] section.home-hero .eyebrow {
  letter-spacing: 0.01em;
  text-transform: none;
}

/* ---- headline ------------------------------------------------------------ */
html[lang] body[data-page="home"] section.home-hero h1 {
  animation: heroUp 0.9s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  color: #fff;
  font-size: clamp(2.2rem, 3.9vw, 3.55rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.07;
  margin: 0;
  max-width: 880px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
  text-wrap: balance;
}

html[lang] body[data-page="home"] section.home-hero h1 span {
  -webkit-background-clip: text;
  background: linear-gradient(95deg, #ffd777 0%, #f5ad24 55%, #ffcf5c 100%);
  background-clip: text;
  color: transparent;
  display: block;
  margin-block: 6px;
  text-shadow: none;
  -webkit-text-fill-color: transparent;
}

html[lang="km"] body[data-page="home"] section.home-hero h1 {
  font-size: clamp(2rem, 3.5vw, 3.1rem);
  letter-spacing: 0;
  line-height: 1.5;
}

html[lang="zh-TW"] body[data-page="home"] section.home-hero h1 {
  font-size: clamp(2.1rem, 3.8vw, 3.3rem);
  letter-spacing: 0.02em;
  line-height: 1.32;
}

/* ---- lead ---------------------------------------------------------------- */
html[lang] body[data-page="home"] section.home-hero .lead {
  animation: heroUp 0.9s 0.28s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  color: rgba(232, 240, 255, 0.88);
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  line-height: 1.75;
  margin: 24px 0 0;
  max-width: 660px;
}

html[lang="km"] body[data-page="home"] section.home-hero .lead {
  line-height: 1.95;
}

/* ---- actions ------------------------------------------------------------- */
html[lang] body[data-page="home"] section.home-hero .hero-actions {
  animation: heroUp 0.9s 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

html[lang] body[data-page="home"] section.home-hero .hero-actions .btn {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 700;
  gap: 10px;
  justify-content: center;
  min-height: 54px;
  padding: 14px 30px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

html[lang] body[data-page="home"] section.home-hero .hero-actions .btn:not(.btn-outline-white) {
  background: linear-gradient(135deg, #ffd06a 0%, #f5ad24 100%);
  border: 0;
  box-shadow: 0 10px 30px rgba(245, 173, 36, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  color: #10213d;
}

html[lang] body[data-page="home"] section.home-hero .hero-actions .btn:not(.btn-outline-white)::after {
  content: "→";
  font-size: 1.15em;
  transition: transform 0.25s ease;
}

html[lang] body[data-page="home"] section.home-hero .hero-actions .btn:not(.btn-outline-white):hover {
  box-shadow: 0 16px 38px rgba(245, 173, 36, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
}

html[lang] body[data-page="home"] section.home-hero .hero-actions .btn:not(.btn-outline-white):hover::after {
  transform: translateX(4px);
}

html[lang] body[data-page="home"] section.home-hero .hero-actions .btn-outline-white {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.09);
  border: 1.5px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  color: #fff;
}

html[lang] body[data-page="home"] section.home-hero .hero-actions .btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.75);
  transform: translateY(-3px);
}

/* ---- trust badge --------------------------------------------------------- */
html[lang] body[data-page="home"] section.home-hero .trust-badge {
  align-items: center;
  animation: heroUp 0.9s 0.52s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 600;
  gap: 10px;
  margin-top: 30px;
  padding: 10px 20px 10px 12px;
}

html[lang] body[data-page="home"] section.home-hero .trust-badge > span {
  align-items: center;
  background: linear-gradient(135deg, #34d399, #10b981);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: none;
  font-size: 0.75rem;
  height: 24px;
  justify-content: center;
  width: 24px;
}

/* ---- scroll cue ---------------------------------------------------------- */
.hero-scroll {
  animation: heroUp 1s 0.9s ease both;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  bottom: 28px;
  height: 42px;
  left: 50%;
  margin-left: -13px;
  position: absolute;
  width: 26px;
  z-index: 2;
}

.hero-scroll::after {
  animation: heroScroll 1.8s ease-in-out infinite;
  background: #fff;
  border-radius: 4px;
  content: "";
  height: 8px;
  left: 50%;
  margin-left: -2px;
  position: absolute;
  top: 7px;
  width: 4px;
}

/* ---- motion -------------------------------------------------------------- */
@keyframes heroUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes heroZoom {
  from { transform: scale(1.14); }
  to   { transform: scale(1.02); }
}
@keyframes heroPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 195, 77, 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(255, 195, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 195, 77, 0); }
}
@keyframes heroScroll {
  0%   { opacity: 0; transform: translateY(0); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(16px); }
}

@media (prefers-reduced-motion: reduce) {
  html[lang] body[data-page="home"] section.home-hero > img,
  html[lang] body[data-page="home"] section.home-hero :is(.eyebrow, h1, .lead, .hero-actions, .trust-badge),
  .hero-scroll, .hero-scroll::after,
  html[lang] body[data-page="home"] section.home-hero .eyebrow::before {
    animation: none;
  }
}

/* ---- tablet / mobile ----------------------------------------------------- */
@media (max-width: 900px) {
  html[lang] body[data-page="home"] section.home-hero {
    min-height: 0;
    padding: 96px 0 64px;
  }
  html[lang] body[data-page="home"] section.home-hero::after {
    background:
      radial-gradient(70% 50% at 80% 0%, rgba(255, 195, 77, 0.18), transparent 60%),
      linear-gradient(180deg, rgba(3, 12, 30, 0.78) 0%, rgba(4, 28, 64, 0.82) 55%, rgba(3, 12, 30, 0.92) 100%);
  }
  html[lang] body[data-page="home"] section.home-hero > img { object-position: 72% center; }
  .hero-scroll { display: none; }
}

@media (max-width: 640px) {
  html[lang] body[data-page="home"] section.home-hero { padding: 88px 0 48px; }
  html[lang] body[data-page="home"] section.home-hero .eyebrow { font-size: 0.68rem; letter-spacing: 0.04em; margin-bottom: 16px; padding: 7px 14px 7px 12px; }
  html[lang] body[data-page="home"] section.home-hero h1 { font-size: clamp(1.85rem, 8.2vw, 2.4rem); line-height: 1.12; }
  html[lang="km"] body[data-page="home"] section.home-hero h1 { font-size: clamp(1.45rem, 6.4vw, 1.9rem); line-height: 1.5; }
  html[lang="zh-TW"] body[data-page="home"] section.home-hero h1 { font-size: clamp(1.55rem, 6.8vw, 2rem); line-height: 1.34; }
  html[lang] body[data-page="home"] section.home-hero .lead { font-size: 0.95rem; line-height: 1.7; margin-top: 16px; }
  html[lang="km"] body[data-page="home"] section.home-hero .lead { line-height: 1.85; }
  html[lang] body[data-page="home"] section.home-hero .hero-actions { flex-direction: column; margin-top: 24px; }
  html[lang] body[data-page="home"] section.home-hero .hero-actions .btn { min-height: 50px; width: 100%; }
  html[lang] body[data-page="home"] section.home-hero .trust-badge { font-size: 0.82rem; margin-top: 20px; width: 100%; }
}
