/* ============================================
   SHARED.CSS — KindredSpiritVA Design System
   Common variables, reset, background effects,
   navigation, focus states, and footer.
   ============================================ */

/* --- CSS Variables --- */
:root {
  --bi-pink: #E8368F;
  --bi-purple: #A855C7;
  --bi-blue: #4A6CF7;
  --bi-pink-soft: #f0a0c8;
  --bi-purple-soft: #c9b3d8;
  --bi-blue-soft: #8fa8e0;
  --bi-pink-glow: rgba(232,54,143,0.5);
  --bi-purple-glow: rgba(168,85,199,0.5);
  --bi-blue-glow: rgba(74,108,247,0.5);
  --bg: #080610;
  --bg-surface: #0e0b18;
  --bg-panel: #130f20;
  --text: #e8ddf0;
  --text-mid: #a899b8;
  --text-dim: #9a8db0;
}

/* --- Reset --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: clamp(13px, 1.1vw, 16px); scroll-behavior: smooth; }

/* --- Focus States --- */
*:focus-visible {
  outline: 2px solid var(--bi-pink);
  outline-offset: 2px;
}

/* --- Custom Cursor ---
   Rounded pointer with bi-pride gradient. Hotspot at (4,4) — the tip.
   Hover elements get the glow variant (same shape, brighter aura) so the
   cursor never reverts to the native pointer. !important wins against
   page-level `cursor: pointer` rules + inline styles. Text fields still
   keep the native I-beam.
   Desktop only: touch devices fall back to the OS default automatically. */
@media (pointer: fine) {
  html, body, * {
    cursor: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22ksGrad%22%20x1%3D%220.1%22%20y1%3D%220.1%22%20x2%3D%220.55%22%20y2%3D%221%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23E8368F%22%2F%3E%3Cstop%20offset%3D%220.55%22%20stop-color%3D%22%23A855C7%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%234A6CF7%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cpath%20d%3D%22M20.8%2C9.4%2C4.87%2C2.18A2%2C2%2C0%2C0%2C0%2C2.18%2C4.87h0L9.4%2C20.8A2%2C2%2C0%2C0%2C0%2C11.27%2C22h.25a2.26%2C2.26%2C0%2C0%2C0%2C2-1.8l1.13-5.58%2C5.58-1.13a2.26%2C2.26%2C0%2C0%2C0%2C1.8-2A2%2C2%2C0%2C0%2C0%2C20.8%2C9.4Z%22%20fill%3D%22none%22%20stroke%3D%22rgba%28232%2C54%2C143%2C0.35%29%22%20stroke-width%3D%222.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M20.8%2C9.4%2C4.87%2C2.18A2%2C2%2C0%2C0%2C0%2C2.18%2C4.87h0L9.4%2C20.8A2%2C2%2C0%2C0%2C0%2C11.27%2C22h.25a2.26%2C2.26%2C0%2C0%2C0%2C2-1.8l1.13-5.58%2C5.58-1.13a2.26%2C2.26%2C0%2C0%2C0%2C1.8-2A2%2C2%2C0%2C0%2C0%2C20.8%2C9.4Z%22%20fill%3D%22url%28%23ksGrad%29%22%2F%3E%3C%2Fsvg%3E") 4 4, auto;
  }

  /* Everything clickable gets the glow variant */
  a, a *,
  button, button *,
  [role="button"], [role="button"] *,
  [onclick], [onclick] *,
  [style*="cursor:pointer"], [style*="cursor: pointer"],
  input[type="submit"], input[type="button"],
  input[type="checkbox"], input[type="radio"],
  label, summary, summary * {
    cursor: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22ksGrad%22%20x1%3D%220.1%22%20y1%3D%220.1%22%20x2%3D%220.55%22%20y2%3D%221%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23E8368F%22%2F%3E%3Cstop%20offset%3D%220.55%22%20stop-color%3D%22%23A855C7%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%234A6CF7%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cpath%20d%3D%22M20.8%2C9.4%2C4.87%2C2.18A2%2C2%2C0%2C0%2C0%2C2.18%2C4.87h0L9.4%2C20.8A2%2C2%2C0%2C0%2C0%2C11.27%2C22h.25a2.26%2C2.26%2C0%2C0%2C0%2C2-1.8l1.13-5.58%2C5.58-1.13a2.26%2C2.26%2C0%2C0%2C0%2C1.8-2A2%2C2%2C0%2C0%2C0%2C20.8%2C9.4Z%22%20fill%3D%22none%22%20stroke%3D%22rgba%28232%2C54%2C143%2C0.25%29%22%20stroke-width%3D%226%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M20.8%2C9.4%2C4.87%2C2.18A2%2C2%2C0%2C0%2C0%2C2.18%2C4.87h0L9.4%2C20.8A2%2C2%2C0%2C0%2C0%2C11.27%2C22h.25a2.26%2C2.26%2C0%2C0%2C0%2C2-1.8l1.13-5.58%2C5.58-1.13a2.26%2C2.26%2C0%2C0%2C0%2C1.8-2A2%2C2%2C0%2C0%2C0%2C20.8%2C9.4Z%22%20fill%3D%22none%22%20stroke%3D%22rgba%28232%2C54%2C143%2C0.5%29%22%20stroke-width%3D%223.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M20.8%2C9.4%2C4.87%2C2.18A2%2C2%2C0%2C0%2C0%2C2.18%2C4.87h0L9.4%2C20.8A2%2C2%2C0%2C0%2C0%2C11.27%2C22h.25a2.26%2C2.26%2C0%2C0%2C0%2C2-1.8l1.13-5.58%2C5.58-1.13a2.26%2C2.26%2C0%2C0%2C0%2C1.8-2A2%2C2%2C0%2C0%2C0%2C20.8%2C9.4Z%22%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C180%2C220%2C0.7%29%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%20stroke-linecap%3D%22round%22%2F%3E%3Cpath%20d%3D%22M20.8%2C9.4%2C4.87%2C2.18A2%2C2%2C0%2C0%2C0%2C2.18%2C4.87h0L9.4%2C20.8A2%2C2%2C0%2C0%2C0%2C11.27%2C22h.25a2.26%2C2.26%2C0%2C0%2C0%2C2-1.8l1.13-5.58%2C5.58-1.13a2.26%2C2.26%2C0%2C0%2C0%2C1.8-2A2%2C2%2C0%2C0%2C0%2C20.8%2C9.4Z%22%20fill%3D%22url%28%23ksGrad%29%22%2F%3E%3C%2Fsvg%3E") 4 4, pointer !important;
  }

  /* Text input fields keep the native I-beam */
  input[type="text"], input[type="email"], input[type="url"], input[type="search"],
  input[type="password"], input[type="number"], input[type="tel"], textarea,
  [contenteditable="true"] {
    cursor: text !important;
  }
}

/* --- Background Effects --- */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(168,85,199,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,85,199,0.03) 1px, transparent 1px);
  background-size: 3.75rem 3.75rem;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

.bg-orb-1 { width: 31.25rem; height: 31.25rem; background: rgba(232,54,143,0.06); top: -6.25rem; left: -6.25rem; }
.bg-orb-2 { width: 37.5rem; height: 37.5rem; background: rgba(74,108,247,0.05); bottom: -9.375rem; right: -9.375rem; }
.bg-orb-3 { width: 25rem; height: 25rem; background: rgba(168,85,199,0.04); top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* --- Star Field --- */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  animation: twinkle var(--dur, 3s) ease-in-out infinite alternate;
  opacity: 0;
}

@keyframes twinkle { 0% { opacity: 0; } 100% { opacity: 0.8; } }

.particle {
  position: absolute;
  border-radius: 50%;
  bottom: -0.625rem;
  animation: floatUp var(--dur, 20s) linear infinite;
  opacity: 0.5;
}

@keyframes floatUp {
  0% { transform: translateY(0) translateX(0); opacity: 0.5; }
  50% { opacity: 0.3; }
  100% { transform: translateY(-100vh) translateX(30px); opacity: 0; }
}

/* --- Navigation (VN dialogue bar) --- */
nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(180deg, transparent, rgba(8,6,16,0.97) 35%);
  padding: 1.2rem 2rem 1.5rem;
}

.nav-dialogue {
  max-width: 59.375rem;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(232,54,143,0.08), rgba(74,108,247,0.08));
  border: 1px solid rgba(168,85,199,0.2);
  border-radius: 0.375rem;
  padding: 1rem 1.8rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
}

.nav-speaker {
  font-family: 'Quicksand', sans-serif;
  font-weight: 500;
  color: var(--bi-pink);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  padding-right: 1.5rem;
  border-right: 1px solid rgba(168,85,199,0.2);
  text-shadow: 0 0 15px var(--bi-pink-glow);
}

.nav-links {
  display: flex;
  gap: 1.8rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav-links a {
  color: var(--text-mid);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.3s;
  position: relative;
}

.nav-links a:hover {
  color: var(--bi-pink-soft);
  text-shadow: 0 0 12px var(--bi-pink-glow);
}

.nav-links a::before {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--bi-pink), var(--bi-blue));
  transition: width 0.3s;
  box-shadow: 0 0 8px var(--bi-pink-glow);
}

.nav-links a:hover::before { width: 100%; }

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger { cursor: pointer; }

.nav-dropdown-menu {
  position: absolute;
  bottom: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%) scaleY(0);
  transform-origin: bottom center;
  min-width: 10rem;
  background: linear-gradient(135deg, rgba(232,54,143,0.1), rgba(74,108,247,0.1));
  background-color: rgba(8,6,16,0.95);
  border: 1px solid rgba(168,85,199,0.25);
  border-radius: 0.375rem;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
  z-index: 100;
}

.nav-dropdown-menu.open {
  opacity: 1;
  transform: translateX(-50%) scaleY(1);
  pointer-events: auto;
}

.nav-dropdown-menu a {
  color: var(--text-mid);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.6rem 1.2rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  color: var(--bi-pink-soft);
  background: rgba(232,54,143,0.08);
  text-shadow: 0 0 12px var(--bi-pink-glow);
}

.nav-dropdown-menu a::before { display: none; }

.nav-indicator {
  margin-left: auto;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--bi-pink);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  animation: blink 1s infinite;
  box-shadow: 0 0 10px var(--bi-pink-glow);
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* --- Powered-by Footer --- */
.powered-by {
  text-align: center;
  padding: 2rem 2rem 5rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  position: relative;
  z-index: 1;
}

.powered-by a {
  color: var(--bi-purple-soft);
  text-decoration: none;
}

.powered-by a:hover {
  color: var(--bi-pink-soft);
}

/* --- Mobile Nav --- */
@media (max-width: 600px) {
  nav { padding: 0.8rem 1rem 1rem; }
  .nav-dialogue { padding: 0.6rem 1rem; gap: 0.8rem; }
  .nav-speaker { font-size: 0.55rem; padding-right: 0.8rem; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.65rem; }
}
