/* ============================================
   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;
}

/* --- 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;
  }
}
