:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-glow: #60a5fa;
    --metallic-gradient: linear-gradient(135deg, #1e293b 0%, #334155 50%, #1e293b 100%);
    --blue-metal: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
    --accent: #06b6d4;
    /* Cyan accent */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(to right, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    /* Prevent viewport overflow */
    box-sizing: border-box;
    /* Ensure padding is included in width */
    padding: 1.5rem 2rem;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    color: var(--primary);
}

.cta-button {
    background: var(--blue-metal);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 40%);
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-visual {
    position: relative;
    height: 500px;
    perspective: 1000px;
}

/* 3D Floating Elements */
.floating-card {
    position: absolute;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s;
}

.card-main {
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    z-index: 2;
    background: white;
    transform: rotateY(-10deg) rotateX(5deg);
    overflow: hidden;
}

/* CSS Receipt Representation */
.receipt-preview {
    background: #fff;
    color: #333;
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    height: 100%;
    position: relative;
}

.receipt-preview::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 10px;
    background: radial-gradient(circle, transparent 70%, #fff 75%) 50% 0/10px 10px repeat-x;
    transform: rotate(180deg);
}

.card-pix {
    top: 60%;
    right: -20px;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #32bcad 0%, #1e8e82 100%);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    transform: translateZ(50px);
    animation: float 6s ease-in-out infinite;
}

.card-stats {
    top: 20%;
    left: -40px;
    width: 160px;
    padding: 1.5rem;
    background: var(--bg-card);
    z-index: 3;
    border-left: 4px solid var(--primary);
    animation: float 5s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(2deg);
    }

    50% {
        transform: translateY(-20px) rotate(-2deg);
    }
}

/* Feature Section */
.features {
    padding: 6rem 2rem;
    background: linear-gradient(to bottom, var(--bg-dark), #162032);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: linear-gradient(145deg, #1e293b, #263345);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Parallax Container */
.parallax-section {
    padding: 8rem 2rem;
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 4rem auto 0;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    header {
        padding: 1rem 1.5rem;
        /* Reduce padding */
    }

    .cta-button {
        padding: 0.5rem 1rem;
        /* Smaller button */
        font-size: 0.9rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .hero {
        padding: 6rem 1.5rem 3rem;
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-text p {
        margin: 0 auto 2.5rem;
        font-size: 1.1rem;
    }

    .hero-visual {
        height: 350px;
        width: 100%;
        margin-top: 2rem;
    }

    .card-main {
        left: 5%;
        width: 90%;
        transform: none;
    }

    .card-pix {
        width: 70px;
        height: 70px;
        right: 0;
        top: 65%;
    }

    .card-stats {
        left: -10px;
        top: 15%;
        padding: 1rem;
        width: 140px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        /* 2x2 grid for stats on mobile */
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* Adjust padding for all main sections */
    .features,
    .how-it-works,
    .security-section,
    .testimonials,
    .faq-section,
    .mobile-section,
    .showcase-section,
    .use-cases {
        padding: 4rem 1.5rem;
        /* Reduced padding */
    }

    .features-grid,
    .testimonial-grid,
    .use-cases-grid {
        grid-template-columns: 1fr;
        /* Stack cards */
    }

    .steps-container {
        flex-direction: column;
        gap: 3rem;
    }

    .step-card {
        width: 100%;
    }

    .steps-container::before {
        display: none;
        /* Hide connecting line */
    }

    .security-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .shield-icon {
        font-size: 8rem;
    }

    .mobile-section {
        flex-direction: column-reverse;
        text-align: center;
        gap: 3rem;
    }

    .mobile-visual img {
        max-width: 80%;
        /* Ensure it fits */
    }

    .showcase-section {
        padding-top: 3rem;
    }

    /* Comparison Table Horizontal Scroll */
    .comparison-section {
        padding: 4rem 1.5rem;
    }

    .comparison-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* --- NEW SECTIONS & ANIMATIONS --- */

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}

.reveal-left.active,
.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* How It Works */
.how-it-works {
    padding: 8rem 2rem;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.steps-container {
    max-width: 1000px;
    margin: 4rem auto 0;
    display: flex;
    justify-content: space-between;
    position: relative;
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    height: 2px;
    background: repeating-linear-gradient(to right, var(--primary) 0, var(--primary) 10px, transparent 10px, transparent 20px);
    z-index: 1;
    opacity: 0.3;
}

.step-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    width: 30%;
    position: relative;
    z-index: 2;
    transition: transform 0.3s;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--bg-dark);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -60px auto 1.5rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

/* Security Section */
.security-section {
    padding: 8rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.security-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.shield-icon {
    font-size: 15rem;
    background: -webkit-linear-gradient(#10b981, #059669);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(16, 185, 129, 0.3));
    animation: pulse 3s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* Testimonials */
.testimonials {
    padding: 8rem 2rem;
    background: linear-gradient(to bottom, #162032, var(--bg-dark));
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-card {
    background: rgba(30, 41, 59, 0.5);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 5rem;
    color: var(--primary);
    opacity: 0.2;
    font-family: serif;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

/* FAQ */
.faq-section {
    padding: 8rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.faq-question {
    padding: 1.5rem;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question i {
    transition: transform 0.3s;
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
    color: var(--text-muted);
    background: rgba(15, 23, 42, 0.5);
}

.faq-answer.open {
    padding-bottom: 1.5rem;
    max-height: 200px;
}

/* Parallax Blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

/* Mobile Tweaks for New Sections */
@media (max-width: 768px) {
    .steps-container {
        flex-direction: column;
        gap: 4rem;
    }

    .steps-container::before {
        display: none;
    }

    .step-card {
        width: 100%;
        margin-top: 2rem;
    }

    .security-section {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .shield-icon {
        font-size: 10rem;
        margin-bottom: 2rem;
    }
}

/* --- VISUAL SHOWCASE EXTENSIONS --- */

/* Platform Showcase */
.showcase-section {
    padding: 4rem 2rem 8rem;
    /* Increased top padding */
    text-align: center;
    position: relative;
    z-index: 5;
}

/* Rotating Glow Border Effect */
.glow-effect {
    position: relative;
    z-index: 0;
    border-radius: 1rem;
    overflow: hidden;
    padding: 3px;
    /* Width of the glowing border */
}

.glow-effect::before {
    content: '';
    position: absolute;
    z-index: -2;
    left: -50%;
    top: -50%;
    width: 200%;
    height: 200%;
    background-color: transparent;
    background-repeat: no-repeat;
    background-image: conic-gradient(from 0deg, transparent 0deg, transparent 80deg, var(--primary) 100deg, transparent 180deg, transparent 200deg, var(--primary) 340deg);
    animation: rotate 4s linear infinite;
}

.glow-effect::after {
    content: '';
    position: absolute;
    z-index: -1;
    left: 3px;
    top: 3px;
    width: calc(100% - 6px);
    height: calc(100% - 6px);
    background: var(--bg-card);
    border-radius: calc(1rem - 3px);
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.dashboard-preview {
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 1rem;
    /* Match glow radius */
    /* Removed box-shadow and border */
    transform: perspective(1000px) rotateX(10deg);
    transition: transform 0.5s ease-out;
}

.dashboard-preview:hover {
    transform: perspective(1000px) rotateX(2deg);
}

.dashboard-preview img {
    width: 100%;
    display: block;
    position: relative;
    z-index: 1;
    /* Sit above the inner background */
    border-radius: 0.8rem;
    /* Slightly less than container */
}

/* Use Cases */
.use-cases {
    padding: 8rem 2rem;
    background: linear-gradient(to top, #162032, var(--bg-dark));
}

.use-cases-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.use-case-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 1rem;
    width: 300px;
    text-align: center;
    transition: all 0.3s;
}

.use-case-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
    border-color: var(--primary);
}

.use-case-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

/* Mobile Experience */
.mobile-section {
    padding: 8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.mobile-content {
    flex: 1;
    max-width: 500px;
}

.mobile-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.mobile-frame {
    /* Container for the mobile image to hold the glow */
    max-width: 300px;
    border-radius: 40px;
    /* Match mobile radius */
    animation: floatingMobile 6s ease-in-out infinite;
}

.mobile-frame.glow-effect {
    border-radius: 40px;
    padding: 3px;
}

.mobile-frame.glow-effect::after {
    border-radius: 37px;
}

.mobile-visual img {
    /* Removed individual styles, now relying on frame */
    display: block;
    width: 100%;
    border-radius: 37px;
}

@keyframes floatingMobile {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Comparison Table */
.comparison-section {
    padding: 8rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 3rem;
}

.comparison-table th,
.comparison-table td {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table th {
    font-size: 1.2rem;
    color: var(--text-main);
}

.comparison-table td {
    color: var(--text-muted);
}

.comparison-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.check-icon {
    color: #10b981;
    font-size: 1.2rem;
}

.cross-icon {
    color: #ef4444;
    font-size: 1.2rem;
}

/* Removed duplicate media query content */

/* --- PROFESSIONAL POLISH --- */

@keyframes slide {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

.logos-slide {
    display: flex;
    /* Animation removed for scroll control */
    width: max-content;
    will-change: transform;
}

.trusted-section:hover .logos-slide {
    animation-play-state: paused;
}

/* Trusted By Strip */
.trusted-section {
    padding: 2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(15, 23, 42, 0.5);
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    display: flex;
}

.trusted-title {
    text-align: center;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    position: absolute;
    width: 100%;
    top: 5px;
    left: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.7;
}

.logos-slide i {
    font-size: 2.5rem;
    margin: 0 3rem;
    color: rgba(255, 255, 255, 0.2);
    transition: color 0.3s;
}

.logos-slide i:hover {
    color: var(--primary);
}

/* Floating Parallax Icons */
.float-icon {
    position: absolute;
    color: var(--primary);
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
    filter: blur(1px);
}

/* Premium Card Glow */
.feature-card,
.use-case-card,
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.feature-card::before,
.use-case-card::before,
.testimonial-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, transparent, transparent, var(--primary));
    transform: rotate(0deg);
    animation: rotateBorder 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
    border-radius: 1rem;
}

.feature-card::after,
.use-case-card::after,
.testimonial-card::after {
    content: '';
    position: absolute;
    inset: 1px;
    background: var(--bg-card);
    /* Cover the middle */
    border-radius: 1rem;
    z-index: 0;
}

.feature-card:hover::before,
.use-case-card:hover::before,
.testimonial-card:hover::before {
    opacity: 1;
}

.feature-card>*,
.use-case-card>*,
.testimonial-card>* {
    position: relative;
    z-index: 1;
}

@keyframes rotateBorder {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}