/* Variables CSS */
:root {
    --primary-color: #ffffff;
    --secondary-color: #d4d4d8;
    --accent-color: #71717a;
    --dark-bg: #000000;
    --darker-bg: #0a0a0a;
    --light-text: #ffffff;
    --gray-text: #71717a;
    --dark-text: #27272a;
    --gradient-primary: linear-gradient(135deg, #ffffff 0%, #e4e4e7 100%);
    --gradient-secondary: linear-gradient(135deg, #71717a 0%, #52525b 100%);
    --gradient-accent: linear-gradient(135deg, #27272a 0%, #18181b 100%);
    --font-primary: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--light-text);
    background: var(--dark-bg);
    overflow-x: hidden;
}


/* Loader */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loader-content {
    text-align: center;
}

.lambda-symbol {
    font-size: 4rem;
    font-weight: 300;
    color: var(--light-text);
    margin-bottom: 2rem;
    animation: pulse 2s infinite ease-in-out;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.loading-text {
    font-size: 1.2rem;
    color: var(--gray-text);
    margin-bottom: 2rem;
    font-family: var(--font-mono);
}

.progress-bar {
    width: 300px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 0;
    animation: loadProgress 3s ease-in-out forwards;
}

@keyframes loadProgress {
    to { width: 100%; }
}

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

/* Header minimalista */
.floating-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.6s ease;
    padding: 0.5rem 0;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-header {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lambda-symbol {
    font-size: 1.8rem;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.4s ease;
    cursor: pointer;
}

.lambda-symbol:hover {
    color: rgba(255, 255, 255, 0.9);
    transform: scale(1.05);
}

.main-nav {
    display: flex;
    gap: 3rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 200;
    transition: all 0.4s ease;
    position: relative;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.6);
    transition: width 0.4s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 20px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 20px;
    height: 1px;
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: 
        radial-gradient(ellipse 80% 50% at 50% 40%, rgba(15, 15, 15, 0.8) 0%, transparent 50%),
        linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #000000 100%);
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.002) 50%, transparent 100%),
        radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.008) 0%, transparent 40%),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.008) 0%, transparent 40%),
        conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(255, 255, 255, 0.003) 90deg, transparent 180deg, rgba(255, 255, 255, 0.003) 270deg, transparent 360deg);
    z-index: 1;
    animation: backgroundShift 30s linear infinite;
}

@keyframes backgroundShift {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

#bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.hero-text {
    text-align: center;
    animation: fadeInUp 1.5s ease 0.8s both;
}

.hero-title {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
    font-family: 'Inter', sans-serif;
}

.hero-title .line {
    display: block;
    opacity: 0;
    transform: translateY(80px) rotateX(20deg);
    animation: slideUp3D 1.2s ease forwards;
    transform-style: preserve-3d;
}

.hero-title .line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s ease forwards;
    color: #ffffff;
    margin-bottom: 8px;
}

.hero-title .line:first-child {
    animation-delay: 0.2s;
}

.hero-title .line:nth-child(2) {
    animation-delay: 0.4s;
    color: rgba(255, 255, 255, 0.9);
}

.hero-title .line:nth-child(3) {
    animation-delay: 0.6s;
    color: rgba(255, 255, 255, 0.7);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4rem;
    max-width: 600px;
    font-weight: 200;
    letter-spacing: 0.05em;
    line-height: 1.8;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 3rem;
    justify-content: center;
}

.btn-primary, .btn-secondary {
    position: relative;
    padding: 1rem 2.5rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 200;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    backdrop-filter: blur(20px);
    border-radius: 0;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.01);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.btn-primary:hover {
    transform: translateY(-4px) translateZ(20px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.95);
}

.btn-secondary:hover {
    transform: translateY(-4px) translateZ(20px);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.015);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.9);
}

.btn-bg {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.02), transparent);
    transition: left 0.8s ease;
}

.btn-primary:hover .btn-bg,
.btn-secondary:hover .btn-bg {
    left: 100%;
}

.hero-visual {
    display: none;
}

.floating-elements {
    display: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(120deg); }
    66% { transform: translateY(20px) rotate(240deg); }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    animation: bounce 2s infinite;
}

.scroll-indicator .lambda-symbol {
    font-size: 1.5rem;
    color: var(--gray-text);
    opacity: 0.6;
}

.scroll-indicator::after {
    content: '↓';
    font-size: 1.2rem;
    color: var(--gray-text);
    opacity: 0.6;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Secciones generales */
.section {
    min-height: 100vh;
    padding: 8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.section:nth-child(even) {
    background: var(--darker-bg);
}

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

.section-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem;
}

.section-number {
    font-size: 1rem;
    font-family: var(--font-mono);
    color: var(--primary-color);
    font-weight: 600;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--light-text);
    margin: 0;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--gray-text), transparent);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.text-block {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.text-block:nth-child(2) {
    animation-delay: 0.2s;
}

.large-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--light-text);
    margin-bottom: 1rem;
    line-height: 1.4;
}

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

/* Work Section */
.work-section {
    padding: 100px 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.003) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.003) 0%, transparent 50%),
        #000000;
    position: relative;
    overflow: hidden;
}

.work-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.005), transparent);
    animation: sweep 20s linear infinite;
}

@keyframes sweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    max-width: 1000px;
    margin: 0 auto;
}

.work-item {
    padding: 80px 60px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.work-item:hover {
    background: rgba(255, 255, 255, 0.008);
    border-color: rgba(255, 255, 255, 0.08);
    transform: scale(1.02) translateZ(30px) rotateX(5deg);
    z-index: 10;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.work-number {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 200;
}

.work-item h3 {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: -0.02em;
    transition: all 0.4s ease;
}

.work-item:hover h3 {
    color: #ffffff;
    transform: translateY(-5px);
}

.work-item p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    font-weight: 200;
    transition: all 0.4s ease;
}

.work-item:hover p {
    color: rgba(255, 255, 255, 0.7);
}

/* Services Section */
.services-section {
    background: var(--darker-bg);
}

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

.service-card {
    position: relative;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    overflow: hidden;
    cursor: pointer;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 0;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--light-text);
    box-shadow: var(--shadow-medium);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(10deg);
}

.service-icon .material-icons {
    font-size: 2rem;
    color: var(--light-text);
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light-text);
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--gray-text);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.service-hover {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.service-card:hover .service-hover {
    opacity: 1;
    transform: translateY(0);
}

.service-hover ul {
    list-style: none;
    padding: 0;
}

.service-hover li {
    color: var(--gray-text);
    font-size: 0.875rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    padding-left: 1.5rem;
}

.service-hover li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--light-text);
}

.service-hover li:last-child {
    border-bottom: none;
}

/* Contact Section */
.contact-section {
    background: var(--dark-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--light-text);
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--gray-text);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--gray-text);
}

.contact-item .material-icons {
    color: var(--light-text);
    font-size: 1.5rem;
}

.contact-item a {
    color: var(--light-text);
    text-decoration: none;
    transition: var(--transition);
}

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

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    color: var(--light-text);
    font-size: 1rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--light-text);
    background: rgba(255, 255, 255, 0.1);
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--gray-text);
    font-size: 1rem;
    transition: var(--transition);
    pointer-events: none;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -0.5rem;
    left: 0.5rem;
    font-size: 0.875rem;
    color: var(--light-text);
    background: var(--dark-bg);
    padding: 0 0.5rem;
}

.submit-btn {
    position: relative;
    padding: 1rem 2rem;
    background: var(--light-text);
    border: none;
    border-radius: var(--border-radius);
    color: var(--dark-bg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition);
    align-self: flex-start;
}

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

.submit-btn:hover .btn-bg {
    left: 0;
}

/* Footer */
.footer {
    background: var(--darker-bg);
    padding: 4rem 2rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-brand img {
    width: 48px;
    height: 48px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--light-text);
}

.footer-brand p {
    color: var(--gray-text);
    font-size: 0.875rem;
}

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

.link-group h4 {
    color: var(--light-text);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.link-group a {
    display: block;
    color: var(--gray-text);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.link-group a:hover {
    color: var(--light-text);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: var(--gray-text);
    font-size: 0.875rem;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    color: var(--light-text);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

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

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .geometric-shapes {
        width: 300px;
        height: 300px;
    }
    
    .shape {
        transform: scale(0.8) !important;
    }
    
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .work-grid {
        grid-template-columns: 1fr;
    }
    
    .work-item {
        padding: 60px 40px;
    }
    
    .work-item h3 {
        font-size: 1.5rem;
    }
    
    .hero-content {
        padding: 0 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
        gap: 2rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 1rem 2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 4rem 1rem;
    }
    
    .header-content {
        padding: 0 1rem;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
}
