:root {
    --color-primario: #3e8391;
    --color-secundario: #ffa92d;
    --color-tinta: #1f2d3d;
    --color-primario-oscuro: #2e626d;
    --superficie: #f4f1ea;
    --blanco: #ffffff;
    --radio: 1.25rem;
}

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

html { scroll-behavior: smooth; }

body.portal-captacion {
    margin: 0;
    min-height: 100vh;
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    color: var(--color-tinta);
    background: var(--superficie);
}

.portal-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.portal-hero {
    position: relative;
    isolation: isolate;
    padding: 1.5rem 1.15rem 0;
}

.portal-hero-bg {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 4.5rem;
    z-index: 0;
    background:
        linear-gradient(148deg, var(--color-primario-oscuro) 0%, var(--color-primario) 68%);
    clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%);
}

.portal-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .1;
    background-image:
        radial-gradient(circle at 12% 28%, #fff 1.1px, transparent 1.4px),
        radial-gradient(circle at 78% 18%, #fff 1px, transparent 1.3px),
        radial-gradient(circle at 62% 62%, #fff 1.2px, transparent 1.5px),
        radial-gradient(circle at 22% 72%, #fff .9px, transparent 1.2px);
    background-size: 180px 180px, 220px 160px, 200px 200px, 160px 140px;
    pointer-events: none;
}

.portal-hero-inner {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
}

.portal-copy {
    color: #fff;
    text-align: left;
    padding: .35rem .1rem 0;
}

.portal-copy img {
    display: block;
    max-height: 72px;
    width: auto;
    margin: 0 0 1.1rem;
    background: none;
    border-radius: 0;
    filter: brightness(0) invert(1);
}

.portal-copy h1 {
    font-weight: 700;
    font-size: clamp(1.55rem, 4.4vw, 2.35rem);
    letter-spacing: -.03em;
    line-height: 1.15;
    margin: 0 0 .45rem;
    max-width: 22ch;
}

.portal-copy-lead {
    margin: 0 0 1.35rem;
    font-size: 1.08rem;
    line-height: 1.5;
    max-width: 34rem;
    opacity: .92;
}

.portal-kicker {
    display: inline-block;
    background: var(--color-secundario);
    color: var(--color-tinta);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .3rem .65rem;
    border-radius: 999px;
    margin-bottom: .75rem;
}

.portal-help {
    display: flex;
    flex-direction: column;
    gap: .95rem;
    text-align: left;
}

.portal-help > div {
    display: flex;
    align-items: center;
    gap: .85rem;
    font-size: 1.02rem;
    font-weight: 600;
}

.portal-help i {
    width: 1.5rem;
    text-align: center;
    color: var(--color-secundario);
}

.portal-copy-cierre {
    margin: 1.4rem 0 0;
    font-size: .98rem;
    line-height: 1.45;
    max-width: 34rem;
    opacity: .92;
}

.portal-form-wrap {
    position: relative;
    z-index: 2;
    width: min(600px, 100%);
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 1.5rem;
}

.portal-main {
    width: min(600px, calc(100% - 1.5rem));
    margin: 2rem auto;
}

.portal-social {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .75rem 1.1rem;
    margin: .35rem 0 .7rem;
}

.portal-trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.portal-trust span {
    background: var(--blanco);
    border-radius: .85rem;
    padding: .7rem .6rem;
    text-align: center;
    font-size: .82rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(31, 45, 61, .06);
}

.option-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    background: var(--blanco);
    border-radius: var(--radio);
    padding: 1.25rem 1.3rem 1.1rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 12px 32px rgba(31, 45, 61, .08);
}

.btn-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    background: var(--color-secundario);
    color: var(--color-tinta);
    font-weight: 700;
    border: 0;
    border-radius: 999px;
    padding: .95rem 1.4rem;
    text-decoration: none;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--color-secundario) 45%, transparent);
}

.btn-brand:hover {
    filter: brightness(1.05);
    color: var(--color-tinta);
}

.btn-ghost {
    color: var(--color-primario);
    font-weight: 600;
}

.form-card {
    width: 100%;
    background: var(--blanco);
    border-radius: 1.35rem;
    padding: 1.65rem 1.4rem 1.55rem;
    box-shadow: 0 22px 50px rgba(31, 45, 61, .16);
}

.form-card-title {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0 0 1.15rem;
    color: var(--color-tinta);
}

.form-fields,
.grupo-ubicacion {
    display: grid;
    grid-template-columns: 1fr;
    column-gap: .85rem;
}

.form-grid-full {
    grid-column: 1 / -1;
}

.form-fields + .btn-brand {
    margin-top: .25rem;
}

.form-card .form-label {
    font-weight: 600;
    margin-bottom: .35rem;
}

.form-card .form-control,
.form-card .form-select {
    min-height: 48px;
    border-radius: .7rem;
    border-color: #e4eaed;
    background: #f6f8f9;
    font-size: 16px;
}

.form-card .form-control:focus,
.form-card .form-select:focus {
    background: var(--blanco);
    border-color: var(--color-primario);
    box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--color-primario) 22%, transparent);
}

.form-hint { font-size: .8rem; color: #66747c; margin-top: .3rem; }

.grupo-ubicacion {
    background: #f3f8f9;
    border-radius: 1rem;
    padding: 1rem 1rem .4rem;
    margin-bottom: 1rem;
}

.grupo-ubicacion h2 {
    grid-column: 1 / -1;
    font-size: .95rem;
    font-weight: 700;
    color: var(--color-primario);
    margin: 0 0 .75rem;
}

.habeas-box {
    border: 1px solid #d7e0e3;
    border-radius: 1rem;
    padding: 1rem;
    background: #fafafa;
}

.habeas-box .aviso {
    max-height: 140px;
    overflow: auto;
    font-size: .82rem;
    color: #4d5a62;
    margin-top: .6rem;
}

.alert-portal {
    border: 0;
    border-radius: .9rem;
    background: #fdecea;
    color: #7a1f1a;
}

.portal-foot {
    text-align: center;
    padding: 3.25rem 1rem 2rem;
    color: #6b7780;
    font-size: .85rem;
    margin-top: auto;
}

.gracias-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.gracias-card {
    width: min(440px, 100%);
    background: var(--blanco);
    border-radius: 1.4rem;
    padding: 2.2rem 1.6rem;
    text-align: center;
    box-shadow: 0 24px 50px rgba(31, 45, 61, .16);
}

.gracias-card img {
    display: block;
    max-height: 120px;
    width: auto;
    margin: 0 auto 1rem;
    background: none;
    border-radius: 0;
}

.qr-wrap svg { width: 240px; height: 240px; }

@media (min-width: 960px) {
    .portal-hero {
        padding: 2.35rem 2rem 0;
    }

    .portal-hero-bg {
        bottom: 5.5rem;
        clip-path: polygon(0 0, 100% 0, 100% 78%, 0 100%);
    }

    .portal-hero-inner {
        grid-template-columns: minmax(0, 1fr) minmax(600px, 600px);
        gap: 2.75rem;
        align-items: start;
        padding-top: .5rem;
    }

    .portal-copy {
        padding: 1.25rem 0 5rem;
    }

    .portal-copy img {
        max-height: 86px;
        margin-bottom: 1.6rem;
    }

    .portal-form-wrap {
        width: 600px;
        max-width: 600px;
        margin: 1.1rem 0 -3.75rem auto;
        padding-bottom: 0;
    }

    .portal-foot {
        padding-top: 4.5rem;
    }
}

@media (min-width: 640px) {
    .form-fields,
    .grupo-ubicacion {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .portal-trust { grid-template-columns: 1fr; }
    .portal-copy h1 { max-width: none; }
}
