/* ========================================
   uap.info — Cosmic Dark Theme
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* --- Design Tokens --- */
:root {
  --bg-primary: #06080f;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-card-hover: rgba(255, 255, 255, 0.15);
  --text-primary: #e8eaf0;
  --text-secondary: rgba(232, 234, 240, 0.65);
  --text-muted: rgba(232, 234, 240, 0.4);
  --accent: #6c8cff;
  --accent-glow: rgba(108, 140, 255, 0.25);
  --accent-secondary: #a78bfa;
  --section-gap: 4rem;
  --card-radius: 16px;
  --nav-height: 64px;
  --max-width: 900px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 2rem);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Cosmic Background --- */
.cosmic-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('cosmic-bg.png') center/cover no-repeat fixed;
  opacity: 0.5;
}

.cosmic-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(108, 140, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(167, 139, 250, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, rgba(6, 8, 15, 0.3) 0%, rgba(6, 8, 15, 0.7) 100%);
}

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

.stars::before,
.stars::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: white;
  box-shadow:
    120px 40px 0 0 rgba(255, 255, 255, 0.15),
    300px 120px 0 0 rgba(255, 255, 255, 0.1),
    500px 80px 0 0 rgba(255, 255, 255, 0.2),
    700px 200px 0 0 rgba(255, 255, 255, 0.08),
    150px 300px 0 0 rgba(255, 255, 255, 0.12),
    400px 350px 0 0 rgba(255, 255, 255, 0.18),
    650px 400px 0 0 rgba(255, 255, 255, 0.1),
    200px 500px 0 0 rgba(255, 255, 255, 0.15),
    800px 100px 0 0 rgba(255, 255, 255, 0.08),
    50px 450px 0 0 rgba(255, 255, 255, 0.1),
    900px 350px 0 0 rgba(255, 255, 255, 0.12),
    350px 600px 0 0 rgba(255, 255, 255, 0.2),
    750px 550px 0 0 rgba(255, 255, 255, 0.08),
    100px 650px 0 0 rgba(255, 255, 255, 0.15),
    550px 700px 0 0 rgba(255, 255, 255, 0.1);
  animation: twinkle 6s ease-in-out infinite alternate;
}

.stars::after {
  animation-delay: 3s;
  transform: translate(20px, 30px);
}

@keyframes twinkle {
  0% {
    opacity: 0.4;
  }

  100% {
    opacity: 1;
  }
}

/* --- Navigation --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 0 2rem;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(6, 8, 15, 0.7);
  border-bottom: 1px solid var(--border-card);
  transition: background var(--transition);
}

nav.scrolled {
  background: rgba(6, 8, 15, 0.92);
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color var(--transition);
  position: relative;
}

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

.nav-links a.active::after {
  width: 100%;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}

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

/* --- Hero --- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 0 2rem;
  position: relative;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 50%, var(--accent-secondary) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.8;
}

.hero-divider {
  width: 50px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 2.5rem 0;
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: float 3s ease-in-out infinite;
}

.scroll-indicator svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}

/* --- Sections --- */
.section {
  padding: var(--section-gap) 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-primary);
}

/* --- Subsection Cards --- */
.subsection {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  padding: 2.5rem;
  margin-bottom: 1.5rem;
  transition: all var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(24px);
}

.subsection.revealed {
  opacity: 1;
  transform: translateY(0);
}

.subsection:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2), 0 0 60px var(--accent-glow);
}

.subsection.revealed:hover {
  transform: translateY(-2px);
}

.subsection h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.subsection p {
  color: var(--text-secondary);
  font-size: 0.975rem;
  line-height: 1.8;
}

.subsection p+p {
  margin-top: 1rem;
}

/* --- Case Card (Compelling Cases) --- */
.case-card {
  padding: 0;
  overflow: hidden;
}

.case-content {
  padding: 2.5rem;
}

.case-witnesses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.witness {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.witness img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-card);
  transition: border-color var(--transition);
}

.witness:hover img {
  border-color: var(--accent);
}

.witness-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

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

/* --- Link Button --- */
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.65rem 1.25rem;
  background: rgba(108, 140, 255, 0.1);
  border: 1px solid rgba(108, 140, 255, 0.2);
  border-radius: 8px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}

.link-btn:hover {
  background: rgba(108, 140, 255, 0.18);
  border-color: rgba(108, 140, 255, 0.35);
  transform: translateX(2px);
}

.link-btn svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}

.link-btn:hover svg {
  transform: translateX(3px);
}

/* --- Official Card (Government) --- */
.official-card {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.official-avatar {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.official-body {
  flex: 1;
}

.official-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.official-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- Divider --- */
.section-divider {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-card), transparent);
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

footer a:hover {
  color: var(--accent);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --section-gap: 3rem;
  }

  nav {
    padding: 0 1rem;
    gap: 1.5rem;
  }

  .nav-links {
    gap: 1.25rem;
  }

  .nav-links a {
    font-size: 0.85rem;
  }

  .section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero {
    padding: 0 1rem;
  }

  .subsection {
    padding: 1.75rem;
  }

  .case-witnesses {
    grid-template-columns: 1fr;
  }

  .official-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* --- Reveal Stagger --- */
.subsection:nth-child(2) {
  transition-delay: 0.1s;
}

.subsection:nth-child(3) {
  transition-delay: 0.2s;
}

.subsection:nth-child(4) {
  transition-delay: 0.3s;
}