/* Custom Styles & Animation Utilities */

:root {
  /* Values will be injected by JS from content.json, setting fallback defaults */
  --primary: #d97706;  /* Amber / Const orange */
  --secondary: #111827; /* Dark Gray */
  --accent: #b45309; 
  --dark: #030712; /* Nearly Black */
  --light: #f9fafb; /* Offwhite */
  --text: #1f2937;
  --text-light: #6b7280;
  --font-heading: 'Archivo';
  --font-body: 'DM Sans';
}

/* Base resets handled nicely by Tailwind, custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--light);
}
::-webkit-scrollbar-thumb {
    background: var(--text-light); /* Lighter gray for thumb */
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary); /* Accent on hover */
}

/* Smooth fallback just in case JS smooth scroll fails */
html {
    scroll-behavior: smooth;
}

/* Image Hover Zoom Utility */
.img-hover-zoom {
    overflow: hidden;
}
.img-hover-zoom img {
    transition: transform 0.7s ease;
    will-change: transform;
}
.img-hover-zoom:hover img {
    transform: scale(1.05);
}

/* Decorative background pattern */
.custom-bg-pattern {
    background-image: radial-gradient(var(--text-light) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Dropcap Effect */
.dropcap-like::first-letter {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary);
    float: left;
    line-height: 0.8;
    margin-right: 0.5rem;
    margin-top: 0.3rem;
    font-family: var(--font-heading), sans-serif;
}

/* Spinning graphics */
.animate-spin-slow {
    animation: spin 8s linear infinite;
}
.spin-slow-bg {
    animation: spin 30s linear infinite;
}
.animate-spin-reverse {
    animation: spin 15s linear infinite reverse;
}

/* Float animation for icons */
.custom-float-animation {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* GSAP Start States (prevent flicker before JS loads) 
   GSAP overides these once it loads.
*/
.fade-up, .slide-left, .slide-right, .scale-in {
    opacity: 0;
}
.stagger-item {
    opacity: 0;
}

/* Hamburger menu transformation */
.hamburger-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.hamburger-open span:nth-child(2) {
    opacity: 0;
}
.hamburger-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Dark mode / Light mode text transitions for Navigation via JS */
.nav-scrolled {
    background-color: var(--light) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    color: var(--dark) !important;
}

.nav-scrolled .hamburger-open span,
.nav-scrolled button span {
    background-color: var(--dark) !important;
}

/* GLightbox overrides to fit theme */
.glightbox-clean .gclose path, .glightbox-clean .gprev path, .glightbox-clean .gnext path {
    fill: var(--primary) !important;
}
.goverlay {
    background: var(--dark) !important;
    opacity: 0.95 !important;
}

/* Bento grid custom spans */
@media (min-width: 1024px) {
    /* Make the first 'featured' service span 2 columns and 2 rows ideally */
    .bento-card.featured-card {
        grid-column: span 2;
        grid-row: span 2;
    }
}

/* Fallback for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  
    .slide-left, .slide-right, .fade-up, .scale-in,
    .stagger-item {
      opacity: 1 !important;
      transform: none !important;
    }
}
