/* Parte pública — estética tipo Framer/Lovable */

/* Fuente del logotipo (autoalojada, SIL OFL) */
@font-face {
    font-family: 'Urbanist';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/urbanist-latin-700-ygs_d2C.woff2") format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/inter-latin-400-7usM4QF.woff2") format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/inter-latin-500-0BcvInW.woff2") format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/inter-latin-600-Mpmwd2S.woff2") format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/inter-latin-700-9VA5gXa.woff2") format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("../fonts/inter-latin-800-gYUuJX_.woff2") format('woff2');
}

:root {
    --ink: #0a0a0a;
    --ink-soft: #52525b;
    --ink-faint: #a1a1aa;
    --bg: #fafafa;
    --surface: #ffffff;
    --line: #e8e8ec;
    --brand-a: #7c3aed;
    --brand-b: #db2777;
    --brand-c: #f59e0b;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-pill: 999px;
}

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

html {
    scroll-behavior: smooth;
}

/* Deja aire para el nav sticky al saltar a un ancla */
[id] {
    scroll-margin-top: 84px;
}

body.public {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

.container-p {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar */
.nav-p {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(250, 250, 250, .78);
    border-bottom: 1px solid var(--line);
}

.nav-p-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.brand {
    font-family: 'Urbanist', 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -.02em;
    text-decoration: none;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand svg {
    flex: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a:not(.btn-p) {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    transition: color .15s ease;
}

.nav-links a:not(.btn-p):hover {
    color: var(--ink);
}

.btn-p {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: var(--radius-pill);
    padding: 11px 22px;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    border: none;
    cursor: pointer;
}

.btn-dark {
    background: var(--ink);
    color: #fff;
}

.btn-dark:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
    background: var(--surface);
}

.btn-ghost:hover {
    border-color: #d4d4d8;
}

.btn-lg-p {
    padding: 15px 30px;
    font-size: 16px;
}

/* Hero */
.hero {
    position: relative;
    padding: 110px 0 90px;
    text-align: center;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(560px 300px at 18% 8%, rgba(124, 58, 237, .14), transparent 65%),
        radial-gradient(520px 320px at 82% 12%, rgba(219, 39, 119, .12), transparent 65%),
        radial-gradient(640px 380px at 50% 100%, rgba(245, 158, 11, .10), transparent 70%);
}

.hero-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    padding: 7px 16px;
    margin-bottom: 28px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.hero-badge .pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .2);
}

.hero h1 {
    position: relative;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -.045em;
    max-width: 900px;
    margin: 0 auto 24px;
}

.grad-text {
    background: linear-gradient(90deg, var(--brand-a), var(--brand-b) 55%, var(--brand-c));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p.lead-p {
    position: relative;
    font-size: clamp(17px, 2.2vw, 20px);
    color: var(--ink-soft);
    max-width: 620px;
    margin: 0 auto 40px;
}

.hero-ctas {
    position: relative;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-meta {
    position: relative;
    margin-top: 26px;
    font-size: 13.5px;
    color: var(--ink-faint);
}

/* Preview window */
.preview {
    position: relative;
    max-width: 980px;
    margin: 70px auto 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 30px 80px -20px rgba(23, 8, 46, .18);
    overflow: hidden;
    text-align: left;
}

.preview-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}

.preview-bar span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #e4e4e7;
}

.preview-bar span:nth-child(1) { background: #fda4af; }
.preview-bar span:nth-child(2) { background: #fcd34d; }
.preview-bar span:nth-child(3) { background: #86efac; }

.preview img {
    display: block;
    width: 100%;
    height: auto;
}

.preview-body {
    display: grid;
    grid-template-columns: 200px 1fr;
    min-height: 340px;
}

.preview-side {
    border-right: 1px solid var(--line);
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fcfcfd;
}

.preview-side i {
    display: block;
    height: 30px;
    border-radius: 8px;
    background: #f1f1f4;
}

.preview-side i.active {
    background: linear-gradient(90deg, rgba(124, 58, 237, .15), rgba(219, 39, 119, .12));
}

.preview-main {
    padding: 22px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    align-content: start;
}

.preview-main i {
    display: block;
    border-radius: 12px;
    background: #f4f4f6;
    height: 86px;
}

.preview-main i.wide {
    grid-column: span 3;
    height: 130px;
    background: linear-gradient(135deg, rgba(124, 58, 237, .10), rgba(219, 39, 119, .08), rgba(245, 158, 11, .08));
}

/* Secciones */
.section {
    padding: 96px 0;
}

.section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 56px;
}

.eyebrow {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brand-a);
    margin-bottom: 14px;
}

.section-head h2 {
    font-size: clamp(30px, 4.4vw, 44px);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.12;
    margin-bottom: 16px;
}

.section-head p {
    color: var(--ink-soft);
    font-size: 17px;
}

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

.feature {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 28px 26px;
    transition: transform .18s ease, box-shadow .18s ease;
}

.feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px -18px rgba(23, 8, 46, .18);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: #fff;
}

.fi-1 { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.fi-2 { background: linear-gradient(135deg, #db2777, #f472b6); }
.fi-3 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.fi-4 { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.fi-5 { background: linear-gradient(135deg, #10b981, #34d399); }
.fi-6 { background: linear-gradient(135deg, #6366f1, #818cf8); }
.fi-7 { background: linear-gradient(135deg, #14b8a6, #2dd4bf); }
.fi-8 { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.fi-9 { background: linear-gradient(135deg, #8b5cf6, #c084fc); }

.feature h3 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.015em;
    margin-bottom: 8px;
}

.feature p {
    font-size: 14.5px;
    color: var(--ink-soft);
}

/* Precios */
.pricing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    align-items: stretch;
}

.price-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.price-card.featured {
    border: 2px solid var(--brand-a);
    box-shadow: 0 24px 60px -24px rgba(124, 58, 237, .35);
}

.price-tag {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: var(--radius-pill);
    padding: 5px 14px;
    white-space: nowrap;
}

.price-card h3 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.015em;
    margin-bottom: 4px;
}

.price-card .price-for {
    font-size: 13.5px;
    color: var(--ink-faint);
    margin-bottom: 20px;
    /* Reserva dos líneas para que los importes queden a la misma altura en las tres cajas */
    min-height: 44px;
}

.price-amount {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

.price-amount strong {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -.03em;
}

.price-amount span {
    color: var(--ink-soft);
    font-size: 14px;
}

.price-note {
    font-size: 13px;
    color: var(--ink-faint);
    margin-bottom: 22px;
    min-height: 34px;
}

.price-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
    flex: 1;
}

.price-card li {
    font-size: 14.5px;
    color: var(--ink-soft);
    display: flex;
    gap: 9px;
    align-items: flex-start;
}

.price-card li::before {
    content: '';
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    border-radius: 50%;
    background:
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center / 10px no-repeat,
        linear-gradient(135deg, var(--brand-a), var(--brand-b));
}

.price-card .btn-p {
    justify-content: center;
    text-align: center;
}

/* Los tres CTA de precios se elevan al pasar el ratón; los "ghost" además
   se tiñen con el color de marca. */
.price-card .btn-p:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(124, 58, 237, .22);
}

.price-card .btn-ghost:hover {
    border-color: var(--brand-a);
    color: var(--brand-a);
    background: linear-gradient(90deg, rgba(124, 58, 237, .06), rgba(219, 39, 119, .05));
}

/* Distintivo "AI" de Fina: texto con el degradado de marca. */
.fina-ai {
    font-weight: 800;
    background: linear-gradient(90deg, var(--brand-a), var(--brand-b));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    white-space: nowrap;
}

.price-extra {
    /* Dentro del padding inferior de la caja, para que no empuje el botón
       hacia arriba y los CTA de las tres cajas queden a la misma altura */
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 8px;
    text-align: center;
    font-size: 13.5px;
}

.price-extra a {
    color: var(--ink-faint);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.price-extra a:hover {
    color: var(--ink);
}

/* Página administradores: tarjeta de precio única centrada */
.pricing-solo {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin: 0 auto;
}

/* Pasos numerados (reutiliza las tarjetas de funciones) */
.feature-icon.fi-num {
    background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
    font-weight: 800;
    font-size: 19px;
}

/* FAQ */
.faq {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px 20px;
}

.faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 15.5px;
    list-style: none;
    position: relative;
    padding-right: 28px;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: 500;
    color: var(--ink-faint);
    transition: transform .15s ease;
}

.faq details[open] summary::after {
    content: '−';
}

.faq details p {
    margin-top: 10px;
    color: var(--ink-soft);
    font-size: 14.5px;
}

.pricing-foot {
    text-align: center;
    color: var(--ink-faint);
    font-size: 13.5px;
    margin-top: 28px;
}

/* Fina — asistente 24x7 */
.fina {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 56px;
    position: relative;
    overflow: hidden;
}

.fina::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(420px 260px at 100% 0%, rgba(124, 58, 237, .08), transparent 70%),
        radial-gradient(380px 240px at 0% 100%, rgba(219, 39, 119, .07), transparent 70%);
}

.fina > * {
    position: relative;
}

.fina-texto h2 {
    font-size: clamp(26px, 3.6vw, 38px);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.12;
    margin-bottom: 16px;
}

.fina-texto p {
    color: var(--ink-soft);
    margin-bottom: 20px;
}

.fina-lista {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fina-lista li {
    padding-left: 28px;
    position: relative;
    color: var(--ink-soft);
    font-size: 15px;
}

.fina-lista li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
    -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / contain no-repeat;
    mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / contain no-repeat;
}

.fina-chat {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--bg);
    box-shadow: 0 24px 60px -24px rgba(23, 8, 46, .22);
    overflow: hidden;
}

.fina-chat-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.fina-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fina-chat-head strong {
    display: block;
    font-size: 15px;
    letter-spacing: -.01em;
}

.fina-estado {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--ink-faint);
}

.fina-chat-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.burbuja {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.45;
}

.burbuja.mia {
    align-self: flex-end;
    background: var(--ink);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.burbuja.fina {
    align-self: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-bottom-left-radius: 4px;
}

@media (max-width: 900px) {
    .fina {
        grid-template-columns: 1fr;
        padding: 32px 24px;
        gap: 32px;
    }
}

/* CTA final */
.cta {
    border-radius: var(--radius-lg);
    background: var(--ink);
    color: #fff;
    text-align: center;
    padding: 76px 32px;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(420px 220px at 20% 0%, rgba(124, 58, 237, .45), transparent 70%),
        radial-gradient(420px 220px at 85% 100%, rgba(219, 39, 119, .35), transparent 70%);
}

.cta > * {
    position: relative;
}

.cta h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    letter-spacing: -.03em;
    margin-bottom: 14px;
}

.cta p {
    color: #d4d4d8;
    max-width: 520px;
    margin: 0 auto 32px;
}

.btn-light-p {
    background: #fff;
    color: var(--ink);
}

.btn-light-p:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

/* Footer */
.footer-p {
    border-top: 1px solid var(--line);
    padding: 40px 0;
    margin-top: 96px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--ink-faint);
    font-size: 14px;
}

.footer-legal {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-legal a {
    color: var(--ink-faint);
    text-decoration: none;
}

.footer-legal a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Páginas legales (términos, privacidad, cookies) */
.container-legal {
    max-width: 760px;
}

.legal {
    padding-top: 56px;
}

.legal h1 {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: 6px;
}

.legal .legal-updated {
    color: var(--ink-faint);
    font-size: 13.5px;
    margin-bottom: 34px;
}

.legal h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.015em;
    margin: 30px 0 10px;
}

.legal p,
.legal li {
    font-size: 15px;
    color: var(--ink-soft);
    line-height: 1.7;
}

.legal p {
    margin-bottom: 12px;
}

.legal ul {
    padding-left: 20px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legal a {
    color: var(--brand-a);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0 16px;
    font-size: 14px;
}

.legal th,
.legal td {
    text-align: left;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    vertical-align: top;
}

.legal th {
    color: var(--ink);
    font-weight: 700;
}

/* Login */
.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    position: relative;
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 42px 38px;
    box-shadow: 0 30px 80px -30px rgba(23, 8, 46, .25);
}

.login-card h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.03em;
    margin: 18px 0 6px;
}

.login-card .sub {
    color: var(--ink-soft);
    font-size: 14.5px;
    margin-bottom: 28px;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 7px;
}

.field input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    background: #fcfcfd;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:focus {
    outline: none;
    border-color: var(--brand-a);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, .12);
}

.login-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 14px;
    margin-bottom: 18px;
}

.login-hint {
    margin-top: 22px;
    font-size: 13px;
    color: var(--ink-faint);
    text-align: center;
}

@media (max-width: 900px) {
    .features {
        grid-template-columns: 1fr;
    }

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

    .nav-links a:not(.btn-p) {
        display: none;
    }

    .preview-body {
        grid-template-columns: 1fr;
    }

    .preview-side {
        display: none;
    }
}

/* Placeholders más suaves (login y registro) */
input::placeholder,
textarea::placeholder {
    color: #c9c9cf;
    opacity: 1;
}
