/* Custom styles for Amity Insurance Agency */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Hero staggered animations */
.hero-elem {
    opacity: 0;
    animation: fadeInUp 0.7s ease-out forwards;
}
.hero-elem:nth-child(1) { animation-delay: 0.1s; }
.hero-elem:nth-child(2) { animation-delay: 0.25s; }
.hero-elem:nth-child(3) { animation-delay: 0.4s; }
.hero-elem:nth-child(4) { animation-delay: 0.55s; }
.hero-elem:nth-child(5) { animation-delay: 0.7s; }

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered scroll reveal for grid items */
.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; }

.feature-card:nth-child(1) { transition-delay: 0.05s; }
.feature-card:nth-child(2) { transition-delay: 0.1s; }
.feature-card:nth-child(3) { transition-delay: 0.15s; }
.feature-card:nth-child(4) { transition-delay: 0.2s; }

/* Floating blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}
.blob-1 {
    width: 400px;
    height: 400px;
    background: rgba(13, 148, 136, 0.06);
    top: 10%;
    right: -5%;
    animation: float 12s ease-in-out infinite;
}
.blob-2 {
    width: 300px;
    height: 300px;
    background: rgba(13, 148, 136, 0.05);
    bottom: 20%;
    left: -5%;
    animation: float 15s ease-in-out 3s infinite;
}
.blob-3 {
    width: 200px;
    height: 200px;
    background: rgba(13, 148, 136, 0.04);
    top: 50%;
    left: 40%;
    animation: float 10s ease-in-out 1s infinite;
}

/* Header scroll state */
.header-scrolled {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Custom selection color */
::selection {
    background: rgba(13, 148, 136, 0.15);
    color: #0f766e;
}

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

/* Subtle input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Service card gradient border on hover */
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.2), transparent, rgba(13, 148, 136, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.service-card:hover::before {
    opacity: 1;
}

/* Feature card hover glow */
.feature-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Subtle pattern for dark section */
#why-us::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}
