/**
 * TERREXO COMPONENT UTILITIES & SNIPPETS
 * Version 1.0
 * Ready-to-use component classes and patterns for common UI elements
 *
 * Usage in Twig templates:
 * Include these classes directly in your Twig templates following the patterns below
 */

/* ============================================
   1. HERO SECTION PATTERN
   ============================================

   <section class="min-h-screen bg-terrex-bg flex items-center justify-center relative overflow-hidden">
     <div class="absolute inset-0 bg-gradient-light-band"></div>
     <div class="container-fluid relative z-10 text-center">
       <h1 class="type-hero text-terrex-text mb-6">Your Headline</h1>
       <p class="type-body text-terrex-muted max-w-2xl mx-auto mb-8">Supporting text</p>
       <button class="btn btn-primary">Call to Action</button>
     </div>
   </section>
*/

/* ============================================
   2. FEATURE GRID PATTERN
   ============================================

   <section class="section bg-terrex-bg">
     <div class="container-fluid">
       <h2 class="type-h2 text-center mb-16">Section Title</h2>
       <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
         <div class="card hover:scale-105">
           <div class="mb-4 text-terrex-accent text-3xl">📐</div>
           <h3 class="type-h3 mb-4">Feature Title</h3>
           <p class="text-terrex-muted">Feature description</p>
         </div>
         <!-- Repeat for each feature -->
       </div>
     </div>
   </section>
*/

/* ============================================
   3. CTA SECTION PATTERN
   ============================================

   <section class="section bg-terrex-surface">
     <div class="container-fluid text-center">
       <h2 class="type-h2 mb-6">Ready to start?</h2>
       <p class="type-body text-terrex-muted mb-8 max-w-2xl mx-auto">
         Description text
       </p>
       <div class="flex flex-col sm:flex-row gap-4 justify-center">
         <button class="btn btn-primary">Get Started</button>
         <button class="btn btn-secondary">Learn More</button>
       </div>
     </div>
   </section>
*/

/* ============================================
   4. TESTIMONIAL CARD PATTERN
   ============================================

   <div class="card">
     <div class="flex items-start gap-4 mb-4">
       <img src="avatar.jpg" alt="Name" class="w-12 h-12 rounded-full">
       <div>
         <p class="type-body font-semibold text-terrex-text">Person Name</p>
         <p class="type-small text-terrex-muted">Role/Company</p>
       </div>
     </div>
     <p class="text-terrex-muted italic">"Testimonial quote here"</p>
     <div class="flex gap-1 mt-4">
       <!-- Star ratings -->
     </div>
   </div>
*/

/* ============================================
   5. FORM PATTERN
   ============================================

   <form class="space-y-6 max-w-lg mx-auto">
     <div>
       <label for="name" class="label">Full Name</label>
       <input type="text" id="name" class="input" placeholder="John Doe">
     </div>

     <div>
       <label for="email" class="label">Email</label>
       <input type="email" id="email" class="input" placeholder="john@example.com">
     </div>

     <div>
       <label for="message" class="label">Message</label>
       <textarea id="message" class="textarea" placeholder="Your message"></textarea>
     </div>

     <button type="submit" class="btn btn-primary w-full">Send Message</button>
   </form>
*/

/* ============================================
   6. STATS SECTION PATTERN
   ============================================

   <section class="section bg-terrex-surface">
     <div class="container-fluid">
       <div class="grid grid-cols-2 md:grid-cols-4 gap-8">
         <div class="text-center">
           <p class="type-hero text-terrex-accent mb-2">500+</p>
           <p class="type-body text-terrex-muted">Projects Completed</p>
         </div>
         <!-- Repeat for each stat -->
       </div>
     </div>
   </section>
*/

/* ============================================
   7. NAVIGATION BREADCRUMB PATTERN
   ============================================

   <nav class="py-4 text-terrex-muted text-sm">
     <div class="container-fluid flex gap-2 items-center">
       <a href="/" class="link-subtle">Home</a>
       <span>/</span>
       <a href="/services" class="link-subtle">Services</a>
       <span>/</span>
       <span>Current Page</span>
     </div>
   </nav>
*/

/* ============================================
   8. ALERT PATTERN
   ============================================

   <div class="bg-terrex-surface border border-terrex-success rounded-lg p-4 mb-4">
     <p class="type-body text-terrex-success">Success message</p>
   </div>

   <div class="bg-terrex-surface border border-terrex-warning rounded-lg p-4 mb-4">
     <p class="type-body text-terrex-warning">Warning message</p>
   </div>

   <div class="bg-terrex-surface border border-terrex-error rounded-lg p-4 mb-4">
     <p class="type-body text-terrex-error">Error message</p>
   </div>
*/

/* ============================================
   9. PRICING TABLE PATTERN
   ============================================

   <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
     <div class="card">
       <h3 class="type-h3 mb-4">Plan Name</h3>
       <p class="type-hero text-terrex-accent mb-2">$99</p>
       <p class="text-terrex-muted text-sm mb-6">/month</p>
       <ul class="space-y-3 mb-8">
         <li class="flex gap-2">
           <span>✓</span>
           <span class="text-terrex-muted">Feature</span>
         </li>
       </ul>
       <button class="btn btn-primary w-full">Get Started</button>
     </div>
   </div>
*/

/* ============================================
   10. TIMELINE PATTERN
   ============================================

   <div class="relative">
     <div class="absolute left-4 top-0 bottom-0 w-px bg-terrex-border"></div>
     <div class="space-y-8 pl-16">
       <div>
         <div class="absolute left-0 w-8 h-8 bg-terrex-accent rounded-full"></div>
         <p class="type-h3">Milestone</p>
         <p class="text-terrex-muted">Description</p>
       </div>
     </div>
   </div>
*/

/* ============================================
   11. CARD HOVER ANIMATIONS
   ============================================ */

.card-hover {
  @apply transition-all duration-500 hover:scale-[1.02] hover:shadow-premium;
}

.card-hover-lift {
  @apply transition-all duration-500 hover:-translate-y-2 hover:shadow-premium;
}

.card-elegant {
  @apply bg-black/20 backdrop-blur-sm border border-white/10 rounded-2xl overflow-hidden transition-all duration-500 hover:border-white/20 hover:border-[#D4AF37]/30 hover:shadow-premium hover:shadow-[#D4AF37]/10 hover:-translate-y-1;
}

/* ============================================
   12. TEXT ANIMATIONS
   ============================================ */

.text-gradient {
  @apply bg-gradient-accent bg-clip-text text-transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #E8D5A3 0%, #D4AF37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-truncate-multi {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   13. VISIBILITY UTILITIES
   ============================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Z-Index Utilities */
.z-dropdown {
  z-index: var(--z-dropdown);
}

.z-sticky {
  z-index: var(--z-sticky);
}

.z-fixed {
  z-index: var(--z-fixed);
}

.z-modal-backdrop {
  z-index: var(--z-modal-backdrop);
}

.z-modal {
  z-index: var(--z-modal);
}

.z-popover {
  z-index: var(--z-popover);
}

.z-tooltip {
  z-index: var(--z-tooltip);
}

@media (max-width: 640px) {
  .container-fluid {
    padding-left: var(--gutter-mobile);
    padding-right: var(--gutter-mobile);
  }

  .section {
    padding-top: var(--section-mobile);
    padding-bottom: var(--section-mobile);
  }
}

/* ============================================
   15. GSAP ANIMATIONS
   ============================================ */

/* Let GSAP handle initial states - no pre-hiding needed */
[data-animate],
[data-animate-load] {
  will-change: opacity, transform;
}

/* ============================================
   16. GEOMETRIC BACKGROUND ANIMATIONS
   ============================================ */

.geometric-circle-1,
.geometric-circle-2,
.geometric-circle-3 {
  transform-origin: center;
  will-change: stroke-dashoffset, stroke-opacity;
}

/* ============================================
   17. ACCESSIBILITY UTILITIES
   ============================================ */

.visually-hidden {
  @apply sr-only;
}

.focus-visible {
  @apply focus:ring-2 focus:ring-offset-2 focus:ring-terrex-accent;
}

/* ============================================
   17. BREAKPOINT DEBUGGING (Remove in production)
   ============================================

   Add to body::before in development:

   @media (max-width: 640px) {
     content: "sm";
   }

   @media (min-width: 641px) and (max-width: 768px) {
     content: "md";
   }
*/

/* ============================================
   18. HERO SECTION REDESIGN STYLES
   ============================================ */

/* Service card enhanced hover */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.7s ease;
  z-index: 10;
  pointer-events: none;
}

.service-card:hover::before {
  left: 100%;
}

/* Integrated solution box white glow on hover */
.integrated-box {
  position: relative;
}

.integrated-box::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.integrated-box:hover::after {
  opacity: 1;
}

/* Stat items hover effect */
.stat-item {
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-4px);
}

/* Line clamp utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   19. NAVIGATION SPOTLIGHT EFFECT
   ============================================ */

/* Navigation link spotlight hover effect */
.nav-link-spotlight {
  position: relative;
  display: inline-block;
  cursor: pointer;
  text-decoration: none !important;
}

/* ============================================
   20. HERO BLOB ANIMATIONS
   ============================================ */
   /* Blob animations are now handled by Anime.js in index.html.twig */
