/* ==========================================================================
   Paralnoia — shared styles
   Palette sampled from the Paralnoia logo (navy space background,
   teal-to-cyan UFO glow, silver-grey metallic wordmark).
   ========================================================================== */

:root {
  --bg: #0a0e1e;
  --bg-alt: #0d1428;
  --bg-panel: #101a33;
  --border: rgba(103, 232, 249, 0.14);

  --teal: #2dd4bf;
  --cyan: #67e8f9;
  --glow: #5eead4;

  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #5b6b85;

  --font-display: "Questrial", sans-serif;
  --font-body: "Mulish", sans-serif;

  --header-height: 96px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.6;
  min-height: 100vh;
}

/* Fixed ambient starfield + drifting nebula glow, sits behind all page content */
.bg-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background-color: var(--bg);
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(226, 232, 240, 0.9) 50%, transparent),
    radial-gradient(1px 1px at 140px 80px, rgba(226, 232, 240, 0.7) 50%, transparent),
    radial-gradient(1.5px 1.5px at 90px 160px, rgba(226, 232, 240, 0.8) 50%, transparent),
    radial-gradient(1px 1px at 200px 40px, rgba(226, 232, 240, 0.6) 50%, transparent),
    radial-gradient(1px 1px at 60px 190px, rgba(226, 232, 240, 0.5) 50%, transparent),
    radial-gradient(1.5px 1.5px at 170px 220px, rgba(226, 232, 240, 0.7) 50%, transparent),
    radial-gradient(1px 1px at 230px 130px, rgba(226, 232, 240, 0.6) 50%, transparent);
  background-repeat: repeat;
  background-size: 240px 240px;
}

.bg-ambient::before,
.bg-ambient::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: drift 24s ease-in-out infinite alternate;
}

.bg-ambient::before {
  width: 42vw;
  height: 42vw;
  top: -10%;
  left: -8%;
  background: radial-gradient(circle, var(--teal), transparent 70%);
}

.bg-ambient::after {
  width: 38vw;
  height: 38vw;
  bottom: -12%;
  right: -6%;
  background: radial-gradient(circle, var(--cyan), transparent 70%);
  animation-delay: -8s;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(4%, 6%) scale(1.08); }
}

/* Fixed looping video background — used in place of .bg-ambient on pages
   that want a video backdrop instead of the starfield (e.g. Reporting). */
.bg-video-wrap {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bg-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 30, 0.35) 0%, rgba(10, 14, 30, 0.75) 45%, var(--bg) 85%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-primary);
  letter-spacing: 0.04em;
  font-weight: 700;
}

.text-gradient {
  background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 40%, #7c8aa0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glow-gradient {
  background: linear-gradient(180deg, var(--cyan) 0%, var(--teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------------------------- Header ---------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: rgba(10, 14, 30, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .logo-link {
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
}

.site-header .logo-link img {
  height: 72px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.25rem);
}

.main-nav a {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  text-transform: uppercase;
  padding: 0.5rem 0.1rem;
  position: relative;
  transition: color 0.25s ease;
  white-space: nowrap;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
  box-shadow: 0 0 8px var(--glow);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-primary);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--text-primary);
}

/* ---------------------------------- Footer ---------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem);
  margin-top: 4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-footer .footer-brand {
  font-family: var(--font-display);
  letter-spacing: 0.15em;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.footer-nav a:hover {
  color: var(--cyan);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 100%;
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ---------------------------------- Page hero (interior pages) ---------------------------------- */

.page-hero {
  padding: 5rem clamp(1.25rem, 4vw, 3rem) 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  text-transform: uppercase;
}

/* Video-background pages (Reporting, Articles) need extra text contrast
   since the video's own brightness varies and can wash out the text. */
.has-video-bg .page-hero h1 {
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.65));
}

.has-video-bg .page-hero p {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

.has-video-bg .page-content {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.page-hero p {
  margin-top: 1rem;
  color: var(--text-secondary);
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.page-content {
  padding: 4rem clamp(1.25rem, 4vw, 3rem);
  max-width: 72rem;
  margin: 0 auto;
}

.bio {
  max-width: 42rem;
  margin: 0 auto;
}

.bio + .bio {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.bio-portrait {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1.75rem;
  border: 1px solid var(--border);
  box-shadow: 0 0 30px rgba(94, 234, 212, 0.2);
}

.bio-name {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
  text-align: center;
}

.bio-subheading {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin-bottom: 1.25rem;
  text-align: center;
}

.bio p {
  margin-bottom: 1.25rem;
}

.bio p:last-child {
  margin-bottom: 0;
}

.bio a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bio a:hover {
  color: var(--text-primary);
}

.placeholder-panel {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  background: rgba(103, 232, 249, 0.03);
}

/* ---------------------------------- Intro (Home page) ---------------------------------- */

#intro-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.8s ease;
}

.intro-hidden {
  opacity: 0;
  pointer-events: none;
}

.intro-prompt {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  text-align: center;
  padding: 1.5rem;
  transition: opacity 0.4s ease;
}

.intro-prompt img {
  width: min(320px, 70vw);
  filter: drop-shadow(0 0 30px rgba(94, 234, 212, 0.35));
}

.intro-prompt p {
  color: var(--text-secondary);
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  text-transform: uppercase;
}

#intro-play {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bg);
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(94, 234, 212, 0.45);
  animation: pulse-glow 2.4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(94, 234, 212, 0.35); }
  50% { box-shadow: 0 0 40px rgba(94, 234, 212, 0.65); }
}

#intro-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#intro-video.intro-visible {
  opacity: 1;
}

#intro-skip {
  position: absolute;
  top: clamp(1.25rem, 4vw, 2.5rem);
  right: clamp(1.25rem, 4vw, 2.5rem);
  z-index: 3;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: rgba(10, 14, 30, 0.55);
  border: 1px solid var(--border);
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

/* ---------------------------------- Home hero ---------------------------------- */

.home-hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--header-height));
}

.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 30, 0.35) 0%, rgba(10, 14, 30, 0.7) 55%, var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem clamp(1.25rem, 4vw, 3rem);
  gap: 1.75rem;
}

.home-hero img.hero-logo {
  width: min(420px, 80vw);
  filter: drop-shadow(0 0 35px rgba(94, 234, 212, 0.3));
}

.home-hero .hero-welcome {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  max-width: 42rem;
}

.home-hero .hero-sub {
  max-width: 38rem;
  color: var(--text-secondary);
}

.home-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.home-links a {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  transition: border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.home-links a:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(103, 232, 249, 0.25);
}

/* ---------------------------------- News grid ---------------------------------- */

.news-updated {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.news-region {
  margin-bottom: 3.5rem;
}

.news-region:last-child {
  margin-bottom: 0;
}

.news-region-heading {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.news-empty {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: rgba(103, 232, 249, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), 0 0 24px rgba(94, 234, 212, 0.12);
}

.news-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-alt);
}

.news-card-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-card-img--placeholder img {
  width: 40%;
  opacity: 0.5;
  filter: grayscale(1) drop-shadow(0 0 12px rgba(94, 234, 212, 0.25));
}

.news-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.news-card-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.news-card h3 {
  font-size: 1.15rem;
  line-height: 1.35;
}

.news-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex: 1;
}

.news-card-link {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* ---------------------------------- Video embed ---------------------------------- */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), 0 0 24px rgba(94, 234, 212, 0.1);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------------------------------- Podcast embed ---------------------------------- */

.podcast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: stretch;
  gap: 2rem;
  max-width: 60rem;
  margin: 0 auto 2.5rem;
}

/* Each podcast platform renders its widget at a different natural height —
   give every card the same box height and vertically center the shorter
   ones inside it, rather than letting the grid look jagged/misaligned. */
.podcast-embed {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 352px;
}

.podcast-embed iframe {
  display: block;
  width: 100%;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), 0 0 24px rgba(94, 234, 212, 0.1);
}

/* ---------------------------------- Social links ---------------------------------- */

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.social-link:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(103, 232, 249, 0.25);
  transform: translateY(-2px);
}

.social-icon svg {
  width: 34px;
  height: 34px;
  display: block;
  color: var(--cyan);
}

/* ---------------------------------- Report form ---------------------------------- */

.report-form {
  max-width: 48rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.report-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.report-section legend {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  padding: 0 0.5rem;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  transition: opacity 0.25s ease;
}

.field-grid--disabled {
  opacity: 0.4;
}

.field-wide {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.field em {
  color: var(--text-muted);
  font-style: normal;
}

.field input,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cyan);
}

.field input[type="file"] {
  padding: 0.5rem;
}

.input-with-button {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.input-with-button input {
  flex: 1;
  min-width: 10rem;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-primary,
.btn-secondary {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.85rem 2rem;
  cursor: pointer;
  border: none;
  transition: box-shadow 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  color: var(--bg);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 0 25px rgba(94, 234, 212, 0.4);
  transform: translateY(-2px);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.7rem 1.25rem;
  white-space: nowrap;
}

.btn-secondary:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.report-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.dashboard {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.dashboard-heading {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  text-align: center;
  margin-bottom: 1.75rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.dashboard-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.dashboard-card h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
  color: var(--cyan);
}

.dashboard-stat {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.dashboard-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.dashboard-muted {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------------------------------- Responsive ---------------------------------- */

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-nav.open {
    max-height: 24rem;
  }

  .main-nav a {
    width: 100%;
    padding: 1rem clamp(1.25rem, 4vw, 3rem);
    border-bottom: 1px solid var(--border);
  }

  .nav-toggle {
    display: flex;
  }
}
