/* FONT DISPLAY — Evita FOIT/FOUT, melhora CLS */
@font-face {
    font-family: '__Inter_2fe1ab3d';
    font-display: swap;
}

/* DARK THEME OVERRIDE — Sobrescreve variáveis do Next.js que ficaram em tema claro */
:root {
    --background: #09090b;
    --foreground: #fafafa;
    --card: #18181b;
    --card-foreground: #fafafa;
    --primary: #d30000;
    --primary-foreground: #fafafa;
    --secondary: #27272a;
    --secondary-foreground: #fafafa;
    --muted: #27272a;
    --muted-foreground: #a1a1aa;
    --border: rgba(255, 255, 255, 0.1);
    --input: #27272a;
    --ring: #d30000;
}

/* DIRECT CLASS OVERRIDES — força tema escuro independente do formato de variável CSS */
.bg-background { background-color: #09090b !important; }
.bg-card       { background-color: #18181b !important; }
.bg-secondary  { background-color: #27272a !important; }
.bg-muted      { background-color: #27272a !important; }

.text-foreground            { color: #fafafa !important; }
.text-card-foreground       { color: #fafafa !important; }
.text-secondary-foreground  { color: #fafafa !important; }
.text-muted-foreground      { color: #a1a1aa !important; }

/* SCROLL BLUR OLED — gradiente inferior em cada seção principal */
#hero-section,
#quem-somos,
#features,
#how-it-works,
#diferenciais {
    position: relative;
}

#hero-section::after,
#features::after,
#how-it-works::after,
#diferenciais::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent 0%, #000000 100%);
    pointer-events: none;
    z-index: 20;
}

/* FIX: Calculadora Dropdown Overflow */
#diferenciais {
    overflow: visible !important;
    z-index: 40 !important;
    position: relative !important;
}

#diferenciais .relative {
    overflow: visible !important;
    z-index: auto;
    /* Allow children to stack naturally within the new parent context */
}

/* Ensure the dropdown itself is visible if we can target it generically */
#diferenciais button+div {
    z-index: 50 !important;
}

/* FORCE HERO BUTTONS LAYOUT (Survives Hydration) */
@media (max-width: 640px) {
    #hero-section .flex.flex-col.sm\:flex-row {
        gap: 1rem !important;
        /* Force gap-4 */
        width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    #hero-section a[href="/register/"],
    #hero-section a[href="/login/"] {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* SAFARI iOS OPTIMIZATION: Hide heavy background elements on mobile */
@media (max-width: 768px) {
    #global-hero-lighting {
        display: none !important;
    }

    #shooting-stars-hero,
    #shooting-stars-quem-somos,
    #shooting-stars-integrations {
        opacity: 0.5 !important;
        /* Reduce visibility slightly to help blending if active */
    }
}

/* FORCE SIDE-BY-SIDE CARDS ON MOBILE */
.force-grid-mobile {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.25rem !important;
    /* Reduced for more inner space */
}

/* GLOBE GLOW SPILLOVER FIX (V22) */
#site-header {
    z-index: 100 !important;
}

#awards-static {
    z-index: 60 !important;
    background: transparent !important;
    overflow: visible !important;
}

#global-connections-section {
    overflow: visible !important;
    z-index: 50 !important;
    /* Below Awards (60) content but its glow bleeds through awards bottom */
}

#global-connections-section .container,
#global-connections-section>div {
    overflow: visible !important;
}

/* Prevent any possible clipping from the visual grid cell */
.globe-visual-cell {
    overflow: visible !important;
    z-index: 10 !important;
}

/* GLOBAL SCROLL FIX & JUMP PREVENTION */
html,
body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    /* FORCE SCROLL */
    width: 100% !important;
    position: relative !important;
    max-width: 100% !important;
    /* overscroll-behavior-x: none !important; REMOVED to avoid locking */
    /* overscroll-behavior-y: none !important; REMOVED to avoid locking */
    /* PREVENT WHITE FLASH ON MOBILE */
    overflow-anchor: none !important;
    scroll-behavior: smooth !important;
    touch-action: auto !important;
    /* Allow all touch actions */
    -webkit-text-size-adjust: 100%;
    height: auto !important;
    min-height: 100% !important;
    background-color: #000000 !important;
    /* PREVENT WHITE BACKGROUND */
}

/* React Hiding Class */
.react-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    z-index: -9999 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Keyframes for Continuous Pulse (Button) */
@keyframes btn-pulse-anim {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(211, 0, 0, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 35px rgba(211, 0, 0, 0.6);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(211, 0, 0, 0.3);
    }
}

/* Keyframes for Border Pulse (Founders Cards) */
@keyframes border-pulse-anim {
    0% {
        border-color: rgba(39, 39, 42, 1);
    }

    50% {
        border-color: rgba(220, 38, 38, 0.5);
    }

    100% {
        border-color: rgba(39, 39, 42, 1);
    }
}

/* SCROLL REVEAL ANIMATION - FIXED */
.reveal {
    opacity: 0 !important;
    transform: translateY(30px) !important;
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.reveal.active {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Stagger Delays */
.delay-100 {
    transition-delay: 0.1s !important;
}

.delay-200 {
    transition-delay: 0.2s !important;
}

.delay-300 {
    transition-delay: 0.3s !important;
}

.delay-400 {
    transition-delay: 0.4s !important;
}

.delay-500 {
    transition-delay: 0.5s !important;
}

.delay-600 {
    transition-delay: 0.6s !important;
}

.delay-700 {
    transition-delay: 0.7s !important;
}

.delay-800 {
    transition-delay: 0.8s !important;
}

.delay-900 {
    transition-delay: 0.9s !important;
}

.delay-1000 {
    transition-delay: 1.0s !important;
}

/* Meu Gerente Button Animations */
.meu-gerente-btn {
    animation: btn-pulse-anim 3s infinite ease-in-out !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.meu-gerente-btn:hover {
    animation-play-state: paused !important;
    transform: scale(1.1) !important;
    background-color: #B30000 !important;
    box-shadow: 0 0 40px rgba(211, 0, 0, 0.7) !important;
}

/* Founder Cards Animation */
.founder-card-anim {
    animation: border-pulse-anim 4s infinite ease-in-out !important;
}

.icons-row-fix {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
}

/* Horizontal Scroll Snap & Drag Support */
.awards-scroll-snap {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
    -ms-overflow-style: none;
    /* IE/Edge */
    scrollbar-width: none;
    /* Firefox */
    cursor: grab;
    /* Cursor indicates draggable */
    user-select: none;
    /* Prevent text selection while dragging */
}

.awards-scroll-snap.active {
    cursor: grabbing;
    cursor: -webkit-grabbing;
    scroll-snap-type: none;
    /* Disable snap while dragging */
}

.awards-scroll-snap::-webkit-scrollbar {
    display: none;
}

.awards-card {
    scroll-snap-align: center;
    flex: 0 0 85%;
    pointer-events: none;
    /* Allow drag on images without ghosting */
}

@media (min-width: 768px) {
    .awards-card {
        flex: 0 0 calc(33.333% - 1rem);
    }
}

/* ANIMATED BUTTON STYLES (ADDED) */
/* ANIMATED BUTTON STYLES (ADDED) */
.animated-button {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none;
    overflow: hidden;
}

/* MOBILE BUTTON FIX */
@media (max-width: 640px) {
    .animated-button {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
    }
}

/* PRIMARY: Black BG, Red Border, Red Glow + PULSE (Matches Secondary Style) */
.animated-button-primary {
    background-color: #000 !important;
    color: white !important;
    /* Red Border */
    box-shadow: 0 0 20px rgba(211, 0, 0, 0.4);
    animation: btn-pulse-anim-primary 3s infinite ease-in-out !important;
}

.animated-button-primary:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 0 30px rgba(211, 0, 0, 0.8) !important;
    animation-play-state: paused !important;
    background-color: #1a0000 !important;
    /* Slight red tint on hover */
}

/* Spin Keyframe */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}



/* SECONDARY: White BG, Black Text */
.animated-button-secondary {
    background-color: white !important;
    color: black !important;
    border: 1px solid transparent !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    animation: btn-pulse-anim-white 3s infinite ease-in-out !important;
}

.animated-button-secondary:hover {
    transform: scale(1.05) !important;
    background-color: #f5f5f5 !important;
    animation-play-state: paused !important;
}

/* Secondary Arrow Color Fix */
.animated-button-secondary .animated-arrow {
    color: #000000 !important;
    /* Red arrow for white button */
}

/* Deprecated Outline Class (kept just in case) */
.animated-button-outline {
    background-color: transparent !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.animated-button-outline:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: white !important;
    transform: scale(1.05) !important;
}

.animated-arrow {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s ease !important;
}

.animated-button:hover .animated-arrow {
    transform: translateX(4px) !important;
}

/* White Pulse Animation */
@keyframes btn-pulse-anim-white {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 35px rgba(255, 255, 255, 0.5);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    }
}

/* Red Pulse Animation */
@keyframes btn-pulse-anim-primary {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(211, 0, 0, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 35px rgba(211, 0, 0, 0.8);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(211, 0, 0, 0.4);
    }
}

/* SCROLL BLUR OVERLAY — OLED bottom-of-screen fade effect */
#scroll-blur-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 160px;
    z-index: 35;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.95) 100%);
    transition: opacity 0.4s ease;
}

#scroll-blur-overlay.hidden-at-bottom {
    opacity: 0;
}

/* REVEAL HORIZONTAL — para elementos lado a lado em grids */
.reveal-left {
    opacity: 0 !important;
    transform: translateX(-30px) !important;
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.reveal-right {
    opacity: 0 !important;
    transform: translateX(30px) !important;
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.reveal-left.active,
.reveal-right.active {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

/* REVEAL SCALE — para ícones e cards */
.reveal-scale {
    opacity: 0 !important;
    transform: scale(0.92) translateY(20px) !important;
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.reveal-scale.active {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
}

/* MOBILE ANIMATION OPTIMIZATION — mais rápido e com menos deslocamento */
@media (max-width: 768px) {
    .reveal {
        transform: translateY(20px) !important;
        transition-duration: 0.4s !important;
    }
    .reveal-left {
        transform: translateX(-18px) !important;
        transition-duration: 0.4s !important;
    }
    .reveal-right {
        transform: translateX(18px) !important;
        transition-duration: 0.4s !important;
    }
    .reveal-scale {
        transform: scale(0.95) translateY(14px) !important;
        transition-duration: 0.4s !important;
    }
    /* Limitar delays longos no mobile para não arrastar a animação */
    .delay-500,
    .delay-600,
    .delay-700,
    .delay-800,
    .delay-900,
    .delay-1000 {
        transition-delay: 0.35s !important;
    }
}

/* ACESSIBILIDADE: respeitar preferência de redução de movimento */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .animated-button-primary,
    .animated-button-secondary,
    .meu-gerente-btn,
    .founder-card-anim {
        animation: none !important;
    }
    /* Fallback visual para CTA primário sem animação */
    .animated-button-primary {
        border: 1px solid rgba(211, 0, 0, 0.6) !important;
        box-shadow: 0 0 15px rgba(211, 0, 0, 0.3) !important;
    }
}

/* ============================
   INTEGRATIONS LOGO CLOUD
   ============================ */
.marquee-container {
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.marquee-track {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    gap: 2rem;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.marquee-track.dragging {
    cursor: grabbing;
}

.integration-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    min-width: 100px;
    padding: 0.75rem 1rem;
}

.integration-item img {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    border-radius: 8px;
    background-color: #27272a;
    object-fit: contain;
    pointer-events: none;
    -webkit-user-drag: none;
    user-drag: none;
    flex-shrink: 0;
}

.integration-item {
    pointer-events: none;
}

.marquee-track {
    -webkit-user-drag: none;
}

.integration-item span {
    font-size: 0.75rem;
    color: #a1a1aa;
    white-space: nowrap;
    font-weight: 500;
}

@media (max-width: 768px) {
    .marquee-track {
        gap: 1.5rem;
    }
    .marquee-container {
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
        mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
    }
    .integration-item {
        min-width: 70px;
        padding: 0.5rem 0.75rem;
    }
    .integration-item img {
        width: 32px !important;
        height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
    }
}