/* FerrERP - Landing Page Styles
   Variables copiadas de app/static/css/custom.css para consistencia visual
*/

/* Variables CSS (idénticas a la app) */
:root {
    /* Colores primarios */
    --primary: #E07B54;
    --primary-hover: #D06A43;
    --primary-foreground: #FFFFFF;

    --secondary: #0D6E6E;
    --secondary-foreground: #FFFFFF;

    /* Sidebar / Dark sections */
    --sidebar: #1F2937;
    --sidebar-foreground: #F9FAFB;
    --sidebar-muted: #9CA3AF;
    --sidebar-hover: #374151;

    /* Fondos */
    --background: #FAFAFA;
    --background-surface: #FFFFFF;
    --background-muted: #F5F5F5;

    /* Bordes */
    --border: #E5E5E5;
    --border-muted: #F0F0F0;

    /* Textos */
    --foreground: #1A1A1A;
    --foreground-secondary: #666666;
    --foreground-muted: #888888;

    /* Estados */
    --success: #16A34A;
    --success-bg: #DCFCE7;
    --warning: #F59E0B;
    --warning-bg: #FEF3C7;
    --error: #DC2626;
    --error-bg: #FEE2E2;

    /* Bordes redondeados */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;

    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);

    /* Tipografía */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

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

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

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

/* ====== NAVBAR ====== */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.landing-nav.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo-icon {
    width: 36px;
    height: 36px;
    background-color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
}

.nav-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: white;
    transition: color 0.3s;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s;
}

.nav-links a:hover {
    color: white;
}

/* Navbar scrolled: colores oscuros sobre fondo blanco */
.landing-nav.scrolled .nav-logo-text {
    color: var(--foreground);
}

.landing-nav.scrolled .nav-links a {
    color: var(--foreground-secondary);
}

.landing-nav.scrolled .nav-links a:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

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

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

.btn-outline:hover {
    background-color: var(--background-muted);
}

/* Botón outline en navbar (sobre fondo oscuro del hero) */
.nav-actions .btn-outline {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.nav-actions .btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.landing-nav.scrolled .nav-actions .btn-outline {
    color: var(--foreground);
    border-color: var(--border);
}

.landing-nav.scrolled .nav-actions .btn-outline:hover {
    background-color: var(--background-muted);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-lg);
}

.btn-ghost {
    background: transparent;
    color: var(--sidebar-foreground);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Hamburger mobile */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: white;
    transition: color 0.3s;
}

.landing-nav.scrolled .nav-hamburger {
    color: var(--foreground);
}

.nav-hamburger .material-symbols-rounded {
    font-size: 28px;
}

/* Mobile menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background-color: var(--background-surface);
    box-shadow: var(--shadow-lg);
    padding: 16px 24px;
    z-index: 999;
}

.mobile-menu.open {
    display: block;
}

.mobile-menu-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-links a {
    display: block;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    color: var(--foreground);
}

.mobile-menu-links a:hover {
    background-color: var(--background-muted);
}

.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.mobile-menu-actions .btn {
    width: 100%;
}

/* ====== HERO ====== */
.hero {
    position: relative;
    padding: 140px 24px 80px;
    background: linear-gradient(135deg, var(--sidebar) 0%, #111827 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(224, 123, 84, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(13, 110, 110, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(224, 123, 84, 0.15);
    border: 1px solid rgba(224, 123, 84, 0.3);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--sidebar-foreground);
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--sidebar-muted);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
}

.hero-badges {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.hero-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--sidebar-muted);
}

.hero-badge .material-symbols-rounded {
    font-size: 18px;
    color: var(--success);
}

/* Mockup del browser */
.hero-mockup {
    position: relative;
}

.browser-frame {
    background: #1a1a2e;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #0f0f1a;
}

.browser-dots {
    display: flex;
    gap: 6px;
}

.browser-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.browser-dots span:nth-child(1) { background: #ff5f57; }
.browser-dots span:nth-child(2) { background: #ffbd2e; }
.browser-dots span:nth-child(3) { background: #28ca42; }

.browser-url {
    flex: 1;
    margin-left: 12px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 12px;
    color: var(--sidebar-muted);
    font-family: var(--font-mono);
}

.browser-content {
    position: relative;
    background: var(--background);
}

.browser-content img {
    display: block;
    width: 100%;
}

/* Placeholder para screenshot */
.screenshot-placeholder {
    width: 100%;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, var(--background-muted) 0%, var(--background) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--foreground-muted);
}

.screenshot-placeholder .material-symbols-rounded {
    font-size: 48px;
    opacity: 0.4;
}

.screenshot-placeholder span {
    font-size: 14px;
}

/* ====== FEATURES ====== */
.features {
    padding: 100px 24px;
    background: var(--background-surface);
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--foreground-secondary);
    max-width: 600px;
    margin: 0 auto;
}

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

.feature-card {
    padding: 32px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(224, 123, 84, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon .material-symbols-rounded {
    font-size: 24px;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 8px;
}

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

/* ====== CÓMO FUNCIONA ====== */
.how-it-works {
    padding: 100px 24px;
    background: var(--background);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 8px;
}

.step p {
    font-size: 14px;
    color: var(--foreground-secondary);
    max-width: 280px;
    margin: 0 auto;
}

/* Conector entre pasos */
.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 28px;
    right: -20px;
    width: calc(100% - 56px);
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--border));
    transform: translateX(50%);
}

/* ====== VIDEO DEMO ====== */
.demo {
    padding: 100px 24px;
    background: var(--background-surface);
}

.demo-container {
    max-width: 900px;
    margin: 0 auto;
}

.video-wrapper {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: var(--sidebar);
    aspect-ratio: 16/9;
    margin-top: 48px;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder del video */
.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--sidebar-muted);
}

.play-btn {
    width: 72px;
    height: 72px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 0 8px rgba(224, 123, 84, 0.2);
}

.play-btn .material-symbols-rounded {
    font-size: 36px;
    color: white;
    margin-left: 4px;
}

.video-placeholder span {
    font-size: 14px;
}

/* ====== CONTACTO ====== */
.contact {
    padding: 100px 24px;
    background: var(--background);
}

.contact-content {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.contact-icon {
    width: 72px;
    height: 72px;
    background: rgba(224, 123, 84, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.contact-icon .material-symbols-rounded {
    font-size: 32px;
    color: var(--primary);
}

.contact-content h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 12px;
}

.contact-content p {
    font-size: 16px;
    color: var(--foreground-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 14px;
    color: var(--foreground-muted);
}

.contact-email .material-symbols-rounded {
    font-size: 18px;
}

/* ====== CTA FINAL ====== */
.cta-final {
    padding: 80px 24px;
    background: linear-gradient(135deg, var(--sidebar) 0%, #111827 100%);
    text-align: center;
}

.cta-final-container {
    max-width: 600px;
    margin: 0 auto;
}

.cta-final h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--sidebar-foreground);
    margin-bottom: 16px;
}

.cta-final p {
    font-size: 16px;
    color: var(--sidebar-muted);
    margin-bottom: 32px;
}

.cta-final .btn {
    margin-bottom: 16px;
}

.cta-final-note {
    font-size: 13px;
    color: var(--sidebar-muted);
}

/* ====== FOOTER ====== */
.landing-footer {
    padding: 48px 24px;
    background: var(--background-surface);
    border-top: 1px solid var(--border);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo-icon {
    width: 32px;
    height: 32px;
    background-color: var(--primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.footer-logo-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--foreground);
}

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-links a {
    font-size: 14px;
    color: var(--foreground-secondary);
    transition: color 0.2s;
}

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

.footer-copy {
    font-size: 13px;
    color: var(--foreground-muted);
}

/* ====== ANIMACIONES ====== */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

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

}

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

    .nav-actions {
        display: none;
    }

    .nav-hamburger {
        display: block;
    }

    .hero {
        padding: 120px 24px 60px;
    }

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

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-badges {
        gap: 16px;
    }

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

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .step:not(:last-child)::after {
        display: none;
    }

    .section-title {
        font-size: 28px;
    }

    .cta-final h2 {
        font-size: 28px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}
