/* Reseteo y Variables Globales */
:root {
    --primary-hue: 220;
    --primary-sat: 90%;
    --primary-light: 55%;

    --color-primary: hsl(var(--primary-hue), var(--primary-sat), var(--primary-light));
    --color-primary-dark: hsl(var(--primary-hue), var(--primary-sat), 45%);

    --bg-body: #ffffff;
    --bg-surface: #f8fafc;
    --bg-card: #ffffff;

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-on-primary: #ffffff;

    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --radius-md: 0.5rem;
    --radius-lg: 1rem;

    --container-width: 1024px;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

    --transition-base: all 0.3s ease;
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-surface: #1e293b;
    --bg-card: #1e293b;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --border-color: #334155;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

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

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 16px;
    /* Base size */
}

/* Imágenes Fluidas */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout Utils */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.25rem;
    /* ~20px padding lateral en móvil */
}

.grid {
    display: grid;
    gap: 2rem;
}

.section {
    padding: 4rem 0;
    /* Menos padding vertical en móvil */
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeIn 0.8s ease-out;
}

.section-header h2 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.bg-subtle {
    background-color: var(--bg-surface);
}

/* Navegación */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    padding: 0.75rem 0;
}

[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.9);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-primary);
}

/* Toggle Tema */
.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.theme-btn:hover {
    background-color: var(--bg-surface);
}

.icon-sun,
.icon-moon {
    display: none;
}

[data-theme="light"] .icon-moon {
    display: block;
}

[data-theme="dark"] .icon-sun {
    display: block;
}

/* Hero Section */
.hero {
    padding: 4rem 0 3rem;
    text-align: center;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    animation: slideUp 0.8s ease-out;
}

.badge-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background-color: var(--bg-surface);
    color: var(--color-primary);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    letter-spacing: 0.5px;
}

.hero h1 {
    /* CLAMP: Mínimo 2.2rem, Preferido 7vw, Máximo 4rem */
    font-size: clamp(2.2rem, 7vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .subtitle {
    font-size: clamp(1rem, 4vw, 1.25rem);
    color: var(--text-main);
    margin-bottom: 1rem;
    font-weight: 500;
    line-height: 1.5;
}

.hero .description {
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.95rem;
}

.hero-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 1rem;
    white-space: nowrap;
}

/* En móvil, los botones pueden ocupar más ancho para facilitar el tap */
@media (max-width: 480px) {
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--text-on-primary);
    box-shadow: 0 4px 14px 0 rgba(0, 118, 255, 0.39);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(0, 118, 255, 0.23);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--bg-surface);
    border-color: var(--text-main);
}

/* Features Cards */
.features-grid {
    /* Mobile First: 1 columna por defecto */
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Tablet y Desktop: Ajuste automático */
@media (min-width: 640px) {
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

.card {
    background: var(--bg-card);
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

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

.card .icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: var(--bg-surface);
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Tech List */
.tech-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
}

.tech-list li {
    background: var(--bg-card);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition-base);
}

.tech-list li:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Galería Carousel */
.carousel-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    background: var(--bg-surface);
    /* Aspect ratio adaptativo para evitar saltos */
    aspect-ratio: 16/10;
}

@media (max-width: 480px) {
    .carousel-container {
        aspect-ratio: 1/1;
        /* Más cuadrado en móvil para ver mejor */
    }
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    /* Padding interno para que la imagen no toque bordes */
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .carousel-btn {
    background: rgba(30, 41, 59, 0.8);
    color: white;
}

.carousel-btn:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.prev {
    left: 1rem;
}

.next {
    right: 1rem;
}

/* Download Section */
.download {
    text-align: center;
}

.download-content {
    max-width: 600px;
    background: var(--bg-card);
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin: 0 auto;
}

.download h2 {
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.download p {
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.download .note {
    font-size: 0.85rem;
    margin-top: 1.5rem;
    margin-bottom: 0;
    opacity: 0.8;
}

/* Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 2rem;
    text-align: center;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-num {
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0, 118, 255, 0.3);
}

.step p {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}

/* Contact */
.contact {
    text-align: center;
    padding-bottom: 6rem;
}

.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

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

.copyright {
    margin-top: 0.5rem;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* DESKTOP OVERRIDES */
@media (min-width: 768px) {
    .section {
        padding: 6rem 0;
    }

    .hero {
        padding-top: 6rem;
    }

    .nav-container {
        padding: 0 1.5rem;
    }

    .download-content {
        padding: 3.5rem;
    }

    .logo {
        font-size: 1.25rem;
    }
}




.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.logo-img {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.logo-text {
    font-weight: 700;
}