@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  html {
    font-family: 'Roboto', sans-serif;
    scroll-behavior: smooth;
  }
  h1, h2, h3, h4, h5, h6 {
     text-shadow: 1px 1px 0px rgba(0,0,0,0.05);
  }
}

/* Custom Cursor */
body, button, a {
  cursor: none;
}

.cursor-dot {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  will-change: transform;
  z-index: 9999;
  width: 8px;
  height: 8px;
  background-color: #c084fc; /* purple-400 */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background-color: #f1f5f9; /* slate-100 */
}
::-webkit-scrollbar-thumb {
  background-color: #9333ea; /* purple-600 */
  border-radius: 10px;
  border: 2px solid #f1f5f9; /* slate-100 */
}
::-webkit-scrollbar-thumb:hover {
  background-color: #a855f7; /* purple-500 */
}

/* Header Scroll Effect */
#main-header.scrolled {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

#header-wrapper {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#main-header.scrolled #header-wrapper {
  max-width: 64rem; 
  margin-left: auto;
  margin-right: auto;
  border-radius: 9999px;
  border-width: 1px;
  border-color: theme('colors.slate.200');
  background-color: theme('colors.white');
  box-shadow: theme('boxShadow.lg');
  backdrop-filter: none;
}

#main-header.scrolled #header-wrapper > div {
    height: 3.5rem; /* h-14 */
    padding-left: 1rem;
    padding-right: 1rem;
}

#main-header.scrolled a[href="#contact"] {
    background-color: theme('colors.purple.600');
    box-shadow: none;
}
#main-header.scrolled a[href="#contact"]:hover {
    background-color: theme('colors.purple.700');
}


/* Custom Hover Animations */
.nav-link-underline {
  position: relative;
}

.nav-link-underline::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #a855f7; /* purple-500 */
  transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Contact Section Glow */
#contact {
  position: relative;
  z-index: 1;
}

#contact::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60rem; /* 960px */
  height: 60rem; /* 960px */
  background-image: radial-gradient(circle, theme('colors.purple.500' / 0.1), transparent 60%);
  z-index: -1;
  pointer-events: none;
}


/* Hero Background subtle zoom */
.hero-bg-animate {
  animation: zoom-in-out 30s ease-in-out infinite alternate;
}

@keyframes zoom-in-out {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

/* Entry Animations */
.animate-fade-in-up > span {
  display: block;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  filter: blur(5px);
}

.page-loaded .animate-fade-in-up > span {
  animation: fade-in-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.page-loaded .animate-fade-in-up > span:nth-child(2) {
  animation-delay: 0.15s;
}

.page-loaded .animate-fade-in-up > span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes fade-in-up {
    from { 
      opacity: 0; 
      transform: translateY(20px) scale(0.98);
      filter: blur(5px);
    }
    to { 
      opacity: 1; 
      transform: translateY(0) scale(1);
      filter: blur(0);
    }
}

/* Hero Word Highlight */
.highlight-word {
  position: relative;
  display: inline-block;
}

.highlight-bg {
  position: absolute;
  inset: -0.1em -0.25em -0.15em -0.25em; /* top right bottom left */
  background-color: #9333ea; /* purple-600 */
  transform: scaleX(0);
  transform-origin: left;
  z-index: 0;
}

.page-loaded .highlight-bg {
  animation: reveal-highlight 0.5s cubic-bezier(0.86, 0, 0.07, 1) forwards;
  animation-delay: 0.4s;
}

@keyframes reveal-highlight {
  from { transform: scaleX(0); transform-origin: left; }
  to { transform: scaleX(1); transform-origin: left; }
}


/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out, filter 0.8s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animation-delay-200 { transition-delay: 200ms !important; }
.animation-delay-300 { transition-delay: 300ms !important; }
.animation-delay-400 { transition-delay: 400ms !important; }
.animation-delay-600 { transition-delay: 600ms !important; }

/* Marquee Animation */
.animate-marquee-slow {
  animation: marquee-slow 40s linear infinite;
}

@keyframes marquee-slow {
  from { transform: translateX(0%); }
  to { transform: translateX(-100%); }
}

.logo-partner {
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease-in-out;
}
.logo-partner:hover {
  /* This is the purple filter */
  filter: grayscale(1) brightness(0.5) sepia(1) hue-rotate(220deg) saturate(8);
}

/* Custom Header Animations */
@keyframes shrink-in {
  from {
    transform: translateY(-100%);
    opacity: 0.5;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes expand-in {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-shrink-in {
  animation: shrink-in 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-expand-in {
  animation: expand-in 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Custom Select Form Styling */
.custom-select:required:invalid {
  color: #94a3b8; /* slate-400 */
}
option[value=""][disabled] {
  display: none;
}
option {
  color: #1e293b; /* slate-800 */
}

/* Pre-loader Styles */
#app {
  transition: opacity 1s ease-in-out;
}

#preloader {
  background-color: #2c1c58;
  background-image: 
    radial-gradient(circle at center, #4c2f99, #2c1c58 70%),
    radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 50% 70%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(2px 2px at 90% 60%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(2px 2px at 10% 90%, rgba(255, 255, 255, 0.5), transparent);
  background-repeat: repeat;
  background-size: 100% 100%, 300px 300px, 300px 300px, 300px 300px, 300px 300px, 300px 300px;
  animation: twinkle 15s linear infinite;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  perspective: 1000px;
}

@keyframes twinkle {
    from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
    to { background-position: 0 0, -300px 300px, -300px 300px, -300px 300px, -300px 300px, -300px 300px; }
}

#preloader.fade-out {
  opacity: 0;
}

#preloader.fade-out #saturn-system {
  animation: zoom-out-exit 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes zoom-out-exit {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(1.5); opacity: 0; }
}

#saturn-system {
  animation: system-entry 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes system-entry {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

#preloader-saturn {
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    }
}

.orbit {
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  transform-style: preserve-3d;
  animation: orbit var(--duration) linear infinite;
  animation-delay: var(--delay);
}

@keyframes orbit {
  from { transform: rotateZ(0deg) rotateY(var(--rotationY, 70deg)); }
  to { transform: rotateZ(360deg) rotateY(var(--rotationY, 70deg)); }
}

.moon {
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: #e5e7eb; /* gray-200 */
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
  opacity: 0.7;
}
