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

:root {
    --bg-dark: #09090b;
    --bg-card: rgba(24, 24, 27, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --glow: rgba(59, 130, 246, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Glassmorphism Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(9, 9, 11, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    text-decoration: none;
}

nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

nav a:hover, nav a.active {
    color: var(--text-main);
}

.lang-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.2s;
}

.lang-toggle:hover {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--glow);
}

/* Bilingual Display Logic */
body[data-lang="es"] .en { display: none !important; }
body[data-lang="en"] .es { display: none !important; }

/* Main Content Padding */
main {
    margin-top: 5rem;
    min-height: calc(100vh - 5rem);
}

/* Hero Section */
.hero {
    padding: 10rem 2rem 6rem 2rem;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: var(--accent);
    filter: blur(200px);
    opacity: 0.2;
    z-index: -1;
}

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 5rem);
    margin-bottom: 1.5rem;
    line-height: 1.05;
    letter-spacing: -1.5px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-inline: auto;
}

.cta {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 1.1rem 2.8rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.cta:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 25px var(--glow);
    transform: translateY(-2px);
}

.cta-secondary {
    display: inline-block;
    background: transparent;
    color: var(--text-main);
    padding: 1.1rem 2.8rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    margin-left: 1rem;
}

.cta-secondary:hover {
    border-color: var(--text-muted);
    background: rgba(255,255,255,0.05);
}

/* Sections */
.container {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: -1px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.25rem;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-inline: auto;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
    text-align: center;
}

.stat-item h4 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Grid Layouts for Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.card h3 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    color: var(--text-main);
}

.card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-tag {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Process Timeline */
.process-steps {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: relative;
    padding-left: 2rem;
}

.process-steps::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.step {
    position: relative;
}

.step::before {
    content: '';
    position: absolute;
    left: -2.35rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--glow);
}

.step h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--text-muted);
}

/* Forms */
.form-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6rem 2rem;
}

.form-container {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 4rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 700px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.field-group {
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1rem;
}

input, textarea, select {
    width: 100%;
    padding: 1.2rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--glow);
}

button[type="submit"] {
    width: 100%;
    background: var(--accent);
    color: #fff;
    padding: 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 800;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

button[type="submit"]:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 25px var(--glow);
    transform: translateY(-2px);
}

#ui-feedback {
    display: none;
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border: 1px solid #059669;
    text-align: center;
    font-weight: 600;
}

/* Footer */
footer {
    background: #000;
    padding: 4rem 2rem 2rem 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col h4 {
    color: var(--text-main);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-col p, .footer-col a {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: block;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    .hero {
        padding: 8rem 1rem 4rem 1rem;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .cta-secondary {
        margin-left: 0;
        margin-top: 1rem;
        display: block;
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
}
