/* Bonsai — web publica. Sin recursos externos (ni fuentes ni CDNs): RGPD, igual que la app. */

:root {
    --primario: #4340d2;
    --primario-oscuro: #2f2ca8;
    --primario-suave: #eeedfc;
    --verde: #1f8a5b;
    --verde-suave: #e6f4ed;
    --naranja: #e46a00;
    --naranja-suave: #fff1e3;
    --rojo: #c62828;
    --rojo-suave: #fdecec;
    --texto: #1d1d29;
    --texto-2: #555566;
    --borde: #e3e3ea;
    --fondo: #ffffff;
    --fondo-2: #f6f6f9;
    --radio: 14px;
    --sombra: 0 1px 2px rgba(20, 20, 50, .06), 0 8px 24px rgba(20, 20, 50, .07);
    --ancho: 1120px;
    --fuente: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--fuente);
    font-size: 17px;
    line-height: 1.6;
    color: var(--texto);
    background: var(--fondo);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primario); }
a:hover { color: var(--primario-oscuro); }
:focus-visible { outline: 3px solid var(--primario); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.contenedor { max-width: var(--ancho); margin: 0 auto; padding: 0 20px; }

.saltar {
    position: absolute; left: -9999px; top: 0;
    background: var(--primario); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.saltar:focus { left: 1rem; top: 1rem; }

/* --- Cabecera --- */
.cabecera {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(160%) blur(8px);
    border-bottom: 1px solid var(--borde);
}

.cabecera .contenedor { display: flex; align-items: center; gap: 1.5rem; height: 68px; }

.marca {
    display: inline-flex; align-items: center; gap: .55rem;
    font-weight: 700; font-size: 1.3rem; color: var(--texto); text-decoration: none;
}
.marca img { width: 32px; height: 32px; }

.menu { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.menu a {
    color: var(--texto-2); text-decoration: none; font-weight: 500; font-size: .97rem;
    padding: .45rem .7rem; border-radius: 8px;
}
.menu a:hover { color: var(--texto); background: var(--fondo-2); }
.menu a[aria-current="page"] { color: var(--primario); }
/* Acceso de clientes a la app: separado del menu, con icono de entrar. */
.menu .entrar {
    display: inline-flex; align-items: center; gap: .4rem; color: var(--primario); font-weight: 600;
    margin-left: .5rem; padding-left: 1rem; border-left: 1px solid var(--borde); border-radius: 0;
}
.menu .entrar::before {
    content: ""; width: 1.05em; height: 1.05em; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4M10 17l5-5-5-5M15 12H3'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4M10 17l5-5-5-5M15 12H3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.menu .entrar:hover { color: var(--primario-oscuro); background: none; }
.menu .boton { margin-left: .5rem; color: #fff; }
.menu .boton:hover { color: #fff; background: var(--primario-oscuro); }

.boton-menu {
    display: none; margin-left: auto; background: none; border: 1px solid var(--borde);
    border-radius: 10px; width: 44px; height: 44px; cursor: pointer; color: var(--texto);
}
.boton-menu svg { width: 22px; height: 22px; }

@media (max-width: 900px) {
    .boton-menu { display: inline-flex; align-items: center; justify-content: center; }
    .menu {
        display: none; position: absolute; top: 68px; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-bottom: 1px solid var(--borde); padding: .5rem 20px 1rem;
        box-shadow: var(--sombra);
    }
    .menu.abierto { display: flex; }
    .menu a { padding: .8rem .5rem; font-size: 1.05rem; }
    .menu .boton { margin: .5rem 0 0; text-align: center; }
    .menu .entrar { margin: .25rem 0 0; padding-left: .5rem; border-left: 0; border-top: 1px solid var(--borde); padding-top: 1rem; }
}

/* --- Botones --- */
.boton {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    background: var(--primario); color: #fff; text-decoration: none; font-weight: 600;
    padding: .8rem 1.4rem; border-radius: 10px; border: 2px solid var(--primario);
    font-size: 1rem; cursor: pointer; font-family: inherit;
    transition: background .15s, transform .15s;
}
.boton:hover { background: var(--primario-oscuro); border-color: var(--primario-oscuro); color: #fff; transform: translateY(-1px); }
.boton.secundario { background: transparent; color: var(--primario); }
.boton.secundario:hover { background: var(--primario-suave); color: var(--primario-oscuro); }
.botones { display: flex; flex-wrap: wrap; gap: .75rem; }

/* --- Secciones --- */
.seccion { padding: 88px 0; }
.seccion.gris { background: var(--fondo-2); }
.seccion.estrecha { padding: 64px 0; }
.antetitulo {
    display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--primario); margin-bottom: .8rem;
}
.intro { max-width: 720px; margin-bottom: 3rem; }
.intro.centrada { margin-left: auto; margin-right: auto; text-align: center; }
.intro p, .texto-2 { color: var(--texto-2); font-size: 1.1rem; }

/* --- Portada --- */
.portada { padding: 72px 0 40px; overflow: hidden; }
.portada .contenedor { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
.portada h1 span { color: var(--primario); }
.portada .texto-2 { font-size: 1.2rem; max-width: 34rem; }
.portada .nota { font-size: .92rem; color: var(--texto-2); margin-top: 1rem; }

.captura {
    border-radius: var(--radio); overflow: hidden; box-shadow: 0 30px 60px -20px rgba(40, 30, 120, .35), var(--sombra);
    border: 1px solid var(--borde); background: #fff;
}
.captura .barra { display: flex; gap: 6px; padding: 10px 12px; background: var(--fondo-2); border-bottom: 1px solid var(--borde); }
.captura .barra i { width: 10px; height: 10px; border-radius: 50%; background: #d6d6de; }
.captura figcaption { font-size: .85rem; color: var(--texto-2); padding: .6rem .9rem; border-top: 1px solid var(--borde); }

@media (max-width: 900px) {
    .portada .contenedor { grid-template-columns: 1fr; }
    .seccion { padding: 64px 0; }
}

/* --- Rejillas y tarjetas --- */
.rejilla { display: grid; gap: 1.25rem; }
.rejilla.dos { grid-template-columns: repeat(2, 1fr); }
.rejilla.tres { grid-template-columns: repeat(3, 1fr); }
.rejilla.cuatro { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .rejilla.cuatro { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .rejilla.cuatro { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .rejilla.tres { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .rejilla.dos, .rejilla.tres { grid-template-columns: 1fr; } }

.tarjeta {
    background: #fff; border: 1px solid var(--borde); border-radius: var(--radio);
    padding: 1.6rem; box-shadow: 0 1px 2px rgba(20, 20, 50, .04);
}
.tarjeta h3 { margin-bottom: .4rem; }
.tarjeta p { color: var(--texto-2); margin: 0; }
.icono {
    width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--primario-suave); color: var(--primario); margin-bottom: 1rem;
}
.icono svg { width: 24px; height: 24px; }
.icono.verde { background: var(--verde-suave); color: var(--verde); }
.icono.naranja { background: var(--naranja-suave); color: var(--naranja); }
.icono.rojo { background: var(--rojo-suave); color: var(--rojo); }

/* Escenas del problema: frases que la recepcion reconoce. */
.escena { border-left: 4px solid var(--naranja); }
.escena blockquote { margin: 0 0 .6rem; font-size: 1.15rem; font-weight: 600; color: var(--texto); }
.escena.roja { border-left-color: var(--rojo); }
.escena.morada { border-left-color: var(--primario); }

/* Galeria de pantallas */
/* Escritorio: las pestanas saltan de linea (nada de barra de scroll). Movil: una fila que se desliza con el dedo. */
.pestanas {
    display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem;
    padding: .25rem; margin-bottom: 1.5rem;
}
/* Anchos medios: dos filas de cinco, en vez de una fila llena y una pestana huerfana. */
@media (min-width: 641px) and (max-width: 1150px) {
    .pestanas { display: grid; grid-template-columns: repeat(5, auto); justify-content: center; }
}
@media (max-width: 640px) {
    .pestanas {
        flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none;
        margin: 0 -20px 1.25rem; padding: .25rem 20px;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 28px), transparent 100%);
        mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 28px), transparent 100%);
    }
    .pestanas::-webkit-scrollbar { display: none; }
}
.pestanas button {
    flex: none; font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
    padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--borde);
    background: #fff; color: var(--texto-2); transition: background .15s, color .15s;
}
.pestanas button:hover { color: var(--texto); border-color: #cfcfda; }
.pestanas button[aria-selected="true"] { background: var(--primario); border-color: var(--primario); color: #fff; }
.panel-texto { max-width: 52rem; margin: 0 auto 1.25rem; text-align: center; color: var(--texto-2); font-size: 1.05rem; }
.panel-texto strong { color: var(--texto); }
.ampliar {
    display: block; width: 100%; padding: 0; border: 1px solid var(--borde); background: #fff; cursor: zoom-in;
    border-radius: var(--radio); overflow: hidden; box-shadow: 0 30px 60px -25px rgba(40, 30, 120, .35), var(--sombra);
}
.ampliar img { width: 100%; }
.ampliar.movil { width: min(360px, 80%); margin: 0 auto; border-radius: 28px; border: 8px solid #1d1d29; }
.visor { padding: 0; border: 0; border-radius: 12px; background: #fff; max-width: 96vw; max-height: 94vh; overflow: auto; }
.visor::backdrop { background: rgba(10, 10, 25, .82); }
.visor img { display: block; max-width: 96vw; max-height: 94vh; width: auto; height: auto; }
.visor.movil img { max-height: 90vh; }
.visor .cerrar {
    position: fixed; top: 14px; right: 18px; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
    background: #fff; color: var(--texto); font-size: 1.8rem; line-height: 1; box-shadow: var(--sombra);
}

.marcas.dos-columnas { columns: 2; column-gap: 2.5rem; margin-bottom: 2.5rem; }
.marcas.dos-columnas li { break-inside: avoid; }
@media (max-width: 640px) { .marcas.dos-columnas { columns: 1; } }

/* Carrusel: una captura grande cada vez; se desliza con el dedo, con las flechas o con los puntos. */
.carrusel { position: relative; }
.carrusel-pista {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    scrollbar-width: none; gap: 1.5rem; padding: 4px 4px 2.5rem;
}
.carrusel-pista::-webkit-scrollbar { display: none; }
.diapositiva { flex: 0 0 100%; scroll-snap-align: center; margin: 0; }
.diapositiva figcaption { text-align: center; color: var(--texto-2); margin-top: 1rem; font-size: 1rem; }
.diapositiva figcaption strong { color: var(--texto); }
.carrusel-ant, .carrusel-sig {
    position: absolute; top: calc(50% - 2.5rem); transform: translateY(-50%);
    width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--borde); background: #fff;
    color: var(--texto); font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: var(--sombra); z-index: 2;
}
.carrusel-ant { left: -22px; }
.carrusel-sig { right: -22px; }
.carrusel-ant:hover, .carrusel-sig:hover { background: var(--primario); color: #fff; border-color: var(--primario); }
.carrusel-ant:disabled, .carrusel-sig:disabled { opacity: 0; pointer-events: none; }
.carrusel-puntos { display: flex; justify-content: center; gap: .5rem; margin-top: -1rem; }
.carrusel-puntos button {
    width: 10px; height: 10px; padding: 0; border-radius: 999px; border: 0; cursor: pointer;
    background: #cfcfda; transition: width .2s, background .2s;
}
.carrusel-puntos button[aria-current="true"] { width: 28px; background: var(--primario); }
@media (max-width: 900px) {
    .carrusel-ant { left: 6px; }
    .carrusel-sig { right: 6px; }
    .carrusel-ant, .carrusel-sig { width: 40px; height: 40px; font-size: 1.3rem; }
}

/* Pasos */
.pasos { counter-reset: paso; }
.paso { position: relative; padding-top: 3.2rem; }
.paso::before {
    counter-increment: paso; content: counter(paso);
    position: absolute; top: 1.4rem; left: 1.6rem;
    width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--primario); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.paso h3 { margin-top: 1rem; }

/* Etiquetas de alerta (mismos colores que en la app). */
.etiqueta {
    display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    padding: .2rem .55rem; border-radius: 6px; color: #fff; vertical-align: middle;
}
.etiqueta.naranja { background: #f39c12; }
.etiqueta.azul { background: #2196f3; }
.etiqueta.roja { background: #e53935; }

.lista-alertas { list-style: none; margin: 0; padding: 0; }
.lista-alertas li { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--borde); }
.lista-alertas li:last-child { border-bottom: none; }
.lista-alertas p { margin: 0; color: var(--texto-2); }
@media (max-width: 640px) { .lista-alertas li { grid-template-columns: 1fr; gap: .4rem; } }

/* Lista con marcas */
.marcas { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.marcas li { position: relative; padding-left: 1.9rem; margin-bottom: .7rem; }
.marcas li::before {
    content: ""; position: absolute; left: 0; top: .35em; width: 1.1rem; height: 1.1rem; border-radius: 50%;
    background: var(--verde-suave) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f8a5b' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/70% no-repeat;
}
.marcas.no li::before {
    background: var(--fondo-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center/60% no-repeat;
}

/* Bloque de dos columnas: texto + imagen/caja */
.dividido { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.dividido.invertido > :first-child { order: 2; }
@media (max-width: 900px) { .dividido { grid-template-columns: 1fr; gap: 2rem; } .dividido.invertido > :first-child { order: 0; } }

/* Llamada final */
.llamada {
    background: linear-gradient(135deg, var(--primario) 0%, #5b3fd6 55%, #2a7d6b 140%);
    color: #fff; border-radius: 22px; padding: 3.5rem 2rem; text-align: center;
}
.llamada h2 { color: #fff; }
.llamada p { color: rgba(255, 255, 255, .88); max-width: 40rem; margin: 0 auto 1.6rem; font-size: 1.1rem; }
.llamada .boton { background: #fff; color: var(--primario); border-color: #fff; }
.llamada .boton:hover { background: var(--primario-suave); color: var(--primario-oscuro); }
.llamada .boton.secundario { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.llamada .botones { justify-content: center; }

/* Cabecera de paginas interiores */
.cabecera-pagina { padding: 64px 0 24px; }
.cabecera-pagina p { color: var(--texto-2); font-size: 1.15rem; max-width: 46rem; }

/* Precios */
.plan { position: relative; border: 2px solid var(--primario); }
.plan .sello {
    position: absolute; top: -14px; left: 1.6rem; background: var(--primario); color: #fff;
    font-size: .78rem; font-weight: 700; padding: .25rem .7rem; border-radius: 999px; letter-spacing: .04em;
}

.precios { align-items: stretch; margin-top: 1rem; }
.precio { display: flex; flex-direction: column; gap: .55rem; }
.precio h2 { margin: 0; font-size: 1.35rem; }
.precio .tramo { margin: 0; color: var(--texto-2); font-weight: 500; }
.precio .importe { margin: .4rem 0 0; font-size: 2.6rem; font-weight: 800; letter-spacing: -.02em; color: var(--texto); line-height: 1.1; }
.precio .importe small { font-size: 1rem; font-weight: 500; color: var(--texto-2); letter-spacing: 0; }
.precio .fundadora {
    margin: 0; align-self: flex-start; background: var(--primario-suave); color: var(--primario-oscuro);
    border-radius: 999px; padding: .3rem .8rem; font-weight: 600; font-size: .92rem;
}
.precio .boton { margin-top: auto; }
.nota-precios { color: var(--texto-2); font-size: .92rem; margin-top: 1.2rem; }
.incluido { margin-top: 3rem; }
.columnas-marcas { columns: 2; column-gap: 2.5rem; }
.columnas-marcas li { break-inside: avoid; }
@media (max-width: 640px) { .columnas-marcas { columns: 1; } }

/* Preguntas frecuentes */
.faq details { border: 1px solid var(--borde); border-radius: 12px; padding: 0 1.2rem; margin-bottom: .75rem; background: #fff; }
.faq summary { cursor: pointer; font-weight: 600; padding: 1rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primario); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--texto-2); }

/* Formulario */
.formulario { display: grid; gap: 1rem; }
.formulario label { font-weight: 600; font-size: .95rem; display: block; margin-bottom: .3rem; }
.formulario input, .formulario select, .formulario textarea {
    width: 100%; font: inherit; padding: .75rem .9rem; border: 1px solid #cfcfda; border-radius: 10px; background: #fff; color: var(--texto);
}
.formulario textarea { min-height: 130px; resize: vertical; }
.formulario .fila { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .formulario .fila { grid-template-columns: 1fr; } }
.formulario .aviso-legal { font-size: .85rem; color: var(--texto-2); }

/* Paginas legales */
.legal { max-width: 780px; }
.legal h2 { font-size: 1.35rem; margin-top: 2rem; }
.completar { background: #fff6d6; padding: 0 .3rem; border-radius: 4px; font-weight: 600; }

/* --- Pie --- */
.pie { background: #15151f; color: #b9b9c8; padding: 56px 0 28px; margin-top: 0; font-size: .95rem; }
.pie a { color: #d8d8e4; text-decoration: none; }
.pie a:hover { color: #fff; text-decoration: underline; }
.pie .columnas { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; }
.pie h4 { color: #fff; font-size: .95rem; margin: 0 0 .9rem; }
.pie ul { list-style: none; margin: 0; padding: 0; }
.pie li { margin-bottom: .5rem; }
.pie .marca { color: #fff; }
.pie .legal-pie { border-top: 1px solid #2c2c3a; margin-top: 2.5rem; padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .85rem; }
@media (max-width: 900px) { .pie .columnas { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pie .columnas { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .boton { transition: none; }
}
