/* ============================================================
   ODEA — Design System (Corporate Warm Edition)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette - Corporate Warm (Light Mode) */
    --bg: #ffffff;
    --surface: #f8fafc;
    --surface-border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --accent: #2563eb;
    /* Electric Blue */
    --accent-hover: #1d4ed8;
    --accent-soft: rgba(37, 99, 235, 0.08);

    --success: #10b981;
    --warning: #f59e0b;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0f172a;
        --surface: #1e293b;
        --surface-border: #334155;
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --text-muted: #64748b;

        --accent: #3b82f6;
        --accent-hover: #60a5fa;
        --accent-soft: rgba(59, 130, 246, 0.15);

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    }
}

[data-theme="dark"] {
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-border: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;

    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-soft: rgba(59, 130, 246, 0.15);
}

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

body {
    background-color: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Layout Elements */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    align-items: center;
    background: var(--bg);
    border-bottom: 1px solid var(--surface-border);
    z-index: 1000;
    transition: var(--transition);
}

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

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--accent);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--surface-border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background-color: var(--accent-soft);
}

/* Hero Section */
.hero {
    padding: 160px 0 100px;
    background: radial-gradient(circle at 80% 20%, var(--accent-soft) 0%, transparent 40%);
}

.hero-text {
    max-width: 800px;
    margin-bottom: 4rem;
}

.eyebrow {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--accent-soft);
    border-radius: 100px;
}

h1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 4rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

h1 .accent {
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent-soft), 0 0 30px var(--accent-soft);
    position: relative;
    display: inline-block;
    animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
    0% {
        text-shadow: 0 0 15px var(--accent-soft), 0 0 30px var(--accent-soft);
    }

    100% {
        text-shadow: 0 0 25px rgba(37, 99, 235, 0.4), 0 0 50px rgba(37, 99, 235, 0.2);
    }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    position: relative;
    z-index: 1;
}

.visual-container {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.visual-container img {
    width: 100%;
    display: block;
    border-radius: var(--radius-md);
}

/* Estudio "absorbido" por la laptop al hacer scroll */
.studio-scroll {
    position: relative;
    height: 230vh;
}

.studio-scroll-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* El frame mantiene la proporción exacta de las fotos (1672x941) sin
   deformarlas, del mismo modo que object-fit:contain lo haría para una sola
   imagen. Así los artefactos superpuestos (posicionados en % dentro de este
   frame) quedan siempre pixel-perfect alineados con la foto de fondo, sea
   cual sea la proporción de la pantalla. */
.studio-frame {
    position: relative;
    width: min(100vw, 177.68vh);
    height: min(100vh, 56.28vw);
}

.studio-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.studio-img-base {
    z-index: 1;
}

.studio-img-reveal {
    z-index: 2;
    opacity: 0;
}

/* Tapa temporal del "ECHO" horneado en la foto studio-echo (ver comentario en
   index.html) hasta que se regenere esa foto con "ODEA". Mismo centro que
   usa el vuelo de los artefactos (49.2%, 55.3%) para quedar sobre la pantalla
   de la laptop. */
.studio-logo-patch {
    position: absolute;
    left: 41%;
    top: 49%;
    width: 17%;
    height: 11%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    background: #010100;
    box-shadow: 0 0 1.2vw 0.6vw #010100;
}

.studio-logo-patch span {
    font-family: var(--font-heading, sans-serif);
    font-weight: 800;
    font-size: clamp(0.85rem, 1.5vw, 1.7rem);
    letter-spacing: 0.08em;
    color: #7dd3fc;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.9), 0 0 28px rgba(56, 189, 248, 0.5);
    white-space: nowrap;
}

.studio-artifact {
    position: absolute;
    z-index: 3;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    transform-origin: center center;
    pointer-events: none;
    will-change: transform, opacity;
}

/* Recorte de la foto ya "vacía" (studio-echo) que se pone opaco justo donde
   estaba cada artefacto, a medida que ese artefacto se va volando — ver
   updateStudioScroll en main.js, que calcula background-size/position en
   base al tamaño real del frame para que el recorte quede pixel-perfect. */
.studio-patch {
    position: absolute;
    z-index: 2;
    background-repeat: no-repeat;
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
}

@media (prefers-reduced-motion: reduce) {
    .studio-scroll {
        height: auto;
    }

    .studio-scroll-sticky {
        position: relative;
        height: auto;
    }

    .studio-frame {
        width: 100%;
        height: auto;
        aspect-ratio: 1672 / 941;
    }

    .studio-img-base,
    .studio-artifact,
    .studio-patch {
        display: none;
    }

    .studio-img-reveal {
        position: relative;
        opacity: 1;
        clip-path: none;
    }

    .studio-logo-patch {
        opacity: 1;
    }
}

/* Features Section */
.features {
    padding: 120px 0;
    background-color: var(--surface);
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 5vw, 3rem);
    letter-spacing: -0.03em;
    font-weight: 800;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    background: var(--bg);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border);
    transition: var(--transition);
    transform-style: preserve-3d;
    will-change: transform;
    position: relative;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Pricing Section */
.pricing {
    padding: 120px 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg);
    padding: 4rem 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
}

.pricing-card.recommended {
    border: 2px solid var(--accent);
    box-shadow: 0 10px 30px var(--accent-soft);
    transform: scale(1.05);
    z-index: 2;
}

.pricing-card.recommended:hover {
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.2);
    transform: scale(1.06);
}

[data-theme="dark"] .pricing-card.recommended {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .pricing-card.recommended:hover {
    box-shadow: 0 0 45px rgba(59, 130, 246, 0.3);
}

.pricing-card .badge {
    position: absolute;
    top: 24px;
    right: 24px;
    background: var(--accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.pricing-card h3 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.pricing-card .price {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

.pricing-card .price span {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.pricing-card .plan-desc {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 3.5rem;
    flex-grow: 1;
}

.pricing-card ul li {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.05rem;
}

.pricing-card ul li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 900;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--accent);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    filter: drop-shadow(0 0 8px var(--accent)) drop-shadow(0 0 20px rgba(37, 99, 235, 0.8));
    transform: scale(1.02);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a,
.nav-link-btn {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.nav-links a:hover,
.nav-link-btn:hover {
    color: var(--accent);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
}

/* Pricing Refinements */
.text-center {
    text-align: center;
}

.subtitle-pricing {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Download Store Buttons */
.store-btn {
    display: inline-block;
    transition: var(--transition);
    border-radius: 8px;
    overflow: hidden;
}

.store-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

.store-btn img {
    height: 44px;
    display: block;
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    color: var(--text-primary);
    padding: 0 1.75rem;
    height: 52px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-download:hover {
    border-color: var(--accent);
    background: var(--bg);
}

/* Navigation Controls & Dropdowns */
.nav-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.dropdown {
    position: relative;
    padding-bottom: 10px;
    /* Bridge the gap */
    margin-bottom: -10px;
}

.dropdown-btn {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.dropdown-btn:hover {
    border-color: var(--accent);
    background: var(--bg);
}

.chevron {
    transition: transform 0.3s ease;
    opacity: 0.5;
}

.dropdown:hover .chevron {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    /* Positioned directly below the 'bridge' */
    right: 0;
    background: var(--bg);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    z-index: 1001;
    overflow: hidden;
    animation: fadeInScale 0.2s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }

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

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content button {
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.dropdown-content button:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.theme-icon-svg {
    color: var(--text-secondary);
}

/* Theme Application */
body.light-theme {
    --bg: #ffffff;
    --surface: #f8fafc;
    --surface-border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent-soft: rgba(37, 99, 235, 0.08);
}

body.dark-theme {
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-border: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --accent-soft: rgba(59, 130, 246, 0.15);
}

/* Download Icons */
.btn-icon {
    opacity: 0.8;
    flex-shrink: 0;
}

.btn:hover .btn-icon {
    opacity: 1;
}

/* --- Animations & Interactivity --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.15s;
}

.delay-2 {
    transition-delay: 0.3s;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

#main-hero-img {
    animation: float 6s ease-in-out infinite;
}

/* ODEA Dropdown Info Menu */
.echo-dropdown-content {
    width: 320px;
    padding: 1.5rem;
    white-space: normal;
}

.echo-menu-info h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.echo-menu-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.echo-menu-info p:last-child {
    margin-bottom: 0;
}

/* Download Section */
.download-section {
    padding: 100px 0;
    background: var(--surface);
}

.download-card {
    background: var(--bg);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: 5rem 4rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.download-text h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.download-text p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.desktop-downloads {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

.mobile-downloads {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.store-btn img {
    height: 52px;
    display: block;
}

.app-store-btn img,
.play-store-btn img {
    height: 52px;
}

/* Footer Improvements */
.footer-content .logo {
    color: var(--text-primary);
}

/* Responsive Updates */
@media (max-width: 768px) {
    .nav-controls {
        display: none;
    }

    .download-card {
        padding: 3rem 1.5rem;
    }
}

/* Footer */
.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--surface-border);
    background: var(--surface);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .pricing-card.recommended {
        transform: scale(1);
    }

    .pricing-card.recommended:hover {
        transform: translateY(-8px);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding: 140px 0 60px;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}