/* ==========================================================================
   Design Tokens & CSS Variables
   ========================================================================== */
:root {
    --bg-primary: hsl(224, 25%, 5%);
    --bg-secondary: hsl(224, 20%, 8%);
    --bg-card: hsla(224, 20%, 12%, 0.55);
    
    --bg-glass: rgba(10, 12, 20, 0.6);
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-glass-hover: rgba(0, 242, 254, 0.25);
    
    /* Harmonious Gradients */
    --color-cyan: hsl(182, 100%, 50%);
    --color-blue: hsl(206, 100%, 55%);
    --color-purple: hsl(263, 90%, 63%);
    
    --gradient-primary: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-purple) 100%);
    --gradient-text: linear-gradient(135deg, hsl(182, 100%, 50%) 0%, hsl(206, 100%, 55%) 50%, hsl(263, 90%, 63%) 100%);
    --gradient-card-glow: radial-gradient(circle at top right, rgba(0, 242, 254, 0.1), transparent 60%);
    
    /* Text Colors */
    --text-primary: hsl(0, 0%, 98%);
    --text-secondary: hsl(220, 14%, 80%);
    --text-muted: hsl(220, 10%, 60%);
    
    /* Shadow effects */
    --shadow-glow: 0 0 30px rgba(0, 242, 254, 0.15);
    --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.4);
    
    /* Animations */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-title: 'Outfit', sans-serif;
}

/* ==========================================================================
   Resets & Base Styles
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(ellipse 60% 40% at 50% -10%, rgba(108, 92, 231, 0.12), transparent),
        radial-gradient(ellipse 50% 50% at 90% 70%, rgba(0, 242, 254, 0.05), transparent);
    background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: hsl(224, 20%, 15%);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-cyan);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Gradient Text Helper */
.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   Header & Navbar (Glassmorphism)
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.header-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
    transition: var(--transition-smooth);
}

.logo {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    color: var(--text-primary);
}

.logo-accent {
    color: var(--color-cyan);
    margin: 0 3px;
    font-weight: 800;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.2rem;
}

.nav-item {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    position: relative;
    padding: 0.2rem 0;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-primary);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-smooth);
    border-radius: 2px;
}

.nav-item:hover::after, .nav-item.active::after {
    width: 100%;
}

/* Call to Action Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
}

.btn-cta-header {
    background: var(--gradient-primary);
    color: var(--bg-primary) !important;
    padding: 0.6rem 1.3rem;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
}

.btn-cta-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.35);
}

.btn-cta-header::after {
    display: none;
}

/* Mobile Toggle Hamburger */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-toggle .bar {
    width: 25px;
    height: 2.5px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

/* Mobile Menu Container */
.mobile-menu {
    display: none;
    position: fixed;
    top: 75px;
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-glass);
    padding: 2rem 5%;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 999;
    box-shadow: var(--shadow-card);
    transform: translateY(-100%);
    opacity: 0;
    transition: var(--transition-smooth);
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-item {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.mob-btn-cta {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    text-align: center;
    border-radius: 8px;
    padding: 0.8rem;
    font-weight: 600;
}

/* ==========================================================================
   Hero Fixed Background Fade-Out
   ========================================================================== */
.bg-hero {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    background-image: 
        linear-gradient(to bottom, rgba(7, 10, 19, 0.55) 0%, var(--bg-primary) 92%),
        radial-gradient(circle at 75% 35%, rgba(0, 242, 254, 0.12), transparent 50%),
        url('creito.webp'),
        url('creito.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    will-change: opacity;
    transition: opacity 0.1s ease-out;
}

body.light-theme .bg-hero {
    background-image: 
        linear-gradient(to bottom, rgba(245, 247, 250, 0.78) 0%, var(--bg-primary) 92%),
        url('creito.webp'),
        url('creito.png');
}

@media (max-width: 768px) {
    .bg-hero {
        opacity: 0.45;
        background-position: center 20%;
        background-image: 
            linear-gradient(to bottom, rgba(7, 10, 19, 0.7) 0%, var(--bg-primary) 88%),
            radial-gradient(circle at 50% 20%, rgba(0, 242, 254, 0.08), transparent 45%),
            url('creito.webp'),
            url('creito.png');
    }

    body.light-theme .bg-hero {
        opacity: 0.35;
        background-image: 
            linear-gradient(to bottom, rgba(245, 247, 250, 0.88) 0%, var(--bg-primary) 90%),
            url('creito.webp'),
            url('creito.png');
    }

    .hero-title,
    .hero-subtitle,
    .hero-badge {
        text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
    }

    body.light-theme .hero-title,
    body.light-theme .hero-subtitle,
    body.light-theme .hero-badge {
        text-shadow: 0 1px 12px rgba(255, 255, 255, 0.85);
    }
}

/* Conteúdo acima do bg-hero (não sobrescrever header/modal/toast: eles já são fixed) */
main, footer {
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    padding: 10rem 0 6rem 0;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: 20%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: var(--color-cyan);
    filter: blur(150px);
    opacity: 0.15;
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.2);
    color: var(--color-cyan);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-title);
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1.2rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 242, 254, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

/* Glassmorphism Code Visual Card */
.visual-card {
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    border: 1px solid var(--border-glass);
    transition: var(--transition-smooth);
}

.visual-card:hover {
    border-color: var(--border-glass-hover);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    transform: translateY(-5px);
}

.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.card-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--border-glass);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.terminal-title {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 8px;
}

.card-body {
    padding: 1.5rem;
    font-family: monospace;
    font-size: 0.85rem;
}

.code-line {
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.code-keyword { color: var(--color-purple); }
.code-string { color: var(--color-cyan); }
.code-comment { color: var(--text-muted); font-style: italic; }

.terminal-pulse {
    margin-top: 1.5rem;
    padding: 0.8rem 1rem;
    background: rgba(0, 242, 254, 0.05);
    border: 1px dashed rgba(0, 242, 254, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse-icon {
    animation: flash 1.5s infinite;
}

.pulse-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-cyan);
}

@keyframes flash {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ==========================================================================
   Stats Section
   ========================================================================== */
.stats-section {
    padding: 4rem 0;
    position: relative;
    z-index: 10;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat-card {
    padding: 2.5rem 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-glass);
    text-align: center;
    transition: var(--transition-smooth);
    background-image: var(--gradient-card-glow);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-glass-hover);
    box-shadow: var(--shadow-glow);
}

.stat-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(0, 242, 254, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    color: var(--color-cyan);
}

.stat-icon {
    width: 24px;
    height: 24px;
}

.stat-number {
    font-family: var(--font-title);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.stats-footnote {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* ==========================================================================
   Showcase / Projects Section
   ========================================================================== */
.projects-section {
    padding: 8rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title {
    font-family: var(--font-title);
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* Filtering UI */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
}

/* Grid layout */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2rem;
    min-height: 400px;
    perspective: 1000px; /* Enable 3D depth for child elements */
}

.project-card {
    padding: 0;
    border-radius: 16px;
    border: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background-image: var(--gradient-card-glow);
    cursor: pointer;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transform: translateY(0) scale(1) rotateX(0deg) rotateY(0deg);
    overflow: hidden;
}

.project-preview {
    width: 100%;
    aspect-ratio: 960 / 280;
    overflow: hidden;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.25);
}

.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card .project-tag-wrapper,
.project-card .project-card-title,
.project-card .project-card-excerpt,
.project-card .btn-read-more {
    margin-left: 2.2rem;
    margin-right: 2.2rem;
}

.project-card .project-tag-wrapper {
    margin-top: 1.6rem;
}

.project-card .btn-read-more {
    margin-bottom: 1.8rem;
}

.project-card.hidden {
    display: none;
}

.project-card:hover {
    transform: translateY(-14px) scale(1.03) rotateX(3deg) rotateY(1deg);
    border-color: var(--color-cyan);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4), 
        0 0 30px rgba(0, 242, 254, 0.25), 
        0 0 50px rgba(108, 92, 231, 0.1);
}

.project-tag-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    transform: translateZ(20px); /* 3D Layer */
    transform-style: preserve-3d;
}

.project-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    color: var(--text-secondary);
}

.project-card-title {
    font-family: var(--font-title);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    transform: translateZ(35px); /* 3D Layer */
}

.project-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    flex-grow: 1;
    transform: translateZ(25px); /* 3D Layer */
}

.btn-read-more {
    background: none;
    border: none;
    color: var(--color-cyan);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
    padding: 0.5rem 0;
    width: fit-content;
    transform: translateZ(30px); /* 3D Layer */
}

.arrow-icon {
    width: 16px;
    height: 16px;
    transition: var(--transition-smooth);
}

.btn-read-more:hover {
    color: var(--text-primary);
}

.btn-read-more:hover .arrow-icon {
    transform: translateX(5px);
    stroke: var(--color-purple);
}

/* ==========================================================================
   Como Trabalho / Process Section
   ========================================================================== */
.process-section {
    padding: 8rem 0;
    background: rgba(0, 0, 0, 0.15);
    position: relative;
}

.process-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
    margin-top: 4rem;
}

.process-timeline::before {
    content: '';
    position: absolute;
    top: 45px;
    left: 10%;
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-cyan) 0%, var(--color-purple) 100%);
    opacity: 0.2;
    z-index: 1;
}

.process-step {
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-glass);
    position: relative;
    z-index: 2;
    background-color: var(--bg-secondary);
    transition: var(--transition-smooth);
}

.process-step:hover {
    border-color: var(--border-glass-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.step-num {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.step-title {
    font-family: var(--font-title);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.step-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-section {
    padding: 8rem 0;
}

.contact-container {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 4rem;
    align-items: center;
}

.contact-title {
    font-family: var(--font-title);
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.contact-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-detail-item {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}

.detail-icon {
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-detail-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.contact-detail-item p, .contact-detail-item a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.contact-detail-item a:hover {
    color: var(--color-cyan);
}

/* Contact Form styling */
.contact-form-wrapper {
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.form-group input, .form-group select, .form-group textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 0.9rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    width: 100%;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--color-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.1);
    background: rgba(0, 0, 0, 0.35);
}

.form-group select option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-submit {
    width: 100%;
    margin-top: 1rem;
    font-size: 1.05rem;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.form-honeypot {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
}

.form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.form-hint code {
    font-size: 0.72rem;
    color: var(--color-cyan);
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonials-section {
    padding: 8rem 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

.testimonial-card {
    padding: 2.2rem;
    border-radius: 16px;
    border: 1px solid var(--border-glass);
}

.testimonial-quote {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.testimonial-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.testimonial-role {
    font-weight: 700;
    color: var(--text-primary);
}

.testimonial-sector {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* WhatsApp floating CTA */
.wa-float {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1150;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: #25D366;
    color: #fff;
    padding: 0.85rem 1.1rem;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.35);
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.wa-float:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 14px 34px rgba(37, 211, 102, 0.45);
}

.wa-float.hidden-on-contact {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
}

@media (min-width: 900px) {
    .wa-float-label {
        display: inline;
    }
}

@media (max-width: 899px) {
    .wa-float {
        padding: 0.95rem;
        border-radius: 50%;
    }
    .wa-float-label {
        display: none;
    }
}

.modal-case-preview {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    margin: 0 0 1.5rem 0;
    background: rgba(0,0,0,0.25);
}

.modal-case-preview img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.main-footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-glass);
    background-color: var(--bg-secondary);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.main-footer p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-bottom-links a:hover {
    color: var(--color-cyan);
}

/* ==========================================================================
   Interactive Details Modal
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    opacity: 0;
    transition: var(--transition-smooth);
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
    padding: 3rem;
    position: relative;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition-smooth);
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-smooth);
}

.modal-close:hover {
    color: var(--color-cyan);
    transform: rotate(90deg);
}

/* Modal Content Details Styles */
.modal-project-title {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.modal-project-subtitle {
    font-size: 1.1rem;
    color: var(--color-cyan);
    margin-bottom: 2rem;
    font-weight: 600;
}

.modal-project-details-grid {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    margin-bottom: 2.5rem;
}

.detail-section h4 {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    border-left: 3px solid var(--color-cyan);
    padding-left: 10px;
}

.detail-section p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.detail-section.impact-section h4 {
    border-left-color: var(--color-purple);
}

.detail-section.impact-section p {
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(108, 92, 231, 0.08);
    border: 1px solid rgba(108, 92, 231, 0.2);
    padding: 1rem;
    border-radius: 8px;
}

.modal-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.btn-modal-cta {
    width: 100%;
}

/* ==========================================================================
   ROI Calculator Section
   ========================================================================== */
.roi-section {
    padding: 8rem 0;
    position: relative;
}

.roi-calculator-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3.5rem;
    padding: 3.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
    margin-top: 3rem;
    align-items: center;
}

.roi-inputs {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.roi-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.roi-input-group .input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.roi-input-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.roi-input-group .input-value {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-cyan);
    background: rgba(0, 242, 254, 0.08);
    padding: 0.2rem 0.8rem;
    border-radius: 6px;
    border: 1px solid rgba(0, 242, 254, 0.15);
}

/* Custom styled range slider */
.roi-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    transition: var(--transition-smooth);
}

.roi-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.roi-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-primary);
    cursor: pointer;
    margin-top: -7px;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
    transition: var(--transition-smooth);
}

.roi-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.8);
}

.roi-outputs {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    background: rgba(0, 0, 0, 0.25);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-glass);
}

.roi-output-card {
    text-align: center;
}

.roi-output-card .output-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.3rem;
}

.roi-output-card .output-value-large {
    font-family: var(--font-title);
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.roi-output-card.highlight .output-value-large {
    font-size: 3.2rem;
}

.roi-output-card .output-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.roi-output-card strong {
    color: var(--color-cyan);
}

.btn-roi-cta {
    width: 100%;
    padding: 1rem;
    font-size: 1.05rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-section {
    padding: 8rem 0;
}

.faq-accordion-container {
    max-width: 800px;
    margin: 3rem auto 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.faq-item {
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-item:hover {
    border-color: var(--border-glass-hover);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    text-align: left;
    padding: 1.5rem;
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: var(--transition-smooth);
}

.faq-question:hover {
    color: var(--color-cyan);
}

.faq-icon {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--color-cyan);
    transition: var(--transition-smooth);
    display: inline-block;
    line-height: 1;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--color-purple);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s ease;
    padding: 0 1.5rem;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid transparent;
}

.faq-item.active .faq-answer {
    max-height: 300px; /* arbitrary height to slide down */
    padding: 1.5rem;
    border-top-color: var(--border-glass);
}

.faq-answer p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   Visual Flow Diagrams (in Modals)
   ========================================================================== */
.modal-flow-diagram {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.5rem 0 2rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.flow-node {
    flex: 1;
    min-width: 140px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    padding: 1rem 0.8rem;
    border-radius: 10px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: var(--transition-smooth);
    border-top: 2px solid var(--color-cyan);
}

.flow-node:nth-child(odd) {
    border-top-color: var(--color-purple);
}

.flow-node:hover {
    transform: translateY(-3px);
    border-color: var(--color-cyan);
    box-shadow: 0 6px 15px rgba(0, 242, 254, 0.15);
}

.flow-node:nth-child(odd):hover {
    border-color: var(--color-purple);
    box-shadow: 0 6px 15px rgba(108, 92, 231, 0.15);
}

.flow-node-icon {
    font-size: 1.25rem;
    display: block;
    margin-bottom: 0.4rem;
}

.flow-connector {
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulseArrow 1.5s infinite;
}

@keyframes pulseArrow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}


/* ==========================================================================
   Light Theme Colors
   ========================================================================== */
body.light-theme {
    --bg-primary: hsl(220, 25%, 96%);
    --bg-secondary: hsl(220, 15%, 90%);
    --bg-card: rgba(255, 255, 255, 0.65);
    --bg-glass: rgba(240, 242, 245, 0.7);
    --border-glass: rgba(0, 0, 0, 0.08);
    --border-glass-hover: rgba(108, 92, 231, 0.35);
    
    --text-primary: hsl(224, 25%, 12%);
    --text-secondary: hsl(224, 15%, 30%);
    --text-muted: hsl(224, 10%, 50%);
    
    --color-cyan: hsl(190, 100%, 35%);
    --color-blue: hsl(206, 95%, 45%);
    --color-purple: hsl(263, 80%, 48%);
    
    background-image: 
        radial-gradient(ellipse 60% 40% at 50% -10%, rgba(108, 92, 231, 0.08), transparent),
        radial-gradient(ellipse 50% 50% at 90% 70%, rgba(0, 242, 254, 0.03), transparent);
}

/* Header adaptations for Light Theme */
body.light-theme .header-glass {
    background: rgba(240, 242, 245, 0.7);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.light-theme .logo {
    color: var(--text-primary);
}

body.light-theme .btn-secondary {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .btn-secondary:hover {
    background: hsl(220, 15%, 94%);
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

body.light-theme .card-header {
    background: rgba(0, 0, 0, 0.04);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .terminal-pulse {
    background: rgba(108, 92, 231, 0.03);
    border-color: rgba(108, 92, 231, 0.15);
}

body.light-theme .process-step {
    background-color: #fff;
}

body.light-theme .roi-outputs {
    background: rgba(0, 0, 0, 0.02);
}

body.light-theme .faq-answer {
    background: rgba(0, 0, 0, 0.01);
}

body.light-theme .flow-node {
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Header Action Wrapper & Toggle Button */
.header-actions-wrapper {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.theme-toggle-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-size: 1.15rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
    border-color: var(--border-glass-hover);
    transform: scale(1.08);
    box-shadow: var(--shadow-glow);
}

body.light-theme .theme-toggle-btn {
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.12);
}

/* ==========================================================================
   Ecosystem Section (Carousel)
   ========================================================================== */
.ecosystem-section {
    padding: 8rem 0;
    position: relative;
}

.carousel-container {
    position: relative;
    margin-top: 3.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
    overflow: hidden;
    padding: 4rem 5rem;
}

.carousel-slides {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    width: 300%; /* 3 slides = 300% */
}

.carousel-slide {
    flex: 1;
    width: 33.333%;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3.5rem;
    align-items: center;
    opacity: 0.2;
    transition: opacity 0.5s ease;
}

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

.slide-content {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.slide-tag {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.slide-title {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
}

.slide-desc {
    font-size: 1rem;
    color: var(--text-secondary);
}

.slide-desc strong {
    color: var(--text-primary);
}

.slide-cta {
    width: fit-content;
    margin-top: 0.8rem;
}

.slide-visual {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

.slide-visual:hover {
    border-color: var(--border-glass-hover);
    transform: scale(1.02);
}

.slide-img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/10;
    object-fit: cover;
}

/* Carousel Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    z-index: 10;
}

.carousel-btn:hover {
    border-color: var(--border-glass-hover);
    box-shadow: var(--shadow-glow);
    color: var(--color-cyan);
}

.carousel-btn.prev {
    left: 1.5rem;
}

.carousel-btn.next {
    right: 1.5rem;
}

/* Indicators Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 2.5rem;
}

.dot-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: var(--transition-smooth);
}

body.light-theme .dot-indicator {
    background: rgba(0, 0, 0, 0.15);
}

.dot-indicator.active {
    background: var(--color-cyan);
    width: 25px;
    border-radius: 50px;
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-width: 400px;
    width: 90%;
}

.toast-notification {
    background: rgba(10, 12, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-left: 4px solid var(--color-cyan);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    opacity: 0;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: var(--transition-smooth);
}

body.light-theme .toast-notification {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
}

.toast-notification.success {
    border-left-color: #27c93f;
}

.toast-notification.loading {
    border-left-color: #ffbd2e;
}

.toast-text {
    font-size: 0.9rem;
    font-weight: 600;
    flex-grow: 1;
}

.toast-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ffbd2e;
    border-radius: 50%;
    animation: toastSpin 0.8s linear infinite;
}

body.light-theme .toast-spinner {
    border-color: rgba(0, 0, 0, 0.08);
    border-top-color: #ffbd2e;
}

@keyframes toastSlideIn {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* ==========================================================================
   Media Queries & Responsiveness
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .process-timeline {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .process-timeline::before {
        display: none;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .roi-calculator-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 2.5rem;
    }

    .carousel-container {
        padding: 3rem 2.5rem;
    }

    .carousel-slide {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .carousel-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    .carousel-btn.prev {
        left: 0.5rem;
    }
    .carousel-btn.next {
        right: 0.5rem;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .process-timeline {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu {
        display: flex;
    }
    
    .contact-form-wrapper {
        padding: 2rem 1.5rem;
    }
    
    .modal-content {
        padding: 2rem 1.5rem;
    }
    
    .modal-project-title {
        font-size: 1.8rem;
        padding-right: 1.5rem;
    }

    .roi-calculator-container {
        padding: 2rem 1.5rem;
    }

    .roi-output-card .output-value-large {
        font-size: 2.2rem;
    }

    .roi-output-card.highlight .output-value-large {
        font-size: 2.5rem;
    }

    .modal-flow-diagram {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .flow-node {
        width: 100%;
        min-width: unset;
    }

    .flow-connector {
        transform: rotate(90deg);
        margin: 0.2rem 0;
    }

    .carousel-container {
        padding: 2.5rem 1rem;
    }

    .carousel-btn {
        display: none;
    }

    .slide-title {
        font-size: 1.6rem;
    }
}
