/* Hero Section - Form Builder Style with Patterns */

.home-hero {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  /* background: var(--color-background); */
  padding: 2rem 0;
  position: relative;
  overflow: hidden;
  max-height: 80vh;
  min-height: 500px;
  /* border: 5px solid red; */
}

@media (min-width: 768px) {
  .home-hero {
    padding: 3rem 1rem;
    min-height: 600px;
  }
}

/* Background Patterns */
.hero-patterns {
  position: absolute;
  top: 0;
  left: 0;
  width: 98%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
}

.pattern-dots {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle, var(--color-primary) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: 0 0;
  animation: patternMove 20s linear infinite;
}

.pattern-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  animation: patternMove 15s linear infinite reverse;
}

.pattern-waves {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
  background: linear-gradient(180deg, transparent, rgba(0, 123, 189, 0.05));
  clip-path: polygon(0 30%, 100% 0%, 100% 100%, 0% 100%);
}

@keyframes patternMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(40px, 40px);
  }
}

/* Decorative Floating Objects */
.hero-decorations {
  position: absolute;
  top: 0;
  left: 0;
  width: 98%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

.decoration-1 {
  width: 120px;
  height: 120px;
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.decoration-2 {
  width: 80px;
  height: 80px;
  top: 60%;
  right: 10%;
  background: var(--color-secondary);
  animation-delay: 2s;
}

.decoration-3 {
  width: 60px;
  height: 60px;
  bottom: 20%;
  left: 15%;
  background: var(--color-accent);
  animation-delay: 4s;
}

.decoration-star {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 10px solid var(--color-primary);
  opacity: 0.15;
  animation: float 8s ease-in-out infinite;
  transform: rotate(35deg);
}

.decoration-star::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 10px solid var(--color-primary);
  transform: rotate(-70deg);
  top: -10px;
  left: -15px;
}

.decoration-star::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 10px solid var(--color-primary);
  transform: rotate(70deg);
  top: -10px;
  left: -15px;
}

.decoration-4 {
  top: 30%;
  right: 20%;
  animation-delay: 1s;
}

.decoration-5 {
  bottom: 30%;
  right: 5%;
  animation-delay: 3s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

/* SVG Decorative Element */
.hero-svg-decoration {
  position: absolute;
  top: 50%;
  right: -100px;
  transform: translateY(-50%);
  opacity: 0.08;
  z-index: 2;
  pointer-events: none;
  animation: svgFloat 10s ease-in-out infinite;
}

@media (min-width: 1024px) {
  .hero-svg-decoration {
    right: -50px;
    opacity: 0.12;
  }
}

.hero-svg {
  width: 300px;
  height: auto;
  filter: blur(1px);
}

@keyframes svgFloat {
  0%, 100% {
    transform: translateY(-50%) rotate(0deg);
  }
  50% {
    transform: translateY(-60%) rotate(5deg);
  }
}

.hero-container {
  max-width: 42rem; /* max-w-2xl = 672px */
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 10;
  padding: 1rem 0;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  position: relative;
  z-index: 10;
}

/* Illustration */
.hero-illustration {
  margin-bottom: 1.5rem;
  animation-delay: 0s;
  position: relative;
  z-index: 10;
}

.hero-image {
  height: auto;
  width: 220px; /* Reduced from 256px for more compact layout */
  max-width: 100%;
  user-select: none;
  display: block;
  filter: drop-shadow(0 10px 30px rgba(0, 123, 189, 0.1));
  transition: transform 0.3s ease;
}

@media (min-width: 768px) {
  .hero-image {
    width: 240px;
  }
}

.hero-image:hover {
  transform: translateY(-5px) scale(1.02);
}

/* Title */
.hero-title {
  margin: 0 0 0.75rem 0;
  font-size: 2.25rem; /* text-4xl */
  
  letter-spacing: -0.025em; /* tracking-tight */
  color: var(--color-text-primary);
  line-height: 1.2;
  animation-delay: 0.2s;
  position: relative;
  z-index: 10;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3rem; /* text-5xl */
  }
}

/* Description */
.hero-description {
  margin: 0 0 1.5rem 0;
  max-width: 32rem; /* max-w-lg = 512px */
  font-size: 1rem; /* text-base */
  color: var(--color-text-secondary);
  line-height: 1.5;
  animation-delay: 0.4s;
  position: relative;
  z-index: 10;
}

@media (min-width: 768px) {
  .hero-description {
    font-size: 1.125rem; /* text-lg */
  }
}

/* Actions */
.hero-actions {
  animation-delay: 0.6s;
  position: relative;
  z-index: 10;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6875rem 2rem; /* h-11 px-8 */
  border-radius: 0.375rem; /* rounded-md */
  font-size: 0.875rem; /* text-sm */
  
  text-decoration: none;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  white-space: nowrap;
  background: var(--color-primary);
  color: white;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 123, 189, 0.2);
}

.btn-hero:hover {
  background: var(--color-primary);
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 123, 189, 0.35);
}

.btn-hero:active {
  transform: translateY(0);
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.btn-hero:hover .btn-icon {
  transform: translateX(4px);
}

/* Animations */
.animate-item {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger animation delays */
.hero-illustration {
  animation-delay: 0s;
}

.hero-title {
  animation-delay: 0.2s;
}

.hero-description {
  animation-delay: 0.4s;
}

.hero-actions {
  animation-delay: 0.6s;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .animate-item {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .pattern-dots,
  .pattern-grid,
  .decoration-circle,
  .decoration-star,
  .hero-svg-decoration {
    animation: none;
  }
}
