/* ============================================
   Harmony Landing Page — SOTA 2026 Design System
   Aurora effects, glassmorphism, bento grids
   ============================================ */

/* ---- Base ---- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(90, 78, 234, 0.35);
  color: #fff;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(90, 78, 234, 0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(90, 78, 234, 0.4); }

/* ---- Noise Texture Overlay ---- */
.noise::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ---- Aurora Mesh Background ---- */
.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform;
}

.aurora-blob-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(90, 78, 234, 0.18) 0%, transparent 70%);
  top: -15%; left: -10%;
  animation: auroraFloat1 20s ease-in-out infinite;
}

.aurora-blob-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(21, 212, 200, 0.12) 0%, transparent 70%);
  top: 20%; right: -5%;
  animation: auroraFloat2 25s ease-in-out infinite;
}

.aurora-blob-3 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(90, 78, 234, 0.1) 0%, transparent 70%);
  bottom: -10%; left: 30%;
  animation: auroraFloat3 22s ease-in-out infinite;
}

@keyframes auroraFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, 40px) scale(1.1); }
  66% { transform: translate(-30px, 20px) scale(0.95); }
}

@keyframes auroraFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-40px, 30px) scale(0.9); }
  66% { transform: translate(20px, -40px) scale(1.05); }
}

@keyframes auroraFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-50px, 10px) scale(0.95); }
}

/* ---- Glass Card ---- */
.glass {
  background: rgba(26, 26, 36, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-strong {
  background: rgba(26, 26, 36, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---- Gradient Border ---- */
.gradient-border {
  position: relative;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(21, 212, 200, 0.3), rgba(90, 78, 234, 0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.gradient-border:hover::before {
  opacity: 1;
}

/* ---- Glow Effects ---- */
.glow-primary {
  box-shadow: 0 0 60px rgba(90, 78, 234, 0.15), 0 0 120px rgba(90, 78, 234, 0.05);
}

.glow-accent {
  box-shadow: 0 0 60px rgba(21, 212, 200, 0.12), 0 0 120px rgba(21, 212, 200, 0.04);
}

/* ---- Keyframe Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideLeft {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideRight {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulseSoft {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

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

/* ---- Reveal Animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal[style*="animation-delay"] {
  transition-delay: var(--delay, 0s);
}

/* ---- Navbar Scroll State ---- */
#navbar {
  background: transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
}

#navbar.scrolled {
  background: rgba(11, 11, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* ---- Hero Grid ---- */
.hero-grid {
  background-image:
    linear-gradient(rgba(90, 78, 234, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 78, 234, 0.06) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, black 20%, transparent 100%);
}

/* ---- Bento Card ---- */
.bento-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease;
}

.bento-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.bento-card .card-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(90, 78, 234, 0), transparent);
  transition: background 0.5s ease;
}

.bento-card:hover .card-glow {
  background: linear-gradient(90deg, transparent, rgba(21, 212, 200, 0.5), rgba(90, 78, 234, 0.5), transparent);
}

/* ---- Comparison Table ---- */
@media (max-width: 640px) {
  #comparison table { font-size: 0.75rem; }
  #comparison th,
  #comparison td { padding: 0.75rem 0.5rem; }
}

/* ---- Code Inline ---- */
code {
  font-family: 'JetBrains Mono Variable', 'Fira Code', monospace;
}

/* ---- Form States ---- */
.form-success { animation: fadeIn 0.4s ease-out; }
.form-error { border-color: #ef4444 !important; }
.form-error-message {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  animation: fadeIn 0.3s ease-out;
}

/* ---- Smooth Anchor Offset ---- */
section[id] { scroll-margin-top: 80px; }

/* ---- FAQ ---- */
details summary { list-style: none; }
details summary::-webkit-details-marker { display: none; }
details[open] summary {
  border-bottom: 1px solid rgba(42, 42, 56, 0.5);
  padding-bottom: 1rem;
}
details[open] > div { animation: fadeIn 0.3s ease-out; }

/* ---- Pricing Toggle ---- */
#pricing-toggle { transition: background-color 0.2s ease; }
#pricing-toggle-dot { transition: transform 0.2s ease; }

/* ---- Gradient Button ---- */
.btn-gradient {
  background: linear-gradient(135deg, #5A4EEA 0%, #7B6CF6 50%, #5A4EEA 100%);
  background-size: 200% auto;
  transition: background-position 0.4s ease, box-shadow 0.4s ease, transform 0.15s ease;
}

.btn-gradient:hover {
  background-position: right center;
  box-shadow: 0 8px 32px rgba(90, 78, 234, 0.35);
}

.btn-gradient:active {
  transform: scale(0.98);
}

/* ---- Animated Gradient Text ---- */
.gradient-text-animated {
  background: linear-gradient(135deg, #15D4C8, #5A4EEA, #15D4C8);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease-in-out infinite;
}

/* ---- Pricing Highlighted Card ---- */
.pricing-highlight {
  position: relative;
}

.pricing-highlight::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, #15D4C8, #5A4EEA);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---- Focus Visible ---- */
:focus-visible {
  outline: 2px solid #15D4C8;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Print ---- */
@media print {
  body { background: white; color: black; }
  #navbar, .aurora, .noise::before, [class*="blur"] { display: none; }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .aurora-blob { animation: none !important; }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
