/*
 * Páginas públicas — hoja única, sin dependencias.
 *
 * Las públicas se sirven con Blade y SIN el bundle de Vite (ver
 * routes/web.php): un robot o un filtro de correo corporativo tiene que poder
 * leer la página entera sin ejecutar JavaScript. Por eso aquí no se usa
 * Bootstrap ni Font Awesome — todo lo que hace falta cabe en este archivo.
 *
 * Los colores salen de las custom properties de brand.css, que se carga antes.
 */

/* ─────────────── Reset mínimo ─────────────── */

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

body {
    margin: 0;
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--brand-dark);
    background: var(--brand-surface);
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    margin: 0 0 .6em;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--brand-dark);
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

/* ─────────────── Rejilla ─────────────── */

.wrap {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/*
 * La franja «estrecha» NO se centra en un contenedor más angosto: eso movería
 * el borde izquierdo respecto a las secciones anchas y la página se leería
 * como si cada bloque empezara en un sitio distinto. Se mantiene el mismo
 * carril y se limita la longitud de línea de cada hijo.
 */
.wrap--narrow > * { max-width: 72ch; }

.band { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.band--tint { background: var(--brand-bg); }
.band--dark { background: var(--brand-dark); color: #fff; }
.band--dark h2, .band--dark h3 { color: #fff; }
.band--tight { padding: clamp(2rem, 4vw, 3rem) 0; }

.band + .band { border-top: 1px solid var(--brand-border); }
.band--tint + .band--tint,
.band--dark + .band--dark { border-top: 0; }

/* ─────────────── Tipografía de apoyo ─────────────── */

.eyebrow {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--brand-primary);
    margin-bottom: 1rem;
}

.lead {
    font-size: clamp(1.08rem, 2vw, 1.3rem);
    line-height: 1.55;
    color: var(--brand-dark-soft);
}

.muted { color: var(--brand-muted); }
.small { font-size: .9rem; }

/* Frase que sentencia el cierre de una sección. */
.sentence {
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    font-weight: 600;
    line-height: 1.4;
    border-left: 4px solid var(--brand-primary);
    padding-left: 1.25rem;
    margin: 2rem 0 0;
}

.band--dark .sentence { border-left-color: var(--brand-primary); }

/* ─────────────── Botones ─────────────── */

.btn {
    display: inline-block;
    padding: .8rem 1.6rem;
    border-radius: var(--brand-radius);
    font-weight: 600;
    font-size: .98rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }

.btn--primary { background: var(--brand-primary); color: #fff; }
.btn--primary:hover { background: var(--brand-primary-dark); color: #fff; }

.btn--ghost { border-color: var(--brand-border); color: var(--brand-dark); }
.btn--ghost:hover { border-color: var(--brand-dark); }

.band--dark .btn--ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.band--dark .btn--ghost:hover { border-color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.8rem; }

/* ─────────────── Barra de navegación ─────────────── */

.nav {
    border-bottom: 1px solid var(--brand-border);
    background: var(--brand-surface);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 74px;
}

.nav__logo img { height: 46px; width: auto; }

.nav__links {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    margin-left: auto;
}

.nav__link {
    color: var(--brand-dark);
    font-size: .95rem;
    font-weight: 500;
    padding: .3rem 0;
    border-bottom: 2px solid transparent;
}
.nav__link:hover { color: var(--brand-primary); text-decoration: none; }
.nav__link.is-active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }

.nav__portal {
    font-size: .9rem;
    font-weight: 600;
    color: var(--brand-dark);
    border: 1px solid var(--brand-border);
    border-radius: 999px;
    padding: .45rem 1.05rem;
}
.nav__portal:hover { border-color: var(--brand-primary); color: var(--brand-primary); text-decoration: none; }

/*
 * Menú móvil con <details>: se abre y se cierra sin una línea de JavaScript.
 * Un menú que necesita JS rompe la única prueba de aceptación que tiene este
 * rediseño — desactivar JS y que la página se lea entera.
 */
.nav__mobile { display: none; margin-left: auto; }
.nav__mobile > summary {
    list-style: none;
    cursor: pointer;
    padding: .5rem .9rem;
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    font-size: .9rem;
    font-weight: 600;
}
.nav__mobile > summary::-webkit-details-marker { display: none; }

.nav__mobile-panel {
    position: absolute;
    left: 0; right: 0;
    background: var(--brand-surface);
    border-bottom: 1px solid var(--brand-border);
    box-shadow: var(--brand-shadow-lg);
    padding: .5rem 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
}
.nav__mobile-panel a {
    padding: .8rem 0;
    border-bottom: 1px solid var(--brand-border);
    color: var(--brand-dark);
    font-weight: 500;
}
.nav__mobile-panel a:last-child { border-bottom: 0; color: var(--brand-primary); font-weight: 600; }

@media (max-width: 900px) {
    .nav__links { display: none; }
    .nav__mobile { display: block; }
}

/* ─────────────── Portada ─────────────── */

.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }

/* Sin foto no se reserva la segunda columna: dejaría media portada en blanco. */
.hero__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.hero__grid--photo { grid-template-columns: 1.35fr .65fr; }

.hero__title { margin-bottom: .8rem; max-width: 22ch; }
.hero__title .sep { color: var(--brand-primary); font-weight: 400; }
.hero .lead, .hero__grid .lead { max-width: 58ch; }

.hero__photo {
    border-radius: 20px;
    overflow: hidden;
    background: var(--brand-bg);
    border: 1px solid var(--brand-border);
    aspect-ratio: 4 / 5;
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 820px) {
    .hero__grid--photo { grid-template-columns: 1fr; }
    .hero__photo { max-width: 300px; order: -1; }
}

/* ─────────────── Rejilla de tarjetas ─────────────── */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.25rem;
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    padding: 1.5rem;
    display: block;
    color: inherit;
    transition: border-color .15s, box-shadow .15s;
}

a.card:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--brand-shadow-lg);
    text-decoration: none;
}

.card h3 { margin-bottom: .45rem; font-size: 1.08rem; }
.card p { font-size: .95rem; color: var(--brand-dark-soft); margin-bottom: 0; }

.card__num {
    display: block;
    font-size: .8rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: .5rem;
    letter-spacing: .06em;
}

.card__cover {
    aspect-ratio: 16 / 9;
    background: var(--brand-bg);
    border-radius: calc(var(--brand-radius) - 4px);
    overflow: hidden;
    margin: -.35rem 0 1rem;
}
.card__cover img { width: 100%; height: 100%; object-fit: cover; }

.card__meta {
    font-size: .82rem;
    color: var(--brand-muted);
    margin-top: .9rem;
}

/* ─────────────── Bloques de proceso (servicios) ─────────────── */

.proc { border-top: 1px solid var(--brand-border); padding: 2.5rem 0; }
.proc:first-of-type { border-top: 0; padding-top: 0; }

.proc__head {
    display: flex;
    align-items: baseline;
    gap: .8rem;
    flex-wrap: wrap;
    margin-bottom: .4rem;
}
.proc__head h2 { margin: 0; font-size: clamp(1.35rem, 2.6vw, 1.8rem); }

.proc__for {
    font-size: .85rem;
    color: var(--brand-muted);
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: 999px;
    padding: .2rem .8rem;
}

.proc__symptom {
    font-size: 1.08rem;
    color: var(--brand-dark);
    border-left: 4px solid var(--brand-primary-soft);
    padding-left: 1.1rem;
    margin: 1.1rem 0 1.4rem;
}

.proc__cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 700px) { .proc__cols { grid-template-columns: 1fr; } }

.proc__label {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--brand-muted);
    margin-bottom: .45rem;
}

.proc__cols p { font-size: .96rem; color: var(--brand-dark-soft); }

/* ─────────────── Lista de "lo que no hago" ─────────────── */

.limits {
    background: var(--brand-primary-soft);
    border-radius: var(--brand-radius);
    padding: clamp(1.5rem, 3vw, 2.25rem);
}
.limits h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
.limits p { color: var(--brand-dark); }
.limits p:last-child { margin-bottom: 0; }

/* ─────────────── Pasos numerados ─────────────── */

.steps { counter-reset: paso; list-style: none; padding: 0; margin: 0; }

.steps > li {
    counter-increment: paso;
    position: relative;
    padding-left: 3.4rem;
    margin-bottom: 2.5rem;
}
.steps > li:last-child { margin-bottom: 0; }

.steps > li::before {
    content: counter(paso);
    position: absolute;
    left: 0; top: -.15rem;
    width: 2.4rem; height: 2.4rem;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.steps h3 { font-size: 1.25rem; margin-bottom: .5rem; }

@media (max-width: 600px) {
    .steps > li { padding-left: 0; padding-top: 3rem; }
    .steps > li::before { top: 0; }
}

/* ─────────────── Datos verificables ─────────────── */

.facts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .1rem;
}
.facts li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--brand-border);
    font-size: .95rem;
}
.facts li:last-child { border-bottom: 0; }
.facts dt, .facts .k { color: var(--brand-muted); }
.facts .v { font-weight: 600; text-align: right; }

/* ─────────────── Formulario ─────────────── */

.form { display: grid; gap: 1.1rem; max-width: 560px; }

.form label {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: .35rem;
}

.form input, .form select, .form textarea {
    width: 100%;
    font: inherit;
    font-size: .98rem;
    padding: .75rem .9rem;
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    background: var(--brand-surface);
    color: var(--brand-dark);
}
.form input:focus, .form select:focus, .form textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-primary-soft);
}

.form textarea { min-height: 130px; resize: vertical; }

.form__hint { font-size: .85rem; color: var(--brand-muted); margin-top: .3rem; }

.form__error { color: var(--brand-danger); font-size: .85rem; margin-top: .3rem; display: block; }

/* Honeypot: fuera de pantalla, nunca display:none — algunos bots lo detectan. */
.form__trap {
    position: absolute;
    left: -9999px;
    width: 1px; height: 1px;
    overflow: hidden;
}

.alert {
    border-radius: var(--brand-radius);
    padding: 1rem 1.15rem;
    margin-bottom: 1.5rem;
    font-size: .95rem;
}
.alert--ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert--bad { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* ─────────────── Artículos ─────────────── */

.prose { font-size: 1.05rem; }
.prose h2 { font-size: 1.6rem; margin-top: 2.2rem; }
.prose h3 { font-size: 1.25rem; margin-top: 1.8rem; }
.prose img { border-radius: var(--brand-radius); margin: 1.5rem 0; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .5rem; }
.prose blockquote {
    margin: 1.5rem 0;
    padding-left: 1.25rem;
    border-left: 4px solid var(--brand-primary);
    color: var(--brand-dark-soft);
}
.prose code {
    background: var(--brand-bg);
    padding: .15em .4em;
    border-radius: 5px;
    font-size: .9em;
}
.prose pre {
    background: var(--brand-dark);
    color: #f1f5f9;
    padding: 1rem 1.15rem;
    border-radius: var(--brand-radius);
    overflow-x: auto;
}
.prose pre code { background: none; padding: 0; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.tag {
    font-size: .78rem;
    background: var(--brand-bg);
    border: 1px solid var(--brand-border);
    border-radius: 999px;
    padding: .18rem .7rem;
    color: var(--brand-muted);
}

/* ─────────────── Estado vacío ─────────────── */

.empty {
    border: 1px dashed var(--brand-border);
    border-radius: var(--brand-radius);
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--brand-muted);
}

/* ─────────────── Pie ─────────────── */

.foot {
    background: var(--brand-dark);
    color: rgba(255,255,255,.72);
    padding: 3rem 0 2rem;
    font-size: .92rem;
}

.foot a { color: rgba(255,255,255,.72); }
.foot a:hover { color: #fff; }

.foot__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.25rem;
}
@media (max-width: 720px) { .foot__grid { grid-template-columns: 1fr; } }

.foot__logo img { height: 44px; width: auto; filter: brightness(0) invert(1); opacity: .9; }

.foot h4 {
    color: #fff;
    font-size: .8rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: .9rem;
}

.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: .5rem; }

.foot__legal {
    border-top: 1px solid rgba(255,255,255,.14);
    padding-top: 1.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    justify-content: space-between;
    font-size: .85rem;
    color: rgba(255,255,255,.55);
}

/* ─────────────── Utilidades ─────────────── */

.stack > * + * { margin-top: 1.5rem; }
.mt-0 { margin-top: 0; }
.mt-lg { margin-top: 2.5rem; }
.center { text-align: center; }

.skip {
    position: absolute;
    left: -9999px;
}
.skip:focus {
    left: 1rem; top: 1rem;
    z-index: 100;
    background: var(--brand-dark);
    color: #fff;
    padding: .6rem 1rem;
    border-radius: var(--brand-radius);
}
