/* Advanced Linear-inspired design system for Buidl Land Presentation */

:root {
  /* Enhanced vibrant gradients */
  --gradient-1: #4338ca;
  --gradient-2: #6d28d9;
  --gradient-3: #06b6d4;
  --gradient-4: #10b981;
  --gradient-5: #8b5cf6;
  --gradient-accent: #f472b6;

  /* Card styling */
  --card-bg: rgba(15, 15, 25, 0.65);
  --card-border: rgba(255, 255, 255, 0.12);
  --card-border-hover: rgba(255, 255, 255, 0.35);
  --glass-blur: 20px;

  /* Text colors */
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.45);
}

body {
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background-color: #080814;
}

/* Cosmic space background */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    125deg,
    #050c2e 0%,
    #0c1445 25%,
    #0a0a2a 50%,
    #030b30 75%,
    #02082d 100%
  );
  opacity: 1;
  z-index: -10;
}

/* Stars effect overlay */
.stars-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.9), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.8), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 50px 160px, rgba(255, 255, 255, 0.7), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 90px 40px, rgba(255, 255, 255, 0.8), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 130px 80px, rgba(255, 255, 255, 0.9), rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 160px 120px, rgba(255, 255, 255, 0.7), rgba(0, 0, 0, 0));
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: 0.5;
  z-index: -9;
  animation: stars-move 100s linear infinite;
}

/* Space nebula effect */
.nebula-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(67, 26, 143, 0.2) 0%, transparent 70%),
    radial-gradient(ellipse at 80% 40%, rgba(47, 0, 255, 0.2) 0%, transparent 70%),
    radial-gradient(ellipse at 10% 80%, rgba(184, 0, 161, 0.2) 0%, transparent 70%),
    radial-gradient(ellipse at 90% 10%, rgba(0, 204, 255, 0.2) 0%, transparent 70%),
    radial-gradient(ellipse at 50% 60%, rgba(60, 0, 255, 0.2) 0%, transparent 70%);
  opacity: 0.7;
  z-index: -8;
  filter: blur(20px);
  animation: nebula-pulse 15s ease-in-out infinite alternate;
}

@keyframes stars-move {
  from { background-position: 0 0; }
  to { background-position: 1000px 1000px; }
}

@keyframes nebula-pulse {
  0% {
    opacity: 0.5;
    filter: blur(20px) hue-rotate(0deg);
  }
  50% {
    opacity: 0.7;
    filter: blur(25px) hue-rotate(30deg);
  }
  100% {
    opacity: 0.5;
    filter: blur(20px) hue-rotate(60deg);
  }
}

/* SVG wave background */
.wave-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='rgba(255, 255, 255, 0.05)' fill-opacity='1' d='M0,64L48,80C96,96,192,128,288,128C384,128,480,96,576,90.7C672,85,768,107,864,122.7C960,139,1056,149,1152,138.7C1248,128,1344,96,1392,80L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: cover;
  z-index: -7;
  opacity: 0.5;
  animation: waveFloat 15s ease-in-out infinite alternate;
}

@keyframes waveFloat {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.3;
  }
  100% {
    transform: translateY(-30px) scale(1.1);
    opacity: 0.5;
  }
}

/* SVG circuit pattern background */
.circuit-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='rgba(255, 255, 255, 0.05)'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-position: center;
  z-index: -8;
  opacity: 0.4;
  mix-blend-mode: screen;
  animation: circuitPulse 8s ease infinite alternate;
}

@keyframes circuitPulse {
  0% {
    opacity: 0.3;
    background-position: 0% 0%;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 0.3;
    background-position: 100% 100%;
  }
}

/* Enhanced noise texture overlay */
.noise {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJhIiB4PSIwIiB5PSIwIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iLjc1IiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjwvZmlsdGVyPjxwYXRoIGZpbHRlcj0idXJsKCNhKSIgb3BhY2l0eT0iLjA1IiBkPSJNMCAwaDMwMHYzMDBIMHoiLz48L3N2Zz4=');
  opacity: 0.4;
  z-index: -6;
  pointer-events: none;
}

/* Enhanced grid background */
.grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -9;
  opacity: 0.4;
  animation: gridPulse 15s ease infinite;
}

@keyframes gridPulse {
  0% {
    opacity: 0.35;
    background-size: 50px 50px;
  }
  50% {
    opacity: 0.45;
    background-size: 52px 52px;
  }
  100% {
    opacity: 0.35;
    background-size: 50px 50px;
  }
}

/* Particles effect */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -5;
}

.particle {
  position: absolute;
  display: block;
  background: rgba(255, 255, 255, 0.5);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  animation: particleFloat 25s infinite linear;
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(-100vh) translateX(100vw);
    opacity: 0;
  }
}

/* Enhanced glassmorphism card with flow effect */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  border-radius: 1.2rem;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.05) 30%,
    rgba(255,255,255,0.1) 50%,
    rgba(255,255,255,0) 70%
  );
  transform: rotate(30deg);
  opacity: 0;
  transition: all 0.8s ease;
}

.glass-card:hover {
  transform: translateY(-7px);
  border-color: var(--card-border-hover);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.5);
}

.glass-card:hover::before {
  animation: cardShine 1.5s forwards;
  opacity: 1;
}

@keyframes cardShine {
  0% { transform: rotate(30deg) translate(-30%, -30%); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: rotate(30deg) translate(30%, 30%); opacity: 0; }
}

/* Enhanced gradient text with glow */
.gradient-text {
  background: linear-gradient(
    90deg,
    var(--text-primary) 0%,
    var(--text-secondary) 50%,
    var(--text-primary) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
  animation: textGradientShift 8s ease infinite alternate;
}

@keyframes textGradientShift {
  0% {
    background-position: 0% center;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  }
  50% {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  }
  100% {
    background-position: 100% center;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  }
}

/* Text blur effect */
.text-blur {
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  animation: textBlur 3s ease-in-out infinite alternate;
}

@keyframes textBlur {
  0% {
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
  }
  100% {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  }
}

/* Enhanced animations */
@keyframes shine {
  0% { transform: rotate(30deg) translate(-30%, -30%); }
  100% { transform: rotate(30deg) translate(30%, 30%); }
}

@keyframes floating {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-10px) rotate(-1deg); }
  50% { transform: translateY(-20px) rotate(0deg); }
  75% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.95); }
}

.floating {
  animation: floating 8s ease-in-out infinite;
}

.pulse {
  animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Enhanced hover glow effect */
.hover-glow {
  transition: all 0.3s ease;
  position: relative;
}

.hover-glow::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  transition: all 0.3s ease;
}

.hover-glow:hover::after {
  box-shadow: 0 0 20px 5px rgba(255, 255, 255, 0.2);
}

/* Enhanced CTA Button */
.cta-button {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  position: relative;
  overflow: hidden;
  color: var(--text-primary);
  cursor: pointer;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  z-index: -1;
  background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2), var(--gradient-3), var(--gradient-4));
  background-size: 400%;
  border-radius: 2.2rem;
  opacity: 0;
  transition: 0.5s;
}

.cta-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px) scale(1.05);
  color: white;
}

.cta-button:hover::before {
  opacity: 1;
  animation: backgroundGradientAnimation 5s infinite alternate;
}

@keyframes backgroundGradientAnimation {
  0% {
    background-position: 0% 50%;
    opacity: 0.5;
  }
  50% {
    background-position: 100% 50%;
    opacity: 1;
  }
  100% {
    background-position: 0% 50%;
    opacity: 0.5;
  }
}

/* Enhanced icon containers */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.icon-box::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
  opacity: 0;
  transition: all 0.3s ease;
  transform: scale(0.5);
}

.icon-box:hover {
  transform: scale(1.15) rotate(5deg);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.icon-box:hover::after {
  opacity: 1;
  transform: scale(1.2);
}

/* Glowing border */
.glow-border {
  position: relative;
  border-radius: 1rem;
  padding: 1px;
}

.glow-border::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--gradient-1), var(--gradient-2), var(--gradient-3), var(--gradient-accent));
  background-size: 400%;
  border-radius: 1.2rem;
  z-index: -1;
  animation: borderGlow 5s linear infinite;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

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

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

/* Animated divider */
.divider {
  height: 1px;
  width: 100%;
  margin: 1.5rem 0;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.divider::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%);
  animation: dividerFlow 3s linear infinite;
}

@keyframes dividerFlow {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Dynamic hover reveal */
.reveal-item {
  position: relative;
  overflow: hidden;
}

.reveal-content {
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0;
  transform: translateY(20px);
}

.reveal-item:hover .reveal-content {
  opacity: 1;
  transform: translateY(0);
}

/* Vibrant tag */
.vibrant-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.vibrant-tag::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transform: rotate(30deg);
  animation: tagShine 3s linear infinite;
}

@keyframes tagShine {
  0% {
    transform: rotate(30deg) translate(-100%, -100%);
  }
  100% {
    transform: rotate(30deg) translate(100%, 100%);
  }
}

/* Subtle animated underline */
.animated-underline {
  position: relative;
  display: inline-block;
  padding-bottom: 3px;
}

.animated-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: linear-gradient(90deg, transparent, var(--text-primary), transparent);
  transition: width 0.5s ease;
}

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

/* Loading dots animation */
.loading-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.loading-dots .dot {
  width: 8px;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  animation: dotPulse 1.5s ease-in-out infinite;
}

.loading-dots .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* Animation utility classes for staggered reveal */
.stagger-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stagger-fade-in.active {
  opacity: 1;
  transform: translateY(0);
}

/* Comparison row animation states */
.comparison-row {
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.comparison-row.active {
  opacity: 1;
  transform: translateY(0);
}

/* Reveal animation for scrolling content */
.reveal-on-visible {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* Star burst animation */
.star-burst {
  position: absolute;
  background-color: white;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  z-index: 5;
  pointer-events: none;
  animation: starBurst 1.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes starBurst {
  0% {
    transform: scale(0);
    opacity: 0;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
  }
  20% {
    transform: scale(1.5);
    opacity: 1;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8);
  }
  100% {
    transform: scale(0);
    opacity: 0;
    box-shadow: 0 0 40px 10px rgba(255, 255, 255, 0);
  }
}

/* Gradient heading variants */
.gradient-heading {
  background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}