/* ============================================================
   AWARDS-LEVEL EFFECTS — parallax, smooth scroll, reveal,
   magnetic buttons, grain, cursor glow, clip-path transitions
   ============================================================ */

/* --- Smooth scroll (Lenis-compatible) --- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

/* --- Custom cursor glow --- */
.cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    background: radial-gradient(circle, rgba(79,70,229,.06) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: opacity .4s ease;
    opacity: 0;
    mix-blend-mode: screen;
}
body:hover .cursor-glow { opacity: 1; }
[data-theme="dark"] .cursor-glow {
    background: radial-gradient(circle, rgba(99,102,241,.08) 0%, transparent 70%);
}

/* --- Film grain overlay --- */
.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 9997;
    pointer-events: none;
    opacity: .03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px;
}

/* --- Parallax layers --- */
[data-parallax] {
    will-change: transform;
    transition: none;
}

/* --- Reveal animations --- */
[data-reveal-award] {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}
[data-reveal-award].revealed {
    opacity: 1;
    transform: translateY(0);
}

[data-reveal-award="left"] { transform: translateX(-80px); }
[data-reveal-award="left"].revealed { transform: translateX(0); }

[data-reveal-award="right"] { transform: translateX(80px); }
[data-reveal-award="right"].revealed { transform: translateX(0); }

[data-reveal-award="scale"] {
    transform: scale(.85);
    opacity: 0;
}
[data-reveal-award="scale"].revealed {
    transform: scale(1);
    opacity: 1;
}

[data-reveal-award="clip"] {
    clip-path: inset(100% 0 0 0);
    opacity: 1;
    transform: none;
    transition: clip-path 1s cubic-bezier(.16,1,.3,1);
}
[data-reveal-award="clip"].revealed {
    clip-path: inset(0 0 0 0);
}

/* Stagger children */
[data-reveal-stagger] > * {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1);
}
[data-reveal-stagger].revealed > *:nth-child(1) { transition-delay: .05s; }
[data-reveal-stagger].revealed > *:nth-child(2) { transition-delay: .12s; }
[data-reveal-stagger].revealed > *:nth-child(3) { transition-delay: .19s; }
[data-reveal-stagger].revealed > *:nth-child(4) { transition-delay: .26s; }
[data-reveal-stagger].revealed > *:nth-child(5) { transition-delay: .33s; }
[data-reveal-stagger].revealed > *:nth-child(6) { transition-delay: .40s; }
[data-reveal-stagger].revealed > *:nth-child(7) { transition-delay: .47s; }
[data-reveal-stagger].revealed > *:nth-child(8) { transition-delay: .54s; }
[data-reveal-stagger].revealed > * {
    opacity: 1;
    transform: translateY(0);
}

/* --- Split text animation --- */
.split-text .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity .5s ease, transform .5s ease;
}
.split-text.revealed .char {
    opacity: 1;
    transform: translateY(0);
}

/* --- Magnetic button --- */
.magnetic-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border: none;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    overflow: hidden;
    transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease;
    will-change: transform;
}
.magnetic-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,.15), transparent);
    opacity: 0;
    transition: opacity .3s ease;
}
.magnetic-btn:hover::before { opacity: 1; }
.magnetic-btn:hover {
    box-shadow: 0 10px 40px -10px rgba(79,70,229,.4);
}
.magnetic-btn .btn-text {
    position: relative;
    z-index: 1;
}

/* --- Section divider with gradient line --- */
.section-divider-award {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79,70,229,.3), transparent);
    margin: 0;
    border: none;
}
[data-theme="dark"] .section-divider-award {
    background: linear-gradient(90deg, transparent, rgba(129,140,248,.2), transparent);
}

/* --- Horizontal scroll section --- */
.horizontal-scroll-section {
    overflow: hidden;
    position: relative;
}
.horizontal-scroll-track {
    display: flex;
    gap: 40px;
    width: max-content;
    will-change: transform;
}

/* --- Floating elements with perpetual motion --- */
@keyframes float-gentle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-12px) rotate(1deg); }
    66% { transform: translateY(-6px) rotate(-1deg); }
}
@keyframes float-slow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}
.float-gentle { animation: float-gentle 6s ease-in-out infinite; }
.float-slow { animation: float-slow 8s ease-in-out infinite; }

/* --- Gradient mesh background --- */
.gradient-mesh {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}
.gradient-mesh::before,
.gradient-mesh::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: .4;
}
.gradient-mesh::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79,70,229,.3), transparent 70%);
    top: -200px;
    right: -100px;
    animation: mesh-drift-1 20s ease-in-out infinite;
}
.gradient-mesh::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16,185,129,.2), transparent 70%);
    bottom: -150px;
    left: -100px;
    animation: mesh-drift-2 25s ease-in-out infinite;
}
@keyframes mesh-drift-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, 30px) scale(1.1); }
    66% { transform: translate(-30px, -20px) scale(.95); }
}
@keyframes mesh-drift-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-40px, -30px) scale(1.1); }
}

/* --- Glassmorphism cards --- */
.glass-card {
    background: rgba(255,255,255,.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,.06);
    transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s ease;
}
.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0,0,0,.1);
}
[data-theme="dark"] .glass-card {
    background: rgba(30,30,46,.6);
    border-color: rgba(255,255,255,.08);
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
[data-theme="dark"] .glass-card:hover {
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

/* --- Counter with glow --- */
.stat-counter {
    position: relative;
    display: inline-block;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--primary);
}

/* --- Hero parallax depth layers --- */
.hero-depth-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}
.hero-depth-bg .depth-circle {
    position: absolute;
    border-radius: 50%;
    opacity: .15;
    filter: blur(80px);
}
.hero-depth-bg .dc-1 {
    width: 800px;
    height: 800px;
    background: var(--primary);
    top: -300px;
    right: -200px;
}
.hero-depth-bg .dc-2 {
    width: 600px;
    height: 600px;
    background: var(--secondary);
    bottom: -250px;
    left: -150px;
}
.hero-depth-bg .dc-3 {
    width: 400px;
    height: 400px;
    background: var(--violet);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* --- Section transition (wave / diagonal) --- */
.section-wave {
    position: relative;
    z-index: 1;
}
.section-wave::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 0;
    right: 0;
    height: 80px;
    background: inherit;
    clip-path: ellipse(55% 100% at 50% 100%);
}

/* --- "Conheça nossas soluções" CTA Section --- */
.solutions-cta-section {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
    background: linear-gradient(135deg, #F8F9FF 0%, #EEF2FF 50%, #F0FDFA 100%);
    color: var(--dark);
}
.solutions-cta-section .section-eyebrow { color: var(--primary); }
.solutions-cta-section .section-title { color: var(--dark); }
.solutions-cta-section .section-desc { color: var(--gray); }
.solutions-cta-section .gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .16;
    pointer-events: none;
}
.solutions-cta-section .orb-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -200px;
    right: -100px;
}
.solutions-cta-section .orb-2 {
    width: 400px;
    height: 400px;
    background: var(--teal);
    bottom: -150px;
    left: -100px;
}
.solutions-cta-card {
    position: relative;
    background: var(--white);
    border: 1px solid #F3F4F6;
    border-radius: 32px;
    padding: 48px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .07);
    transition: transform .5s cubic-bezier(.16,1,.3,1), border-color .3s ease, box-shadow .3s ease;
    overflow: hidden;
}
.solutions-cta-card:hover {
    transform: translateY(-8px);
    border-color: rgba(20, 184, 166, .35);
    box-shadow: 0 32px 70px rgba(15, 23, 42, .1);
}
.solutions-cta-card .card-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    filter: blur(80px);
    top: -50px;
    right: -50px;
    opacity: .12;
    transition: opacity .5s ease;
}
.solutions-cta-card:hover .card-glow { opacity: .22; }
.solutions-cta-card .card-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 24px;
}
.solutions-cta-card .card-icon.teal { background: rgba(20,184,166,.12); color: #0F766E; }
.solutions-cta-card h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}
.solutions-cta-card p {
    color: var(--gray);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 24px;
}
.solutions-cta-card .cta-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.solutions-cta-card .cta-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #374151;
    font-size: .95rem;
}
.solutions-cta-card .cta-features li i {
    color: #0F766E;
    font-size: .85rem;
}
.solutions-cta-card .cta-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 60px;
    /* teal escurecido: texto branco do botão fica em 5,6:1 (WCAG AA) */
    background: linear-gradient(135deg, #0F766E, #0B5D57);
    transition: transform .3s cubic-bezier(.16,1,.3,1), box-shadow .3s ease;
}
.solutions-cta-card .cta-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px -10px rgba(20,184,166,.4);
}

/* --- A mesma seção no tema escuro: faixa escura com texto claro --- */
body.dark-mode .solutions-cta-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    color: #fff;
}
body.dark-mode .solutions-cta-section .section-eyebrow { color: rgba(255,255,255,.5); }
body.dark-mode .solutions-cta-section .section-title { color: #fff; }
body.dark-mode .solutions-cta-section .section-desc { color: rgba(255,255,255,.6); }
body.dark-mode .solutions-cta-section .gradient-orb { opacity: .3; }
body.dark-mode .solutions-cta-card {
    background: rgba(255,255,255,.05);
    backdrop-filter: blur(20px);
    border-color: rgba(255,255,255,.1);
    box-shadow: none;
}
body.dark-mode .solutions-cta-card:hover { border-color: rgba(255,255,255,.2); }
body.dark-mode .solutions-cta-card .card-glow { opacity: .2; }
body.dark-mode .solutions-cta-card:hover .card-glow { opacity: .4; }
body.dark-mode .solutions-cta-card .card-icon.teal { background: rgba(20,184,166,.15); color: #14b8a6; }
body.dark-mode .solutions-cta-card h3 { color: #fff; }
body.dark-mode .solutions-cta-card p { color: rgba(255,255,255,.6); }
body.dark-mode .solutions-cta-card .cta-features li { color: rgba(255,255,255,.7); }
body.dark-mode .solutions-cta-card .cta-features li i { color: var(--teal); }

/* --- Marquee improvements --- */
.text-marquee {
    position: relative;
}
.text-marquee::before,
.text-marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}
.text-marquee::before {
    left: 0;
    background: linear-gradient(90deg, var(--light-bg), transparent);
}
.text-marquee::after {
    right: 0;
    background: linear-gradient(-90deg, var(--light-bg), transparent);
}
[data-theme="dark"] .text-marquee::before {
    background: linear-gradient(90deg, var(--dark), transparent);
}
[data-theme="dark"] .text-marquee::after {
    background: linear-gradient(-90deg, var(--dark), transparent);
}

/* --- Scroll-triggered number counter --- */
.counter-value {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* --- Horizontal rule with star --- */
.hr-star {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 80px auto;
    max-width: 300px;
}
.hr-star::before, .hr-star::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79,70,229,.3), transparent);
}
.hr-star i {
    color: var(--primary);
    font-size: .7rem;
    opacity: .5;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    [data-reveal-award],
    [data-reveal-stagger] > *,
    .split-text .char,
    .float-gentle,
    .float-slow,
    .gradient-mesh::before,
    .gradient-mesh::after {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .cursor-glow { display: none; }
    .solutions-cta-card { padding: 32px 24px; }
    .solutions-cta-section { padding: 80px 0; }
}
