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

:root {
  --bg-dark: #080c1a;
  --bg-card: rgba(8, 12, 25, 0.88);
  --border-card: rgba(99, 102, 241, 0.15);
  --text-primary: rgba(241, 245, 249, 0.95);
  --text-secondary: rgba(241, 245, 249, 0.65);
  --text-dim: rgba(241, 245, 249, 0.4);
  --accent: #06b6d4;
  --accent-indigo: #6366f1;
  --accent-purple: #8b5cf6;

  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-dark);
  color: var(--text-primary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: #22d3ee;
}

/* ─── Canvas Background ───────────────────────────────────────── */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ─── Warp Speed Lines Overlay ────────────────────────────────── */
#warp-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

#warp-canvas.active {
  opacity: 0.5;
}

/* ─── Vignette (darkens center for text readability) ──────────── */
#bg-canvas::after {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ─── Content Overlay ─────────────────────────────────────────── */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Subtle central darkening gradient so text pops over particles */
#overlay::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    ellipse 70% 60% at 50% 40%,
    rgba(5, 8, 16, 0.35) 0%,
    transparent 100%
  );
}

/* ─── Navigation ──────────────────────────────────────────────── */
#top-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  backdrop-filter: blur(20px);
  background: rgba(8, 12, 26, 0.7);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.site-logo {
  height: 50px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s;
  cursor: pointer;
}

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

.nav-links a.active {
  color: var(--accent);
}

/* ─── Main Content ────────────────────────────────────────────── */
#content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 2rem 6rem;
}

/* ─── Page Transitions ────────────────────────────────────────── */
.page {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.5s ease;
}

.page.active {
  display: block;
}

.page.visible {
  opacity: 1;
  transform: translateY(0);
}

.page.fading-out {
  display: block;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* ─── Hero Section ────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 8rem 0 6rem;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 6s ease-in-out infinite;
}

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

.hero-desc {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ─── Glass Cards ─────────────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 2.5rem;
  transition: border-color 0.3s, transform 0.3s;
}

.glass-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-2px);
}

/* ─── CTA Card ────────────────────────────────────────────────── */
.cta-card {
  text-align: center;
  margin-bottom: 4rem;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(99, 102, 241, 0.12) 100%);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.cta-card .label {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.cta-card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.cta-card p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 550px;
  margin: 0 auto 1.5rem;
}

.cta-button {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: #0f172a !important;
  font-weight: 700;
  border-radius: 8px;
  font-size: 1rem;
  transition: opacity 0.2s, transform 0.2s;
}

.cta-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ─── Areas of Interest ───────────────────────────────────────── */
.areas {
  margin-bottom: 4rem;
}

.section-title {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 2rem;
  font-weight: 600;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.area-card {
  border-left: 4px solid var(--card-accent, var(--accent-indigo));
  padding: 1.75rem !important;
}

.area-card h3 {
  color: var(--card-accent, var(--accent));
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.area-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Quote Section ───────────────────────────────────────────── */
.quote-section {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  margin: 3rem 0;
}

.quote-section blockquote {
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 1rem;
  position: relative;
}

.quote-section blockquote::before {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-indigo), var(--accent));
  margin: 0 auto 2rem;
}

.quote-section cite {
  font-size: 0.95rem;
  color: var(--text-dim);
  font-style: normal;
  font-weight: 500;
}

/* ─── Feature Grid (from original site, used by subpages) ────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.feature-card {
  background: rgba(8, 12, 25, 0.88);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-indigo);
  box-shadow: 0 15px 30px -10px rgba(99, 102, 241, 0.25);
}

.feature-card h3 {
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

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

/* ─── Standard Page (fetched subpages) ───────────────────────── */
.standard-page {
  padding-top: 2rem;
}

.standard-page h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.standard-page h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.standard-page h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.page-content {
  color: var(--text-secondary);
  line-height: 1.8;
}

.page-content p {
  margin-bottom: 1rem;
}

.page-content ul, .page-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.page-content li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* ─── Contact Form ───────────────────────────────────────────── */
.contact-form {
  background: rgba(8, 12, 25, 0.88);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form button[type="submit"] {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--accent);
  color: #0f172a;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  font-family: inherit;
}

.contact-form button[type="submit"]:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.form-message {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* ─── Video Card Override (darker for animated background) ──── */
.video-card {
  background: rgba(8, 12, 25, 0.85) !important;
  border-color: rgba(99, 102, 241, 0.2) !important;
}

.video-card:hover {
  background: rgba(15, 20, 40, 0.9) !important;
  border-color: #6366f1 !important;
}

/* ─── Features Section (homepage areas of interest) ──────────── */
.features-section {
  margin-bottom: 3rem;
}

.features-section h2 {
  font-size: 1.8rem;
  font-weight: 600;
}

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  #top-nav {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    gap: 1rem;
  }

  #content {
    padding: 1.5rem 1.5rem 4rem;
  }

  .hero {
    padding: 5rem 0 4rem;
  }
}
