/* style.css */
:root {
    --deep-space-blue: #0b0f29; /* Very dark blue, almost black */
    --midnight-blue: #151a3b;  /* Slightly lighter dark blue */
    --nebula-purple: #4b3a6b;  /* Muted purple for accents */
    --starlight-white: #f0f0f0;/* Soft white for text and glows */
    --pale-lavender: #d9d4e7;  /* Accent color */
    --soft-teal-glow: #64ffda33; /* For subtle glows, semi-transparent */

    --font-headline: 'Exo 2', sans-serif;
    --font-body: 'Lato', sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: var(--deep-space-blue);
    color: var(--starlight-white);
    padding-top: 70px; /* Account for fixed navbar height */
    overflow-x: hidden;
}

.logo-font {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 1.7rem;
    color: var(--pale-lavender) !important;
    letter-spacing: 1px;
}

.navbar {
    background-color: rgba(11, 15, 41, 0.8); /* Semi-transparent deep space blue */
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(75, 58, 107, 0.3); /* Subtle nebula purple border */
    padding-top: 10px;
    padding-bottom: 10px;
}

.nav-link {
    font-family: var(--font-headline);
    font-weight: 300;
    color: var(--starlight-white) !important;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    margin: 0 0.5rem;
    font-size: 1rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--pale-lavender) !important;
    text-shadow: 0 0 8px var(--pale-lavender);
}

.section-padding {
    padding-top: 80px;
    padding-bottom: 80px;
}

.section-title {
    font-family: var(--font-headline);
    color: var(--pale-lavender);
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 2rem;
    font-size: 2.8rem;
    text-shadow: 0 0 10px rgba(217, 212, 231, 0.3);
}
h1, h2 {
    font-family: var(--font-headline);
}
h1 { color: var(--starlight-white); text-shadow: 0 0 15px rgba(240, 240, 240, 0.5);}
p.lead { font-weight: 300; color: #c0c0d0; }
p.lead-sm { font-weight: 300; color: #c0c0d0; font-size: 1.1rem; line-height: 1.7;}


/* Hero Section */
#hero {
    min-height: 100vh;
    background-image: url('images/deep-space-hero.jpg'); /* Main deep space background */
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; /* Creates basic parallax */
    overflow: hidden; /* Crucial for starfield containment */
}

.astronaut-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30%; /* Adjust size of astronaut */
    max-width: 400px; /* Max size */
    z-index: 5; /* Above stars, below content */
    animation: gentleFloat 10s ease-in-out infinite alternate;
}
.floating-astronaut {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(100, 255, 218, 0.2)); /* Subtle teal glow around astronaut */
}
@keyframes gentleFloat {
    0% { transform: translate(-50%, -50%) translateY(-15px) rotate(-2deg); }
    100% { transform: translate(-50%, -45%) translateY(15px) rotate(2deg); }
}


.hero-content {
    z-index: 10; /* Above astronaut and stars */
}

.btn-hero-glow {
    border-color: var(--pale-lavender);
    color: var(--pale-lavender);
    font-family: var(--font-headline);
    font-weight: 400;
    padding: 0.8rem 1.8rem;
    transition: all 0.4s ease;
    box-shadow: 0 0 0px var(--pale-lavender);
}

.btn-hero-glow:hover {
    background-color: rgba(217, 212, 231, 0.1);
    color: var(--starlight-white);
    border-color: var(--starlight-white);
    box-shadow: 0 0 15px var(--pale-lavender), 0 0 25px var(--pale-lavender) inset;
    transform: translateY(-2px);
}
.btn-hero-glow .fa-space-shuttle {
    transition: transform 0.4s ease-out;
}
.btn-hero-glow:hover .fa-space-shuttle {
    transform: translateX(5px) scale(1.1);
}


/* Starfield CSS Animation - adapted from https://codepen.io/alphardex/pen/RwrVoeL */
@function multiple-box-shadow($n) {
  $value: '#{random(2000)}px #{random(2000)}px #FFF';
  @for $i from 2 through $n {
    $value: '#{$value} , #{random(2000)}px #{random(2000)}px #FFF';
  }
  @return unquote($value);
}
$shadows-small:  multiple-box-shadow(700);
$shadows-medium: multiple-box-shadow(200);
$shadows-large:  multiple-box-shadow(100);

#stars-small, #stars-medium, #stars-large {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Behind astronaut and content */
}

#stars-small {
  width: 1px; height: 1px;
  background: transparent;
  box-shadow: $shadows-small;
  animation: animStar 50s linear infinite;
  &:after { content: " "; position: absolute; top: -1000px; width: 1px; height: 1px; background: transparent; box-shadow: $shadows-small; }
}
#stars-medium {
  width: 2px; height: 2px;
  background: transparent;
  box-shadow: $shadows-medium;
  animation: animStar 100s linear infinite;
   &:after { content: " "; position: absolute; top: -1000px; width: 2px; height: 2px; background: transparent; box-shadow: $shadows-medium; }
}
#stars-large {
  width: 3px; height: 3px;
  background: transparent;
  box-shadow: $shadows-large;
  animation: animStar 150s linear infinite;
  &:after { content: " "; position: absolute; top: -1000px; width: 3px; height: 3px; background: transparent; box-shadow: $shadows-large; }
}

@keyframes animStar {
  from {transform: translateY(0px);}
  to   {transform: translateY(1000px);} /* Match :after top value */
}

/* About Section */
#about .atmospheric-image {
    border: 3px solid rgba(75, 58, 107, 0.5); /* Nebula purple border */
    box-shadow: 0 0 25px rgba(75, 58, 107, 0.3);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    filter: saturate(1.2);
}
#about .atmospheric-image:hover {
    transform: scale(1.03) rotate(-1deg);
    box-shadow: 0 0 35px rgba(75, 58, 107, 0.5);
}


/* Features Section */
.bg-darker {
    background-color: var(--midnight-blue); /* Slightly different dark shade */
}

.feature-card {
    background-color: rgba(30, 35, 70, 0.5); /* Semi-transparent card bg */
    border: 1px solid rgba(75, 58, 107, 0.4); /* Nebula purple border */
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.feature-card:hover {
    transform: translateY(-8px);
    background-color: rgba(40, 45, 85, 0.7);
    box-shadow: 0 10px 30px rgba(75, 58, 107, 0.3);
}

.feature-icon {
    color: var(--pale-lavender);
    transition: color 0.3s ease, transform 0.3s ease;
}
.feature-card:hover .feature-icon {
    color: var(--starlight-white);
    transform: scale(1.1);
}

.feature-title {
    font-family: var(--font-headline);
    color: var(--starlight-white);
    font-weight: 400;
    margin-bottom: 0.8rem;
}
.feature-card p {
    font-size: 0.95rem;
    color: #b0b0c0;
    line-height: 1.6;
    flex-grow: 1; /* Makes text take up space before button */
}

.btn-outline-secondary-custom {
    border-color: var(--nebula-purple);
    color: var(--nebula-purple);
    font-family: var(--font-headline);
    font-weight: 300;
    transition: all 0.3s ease;
    padding: 0.4rem 1rem;
}

.btn-outline-secondary-custom:hover {
    background-color: var(--nebula-purple);
    color: var(--starlight-white);
    border-color: var(--nebula-purple);
    box-shadow: 0 0 10px var(--nebula-purple);
}

/* Join Section */
#join .form-control {
    background-color: rgba(255,255,255,0.05);
    border: 1px solid var(--nebula-purple);
    color: var(--starlight-white);
    font-size: 1rem;
    font-family: var(--font-body);
    padding: 0.75rem 1rem;
}
#join .form-control::placeholder {
    color: rgba(217, 212, 231, 0.5);
}
#join .form-control:focus {
    background-color: rgba(255,255,255,0.1);
    border-color: var(--pale-lavender);
    color: var(--starlight-white);
    box-shadow: 0 0 0 0.25rem rgba(217, 212, 231, 0.2);
}
.btn-primary-custom-glow {
    background-color: var(--pale-lavender);
    border-color: var(--pale-lavender);
    color: var(--deep-space-blue);
    font-family: var(--font-headline);
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(217, 212, 231, 0.4);
}
.btn-primary-custom-glow:hover {
    background-color: var(--starlight-white);
    border-color: var(--starlight-white);
    color: var(--deep-space-blue);
    box-shadow: 0 0 20px var(--starlight-white);
    transform: translateY(-2px);
}


#join .social-icons a {
    color: var(--nebula-purple);
    margin: 0 12px;
    font-size: 1.8rem;
    transition: color 0.3s ease, transform 0.3s ease, text-shadow 0.3s ease;
}
#join .social-icons a:hover {
    color: var(--pale-lavender);
    transform: translateY(-3px) scale(1.1);
    text-shadow: 0 0 8px var(--pale-lavender);
}


/* Footer */
footer {
    background-color: var(--midnight-blue);
    border-top: 1px solid rgba(75, 58, 107, 0.2);
    color: #a0a0b0;
    position: relative;
    overflow: hidden; /* For comet containment */
}
footer p { font-size: 0.9rem; }
footer a {
    color: var(--nebula-purple);
    text-decoration: none;
    transition: color 0.3s ease;
}
footer a:hover {
    color: var(--pale-lavender);
    text-decoration: underline;
}

.footer-comet {
    position: absolute;
    bottom: 10px; /* Adjust as needed */
    left: -50px; /* Start off-screen */
    width: 30px;
    height: 2px;
    background: linear-gradient(to right, rgba(240,240,240,0), rgba(240,240,240,0.8));
    border-radius: 50%;
    opacity: 0.6;
    animation: cometFly 20s linear infinite;
    animation-delay: 5s; /* Delay initial animation */
}
@keyframes cometFly {
    0% { left: -50px; opacity: 0.6; }
    40% { opacity: 0.8; }
    50% { opacity: 0.6; }
    100% { left: calc(100% + 50px); opacity: 0; }
}


/* Responsive Adjustments */
@media (max-width: 992px) {
    .astronaut-container { width: 40%; }
}
@media (max-width: 768px) {
    .section-title { font-size: 2.2rem; }
    #hero h1 { font-size: 2.8rem; }
    #hero p.lead { font-size: 1.1rem; }
    .astronaut-container { width: 50%; max-width: 280px;}
    #stars-small, #stars-medium, #stars-large { /* Reduce star density on mobile for performance */
        animation-duration: 100s; /* Slower animation */
    }
    #stars-large { display: none; } /* Hide largest stars */
}
@media (max-width: 576px) {
    .astronaut-container { width: 65%; max-width: 250px;}
     #hero h1 { font-size: 2.2rem; }
    .btn-hero-glow { font-size: 0.9rem; padding: 0.6rem 1.2rem; }
    .section-title { font-size: 1.8rem; }
}

/* Animation for sections appearing on scroll */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}