/* ============================================================
   hero-moon.css — Hero 2.0 · The Birth of the Moon
   Cinematic · Left-aligned typography · #06070A base
   ============================================================ */

/* --- Section Container --- */
.hero-moon {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  overflow-x: hidden;
  background: transparent;
}

/* --- Three.js Canvas — Hero 4.0: Fixed, never ends --- */
#heroCanvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;              /* Safari mobile fix */
  display: block;
  object-fit: cover;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Safari fallback via JS --vh */
#heroCanvas {
  height: var(--vh, 100dvh);
}

/* Prevent canvas overflow on any axis */
.hero-moon canvas {
  max-width: 100%;
  max-height: 100%;
}

/* --- Radial Glow Overlay --- */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 50% 38%,
      rgba(247, 244, 237, 0.03) 0%,
      rgba(247, 244, 237, 0.015) 25%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 70% 35% at 50% 28%,
      rgba(247, 244, 237, 0.04) 0%,
      transparent 60%
    );
}

/* --- Vignette --- */
.hero-moon::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at 50% 45%,
      transparent 50%,
      rgba(6, 7, 10, 0.25) 72%,
      rgba(6, 7, 10, 0.65) 100%
    );
}

/* --- Orbiting Brand Text --- */
.moon-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  pointer-events: none;
  width: 520px;
  height: 520px;
  margin-left: -260px;
  margin-top: -260px;
  border-radius: 50%;
  animation: orbit 30s linear infinite;
}

.moon-orbit span {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Noto Serif SC', serif;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(247, 244, 237, 0.4);
  white-space: nowrap;
  transition: color 0.8s ease;
}

/* Orbit glow when visible */
.moon-orbit.visible span {
  color: rgba(247, 244, 237, 0.62);
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

/* --- Hero Content — Left-aligned, below moon --- */
.hero-content {
  position: absolute;
  z-index: 20;
  bottom: 22vh;
  bottom: 22dvh;               /* Safari mobile fix */
  bottom: calc(var(--vh, 1dvh) * 22);
  left: 10vw;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  max-width: 520px;
}

/* --- Title --- */
.hero-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 200;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  line-height: 1;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* --- Description — multi-line --- */
.hero-desc {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(13px, 1.5vw, 18px);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.62);
  margin: 0;
  line-height: 1.6;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* --- Buttons --- */
.hero-buttons {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-buttons .btn-primary,
.hero-buttons .btn-secondary {
  font-family: 'Noto Serif SC', serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.05em;
  padding: 10px 32px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  border: none;
  outline: none;
}

.hero-buttons .btn-primary {
  background: rgba(247, 244, 237, 0.1);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(247, 244, 237, 0.12);
}

.hero-buttons .btn-primary:hover {
  background: rgba(247, 244, 237, 0.18);
  border-color: rgba(247, 244, 237, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(247, 244, 237, 0.06);
}

.hero-buttons .btn-secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-buttons .btn-secondary:hover {
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

/* --- Explore Universe — Six Floating Entries --- */
.explore-universe {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.explore-universe.visible {
  opacity: 1;
  pointer-events: auto;
}

.explore-entry {
  position: absolute;
  font-family: 'Noto Serif SC', serif;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(247, 244, 237, 0.55);
  white-space: nowrap;
  transition: color 0.5s ease,
              transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
              text-shadow 0.5s ease;
  cursor: pointer;
  pointer-events: auto;
}

.explore-entry:hover {
  color: rgba(247, 244, 237, 0.92);
  transform: scale(1.07);
  text-shadow: 0 0 20px rgba(247, 244, 237, 0.12);
}

/* Hexagonal layout around moon center */
.explore-entry[data-entry="ai-oracle"]  { top: 24%; left: 50%; transform: translate(-50%, -50%); }
.explore-entry[data-entry="tarot"]      { top: 36%; left: 20%; transform: translate(-50%, -50%); }
.explore-entry[data-entry="astrology"]  { top: 36%; right: 20%; transform: translate(50%, -50%); }
.explore-entry[data-entry="moon"]       { top: 24%; left: 50%; transform: translate(-50%, -50%); display: none; }
.explore-entry[data-entry="dream"]      { bottom: 36%; left: 20%; transform: translate(-50%, 50%); }
.explore-entry[data-entry="learning"]   { bottom: 36%; right: 20%; transform: translate(50%, 50%); }
.explore-entry[data-entry="community"]  { bottom: 24%; left: 50%; transform: translate(-50%, 50%); }

/* --- Scroll Hint — Moonlight Beam --- */
.moon-scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  font-family: 'Noto Serif SC', serif;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: rgba(212, 175, 55, 0.35);
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* Vertical moonlight line above the hint text */
.moon-scroll-hint::before {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  margin: 0 auto 10px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(212, 175, 55, 0.5) 40%,
    rgba(212, 175, 55, 0.7) 60%,
    rgba(212, 175, 55, 0.5) 80%,
    transparent
  );
  animation: moonlightFlow 2.4s ease-in-out infinite;
}

@keyframes moonlightFlow {
  0% {
    background-position: 0 -40px;
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    background-position: 0 40px;
    opacity: 0;
  }
}

/* --- Hero 3.0 Brand Typography --- */
.hero-char {
  display: inline-block;
  will-change: transform, opacity, color, text-shadow;
  transition: none; /* controlled by JS via GSAP */
}

/* --- Button Moonlight Flow Keyframes --- */
@keyframes moonlightBtnSweep {
  0% {
    left: -120%;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    left: 120%;
    opacity: 0;
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-moon {
    height: 600vh;
    overflow: clip;
  }

  .hero-content {
    bottom: 16vh;
    bottom: 16dvh;
    bottom: calc(var(--vh, 1dvh) * 16);
    left: 6vw;
    right: 6vw;
    max-width: none;
    gap: 10px;
  }

  .hero-title {
    font-size: clamp(26px, 7vw, 42px);
    letter-spacing: 0.2em;
  }

  .hero-desc {
    font-size: 13px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    width: 100%;
    text-align: center;
    padding: 12px 24px;
    font-size: 14px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .moon-orbit {
    width: 280px;
    height: 280px;
    margin-left: -140px;
    margin-top: -140px;
  }

  .moon-orbit span {
    font-size: 9px;
  }

  .explore-entry {
    font-size: 12px;
  }

  .explore-entry[data-entry="tarot"]      { left: 12%; }
  .explore-entry[data-entry="astrology"]  { right: 12%; }
  .explore-entry[data-entry="dream"]      { left: 12%; }
  .explore-entry[data-entry="learning"]   { right: 12%; }
  .explore-entry[data-entry="community"]  { bottom: 20%; }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .moon-orbit {
    animation: none;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    transition: none;
  }

  .explore-entry {
    transition: none;
  }

  .moon-scroll-hint {
    opacity: 0;
  }

  .moon-scroll-hint::before {
    animation: none;
  }

  .hero-buttons .btn-primary::after,
  .hero-buttons .btn-secondary::after {
    animation: none !important;
    display: none;
  }

  .hero-planet {
    transition: none;
  }

  .hero-planet:hover .planet-orb::after {
    animation: none;
  }
}

/* ============================================================
   Hero 4.0 — Magnetic Card Golden Glow
   ============================================================ */

/* ── Magnetic card base transition ── */
.magnetic-card,
.hero-planet {
  will-change: transform;
  transition: transform 0.05s linear;
}

/* ── Explore entry card glow on hover ── */
.explore-entry {
  transition: color 0.5s ease,
              transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
              text-shadow 0.5s ease,
              box-shadow 0.5s ease;
}

.explore-entry:hover {
  text-shadow:
    0 0 10px rgba(212, 175, 55, 0.35),
    0 0 30px rgba(212, 175, 55, 0.15);
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.3));
}

/* ── Hero buttons golden glow hover ── */
.hero-buttons .btn-primary:hover {
  box-shadow:
    0 0 16px rgba(212, 175, 55, 0.22),
    0 4px 24px rgba(247, 244, 237, 0.06);
}

.hero-buttons .btn-secondary:hover {
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.14);
}

/* ── Magnetic cards: prevent mobile interference ── */
@media (max-width: 768px) {
  .magnetic-card,
  .hero-planet {
    will-change: auto;
    transition: none;
  }
}

/* === Canvas: fixed fullscreen === */
#heroCanvas {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: block !important;
  pointer-events: none !important;
  background: #050507 !important;
}
#heroCanvas canvas {
  max-width: 100%;
  max-height: 100%;
}

/* === Hero section === */
.hero-moon {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: transparent;
  z-index: 1;
}

/* === Hide non-essential elements === */
.moon-phase-indicator { display: none !important; }
.moon-dock { display: none !important; }
.hero-moon::after { display: none !important; }
.hero-overlay { display: none !important; }

/* === Moon orbit — horizontal ring around moon === */
.moon-orbit {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 3;
  pointer-events: none;
  width: 280px;
  height: 280px;
  margin-left: -140px;
  margin-top: -140px;
  border-radius: 50%;
  border: 1px solid rgba(214, 178, 86, 0.15);
  opacity: 0;
  transition: opacity 0.8s ease;
}
.moon-orbit span {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cinzel', 'Noto Serif SC', serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: rgba(214, 178, 86, 0.5);
  white-space: nowrap;
  text-shadow: 0 0 20px rgba(214, 178, 86, 0.2);
}
@keyframes orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.moon-orbit {
  animation: orbit 40s linear infinite;
}

/* === Hero content hidden until morph done === */
.hero-content { opacity: 0; pointer-events: none; }
.explore-universe { opacity: 0; pointer-events: none; }
.hero-planets { opacity: 0; pointer-events: none; }

/* === All sections transparent === */
.page-view {
  position: relative;
  z-index: 2;
  background: transparent !important;
}
.page-view .hp-section,
.page-view .section,
.page-view .section-small,
.page-view .section-large {
  background: transparent !important;
}
.footer, #home-footer {
  background: transparent !important;
  backdrop-filter: none !important;
  border: none !important;
}
body { background: #050507 !important; }
