/* ========================================
   NOSTIOS GLOBAL — Variables, Reset, Typography, Atmosphere
   ======================================== */

/* ---- Design System Tokens ---- */
:root {
  /* Backgrounds */
  --void: #0a0a0f;
  --deep: #1a1a2e;
  --surface: #252542;
  --surface-light: #2a2a4a;

  /* Borders */
  --border: #4a4a6a;
  --border-glow: rgba(91, 84, 235, 0.15);

  /* Text */
  --text-primary: #eeeeee;
  --text-secondary: #cccccc;
  --text-muted: #b0b0b0;

  /* Accent — Indigo */
  --accent: #5b54eb;
  --accent-soft: #4a44d4;
  --accent-glow: rgba(91, 84, 235, 0.25);
  --accent-glow-strong: rgba(91, 84, 235, 0.4);

  /* Secondary Accents */
  --blue: #5ba8f5;
  --blue-glow: rgba(91, 168, 245, 0.25);
  --teal: #4ecdc4;
  --teal-glow: rgba(78, 205, 196, 0.2);
  --indigo: #7c6cf0;
  --indigo-glow: rgba(124, 108, 240, 0.2);
  --warm: #f0a85e;
  --warm-glow: rgba(240, 168, 94, 0.15);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Ghost font integration */
  --gh-font-heading: 'Outfit', sans-serif;
  --gh-font-body: 'DM Sans', sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Prevents fixed nav from covering focused elements */
}

body {
  background: linear-gradient(180deg, #0a0a0f 0%, #0d0d1a 50%, #0a0a0f 100%);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* JS-loaded class ensures animate-in elements are visible without JS */
body:not(.js-loaded) .animate-in {
  opacity: 1;
  transform: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---- Skip Link ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: 0 0 8px 8px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
}

/* ---- Space Background — Stars ---- */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    /* Small stars */
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 25% 45%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 40% 15%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 55% 70%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 70% 35%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 85% 60%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 15% 80%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 95% 10%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 5% 55%, rgba(255,255,255,0.4), transparent),
    /* Medium stars */
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 60% 20%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 80% 75%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 35% 90%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 90% 45%, rgba(255,255,255,0.4), transparent),
    /* Large stars */
    radial-gradient(2px 2px at 30% 10%, rgba(255,255,255,0.4), transparent),
    radial-gradient(2px 2px at 75% 55%, rgba(255,255,255,0.3), transparent),
    radial-gradient(2px 2px at 45% 85%, rgba(255,255,255,0.4), transparent);
  background-size: 200% 200%;
  z-index: -2;
  animation: drift 120s linear infinite;
  pointer-events: none;
}

/* ---- Space Background — Nebula Glows ---- */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse at 25% 25%, rgba(91, 84, 235, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 75%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
  filter: blur(80px);
}

@keyframes drift {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-3%, -2%); }
  100% { transform: translate(0, 0); }
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.2;
}

/* ---- Gradient Text ---- */
.gradient-text,
.page-title,
.hero h1 {
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Hero ---- */
.hero {
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
}

.hero-heading {
  font-size: 3.5rem;
  font-weight: 300;
  line-height: 1.15;
  max-width: 680px;
  margin: 0 auto 24px;
  animation: fadeUp 0.9s ease-out;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.75;
  animation: fadeUp 0.9s ease-out 0.1s both;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.9s ease-out 0.2s both;
}

/* ---- Section Header Row ---- */
.section-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-header-row .section-label { margin-bottom: 0; }

.view-all-link {
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.view-all-link:hover { color: var(--text-primary); }

/* ---- Vision Section ---- */
.vision-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.vision-quote {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.vision-note {
  font-size: 15px;
  color: var(--text-muted);
}

/* ---- Shared Layout ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

.section { padding: 80px 0; }
.section--flush { padding-top: 0; }
.section--vision { padding: 100px 0; }
.section + .section { border-top: 1px solid var(--border); }

.section-label {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
}

.page-header {
  padding: 140px 0 60px;
  text-align: center;
  position: relative;
}
.page-header::before {
  content: '';
  position: absolute;
  top: 60px; left: 50%;
  transform: translateX(-50%);
  width: 500px; height: 300px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.4;
}
.page-header-content { position: relative; z-index: 1; }

.page-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 300;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.page-title strong { font-weight: 600; }

.page-subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---- Scroll Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Accessibility ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .animate-in {
    opacity: 1;
    transform: none;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Visually Hidden (screen reader only) ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Responsive Base ---- */
@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .page-header { padding: 120px 0 40px; }
  .page-title { font-size: 2rem; }
}
