/**
 * Lincolnshire Outdoor Living - Custom Styles
 * Extends Tailwind CSS with custom components and utilities
 */

/* Base Styles */
html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
    background-color: #F8F6F0;
}

main {
    flex: 1;
}

/* Premium Typography */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
}

/* Subtle text rendering improvements */
p {
    text-rendering: optimizeLegibility;
}

/* Skip Link */
.sr-only:focus {
    position: absolute;
    width: auto;
    height: auto;
    padding: 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Focus Styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #2d4a2a;
    outline-offset: 2px;
}

/* Form Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    border-color: #2d4a2a;
    box-shadow: 0 0 0 3px rgba(45, 74, 42, 0.1);
}

/* Radio Button Styles */
input[type="radio"] {
    accent-color: #2d4a2a;
}

/* Placeholder Styles */
::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* Selection Styles */
::selection {
    background-color: #2d4a2a;
    color: white;
}

/* Prose Styles for About Page */
.prose p {
    margin-bottom: 1rem;
}

.prose p:last-child {
    margin-bottom: 0;
}

/* Animation for Cards */
.group:hover img {
    transform: scale(1.05);
}

/* Smooth Transitions */
a,
button {
    transition: all 0.2s ease;
}

/* ============================================
   Premium Enhancements
   ============================================ */

/* Premium button hover effects */
.btn-premium {
    position: relative;
    overflow: hidden;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-premium:hover::before {
    left: 100%;
}

/* Premium card styling */
.card-premium {
    background: white;
    border-radius: 1rem;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 4px 8px rgba(0, 0, 0, 0.04),
        0 16px 32px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-premium:hover {
    transform: translateY(-4px);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.06),
        0 8px 16px rgba(0, 0, 0, 0.06),
        0 24px 48px rgba(0, 0, 0, 0.08);
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Staggered reveal delays */
.reveal-delay-1 { transition-delay: 0.05s; }
.reveal-delay-2 { transition-delay: 0.1s; }
.reveal-delay-3 { transition-delay: 0.15s; }
.reveal-delay-4 { transition-delay: 0.2s; }
.reveal-delay-5 { transition-delay: 0.25s; }
.reveal-delay-6 { transition-delay: 0.3s; }

/* Premium link underline effect */
.link-premium {
    position: relative;
    text-decoration: none;
}

.link-premium::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.link-premium:hover::after {
    width: 100%;
}

/* Subtle image zoom on hover */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-zoom:hover img {
    transform: scale(1.05);
}

/* Premium section divider */
.section-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #2d4a2a, #4a7c47);
    border-radius: 2px;
    margin: 0 auto 2rem;
}

/* Gradient text utility */
.text-gradient {
    background: linear-gradient(135deg, #2d4a2a 0%, #4a7c47 50%, #2d4a2a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Premium testimonial cards */
.testimonial-premium {
    position: relative;
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.testimonial-premium::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 4rem;
    font-family: Georgia, serif;
    color: rgba(45, 74, 42, 0.1);
    line-height: 1;
}

.testimonial-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Glow effect for CTAs */
.glow-on-hover {
    transition: box-shadow 0.3s ease;
}

.glow-on-hover:hover {
    box-shadow: 0 0 30px rgba(245, 222, 179, 0.4);
}

/* Premium badge styling */
.badge-premium {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Subtle parallax sections */
.parallax-subtle {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

@media (max-width: 768px) {
    .parallax-subtle {
        background-attachment: scroll;
    }
}

/* Number counter animation */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.count-up {
    animation: countUp 0.6s ease-out forwards;
}

/* Refined focus states */
.focus-premium:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 74, 42, 0.3);
}

/* Image shine effect on hover */
.img-shine {
    position: relative;
    overflow: hidden;
}

.img-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255,255,255,0.1) 50%,
        transparent 100%
    );
    transform: rotate(30deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.img-shine:hover::after {
    opacity: 1;
    animation: shine 0.75s ease-out;
}

@keyframes shine {
    from { transform: rotate(30deg) translateX(-100%); }
    to { transform: rotate(30deg) translateX(100%); }
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: max-height 0.3s ease-out, opacity 0.2s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

#mobile-menu:not(.hidden) {
    display: block;
}

/* Sticky Nav Shadow on Scroll */
nav.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Hero Image Overlay */
.hero-overlay {
    background: linear-gradient(to right, rgba(45, 74, 42, 0.9), rgba(45, 74, 42, 0.7));
}

/* Product Card Hover Effects */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Testimonial Cards */
.testimonial-card {
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-2px);
}

/* Loading State for Form */
.form-loading button[type="submit"] {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Print Styles */
@media print {
    nav,
    footer,
    .no-print {
        display: none !important;
    }

    main {
        padding: 0;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* 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;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .bg-green-800 {
        background-color: #1a2e19 !important;
    }

    .text-gray-600 {
        color: #374151 !important;
    }
}

/* ============================================
   Premium Hero Section
   ============================================ */

/* Animated shimmer overlay */
@keyframes heroShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Hero background slideshow - true crossfade */
@keyframes heroSlideshow {
    0% {
        opacity: 0;
    }
    8% {
        opacity: 1;
    }
    33% {
        opacity: 1;
    }
    41% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

.hero-slideshow {
    position: relative;
}

.hero-slide {
    opacity: 0;
    animation: heroSlideshow 24s ease-in-out infinite;
}

.hero-slide:nth-child(1) {
    animation-delay: 0s;
}

.hero-slide:nth-child(2) {
    animation-delay: 8s;
}

.hero-slide:nth-child(3) {
    animation-delay: 16s;
}

/* First image visible immediately on load */
.hero-slide:first-child {
    animation-delay: -0.1s;
    opacity: 1;
}

.hero-shimmer {
    background: linear-gradient(
        120deg,
        transparent 0%,
        transparent 40%,
        rgba(255, 255, 255, 0.03) 50%,
        transparent 60%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: heroShimmer 8s ease-in-out infinite;
}

/* Glowing orbs animation */
@keyframes heroGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.hero-glow {
    animation: heroGlow 4s ease-in-out infinite;
}

/* Slow spinning decorative elements */
@keyframes heroSpinSlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.hero-spin-slow {
    animation: heroSpinSlow 30s linear infinite;
}

/* Fade in animation for text elements */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-fade-in {
    animation: heroFadeIn 0.8s ease-out forwards;
    opacity: 0;
}

/* Floating animation for hero product images */
@keyframes heroFloat {
    0%, 100% {
        transform: translateY(0) rotate(var(--rotation, 0deg));
    }
    50% {
        transform: translateY(-12px) rotate(var(--rotation, 0deg));
    }
}

@keyframes heroFadeSlideRight {
    from {
        opacity: 0;
        transform: translateX(-40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Hero floating product images */
.hero-float-image {
    animation: heroFadeSlideRight 0.8s ease-out forwards, heroFloat 6s ease-in-out infinite;
    animation-delay: var(--delay, 0s), calc(var(--delay, 0s) + 0.8s);
    opacity: 0;
    --rotation: 3deg;
}

.hero-float-image:nth-child(1) {
    --delay: 0.3s;
    --rotation: 3deg;
}

.hero-float-image:nth-child(2) {
    --delay: 0.5s;
    --rotation: -2deg;
    animation-duration: 0.8s, 7s;
}

.hero-float-image:nth-child(3) {
    --delay: 0.7s;
    --rotation: 2deg;
    animation-duration: 0.8s, 5s;
}

/* Hero stat cards fade-in animation */
@keyframes heroStatFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-stat {
    animation: heroStatFadeIn 0.6s ease-out forwards;
    opacity: 0;
}

/* Hero cards that pop */
.hero-card-pop {
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 10px 20px -5px rgba(0, 0, 0, 0.4),
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 40px -10px rgba(245, 222, 179, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
}

.hero-card-pop:hover {
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 15px 30px -5px rgba(0, 0, 0, 0.4),
        0 35px 60px -15px rgba(0, 0, 0, 0.5),
        0 0 60px -5px rgba(245, 222, 179, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Hide scrollbar for mobile cards */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* ============================================
   FAQ Accordion Styles
   ============================================ */

.faq-item {
    transition: box-shadow 0.2s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.faq-trigger {
    cursor: pointer;
}

.faq-trigger:focus {
    outline: 2px solid #2d4a2a;
    outline-offset: -2px;
}

.faq-icon {
    transition: transform 0.2s ease;
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-item.open .faq-content {
    max-height: 500px;
}

/* ============================================
   Specification Table Styles
   ============================================ */

.specification-table tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* ============================================
   Gallery Hover Effects
   ============================================ */

.gallery-image {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
