:root {
    --bg-color: #0a0a0a;
    --text-color: #f0f0f0;
    --text-muted: #888888;
    --accent-primary: #ffffff;
    /* Blanco */
    --accent-secondary: #aaaaaa;
    /* Gris claro */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-main: 'Inter', sans-serif;
    --max-width: 1200px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Typography & Utilities */
h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.01em;
    /* Less tight for clarity */
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.gradient-text {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    background-clip: text;
    /* Standard property */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--accent-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5em 1em;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    display: inline-block;
}

/* Header */
.glass-header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-family: 'Krub', sans-serif;
    font-weight: 400;
    font-size: 2.5rem;
    letter-spacing: 0.05em;
    /* Adjusted for Krub */
}

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

.nav-links li a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.nav-links li a:hover {
    color: var(--text-color);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 200;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    z-index: 150;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu ul {
    list-style: none;
    text-align: center;
}

.mobile-menu li {
    margin: 2rem 0;
}

.mobile-menu a {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Contact Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 300;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: #0f0f0f;
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

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

.modal-close:hover {
    color: var(--text-color);
}

.modal-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 0.8rem;
    border-radius: 6px;
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-muted);
}

/* Buttons */
.btn-primary {
    background: var(--text-color);
    color: var(--bg-color) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
    /* Ensure no overflow if we add other effects later, but cleanliness first */

}

.btn-primary:hover {
    background: var(--accent-primary);
    color: #000 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Button hover effect removed per user request */

.btn-secondary {
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    border-color: var(--text-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    position: relative;
    background-color: #000;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    /* Taller to allow movement */
    background-size: cover;
    background-position: center;
    z-index: 0;
    will-change: transform;
    pointer-events: none;
}

.hero-bg {
    background-image: url('assets/hero-bg-bw.png');
}

.hero::after {
    /* Overlay to ensure text readability over the image */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.3), var(--bg-color));
    z-index: 1;
}

.hero-content {
    max-width: var(--max-width);
    width: 100%;
    z-index: 2;
    text-align: center;
}

.hero h1 {
    font-size: 4.5rem;
    /* Larger */
    line-height: 1.1;
    margin-bottom: 2rem;
    opacity: 0;
    /* Hidden initially */
    transform: translateY(20px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

.hero h1.fade-in-active {
    opacity: 1;
    transform: translateY(0);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Features Section */
.features {
    padding: 8rem 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

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

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

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

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

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Animations & Interactivity */
.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* Typing effect removed */

.icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

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

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

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

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
    max-width: 200px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

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

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: #444;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
        /* Hide desktop nav */
    }

    .hamburger {
        display: flex;
        /* Show hamburger */
    }
}

/* Technology Section - Zig Zag Layout */
#tecnologia {
    /* Distinct Parallax */
    padding: 100px 20px;
    position: relative;
    overflow: hidden;
}

.tech-bg {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8)), url('assets/tech_bg_brutalist.png');
}

.vision-bg {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7)), url('assets/vision_bg_v3.png');
}

.vision-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 4rem;
}

.vision-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.vision-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
}

.vision-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

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



.tech-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.tech-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

/* Reuse existing observer to trigger visibility */
.tech-row.visible {
    opacity: 1;
    transform: translateY(0);
}

.tech-row.reverse {
    flex-direction: row-reverse;
}

.tech-text {
    flex: 1;
}

.tech-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    /* standard fallback */
}

.tech-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-gray);
}

.tech-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-icon-large {
    font-size: 5rem;
    background: rgba(255, 255, 255, 0.05);
    width: 160px;
    height: 160px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.tech-row:hover .tech-icon-large {
    transform: scale(1.1) rotate(5deg);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Mobile Responsiveness for Tech Section */
@media (max-width: 768px) {
    .tech-row {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .tech-row.reverse {
        flex-direction: column;
    }
}