/* LIVING_CONSTELLATION_v1 — Meet Zora console (voice-first constellation-home)
   AD recipes mapped onto aurora / Talk with me surface. No living-home / #living-meeting. */

:root {
  --night: #07101A;
  --aqua: #B2E9DF;
  --gold: #D8C592;
  --glass-blur: blur(28px) saturate(1.2);
  --glass-fill-living: linear-gradient(125deg, rgba(178, 233, 223, 0.06), rgba(178, 233, 223, 0.015)), rgba(7, 16, 26, 0.52);
  --glass-border-living: 1px solid rgba(178, 233, 223, 0.22);
}

/* —— Sky under console —— */
body.voice-first.constellation-home {
  background-color: #07101A;
  position: relative;
}

body.voice-first.constellation-home .living-sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7, 16, 26, 0.66), rgba(7, 16, 26, 0.08) 55%, rgba(7, 16, 26, 0.42)),
    url(/assets/material.jpg) 50% / cover no-repeat;
  opacity: 0.9;
  filter: saturate(1.08) brightness(0.82);
}

body.voice-first.constellation-home .living-breath {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(178, 233, 223, 0.18), transparent 58%);
  animation: living-breathe 8.5s ease-in-out infinite;
}

body.voice-first.constellation-home .living-drift {
  position: fixed;
  inset: -3%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 70% 60%, rgba(216, 197, 146, 0.06), transparent 52%);
  animation: living-drift 26s ease-in-out infinite alternate;
}

/* Soften existing atmosphere so sky plate can read through */
body.voice-first.constellation-home .atmosphere,
body.voice-first.constellation-home .stars {
  z-index: 0;
  opacity: 0.45;
}

body.voice-first.constellation-home .review-strip,
body.voice-first.constellation-home .mast,
body.voice-first.constellation-home .ecosystem-nav,
body.voice-first.constellation-home .console-page,
body.voice-first.constellation-home .zora-console {
  position: relative;
  z-index: 1;
}

@keyframes living-breathe {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.06); opacity: 0.88; }
}

@keyframes living-drift {
  0% { transform: translate3d(-1.5%, 1%, 0); }
  100% { transform: translate3d(2%, -1.5%, 0); }
}

@keyframes glass-hum {
  0%, 100% {
    box-shadow:
      inset 0 1px 0 rgba(231, 242, 243, 0.12),
      0 18px 56px rgba(0, 0, 0, 0.28),
      0 0 36px rgba(178, 233, 223, 0.06);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(231, 242, 243, 0.14),
      0 18px 56px rgba(0, 0, 0, 0.3),
      0 0 52px rgba(178, 233, 223, 0.14);
  }
}

@keyframes voice-pulse {
  0% { opacity: 0.55; transform: scaleY(0.55); }
  100% { opacity: 1; transform: scaleY(1); }
}

/* —— Glass in the sky air —— */
body.voice-first.constellation-home .zora-console {
  border-radius: 22px;
  border: var(--glass-border-living);
  background: var(--glass-fill-living);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 1px 0 rgba(231, 242, 243, 0.12),
    0 18px 56px rgba(0, 0, 0, 0.28),
    0 0 40px rgba(178, 233, 223, 0.08);
  animation: glass-hum 7.5s ease-in-out infinite;
}

body.voice-first.constellation-home #voice-entrance.conversation-dock {
  border-radius: 0;
  background:
    linear-gradient(125deg, rgba(178, 233, 223, 0.06), rgba(178, 233, 223, 0.015)),
    rgba(7, 16, 26, 0.42);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  box-shadow: inset 0 1px 0 rgba(231, 242, 243, 0.08);
}

body.voice-first.constellation-home .information-stage,
body.voice-first.constellation-home .console-overview,
body.voice-first.constellation-home .map-node,
body.voice-first.constellation-home .workspace-strip {
  border: 1px solid rgba(178, 233, 223, 0.14);
  background:
    linear-gradient(125deg, rgba(178, 233, 223, 0.04), rgba(178, 233, 223, 0.01)),
    rgba(7, 16, 26, 0.38);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}

body.voice-first.constellation-home .map-node,
body.voice-first.constellation-home .workspace-strip {
  border-radius: 18px;
}

/* constellation-surface pages — light glass lift only */
body.voice-first.constellation-surface .ecosystem-card,
body.voice-first.constellation-surface .ecosystem-main > article {
  border: 1px solid rgba(178, 233, 223, 0.18);
  background:
    linear-gradient(125deg, rgba(178, 233, 223, 0.05), rgba(178, 233, 223, 0.012)),
    rgba(7, 16, 26, 0.48);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  border-radius: 20px;
}

/* —— Presence orb (decorative; land gesture already on #voice-entrance) —— */
body.voice-first.constellation-home .presence-lens {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

body.voice-first.constellation-home .presence-lens .voice-bar {
  display: none;
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: rgba(178, 233, 223, 0.85);
  transform-origin: center bottom;
  opacity: 0;
}

body.voice-first.constellation-home[data-voice-state="speaking"] .presence-lens .voice-bar,
body.voice-first.constellation-home[data-voice-state="listening"] .presence-lens .voice-bar {
  display: inline-block;
  opacity: 0.55;
  animation: voice-pulse 1s ease-in-out infinite alternate;
}

body.voice-first.constellation-home[data-voice-state="speaking"] .presence-lens .voice-bar:nth-child(3),
body.voice-first.constellation-home[data-voice-state="listening"] .presence-lens .voice-bar:nth-child(3) {
  animation-delay: 0.2s;
}

body.voice-first.constellation-home[data-voice-state="speaking"] .presence-lens .voice-bar:nth-child(4),
body.voice-first.constellation-home[data-voice-state="listening"] .presence-lens .voice-bar:nth-child(4) {
  animation-delay: 0.4s;
}

/* Keep Talk with me aqua — never gold fill */
body.voice-first.constellation-home #start-voice {
  border-color: rgba(178, 233, 223, 0.55);
  background: linear-gradient(140deg, rgba(178, 233, 223, 0.92), rgba(178, 233, 223, 0.72));
  color: #07101A;
}

/* —— Reduced motion kills continuous anim —— */
@media (prefers-reduced-motion: reduce) {
  body.voice-first.constellation-home .living-breath,
  body.voice-first.constellation-home .living-drift,
  body.voice-first.constellation-home .zora-console,
  body.voice-first.constellation-home[data-voice-state="speaking"] .presence-lens .voice-bar,
  body.voice-first.constellation-home[data-voice-state="listening"] .presence-lens .voice-bar {
    animation: none !important;
  }

  body.voice-first.constellation-home .living-breath,
  body.voice-first.constellation-home .living-drift {
    opacity: 0.55;
    transform: none;
  }
}

@media (max-width: 680px) {
  body.voice-first.constellation-home .living-sky {
    background-position: 65% 0;
  }
}
