/* =====================================================================
    VARIABLES
    ===================================================================== */
:root {
  --color-bg: #0B0B12;
  --color-text: #E0E0E0;
  --color-muted-text: #A0A0A0;
  --color-accent: #5A4BFF;
  --color-accent-hover: #4D3EE6;
  --scrollbar-thumb: rgba(90, 75, 255, 0.3);
  --scrollbar-track: transparent;
  --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition-fast: 0.2s ease-in-out;
  --transition-medium: 0.35s ease-in-out;
  --blur-heavy: blur(300px);
  --blur-medium: blur(120px);
  --blur-light: blur(12px);
}

/* =====================================================================
    GLOBAL RESET & BASE
    ===================================================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-stack);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Hide vertical scrollbar lightly */
body::-webkit-scrollbar {
  width: 6px;
}
body::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}
body::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

/* =====================================================================
    ANIMATIONS
    ===================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes nebulaFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes radialBurst {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 0.6; }
  20%  { transform: translate(-50%, -50%) scale(1.2); opacity: 0.3; }
  40%  { transform: translate(-50%, -50%) scale(2.5); opacity: 0.15; }
  60%  { transform: translate(-50%, -50%) scale(4);   opacity: 0.08; }
  80%  { transform: translate(-50%, -50%) scale(5);   opacity: 0;    }
  100% { transform: translate(-50%, -50%) scale(0);   opacity: 0;    }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 0.8; transform: scale(1.1); }
}

/* =====================================================================
    PAGE CONTENT FADE-IN
    ===================================================================== */
.page-content {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out forwards;
}

/* =====================================================================
    PARALLAX BACKGROUND LAYERS
    ===================================================================== */
.page-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -4;
  overflow: hidden;
}

/* 1) Nebula Layer */
.nebula-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200vw;
  height: 200vh;
  background: radial-gradient(
    circle at center,
    rgba(30, 0, 60, 0.7),
    rgba(10, 0, 20, 0.95) 40%,
    rgba(0, 0, 0, 1) 80%
  );
  transform: translate(-50%, -50%);
  filter: var(--blur-heavy);
  opacity: 0;
  animation: nebulaFade 2s ease-out forwards;
}

/* 2) Exploding Radial Burst */
.explosion-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(
    circle at center,
    rgba(150, 75, 200, 0.5),
    rgba(120, 30, 120, 0.4) 30%,
    transparent 60%
  );
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  opacity: 0.6;
  z-index: -3;
  animation: radialBurst 3s ease-out infinite;
}

/* 3) Starfield Layer */
.stars-bg {
  position: absolute;
  inset: 0;
  background: transparent;
  overflow: hidden;
  z-index: -2;
}

.stars-bg::before,
.stars-bg::after {
  content: "";
  position: absolute;
  width: 1px;
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  box-shadow:
    /* Layer 1 */
    60vw 20vh 0 0 rgba(255, 255, 255, 0.3),
    10vw 80vh 0 0 rgba(255, 255, 255, 0.2),
    80vw 50vh 0 0 rgba(255, 255, 255, 0.4),
    30vw 30vh 0 0 rgba(255, 255, 255, 0.5),
    50vw 90vh 0 0 rgba(255, 255, 255, 0.3),
    /* Layer 2 */
    5vw 10vh 1px 0 rgba(255, 255, 255, 0.2),
    90vw 70vh 1px 0 rgba(255, 255, 255, 0.3),
    25vw 60vh 0 0 rgba(255, 255, 255, 0.4),
    70vw 15vh 1px 0 rgba(255, 255, 255, 0.2),
    40vw 75vh 0 0 rgba(255, 255, 255, 0.3);
  animation: twinkle 5s infinite ease-in-out;
}

.stars-bg::after {
  transform: translate(-20vw, -30vh);
  box-shadow:
    /* Layer 1 */
    70vw 30vh 0 0 rgba(255, 255, 255, 0.2),
    20vw 90vh 0 0 rgba(255, 255, 255, 0.4),
    85vw 60vh 0 0 rgba(255, 255, 255, 0.3),
    35vw 40vh 0 0 rgba(255, 255, 255, 0.2),
    55vw 10vh 0 0 rgba(255, 255, 255, 0.5),
    /* Layer 2 */
    15vw 20vh 1px 0 rgba(255, 255, 255, 0.3),
    95vw 80vh 1px 0 rgba(255, 255, 255, 0.2),
    30vw 70vh 0 0 rgba(255, 255, 255, 0.3),
    75vw 25vh 1px 0 rgba(255, 255, 255, 0.4),
    45vw 85vh 0 0 rgba(255, 255, 255, 0.2);
  animation-delay: 2.5s;
}

/* 4) Hero Glow Layer */
.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(500px, 80vw, 1500px);
  height: clamp(500px, 65vh, 1000px);
  background: radial-gradient(
    ellipse at center,
    rgba(100, 65, 165, 0.25) 0%,
    rgba(100, 65, 165, 0) 70%
  );
  transform: translate(-50%, -55%);
  filter: var(--blur-medium);
  opacity: 0.8;
  z-index: -1;
}

/* =====================================================================
    HEADER & NAVIGATION
    ===================================================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
}

/* Old .logo-img styles are removed. 
  The new .af-logo styles are at the bottom of this file.
*/

nav .nav-menu {
  display: flex;
  list-style: none;
  gap: 1rem;
}

.nav-link {
  color: #C0C0C0;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  transition: background var(--transition-fast), color var(--transition-fast);
  font-size: 1rem;
  font-weight: 500;
}

.nav-link:hover {
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.05);
}

/* Burger menu (hidden until mobile) */
.burger-menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}

.burger-menu span {
  width: 22px;
  height: 2px;
  background: #C0C0C0;
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.burger-menu.active span {
  background: #FFFFFF;
}

.burger-menu.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.burger-menu.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  nav .nav-menu {
    position: fixed;
    inset: 0;
    background: rgba(11, 11, 18, 0.98);
    backdrop-filter: blur(15px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition-medium), opacity var(--transition-medium);
    z-index: 1000;
  }

  nav .nav-menu.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    padding: 1rem;
    text-align: center;
    border-radius: 10px;
    font-size: 1.2rem;
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .burger-menu {
    display: flex;
    z-index: 1001;
  }
}

/* =====================================================================
    SECTIONS: FULL-VIEWPORT & TYPOGRAPHY
    ===================================================================== */
#hero,
#focus,
#careers,
#contact {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  min-height: 100vh;
  padding: 0 2rem;
  z-index: 1;
}

#hero .hero-title,
#focus .section-title,
#careers .section-title,
#contact .section-title {
  max-width: 900px;
  word-wrap: break-word;
}

.hero-title,
.section-title {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.7s forwards;
}

.hero-subtitle,
.section-text {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--color-muted-text);
  margin-bottom: 2rem;
  line-height: 1.6;
  font-weight: 400;
  max-width: 800px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.9s forwards;
}

/* =====================================================================
    CALL-TO-ACTION BUTTON
    ===================================================================== */
.cta-button {
  background-color: var(--color-accent);
  border: none;
  padding: 0.8rem 2.2rem;
  border-radius: 10px;
  color: #FFFFFF;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  font-family: inherit;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 1.1s forwards;
  text-decoration: none; /* Removes underline */
}

.cta-button:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(90, 75, 255, 0.2);
}

.cta-button:active {
  transform: translateY(0);
  box-shadow: 0 5px 10px rgba(90, 75, 255, 0.1);
}

/* =====================================================================
    CONTACT SECTION
    ===================================================================== */
.contact-section {
  padding: 4rem 1rem;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  z-index: 1;
}

.contact-section > * {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 1.3s forwards;
}

.contact-btn {
  display: inline-block;
  background: rgba(255, 255, 255, 0.02);
  color: #FFFFFF;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: var(--blur-light);
  transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.contact-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow:
    0 0 12px rgba(50, 200, 255, 0.7),
    0 0 24px rgba(255, 50, 200, 0.7);
}

/* =====================================================================
    CAREERS JOB LISTINGS
    ===================================================================== */
.jobs-container {
  width: 100%;
  max-width: 700px;
  margin: 2rem auto 0;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 1.1s forwards;
}

.jobs-list {
  list-style: none;
}

.jobs-list li {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  transition: background var(--transition-fast), transform var(--transition-fast);
  color: #FFFFFF;
}

.jobs-list li:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.jobs-list li h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.jobs-list li p {
  font-size: 0.95rem;
  color: #DDDDDD;
  margin-bottom: 0.5rem;
}

.jobs-list li a.apply-link {
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
}

.jobs-list li a.apply-link:hover {
  text-decoration: underline;
}

/* =====================================================================
    FOOTER
    ===================================================================== */
footer {
  position: relative;
  padding: 1.5rem 2rem;
  background: var(--color-bg);
  width: 100%;
  z-index: 1;
  text-align: center;
}

footer p {
  color: #707070;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  pointer-events: none;
}

/* =====================================================================
    RESPONSIVE ADJUSTMENTS
    ===================================================================== */
@media (max-width: 1023px) {
  .hero-title,
  .section-title {
    font-size: clamp(2.5rem, 7vw, 4rem);
  }
  .hero-subtitle,
  .section-text,
  .jobs-list li p {
    font-size: clamp(0.95rem, 3vw, 1.2rem);
  }
  .jobs-container {
    margin: 1.5rem auto 0;
  }
  .cta-button {
    margin-bottom: 2rem;
  }
}


/* =====================================================================
    SVG LOGO ANIMATION STYLES
    ===================================================================== */
.af-logo {
  height: 150px; /* Match old logo height for consistency */
  width: auto;
  display: block;
  background: transparent;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.5s forwards; /* Match old logo fade-in */
}

/* === Common Stroke Styles === */
.af-stroke {
  stroke: #fff;
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 10000;
  stroke-dashoffset: 10000;
  filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 10px #fff);
  will-change: stroke-dashoffset, filter, opacity;
}

/* Path 1: 3s draw → 2 pulses glow → quick fade */
.af-stroke:nth-of-type(1) {
  animation:
    draw        3s ease-in-out    0s forwards,
    glow-pulse  0.6s ease-in-out  0s 2,
    fade-stroke 0.1s ease-out     3s forwards;
}

/* Path 2: 0.2s draw immediately after path 1 → 0.2s fade */
.af-stroke:nth-of-type(2) {
  animation:
    draw        0.2s ease-in-out    3s forwards,
    fade-stroke 0.2s ease-out       3.2s forwards;
}

/* White Fill Path: begins when stroke 2 finishes at 3.4s */
path.af-fill {
  fill: #fff;
  opacity: 0;
  will-change: opacity;
  animation: fade-in-fill 0.4s ease-in 1.4s forwards;
}

/* === Keyframes === */
@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px #fff); }
  50%      { filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 15px #fff); }
}

@keyframes fade-stroke {
  to { opacity: 0; }
}

@keyframes fade-in-fill {
  to { opacity: 1; }
}