/* ============================================================
   SuperRenta — Landing page (premium v2: glass + luz animada)
   ============================================================ */

:root {
    --bg-primary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #000000;
    --text-secondary: #666666;
    --border-color: rgba(0, 0, 0, 0.12);
    --grad-a: #000000;
    --grad-b: #111111;
    --grad-border: 135deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.08);
    --shadow-lg: none;
    --blob-opacity: 0;
    --input-bg: #ffffff;
    --input-border: rgba(0, 0, 0, 0.12);
    --accent: #000000;
    --accent-hover: #222222;
    --accent-light: #000000;
    --orange: #000000;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #ffffff;
        --bg-card: #ffffff;
        --text-primary: #000000;
        --text-secondary: #666666;
        --border-color: rgba(0, 0, 0, 0.12);
        --grad-a: #000000;
        --grad-b: #111111;
        --grad-border: 135deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.08);
        --shadow-lg: none;
        --blob-opacity: 0;
        --input-bg: #ffffff;
        --input-border: rgba(0, 0, 0, 0.12);
        --accent: #000000;
        --accent-hover: #222222;
        --accent-light: #000000;
        --orange: #000000;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 24px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

/* ---------- Fondo: blobs de luz animados ---------- */

.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
    opacity: var(--blob-opacity);
}

.blob-1 {
    width: 520px;
    height: 520px;
    top: -160px;
    right: -120px;
    background: radial-gradient(circle at 30% 30%, #6366F1, rgba(99, 102, 241, 0.15) 70%);
    animation: drift-1 16s ease-in-out infinite;
}

.blob-2 {
    width: 460px;
    height: 460px;
    bottom: -180px;
    left: -120px;
    background: radial-gradient(circle at 60% 40%, #4F46E5, rgba(79, 70, 229, 0.14) 70%);
    animation: drift-2 19s ease-in-out infinite;
}

.blob-3 {
    width: 380px;
    height: 380px;
    top: 30%;
    left: 58%;
    background: radial-gradient(circle at 50% 50%, rgba(234, 88, 12, 0.45), rgba(234, 88, 12, 0.08) 70%);
    animation: drift-3 22s ease-in-out infinite;
}

@keyframes drift-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-60px, 40px) scale(1.1); }
}

@keyframes drift-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(50px, -50px) scale(1.12); }
}

@keyframes drift-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-40px, -60px) scale(0.92); }
}

/* ---------- Contenedor ---------- */

.landing {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Halo de luz detrás de la tarjeta */
.card-glow {
    position: absolute;
    width: min(620px, 92vw);
    height: 420px;
    background: radial-gradient(closest-side, rgba(99, 102, 241, 0.32), rgba(79, 70, 229, 0.12), transparent 75%);
    filter: blur(30px);
    pointer-events: none;
    z-index: 0;
    animation: glow-pulse 6s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.85; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.04); }
}

/* ---------- Tarjeta glass ---------- */

.landing-card {
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 46px 44px 34px;
    max-width: 520px;
    width: 100%;
    box-shadow: none;
    text-align: center;
    z-index: 1;
}

.landing-card::before {
    display: none;
}

/* ---------- Marca ---------- */

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 22px;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    background: #000000;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    outline: none;
}

.brand-name {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #000000;
}

/* ---------- Pill ---------- */

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #666666;
    background: #f1f1f1;
    border: 1px solid rgba(0, 0, 0, 0.12);
    margin-bottom: 18px;
}

.pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #000000;
}

/* ---------- Titular ---------- */

.landing-card h1 {
    font-size: clamp(26px, 4vw, 32px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0 0 14px;
    color: #000000;
}

h1 .grad {
    color: #000000;
}

.lead {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 auto 26px;
    max-width: 44ch;
}

/* ---------- Beneficios ---------- */

.features {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    text-align: left;
}

.features li {
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    padding: 11px 13px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--text-primary) 3%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent);
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.features li:hover {
    transform: translateX(3px);
    border-color: color-mix(in srgb, var(--grad-a) 35%, transparent);
    background: color-mix(in srgb, var(--grad-a) 6%, transparent);
}

.ico {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--grad-a);
    background: color-mix(in srgb, var(--grad-a) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--grad-a) 25%, transparent);
}

.ico svg {
    width: 17px;
    height: 17px;
}

/* ---------- Botones ---------- */

.button-group {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.btn-home {
    position: relative;
    padding: 15px 28px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    font-family: inherit;
    overflow: hidden;
    min-height: 52px;
}

.btn-home:hover {
    text-decoration: none;
}

.btn-login {
    background: #000000;
    color: #FFFFFF;
    border: 1px solid #000000;
    box-shadow: none;
}

.btn-login:hover {
    background: #222222;
    border-color: #222222;
    transform: none;
    box-shadow: none;
}

.btn-login::after {
    display: none;
}

.btn-arrow {
    width: 17px;
    height: 17px;
    transition: transform 0.18s ease;
}

.btn-login:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-signup {
    background-color: transparent;
    color: #000000;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.btn-signup:hover {
    background-color: #f1f1f1;
    border-color: rgba(0, 0, 0, 0.2);
}

/* Registro deshabilitado por ahora */
.btn-signup:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none;
}

.btn-signup:disabled:hover {
    filter: none;
}

.soon {
    font-size: 12.5px;
    font-weight: 500;
    font-style: italic;
    opacity: 0.85;
    margin-left: 4px;
}

/* ---------- Confianza ---------- */

.trust {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px dashed color-mix(in srgb, var(--border-color) 75%, transparent);
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    background: color-mix(in srgb, var(--text-primary) 3.5%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent);
}

.trust-badge svg {
    width: 15px;
    height: 15px;
    color: var(--grad-a);
}

/* ---------- Transición portada ⇄ login ---------- */

.view {
    position: relative;
    z-index: 1;
}

.view[hidden] {
    display: none;
}

.view-hero,
.view-login,
.view-signup {
    animation: view-in 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes view-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Formulario login (dentro del landing) ---------- */

.login-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 26px 0 6px;
    color: var(--text-primary);
    text-align: center;
}

.login-sub {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin: 0 0 20px;
    line-height: 1.5;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 13px;
    text-align: left;
}

.form-control {
    width: 100%;
    background-color: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 14.5px;
    font-family: inherit;
    color: var(--text-primary);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control::placeholder {
    color: var(--text-secondary);
}

.form-control:focus {
    outline: none;
    border-color: var(--grad-a);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.16);
}

.invalid-feedback {
    color: var(--orange);
    font-size: 12.5px;
    line-height: 1.4;
    margin: -6px 2px 0;
    padding-left: 4px;
}

.form-error {
    color: #B42318;
    background: color-mix(in srgb, var(--orange) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--orange) 38%, transparent);
    border-radius: 12px;
    padding: 10px 13px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 4px;
    text-align: left;
}

.forgot {
    color: var(--grad-b);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    align-self: center;
    margin-top: 2px;
}

.forgot:hover {
    text-decoration: underline;
}

.login-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

.login-actions .btn-login {
    font-family: inherit;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 20px auto 2px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 8px;
    transition: color 0.15s ease, transform 0.15s ease;
}

.back-link:hover {
    color: var(--text-primary);
    transform: translateX(-3px);
}

/* Cambio de vista login ⇄ registro */
.auth-switch {
    display: block;
    margin: 18px auto 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 8px;
    transition: color 0.15s ease;
}

.auth-switch strong {
    color: var(--grad-b);
    font-weight: 700;
}

.auth-switch:hover {
    color: var(--text-primary);
}

.auth-switch:hover strong {
    text-decoration: underline;
}

.signup-hint {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin: -4px 2px 0;
    line-height: 1.5;
}

/* ---------- Registro amigable (misma pantalla) ---------- */

.signup-emoji {
    font-size: 30px;
    line-height: 1;
    text-align: center;
    margin: 14px 0 2px;
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 2px 0 18px;
    flex-wrap: wrap;
}

.step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.step-n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--grad-a) 14%, transparent);
    color: var(--grad-b);
    font-size: 11px;
    font-weight: 800;
    flex: none;
}

.step-line {
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: color-mix(in srgb, var(--border-color) 80%, transparent);
    flex: none;
}

.field-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 2px 2px -4px;
}

.tg-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--grad-b);
    background: color-mix(in srgb, var(--grad-a) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--grad-a) 26%, transparent);
    border-radius: 999px;
    padding: 7px 12px;
    margin: -2px 2px 2px;
    line-height: 1.4;
}

/* ---- Casilla de términos y condiciones (registro) ---- */
.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 2px 4px;
    cursor: pointer;
    line-height: 1.5;
}

.terms-check__box {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin: 2px 0 0;
    accent-color: var(--grad-a);
    cursor: pointer;
}

.terms-check__text {
    font-size: 13.5px;
    color: var(--text-primary);
}

.terms-check__text small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.terms-link {
    color: var(--grad-b);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.terms-link:hover {
    color: var(--grad-a);
}

.pass-wrap {
    position: relative;
    display: flex;
}

.pass-wrap .form-control {
    flex: 1;
    padding-right: 46px;
}

.pass-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    padding: 7px;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: background-color 0.15s ease;
}

.pass-toggle:hover {
    background: color-mix(in srgb, var(--text-primary) 7%, transparent);
}

.pass-toggle svg {
    display: block;
}

.pass-toggle svg[hidden] {
    display: none;
}

.pass-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: -4px 2px 0;
}

.chip {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background: color-mix(in srgb, var(--text-primary) 3.5%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-color) 70%, transparent);
    border-radius: 999px;
    padding: 4px 9px;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.chip--ok {
    color: #059669;
    border-color: color-mix(in srgb, #059669 32%, transparent);
    background: color-mix(in srgb, #059669 9%, transparent);
}

.chip--ok::before {
    content: "✓ ";
    font-weight: 800;
}

.chip--bad {
    color: #DC2626;
    border-color: color-mix(in srgb, #DC2626 40%, transparent);
    background: color-mix(in srgb, #DC2626 6%, transparent);
}

.pass-status {
    font-size: 12px;
    font-weight: 700;
    color: #059669;
    margin: -4px 2px 0;
}

.pass-status--ok {
    color: #059669;
}

.pass-status--ok::before {
    content: "✓ ";
    font-weight: 800;
}

.pass-status--warn {
    color: #B54708;
}

.view-signup .auth-switch {
    margin: 0 auto;
}

.btn-home.is-loading {
    opacity: 0.75;
    cursor: progress;
}

/* ---------- Alertas / flash (dentro del landing) ---------- */

.alert {
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 6px;
    border: 1px solid;
    text-align: left;
}

.alert-danger  { background: color-mix(in srgb, var(--orange) 12%, transparent);  color: var(--text-primary); border-color: color-mix(in srgb, var(--orange) 38%, transparent); }
.alert-success { background: color-mix(in srgb, #059669 12%, transparent); color: var(--text-primary); border-color: color-mix(in srgb, #059669 34%, transparent); }
.alert-primary,
.alert-info    { background: color-mix(in srgb, var(--grad-a) 12%, transparent);  color: var(--text-primary); border-color: color-mix(in srgb, var(--grad-a) 34%, transparent); }
.alert-warning { background: color-mix(in srgb, #4338CA 16%, transparent);  color: var(--text-primary); border-color: color-mix(in srgb, #4338CA 40%, transparent); }

/* ---------- Accesibilidad / reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .bg-blob,
    .btn-login::after,
    .pill-dot,
    .card-glow {
        animation: none !important;
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 460px) {
    body {
        padding: 14px;
    }

    .landing-card {
        padding: 36px 22px 28px;
    }

    .brand {
        margin-bottom: 18px;
    }
}