/* ═══════════════════════════════════════════════════════
   DENMO — SaaS Public Pages
   ═══════════════════════════════════════════════════════ */

:root {
    --nx-violet: #7c3aed;
    --nx-violet-light: #a78bfa;
    --nx-violet-dark: #5b21b6;
    --nx-amber: #f59e0b;
    --nx-amber-light: #fbbf24;
}

body.saas-page {
    font-family: 'DM Sans', sans-serif;
    color: #1e293b;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* ── Navbar ────────────────────────────── */
.nx-nav {
    transition: background .4s ease, box-shadow .4s ease, backdrop-filter .4s ease;
}

/* Hero variant (landing): transparent, white text */
.nx-nav--hero .nav-link { color: #cbd5e1; }
.nx-nav--hero .nav-link:hover { color: #fff; }
.nx-nav--hero .nav-logo-text { color: #fff; }
.nx-nav--hero .nav-btn-login { color: #cbd5e1; border-color: #475569; }
.nx-nav--hero .nav-btn-login:hover { background: rgba(255,255,255,.05); }
.nx-nav--hero .hamburger-line { background: #fff; }

/* Light variant (subpages) + scrolled state */
.nx-nav--light,
.nx-nav.scrolled {
    background: rgba(255,255,255,.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.nx-nav--light .nav-link,
.nx-nav.scrolled .nav-link { color: #475569; }
.nx-nav--light .nav-link:hover,
.nx-nav.scrolled .nav-link:hover { color: var(--nx-violet); }
.nx-nav--light .nav-link.active { color: var(--nx-violet); font-weight: 600; }
.nx-nav--light .nav-logo-text,
.nx-nav.scrolled .nav-logo-text { color: #0f172a; }
.nx-nav--light .nav-btn-login,
.nx-nav.scrolled .nav-btn-login { color: #475569; border-color: #cbd5e1; }
.nx-nav--light .nav-btn-login:hover,
.nx-nav.scrolled .nav-btn-login:hover { background: #f1f5f9; }
.nx-nav--light .hamburger-line,
.nx-nav.scrolled .hamburger-line { background: #334155; }

/* ── Hero ──────────────────────────────── */
.hero-bg {
    background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 35%, #1e293b 100%);
    position: relative;
    overflow: hidden;
}
.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 65% 30%, rgba(124,58,237,.12) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 25% 75%, rgba(245,158,11,.07) 0%, transparent 50%);
    pointer-events: none;
}
.grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
}
.hero-dots {
    background-image: radial-gradient(circle, rgba(124,58,237,.07) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* ── Mockup ────────────────────────────── */
.mockup-container {
    transform: perspective(1400px) rotateY(-10deg) rotateX(5deg);
    transition: transform .8s cubic-bezier(.16,1,.3,1);
}
.mockup-container:hover {
    transform: perspective(1400px) rotateY(-3deg) rotateX(1deg);
}
.mockup-glow {
    position: absolute;
    inset: -30px;
    border-radius: 28px;
    background: radial-gradient(ellipse at center, rgba(124,58,237,.2) 0%, transparent 70%);
    filter: blur(30px);
    z-index: -1;
}

/* ── Animations ────────────────────────── */
@keyframes nx-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}
@keyframes nx-float-slow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(3deg); }
}
@keyframes nx-pulse {
    0%, 100% { opacity: .3; }
    50% { opacity: .7; }
}
.float { animation: nx-float 6s ease-in-out infinite; }
.float-slow { animation: nx-float-slow 9s ease-in-out infinite; }
.pulse-soft { animation: nx-pulse 4s ease-in-out infinite; }

/* ── Scroll Reveal ─────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Feature Cards ─────────────────────── */
.feature-card {
    transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s ease;
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(0,0,0,.08);
}

/* Pillar cards (3 big features) */
.pillar-card {
    border-top: 3px solid transparent;
    transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s ease;
}
.pillar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,.06);
}

/* Mini feature items */
.mini-feature {
    transition: transform .3s ease, background .3s ease;
}
.mini-feature:hover {
    transform: translateY(-2px);
    background: #f8fafc;
}

/* ── Plan Cards ────────────────────────── */
.plan-card {
    transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s ease;
}
.plan-card:hover {
    transform: translateY(-4px);
}
.plan-destacado {
    border-color: var(--nx-amber) !important;
    box-shadow: 0 0 0 1px var(--nx-amber), 0 20px 48px rgba(245,158,11,.1);
}
.plan-destacado:hover {
    box-shadow: 0 0 0 1px var(--nx-amber), 0 28px 56px rgba(245,158,11,.16);
}

/* ── FAQ ───────────────────────────────── */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .5s cubic-bezier(.16,1,.3,1);
}
.faq-item.active .faq-answer {
    max-height: 260px;
}
.faq-icon {
    transition: transform .3s ease;
}
.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* ── Mobile Menu ───────────────────────── */
.mobile-menu {
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}
.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}
.hamburger-line {
    transition: transform .3s ease, opacity .3s ease;
}
.hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ── Gradient Text ─────────────────────── */
.gradient-text-hero {
    background: linear-gradient(135deg, #fff 0%, #e0d4ff 55%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gradient-text-violet {
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Section Backgrounds ───────────────── */
.section-warm {
    background: linear-gradient(180deg, #fffbf5 0%, #fff 100%);
}
.section-cool {
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

/* ── Buttons ───────────────────────────── */
.btn-glow:hover {
    box-shadow: 0 8px 30px rgba(124,58,237,.35);
}

/* ── Comparison Table (precios) ────────── */
.comparison-table th,
.comparison-table td {
    padding: .875rem 1rem;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}
.comparison-table th:first-child,
.comparison-table td:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    background: white;
    z-index: 2;
    min-width: 180px;
}
.comparison-table thead th {
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 3;
}
.comparison-table thead th:first-child { z-index: 4; }
.comparison-table tbody tr:hover { background: #fafbfc; }
.comparison-table tbody tr:hover td:first-child { background: #fafbfc; }

/* ── Form Inputs ──────────────────────── */
.nx-field input,
.nx-field select,
.nx-field textarea {
    width: 100%;
    padding: .75rem 1rem;
    font-size: .875rem;
    font-family: 'DM Sans', sans-serif;
    color: #1e293b;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: .75rem;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.nx-field input:focus,
.nx-field select:focus,
.nx-field textarea:focus {
    border-color: var(--nx-violet);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .1);
}
.nx-field input::placeholder,
.nx-field textarea::placeholder { color: #94a3b8; }
.nx-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-position: right .75rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}
.nx-field .errorlist,
.nx-field ul { list-style: none; padding: 0; margin: .25rem 0 0 0; }
.nx-field .errorlist li,
.nx-field ul li { font-size: .75rem; color: #dc2626; }

/* ── Benefit slide-in ─────────────────── */
.benefit-item {
    opacity: 0;
    transform: translateX(-12px);
    animation: nx-slide-in .5s ease forwards;
}
@keyframes nx-slide-in {
    to { opacity: 1; transform: translateX(0); }
}
.benefit-item:nth-child(1) { animation-delay: .2s; }
.benefit-item:nth-child(2) { animation-delay: .35s; }
.benefit-item:nth-child(3) { animation-delay: .5s; }
.benefit-item:nth-child(4) { animation-delay: .65s; }
.benefit-item:nth-child(5) { animation-delay: .8s; }

/* ── Legal Prose ──────────────────────── */
.prose-legal h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 2.5rem;
    margin-bottom: .75rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid #e2e8f0;
}
.prose-legal h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #334155;
    margin-top: 1.5rem;
    margin-bottom: .5rem;
}
.prose-legal p {
    font-size: .9375rem;
    line-height: 1.75;
    color: #475569;
    margin-bottom: 1rem;
}
.prose-legal ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.prose-legal ul li {
    font-size: .9375rem;
    line-height: 1.75;
    color: #475569;
    margin-bottom: .25rem;
}

/* ── Error Pages ──────────────────────── */
.error-number {
    font-size: clamp(8rem, 20vw, 14rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 40%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
