/* 
 * Nexa Technologies - Custom Premium CSS Style
 * Combines layout resets, custom components, typography override, transitions and premium micro-animations.
 */

/* ─── RESET & BASE ─── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
}

/* ─── TYPOGRAPHY ─── */
.font-display {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.hero-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(2.5rem, 5vw, 5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 700;
}

.section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    font-weight: 700;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* ─── NAVBAR ─── */
#navbar {
    transition: background-color .4s ease, backdrop-filter .4s ease, border-color .4s ease, box-shadow .4s ease;
}

#navbar.scrolled {
    background-color: rgba(15, 23, 42, .95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, .25);
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .75);
    transition: color .2s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #E11D48;
    transition: width .25s ease;
    border-radius: 2px;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 1);
}

.nav-link:hover::after {
    width: 100%;
}

/* ─── HERO ─── */
.hero-overlay {
    background: linear-gradient(105deg,
            rgba(8, 14, 30, .92) 0%,
            rgba(10, 18, 38, .82) 50%,
            rgba(15, 23, 42, .50) 100%);
}

.hero-grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
}

/* ─── BADGES ─── */
.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, .75);
    font-weight: 400;
}

.trust-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #E11D48;
    flex-shrink: 0;
}

/* ─── CARDS ─── */
.card-hover {
    transition: transform .35s ease, box-shadow .35s ease;
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .12);
}

/* ─── PROBLEM CARDS ─── */
.problem-card {
    position: relative;
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
}

.problem-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: #E11D48;
    transition: height .35s ease;
    border-radius: 0 0 3px 0;
}

.problem-card:hover::before {
    height: 100%;
}

.problem-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .08);
}

/* ─── VIDEO COMPONENT ─── */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 */
    background: #0F172A;
    border-radius: 16px;
    overflow: hidden;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, .45);
    transition: background .3s ease;
    cursor: pointer;
    z-index: 10;
}

.video-overlay:hover {
    background: rgba(15, 23, 42, .25);
}

.video-overlay.hidden {
    display: none;
}

.play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .25s ease, box-shadow .25s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .4);
}

.play-btn svg {
    width: 24px;
    height: 24px;
    color: #0F172A;
    margin-left: 3px;
}

/* ─── LOGO GRID ─── */
.logo-item {
    opacity: 0.85;
    transition: opacity .35s ease, transform .25s ease;
    cursor: default;
}

.logo-item:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* ─── TIMELINE ─── */
.timeline-line {
    position: absolute;
    top: 28px;
    left: calc(50% - 0.5px);
    width: 1px;
    height: calc(100% - 28px);
    background: linear-gradient(to bottom, #E11D48 0%, rgba(225, 29, 72, .1) 100%);
}

@media (min-width: 1024px) {
    .timeline-line {
        top: 28px;
        left: 0;
        width: 100%;
        height: 1px;
        background: linear-gradient(to right, #E11D48 0%, rgba(225, 29, 72, .2) 100%);
    }
}

/* ─── WORKFLOW ANIMATION ─── */
#workflow-track {
    position: relative;
}

/* Base grey connector line (desktop) */
#workflow-base-line {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    height: 1px;
    background: #E2E8F0;
    display: none;
}

@media (min-width: 1024px) {
    #workflow-base-line {
        display: block;
    }
}

/* Animated red line overlay */
#workflow-progress-line {
    position: absolute;
    top: 40px;
    left: 0;
    height: 1px;
    width: 0%;
    background: #EF3D5A;
    display: none;
    transform-origin: left center;
    z-index: 5;
    will-change: width;
}

@media (min-width: 1024px) {
    #workflow-progress-line {
        display: block;
    }
}

/* Step node */
.workflow-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Circle icon wrapper */
.workflow-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(15, 23, 42, .07);
    z-index: 10;
    margin-bottom: 1.5rem;
    position: relative;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    will-change: transform;
}

.workflow-circle svg,
.workflow-circle i {
    transition: color 0.4s ease;
}

/* Active state */
.workflow-step.active .workflow-circle {
    border-color: #EF3D5A;
    box-shadow: 0 0 0 4px rgba(239, 61, 90, 0.1), 0 4px 20px rgba(239, 61, 90, 0.18);
}

.workflow-step.active .workflow-circle i,
.workflow-step.active .workflow-circle svg {
    color: #EF3D5A;
}

.workflow-step.active .workflow-step-number {
    color: #EF3D5A;
}

/* Rotation keyframe */
@keyframes nexaRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.workflow-circle.spinning {
    animation: nexaRotate 0.72s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Step number label */
.workflow-step-number {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94A3B8;
    margin-bottom: 0.5rem;
    transition: color 0.4s ease;
}

/* Completed state */
.workflow-step.completed .workflow-circle {
    border-color: rgba(239, 61, 90, 0.35);
}

.workflow-step.completed .workflow-step-number {
    color: rgba(239, 61, 90, 0.6);
}

/* ─── SOBRE SECTION ─── */
.sobre-pilar-card {
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.sobre-pilar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(15, 23, 42, .10);
    border-color: rgba(239, 61, 90, .25);
}

/* ─── COMPARISON TABLE ─── */
.compare-row:nth-child(even) {
    background: rgba(248, 250, 252, .6);
}

/* ─── CTA SECTION ─── */
.cta-bg {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
    position: relative;
    overflow: hidden;
}

.cta-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(225, 29, 72, .12) 0%, transparent 70%);
    pointer-events: none;
}

.cta-bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(225, 29, 72, .07) 0%, transparent 70%);
    pointer-events: none;
}

/* ─── BUTTONS ─── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #E11D48;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
    box-shadow: 0 4px 16px rgba(225, 29, 72, .25);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.btn-primary:hover {
    background: #BE123C;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(225, 29, 72, .35);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .25);
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .4);
    transform: translateY(-2px);
}

.btn-outline-dark {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: #0F172A;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: 1.5px solid #E2E8F0;
    transition: all .2s ease;
    text-decoration: none;
}

.btn-outline-dark:hover {
    border-color: #E11D48;
    color: #E11D48;
    background: rgba(225, 29, 72, .04);
}

/* ─── SCROLL REVEAL ─── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }
.reveal-delay-5 { transition-delay: .5s; }
.reveal-delay-6 { transition-delay: .6s; }

/* ─── INOGEST HIGHLIGHT ─── */
.inogest-card {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    position: relative;
    overflow: hidden;
}

.inogest-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #E11D48, #FB7185, #E11D48);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ─── PROGRESSIVE ENHANCEMENT BODY FADE-IN ─── */
.js-enabled body {
    opacity: 0;
    transition: opacity 0.4s ease-out;
}
.js-enabled body.page-loaded {
    opacity: 1;
}

/* ─── TOP PROGRESS BAR LOADER ─── */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #E11D48, #FF2E93, #E11D48);
    z-index: 99999;
    opacity: 0;
    transition: width 0.3s cubic-bezier(0.1, 0.8, 0.3, 1), opacity 0.3s ease;
    box-shadow: 0 0 10px rgba(225, 29, 72, 0.5), 0 0 5px rgba(225, 29, 72, 0.3);
}

/* ─── ACTIVE NAVBAR LINK UNDERLINE ─── */
.nav-link.active {
    color: #FFFFFF !important;
}
.nav-link.active::after {
    width: 100%;
}

/* ─── HAMBURGER ROTATION ─── */
#hamburger span {
    transform-origin: left center;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, width 0.2s ease;
}
#hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(2px, -1px);
}
#hamburger.open span:nth-child(2) {
    width: 0%;
    opacity: 0;
}
#hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(2px, 1px);
}

/* ─── MOBILE MENU ─── */
#mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(10, 15, 28, .97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

#mobile-menu nav a {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger delays for mobile menu items */
#mobile-menu.open nav a:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open nav a:nth-child(2) { transition-delay: 0.14s; }
#mobile-menu.open nav a:nth-child(3) { transition-delay: 0.18s; }
#mobile-menu.open nav a:nth-child(4) { transition-delay: 0.22s; }
#mobile-menu.open nav a:nth-child(5) { transition-delay: 0.26s; }
#mobile-menu.open nav a:nth-child(6) { transition-delay: 0.3s; }
#mobile-menu.open nav div { 
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: 0.34s;
}
#mobile-menu.open nav div {
    opacity: 1;
    transform: translateY(0);
}

/* ─── SCROLL INDICATOR ─── */
.scroll-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .7);
    animation: scrollDot 1.5s ease-in-out infinite;
}

@keyframes scrollDot {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(8px);
        opacity: 0.3;
    }
}

/* ─── SECTION DIVIDER ─── */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(226, 232, 240, .8), transparent);
}

/* ─── FLOATING BUTTONS ─── */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #25D366;
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, .3);
    z-index: 99;
    transition: transform .25s ease, box-shadow .25s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, .5);
}

.back-to-top {
    position: fixed;
    bottom: 96px;
    right: 24px;
    background: rgba(15, 23, 42, .85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .1);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease, transform .25s ease;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: scale(1.05) translateY(-2px);
    background: rgba(15, 23, 42, 1);
}

/* ─── PREMIUM GLASSMORPHISM (LOGIN / DASHBOARD) ─── */
.glass-panel {
    background: rgba(30, 41, 59, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(225, 29, 72, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.text-glow-magenta {
    text-shadow: 0 0 15px rgba(225, 29, 72, 0.5);
}

/* ─── DASHBOARD ANIMATED PROGRESS BARS ─── */
.progress-bar-fill {
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom scrollbar for premium aesthetic */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0F172A;
}

::-webkit-scrollbar-thumb {
    background: #1E293B;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #E11D48;
}
