/*!
 * DeXaR holding-page inline auth
 * Purpose-built for the landing page — small, fast, no portal-stylesheet dependency.
 */

.hauth {
    position: absolute;
    top: 50%;
    left: 70%;
    transform: translate(-50%, -40%);
    width: min(92vw, 420px);
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.55s ease 0.2s, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #e8e8ef;
}
.hauth[hidden] { display: none; }

body.hauth-open .hauth {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}

.hauth-form {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 28px 32px;
    background: rgba(14, 12, 28, 0.55);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 24px 60px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.hauth-form.is-active {
    position: relative;
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.hauth-title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-align: center;
    color: #fff;
}
.hauth-sub {
    margin: 0 0 18px;
    font-size: 13px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.hauth-form label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    margin: 14px 0 6px;
}
.hauth-form input,
.hauth-form select {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.hauth-form input:focus,
.hauth-form select:focus {
    outline: none;
    border-color: rgba(180, 150, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(139, 95, 255, 0.18);
}
.hauth-form select {
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.5) 50%),
                      linear-gradient(135deg, rgba(255,255,255,0.5) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
    padding-right: 30px;
}

.hauth-row-3 {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    gap: 10px;
}
.hauth-row-3 label { margin-top: 0; }
@media ( max-width: 520px ) {
    .hauth-row-3 { grid-template-columns: 1fr; }
}

.hauth-btn {
    display: inline-block;
    width: 100%;
    margin-top: 20px;
    padding: 12px 20px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(82, 39, 255, 0.85);
    border: 1px solid rgba(180, 150, 255, 0.5);
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
    text-align: center;
}
.hauth-btn:hover  { background: #5227ff; transform: translateY(-1px); box-shadow: 0 10px 30px rgba(82, 39, 255, 0.35); }
.hauth-btn:active { transform: none; }
.hauth-btn:disabled { opacity: 0.6; cursor: wait; }

.hauth-switch, .hauth-back {
    margin: 14px 0 0;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}
.hauth-switch a, .hauth-back a {
    color: rgba(200, 180, 255, 0.9);
    text-decoration: none;
    border-bottom: 1px solid rgba(200, 180, 255, 0.35);
    padding-bottom: 1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.hauth-switch a:hover, .hauth-back a:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}
.hauth-back { margin-top: 8px; }

.hauth-msg {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.45;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.28);
    color: #fca5a5;
}
.hauth-msg.is-success {
    background: rgba(134, 239, 172, 0.12);
    border-color: rgba(134, 239, 172, 0.28);
    color: #bbf7d0;
}

/* Signup success state */
.hauth-done { text-align: center; }
.hauth-done-icon {
    font-size: 40px;
    color: #c4b5fd;
    margin-bottom: 8px;
}

/* ═══════════════════ Welcome screen ═══════════════════ */
.hauth-welcome {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    z-index: 5;
    width: 90vw;
    max-width: 900px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.hauth-welcome[hidden] { display: none; }
body.hauth-welcoming .hauth-welcome {
    opacity: 1;
    transform: translate(-50%, -50%);
}
.hauth-welcome-kicker {
    margin: 0 0 10px;
    font-size: 12px;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: rgba(200, 180, 255, 0.85);
    font-weight: 400;
}
.hauth-welcome-name {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: clamp( 42px, 8vw, 92px );
    font-weight: 300;
    letter-spacing: -0.02em;
    color: #fff;
    line-height: 1.05;
}

/* Mobile — reposition to center instead of right */
@media ( max-width: 900px ) {
    .hauth {
        left: 50%;
        width: min(92vw, 420px);
    }
}

/* Reduced motion — skip transitions */
@media ( prefers-reduced-motion: reduce ) {
    .hauth, .hauth-form, .hauth-welcome {
        transition-duration: 0.001s !important;
    }
}
