* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #05030A;
  color: #fff;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  cursor: none;
}

@media (max-width: 1023px) {
  body {
    cursor: auto !important;
  }
}

/* Custom Star Cursor */
#customCursor {
  position: fixed;
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, transform 0.1s ease-out;
}

@media (max-width: 1023px) {
  #customCursor {
    display: none !important;
  }
}

#customCursor svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 5px #FFFFFF);
}

/* Hide cursor on interactive elements and change star size */
a,
button,
[role="button"],
input,
select,
textarea {
  cursor: none;
}

@media (max-width: 1023px) {
  a, button, [role="button"], input, select, textarea {
    cursor: auto !important;
  }
}

.cursor-hover #customCursor {
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%) scale(1.2);
}

/* Star canvas */
#starCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Nebula blobs */
.nebula {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

/* Fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* Navbar scrolled */
.nav-scrolled {
  background: rgba(35, 17, 52, .85) !important;
  backdrop-filter: blur(18px);
}

/* Glassmorphism card */
.glass {
  background: rgba(35, 17, 52, .5);
  border: 1px solid rgba(101, 63, 132, .35);
  backdrop-filter: blur(12px);
}

/* CubeSat float */
@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-18px);
  }
}

.cubesat-wrap {
  animation: float 5s ease-in-out infinite;
}

/* Orbit rings */
@keyframes spin {
  from {
    transform: rotateZ(0deg);
  }

  to {
    transform: rotateZ(360deg);
  }
}

@keyframes spinRev {
  from {
    transform: rotateZ(0deg);
  }

  to {
    transform: rotateZ(-360deg);
  }
}

.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(167, 125, 255, .18);
  animation: spin linear infinite;
}

.orbit-rev {
  animation-name: spinRev;
}

/* Glow pulse */
@keyframes glowPulse {

  0%,
  100% {
    opacity: .5;
    transform: scale(1);
  }

  50% {
    opacity: .8;
    transform: scale(1.08);
  }
}

.cubesat-glow {
  animation: glowPulse 4s ease-in-out infinite;
}

/* Marquee */
@keyframes marquee {
  0% {
    transform: translateX(0%);
  }

  100% {
    transform: translateX(-50%);
  }
}

.marquee-content {
  display: flex;
  width: max-content;
  animation: marquee 25s linear infinite;
}

.marquee-content:hover {
  animation-play-state: paused;
}

/* Gallery Marquee */
@keyframes galleryMarquee {
  0% {
    transform: translateX(0%);
  }

  100% {
    transform: translateX(-50%);
  }
}

.gallery-marquee-content {
  display: flex;
  width: max-content;
  animation: galleryMarquee 60s linear infinite;
}

.gallery-marquee-content:hover {
  animation-play-state: paused;
}

/* Rocket Launch */
@keyframes rocketLaunch {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  20% {
    transform: translateY(10px) scale(0.9);
    opacity: 1;
  }

  100% {
    transform: translateY(-100vh) scale(1);
    opacity: 0;
  }
}

.launching {
  animation: rocketLaunch 1.8s cubic-bezier(0.5, 0, 0.2, 1) forwards;
  pointer-events: none !important;
}

.rocket-visible {
  transform: translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

@media (max-width: 767px) {
  #rocketNav {
    bottom: 96px !important; /* Move above Intercom widget */
    right: 20px !important;
  }
}

/* Discover dropdown */
#discoverMenu {
  transition: opacity .2s ease, transform .2s ease;
}

/* Mobile menu */
#mobileMenu {
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
}

/* Btn old design */
.btn-primary {
  background-color: #653F84;
  transition: background-color .25s, transform .2s;
}

.btn-primary:hover {
  background-color: #52316e;
  transform: translateY(-2px);
}

.btn-secondary {
  border: 2px solid #653F84;
  transition: background-color .25s, color .25s, transform .2s;
}

.btn-secondary:hover {
  background-color: #653F84;
  transform: translateY(-2px);
}

/* Flip Card */
.flip-card {
  perspective: 1000px;
  height: 520px;
  position: relative;
  z-index: 1;
}

@media (min-width: 640px) {
  .flip-card {
    height: 540px;
  }
}

.flip-card:hover {
  z-index: 10;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 1rem;
  overflow: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
}

/* Badge */
.badge {
  background: rgba(101, 63, 132, .25);
  border: 1px solid rgba(167, 125, 255, .3);
  font-size: .7rem;
  letter-spacing: .08em;
}

/* Mobile discover icon rotation */
#mobileDiscoverIcon {
  transition: transform .3s;
}

/* Active nav link */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: #A77DFF;
  transition: width .3s;
}

.nav-link:hover::after {
  width: 100%;
}

/* Newsletter Popup */
.popup-visible {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.popup-visible #newsletterModal {
  transform: scale(1) translateY(0) !important;
}
