/* Apple-Inspired Design System - HexaCode "Yellow & Black" Edition */
:root {
    /* Colors - Light Mode (default) */
    --primary-yellow: #F4D03F;
    --primary-dark: #1D1D1F;
    --primary-light: #FDFCE9;
    --bg-base: #FBFBFA;
    --text-primary: #1D1D1F;
    --text-secondary: #6E6E73;
    --accent-gold: #B7950B;
    --nav-bg: rgba(253, 252, 233, 0.82);
    --card-bg: #FFFFFF;
    --card-border: rgba(0, 0, 0, 0.06);
    --section-alt-bg: #F5F5F7;

    /* SF-like Typography */
    --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;

    /* Spacing & Layout */
    --section-gap: 120px;
    --border-radius-xl: 32px;
    --border-radius-lg: 18px;
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.04);
    --shadow-premium: 0 40px 100px rgba(0, 0, 0, 0.1);
}

/* Dark Mode overrides */
[data-theme="dark"] {
    --primary-light: #1D1D1F;
    --bg-base: #111112;
    --text-primary: #F5F5F7;
    --text-secondary: #86868B;
    --nav-bg: rgba(29, 29, 31, 0.82);
    --card-bg: #2C2C2E;
    --card-border: rgba(255, 255, 255, 0.08);
    --section-alt-bg: #1C1C1E;
    --accent-gold: #F4D03F;
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-premium: 0 40px 100px rgba(0, 0, 0, 0.5);
}

/* Theme toggle button */
#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 18px;
    transition: background 0.2s, transform 0.3s;
    flex-shrink: 0;
}

#theme-toggle:hover {
    background: rgba(128, 128, 128, 0.12);
    transform: rotate(20deg);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--primary-light);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -0.022em;
    overflow-x: hidden;
}

/* Glassmorphism Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 48px;
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--card-border);
}

.nav-content {
    width: 100%;
    max-width: 1024px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-brand img {
    width: 22px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 400;
    opacity: 0.8;
    text-decoration: none;
    transition: opacity 0.2s;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--accent-gold);
}

/* Hero Section */
.hero {
    padding-top: 140px;
    padding-bottom: 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(40px, 8vw, 80px);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.07143;
    margin-bottom: 12px;
}

.hero p {
    margin: 0 auto;
    line-height: 1.6;
    font-size: clamp(20px, 2.5vw, 26px);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 850px;
    letter-spacing: 0.011em;
}

.hero-image-logo {
    width: 100%;
    max-width: 120px;
    margin-bottom: 60px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 60px;
}

.btn-primary-apple {
    background: var(--primary-dark);
    color: var(--primary-yellow);
    padding: 12px 28px;
    border-radius: 980px;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: 2px solid var(--primary-dark);
}

.btn-primary-apple:hover {
    background: #000;
    transform: scale(1.02);
}

.btn-link-apple {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 19px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-link-apple:hover {
    text-decoration: underline;
    color: var(--accent-gold);
}

/* Product Display */
.product-display {
    width: 100%;
    max-width: 1000px;
    padding: 0 40px;
    margin-bottom: 40px;
}

.image-frame {
    background: #fff;
    padding: 10px;
    border-radius: 30px;
    box-shadow: var(--shadow-premium);
    transition: transform 0.6s cubic-bezier(0.15, 0, 0.2, 1);
}

.image-frame img {
    width: 100%;
    border-radius: 22px;
    display: block;
}

/* Feature Grid */
.grid {
    max-width: 1024px;
    margin: 0 auto 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 0 20px;
}

.card {
    background: #fff;
    border-radius: 28px;
    padding: 60px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}

.card-yellow {
    background: #fff6d1;
    border: 1px solid rgba(244, 208, 63, 0.2);
}

.card-wide {
    grid-column: span 2;
}

.card h2 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
    color: #1D1D1F;
}

.card p {
    font-size: 21px;
    color: var(--text-secondary);
    line-height: 1.381;
    max-width: 600px;
}

.card-visual {
    margin-top: 40px;
    width: 100%;
}

.window-mockup {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    background: #000;
}

/* Institutional Strip */
.inst-strip {
    background: #fff;
    padding: 120px 20px;
    text-align: center;
    margin-bottom: 80px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.inst-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-pair {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    margin-bottom: 60px;
}

.unam-logo-large {
    height: 200px;
    width: auto;
    object-fit: contain;
}

.lmi-logo-large {
    height: 120px;
    width: auto;
    object-fit: contain;
    opacity: 0.95;
}

.inst-text h2 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    color: #1D1D1F;
}

.inst-links {
    display: flex;
    gap: 30px;
    margin-top: 50px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.inst-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    /* Equal horizontal space for each logo */
    height: 80px;
    /* Equal vertical space for each logo */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.inst-logo-link {
    max-height: 55px;
    /* Reducido levemente para todos */
    max-width: 100%;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    opacity: 0.9;
}

/* Compensación visual para el logo de DIE que es naturalmente más pesado */
.logo-die {
    padding: 10px 0;
}

.inst-links a:hover {
    transform: translateY(-5px);
    /* Lift effect */
}

.inst-links a:hover .inst-logo-link {
    opacity: 1;
}

.inst-text p {
    font-size: 24px;
    color: var(--text-secondary);
    max-width: 850px;
    line-height: 1.4;
}

/* Info Strip */
.strip {
    display: flex;
    gap: 80px;
    margin-top: 40px;
    justify-content: center;
}

.item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.item img {
    width: 50px;
}

.item span {
    font-weight: 600;
    font-size: 14px;
}

/* Footer */
footer {
    background: #111112;
    padding: 70px 22px 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff;
}

.footer-content {
    max-width: 1024px;
    margin: 0 auto;
}

/* Footer top: brand + CTA */
.footer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-brand-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #f5f5f7;
}

.footer-logo img {
    height: 28px;
    filter: brightness(0) invert(1);
}

.footer-tagline {
    font-size: 14px;
    color: #86868b;
    line-height: 1.7;
    margin: 0;
}

.footer-cta {
    display: inline-flex;
    align-items: center;
    padding: 12px 26px;
    background: var(--primary-yellow);
    color: #111112;
    font-size: 14px;
    font-weight: 700;
    border-radius: 980px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.footer-cta:hover {
    background: #f0c800;
    transform: scale(1.04);
}

/* Divider */
.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin-bottom: 36px;
}

/* Bottom bar */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-legal {
    font-size: 12px;
    color: #86868b;
    line-height: 1.7;
}

.social {
    display: flex;
    gap: 12px;
}

.social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.social img {
    width: 17px;
    filter: brightness(0) invert(1);
    opacity: 0.75;
    transition: opacity 0.2s;
}

.social a:hover {
    background: var(--primary-yellow);
    border-color: var(--primary-yellow);
    transform: translateY(-3px);
}

.social a:hover img {
    filter: brightness(0);
    opacity: 1;
}


/* Credits Section */
.credits-section {
    padding: 120px 20px;
    background-color: var(--primary-light);
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.credits-content {
    max-width: 1000px;
    margin: 0 auto;
}

.credits-content h2 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.credits-intro {
    font-size: 22px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 60px;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.credits-subtitle {
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 50px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.credits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 60px;
}

.credits-group h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-primary);
}

.credits-group h3 span {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--primary-yellow);
    border-radius: 2px;
}

.credits-group ul {
    list-style: none;
    padding: 0;
}

.credits-group li {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.2s;
}

.credits-group li:hover {
    color: var(--text-primary);
}

/* Mobile */
@media (max-width: 734px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .card-wide {
        grid-column: span 1;
    }

    .hero h1 {
        font-size: 44px;
    }

    .hero p {
        font-size: 19px;
    }

    .inst-text h2 {
        font-size: 32px;
    }

    .nav-links {
        display: none;
    }

    .logo-pair {
        flex-direction: column;
        gap: 50px;
    }

    .unam-logo-large {
        height: 160px;
    }

    .lmi-logo-large {
        height: 80px;
    }

    .credits-content h2 {
        font-size: 32px;
    }

    .credits-intro {
        font-size: 18px;
    }

    .credits-group h3 {
        font-size: 18px;
    }
}