/* =====================================================================
   VIVIDVERSE HUB - HOME: THE GENRE & WORLD CONSTELLATION  (v3 rework)
   Genres LEAD: bold, prominent, tappable. Worlds are QUIET dim dots until
   two genres light them, then they ignite in their own color and BECOME
   the door (tap = walk in; no button, no sub-label). A live gold thread
   travels to the lit worlds and drifts. Cream, never dark.
   ===================================================================== */

.home-page {
  margin: 0; min-height: 100dvh;
  background: radial-gradient(120% 90% at 50% -8%, #FFFDF7 0%, #FAF5EA 46%, #F2E7CF 100%);
  color: var(--ink); font-family: var(--font-body); overflow-x: hidden;
}

/* ---- top bar ---- */
.home-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--gutter); position: relative; z-index: 6; }
.home-top .wordmark { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; text-decoration: none; color: var(--ink); letter-spacing: -0.01em; }
.home-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: clamp(0.75rem, 1.8vw, 1.75rem); margin: 0; padding: 0; }
.home-nav a { font-weight: 600; text-decoration: none; color: var(--ink); opacity: 0.85; transition: color 150ms, opacity 150ms; }
.home-nav a:hover, .home-nav a[aria-current="page"] { color: var(--accent); opacity: 1; }
.home-nav a[data-soon] { opacity: 0.5; }
.home-nav .nav-shop a { background: var(--ink); color: var(--surface); opacity: 1; padding: 0.35em 0.9em; border-radius: 999px; }
.home-nav .nav-shop a:hover { background: var(--accent); color: var(--ink); }

/* ---- oversized editorial hero ---- */
.home-hero { text-align: center; padding: clamp(1.25rem, 3.5vw, 3rem) var(--gutter) clamp(0.4rem, 1.5vw, 1rem); max-width: 22ch; margin-inline: auto; }
.home-hero h1 { font-family: var(--font-display); font-weight: 900; font-size: var(--type-hero); line-height: 0.95; letter-spacing: -0.02em; margin: 0; }
.home-hero .hero-lede { font-family: var(--font-display); font-weight: 400; font-style: italic; font-size: var(--type-lede); line-height: 1.4; color: color-mix(in oklab, var(--ink) 82%, var(--surface)); max-width: 46ch; margin: var(--space-3) auto 0; }

/* ---- pick prompt above the map ---- */
.home-guide { text-align: center; padding: var(--space-2) var(--gutter) 0; position: relative; z-index: 5; }
.home-guide .guide-spine { font-family: var(--font-display); font-style: italic; font-size: clamp(1.15rem, 2.2vw, 1.6rem); color: color-mix(in oklab, var(--ink) 80%, var(--surface)); }
.home-guide .guide-live { margin-top: 0.35rem; min-height: 1.4em; font-size: var(--type-caption); color: color-mix(in oklab, var(--ink) 62%, var(--surface)); }
.home-guide .guide-live b { color: var(--accent); font-weight: 700; }
.home-actions { display: flex; align-items: center; justify-content: center; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-2); }
.pick-chip { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: 0.95rem; background: color-mix(in oklab, var(--accent) 18%, var(--surface)); border: 1.5px solid color-mix(in oklab, var(--accent) 55%, var(--surface)); color: var(--ink); border-radius: 999px; padding: 0.3em 0.5em 0.3em 0.85em; }
.pick-chip button { border: none; background: none; cursor: pointer; font-size: 1.05rem; line-height: 1; color: inherit; opacity: 0.6; }
.pick-chip button:hover { opacity: 1; }
.wander-btn { font-family: var(--font-body); font-weight: 700; cursor: pointer; background: none; color: var(--ink); border: 2px solid color-mix(in oklab, var(--ink) 28%, transparent); border-radius: 999px; padding: 0.5em 1.2em; font-size: 1rem; transition: border-color 150ms, background 150ms, color 150ms; }
.wander-btn:hover, .wander-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--ink); }

/* ---- the constellation stage ---- */
.constellation { position: relative; width: 100%; max-width: var(--page-max); margin: var(--space-2) auto var(--space-5); height: clamp(32rem, 66vh, 50rem); touch-action: none; }
.thread-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; overflow: visible; }
.thread-layer path { fill: none; stroke: var(--accent); stroke-linecap: round; }
.node { position: absolute; transform: translate(-50%, -50%); }

/* ---- GENRE CLUSTER: the leading, prominent interface ---- */
.cluster { z-index: 4; }
.cluster-star { display: inline-flex; flex-direction: column; align-items: center; gap: 0.4rem; cursor: pointer; background: none; border: none; color: var(--ink); font-family: var(--font-body); padding: 0.25rem; }
.cluster-dot { width: 1.1rem; height: 1.1rem; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, var(--accent)); box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 20%, transparent); transition: box-shadow 200ms, transform 200ms; }
.cluster-star:hover .cluster-dot, .cluster.is-open .cluster-dot { box-shadow: 0 0 0 10px color-mix(in oklab, var(--accent) 30%, transparent); transform: scale(1.12); }
.cluster-label { font-family: var(--font-display); font-weight: 700; font-size: clamp(1rem, 1.5vw, 1.35rem); letter-spacing: -0.01em; white-space: nowrap; color: var(--ink); }
.cluster-star:hover .cluster-label, .cluster.is-open .cluster-label { color: var(--accent); }
/* tag fan revealed on cluster open */
.tag-fan { position: absolute; left: 50%; top: calc(100% + 0.5rem); transform: translateX(-50%); display: none; flex-wrap: wrap; justify-content: center; gap: 0.4rem; width: max-content; max-width: min(80vw, 24rem); background: color-mix(in oklab, var(--surface) 94%, white); border: 1px solid color-mix(in oklab, var(--ink) 12%, transparent); border-radius: 14px; padding: 0.65rem; z-index: 7; box-shadow: 0 1rem 2.5rem -1rem rgba(60,45,15,0.4); }
.cluster.is-open .tag-fan { display: flex; }
.tag { font-family: var(--font-body); font-weight: 600; font-size: 0.9rem; cursor: pointer; background: var(--surface); color: var(--ink); border: 1.5px solid color-mix(in oklab, var(--ink) 18%, transparent); border-radius: 999px; padding: 0.4em 0.8em; white-space: nowrap; transition: border-color 150ms, background 150ms, color 150ms; }
.tag:hover { border-color: var(--accent); }
.tag[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--ink); }

/* ---- WORLD: quiet until called ---- */
.world { z-index: 3; }
.world-star { display: block; cursor: default; width: 1.4rem; height: 1.4rem; border-radius: 50%; padding: 0; border: none; background: color-mix(in oklab, var(--ink) 32%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ink) 8%, transparent); transition: transform 260ms var(--ease-standard), background 260ms, box-shadow 260ms, opacity 200ms; }
.world-name { position: absolute; left: 50%; top: calc(50% + 1.4rem); transform: translateX(-50%); white-space: nowrap; font-family: var(--font-display); font-weight: 700; font-size: clamp(0.85rem, 1.3vw, 1.1rem); color: var(--ink); opacity: 0; transition: opacity 220ms; pointer-events: none; }
/* while picking, unmatched worlds recede */
.constellation.is-picking .world.dim .world-star { opacity: 0.25; }
/* a world both picks reach ignites in its own color and becomes the door */
.world.is-door .world-star { cursor: pointer; width: 2rem; height: 2rem; background: radial-gradient(circle at 40% 35%, #fff, var(--wa)); box-shadow: 0 0 0 5px color-mix(in oklab, var(--wa) 24%, transparent), 0 0 2.5rem 0.3rem color-mix(in oklab, var(--wa) 45%, transparent); }
.world.is-door .world-star:hover { transform: scale(1.15); }
.world.is-door .world-name, .world:hover .world-name { opacity: 1; }
/* focused/hover on a quiet world shows its name faintly (name is minimal, secondary) */
.world:not(.is-door):hover .world-name { opacity: 0.55; }
/* LOCKED world: never lights, never enterable, no label */
.world.is-locked .world-star { background: color-mix(in oklab, var(--ink) 16%, var(--surface)); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--ink) 22%, transparent); opacity: 0.5; }
.world.is-locked .world-name { display: none; }

@media (max-width: 760px) {
  .constellation { height: auto; min-height: 40rem; }
  .home-hero h1 { font-size: clamp(2.5rem, 13vw, 4rem); }
  .cluster-label { font-size: 0.95rem; }
}
@media (prefers-reduced-motion: reduce) { .world-star, .cluster-dot { transition: none; } }
