/* ============================================================
   HOME / LANDING PAGE
   Pantalla de marketing, independiente del ".app-container" boxed
   que usa el resto de la app. Vive fuera de ese contenedor en el DOM
   y se muestra como overlay de pantalla completa mientras esta activa
   (ver #home-screen.screen.active mas abajo), asi no interfiere con
   el centrado flex que usan las demas pantallas.
   ============================================================ */

#home-screen.screen {
    position: fixed;
    inset: 0;
    z-index: 500;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--nc-home-bg, #fbfbfe);
    padding: 0;
    align-items: stretch;
}

.nc-home {
    --nc-h-ink: #0f0f1a;
    --nc-h-muted: #5b5b6e;
    --nc-h-line: rgba(15, 15, 26, 0.08);
    position: relative;
    min-height: 100%;
    color: var(--nc-h-ink);
}

/* ---------- fondo animado ---------- */
.nc-home-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.nc-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    will-change: transform;
}
.nc-blob-1 { width: 42vw; height: 42vw; top: -10%; left: -8%; background: radial-gradient(circle, #2e6e9e, transparent 70%); animation: ncDrift1 26s ease-in-out infinite; }
.nc-blob-2 { width: 34vw; height: 34vw; top: 30%; right: -10%; background: radial-gradient(circle, #b8872f, transparent 70%); animation: ncDrift2 32s ease-in-out infinite; }
.nc-blob-3 { width: 30vw; height: 30vw; bottom: -12%; left: 20%; background: radial-gradient(circle, #173a5e, transparent 70%); animation: ncDrift3 22s ease-in-out infinite; }

@keyframes ncDrift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(4vw, 6vh) scale(1.12); } }
@keyframes ncDrift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-5vw, -4vh) scale(1.08); } }
@keyframes ncDrift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(3vw, -5vh) scale(1.1); } }

.nc-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(15,15,26,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15,15,26,0.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, black 40%, transparent 100%);
}

@media (prefers-reduced-motion: reduce) {
    .nc-blob { animation: none !important; }
}

/* ---------- nav ---------- */
.nc-home-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem clamp(1.25rem, 5vw, 4rem);
    background: rgba(251, 251, 254, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--nc-h-line);
}
.nc-home-brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.nc-home-brand img,
.nc-home-brand .appbar-mark { width: 30px; height: 30px; border-radius: 50%; }
.nc-home-brand .appbar-mark svg { width: 17px; height: 17px; }
.nc-home-signin {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1.3rem;
    border-radius: 999px;
    border: 1px solid var(--nc-h-line);
    background: white;
    color: var(--nc-h-ink);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.nc-home-signin:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -8px rgba(23,58,94,0.35); border-color: rgba(23,58,94,0.35); }

/* ---------- hero ---------- */
.nc-hero {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: 0 auto;
    padding: clamp(3.5rem, 10vh, 7rem) 1.5rem 4rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* Red de seguridad: en un flex column con align-items:center, un hijo
   sin ancho propio se dimensiona a su contenido (max-content) y puede
   no hacer wrap en pantallas angostas. Forzamos que ningun hijo directo
   se pase del ancho disponible. */
.nc-hero > * { max-width: 100%; }
.nc-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(23,58,94,0.08);
    border: 1px solid rgba(23,58,94,0.18);
    padding: 0.45rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.75rem;
}
.nc-hero-title {
    width: 100%;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}
.nc-hero-slogan {
    width: 100%;
    font-family: var(--font-display);
    font-weight: 600;
    font-style: italic;
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    color: var(--primary);
    margin-bottom: 1.25rem;
}
.nc-gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent) 65%, #b8872f);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
.nc-hero-sub {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--nc-h-muted);
    max-width: 640px;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}
.nc-hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-bottom: 3.5rem; }
.nc-cta-lg { padding: 1.05rem 2.2rem !important; font-size: 1.05rem !important; width: auto !important; border-radius: 999px !important; }
.nc-cta-ghost { font-size: 1.05rem; padding: 1.05rem 1.5rem; }

.nc-hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(1.25rem, 5vw, 3.5rem);
    width: 100%;
    max-width: 100%;
}
.nc-hero-stats > div { display: flex; flex-direction: column; align-items: center; }
.nc-hero-stats strong { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--nc-h-ink); }
.nc-hero-stats span { font-size: 0.82rem; color: var(--nc-h-muted); margin-top: 0.2rem; text-align: center; }

/* ---------- secciones generales ---------- */
.nc-home section { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 4.5rem 1.5rem; }
.nc-section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: -0.01em;
}

/* ---------- features ---------- */
.nc-feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; }
.nc-feature-card {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(10px);
    border: 1px solid var(--nc-h-line);
    border-radius: 20px;
    padding: 2rem 1.75rem;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.nc-feature-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px -18px rgba(23,58,94,0.35); border-color: rgba(23,58,94,0.25); }
.nc-feature-icon {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 14px;
    font-size: 1.4rem;
    margin-bottom: 1.1rem;
    background: linear-gradient(135deg, rgba(23,58,94,0.15), rgba(184,135,47,0.15));
}
.nc-feature-card h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 0.6rem; }
.nc-feature-card p { font-size: 0.92rem; color: var(--nc-h-muted); line-height: 1.55; }

/* ---------- como funciona ---------- */
.nc-steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; counter-reset: nc-step; }
.nc-steps li { position: relative; padding-left: 3.2rem; }
.nc-steps li::before {
    counter-increment: nc-step;
    content: counter(nc-step);
    position: absolute; left: 0; top: -0.15rem;
    width: 2.4rem; height: 2.4rem;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 10px 20px -8px rgba(23,58,94,0.5);
}
.nc-steps h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 0.4rem; }
.nc-steps p { font-size: 0.92rem; color: var(--nc-h-muted); line-height: 1.55; }

/* ---------- pricing ---------- */
.nc-pricing-sub { text-align: center; color: var(--nc-h-muted); font-size: 1.05rem; margin-top: -2rem; margin-bottom: 2.5rem; }
.nc-pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; align-items: stretch; }
.nc-price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(10px);
    border: 1px solid var(--nc-h-line);
    border-radius: 22px;
    padding: 2.25rem 1.75rem 2rem;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.nc-price-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px -18px rgba(23,58,94,0.3); }
.nc-price-featured {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(23,58,94,0.07), rgba(255,255,255,0.75) 40%);
    box-shadow: 0 20px 45px -20px rgba(23,58,94,0.45);
}
.nc-price-badge {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    white-space: nowrap;
}
.nc-price-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; margin-bottom: 0.6rem; }
.nc-price-amount { font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; line-height: 1; }
.nc-price-period { color: var(--nc-h-muted); font-size: 0.85rem; margin-bottom: 1.5rem; }
.nc-price-list { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 1.75rem; flex: 1; }
.nc-price-list li { font-size: 0.9rem; color: var(--nc-h-muted); line-height: 1.4; padding-left: 1.5rem; position: relative; }
.nc-price-list li::before {
    content: '✓';
    position: absolute; left: 0; top: 0;
    color: var(--primary);
    font-weight: 700;
}
.nc-price-card button { width: 100%; }

/* ---------- faq ---------- */
.nc-faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.9rem; }
.nc-faq-item {
    background: rgba(255,255,255,0.75);
    border: 1px solid var(--nc-h-line);
    border-radius: 16px;
    padding: 1.1rem 1.4rem;
}
.nc-faq-item summary {
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.02rem;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.nc-faq-item summary::-webkit-details-marker { display: none; }
.nc-faq-item summary::after {
    content: '+';
    flex-shrink: 0;
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--primary);
    transition: transform 0.25s ease;
}
.nc-faq-item[open] summary::after { transform: rotate(45deg); }
.nc-faq-item p { color: var(--nc-h-muted); font-size: 0.92rem; line-height: 1.6; margin-top: 0.9rem; }

/* ---------- CTA final ---------- */
.nc-final-cta {
    text-align: center;
    background: linear-gradient(135deg, #173a5e, #2e6e9e 55%, #b8872f);
    border-radius: 28px;
    padding: 4rem 2rem !important;
    margin: 2rem auto 5rem !important;
    color: white;
    box-shadow: 0 30px 60px -20px rgba(23,58,94,0.55);
}
.nc-final-cta h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 0.75rem; }
.nc-final-cta p { opacity: 0.9; margin-bottom: 2rem; font-size: 1.05rem; }
.nc-final-cta .nc-cta-lg { background: white !important; color: var(--primary) !important; }
.nc-final-cta .nc-cta-lg:hover { box-shadow: 0 15px 30px -8px rgba(0,0,0,0.35) !important; }

/* ---------- footer ---------- */
.nc-home-footer {
    position: relative; z-index: 1;
    text-align: center;
    padding: 2.5rem 1.5rem 3rem;
    color: var(--nc-h-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--nc-h-line);
}

/* ---------- scroll reveal ----------
   Visible por defecto: si JS no corre (o el IntersectionObserver no
   dispara por algun motivo, ej. en capturas automatizadas), el
   contenido igual se ve. La clase "nc-pending" -que solo la agrega
   ncInitScrollReveal()- es la unica que oculta, y ncInitScrollReveal
   tiene ademas un timeout de seguridad que revela todo si algo falla. */
.nc-reveal { opacity: 1; transform: none; }
.nc-reveal.nc-pending { opacity: 0; transform: translateY(28px); }
.nc-reveal.nc-visible { animation: ncRevealIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
/* Camino de respaldo (ncInitScrollReveal, timeout de seguridad): estado
   final directo, sin animacion. Si el navegador pinta esto antes de que
   una transicion CSS termine, no hay transicion a medio camino que capturar. */
.nc-reveal.nc-visible-ya { opacity: 1 !important; transform: none !important; animation: none !important; }
@keyframes ncRevealIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
    .nc-reveal.nc-pending { opacity: 1; transform: none; }
    .nc-reveal.nc-visible { animation: none; }
}

@media (max-width: 640px) {
    .nc-home section { padding: 3rem 1.25rem; }
}

