/* ============================================
   Wisdom Education — Landing Page (Infinity Sign)
   ============================================ */

#landing-page {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* --- Three.js Canvas --- */
#mobius-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* --- Title Overlay --- */
.landing-title {
  position: absolute;
  top: 6%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  animation: fadeInTitle 2s ease 0.5s forwards;
}

@keyframes fadeInTitle {
  to { opacity: 1; }
}

.landing-title h1 {
  font-size: 2.6rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--color-text);
  text-shadow: 0 0 40px rgba(10, 10, 20, 0.8);
  margin-bottom: 0.3rem;
}

.landing-title .subtitle {
  font-size: 1rem;
  color: var(--color-text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 300;
}

/* --- Phase Point Labels --- */
.phase-point {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 15;
  text-align: center;
  cursor: pointer;
  padding: 0.6rem 1rem;
  border-radius: 0.4rem;
  opacity: 0;
  animation: fadeInLabel 1.5s ease 1.2s forwards;
  user-select: none;
  will-change: transform;
}

/* Inner wrapper centers the label on the projected point */
.phase-point > * {
  position: relative;
}

.phase-point::before {
  content: '';
  display: block;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 0.4rem;
  transition: background 0.35s ease, border-color 0.35s ease;
}

/* Offset so the label's center sits on the projected point */
.phase-point {
  margin-left: -4rem;
  margin-top: -1.4rem;
  min-width: 8rem;
}

@keyframes fadeInLabel {
  to { opacity: 1; }
}

.phase-point-name {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--color-text);
  text-shadow: 0 0 20px rgba(10, 10, 20, 0.9), 0 0 40px rgba(10, 10, 20, 0.6);
  white-space: nowrap;
  text-transform: uppercase;
  transition: color 0.35s ease;
}

.phase-point-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 300;
  font-style: italic;
  color: var(--color-text-dim);
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
  white-space: nowrap;
  text-shadow: 0 0 16px rgba(10, 10, 20, 0.9);
  transition: color 0.35s ease;
}

/* Hover state */
.phase-point:hover,
.phase-point.hovered {
  background: rgba(201, 169, 110, 0.06);
  border-color: rgba(201, 169, 110, 0.15);
}

.phase-point:hover .phase-point-name,
.phase-point.hovered .phase-point-name {
  color: var(--color-accent);
}

.phase-point:hover .phase-point-sub,
.phase-point.hovered .phase-point-sub {
  color: var(--color-text);
}

/* Click flash */
.phase-point.clicked {
  animation: clickFlash 0.6s ease;
}

@keyframes clickFlash {
  0% { background: rgba(201, 169, 110, 0.2); }
  100% { background: transparent; }
}

/* --- Instruction hint --- */
.landing-hint {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  animation: fadeInHint 2s ease 2.5s forwards;
}

@keyframes fadeInHint {
  to { opacity: 0.5; }
}

.landing-hint p {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* --- About Link --- */
.landing-about-link {
  position: absolute;
  bottom: 1.5%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
  opacity: 0;
  animation: fadeInHint 2s ease 3s forwards;
}

.landing-about-link a {
  font-size: 0.8rem;
  color: var(--color-accent);
  letter-spacing: 0.15em;
  text-transform: lowercase;
  text-decoration: none;
  transition: opacity var(--transition-smooth);
}

.landing-about-link a:hover {
  opacity: 0.7;
}

/* --- Hamburger Menu --- */
.hamburger-btn {
  -webkit-appearance: none;
  appearance: none;
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(232, 228, 220, 0.15);
  border-radius: 0.4rem;
  background: rgba(10, 10, 20, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0;
  animation: fadeInHamburger 1.5s ease 2s both;
  color: inherit;
  font: inherit;
  outline: none;
}

.hamburger-btn:hover {
  border-color: var(--color-accent);
  background: rgba(10, 10, 20, 0.8);
}

.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text-dim);
  border-radius: 1px;
  pointer-events: none;
}

.hamburger-btn:hover span {
  background: var(--color-accent);
}

.hamburger-btn.open span {
  background: var(--color-accent);
}

@keyframes fadeInHamburger {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hamburger-dropdown {
  position: fixed;
  top: 4rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  min-width: 160px;
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
  padding: 0.5rem 0;
  border: 1px solid rgba(232, 228, 220, 0.1);
  border-radius: 0.5rem;
  background: rgba(10, 10, 20, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.hamburger-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hamburger-dropdown a {
  display: block;
  padding: 0.6rem 1.2rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text-dim);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s ease, background 0.2s ease;
}

.hamburger-dropdown a:hover {
  color: var(--color-accent);
  background: rgba(201, 169, 110, 0.08);
}

.hamburger-section-label {
  padding: 0.5rem 1.2rem 0.2rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  font-family: var(--font-body);
}

.hamburger-divider {
  height: 1px;
  margin: 0.4rem 1.2rem;
  background: rgba(232, 228, 220, 0.08);
}

/* --- Loading State --- */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  transition: opacity 1s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-text {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--color-text-dim);
  letter-spacing: 0.2em;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .landing-title h1 {
    font-size: 1.6rem;
    letter-spacing: 0.08em;
  }

  .landing-title .subtitle {
    font-size: 0.8rem;
  }

  .phase-point-name {
    font-size: 1rem;
  }

  .phase-point-sub {
    font-size: 0.7rem;
  }
}

/* --- Portrait mobile: vertical lemniscate --- */
@media (orientation: portrait) and (max-width: 768px) {
  .landing-title h1 {
    font-size: 1.3rem;
  }

  .landing-title .subtitle {
    font-size: 0.7rem;
  }

  .phase-point {
    margin-left: -3rem;
    margin-top: -1rem;
    min-width: auto;
    padding: 0.3rem 0.5rem;
  }

  .phase-point-name {
    font-size: 1.1rem;
  }

  .phase-point-sub {
    font-size: 0.8rem;
    white-space: normal;
    max-width: 120px;
  }
}
