@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- DESIGN SYSTEM TOKENS --- */
:root {
    /* Color Palette */
    --bg-primary: #070a13;
    --bg-secondary: #0c1020;
    --bg-tertiary: #11172e;
    --bg-card: rgba(17, 24, 43, 0.65);
    --bg-card-hover: rgba(25, 34, 59, 0.8);
    
    --accent-indigo: #6366f1;
    --accent-cyan: #06b6d4;
    --accent-purple: #a855f7;
    --accent-gradient: linear-gradient(135deg, var(--accent-indigo) 0%, var(--accent-cyan) 100%);
    --accent-gradient-hover: linear-gradient(135deg, #4f46e5 0%, #0891b2 100%);
    --accent-gradient-text: linear-gradient(90deg, #818cf8 0%, #34d399 50%, #22d3ee 100%);
    
    /* Semantic Colors */
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    --error: #ef4444;
    --error-light: rgba(239, 68, 68, 0.1);
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Borders & Dividers */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.4);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 12px 20px -8px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 25px -5px rgba(99, 102, 241, 0.4);
    --shadow-glow-cyan: 0 0 25px -5px rgba(6, 182, 212, 0.4);
    
    /* Layout */
    --max-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RESET & BASE STYLES --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Subtle background glow blobs */
body::before, body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: var(--accent-indigo);
    filter: blur(150px);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

body::before {
    top: 10%;
    left: -100px;
}

body::after {
    bottom: 20%;
    right: -100px;
    background: var(--accent-cyan);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}


/* --- SCROLLBAR --- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 5px;
    border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-indigo);
}

/* --- LAYOUT UTILITIES --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-neon {
    background: var(--accent-gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- GLASS CARD STYLING --- */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
}

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

/* --- NAVIGATION BAR --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(7, 10, 19, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.header.scrolled {
    padding: 0.8rem 0;
    background: rgba(7, 10, 19, 0.95);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo svg {
    width: 36px;
    height: 36px;
    fill: none;
    stroke: url(#logoGrad);
    stroke-width: 2.5;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

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

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

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

.nav-cta {
    background: var(--accent-gradient);
    color: #ffffff;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-cta:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-glow);
    color: #ffffff;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition-smooth);
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* --- FOOTER --- */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 5rem 0 3rem 0;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 1.5rem;
    font-size: 0.95rem;
    max-width: 320px;
}

.footer-col h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--accent-cyan);
    padding-left: 5px;
}

.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-contact-item svg {
    width: 18px;
    height: 18px;
    stroke: var(--accent-cyan);
    stroke-width: 2;
    fill: none;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.footer-bottom-links {
    display: flex;
    gap: 2rem;
}

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

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .section {
        padding: 4rem 0;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--bg-secondary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: var(--transition-smooth);
        border-top: 1px solid var(--border-color);
        padding: 2rem;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-bottom-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* --- ANIMATIONS & UTILITIES --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-delay-1 { animation-delay: 0.2s; }
.animate-delay-2 { animation-delay: 0.4s; }
.animate-delay-3 { animation-delay: 0.6s; }

/* Grid systems */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    align-items: center;
}

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

@media (max-width: 768px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    padding-top: 140px;
    padding-bottom: 60px;
    display: flex;
    align-items: center;
    position: relative;
    background: radial-gradient(circle at 10% 20%, rgba(12, 16, 32, 0.8) 0%, rgba(7, 10, 19, 1) 100%);
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    z-index: 1;
}

.hero-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #818cf8;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-title span {
    display: block;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 540px;
}

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

.hero-graphic {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* --- ANIMATED DIAGRAM --- */
.architecture-diagram {
    width: 100%;
    max-width: 500px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5));
}

.diagram-node {
    transition: var(--transition-smooth);
    cursor: pointer;
}

.diagram-node:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.diagram-edge {
    stroke-dasharray: 8;
    animation: dashflow 30s linear infinite;
}

@keyframes dashflow {
    to {
        stroke-dashoffset: -1000;
    }
}

/* --- PRODUCTS SECTION --- */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem auto;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.badge-indigo {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.badge-cyan {
    background: rgba(6, 182, 212, 0.1);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.card-feature-list {
    list-style: none;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.card-feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.card-feature-list svg {
    width: 18px;
    height: 18px;
    stroke: var(--accent-cyan);
    stroke-width: 2.5;
    fill: none;
}

/* --- CODE WINDOW --- */
.code-window {
    background: #060913;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
}

.code-header {
    background: #0a0e1a;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red { background-color: #ef4444; }
.code-dot.yellow { background-color: #f59e0b; }
.code-dot.green { background-color: #10b981; }

.code-title {
    margin-left: 2rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.code-body {
    padding: 1.5rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.88rem;
    color: #e2e8f0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: pre;
    line-height: 1.5;
}

.code-keyword { color: #f472b6; }
.code-string { color: #34d399; }
.code-function { color: #60a5fa; }
.code-comment { color: var(--text-muted); }
.code-number { color: #fb7185; }

/* --- DEV CENTER & COMPLIANCE GRID --- */
.compliance-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .compliance-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .compliance-grid {
        grid-template-columns: 1fr;
    }
}

.compliance-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.compliance-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: var(--transition-smooth);
}

.compliance-card:hover .compliance-icon {
    background: var(--accent-indigo);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
    transform: rotateY(180deg);
}

.compliance-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent-indigo);
    fill: none;
    stroke-width: 2;
    transition: var(--transition-smooth);
}

.compliance-card:hover .compliance-icon svg {
    stroke: #ffffff;
}

.compliance-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.compliance-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.compliance-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-cyan);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.compliance-link:hover {
    color: var(--text-primary);
}

/* --- FORMS & INPUTS --- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* --- TEXT PAGES (PRIVACY / TERMS / DELETION) --- */
.content-page {
    padding-top: 160px; /* Increased to 160px to prevent the fixed header from covering top text */
    padding-bottom: 80px;
    max-width: 800px;
    margin: 0 auto;
}

.content-page h1 {
    font-size: 2.75rem;
    margin-bottom: 1rem;
}

.content-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 2.5rem;
}

.content-body h2 {
    font-size: 1.75rem;
    margin: 2.5rem 0 1rem 0;
    color: var(--text-primary);
}

.content-body h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem 0;
    color: var(--text-primary);
}

.content-body p, .content-body ul, .content-body ol {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

.content-body ul, .content-body ol {
    padding-left: 1.5rem;
}

.content-body li {
    margin-bottom: 0.5rem;
}

.alert-box {
    background: rgba(99, 102, 241, 0.08);
    border-left: 4px solid var(--accent-indigo);
    padding: 1.25rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 2rem 0;
}

.alert-box p {
    margin-bottom: 0;
    color: var(--text-primary);
    font-weight: 500;
}

/* --- SUPPORT CONTACT INFO BLOCK --- */
.support-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* --- MOBILE LAYOUT OPTIMIZATIONS & FIXES --- */
@media (max-width: 768px) {
    /* Opción A: Evita que los elementos de la grilla desborden el contenedor en móviles */
    .grid-2 > div, .grid-3 > div {
        min-width: 0;
    }

    /* Recomendación 1: Tamaño responsivo para el título principal (evita cortes de palabras largas) */
    .hero-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    /* Recomendación 3: Ajuste de márgenes laterales en pantallas extremadamente angostas */
    .container {
        padding: 0 1rem;
    }
}
