/* ============================================
   Energías Renovables — Design System
   Eco-friendly, moderno, vibrante
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --color-green-deep: #0a6e3e;
    --color-green: #1a8a5c;
    --color-green-mid: #2d9f6e;
    --color-green-light: #e8f5ee;
    --color-green-pale: #f0faf4;
    --color-sun: #f5c518;
    --color-sun-light: #fef3c7;
    --color-blue: #1a6fb5;
    --color-blue-light: #dbeafe;
    --color-dark: #0a1a0f;
    --color-dark-surface: #0f2416;
    --color-bg: #f8fbf9;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-text-secondary: #6b7280;
    --color-text-tertiary: #9ca3af;
    --color-border: #e5e7eb;
    --color-error: #ef4444;

    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --section-padding: 100px 0;
    --container-width: 1120px;
    --container-padding: 0 24px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-slow: 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --shadow-glow: 0 0 30px rgba(10, 110, 62, 0.3);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--container-padding);
}

/* --- Utilities --- */
.text-sun { color: var(--color-sun); }

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(248, 251, 249, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: var(--color-dark);
}

.logo-accent {
    color: var(--color-green-deep);
    margin-left: 4px;
}

.nav {
    display: flex;
    gap: 28px;
}

.nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-green-deep);
    transition: var(--transition);
    border-radius: 2px;
}

.nav a:hover {
    color: var(--color-green-deep);
}

.nav a:hover::after {
    width: 100%;
}

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

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 56px;
    overflow: hidden;
    background: var(--color-dark);
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(10, 26, 15, 0.85) 0%,
        rgba(10, 110, 62, 0.65) 40%,
        rgba(26, 111, 181, 0.4) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 780px;
    margin: 0 auto;
    padding: 80px 24px;
}

.hero-eyebrow {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-sun);
    padding: 6px 18px;
    border: 1px solid rgba(245, 197, 24, 0.3);
    border-radius: 100px;
    background: rgba(245, 197, 24, 0.1);
    margin-bottom: 28px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(44px, 7vw, 80px);
    font-weight: 800;
    line-height: 1.05;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.hero-title-slim {
    font-weight: 400;
    font-size: 0.7em;
    display: block;
    opacity: 0.85;
    letter-spacing: -0.01em;
}

.hero-subtitle {
    font-size: clamp(16px, 1.8vw, 20px);
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
    margin: 20px auto 36px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    color: #fff;
    background: var(--color-green-deep);
}

.btn-primary:hover {
    background: #085832;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 16px;
}

.hero-scroll {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    animation: float 3s ease-in-out infinite;
}

.scroll-arrow {
    width: 18px;
    height: 18px;
    border-right: 2px solid rgba(255, 255, 255, 0.4);
    border-bottom: 2px solid rgba(255, 255, 255, 0.4);
    transform: rotate(45deg);
    animation: scrollBounce 2s ease-in-out infinite;
}

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

@keyframes scrollBounce {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* --- Sections --- */
.section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 56px;
}

.section-eyebrow {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-green-deep);
    padding: 5px 14px;
    border: 1px solid rgba(10, 110, 62, 0.2);
    border-radius: 100px;
    background: rgba(10, 110, 62, 0.06);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(30px, 4.5vw, 48px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    color: var(--color-dark);
}

.section-desc {
    font-size: 17px;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* --- Stats Section --- */
.stats-section {
    background: var(--color-surface);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(10, 110, 62, 0.04) 0%, transparent 70%);
    border-radius: 50%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    background: var(--color-green-pale);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    border: 1px solid rgba(10, 110, 62, 0.08);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(10, 110, 62, 0.15);
}

.stat-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    color: var(--color-green-deep);
}

.stat-icon svg {
    width: 100%;
    height: 100%;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--color-green-deep);
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.stat-source {
    font-size: 11px;
    color: var(--color-text-tertiary);
    font-style: italic;
}

/* --- Types Section --- */
.types-section {
    background: var(--color-bg);
}

.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.type-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.type-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.type-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--color-green-light);
}

.type-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.type-card:hover .type-card-image img {
    transform: scale(1.05);
}

.type-card-body {
    padding: 24px;
}

.type-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.type-card-body h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
}

.type-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 100px;
    background: var(--color-green-light);
    color: var(--color-green-deep);
}

.type-card-body p {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* --- Benefits Section --- */
.benefits-section {
    background: var(--color-dark);
    color: #fff;
}

.benefits-section .section-title { color: #fff; }
.benefits-section .section-desc { color: rgba(255, 255, 255, 0.65); }
.benefits-section .section-eyebrow {
    color: var(--color-sun);
    border-color: rgba(245, 197, 24, 0.25);
    background: rgba(245, 197, 24, 0.08);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.benefit-card {
    background: var(--color-dark-surface);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition);
}

.benefit-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.benefit-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.benefit-icon svg {
    width: 28px;
    height: 28px;
}

.benefit-icon-green {
    background: rgba(10, 110, 62, 0.2);
    color: var(--color-green-mid);
}

.benefit-icon-sun {
    background: rgba(245, 197, 24, 0.15);
    color: var(--color-sun);
}

.benefit-icon-blue {
    background: rgba(26, 111, 181, 0.15);
    color: var(--color-blue);
}

.benefit-card h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #fff;
}

.benefit-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
    margin-bottom: 16px;
}

.benefit-list {
    list-style: none;
    padding: 0;
}

.benefit-list li {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 6px;
}

/* --- Gallery Section --- */
.gallery-section {
    background: var(--color-surface);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--color-green-light);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item:first-child {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: auto;
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-green-light), var(--color-blue-light));
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

/* --- CTA Section --- */
.cta-section {
    background: linear-gradient(135deg, var(--color-dark) 0%, #0a3d22 50%, var(--color-dark) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(10, 110, 62, 0.12) 0%, transparent 60%);
    border-radius: 50%;
}

.cta-inner {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.cta-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    color: var(--color-sun);
}

.cta-icon svg {
    width: 100%;
    height: 100%;
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.cta-desc {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 32px;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Footer --- */
.footer {
    background: var(--color-dark-surface);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 64px 0 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 60px;
    padding-bottom: 48px;
}

.footer-brand .logo {
    color: #fff;
    margin-bottom: 16px;
}

.footer-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    max-width: 340px;
    margin-bottom: 20px;
}

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

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    transition: var(--transition);
}

.footer-social a svg {
    width: 16px;
    height: 16px;
}

.footer-social a:hover {
    background: var(--color-green-deep);
    color: #fff;
}

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

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--color-green-mid);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 0;
}

.footer-bottom p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
}

/* --- Scroll Animations --- */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-aos].visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 72px 0;
    }

    .nav {
        display: none;
    }

    .nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: rgba(248, 251, 249, 0.98);
        backdrop-filter: blur(20px);
        padding: 20px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--color-border);
    }

    .menu-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-cta, .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 24px 16px;
    }

    .stat-value {
        font-size: 26px;
    }

    .types-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }

    .gallery-item:first-child {
        grid-column: span 2;
        grid-row: span 1;
        aspect-ratio: 4/3;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

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

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item:first-child {
        grid-column: 1;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    [data-aos] {
        opacity: 1;
        transform: none;
    }
}
