/* ===== Custom Styles for Triple S Fence Company ===== */

/* Base smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* ===== Navbar Scroll Effect ===== */
nav.scrolled {
    background: rgba(254, 252, 251, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(108, 24, 44, 0.08);
}

nav.scrolled .logo-text {
    color: #6c182c;
}

/* ===== Hero Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-15px) scale(1.03); }
}

@keyframes floatMedium {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -55%) scale(1.08); }
}

.hero-blob {
    animation: float 8s ease-in-out infinite;
}

.blob-1 {
    animation-delay: 0s;
}

.blob-2 {
    animation-delay: -3s;
    animation-duration: 10s;
}

.blob-3 {
    animation: floatMedium 12s ease-in-out infinite;
    animation-delay: -5s;
}

/* Scroll Indicator */
@keyframes bounceDown {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(8px); opacity: 1; }
}

.scroll-indicator {
    animation: bounceDown 2s ease-in-out infinite;
}

/* ===== Service Cards ===== */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays for service cards */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* ===== Gallery Items ===== */
.gallery-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.testimonial-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== General Section Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ===== Mobile Menu ===== */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link {
    display: block;
    transition: all 0.2s ease;
}

.mobile-link:hover {
    padding-left: 8px;
}

/* ===== Button Focus States ===== */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid #c22d4a;
    outline-offset: 2px;
}

/* ===== Selection Color ===== */
::selection {
    background: #fce7eb;
    color: #6c182c;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 640px) {
    .font-display {
        line-height: 1.2;
    }
}

/* ===== Subtle Pattern for Cream Sections ===== */
.bg-cream-50::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(108, 24, 44, 0.03) 1px, transparent 0);
    background-size: 32px 32px;
    pointer-events: none;
}

section.relative.bg-cream-50 {
    position: relative;
}
