/* 
========================================================================
   THECLINIC — Premium Cinematic Design System (Rivio Pixel-Perfect)
   Created: 2026-08-01
   Styling: Vanilla CSS (Poppins Neutral Version with GSAP & Hover Effects)
======================================================================== */

/* Reset & Variables */
:root {
    --color-bg: #000000;
    --color-card-bg: #000000;
    --font-display: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Easing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.8s var(--ease-out-expo);
    --transition-medium: 0.4s var(--ease-out-expo);
    --transition-fast: 0.25s var(--ease-out-expo);
}

/* Global Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    background-color: var(--color-bg);
    color: #ffffff;
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    overflow-y: auto; /* Enable page scroll */
    overflow-x: hidden;
}

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
    padding: 8px 8px 0 8px; /* The 8px border margin on top and sides */
    background-color: var(--color-bg);
    box-sizing: border-box;
}

/* Main Outer App Frame - simple wrapper, card properties moved to Hero */
.app-frame {
    position: relative;
    width: 100%;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

/* Custom premium scrollbar for the page */
html::-webkit-scrollbar {
    width: 8px;
}
html::-webkit-scrollbar-track {
    background: #000000;
}
html::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 32px;
    border: 2px solid #000000;
}
html::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* SVG Border Beam Effect */
.border-beam-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
    overflow: visible; /* Prevents border stroke clipping */
}

.beam-rect {
    fill: none;
    stroke-linecap: round;
    stroke-dasharray: 12 88; /* 12% length of beam, 88% empty space */
    rx: 32px;
    ry: 32px;
    width: 100%;
    height: 100%;
    animation: strokeMove 8.5s linear infinite;
}

/* Sharp main beam */
.beam-sharp {
    stroke: #ffffff;
    stroke-width: 1.5px;
    opacity: 0.95;
}

/* Blur outer glow beam */
.beam-glow {
    stroke: #ffffff;
    stroke-width: 4px;
    filter: blur(4px);
    opacity: 0.5;
}

@keyframes strokeMove {
    from {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: -100;
    }
}

@media (max-width: 768px) {
    .beam-rect {
        rx: 20px;
        ry: 20px;
    }
}

/* Video Background */
.video-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.video-bg-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 32px;
    opacity: 0.85; /* Increased opacity to make the video clearer and bring more impact */
    animation: heroVideoIn 2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes heroVideoIn {
    0% { transform: scale(1.12); opacity: 0; }
    100% { transform: scale(1); opacity: 0.85; }
}

/* Overlay gradient - lighter to let the video shine while keeping text readable */
.video-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(to bottom,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0.12) 16%,
            rgba(0, 0, 0, 0.12) 44%,
            rgba(0, 0, 0, 0.55) 74%,
            rgba(0, 0, 0, 0.92) 100%),
        radial-gradient(circle at center, transparent 32%, rgba(0, 0, 0, 0.42) 100%);
    z-index: 1;
}

/* Ambient noise for textured, cinema material feel */
.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.012;
    pointer-events: none;
    z-index: 10;
}

/* Header & Navigation (Positioned absolutely so it doesn't push the hero down) */
.main-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 48px 60px; /* Exact Rivio inspect padding */
    z-index: 10;
}

.header-container {
    width: 100%;
    display: flex;
    justify-content: center;   /* logo centralizada */
    align-items: center;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    transition: opacity var(--transition-fast);
}
.site-logo img {
    height: 30px;
    width: auto;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
}
.site-logo:hover { opacity: 0.85; }

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 36px;
}

.nav-item {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.nav-item:hover {
    color: #ffffff;
}

.nav-item.active {
    color: #ffffff;
    font-weight: 500;
}

/* Hero Section (Isolated card component) */
.hero-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 16px); /* Exact height of the card viewport minus 8px top margin/padding */
    min-height: calc(100vh - 16px);
    flex-shrink: 0;
    background-color: var(--color-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.18); /* Discreet sutil border */
    border-radius: 32px; /* Arredondado apenas na primeira seção */
    overflow: hidden; /* Clips the background video and beam inside the card */
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Pushes content down matching the Rivio layout */
    padding: 80px 24px 120px 24px; /* Lower text placement (120px padding bottom) */
    z-index: 4;
    box-sizing: border-box;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Headline - exact typography and sizes from inspect (Poppins style) */
.hero-title {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 600; /* padronizado com as headlines das outras seções */
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.45); /* contraste sobre o vídeo */
}

/* Neutral Primary text (Solid high-contrast white) */
.text-neutral-primary {
    color: #ffffff;
    display: inline-block;
}

/* Neutral Secondary text (Sleek silver-gray) */
.text-neutral-secondary {
    color: rgba(255, 255, 255, 0.55);
    display: inline-block;
}

/* Subheadline/Description - exact font-size & family */
.hero-description {
    font-family: var(--font-display);
    font-size: 14px; /* Exact Rivio size */
    font-weight: 400;
    line-height: 1.45; /* Exact Rivio line-height */
    color: rgba(255, 255, 255, 0.86);
    max-width: 580px;
    margin-bottom: 48px;
    text-shadow: 0 1px 16px rgba(0, 0, 0, 0.6); /* contraste sobre o vídeo */
}

/* Call to Actions (CTAs) */
.hero-ctas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

/* Button Base */
.btn {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 12px; /* Sleek square-rounded corner */
    padding: 15px 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-sizing: border-box;
}

/* Primary Button (Conheça nossos formatos) - Metallic Shimmer Sweep & Subtle Elegant Hover */
.btn-primary {
    position: relative;
    color: #241a02;
    font-weight: 600;
    border: 1px solid rgba(247, 227, 154, 0.55);
    background: linear-gradient(120deg, #a9791b 0%, #d8b24a 20%, #f6e39a 42%, #e8c65e 58%, #c39a2c 80%, #a9791b 100%);
    background-size: 220% 220%;
    box-shadow: 0 6px 20px rgba(180, 140, 40, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    overflow: hidden;
    animation: goldMove 6s ease-in-out infinite;
    transition: transform var(--transition-fast), box-shadow 0.3s ease, filter 0.3s ease;
}

/* Gradiente gold em movimento (reutilizado em botões e destaques) */
@keyframes goldMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Destaque gold sutil em palavras (texto com gradiente) */
.gold-text {
    background: linear-gradient(120deg, #b8860b, #f6e39a 45%, #d4af37 68%, #b8860b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: goldMove 7s ease-in-out infinite;
}

/* ==========================================================================
   Preloader tipográfico ("Seja bem-vindo a uma nova experiência")
   ========================================================================== */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #f5f3ec;   /* branco/creme pra contrastar com a página preta */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8vw;
    will-change: transform, border-radius;
}
/* saída em cortina com base curva (estilo dennissnellenberg) */
.preloader.is-leaving {
    transform: translateY(-112%);
    border-radius: 0 0 50% 50% / 0 0 22vh 22vh;
    transition: transform 1.15s cubic-bezier(0.76, 0, 0.24, 1),
                border-radius 1.15s cubic-bezier(0.76, 0, 0.24, 1);
}
.preloader-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: clamp(1.7rem, 4.6vw, 3.6rem);
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: #14110c;
    text-align: center;
}
/* gold mais profundo pra ler bem sobre o fundo claro */
.preloader .gold-text {
    background-image: linear-gradient(120deg, #916207, #c69a2b 45%, #9c7414 70%, #916207);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
}
.pl-line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.1em;
}
.pl-word {
    display: inline-block;
    transform: translateY(115%);
    animation: plWordIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.pl-word .gold-text { display: inline-block; }
@keyframes plWordIn {
    to { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .preloader { display: none; }
}

/* Subtle Shimmer Sweeper */
.btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.55) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    animation: buttonShimmer 4.5s infinite ease-in-out;
    pointer-events: none;
}

@keyframes buttonShimmer {
    0%, 75% { left: -100%; }
    85%, 100% { left: 200%; }
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.025);
    box-shadow: 0 14px 34px rgba(212, 175, 55, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    filter: brightness(1.06) saturate(1.08);
}

.btn-primary:active {
    transform: translateY(-0.5px) scale(0.97);
}

/* Flow Hover Button (Fale com o nosso time) - converted from React component style */
.btn-flow-hover {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    gap: 8px;
    transition: transform 0.5s var(--ease-out-expo), color 0.5s var(--ease-out-expo), border-color 0.5s var(--ease-out-expo);
}

/* Sliding circle background */
.btn-flow-hover::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transform: translate(150%, 150%) scale(2.5);
    border-radius: 100%;
    background-color: #ffffff; /* White background circle on hover */
    transition: transform 1s var(--ease-out-expo);
}

.btn-flow-hover:hover {
    transform: scale(1.05);
    color: #000000; /* Black text on white background hover */
    border-color: #ffffff;
}

.btn-flow-hover:hover::before {
    transform: translate(0%, 0%) scale(2.5);
}

.btn-flow-hover:active {
    transform: scale(0.95);
}

/* Arrow transition */
.arrow-icon {
    transition: transform var(--transition-medium), color var(--transition-fast);
}

.btn-flow-hover:hover .arrow-icon {
    color: #000000;
    transform: translateX(4px);
}

/* GSAP char setup styles to prevent layout shifts before script runs */
.char {
    opacity: 1;
    transform: none;
    filter: none;
}

/* Responsiveness (Framer mobile breakpoints match) */
@media (max-width: 768px) {
    body {
        padding: 4px; /* Narrower gap on mobile viewport */
    }

    .hero-container {
        border-radius: 20px; /* Rounded corners only on the hero card on mobile */
    }

    .main-header {
        padding: 24px 28px;
    }

    .site-logo img {
        height: 24px; /* logo um pouco menor no mobile */
    }

    .hero-container {
        padding: 80px 20px 48px 20px;
        align-items: center; /* Center vertically on mobile for space */
    }

    .hero-title {
        font-size: 24px; /* matches mobile inspect */
        margin-bottom: 20px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-description {
        font-size: 13px;
        margin-bottom: 36px;
        padding: 0 10px;
        max-width: 100%;   /* não vazar pela direita no mobile */
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
        gap: 12px;
        padding: 0 10px;
    }

    .btn {
        width: 100%;
        padding: 14px 28px;
    }
}

@media (max-height: 580px) {
    .main-header {
        padding: 16px 20px;
    }
    .hero-title {
        margin-bottom: 12px;
    }
    .hero-description {
        margin-bottom: 24px;
    }
    .hero-container {
        padding-top: 50px;
        padding-bottom: 20px;
    }
}

/* 
========================================================================
   Second Section: Dores do Médico (Problem / Pain points)
======================================================================== */
.problem-section {
    position: relative;
    width: 100%;
    background-color: #000000; /* Pure black background connecting to the hero */
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* Subtle connection line */
    padding: 160px 80px 40px 80px; /* Reduced bottom spacing */
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    z-index: 5;
    overflow: hidden; /* Clips scattered characters/columns out of bounds */
}

.problem-container {
    max-width: 1112px; /* Matches standard premium content width */
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 90px; /* Original spacing */
}

.problem-section-header {
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.problem-section-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.2vw, 3.25rem); /* Hierarchical, large display text */
    line-height: 1.2;
    letter-spacing: -0.02em;
    perspective: 1000px; /* Essential for 3D character rotation */
    transform-style: preserve-3d;
}

.problem-title-line {
    display: inline-block;
    transform-style: preserve-3d;
}

.problem-title-line .char {
    display: inline-block;
    transform-origin: center center;
    will-change: transform, opacity, filter;
}

.text-white-bold {
    color: #ffffff;
    font-weight: 600;
}

.text-muted-gray {
    color: rgba(255, 255, 255, 0.45); /* Elegant gray from reference */
    font-weight: 400;
}

.problem-section-subtitle {
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 4px;
    perspective: 1000px; /* Essential for 3D character rotation */
    transform-style: preserve-3d;
}

.problem-section-subtitle .char {
    display: inline-block;
    transform-origin: center center;
    will-change: transform, opacity, filter;
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 Columns */
    gap: 48px;
    perspective: 1000px; /* Essential for 3D item translation */
    transform-style: preserve-3d;
}

.problem-grid-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    will-change: transform, opacity, filter;
    transform-style: preserve-3d;
    transition: transform 0.4s var(--ease-out-expo);
}

.problem-grid-col:hover {
    transform: translateY(-4px); /* Premium micro-interaction */
}

.col-icon {
    position: relative;
    width: 40px;
    height: 40px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}
/* Glow de luminosidade por trás (estilo Linear) — suave, quente, pulsando */
.col-icon::before {
    content: '';
    position: absolute;
    inset: -48%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(236, 224, 190, 0.42), rgba(236, 224, 190, 0.1) 42%, transparent 68%);
    filter: blur(12px);
    opacity: 0.5;
    animation: iconGlow 4.8s ease-in-out infinite;
}
.col-icon svg {
    opacity: 0.95;
    filter: drop-shadow(0 0 5px rgba(236, 224, 190, 0.3));
}
@keyframes iconGlow {
    0%, 100% { opacity: 0.32; transform: scale(0.9); }
    50% { opacity: 0.66; transform: scale(1.12); }
}
#col-atendimento .col-icon::before { animation-delay: 1.2s; }
#col-processos .col-icon::before { animation-delay: 2.4s; }
#col-impacto .col-icon::before { animation-delay: 3.6s; }

.col-title {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.col-label {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.05em;
    margin-bottom: 18px;
}

.col-divider {
    width: 100%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.12); /* Clean divider from reference */
    margin-bottom: 24px;
}

.col-text {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
}

/* Responsiveness for Problem Section */
@media (max-width: 1024px) {
    .problem-grid {
        grid-template-columns: repeat(2, 1fr); /* 2x2 grid */
        gap: 60px 48px;
    }
}

@media (max-width: 768px) {
    .problem-section {
        padding: 80px 24px;
    }
    
    .problem-container {
        gap: 60px;
    }
    
    .problem-section-title {
        font-size: 2rem;
        line-height: 1.25;
    }
    
    .problem-grid {
        grid-template-columns: 1fr; /* Single column stack */
        gap: 48px;
    }
    
    .col-icon {
        margin-bottom: 20px;
    }
    
    .col-divider {
        margin-bottom: 18px;
    }
}

/* 
========================================================================
   Third Section: A Solução (Centralized Layout with Floating Cards)
======================================================================== */
.solution-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 80px 24px 140px 24px; /* Reduced top padding to slide section up */
    background-color: #000000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

/* Subtle radial dot grid pattern plus soft central glow */
.solution-grid-pattern {
    position: absolute;
    inset: 0;
    background-size: 32px 32px;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1.2px, transparent 1.2px);
    -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
    mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
    pointer-events: none;
    z-index: 0;
}

.solution-grid-pattern::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.035) 0%, transparent 60%);
    pointer-events: none;
}

.solution-sticky-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.solution-container {
    position: relative;
    max-width: 1200px; /* Standard container width */
    width: 100%;
    height: 560px; /* Fixed height for absolute coordinate space */
    margin-top: -60px; /* Pull the entire layout upward */
    z-index: 10;
    overflow: visible;
}

/* Central Content Block */
.solution-content-block {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: 820px; /* Wider content block to keep the title on exactly 2 lines */
    width: 100%;
    text-align: center;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center badge and text */
    gap: 20px; /* Premium spacing */
    padding: 0;
    box-sizing: border-box;
}

/* Section Pill Badge */
.solution-section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
    width: fit-content;
    align-self: center;
}

.solution-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 4.5vw, 4.2rem); /* Matches other sections */
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: -0.04em;
    margin: 0;
    width: 100%;
}

.solution-title strong {
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
}

.solution-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.4vw, 1.25rem); /* Matches other sections */
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: -0.01em;
    margin: 8px 0 0 0;
    width: 100%;
}

/* CTA Container */
.solution-ctas {
    display: flex;
    justify-content: center;
    margin-top: 16px;
    width: 100%;
    z-index: 10;
}

/* Floating Card Assets Containers */
.floating-assets-left,
.floating-assets-right {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 5;
}

.floating-card-wrapper {
    position: absolute;
    width: auto;
    pointer-events: auto;
    will-change: transform, opacity;
    opacity: 0; /* Default invisible for dynamic real-time event simulation */
}

/* Staggered organic shifts & positions (Desktop only) */
@media (min-width: 1025px) {
    .card-w-1 { top: 12%; left: -12%; }
    .card-w-2 { top: 45%; left: -20%; }
    .card-w-3 { bottom: 12%; left: -14%; }

    .card-w-4 { top: 14%; right: -12%; }
    .card-w-5 { top: 48%; right: -20%; }
    .card-w-6 { bottom: 10%; right: -14%; }
}

.floating-card {
    pointer-events: auto; /* Restores hover interaction */
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 14px;
    padding: 12px 18px;
    width: 275px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    transition: border-color var(--transition-medium), background-color var(--transition-medium);
}

.floating-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background-color: rgba(255, 255, 255, 0.03);
}

/* Card Internals */
.card-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-green {
    background-color: rgba(34, 197, 94, 0.1);
    color: rgb(34, 197, 94);
}

.icon-blue {
    background-color: rgba(59, 130, 246, 0.1);
    color: rgb(59, 130, 246);
}

.icon-white {
    background-color: rgba(255, 255, 255, 0.08);
    color: rgb(255, 255, 255);
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
    min-width: 0;
}

.card-title-text {
    font-family: var(--font-display);
    font-size: 0.76rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-subtitle-text {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-time-badge {
    font-family: var(--font-body);
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.25);
    align-self: flex-start;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Continuous Subtle Floating Animations */
@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.card-w-1 .floating-card { animation: floatCard 5.0s ease-in-out infinite; }
.card-w-2 .floating-card { animation: floatCard 6.2s ease-in-out infinite 0.5s; }
.card-w-3 .floating-card { animation: floatCard 5.5s ease-in-out infinite 1.2s; }
.card-w-4 .floating-card { animation: floatCard 5.8s ease-in-out infinite 0.3s; }
.card-w-5 .floating-card { animation: floatCard 6.6s ease-in-out infinite 0.8s; }
.card-w-6 .floating-card { animation: floatCard 5.2s ease-in-out infinite 1.5s; }

/* Responsive Solution Layout for smaller viewports */
@media (max-width: 1200px) {
    .solution-section {
        padding: 60px 24px 80px 24px;
    }

    .solution-container {
        flex-direction: column;
        gap: 40px;
        min-height: auto;
        margin-top: 0; /* Reset margin on mobile/tablet */
    }

    .solution-content-block {
        max-width: 720px;
        gap: 24px;
    }

    .solution-ctas {
        margin-top: 12px;
    }

    /* Stack left assets column under the text */
    .floating-assets-left {
        position: static;
        width: 100%;
        height: auto;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center;
        gap: 16px;
        pointer-events: auto;
    }

    /* Hide right assets column completely on tablet/mobile to avoid overlapping/clutter */
    .floating-assets-right {
        display: none !important;
    }

    .floating-card-wrapper {
        justify-content: center !important;
        transform: none !important;
        width: auto !important;
    }

    /* Hide card 3 in left column on mobile/tablet, keeping only card 1 and card 2 */
    .card-w-3 {
        display: none !important;
    }

    .floating-card {
        position: static !important;
        width: 275px !important;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
        animation: none !important; /* Disable motion floating on static grids */
    }
}

@media (max-width: 640px) {
    .floating-assets-left {
        flex-direction: column !important;
        align-items: center;
    }
}


/* ==========================================================================
   Terceira seção — MagicText (palavras acendem pelo scroll)
   ========================================================================== */
.magic-section {
    position: relative;
    min-height: 100vh;
    background: #000;
    display: flex;
    align-items: center;   /* centralizado pra preencher melhor a tela */
    justify-content: center;
    padding: 12vh 6vw;
    box-sizing: border-box;
}
.magic-inner {
    width: 100%;
    max-width: 90rem;   /* preenche mais a largura da tela */
}
.magic-text {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    /* grande e fluido: preenche mais a tela, wrap natural, mais imersivo */
    font-size: clamp(2.2rem, 4.8vw, 3.7rem);
    line-height: 1.32;
    letter-spacing: -0.015em;
    color: #ffffff;
}
/* cada palavra: fantasma (fundo apagado) + preenchimento que acende no scroll */
.magic-word {
    position: relative;
    display: inline-block;
    margin-right: 0.26em;
    white-space: nowrap;
}
.magic-ghost {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0.14;
    color: #ffffff;
}
.magic-fill {
    opacity: 0;            /* o JS anima de 0 -> 1; define o espaço da palavra */
    color: #ffffff;
}

/* ==========================================================================
   Quarta seção — Carrossel de recursos (cards horizontais)
   ========================================================================== */
.sc-section {
    position: relative;
    background: #000;
    padding: 8vh 0 13vh;
    display: flex;
    flex-direction: column;
    gap: 2.4rem;
}
.sc-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 6vw;
    box-sizing: border-box;
}
.sc-title {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: clamp(1.7rem, 3.4vw, 2.7rem);
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: #ffffff;
    white-space: nowrap;
}
.sc-controls {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
    padding-bottom: 0.4rem;
}
.sc-arrow {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, opacity 0.25s, transform 0.15s;
}
.sc-arrow svg { width: 20px; height: 20px; }
.sc-arrow:hover { background: rgba(255, 255, 255, 0.13); color: #ffffff; }
.sc-arrow:active { transform: scale(0.94); }
.sc-arrow:disabled { opacity: 0.3; cursor: default; }

.sc-viewport {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 30px 6vw 34px;   /* espaço vertical: cards não cortam no topo nem no lift do hover */
    scroll-padding: 0 6vw;
}
.sc-viewport::-webkit-scrollbar { display: none; }

.sc-card {
    position: relative;
    flex: 0 0 clamp(260px, 78vw, 350px);
    scroll-snap-align: start;
    height: 450px;
    border-radius: 28px;
    overflow: hidden;
    background:
        radial-gradient(130% 90% at 50% -15%, rgba(255, 255, 255, 0.06), transparent 55%),
        linear-gradient(180deg, rgba(30, 30, 34, 0.9), rgba(13, 13, 15, 0.96));
    box-shadow: 0 18px 44px -20px rgba(0, 0, 0, 0.7);
    opacity: 0;
    transform: translateY(46px);
    transition: opacity 0.7s ease,
                transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.5s ease,
                border-color 0.5s ease,
                box-shadow 0.5s ease;
}
.sc-card.in {
    opacity: 1;
    transform: none;
}
/* mock (visual) em cima, body (texto) embaixo com gradiente de contraste */
.sc-mock {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 66%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.7rem 1.5rem 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 74%, transparent);
    mask-image: linear-gradient(to bottom, #000 74%, transparent);
}
.sc-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 1.6rem 1.7rem 1.85rem;
}
/* Shimmer suave passando (sheen), escalonado por card via --delay */
.sc-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 55%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(105deg,
        transparent 0%,
        rgba(255, 255, 255, 0.04) 45%,
        rgba(255, 255, 255, 0.09) 50%,
        rgba(255, 255, 255, 0.04) 55%,
        transparent 100%);
    transform: translateX(-200%) skewX(-14deg);
    animation: sc-shimmer 7.5s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}
@keyframes sc-shimmer {
    0% { transform: translateX(-200%) skewX(-14deg); }
    22%, 100% { transform: translateX(380%) skewX(-14deg); }
}
/* Hover: card em foco sobe e realça; os outros desfocam (spotlight) */
.sc-viewport:hover .sc-card {
    filter: blur(3px) brightness(0.82);
    opacity: 0.6;
}
.sc-viewport:hover .sc-card:hover {
    filter: none;
    opacity: 1;
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 34px 66px -24px rgba(0, 0, 0, 0.9);
}
@media (prefers-reduced-motion: reduce) {
    .sc-card::after { animation: none; }
    .sc-card { transition: opacity 0.4s ease; }
    .sc-viewport:hover .sc-card { filter: none; opacity: 1; }
}
.sc-num {
    display: block;
    margin-bottom: 0.7rem;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.42);
}
.sc-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.sc-icon svg { width: 24px; height: 24px; }
.sc-card-title {
    margin: 0 0 0.6rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #ffffff;
}
.sc-desc {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}
.sc-desc strong {
    color: #ffffff;
    font-weight: 600;
}

/* ===== Mocks dos cards (visuais por recurso) ===== */
.mk {
    position: relative;
    width: 100%;
    max-width: 258px;
    font-family: 'Inter', 'Poppins', sans-serif;
}
.mk-bar { display: block; height: 7px; border-radius: 4px; background: rgba(255,255,255,0.13); margin: 8px 0; }
.mk-bar.w88{width:88%}.mk-bar.w80{width:80%}.mk-bar.w68{width:68%}.mk-bar.w64{width:64%}.mk-bar.w55{width:55%}.mk-bar.w42{width:42%}
/* 1 · Prontuário / IA */
.mk-record .mk-panel { position: relative; padding: 0.95rem 1rem; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09); overflow: hidden; }
.mk-hd { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.mk-av { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,0.14); flex-shrink: 0; }
.mk-hd .mk-bar { margin: 0; }
.mk-ai { position: absolute; top: 10px; right: 10px; font-size: 0.55rem; font-weight: 700; letter-spacing: 0.04em; color: #241a02; background: linear-gradient(120deg,#d8b24a,#f6e39a); padding: 3px 8px; border-radius: 999px; animation: mkPulse 2.6s ease-in-out infinite; }
.mk-scan { position: absolute; left: 0; right: 0; height: 44px; top: -44px; background: linear-gradient(to bottom, transparent, rgba(232,217,168,0.16), transparent); animation: mkScan 3.6s ease-in-out infinite; }
@keyframes mkScan { 0% { top: -44px; } 55%, 100% { top: 100%; } }
@keyframes mkPulse { 0%,100% { opacity: 0.85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
/* 2 · Concierge (chat) */
.mk-chat, .mk-wa { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.mk-msg { font-size: 0.72rem; line-height: 1.3; padding: 7px 11px; border-radius: 13px; max-width: 84%; }
.mk-msg.in { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.82); border-bottom-left-radius: 4px; animation: mkMsgIn .5s ease both; }
.mk-msg.out { align-self: flex-end; background: rgba(232,217,168,0.16); color: rgba(255,255,255,0.9); border-bottom-right-radius: 4px; animation: mkMsgIn .5s ease .35s both; }
.mk-typing { display: inline-flex; gap: 4px; align-items: center; animation: mkMsgIn .5s ease .85s both; }
.mk-typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.5); animation: mkDot 1.2s infinite; }
.mk-typing i:nth-child(2) { animation-delay: .18s; }
.mk-typing i:nth-child(3) { animation-delay: .36s; }
.mk-ticks { color: rgba(255,255,255,0.42); font-size: 0.72rem; letter-spacing: -1px; animation: mkTicks 4s ease-in-out 1s infinite; }
@keyframes mkTicks { 0%, 25% { color: rgba(255,255,255,0.42); } 45%, 85% { color: #6fca9c; } 100% { color: rgba(255,255,255,0.42); } }
@keyframes mkDot { 0%,60%,100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes mkMsgIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
/* 3 · Gestão (conexões) */
.mk-connect { position: relative; width: 100%; height: 132px; }
.mk-connect .mk-wires { position: absolute; inset: 0; width: 100%; height: 100%; }
.mk-chip { position: absolute; font-size: 0.62rem; font-weight: 500; color: rgba(255,255,255,0.82); padding: 5px 10px; border-radius: 8px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); white-space: nowrap; }
.mk-chip.p1 { top: 6%; left: 2%; }
.mk-chip.p2 { top: 6%; right: 2%; }
.mk-chip.p3 { bottom: 2%; left: 50%; transform: translateX(-50%); }
/* 4 · Agenda */
.mk-agenda { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.mk-slot { display: flex; align-items: center; gap: 10px; font-size: 0.72rem; }
.mk-slot b { color: rgba(255,255,255,0.5); font-weight: 500; width: 40px; flex-shrink: 0; }
.mk-slot i { flex: 1; font-style: normal; padding: 7px 10px; border-radius: 8px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.72); }
.mk-slot i.ok { background: rgba(232,217,168,0.14); border-color: rgba(232,217,168,0.32); color: #efdfae; animation: mkPop .5s ease .5s both, mkOkGlow 3.4s ease-in-out 1.2s infinite; }
.mk-slot i.ghost { color: rgba(255,255,255,0.32); border-style: dashed; animation: mkGhost 4s ease-in-out 1.6s infinite; }
@keyframes mkPop { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes mkOkGlow { 0%, 100% { box-shadow: 0 0 0 rgba(232,217,168,0); } 50% { box-shadow: 0 0 15px rgba(232,217,168,0.3); } }
@keyframes mkGhost { 0%, 70%, 100% { border-color: rgba(255,255,255,0.12); } 30% { border-color: rgba(255,255,255,0.28); } }
/* 5 · CRM (gráfico) */
.mk-chart { position: relative; width: 100%; }
.mk-chart svg { width: 100%; height: 100px; display: block; overflow: visible; }
.mk-grid { stroke: rgba(255,255,255,0.09); stroke-width: 1; }
.mk-line2 { fill: none; stroke: #e8d9a8; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(232,217,168,0.4)); stroke-dasharray: 340; stroke-dashoffset: 340; animation: mkDrawLoop 5.5s ease-in-out .4s infinite; }
@keyframes mkDrawLoop { 0% { stroke-dashoffset: 340; opacity: 0; } 10% { opacity: 1; } 42% { stroke-dashoffset: 0; opacity: 1; } 82% { stroke-dashoffset: 0; opacity: 1; } 94% { opacity: 0; } 100% { stroke-dashoffset: 340; opacity: 0; } }
.mk-tip { position: absolute; top: -6px; right: 2px; font-size: 0.6rem; font-weight: 700; color: #241a02; background: linear-gradient(120deg,#d8b24a,#f6e39a); padding: 3px 8px; border-radius: 999px; opacity: 0; animation: mkTipLoop 5.5s ease .4s infinite; }
@keyframes mkTipLoop { 0%, 32% { opacity: 0; transform: translateY(5px); } 46%, 82% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }
/* 6 · Nota fiscal */
.mk-invoice { position: relative; width: 100%; }
.mk-doc { padding: 0.95rem 1.05rem; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09); }
.mk-total { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.74rem; }
.mk-total span { color: rgba(255,255,255,0.5); }
.mk-total b { color: #fff; font-weight: 600; }
.mk-stamp { position: absolute; right: -2px; bottom: -10px; font-size: 0.6rem; font-weight: 700; color: #efdfae; padding: 5px 10px; border-radius: 8px; border: 1px solid rgba(232,217,168,0.4); background: rgba(232,217,168,0.1); transform: rotate(-6deg); opacity: 0; animation: mkStampLoop 5s ease-in-out 1s infinite; }
@keyframes mkStampLoop { 0%, 4% { opacity: 0; transform: rotate(-6deg) scale(1.5); } 12% { opacity: 1; transform: rotate(-6deg) scale(1); } 80% { opacity: 1; transform: rotate(-6deg) scale(1); } 92% { opacity: 0; transform: rotate(-6deg) scale(1.1); } 100% { opacity: 0; transform: rotate(-6deg) scale(1.5); } }
@media (prefers-reduced-motion: reduce) {
    .mk-ai, .mk-scan, .mk-typing i, .mk-line2, .mk-connect circle { animation: none; }
    .mk-line2 { stroke-dashoffset: 0; }
}
.sc-closing {
    max-width: 54rem;
    margin: 0.6rem auto 0;
    padding: 0 6vw;
    box-sizing: border-box;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.58);
}
.sc-closing strong {
    font-weight: 600;
    background: linear-gradient(120deg, #b8860b, #f6e39a 45%, #d4af37 68%, #b8860b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: goldMove 7s ease-in-out infinite;
}
.sc-cta {
    display: flex;
    justify-content: center;
    margin-top: 0.4rem;
}

/* Reveal suave de blocos ao entrar na viewport (transição entre seções) */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].revealed {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 640px) {
    .sc-card { flex-basis: 80vw; height: 420px; }
    .sc-head { flex-direction: column; align-items: flex-start; }
    .sc-title { font-size: 1.7rem; white-space: normal; }
}
