/* ============================================
   Zoteria Systems — Design System
   Clean · Bold · Dark · Galaxy
   ============================================ */

html {
  scroll-behavior: smooth;
}

body {
  font-feature-settings: "ss01", "ss02", "cv01";
  overflow-x: hidden;
}

/* ---------- Starfield ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, rgba(255,255,255,0.18), transparent),
    radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.12), transparent),
    radial-gradient(1.5px 1.5px at 50px 160px, rgba(255,255,255,0.14), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.1), transparent),
    radial-gradient(1.5px 1.5px at 130px 80px, rgba(255,255,255,0.09), transparent),
    radial-gradient(1px 1px at 160px 120px, rgba(255,255,255,0.12), transparent),
    radial-gradient(1.2px 1.2px at 210px 50px, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 250px 180px, rgba(255,255,255,0.08), transparent);
  background-size: 280px 220px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.55;
  animation: starDrift 120s linear infinite;
}

@keyframes starDrift {
  from { background-position: 0 0; }
  to { background-position: 280px 220px; }
}

/* ---------- Ambient orbs (gentle float) ---------- */
.orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(100px);
  pointer-events: none;
  will-change: transform;
}

.orb-1 {
  animation: floatA 18s ease-in-out infinite;
}

.orb-2 {
  animation: floatB 22s ease-in-out infinite;
}

.orb-3 {
  animation: floatC 26s ease-in-out infinite;
}

@keyframes floatA {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.9; }
  33% { transform: translate(8%, 10%) scale(1.12); opacity: 1; }
  66% { transform: translate(-6%, 5%) scale(0.92); opacity: 0.85; }
}

@keyframes floatB {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.9; }
  40% { transform: translate(-10%, -8%) scale(1.15); opacity: 1; }
  70% { transform: translate(6%, -4%) scale(0.9); opacity: 0.8; }
}

@keyframes floatC {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.85; }
  50% { transform: translate(9%, -9%) scale(1.14); opacity: 1; }
}

/* ---------- Header ---------- */
.site-header {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  background-color: rgba(5, 1, 10, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Logo subtle glow on hover */
.logo-text {
  transition: filter 0.4s ease;
}

.logo-text:hover {
  filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.45));
}

/* Nav links */
.nav-link {
  position: relative;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1.5px;
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
  transition: width 0.3s ease;
  border-radius: 1px;
}

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

/* ---------- Buttons ---------- */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.12);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-gradient {
  position: relative;
  overflow: hidden;
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.35);
  opacity: 0.95;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.btn-ghost {
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.btn-ghost:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ---------- Cards ---------- */
.card {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s ease,
              box-shadow 0.35s ease,
              background 0.35s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(139, 92, 246, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

.card-icon {
  transition: transform 0.35s ease, background 0.35s ease;
}

.card:hover .card-icon {
  transform: scale(1.08);
}

/* Systems layer cards */
.layer-card {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s ease,
              box-shadow 0.35s ease;
}

.layer-card:hover {
  transform: translateY(-8px) scale(1.01);
}

.layer-card.featured {
  box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.35), 0 20px 50px rgba(236, 72, 153, 0.18);
}
.layer-card.featured:hover {
  box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.5), 0 24px 56px rgba(236, 72, 153, 0.28);
  border-color: rgba(236, 72, 153, 0.45);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Hero entrance */
.hero-badge {
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.hero-title {
  animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.hero-sub {
  animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

.hero-cta {
  animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

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

/* Gradient text — continuous morph (no hard sweep line) */
.gradient-text {
  background-image: linear-gradient(
    90deg,
    #8b5cf6 0%,
    #d946ef 25%,
    #ec4899 40%,
    #22d3ee 60%,
    #6366f1 80%,
    #8b5cf6 100%
  );
  background-size: 300% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: textMorph 12s ease-in-out infinite;
}

@keyframes textMorph {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ---------- Form polish ---------- */
input, select, textarea {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
  background: rgba(255, 255, 255, 0.055) !important;
}

input:hover, select:hover, textarea:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a78bfa'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.1rem;
}

/* Success state */
#success-message {
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ---------- Details / FAQ ---------- */
details summary {
  transition: color 0.2s ease;
}

details[open] summary {
  color: #fff;
}

details summary span {
  transition: transform 0.25s ease;
}

details[open] summary span {
  transform: rotate(45deg);
}

/* ---------- Mobile menu ---------- */
#mobile-menu {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Utility ---------- */
.page-enter {
  animation: fadeUp 0.5s ease-out;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
