/* Design System - Baseado no exemplo premium */

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

[id] {
    scroll-margin-top: 5rem;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #EAEAE5;
    color: #1C1917;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Text Outline Effect */
.text-outline {
    -webkit-text-stroke: 1px #0A2540;
    color: transparent;
    transition: all 0.5s ease;
}

/* Noise Overlay */
.bg-noise {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #EAEAE5;
}

::-webkit-scrollbar-thumb {
    background: #d6d3d1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a29e;
}

/* Reveal Animations */
.reveal-up, .hero-reveal {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(15px);
    will-change: transform, opacity, filter;
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.active, .hero-reveal.active {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.reveal-zoom {
    opacity: 0;
    transform: scale(0.95);
    filter: blur(10px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-zoom.active {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Selection */
::selection {
    background-color: #0A2540;
    color: white;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid #00A3E0;
    outline-offset: 2px;
}

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

/* Lazy load */
img[loading="lazy"] {
    transition: opacity 0.3s ease;
}

img[loading="lazy"]:not([src]) {
    opacity: 0;
}

/* Hero scrub container - needs tall height for scroll animation */
.hero-scrub-container {
    height: 300vh;
}

/* Hero frame image - fill container with cover, NO zoom */
#hero-scrub-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transform: none !important;
    max-width: none !important;
    max-height: none !important;
}

/* MARQUEE - Logos de seguradoras */
@keyframes marquee-logos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee-logos {
    display: flex;
    width: max-content;
    animation: marquee-logos 40s linear infinite;
}

.animate-marquee-logos:hover {
    animation-play-state: paused;
}

/* Pause marquee when hero text is being interacted with */
.hero-paused .animate-marquee-logos {
    animation-play-state: paused;
}

/* Flashlight Card Effect */
.flashlight-card {
    position: relative;
    overflow: hidden;
}

.flashlight-card::before {
    content: "";
    position: absolute;
    top: var(--mouse-y, 50%);
    left: var(--mouse-x, 50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 163, 224, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.flashlight-card:hover::before {
    opacity: 1;
}

/* Beam Button Animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-beam {
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.btn-beam::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    background: conic-gradient(from 90deg at 50% 50%, #E2E8F0 0%, #0A2540 50%, #E2E8F0 100%);
    animation: spin 4s linear infinite;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-beam:hover::before {
    opacity: 1;
}

/* Scroll line animation */
@keyframes scroll-line {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.animate-scroll-line {
    animation: scroll-line 1.5s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}
