/* parkland.dev — Home (constellation landing page)
   Direction A (Constellation), scattered layout, Dashboard accents, warm bg,
   darkness 8, ambient motion baked at 58%. Scoped to body.home so it never
   leaks into other pages. */

body.home {
  margin: 0;
  height: 100%;
  background: #0b0907;                /* fallback under the stage gradient */
  color: var(--cream);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
html { height: 100%; }

/* ── full-bleed stage ── */
.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  /* warm near-black radial gradient (warmth 64 / chroma .018 / L .08) */
  background: radial-gradient(140% 130% at 50% 38%,
    oklch(0.110 0.018 64) 0%,
    oklch(0.080 0.018 64) 60%,
    oklch(0.050 0.018 64) 100%);
}

/* ── ambient nebula glows ── */
.neb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  mix-blend-mode: screen;
  will-change: transform;
  pointer-events: none;
}
.neb--1 {
  width: 540px; height: 540px; top: 14%; left: 18%;
  background: radial-gradient(circle, var(--accent-epicpm), transparent 68%);
  opacity: 0.106;
  animation: drift1 38.78s ease-in-out infinite;
}
.neb--2 {
  width: 460px; height: 460px; top: 52%; left: 60%;
  background: radial-gradient(circle, var(--accent-movies), transparent 68%);
  opacity: 0.090;
  animation: drift2 46.94s ease-in-out infinite;
}
.neb--3 {
  width: 420px; height: 420px; top: 70%; left: 24%;
  background: radial-gradient(circle, var(--accent-pickem), transparent 68%);
  opacity: 0.080;
  animation: drift3 53.06s ease-in-out infinite;
}
@keyframes drift1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(8vw, 5vh) scale(1.12); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes drift2 {
  0%   { transform: translate(0, 0) scale(1.05); }
  50%  { transform: translate(-7vw, -4vh) scale(0.95); }
  100% { transform: translate(0, 0) scale(1.05); }
}
@keyframes drift3 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(4vw, -6vh) scale(1.1); }
  100% { transform: translate(0, 0) scale(1); }
}

/* ── faint star field (generated by home.js) ── */
.star {
  position: absolute;
  border-radius: 50%;
  background: var(--cream);
  pointer-events: none;
}
@keyframes twinkle { 0%, 100% { opacity: var(--lo); } 50% { opacity: var(--hi); } }

/* ── connecting threads ── */
.threads {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.thread {
  stroke: #ece4d7;
  stroke-width: 0.6;
  opacity: 0.06;
  transition: opacity .5s ease, stroke .5s ease, stroke-width .5s ease;
}
/* light the two threads touching a hovered node, in that node's accent */
.stage:has(.node--epicpm:hover) .thread--em,
.stage:has(.node--epicpm:hover) .thread--pe,
.stage:has(.node--epicpm:focus-within) .thread--em,
.stage:has(.node--epicpm:focus-within) .thread--pe { stroke: var(--accent-epicpm); stroke-width: 1; opacity: .32; }
.stage:has(.node--movies:hover) .thread--em,
.stage:has(.node--movies:hover) .thread--mp,
.stage:has(.node--movies:focus-within) .thread--em,
.stage:has(.node--movies:focus-within) .thread--mp { stroke: var(--accent-movies); stroke-width: 1; opacity: .32; }
.stage:has(.node--pickem:hover) .thread--mp,
.stage:has(.node--pickem:hover) .thread--pe,
.stage:has(.node--pickem:focus-within) .thread--mp,
.stage:has(.node--pickem:focus-within) .thread--pe { stroke: var(--accent-pickem); stroke-width: 1; opacity: .32; }

/* ── nav node ── */
.node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  padding: 14px 16px;
  border-radius: 14px;
  transition: transform .5s cubic-bezier(.2, .7, .3, 1);
  outline: none;
}
.node--epicpm { left: 30%; top: 33%; }
.node--movies { left: 63%; top: 54%; }
.node--pickem { left: 42%; top: 74%; }

.node-glow {
  position: absolute;
  inset: -30% -24%;
  border-radius: 50%;
  filter: blur(26px);
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
  z-index: -1;
}
.node--epicpm .node-glow { background: radial-gradient(circle, var(--accent-epicpm), transparent 70%); }
.node--movies .node-glow { background: radial-gradient(circle, var(--accent-movies), transparent 70%); }
.node--pickem .node-glow { background: radial-gradient(circle, var(--accent-pickem), transparent 70%); }

.node-head { display: flex; align-items: center; gap: 11px; }
.node-idx {
  font-family: var(--mono); font-size: 11px; color: var(--grey-faint);
  letter-spacing: .05em; transition: color .45s ease;
}
.node-title {
  font-size: 25px; font-weight: 600; letter-spacing: -0.015em;
  color: var(--cream-dim); white-space: nowrap;
  transition: color .45s ease, letter-spacing .45s ease;
}
.node-meta {
  font-family: var(--mono); font-size: 11px; letter-spacing: .02em;
  white-space: nowrap; color: var(--grey-faint);
  transition: color .45s ease; padding-left: 1px;
}

/* hover / focus */
.node:hover, .node:focus-visible { transform: translate(-50%, -50%) scale(1.012); }
.node:hover .node-glow, .node:focus-visible .node-glow { opacity: .5; }
.node:hover .node-title, .node:focus-visible .node-title { letter-spacing: 0em; }
.node:hover .node-meta, .node:focus-visible .node-meta { color: var(--cream-dim); }
.node--epicpm:hover .node-idx, .node--epicpm:focus-visible .node-idx,
.node--epicpm:hover .node-title, .node--epicpm:focus-visible .node-title { color: var(--accent-epicpm); }
.node--movies:hover .node-idx, .node--movies:focus-visible .node-idx,
.node--movies:hover .node-title, .node--movies:focus-visible .node-title { color: var(--accent-movies); }
.node--pickem:hover .node-idx, .node--pickem:focus-visible .node-idx,
.node--pickem:hover .node-title, .node--pickem:focus-visible .node-title { color: var(--accent-pickem); }

/* ── corner chrome ── */
.corner { position: fixed; z-index: 5; }

.wordmark {
  top: 30px; left: 34px; font-size: 14px; letter-spacing: .02em;
  display: flex; align-items: baseline; gap: 1px;
}
.wordmark b { font-weight: 600; color: var(--cream); }
.wordmark span { color: var(--grey-faint); font-weight: 500; }
.wordmark .dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--cream-dim);
  margin-right: 9px; animation: pulse 3.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: .35; transform: scale(1); }
  50%      { opacity: .85; transform: scale(1.25); }
}

.glogin {
  top: 28px; right: 34px; display: flex; align-items: center; gap: 9px;
  padding: 9px 14px 9px 12px; border-radius: 999px;
  border: 1px solid rgba(236, 228, 215, 0.10);
  background: rgba(236, 228, 215, 0.015);
  color: var(--cream-dim); font-size: 12.5px; font-weight: 500;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: border-color .4s ease, color .4s ease, background .4s ease;
}
.glogin:hover {
  border-color: rgba(236, 228, 215, 0.24);
  color: var(--cream);
  background: rgba(236, 228, 215, 0.04);
}
.glogin .g { display: flex; }

.lockmark {
  bottom: 24px; left: 34px; display: flex; align-items: center;
  color: var(--grey-faint);
  transition: color .5s ease, filter .5s ease;
}
.lockmark svg { display: block; transition: transform .55s cubic-bezier(.2, .7, .3, 1); }
.lockmark.is-open {
  color: var(--accent-pickem);
  filter: drop-shadow(0 0 9px rgba(146, 196, 155, .45));
}

.clock {
  bottom: 28px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--grey-faint);
}

/* ── flash messages (auth feedback) ── */
.flash-wrap {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  z-index: 6; display: flex; flex-direction: column; gap: 8px;
  width: max-content; max-width: 90vw;
}
.flash {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(236, 228, 215, 0.12);
  background: rgba(236, 228, 215, 0.03); color: var(--cream-dim);
  text-align: center;
}
.flash--danger, .flash--error { border-color: rgba(224, 163, 160, 0.30); color: #e0a3a0; }
.flash--success { border-color: rgba(146, 196, 155, 0.30); color: var(--accent-pickem); }

/* ── responsive ── */
@media (max-width: 720px) {
  .node-title { font-size: 21px; }
  .wordmark { top: 20px; left: 20px; }
  .lockmark { left: 20px; bottom: 18px; }
  .glogin { top: 18px; right: 18px; }
}

/* ── reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .neb, .star, .wordmark .dot { animation: none !important; }
}
