/* =====================================================================
   ReachOS auth pages — extracted from base_auth.html on 2026-05-23.
   Brand tokens come from app.css; values here use tokens wherever possible.
   ===================================================================== */

/* ── Canvas — photo bg with dark overlay ───────────────────────── */
html, body {
    margin: 0;
    min-height: 100vh;
    background: var(--color-bg);
}

.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: url("/static/images/reach_os_bg.04bf11f57c73.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
/* Two-layer overlay: deep dark tint + vignette */
.auth-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-dark-overlay);
}
.auth-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 120% 100% at 50% 50%,
        transparent 30%,
        rgba(13, 16, 22, 0.45) 100%
    );
}

/* ── Page wrap — centres the wordmark + card ────────────────────── */
.auth-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-7) 20px;
    gap: 28px;
}

/* ── Wordmark — above the card ──────────────────────────────────── */
.auth-wordmark {
    display: inline-flex;
    align-items: baseline;
    gap: var(--space-3);
    animation: auth-rise 0.45s cubic-bezier(0.18, 0.88, 0.32, 1) both;
}
.auth-wm-reach {
    font-family: 'Barlow Condensed', system-ui, sans-serif;
    font-size: clamp(64px, 9vw, 96px);
    font-weight: 900;
    color: var(--color-sand);
    letter-spacing: 0.01em;
    line-height: 1;
    text-shadow: 0 2px 32px rgba(0,0,0,0.55);
}
.auth-wm-os {
    font-family: 'Barlow Condensed', system-ui, sans-serif;
    font-size: clamp(64px, 9vw, 96px);
    font-weight: 300;
    color: var(--color-accent);
    letter-spacing: 0.06em;
    line-height: 1;
    text-shadow: 0 2px 32px rgba(0,0,0,0.45);
}

/* ── Glass card ─────────────────────────────────────────────────── */
.auth-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: var(--color-glass-card);
    backdrop-filter: blur(32px) saturate(1.3);
    -webkit-backdrop-filter: blur(32px) saturate(1.3);
    border: 1px solid var(--color-sand-soft);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.60),
        inset 0 1px 0 rgba(234, 224, 204, 0.09),
        inset 0 0 0 0.5px var(--color-surface);
}

/* ── Top accent line ────────────────────────────────────────────── */
.auth-card__accent {
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(217, 120, 25, 0.0) 8%,
        rgba(217, 120, 25, 0.90) 35%,
        rgba(234, 224, 204, 0.65) 50%,
        rgba(217, 120, 25, 0.90) 65%,
        rgba(217, 120, 25, 0.0) 92%,
        transparent 100%
    );
}

/* ── Card header — title + subtitle only ────────────────────────── */
.auth-header {
    padding: var(--space-6) 44px var(--space-5);
    border-bottom: 1px solid var(--glass-bg-md);
}
.auth-title {
    margin: 0 0 5px;
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--color-fg);
    font-family: "Inter", system-ui, sans-serif;
}
.auth-sub {
    margin: 0;
    font-size: 13px;
    color: rgba(234, 224, 204, 0.42);
    line-height: 1.5;
    font-family: "Inter", system-ui, sans-serif;
}

/* ── Card body ──────────────────────────────────────────────────── */
.auth-body {
    padding: 28px 44px 36px;
}

/* ── Status pill ────────────────────────────────────────────────── */
.auth-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 28px;
    padding: 5px 11px 5px 8px;
    border: 1px solid rgba(217, 120, 25, 0.22);
    border-radius: 999px;
    background: rgba(217, 120, 25, 0.07);
}
.auth-status__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 6px rgba(217, 120, 25, 0.90);
    animation: auth-pulse 2.6s ease-in-out infinite;
    flex-shrink: 0;
}
.auth-status__text {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(217, 120, 25, 0.80);
    font-family: "Inter", system-ui, sans-serif;
}

/* ── Error alert ────────────────────────────────────────────────── */
.auth-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: rgba(248, 113, 113, 0.09);
    border: 1px solid rgba(248, 113, 113, 0.24);
    color: var(--color-danger-light);
    font-size: 13px;
    margin-bottom: var(--space-5);
    line-height: 1.5;
}
.auth-error svg { flex-shrink: 0; margin-top: 1px; }

/* ── Info / success state ───────────────────────────────────────── */
.auth-notice {
    text-align: center;
    padding: var(--space-2) 0 var(--space-4);
}
.auth-notice h2 {
    margin: 0 0 var(--space-2);
    font-size: 18px;
    font-weight: 600;
    color: var(--color-fg);
    letter-spacing: -0.02em;
}
.auth-notice p {
    margin: 0 0 var(--space-5);
    font-size: 13.5px;
    color: rgba(234, 224, 204, 0.50);
    line-height: 1.6;
}

/* ── Form fields ────────────────────────────────────────────────── */
.auth-body .field {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.auth-body .field + .field {
    margin-top: 22px;
}
.auth-body .field__label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(234, 224, 204, 0.48);
    margin-bottom: var(--space-2);
}
.auth-body input[type="text"],
.auth-body input[type="email"],
.auth-body input[type="password"] {
    width: 100%;
    height: 44px;
    background: var(--glass-bg);
    border: 1px solid rgba(234, 224, 204, 0.13);
    border-radius: var(--radius-md);
    padding: 0 var(--space-4);
    font-family: "Inter", system-ui, sans-serif;
    font-size: 14px;
    line-height: 42px;
    color: var(--color-fg);
    display: block;
    transition:
        border-color 150ms ease,
        background 150ms ease,
        box-shadow 150ms ease;
}
.auth-body input[type="text"]:focus,
.auth-body input[type="email"]:focus,
.auth-body input[type="password"]:focus {
    outline: none;
    background: var(--glass-bg-md);
    border-color: rgba(217, 120, 25, 0.60);
    box-shadow: 0 0 0 3px rgba(217, 120, 25, 0.14);
}
.auth-body input::placeholder {
    color: rgba(234, 224, 204, 0.18);
}
.auth-body .field__error {
    font-size: 12px;
    color: var(--color-danger-light);
    margin-top: 6px;
}
.auth-body .field__help {
    font-size: 12px;
    color: rgba(234, 224, 204, 0.35);
    margin-top: 5px;
}

/* ── Primary action button ──────────────────────────────────────── */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    height: 48px;
    margin-top: 28px;
    padding: 0 20px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--color-accent);
    color: var(--color-white);
    font-family: "Inter", system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 6px 24px rgba(217, 120, 25, 0.38);
    transition:
        background 140ms ease,
        transform 100ms ease,
        box-shadow 140ms ease;
}
.auth-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.12) 50%,
        transparent 60%
    );
    transform: translateX(-100%);
    transition: transform 380ms ease;
}
.auth-btn:hover {
    background: var(--color-accent-hover-dark);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 10px 30px rgba(217, 120, 25, 0.50);
}
.auth-btn:hover::after { transform: translateX(100%); }
.auth-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(217, 120, 25, 0.28);
}
.auth-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(217, 120, 25, 0.50);
}
.auth-btn__arrow {
    display: flex;
    align-items: center;
    opacity: 0.80;
    transition: transform 140ms ease;
}
.auth-btn:hover .auth-btn__arrow { transform: translateX(3px); }

/* ── Ghost back-link button ─────────────────────────────────────── */
.auth-btn--ghost {
    background: rgba(234, 224, 204, 0.06);
    color: rgba(234, 224, 204, 0.70);
    border: 1px solid var(--color-sand-soft);
    box-shadow: none;
}
.auth-btn--ghost:hover {
    background: rgba(234, 224, 204, 0.10);
    color: var(--color-fg);
    transform: none;
    box-shadow: none;
}
.auth-btn--ghost::after { display: none; }

/* ── Card footer ────────────────────────────────────────────────── */
.auth-footer {
    padding: 18px 44px 22px;
    border-top: 1px solid var(--glass-bg-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}
.auth-link {
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(234, 224, 204, 0.38);
    text-decoration: none;
    transition: color 140ms ease;
}
.auth-link:hover { color: var(--color-accent); }

.auth-secure {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: rgba(234, 224, 204, 0.22);
    letter-spacing: 0.02em;
}
.auth-secure svg { opacity: 0.55; }

/* ── Animations ─────────────────────────────────────────────────── */
@keyframes auth-rise {
    from { opacity: 0; transform: translateY(20px) scale(0.99); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
@keyframes auth-pulse {
    0%, 100% { opacity: 1;   box-shadow: 0 0 7px rgba(217, 120, 25, 0.90); }
    50%       { opacity: 0.5; box-shadow: 0 0 3px rgba(217, 120, 25, 0.40); }
}
.auth-card { animation: auth-rise 0.55s cubic-bezier(0.18, 0.88, 0.32, 1) both; }

@media (prefers-reduced-motion: reduce) {
    .auth-card, .auth-wordmark { animation: none; }
    .auth-btn::after { display: none; }
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .auth-header,
    .auth-body,
    .auth-footer { padding-left: 28px; padding-right: 28px; }
    .auth-card { border-radius: var(--radius-lg); }
    .auth-wrap { gap: 20px; }
}
