/* ============================================================
   SMARTLIB — hero.css  v2
   Cinematic storytelling hero — dark.jpg (dark) / light.jpg (light)
   Image paths: /image/dark.jpg  |  /image/light.jpg
============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

/* ══ BACKGROUND IMAGE — DARK MODE ══ */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url('/image/dark.jpg') center center / cover no-repeat;
  transform: scale(1.08);
  animation: heroBgZoom 18s ease-in-out infinite alternate;
  filter: brightness(.45) saturate(1.2);
  transition: transform .8s ease, filter .45s ease;
}

@keyframes heroBgZoom {
  0%   { transform: scale(1.08) translateY(0px);    filter: brightness(.42) saturate(1.2); }
  50%  { transform: scale(1.14) translateY(-14px);  filter: brightness(.50) saturate(1.5); }
  100% { transform: scale(1.10) translateY(6px);    filter: brightness(.44) saturate(1.2); }
}

/* Deep vignette (dark mode only) */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%,   rgba(0,0,0,0) 30%, rgba(0,0,0,.65) 100%),
    radial-gradient(ellipse at 50% 100%, rgba(0,0,0,.9)  0%, rgba(0,0,0,0)  55%),
    linear-gradient(to bottom, rgba(10,10,10,.5) 0%, rgba(10,10,10,.05) 40%, rgba(10,10,10,.8) 100%);
}

/* ══ BACKGROUND IMAGE — LIGHT MODE ══ */
body.light-mode .hero-bg {
  background: url('/image/light.jpg') center center / cover no-repeat;
  filter: none;                /* remove the dark brightness filter */
  animation: none;             /* stop the Ken Burns zoom */
  transform: scale(1);
}

/* Remove the dark vignette overlay in light mode */
body.light-mode .hero-bg::after {
  background: rgba(255,255,255,.25); /* soft white veil for readability */
}

/* ══ HIDE DEFAULT CLOUDS — replaced by our effects ══ */
.hero-clouds { display: none !important; }

/* ══ STORY LINES — bottom fade to black (dark mode only) ══ */
.hero-story-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-story-lines::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(to top,
    rgba(10,10,10,1)   0%,
    rgba(10,10,10,.88) 25%,
    rgba(10,10,10,.4)  55%,
    transparent        100%);
}

/* Hide story-lines fade in light mode */
body.light-mode .hero-story-lines { display: none; }

/* ══ LIGHT RAYS (dark mode only) ══ */
.hero-rays {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  opacity: .1;
}
.hero-rays::before {
  content: '';
  position: absolute;
  top: -20%; left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 150%;
  background: conic-gradient(
    from 270deg at 50% 0%,
    transparent 0deg,
    rgba(232,201,109,.4) 7deg,
    transparent 13deg,
    transparent 24deg,
    rgba(255,255,255,.2) 30deg,
    transparent 36deg,
    transparent 50deg,
    rgba(232,201,109,.3) 56deg,
    transparent 62deg
  );
  animation: raysRotate 28s linear infinite;
}
@keyframes raysRotate {
  from { transform: translateX(-50%) rotate(0deg); }
  to   { transform: translateX(-50%) rotate(360deg); }
}
body.light-mode .hero-rays { display: none; }

/* ══ SPARKLES (dark mode only) ══ */
.hero-sparkles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  animation: sparkleFade var(--dur, 3s) ease-in-out var(--delay, 0s) infinite;
}

.sparkle.gold  { background: #e8c96d; box-shadow: 0 0 6px 2px rgba(232,201,109,.7); }
.sparkle.teal  { background: #5ec4b6; box-shadow: 0 0 6px 2px rgba(94,196,182,.6); }
.sparkle.white { background: #fff;    box-shadow: 0 0 5px 1px rgba(255,255,255,.5); }

@keyframes sparkleFade {
  0%   { opacity: 0;   transform: scale(0)   translateY(0); }
  20%  { opacity: 1;   transform: scale(1.5) translateY(-8px); }
  55%  { opacity: .8;  transform: scale(1)   translateY(-20px); }
  80%  { opacity: .3;  transform: scale(.5)  translateY(-32px); }
  100% { opacity: 0;   transform: scale(0)   translateY(-44px); }
}

/* Star / cross sparkle */
.sparkle.star {
  width: 2px !important;
  height: 2px !important;
  background: transparent;
  box-shadow: none;
}
.sparkle.star::before,
.sparkle.star::after {
  content: '';
  position: absolute;
  background: #e8c96d;
  border-radius: 1px;
}
.sparkle.star::before { width: 14px; height: 2px; top: 0; left: -6px; }
.sparkle.star::after  { width: 2px; height: 14px; top: -6px; left: 0; }

@keyframes starSpin {
  0%   { opacity: 0; transform: scale(0) rotate(0deg); }
  25%  { opacity: 1; transform: scale(1) rotate(45deg); }
  65%  { opacity: .7; transform: scale(.9) rotate(90deg); }
  100% { opacity: 0; transform: scale(0) rotate(180deg); }
}
.sparkle.star { animation-name: starSpin; }
body.light-mode .hero-sparkles { display: none; }

/* ══ DUST PARTICLES (dark mode only) ══ */
.hero-dust {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.dust {
  position: absolute;
  border-radius: 50%;
  background: rgba(232,201,109,.6);
  opacity: 0;
  animation: dustFloat var(--dur, 8s) ease-in-out var(--delay, 0s) infinite;
}
@keyframes dustFloat {
  0%   { opacity: 0;  transform: translateY(0)     translateX(0)     scale(0); }
  20%  { opacity: .8; transform: translateY(-30px)  translateX(10px)  scale(1); }
  60%  { opacity: .4; transform: translateY(-85px)  translateX(-15px) scale(.7); }
  100% { opacity: 0;  transform: translateY(-150px) translateX(5px)   scale(0); }
}
body.light-mode .hero-dust { display: none; }

/* ══ CONTENT ══ */
.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 860px;
  animation: heroReveal 1.4s cubic-bezier(.22,1,.36,1) both;
}

@keyframes heroReveal {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Chapter label */
.hero-chapter {
  display: block;
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-size: .88rem;
  color: rgba(232,201,109,.55);
  letter-spacing: .22em;
  margin-bottom: .6rem;
  animation: heroReveal 1.2s ease .1s both;
}

/* Eyebrow pill */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(232,201,109,.1);
  border: 1px solid rgba(232,201,109,.3);
  border-radius: 20px;
  padding: .35rem 1.1rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.8rem;
  animation: heroReveal 1.2s ease .15s both;
  backdrop-filter: blur(8px);
}

/* Title */
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -.03em;
  margin-bottom: 1.2rem;
  animation: heroReveal 1.2s ease .2s both;
}

.hero-title .line1 {
  display: block;
  color: #fff;
  text-shadow: 0 0 80px rgba(232,201,109,.25), 0 4px 32px rgba(0,0,0,.9);
}
body.light-mode .hero-title .line1 {
  color: #111;
  text-shadow: 0 2px 12px rgba(0,0,0,.15);
}

.hero-title .line2 {
  display: block;
  background: linear-gradient(135deg, #e8c96d 0%, #f7e8a0 40%, #5ec4b6 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 28px rgba(232,201,109,.45));
  animation: shimmerText 5s ease infinite;
}
body.light-mode .hero-title .line2 {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #111;
  background-clip: unset;
  filter: none;
  animation: none;
}

@keyframes shimmerText {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Subtitle */
.hero-subtitle {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: rgba(240,236,228,.7);
  line-height: 1.8;
  max-width: 520px;
  margin: 0 auto 2.5rem;
  animation: heroReveal 1.2s ease .35s both;
  text-shadow: 0 2px 14px rgba(0,0,0,.7);
}
body.light-mode .hero-subtitle {
  color: #444;
  text-shadow: none;
}

/* Actions */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  animation: heroReveal 1.2s ease .45s both;
}

/* Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 3.5rem;
  flex-wrap: wrap;
  animation: heroReveal 1.2s ease .55s both;
}

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold);
  display: block;
  line-height: 1;
  text-shadow: 0 0 20px rgba(232,201,109,.4);
}
body.light-mode .stat-num {
  text-shadow: none;
}

.stat-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  display: block;
  margin-top: .25rem;
}
body.light-mode .stat-label {
  color: #888;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,.1);
}
body.light-mode .stat-divider {
  background: rgba(0,0,0,.12);
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  color: rgba(255,255,255,.28);
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  animation: bounceDown 2.5s ease infinite;
}
body.light-mode .hero-scroll-hint {
  color: rgba(0,0,0,.3);
}

.scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, rgba(232,201,109,.65), transparent);
}
