body {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  background: beige;
}

/* Grid-based rocket sections */
.rocket-item {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: grid;
  grid-template-columns: 50% 50%;
  align-items: center;
  background: beige;
  overflow: hidden;
  /* Initial hidden state for scroll animation */
  opacity: 0;
  transform: translateY(60px);
  will-change: opacity, transform;
}

/* First rocket (Spectre) fades in immediately on page load */
.rocket-item[data-rocket="spectre"] {
  animation: rocketFadeIn 1.8s cubic-bezier(.25,.8,.25,1) forwards;
}

/* Vanguard and Stallion fade in when scrolled into view (JS adds .visible class) */
.rocket-item.visible {
  animation: rocketFadeIn 1.8s cubic-bezier(.25,.8,.25,1) forwards;
}

@keyframes rocketFadeIn {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reverse layout for Stallion (image left, content right) */
.rocket-item.rocket-reverse {
  grid-template-columns: 50% 50%;
}

.rocket-item.rocket-reverse .rocket-content {
  align-items: flex-end;
  text-align: right;
  padding: 3rem 4rem 3rem 12rem; /* increased left padding to position content more toward middle */
}

.rocket-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 12rem 3rem 4rem; /* increased right padding to position content more toward middle */
  z-index: 2;
}

.rocket-image-container {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rocket-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.rocket-title {
  font-size: 3.2rem;
  font-weight: 900;
  color: #1a2236;
  margin-bottom: 1.2rem;
  opacity: 0;
  transform: translateY(40px);
  will-change: opacity, transform;
  animation: slideUpTitle 1.2s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  animation-delay: 0.3s;
}

.rocket-text {
  font-size: 1rem;
  font-weight: 400;
  color: #333;
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 75%; /* 75% of original width */
  opacity: 0;
  transform: translateY(30px);
  will-change: opacity, transform;
  animation: slideUpText 1.2s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  animation-delay: 0.5s;
}

.rocket-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  transform: translateY(30px);
  will-change: opacity, transform;
  animation: slideUpBtn 1.2s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  animation-delay: 0.7s;
}

.rocket-btn {
  display: inline-block;
  border: none;
  border-radius: 9px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  will-change: transform;
}

.rocket-btn-primary {
  background: #efbf04;
  color: #111;
  padding: 0.75rem 1.6rem;
  font-size: 0.95rem;
  box-shadow: 0 4px 16px rgba(239, 191, 4, 0.3);
}

.rocket-btn-primary:hover {
  background: #bfa103;
  color: #fff;
  transform: translateY(-2px);
}

.rocket-btn-secondary {
  background: #fff;
  color: #efbf04;
  border: 2px solid #efbf04;
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.rocket-btn-secondary:hover {
  background: #efbf04;
  color: #fff;
  transform: translateY(-2px);
}

@keyframes slideUpTitle {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideUpText {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideUpBtn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive design */
@media (max-width: 900px) {
  .rocket-item,
  .rocket-item.rocket-reverse {
    grid-template-columns: 1fr;
    grid-template-rows: auto 45vh;
    min-height: auto;
    margin-bottom: 0;
  }
  /* Add top margin to first rocket to avoid navbar overlap */
  .rocket-item:first-child {
    margin-top: 8rem;
  }
  /* Remove bottom margin from last rocket to eliminate footer gap */
  .rocket-item:last-child {
    margin-bottom: 0;
  }
  .rocket-content,
  .rocket-item.rocket-reverse .rocket-content {
    padding: 2rem 2rem;
    align-items: center;
    text-align: center;
    order: 1;
  }
  .rocket-image-container {
    height: 45vh;
    order: 2;
  }
  .rocket-title {
    font-size: 2.5rem;
  }
  .rocket-text {
    font-size: 0.95rem;
    max-width: 100%;
  }
  .rocket-buttons {
    flex-direction: row;
    gap: 0.8rem;
    width: auto;
    justify-content: center;
  }
  .rocket-btn-primary,
  .rocket-btn-secondary {
    flex: 0 0 auto;
    text-align: center;
    max-width: 160px;
    width: auto;
    padding: 0.75rem 1.2rem;
  }
}

@media (max-width: 600px) {
  .rocket-content {
    padding: 1.5rem 1.5rem;
  }
  .rocket-title {
    font-size: 2rem;
  }
  .rocket-text {
    font-size: 0.9rem;
  }
  .rocket-btn-primary {
    font-size: 0.85rem;
    padding: 0.7rem 1.1rem;
    max-width: 140px;
  }
  .rocket-btn-secondary {
    font-size: 0.8rem;
    padding: 0.55rem 1rem;
    max-width: 140px;
  }
  .rocket-image-container {
    height: 35vh;
  }
  .rocket-buttons {
    flex-direction: row;
    gap: 0.7rem;
    justify-content: center;
  }
}

@media (max-width: 500px) {
  .rocket-content {
    padding: 1.5rem 1rem;
  }
  .rocket-title {
    font-size: 1.7rem;
  }
  .rocket-text {
    font-size: 0.85rem;
    line-height: 1.6;
  }
  .rocket-btn-primary {
    font-size: 0.8rem;
    padding: 0.65rem 1.2rem;
  }
  .rocket-btn-secondary {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
  }
  .rocket-image-container {
    height: 35vh;
  }
}
