/* Páginas públicas de Soteir: inicio, registro, ayuda y contrato.
 * Misma paleta que el sistema del cliente (soteir_tenant_onboarding/static/src/scss/primary_variables.scss):
 * azul para la acción, tinta para el texto y los fondos oscuros, rojo de marca solo en el logo.
 * Todos los pares de texto y fondo cumplen WCAG AA. */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/soteir_tenant_onboarding/static/src/fonts/InterVariable.woff2") format("woff2");
}

:root {
    --st-accent: #2250d9;
    --st-accent-dark: #1b3fae;
    --st-accent-tint: #eef3ff;
    --st-ink: #111a2b;
    --st-text: #1d2939;
    --st-muted: #5d6b82;
    --st-line: #e3e8ef;
    --st-line-strong: #c5ccd8;
    --st-tint: #f4f6f9;
    --st-green: #067647;
    --st-green-tint: #ecfdf3;
    --st-danger: #b42318;
    --st-danger-tint: #fef3f2;
    --st-radius: 12px;
    --st-shadow-sm: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
    --st-shadow-md: 0 10px 24px -8px rgba(16, 24, 40, .16), 0 2px 6px -2px rgba(16, 24, 40, .06);
    --st-shadow-lg: 0 30px 60px -20px rgba(9, 15, 30, .45), 0 10px 24px -10px rgba(9, 15, 30, .30);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--st-text);
    background: #fff;
    font: 17px/1.6 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.08; margin: 0 0 20px; letter-spacing: -0.035em; font-weight: 750; color: var(--st-ink); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); line-height: 1.15; margin: 0 0 28px; letter-spacing: -0.025em; font-weight: 720; color: var(--st-ink); }
h3 { font-size: 1.06rem; margin: 0 0 6px; font-weight: 650; color: var(--st-ink); }
p { margin: 0 0 16px; }
a { color: var(--st-accent); }
[hidden] { display: none !important; }

/* ---------- Encabezado y pie ---------- */
.st-header, .st-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px clamp(16px, 5vw, 48px);
}
.st-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--st-line);
}
.st-logo img { display: block; height: 44px; width: auto; }
.st-footer {
    flex-wrap: wrap;
    border-top: 1px solid var(--st-line);
    color: var(--st-muted);
    font-size: 0.9rem;
    margin-top: 0;
}

/* ---------- Botones: la acción en azul, con volumen ---------- */
.st-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 22px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, #2a5ce6 0%, var(--st-accent) 100%);
    color: #fff;
    font: inherit;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .16), inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -1px 0 rgba(0, 0, 0, .16);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.st-btn:hover { background: linear-gradient(180deg, var(--st-accent) 0%, var(--st-accent-dark) 100%); box-shadow: 0 8px 20px -6px rgba(34, 80, 217, .55); transform: translateY(-1px); color: #fff; }
.st-btn:active { transform: translateY(0); }
.st-btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.st-btn-small { min-height: 40px; padding: 8px 16px; font-size: 0.95rem; }
.st-btn-large { min-height: 54px; padding: 14px 28px; font-size: 1.06rem; }
.st-btn-block { display: flex; width: 100%; }
.st-btn-secondary { background: #fff; color: var(--st-text); box-shadow: inset 0 0 0 1px var(--st-line-strong), 0 1px 2px rgba(16, 24, 40, .05); }
.st-btn-secondary:hover { background: var(--st-tint); color: var(--st-ink); box-shadow: inset 0 0 0 1px #98a2b3; }
/* Sobre fondo oscuro: un halo suave atrae la mirada a la única acción (efecto de aislamiento) */
.st-btn-glow { box-shadow: 0 0 0 1px rgba(255, 255, 255, .10), 0 10px 30px -6px rgba(59, 108, 240, .70), inset 0 1px 0 rgba(255, 255, 255, .20); }
.st-btn-ghost { background: rgba(255, 255, 255, .06); color: #e6ebf3; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.st-btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.st-link {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: none;
    border: 0;
    color: var(--st-muted);
    font: inherit;
    text-align: center;
    text-decoration: underline;
    cursor: pointer;
}
:focus-visible { outline: 3px solid #6f93f5; outline-offset: 2px; }

/* ---------- Portada ---------- */
.st-hero-band {
    position: relative;
    overflow: hidden;
    color: #c9d3e3;
    background:
        radial-gradient(900px 500px at 85% 10%, rgba(59, 108, 240, .35) 0%, rgba(59, 108, 240, 0) 60%),
        radial-gradient(700px 400px at 5% 100%, rgba(34, 80, 217, .22) 0%, rgba(34, 80, 217, 0) 60%),
        linear-gradient(180deg, #0f1828 0%, #131f35 100%);
}
/* Rejilla tenue: textura que da profundidad sin distraer */
.st-hero-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at 60% 30%, #000 0%, transparent 70%);
    pointer-events: none;
}
.st-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 56px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(48px, 8vw, 104px) clamp(16px, 5vw, 48px) clamp(56px, 8vw, 112px);
}
.st-hero h1 { color: #fff; }
.st-highlight {
    background: linear-gradient(90deg, #8fb0ff 0%, #c7d7fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.st-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #c7d7fe;
    font-weight: 600;
    font-size: .92rem;
    margin-bottom: 20px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.st-dot { width: 8px; height: 8px; border-radius: 50%; background: #32d583; box-shadow: 0 0 0 4px rgba(50, 213, 131, .18); }
.st-lead { color: #b8c3d6; font-size: 1.18rem; max-width: 33em; margin-bottom: 30px; }
.st-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.st-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 26px 0 0; font-size: .93rem; color: #aab6ca; }
.st-trust li { display: flex; align-items: center; gap: 8px; }
.st-trust li::before { content: "✓"; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(50, 213, 131, .16); color: #32d583; font-size: .72rem; font-weight: 800; }
.st-note { color: var(--st-muted); font-size: 0.92rem; margin: 10px 0 0; }
.st-center { text-align: center; }

/* Vista del producto */
.st-product { position: relative; padding: 10px 24px 40px 0; }
.st-window {
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--st-shadow-lg), 0 0 0 1px rgba(255, 255, 255, .08);
    overflow: hidden;
    transform: perspective(1600px) rotateY(-6deg) rotateX(2deg);
}
.st-window-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #f4f6f9; border-bottom: 1px solid var(--st-line); }
.st-window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d0d5dd; }
.st-window-bar span { margin-left: 10px; font-size: .78rem; color: var(--st-muted); background: #fff; border: 1px solid var(--st-line); border-radius: 6px; padding: 2px 10px; }
.st-window-body { padding: 18px; background: #f4f6f9; }
.st-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.st-kpi { background: #fff; border: 1px solid var(--st-line); border-radius: 10px; padding: 12px; box-shadow: var(--st-shadow-sm); }
.st-kpi small { display: block; color: var(--st-muted); font-size: .72rem; }
.st-kpi strong { display: block; color: var(--st-ink); font-size: 1.12rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.st-kpi em { font-style: normal; font-size: .7rem; color: var(--st-muted); }
.st-kpi em.st-up { color: var(--st-green); font-weight: 650; }
.st-bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; margin-top: 12px; padding: 14px; background: #fff; border: 1px solid var(--st-line); border-radius: 10px; box-shadow: var(--st-shadow-sm); }
.st-bars span { flex: 1; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #5b86f5 0%, var(--st-accent) 100%); opacity: .9; }
.st-bars span:last-child { background: linear-gradient(180deg, #3b6cf0 0%, var(--st-accent-dark) 100%); opacity: 1; }
.st-float { position: absolute; background: #fff; border-radius: 12px; box-shadow: var(--st-shadow-lg); }
.st-invoice { right: 0; bottom: -6px; width: 270px; padding: 16px 18px; font-size: .86rem; color: var(--st-text); }
.st-invoice-head, .st-invoice-line, .st-invoice-total { display: flex; justify-content: space-between; gap: 12px; }
.st-invoice-head { margin-bottom: 8px; color: var(--st-ink); }
.st-invoice-line { padding: 7px 0; border-top: 1px solid var(--st-line); font-variant-numeric: tabular-nums; }
.st-invoice-total { padding-top: 9px; border-top: 2px solid var(--st-ink); font-weight: 750; color: var(--st-ink); font-variant-numeric: tabular-nums; }
.st-toast { left: -18px; top: 46%; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; font-size: .86rem; animation: st-pop .6s cubic-bezier(.2, .9, .3, 1.2) .5s both; }
.st-toast strong { display: block; color: var(--st-ink); }
.st-toast small { color: var(--st-muted); }
.st-toast-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--st-green-tint); color: var(--st-green); font-weight: 800; }
.st-chip { background: var(--st-green-tint); color: var(--st-green); border-radius: 999px; padding: 2px 12px; font-size: 0.85rem; font-weight: 650; }
@keyframes st-pop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- Secciones ---------- */
.st-section { max-width: 1200px; margin: 0 auto; padding: clamp(56px, 8vw, 96px) clamp(16px, 5vw, 48px); }
.st-section-tint { max-width: none; background: var(--st-tint); border-top: 1px solid var(--st-line); border-bottom: 1px solid var(--st-line); }
.st-section-tint > * { max-width: 1104px; margin-left: auto; margin-right: auto; }
.st-kicker { color: var(--st-accent); font-weight: 650; font-size: .9rem; letter-spacing: .02em; margin-bottom: 8px; }
.st-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.st-grid p { color: var(--st-muted); margin: 0; font-size: .97rem; }
.st-features article {
    padding: 24px;
    border: 1px solid var(--st-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--st-shadow-sm);
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.st-features article:hover { box-shadow: var(--st-shadow-md); transform: translateY(-2px); border-color: var(--st-line-strong); }
.st-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px; border-radius: 12px; background: var(--st-accent-tint); box-shadow: inset 0 0 0 1px #c7d7fe; }
.st-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--st-accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.st-steps { list-style: none; counter-reset: step; display: grid; gap: 20px; padding: 0; margin-bottom: 0; }
.st-steps li { counter-increment: step; position: relative; padding: 22px 22px 22px 76px; background: #fff; border: 1px solid var(--st-line); border-radius: 14px; box-shadow: var(--st-shadow-sm); }
.st-steps li::before {
    content: counter(step);
    position: absolute;
    left: 22px;
    top: 22px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(180deg, #2a5ce6 0%, var(--st-accent) 100%);
    color: #fff;
    font-weight: 750;
    box-shadow: 0 6px 14px -4px rgba(34, 80, 217, .5);
}
.st-steps strong, .st-steps span { display: block; }
.st-steps strong { color: var(--st-ink); }
.st-steps span { color: var(--st-muted); font-size: .97rem; }

/* Precio */
.st-price-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 860px;
    padding: clamp(24px, 4vw, 40px);
    border: 1px solid var(--st-line);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
    box-shadow: var(--st-shadow-md);
}
.st-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.st-price strong { font-size: 3rem; letter-spacing: -.04em; color: var(--st-ink); line-height: 1; font-variant-numeric: tabular-nums; }
.st-price span { color: var(--st-muted); }
.st-price-alt { color: var(--st-green); font-weight: 600; margin-bottom: 22px; }
.st-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; align-content: center; }
.st-checklist li { display: flex; gap: 12px; align-items: flex-start; }
.st-checklist li::before { content: "✓"; flex: 0 0 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--st-accent-tint); color: var(--st-accent); font-size: .78rem; font-weight: 800; margin-top: 2px; }

/* Preguntas */
.st-faq details { max-width: 860px; }
details { border: 1px solid var(--st-line); border-radius: 12px; padding: 16px 20px; margin-bottom: 10px; background: #fff; transition: box-shadow .15s ease; }
details[open] { box-shadow: var(--st-shadow-sm); }
summary { font-weight: 600; cursor: pointer; color: var(--st-ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--st-accent); font-weight: 600; font-size: 1.2rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 10px 0 0; color: var(--st-muted); }

/* Cierre */
.st-cta { text-align: center; padding: 48px clamp(16px, 5vw, 48px); }
.st-cta-band {
    text-align: center;
    padding: clamp(56px, 8vw, 96px) clamp(16px, 5vw, 48px);
    color: #b8c3d6;
    background:
        radial-gradient(600px 300px at 50% 0%, rgba(59, 108, 240, .35) 0%, rgba(59, 108, 240, 0) 70%),
        linear-gradient(180deg, #131f35 0%, #0f1828 100%);
}
.st-cta-band h2 { color: #fff; margin-bottom: 12px; }
.st-cta-band p { margin-bottom: 28px; font-size: 1.1rem; }

/* ---------- Registro y mensajes ---------- */
body:has(.st-card) main {
    background: radial-gradient(1100px 520px at 50% -10%, #e8eefc 0%, rgba(232, 238, 252, 0) 60%), var(--st-tint);
    padding-bottom: 56px;
}
.st-card {
    width: min(100% - 32px, 460px);
    margin: clamp(24px, 7vh, 64px) auto 0;
    padding: clamp(24px, 5vw, 36px);
    border: 1px solid var(--st-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 40px -16px rgba(16, 24, 40, .22), 0 2px 6px -2px rgba(16, 24, 40, .06);
}
.st-card h1 { font-size: 1.6rem; color: var(--st-ink); }
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-size: 1.45rem; font-weight: 720; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 20px; padding: 0; color: var(--st-ink); }
.st-progress { color: var(--st-accent); font-weight: 600; font-size: 0.85rem; margin-bottom: 6px; }
.st-field { margin-bottom: 18px; }
.st-field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; color: var(--st-ink); }
.st-field input {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid #c5ccd8;
    border-radius: 10px;
    font: inherit;
    background: #fff;
    color: var(--st-ink);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.st-field input:focus { outline: none; border-color: var(--st-accent); box-shadow: 0 0 0 4px rgba(34, 80, 217, .14); }
.st-field input[aria-invalid="true"] { border: 1px solid var(--st-danger); box-shadow: 0 0 0 4px rgba(180, 35, 24, .10); }
.st-address { display: flex; align-items: center; border: 1px solid #c5ccd8; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }
.st-address:focus-within { outline: none; border-color: var(--st-accent); box-shadow: 0 0 0 4px rgba(34, 80, 217, .14); }
.st-address input { flex: 1; min-width: 0; border: 0; border-radius: 0; outline: none; box-shadow: none; }
.st-address input:focus { box-shadow: none; }
.st-address span { padding: 0 12px; color: var(--st-muted); font-size: 0.92rem; white-space: nowrap; background: var(--st-tint); align-self: stretch; display: flex; align-items: center; border-left: 1px solid var(--st-line); }
.st-help { color: var(--st-muted); font-size: 0.92rem; margin: 6px 0 0; }
.st-help.is-ok { color: var(--st-green); font-weight: 600; }
.st-error { color: var(--st-danger); font-size: 0.95rem; font-weight: 600; margin: 6px 0 0; }
.st-error:empty { display: none; }
#err_form, #err_trial { margin-bottom: 14px; }
.st-alert { background: var(--st-danger-tint); color: var(--st-danger); border: 1px solid #fecdca; border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; font-weight: 600; }
.st-divider { display: flex; align-items: center; gap: 12px; color: var(--st-muted); margin: 18px 0; }
.st-divider::before, .st-divider::after { content: ""; flex: 1; border-top: 1px solid var(--st-line); }
.st-trap { position: absolute; left: -9999px; height: 1px; overflow: hidden; }
.st-spinner {
    width: 44px;
    height: 44px;
    margin: 8px auto 20px;
    border: 4px solid var(--st-line);
    border-top-color: var(--st-accent);
    border-radius: 50%;
    animation: st-spin 0.9s linear infinite;
}
.st-check {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--st-green-tint);
    color: var(--st-green);
    font-size: 1.8rem;
    font-weight: 700;
}
@keyframes st-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .st-spinner { animation-duration: 3s; }
    .st-btn, .st-features article, .st-toast { transition: none; animation: none; }
    .st-window { transform: none; }
}

@media (min-width: 720px) {
    .st-grid { grid-template-columns: repeat(2, 1fr); }
    .st-steps { grid-template-columns: repeat(3, 1fr); }
    .st-price-card { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
    .st-hero { grid-template-columns: 1.05fr 1fr; }
    .st-grid.st-features { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 719px) {
    .st-product { padding-right: 0; }
    .st-invoice { position: relative; width: auto; margin-top: -20px; right: auto; bottom: auto; }
    .st-toast { left: 8px; top: 8px; }
    .st-window { transform: none; }
    .st-kpis { grid-template-columns: 1fr 1fr; }
    .st-kpi:nth-child(3) { display: none; }
    .st-eyebrow { font-size: .82rem; }
}

.st-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Ayuda ---------- */
.st-help-page { max-width: 760px; margin: 0 auto; padding: clamp(32px, 6vw, 64px) clamp(16px, 5vw, 24px) 48px; }
.st-help-search { width: 100%; min-height: 54px; padding: 10px 16px; border: 1px solid #c5ccd8; border-radius: 12px; font: inherit; margin-bottom: 16px; box-shadow: var(--st-shadow-sm); }
.st-help-search:focus { outline: none; border-color: var(--st-accent); box-shadow: 0 0 0 4px rgba(34, 80, 217, .14); }
.st-help-section { margin-top: 32px; }
.st-help-section h2 { font-size: 1.15rem; margin-bottom: 12px; }
.st-help-item { display: block; padding: 16px 18px; border: 1px solid var(--st-line); border-radius: 12px; margin-bottom: 10px; color: var(--st-text); text-decoration: none; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease; }
.st-help-item:hover { border-color: #c7d7fe; box-shadow: var(--st-shadow-md); transform: translateY(-1px); }
.st-help-item strong, .st-help-item span { display: block; }
.st-help-item strong { color: var(--st-ink); }
.st-help-item span { color: var(--st-muted); font-size: 0.95rem; }
.st-back { display: inline-block; margin-bottom: 16px; }
.st-article h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.st-article h2 { font-size: 1.25rem; margin: 28px 0 10px; }
.st-article li { margin-bottom: 10px; }
.st-article-more { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--st-line); color: var(--st-muted); }
.st-contract-price { font-size: 1.4rem; font-weight: 700; }
.st-contract-price span { display: block; font-size: 0.9rem; font-weight: 400; color: var(--st-muted); }
