/* Base configuration and custom properties */
:root {
    scroll-behavior: smooth;
    --scrollbar-width: 8px;
    
    /* Typography Scale */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 1.875rem;  /* 30px */
    --text-4xl: 2.25rem;   /* 36px */
    --text-5xl: 3rem;      /* 48px */
}

/* Base Typography Settings */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--text-base);
    line-height: 1.5;
    color: #1a1a1a;
    overflow-x: hidden;
}

/* Headers */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

/* Hero Section Typography */
.hero-headline {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: var(--text-4xl);
    letter-spacing: -0.025em;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero-headline {
        font-size: var(--text-5xl);
    }
}

/* Navigation Typography */
.nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: var(--text-sm);
}

@media (min-width: 768px) {
    .nav-link {
        font-size: var(--text-base);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: var(--scrollbar-width);
}

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

::-webkit-scrollbar-thumb {
    background: rgb(52, 119, 245);
    border-radius: calc(var(--scrollbar-width) / 2);
}

/* Enhanced Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(15px); /* Reduzindo a distância do transform */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

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

/* Variações específicas para diferentes tipos de elementos */
.reveal[data-animation="fade"] {
    transform: none;
}

.reveal[data-animation="slide-left"] {
    transform: translateX(-15px);
}

.reveal[data-animation="slide-right"] {
    transform: translateX(15px);
}

/* Otimizações para performance */
.reveal {
    backface-visibility: hidden;
    perspective: 1000px;
    -webkit-font-smoothing: subpixel-antialiased;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    inset: 0;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Prevent scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
    touch-action: none;
}

/* Before/After Slider */
.comparison-slider {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    touch-action: none;
    contain: strict;
    will-change: transform;
}

.comparison-before,
.comparison-after {
    position: absolute;
    top: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    backface-visibility: hidden;
    will-change: transform;
}

.comparison-before { left: 0; }
.comparison-after { right: 0; }

.comparison-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    will-change: transform;
}

.comparison-after {
    clip-path: inset(0 50% 0 0);
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: white;
    transform: translateX(-50%);
    cursor: ew-resize;
    z-index: 10;
    will-change: transform;
    touch-action: manipulation;
}

.handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.handle-circle img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@media (hover: hover) {
    .slider-handle:hover .handle-circle {
        transform: translate(-50%, -50%) scale(1.1);
    }
}


/* Typography Utility Classes */
.text-body-large {
    font-size: var(--text-lg);
    line-height: 1.75;
}

.text-body {
    font-size: var(--text-base);
    line-height: 1.5;
}

.text-caption {
    font-size: var(--text-sm);
    line-height: 1.25;
}

/* Section Headers */
.section-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: var(--text-3xl);
    letter-spacing: -0.025em;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .section-title {
        font-size: var(--text-4xl);
    }
}

/* CTA Buttons */
.cta-button {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: var(--text-lg);
    letter-spacing: 0.025em;
}

@media (min-width: 768px) {
    .cta-button {
        font-size: var(--text-xl);
    }
}

/* Form Typography */
.form-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: var(--text-sm);
}

.form-input {
    font-family: 'Inter', sans-serif;
    font-size: var(--text-base);
}

/* Prevent text selection while dragging */
.comparison-slider {
    user-select: none;
    -webkit-user-select: none;
}


/* Card Enhancements */
.analysis-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset,
        0 20px 40px -15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.analysis-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 20px -5px rgba(0, 0, 0, 0.15),
        0 4px 6px -2px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(255, 255, 255, 0.4) inset,
        0 30px 50px -20px rgba(0, 0, 0, 0.15);
}

/* Floating Effect for Trust Indicators */
.trust-indicator {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.water-section {
    background: linear-gradient(135deg, #5fbdff 0%, #cbffd1 100%);

    position: relative;
    overflow: hidden;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

.drop-shadow-glow {
    filter: drop-shadow(0 0 12px rgba(22, 163, 74, 0.4));
}

.bg-[#111827] {
    background-color: #111827;
}

.hero-content {
    z-index: 10;
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    overflow: hidden;
}

[data-carousel-slide] {
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.carousel-content {
    z-index: 20;
    transition: opacity 0.5s ease-in-out;
}

/* Carousel Animations */
.carousel-slide-enter {
    opacity: 0;
}

.carousel-slide-enter-active {
    opacity: 1;
}

.carousel-slide-exit {
    opacity: 1;
}

.carousel-slide-exit-active {
    opacity: 0;
}

.slide-content {
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.slide-content.active {
    pointer-events: auto;
}

.slide-content {
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: opacity;
}

[data-carousel-slide] {
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: opacity;
}

.carousel-indicator {
    transition: all 0.3s ease-in-out;
}

