/**
 * Ghosthound community UI — spectral blue/violet
 * Tuned to pair with TT5 / BuddyPress cool blue–purple backgrounds.
 * NOT staging copper-noir. NOT forest-trail green.
 */

:root {
  /* Spectral investigation palette (cool, paranormal) */
  --sp-void: #12122a;
  --sp-deep: #1e1b3a;
  --sp-indigo: #312e81;
  --sp-violet: #5b4b9a;
  --sp-periwinkle: #818cf8;
  --sp-lavender: #c4b5fd;
  --sp-mist: #e0e7ff;
  --sp-snow: #f5f3ff;
  --sp-ink: #1e1b4b;
  --sp-muted: #64748b;
  --sp-orb: #a78bfa;
  --sp-signal: #67e8f9;
  --sp-line: color-mix(in srgb, #6366f1 18%, #e2e8f0);
  --sp-radius: 16px;
  --sp-radius-sm: 12px;
  --sp-max: 72rem;
  --sp-font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --sp-display: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --sp-shadow: 0 12px 36px rgba(30, 27, 58, 0.14);
  --sp-shadow-hover: 0 18px 44px rgba(49, 46, 129, 0.2);
}

/* Soft spectral wash — harmonizes with blue/purple theme chrome */
body.gh-community {
  background:
    radial-gradient(ellipse 100% 55% at 50% -15%, color-mix(in srgb, #818cf8 22%, transparent), transparent 55%),
    radial-gradient(ellipse 70% 40% at 100% 20%, color-mix(in srgb, #c4b5fd 14%, transparent), transparent 50%),
    linear-gradient(180deg, #eef2ff 0%, #f8fafc 40%, #f5f3ff 100%) !important;
  color: var(--sp-ink);
}

body.gh-community .wp-site-blocks,
body.gh-community .site,
body.gh-community #page {
  background: transparent;
}

/* Header logo */
.gh-site-logo {
  display: inline-flex !important;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none !important;
  line-height: 1;
}

.gh-site-logo__img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--sp-lavender) 70%, #fff);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--sp-periwinkle) 25%, transparent),
    0 4px 14px rgba(49, 46, 129, 0.25);
  background: var(--sp-deep);
}

.gh-site-logo__wordmark {
  font-family: var(--sp-font);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sp-indigo);
}

body.gh-community .wp-block-site-logo img {
  max-height: 52px;
  width: auto;
  border-radius: 50%;
}

/* Buttons */
.gh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--sp-font);
  font-size: 0.9rem;
  font-weight: 650;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.gh-btn:hover {
  transform: translateY(-1px);
}

.gh-btn--copper,
.gh-btn--primary,
.gh-btn--lantern,
.gh-btn--spectral {
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff !important;
  border-color: transparent;
  box-shadow: 0 6px 18px color-mix(in srgb, #6366f1 40%, transparent);
}

.gh-btn--spectral:hover,
.gh-btn--copper:hover,
.gh-btn--primary:hover,
.gh-btn--lantern:hover {
  background: linear-gradient(135deg, #818cf8, #8b5cf6);
  color: #fff !important;
}

.gh-btn--outline {
  background: color-mix(in srgb, #fff 12%, transparent);
  border-color: color-mix(in srgb, #e0e7ff 55%, transparent);
  color: #e0e7ff !important;
}

.gh-btn--outline:hover {
  background: color-mix(in srgb, #fff 20%, transparent);
  border-color: #c4b5fd;
  color: #fff !important;
}

.gh-btn--moss {
  background: var(--sp-indigo);
  color: #fff !important;
  border-color: var(--sp-indigo);
}

/* Layout */
.gh-community-home {
  max-width: var(--sp-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 1.75rem) 3.5rem;
}

/* Hero — spectral, not copper cinema */
.gh-home-hero {
  position: relative;
  margin: 0 calc(-1 * clamp(1rem, 3vw, 1.75rem)) 2rem;
  padding: clamp(2.5rem, 7vw, 4.25rem) clamp(1.25rem, 4vw, 2.75rem);
  background:
    radial-gradient(ellipse 45% 70% at 90% 20%, color-mix(in srgb, #a78bfa 28%, transparent), transparent 55%),
    radial-gradient(ellipse 55% 60% at 10% 90%, color-mix(in srgb, #67e8f9 14%, transparent), transparent 50%),
    linear-gradient(145deg, #1e1b3a 0%, #312e81 48%, #4c1d95 100%);
  color: var(--sp-mist);
  overflow: hidden;
  border-bottom: 3px solid color-mix(in srgb, var(--sp-lavender) 70%, #818cf8);
}

.gh-home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, color-mix(in srgb, #e0e7ff 12%, transparent) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 70% 60%, color-mix(in srgb, #c4b5fd 14%, transparent) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 40% 75%, color-mix(in srgb, #67e8f9 10%, transparent) 0 1px, transparent 2px);
  background-size: 120px 120px, 90px 90px, 70px 70px;
  opacity: 0.55;
  pointer-events: none;
}

.gh-home-hero::after {
  content: "";
  position: absolute;
  right: -6%;
  top: -15%;
  width: min(360px, 48vw);
  height: min(360px, 48vw);
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, #c4b5fd 35%, transparent);
  box-shadow:
    inset 0 0 0 24px color-mix(in srgb, #6366f1 12%, transparent),
    0 0 60px color-mix(in srgb, #a78bfa 20%, transparent);
  pointer-events: none;
}

.gh-home-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 38rem;
}

.gh-home-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sp-font);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sp-lavender);
  margin: 0 0 0.85rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: color-mix(in srgb, #000 25%, transparent);
  border: 1px solid color-mix(in srgb, #c4b5fd 35%, transparent);
}

.gh-home-hero__title {
  font-family: var(--sp-display);
  font-size: clamp(1.9rem, 4.8vw, 2.85rem);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 1rem;
  color: #f5f3ff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.3);
}

.gh-home-hero__lede {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: color-mix(in srgb, #e0e7ff 92%, transparent);
  max-width: 42ch;
}

.gh-home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Feature tiles — spectral variants that sit on blue/purple pages */
.gh-home-nav {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin: 0 0 2.5rem;
}

@media (min-width: 560px) {
  .gh-home-nav {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .gh-home-nav {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gh-home-nav__card {
  --tile-a: #4338ca;
  --tile-b: #312e81;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.9rem;
  row-gap: 0.3rem;
  align-items: start;
  padding: 1.25rem 1.2rem 1.35rem;
  min-height: 8.5rem;
  border-radius: var(--sp-radius);
  text-decoration: none !important;
  color: #f5f3ff !important;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #e0e7ff 22%, transparent);
  box-shadow: var(--sp-shadow);
  background: linear-gradient(145deg, var(--tile-a) 0%, var(--tile-b) 100%);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.gh-home-nav__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, #fff 18%, transparent), transparent 42%),
    radial-gradient(circle at 0% 100%, color-mix(in srgb, #67e8f9 12%, transparent), transparent 48%);
  pointer-events: none;
}

.gh-home-nav__card::after {
  content: attr(data-trail);
  position: absolute;
  right: 0.9rem;
  bottom: 0.55rem;
  font-family: var(--sp-font);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.4;
  color: #fff;
}

.gh-home-nav__card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--sp-shadow-hover);
  filter: brightness(1.06);
}

/* Per-tile spectral colorways (all blue/violet/cyan family) */
.gh-home-nav__card--board {
  --tile-a: #4f46e5;
  --tile-b: #312e81;
}
.gh-home-nav__card--members {
  --tile-a: #6366f1;
  --tile-b: #3730a3;
}
.gh-home-nav__card--cases {
  --tile-a: #7c3aed;
  --tile-b: #4c1d95;
}
.gh-home-nav__card--photos {
  --tile-a: #2563eb;
  --tile-b: #1e3a8a;
}
.gh-home-nav__card--evps {
  --tile-a: #8b5cf6;
  --tile-b: #5b21b6;
}
.gh-home-nav__card--video {
  --tile-a: #0ea5e9;
  --tile-b: #1e3a8a;
}

.gh-home-nav__icon {
  grid-row: 1 / span 2;
  width: 3.15rem;
  height: 3.15rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, #000 22%, transparent);
  border: 1px solid color-mix(in srgb, #e0e7ff 28%, transparent);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 20%, transparent),
    0 0 16px color-mix(in srgb, #a78bfa 25%, transparent);
  position: relative;
  z-index: 1;
}

.gh-home-nav__icon svg {
  width: 1.55rem;
  height: 1.55rem;
  display: block;
  fill: none;
  stroke: #e0e7ff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gh-home-nav__label {
  position: relative;
  z-index: 1;
  font-family: var(--sp-font);
  font-weight: 750;
  font-size: 1.05rem;
  color: #fff !important;
  margin-top: 0.15rem;
}

.gh-home-nav__desc {
  position: relative;
  z-index: 1;
  font-size: 0.88rem;
  line-height: 1.4;
  color: color-mix(in srgb, #e0e7ff 88%, transparent) !important;
  margin: 0;
  max-width: 24ch;
}

/* Sections */
.gh-section {
  margin: 0 0 2.5rem;
}

.gh-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--sp-line);
}

.gh-section__title {
  margin: 0;
  font-family: var(--sp-display);
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  font-weight: 600;
  color: var(--sp-ink);
}

.gh-section__intro {
  margin: 0 0 1.15rem;
  color: var(--sp-muted);
  font-size: 0.95rem;
  max-width: 52ch;
  line-height: 1.5;
}

.gh-section__more a {
  font-family: var(--sp-font);
  font-size: 0.88rem;
  font-weight: 700;
  color: #4f46e5 !important;
  text-decoration: none !important;
}

.gh-section__more a:hover {
  color: #7c3aed !important;
  text-decoration: underline !important;
}

.gh-home-split {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin: 0 0 2.5rem;
}

@media (min-width: 860px) {
  .gh-home-split {
    grid-template-columns: 1.25fr 0.85fr;
    align-items: stretch;
  }
}

.gh-panel {
  background: color-mix(in srgb, #fff 88%, #eef2ff);
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  padding: 1.35rem;
  box-shadow: var(--sp-shadow);
}

.gh-panel--news {
  background: linear-gradient(180deg, #fff 0%, #f5f3ff 100%);
  border-left: 4px solid #6366f1;
}

.gh-panel--dark {
  background:
    radial-gradient(ellipse at 100% 0%, color-mix(in srgb, #a78bfa 22%, transparent), transparent 50%),
    linear-gradient(160deg, #1e1b3a, #312e81 55%, #4c1d95);
  border: 1px solid color-mix(in srgb, #c4b5fd 30%, transparent);
  color: var(--sp-mist);
}

.gh-panel--dark .gh-section__title {
  color: #e0e7ff;
}

.gh-panel--dark .gh-section__intro,
.gh-panel--dark p {
  color: color-mix(in srgb, #e0e7ff 85%, transparent);
}

.gh-panel__list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.gh-panel__list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.gh-panel__list li::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--sp-signal);
  box-shadow: 0 0 8px color-mix(in srgb, var(--sp-signal) 60%, transparent);
  flex-shrink: 0;
}

.gh-panel__list a {
  color: var(--sp-lavender) !important;
  text-decoration: none !important;
  font-weight: 650;
}

.gh-panel__list a:hover {
  color: #fff !important;
  text-decoration: underline !important;
}

/* News */
.gh-news-feed__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gh-news-feed__item {
  background: #fff;
  border: 1px solid var(--sp-line);
  border-left: 4px solid #818cf8;
  border-radius: var(--sp-radius-sm);
  padding: 0.95rem 1.05rem;
  box-shadow: 0 2px 12px rgba(49, 46, 129, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gh-news-feed__item:hover {
  border-left-color: #7c3aed;
  box-shadow: 0 8px 22px rgba(49, 46, 129, 0.1);
}

.gh-news-feed__title {
  font-family: var(--sp-display);
  font-size: 1.05rem;
  color: var(--sp-ink) !important;
  text-decoration: none !important;
  font-weight: 600;
}

.gh-news-feed__title:hover {
  color: #4f46e5 !important;
}

.gh-news-feed__meta {
  font-family: var(--sp-font);
  font-size: 0.72rem;
  color: var(--sp-muted);
  margin: 0.4rem 0 0;
  letter-spacing: 0.03em;
}

.gh-news-feed__out {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.gh-news-feed__excerpt {
  margin: 0.4rem 0 0;
  color: var(--sp-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.gh-news-feed__note {
  margin-top: 0.9rem;
  font-size: 0.75rem;
  color: var(--sp-muted);
  font-style: italic;
}

/* Grids / cards */
.gh-case-grid,
.gh-photo-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .gh-case-grid,
  .gh-photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .gh-case-grid,
  .gh-photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gh-case-card {
  background: #fff;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  overflow: hidden;
  box-shadow: var(--sp-shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gh-case-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sp-shadow-hover);
}

.gh-case-card__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.gh-case-card__body {
  padding: 1rem;
}

.gh-case-card__title {
  margin: 0.4rem 0;
  font-size: 1.05rem;
}

.gh-case-card__title a {
  color: var(--sp-ink) !important;
  text-decoration: none !important;
}

.gh-case-card__title a:hover {
  color: #4f46e5 !important;
}

.gh-case-card__meta,
.gh-case-card__excerpt {
  font-size: 0.85rem;
  color: var(--sp-muted);
  margin: 0 0 0.4rem;
  line-height: 1.45;
}

.gh-chip {
  display: inline-block;
  font-family: var(--sp-font);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, #818cf8 16%, #fff);
  color: #4338ca;
  border: 1px solid color-mix(in srgb, #6366f1 25%, transparent);
}

.gh-chip--status-open {
  background: color-mix(in srgb, #67e8f9 18%, #fff);
  color: #0e7490;
}

.gh-chip--status-closed {
  background: #f1f5f9;
  color: var(--sp-muted);
}

.gh-empty {
  color: var(--sp-muted);
  font-style: italic;
  font-size: 0.95rem;
}

.gh-evp-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gh-evp-player {
  background: #fff;
  border: 1px solid var(--sp-line);
  border-left: 4px solid #8b5cf6;
  border-radius: var(--sp-radius);
  padding: 1.25rem;
}

.gh-evp-player__audio {
  width: 100%;
  margin: 0.75rem 0;
}

.gh-evp-player__meta {
  font-size: 0.8rem;
  color: var(--sp-muted);
}

.gh-youtube-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .gh-youtube-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.gh-home-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.6rem 1.75rem;
  border-radius: var(--sp-radius);
  background:
    radial-gradient(ellipse at 0% 50%, color-mix(in srgb, #67e8f9 18%, transparent), transparent 45%),
    linear-gradient(115deg, #1e1b3a 0%, #3730a3 50%, #5b21b6 100%);
  color: var(--sp-mist);
  border: 1px solid color-mix(in srgb, #c4b5fd 40%, transparent);
  box-shadow: var(--sp-shadow);
}

.gh-home-cta h2 {
  margin: 0 0 0.4rem;
  font-family: var(--sp-display);
  font-size: 1.4rem;
  color: #e0e7ff;
}

.gh-home-cta p {
  margin: 0;
  color: color-mix(in srgb, #e0e7ff 88%, transparent);
  max-width: 42ch;
  font-size: 0.95rem;
  line-height: 1.5;
}

body.gh-community.home .wp-block-post-title,
body.gh-community.home .entry-title,
body.gh-community.home h1.wp-block-post-title {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body.gh-community.home .wp-block-post-content,
body.gh-community.home .entry-content {
  max-width: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .gh-btn,
  .gh-home-nav__card,
  .gh-case-card {
    transition: none;
  }
  .gh-btn:hover,
  .gh-home-nav__card:hover,
  .gh-case-card:hover {
    transform: none;
  }
}
