/* ============ RESET Y BASE ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #0B0E14; /* Deep Space */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
}

/* ============ NAVBAR ============ */
@keyframes slideDown {
  0% { transform: translateY(-100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(8px);
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.3s, box-shadow 0.3s, border-bottom 0.3s;
  animation: slideDown 0.6s ease-out forwards;
  border-bottom: 1px solid rgba(0, 180, 216, 0);
}

.navbar.scrolled {
  background-color: rgba(11, 14, 20, 0.95);
  box-shadow: 0 4px 20px rgba(0, 180, 216, 0.15);
  border-bottom: 1px solid rgba(0, 180, 216, 0.4);
  backdrop-filter: blur(12px);
}

.logo img {
  height: 79px;
  display: block;
  animation: glowPulse 2s ease-in-out 0.6s forwards;
  border-radius: 4px;
}

@keyframes glowPulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 180, 216, 0); }
  50% { box-shadow: 0 0 20px 4px rgba(0, 180, 216, 0.7); }
  100% { box-shadow: 0 0 5px 1px rgba(0, 180, 216, 0.2); }
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: #E8ECF1;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s, border-bottom 0.3s;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: #00B4D8;
  border-bottom-color: #00B4D8;
}

.nav-links .join-btn a {
  background-color: #FF6B35;
  color: #0B0E14;
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-weight: 600;
  transition: background-color 0.3s, transform 0.2s;
  border-bottom: none;
}

.nav-links .join-btn a:hover {
  background-color: #f7854c;
  transform: translateY(-2px);
  border-bottom: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: #E8ECF1;
  border-radius: 2px;
  transition: all 0.3s;
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #131820;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(232, 236, 241, 0.1);
    clip-path: circle(0% at 100% 0%);
    transition: clip-path 0.4s ease-in-out;
  }
  .nav-links.active {
    clip-path: circle(141.2% at 100% 0%);
  }
  .nav-links .join-btn a {
    padding: 0.7rem 2rem;
  }
}

/* ============ HERO ============ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #0B0E14;
}

canvas#starsCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  padding: 0 2rem;
  max-width: 800px;
  margin: 0 auto;
  animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  color: #E8ECF1;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 20px rgba(0, 180, 216, 0.3);
}

.hero h1 span {
  color: #00B4D8;
}

.hero p {
  font-size: 1.25rem;
  color: rgba(232, 236, 241, 0.8);
  margin-bottom: 2.5rem;
}

.email-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.email-form input[type="email"] {
  padding: 1rem 1.5rem;
  border: 2px solid rgba(0, 180, 216, 0.3);
  border-radius: 30px;
  background-color: rgba(19, 24, 32, 0.8);
  color: #E8ECF1;
  font-size: 1rem;
  width: 100%;
  max-width: 350px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.email-form input[type="email"]:focus {
  border-color: #00B4D8;
  box-shadow: 0 0 15px rgba(0, 180, 216, 0.4);
}

.email-form button {
  background-color: #FF6B35;
  border: none;
  color: #0B0E14;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 30px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
  white-space: nowrap;
}

.email-form button:hover {
  background-color: #f7854c;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 53, 0.5);
}

@media (max-width: 600px) {
  .hero h1 { font-size: 2.5rem; }
  .hero p { font-size: 1.1rem; }
  .email-form {
    flex-direction: column;
    align-items: center;
  }
  .email-form input[type="email"] { max-width: 300px; }
}

/* ============ ABOUT US ============ */
.about {
  background-color: #131820; /* Dark Graphite */
  padding: 6rem 2rem;
  position: relative;
  overflow: hidden;
}

.about-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.about-accent {
  display: none;
  width: 4px;
  background: linear-gradient(to bottom, #00B4D8, #FF6B35);
  border-radius: 2px;
  flex-shrink: 0;
  height: 120px;
}

.about-text {
  flex: 1;
}

.about-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #00B4D8;
  margin-bottom: 1rem;
}

.about h2 {
  font-size: 2.8rem;
  font-weight: 700;
  color: #E8ECF1;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.about h2 span {
  color: #00B4D8;
}

.about-subtitle {
  font-size: 1.1rem;
  font-weight: 500;
  color: #00B4D8;
  margin-bottom: 2rem;
  border-left: 3px solid #00B4D8;
  padding-left: 1rem;
}

.about p {
  font-size: 1.15rem;
  color: rgba(232, 236, 241, 0.85);
  line-height: 1.8;
  max-width: 700px;
}

/* Animación de entrada (se activa con .visible desde JS) */
.about .about-accent,
.about .about-text {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.about.visible .about-accent,
.about.visible .about-text {
  opacity: 1;
  transform: translateX(0);
}

@media (min-width: 769px) {
  .about-accent {
    display: block;
    margin-top: 0.5rem;
  }
}

@media (max-width: 768px) {
  .about {
    padding: 4rem 1.5rem;
    text-align: center;
  }
  .about-container {
    flex-direction: column;
    align-items: center;
  }
  .about-subtitle {
    border-left: none;
    padding-left: 0;
  }
  .about h2 {
    font-size: 2.2rem;
  }
}

/* ============ MISSION ============ */
.mission {
  position: relative;
  background-color: #0B0E14;
  padding: 8rem 2rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
}

#missionCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.mission-container {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
  background-color: rgba(11, 14, 20, 0.7);
  backdrop-filter: blur(6px);
  padding: 2.5rem 2rem;
  border-radius: 16px;
  border: 1px solid rgba(0, 180, 216, 0.2);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.mission.visible .mission-container {
  opacity: 1;
  transform: translateY(0);
}

.mission-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #00B4D8;
  margin-bottom: 2rem;
  display: inline-block;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(0, 180, 216, 0.4);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.mission.visible .mission-label {
  opacity: 1;
  transform: translateY(0);
}

.mission-line {
  width: 2px;
  height: 80px;
  background: linear-gradient(to bottom, #00B4D8, transparent);
  margin: 0 auto 2rem;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.8s ease 0.4s, opacity 0.3s ease 0.4s;
}

.mission.visible .mission-line {
  opacity: 1;
  transform: scaleY(1);
}

.mission blockquote {
  border: none;
  margin: 0;
  padding: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease 0.6s, transform 0.8s ease 0.6s;
}

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

.mission p {
  font-size: 1.6rem;
  line-height: 1.8;
  color: rgba(232, 236, 241, 0.9);
  margin-bottom: 2rem;
  font-weight: 300;
}

.mission p strong,
.mission p .accent {
  color: #00B4D8;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(0,180,216,0.4);
}

.mission .emphasis {
  color: #E8ECF1;
  font-weight: 500;
  background: linear-gradient(120deg, rgba(0,180,216,0.15) 0%, rgba(0,180,216,0.25) 100%);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.mission .coral-highlight {
  color: #FF6B35;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(255,107,53,0.3);
}

@media (max-width: 768px) {
  .mission {
    padding: 6rem 1.5rem;
    min-height: auto;
  }
  .mission p {
    font-size: 1.25rem;
  }
  .mission-container {
    padding: 1.5rem;
  }
}

/* ============ PROJECTS ============ */
.projects {
  background-color: #131820;
  padding: 6rem 2rem;
  position: relative;
  overflow: hidden;
}

.projects-container {
  max-width: 1100px;
  margin: 0 auto;
}

.projects-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #00B4D8;
  margin-bottom: 1rem;
  text-align: center;
}

.projects-title {
  font-size: 3rem;
  font-weight: 700;
  color: #E8ECF1;
  text-align: center;
  margin-bottom: 0.5rem;
}

.projects-title span {
  color: #00B4D8;
}

.projects-subtitle {
  font-size: 1.3rem;
  color: #FF6B35;
  text-align: center;
  margin-bottom: 3rem;
  font-style: italic;
}

.project-content {
  display: flex;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

.project-text {
  flex: 1;
  font-size: 1.1rem;
  color: rgba(232, 236, 241, 0.85);
  line-height: 1.7;
}

.project-text strong {
  color: #00B4D8;
}

.project-visual {
  flex: 1;
  min-height: 350px;
  position: relative;
}

#projectsCanvas {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.btn-learn-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  background-color: #00B4D8;
  color: #0B0E14;
  padding: 0.8rem 1.6rem;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.2s;
  font-size: 1rem;
}

.btn-learn-more:hover {
  background-color: #2cc9e8;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 180, 216, 0.4);
}

.btn-learn-more .arrow {
  transition: transform 0.2s;
}

.btn-learn-more:hover .arrow {
  transform: translateX(4px);
}

.project-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.step {
  background-color: rgba(11, 14, 20, 0.5);
  border: 1px solid rgba(0, 180, 216, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.step:hover {
  transform: translateY(-5px);
  border-color: #00B4D8;
}

.step-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 1rem;
}

.step-icon svg {
  width: 100%;
  height: 100%;
}

.step h4 {
  color: #E8ECF1;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.step p {
  color: rgba(232, 236, 241, 0.7);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .project-content {
    flex-direction: column;
  }
  .project-steps {
    grid-template-columns: 1fr 1fr;
  }
  .projects-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 480px) {
  .project-steps {
    grid-template-columns: 1fr;
  }
}

/* ============ JOIN THE MISSION ============ */
.join {
  background-color: #0B0E14;
  padding: 6rem 2rem;
  text-align: center;
}

.join-container {
  max-width: 750px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.join.visible .join-container {
  opacity: 1;
  transform: translateY(0);
}

.join-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #00B4D8;
  margin-bottom: 1.5rem;
  display: inline-block;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(0, 180, 216, 0.4);
}

.join-headline {
  font-size: 2.8rem;
  font-weight: 700;
  color: #E8ECF1;
  line-height: 1.3;
  margin-bottom: 2.5rem;
}

.join-text {
  text-align: left;
  font-size: 1.15rem;
  color: rgba(232, 236, 241, 0.85);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.join-text p {
  margin-bottom: 1.5rem;
}

.join-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, #00B4D8, #FF6B35);
  margin: 0 auto 3rem;
  border-radius: 2px;
}

.join-signup h3 {
  font-size: 1.6rem;
  color: #E8ECF1;
  margin-bottom: 1rem;
}

.join-privacy-note {
  font-size: 0.95rem;
  color: rgba(232, 236, 241, 0.6);
  margin-bottom: 1rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.join-privacy-claim {
  font-size: 1.1rem;
  font-weight: 600;
  color: #FF6B35;
  margin-bottom: 1.5rem;
}

.join-privacy-promise {
  font-size: 0.95rem;
  color: rgba(232, 236, 241, 0.7);
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Formulario */
.email-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.email-input-group input[type="email"] {
  padding: 1rem 1.5rem;
  border: 2px solid rgba(0, 180, 216, 0.3);
  border-radius: 30px;
  background-color: rgba(19, 24, 32, 0.9);
  color: #E8ECF1;
  font-size: 1rem;
  width: 100%;
  max-width: 380px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.email-input-group input[type="email"]:focus {
  border-color: #00B4D8;
  box-shadow: 0 0 15px rgba(0, 180, 216, 0.4);
}

/* Checkbox personalizado */
.consent-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: rgba(232, 236, 241, 0.8);
  user-select: none;
}

.consent-checkbox input {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 180, 216, 0.5);
  border-radius: 4px;
  display: inline-block;
  position: relative;
  transition: background-color 0.3s, border-color 0.3s;
}

.consent-checkbox input:checked + .checkmark {
  background-color: #00B4D8;
  border-color: #00B4D8;
}

.consent-checkbox input:checked + .checkmark::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid #0B0E14;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.btn-join {
  background-color: #FF6B35;
  border: none;
  color: #0B0E14;
  height: 50%;
  font-weight: 600;
  padding: 1rem 2.5rem;
  border-radius: 30px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
}

.btn-join:hover {
  background-color: #f7854c;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 53, 0.5);
}

.join-footer-note {
  font-size: 0.8rem;
  color: rgba(232, 236, 241, 0.4);
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .join-headline {
    font-size: 2rem;
  }
  .join-text {
    text-align: center;
  }
}

/* Mensajes de formulario */
.form-message {
  margin-top: 1rem;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-align: center;
}
.form-message-success {
  background-color: rgba(0, 180, 216, 0.15);
  color: #00B4D8;
}
.form-message-error {
  background-color: rgba(255, 107, 53, 0.15);
  color: #FF6B35;
}

/* ============ FOOTER ============ */
.footer {
  background-color: #131820;
  border-top: 1px solid rgba(0, 180, 216, 0.2);
  padding: 2rem 2rem 1.5rem;
  color: rgba(232, 236, 241, 0.8);
  text-align: center;
}

.footer-main {
  max-width: 1100px;
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-email {
  color: #00B4D8;
  text-decoration: none;
  font-size: 0.95rem;
  transition: opacity 0.3s;
}

.footer-email:hover {
  opacity: 0.8;
}

.footer-socials {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  justify-content: center;
}

.footer-socials a {
  color: rgba(232, 236, 241, 0.7);
  transition: color 0.3s, transform 0.2s;
  display: flex;
  align-items: center;
}

.footer-socials a:hover {
  color: #00B4D8;
  transform: translateY(-2px);
}

.footer-esa {
  flex-shrink: 0;
}

.esa-logo {
  height: 40px;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.esa-logo:hover {
  opacity: 1;
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(232, 236, 241, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(232, 236, 241, 0.4);
}

@media (max-width: 768px) {
  .footer-main {
    flex-direction: column;
    gap: 1.2rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
