/* Custom styles that complement Tailwind */

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Selection color */
::selection {
    background: rgba(255, 107, 74, 0.3);
    color: #fff;
}

/* Subtle grain texture overlay for dark sections */
.grain::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* Coral gradient border for featured cards */
.coral-border {
    position: relative;
}
.coral-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,107,74,0.4), rgba(255,160,136,0.1), rgba(212,168,83,0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Animated gold shimmer on hover for headings */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.gold-shimmer:hover {
    background: linear-gradient(
        90deg,
        #D4A853 0%,
        #F0D78C 25%,
        #D4A853 50%,
        #F0D78C 75%,
        #D4A853 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 2s linear infinite;
}

/* Pulse animation for CTA buttons */
@keyframes pulse-coral {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 74, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(255, 107, 74, 0); }
}

.btn-coral:hover {
    animation: pulse-coral 1.5s ease-in-out infinite;
}

/* Image placeholder fallback */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #FF6B4A;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@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; }
    .fade-in {
        opacity: 1;
        transform: none;
    }
}
