:root {
    /* Design Tokens */
    --color-bg-dark: #070913;
    --color-neon-cyan: #00f0ff;
    --color-neon-magenta: #b026ff;
    --color-neon-blue: #2a52be;
    --color-text-main: #ffffff;
    --color-text-muted: #b5c4cf;
    --color-glass: rgba(15, 20, 35, 0.6);
    --color-glass-hover: rgba(25, 30, 50, 0.8);
    --color-glass-border: rgba(255, 255, 255, 0.08);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-dark);
    color: var(--color-text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Background image layer with contrast adjustments */
.bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('fondo_opt.jpg'); /* Updated to optimized background */
    background-size: cover;
    background-position: center;
    /* Enhancing contrast and color without making it too dark */
    filter: contrast(1.2) saturate(1.2);
    z-index: 0;
}

/* Dark overlay for text readability */
.bg-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(7, 9, 19, 0.5); /* Lighter tint to show the image */
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 680px;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Header Styles */
.header {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tagline-badge {
    background-color: var(--color-neon-cyan);
    color: var(--color-bg-dark);
    font-weight: 800;
    font-size: 0.75rem;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 100px;
    background: radial-gradient(circle, var(--color-neon-magenta) 0%, transparent 70%);
    filter: blur(40px);
    opacity: 0.5;
    z-index: -1;
    animation: pulse 4s infinite alternate;
}

.main-logo {
    width: 280px;
    max-width: 90%;
    height: auto;
    /* Negative margins to remove the transparent space embedded in the image file */
    margin-top: -60px;
    margin-bottom: -40px;
    filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.3));
    animation: float 6s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

.subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* Links Grid (Stitch Cards) */
.links-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.stitch-card {
    display: flex;
    align-items: center;
    background: var(--color-glass);
    border: 1px solid var(--color-glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--color-text-main);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

/* Subtle glow effect behind cards */
.stitch-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: var(--transition-smooth);
}

.stitch-card:hover {
    background: var(--color-glass-hover);
    border-color: var(--color-neon-cyan);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px -10px rgba(0, 240, 255, 0.2);
}

.stitch-card:hover::before {
    transform: translateX(100%);
}

.card-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    color: var(--color-neon-cyan);
    transition: var(--transition-smooth);
}

.stitch-card:hover .card-icon {
    background: rgba(0, 240, 255, 0.1);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.card-content {
    flex-grow: 1;
}

.card-content h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    letter-spacing: 0.01em;
}

.card-content p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    transition: var(--transition-smooth);
}

.stitch-card:hover .card-content p {
    color: #e0e5ea;
}

.card-arrow {
    flex-shrink: 0;
    color: var(--color-text-muted);
    opacity: 0.5;
    transform: translateX(-10px);
    transition: var(--transition-smooth);
    margin-left: 1rem;
}

.stitch-card:hover .card-arrow {
    opacity: 1;
    color: var(--color-neon-magenta);
    transform: translateX(0);
}

/* Footer */
.footer {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-glass-border);
}

/* Animations */
@keyframes pulse {
    0% { opacity: 0.3; transform: translate(-50%, -50%) scale(0.9); }
    100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); }
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 2rem 1rem;
        gap: 2rem;
    }
    
    .tagline-badge {
        font-size: 0.65rem;
        padding: 0.35rem 0.8rem;
        margin-bottom: 0.5rem;
        letter-spacing: 0.02em;
    }
    
    .main-logo {
        width: 260px;
        margin-top: -60px;
        margin-bottom: -40px;
    }
    
    .subtitle {
        font-size: 0.95rem;
        line-height: 1.45;
        padding: 0 0.5rem;
    }
    
    .links-grid {
        gap: 1rem;
    }
    
    .stitch-card {
        padding: 1rem;
        border-radius: 14px;
    }
    
    .card-icon {
        width: 38px;
        height: 38px;
        margin-right: 0.85rem;
        border-radius: 10px;
    }
    
    .card-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .card-content h2 {
        font-size: 1.1rem;
        margin-bottom: 0.15rem;
    }
    
    .card-content p {
        font-size: 0.82rem;
        line-height: 1.35;
    }

    .card-arrow {
        margin-left: 0.5rem;
    }
    
    .card-arrow svg {
        width: 18px;
        height: 18px;
    }
}
