/* ========================================
   LABIAS DESIGN SYSTEM (LDS) v3.0 - PRODUCTION
   ========================================
*/

:root {
    /* Colores Base */
    --bg-dark: #0F111A;
    --surface: #1A1E2E;
    --border-light: rgba(255, 255, 255, 0.08);

    /* Colores Acento (Neones) */
    --primary: #FF75A0;
    /* Neon Pink */
    --secondary: #00F5D4;
    /* Electric Cyan */
    --brand-blue: #3D4C8F;
    /* Legacy Blue */
    --action: #6366F1;
    /* Hyper Violet */

    /* Tipografía */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --text-light: #F0F2F5;
    --text-dim: #94A3B8;

    /* Layout */
    --container-width: 1280px;
    --header-height: 90px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --section-spacing: 8rem;
}

/* Reset & Base */
html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-dim);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Generic Image Reset */
img {
    max-width: 100%;
    display: block;
}

/* Noise Texture */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    color: var(--text-light);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

strong {
    color: var(--text-light);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.text-gradient {
    background: linear-gradient(90deg, var(--secondary), var(--action));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-accent {
    color: var(--primary);
}

.text-center {
    text-align: center;
}

/* Layout Utilities */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

section {
    padding: var(--section-spacing) 0;
    position: relative;
}

/* UI Components */
.glass-panel {
    background: rgba(26, 30, 46, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-panel:hover {
    border-color: rgba(255, 117, 160, 0.25);
    background: rgba(26, 30, 46, 0.5);
    transform: translateY(-8px);
}

.resource-card {
    padding: 2rem;
}

.resource-card .btn {
    padding: 14px 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.btn-neon {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(255, 117, 160, 0.3);
}

.btn-neon:hover {
    box-shadow: 0 0 35px rgba(255, 117, 160, 0.6);
    transform: scale(1.02);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--secondary);
    color: var(--secondary);
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.05);
}

.btn-ghost:hover {
    background: rgba(0, 245, 212, 0.08);
    box-shadow: 0 0 20px rgba(0, 245, 212, 0.2);
}

/* Ambient Glows */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
}

.orb-blue {
    width: 500px;
    height: 500px;
    background: var(--brand-blue);
    top: -150px;
    left: -150px;
}

.orb-pink {
    width: 400px;
    height: 400px;
    background: var(--primary);
    bottom: 0;
    right: -100px;
    opacity: 0.25;
}

/* Header */
header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(15, 17, 26, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--text-light);
    letter-spacing: -0.03em;
}

.logo img {
    height: 36px;
    width: auto;
}

nav ul {
    display: flex;
    gap: 2.5rem;
}

nav a {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.9;
}

nav a:hover {
    color: var(--secondary);
    opacity: 1;
    text-shadow: 0 0 12px rgba(0, 245, 212, 0.4);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

/* Hero Section */
#hero {
    min-height: 95vh;
    display: flex;
    align-items: center;
    padding-top: calc(var(--header-height) + 6rem);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 5rem;
    align-items: center;
}

.hero-copy {
    font-size: 1.15rem;
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-copy p {
    margin-bottom: 1.2rem;
}

.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 2rem;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 50px;
}

/* Magic Cards Animation */
.magic-card-container {
    position: relative;
    width: 340px;
    height: 420px;
    perspective: 1200px;
    margin: 0 auto;
    animation: float 7s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.magic-card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(155deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
    text-align: center;
    transition: all 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    opacity: 0;
    transform: translateY(60px) scale(0.9) rotateX(5deg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.magic-card.active {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
    z-index: 2;
    border-color: rgba(0, 245, 212, 0.3);
    box-shadow: 0 0 40px rgba(0, 245, 212, 0.1);
    pointer-events: auto;
}

.magic-card.exit {
    opacity: 0;
    transform: translateY(-60px) scale(1.05);
    z-index: 1;
}

.card-icon-glow {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 15px var(--secondary));
}

/* Gallery / Location Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-light);
    aspect-ratio: 1 / 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: grayscale(40%);
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

/* Philosophy Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
}

.feature-card h3 {
    color: var(--text-light);
    font-size: 1.25rem;
}

.feature-num {
    font-family: var(--font-display);
    font-size: 4rem;
    opacity: 0.05;
    position: absolute;
    top: 0px;
    right: 20px;
    font-weight: 700;
    color: var(--secondary);
}

/* Ecosystem */
#ecosystem {
    background: linear-gradient(to bottom, var(--bg-dark), #12151f);
}

.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 4rem;
}

.eco-card {
    border-top: 2px solid transparent;
    display: flex;
    flex-direction: column;
    min-height: 480px;
}

.eco-card.edu {
    border-top-color: var(--secondary);
}

.eco-card.community {
    border-top-color: var(--primary);
    background: linear-gradient(180deg, rgba(26, 30, 46, 0.4) 0%, rgba(255, 117, 160, 0.03) 100%);
}

.eco-card.solutions {
    border-top-color: var(--action);
}

.eco-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    display: block;
    font-weight: 700;
    opacity: 0.9;
}

/* Audience Bento */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.bento-item {
    text-align: center;
    padding: 3.5rem 2rem;
    justify-content: flex-start;
}

.bento-svg {
    width: 72px;
    height: 72px;
    margin-bottom: 2rem;
    stroke: var(--secondary);
    stroke-width: 1.2;
    fill: none;
    filter: drop-shadow(0 0 8px rgba(0, 245, 212, 0.2));
}

/* FAQ */
details {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1.5rem;
}

summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--text-light);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: "+";
    font-size: 1.8rem;
    color: var(--secondary);
    transition: transform 0.3s;
    font-weight: 300;
}

details[open] summary::after {
    transform: rotate(45deg);
}

details p {
    margin-top: 1.2rem;
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.8;
    color: var(--text-dim);
}

/* Alfonso Teaser */
.alfon-flex {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.alfon-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary);
    box-shadow: 0 0 20px rgba(0, 245, 212, 0.15);
}

/* Footer */
footer {
    border-top: 1px solid var(--border-light);
    padding: 5rem 0;
    margin-top: 6rem;
    font-size: 0.95rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col a:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 900px) {
    :root {
        --section-spacing: 3.5rem;
    }

    h1 {
        font-size: 2.8rem;
    }

    #hero {
        padding-top: calc(var(--header-height) + 3rem);
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 3rem;
    }

    .hero-visual {
        display: none;
    }

    .bento-grid,
    .ecosystem-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        display: flex;
        flex-direction: column;
    }

    .gallery-item {
        /* height: 200px;  Removed to respect aspect-ratio */
        width: 100%;
    }

    .mobile-toggle {
        display: block;
    }

    nav ul {
        display: none;
    }

    .alfon-flex {
        flex-direction: column;
        text-align: center;
    }

    .header-content {
        padding: 0 1rem;
    }

    .hidden-mobile {
        display: none !important;
    }
}

/* Code Block & Copy Feedback Styles */
.code-block-wrapper {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 2rem;
    overflow-x: auto;
}

pre {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-dim);
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

.btn-neon.copied {
    background: var(--secondary) !important;
    color: #0F111A !important;
    box-shadow: 0 0 15px rgba(0, 245, 212, 0.4);
}