/* =====================================
   LLC — REGISTER  (cool edition)
   Standalone page: does not need home.css.
   Every class is prefixed "rg-". The HTML is unchanged.
===================================== */

@property --rg-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

:root {
    --rg-ink: #1e1a2b;
    --rg-ink-soft: #4a4458;
    --rg-muted: #6f6a7d;
    --rg-border: #e6e2ee;
    --rg-surface: #faf9fc;
    --rg-violet: #7446a8;
    --rg-violet-dark: #5a2f8d;
    --rg-violet-light: #f1e9fa;
    --rg-violet-border: #d9c8ee;
    --rg-glow: #b48be6;
    --rg-gradient: linear-gradient(135deg, #6a3d9f, #8553be);
    --rg-shadow-brand: 0 6px 16px rgba(116, 70, 168, 0.28);
}

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

[hidden] {
    display: none !important;
}

html {
    -webkit-text-size-adjust: 100%;
}

/* =====================================
   BACKGROUND: dot grid + drifting glow orbs
===================================== */

.rg-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 24px max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background:
        radial-gradient(rgba(116, 70, 168, 0.16) 1px, transparent 1.4px) 0 0 / 26px 26px,
        linear-gradient(160deg, #f8f4fd 0%, #f1ecf8 45%, #ebe4f6 100%);
    color: var(--rg-ink);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.rg-body::before,
.rg-body::after {
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    content: "";
    filter: blur(70px);
    pointer-events: none;
}

.rg-body::before {
    top: -12vmax;
    right: -10vmax;
    width: 46vmax;
    height: 46vmax;
    background: radial-gradient(circle, rgba(148, 104, 204, 0.55), transparent 68%);
    animation: rg-drift-a 18s ease-in-out infinite alternate;
}

.rg-body::after {
    bottom: -14vmax;
    left: -12vmax;
    width: 42vmax;
    height: 42vmax;
    background: radial-gradient(circle, rgba(106, 61, 159, 0.42), transparent 68%);
    animation: rg-drift-b 22s ease-in-out infinite alternate;
}

@keyframes rg-drift-a {
    to {
        transform: translate(-8vmax, 9vmax) scale(1.15);
    }
}

@keyframes rg-drift-b {
    to {
        transform: translate(10vmax, -7vmax) scale(1.2);
    }
}

.rg-body a {
    color: inherit;
    text-decoration: none;
}

/* =====================================
   GLASS CARD with a light that travels around the border
===================================== */

.rg-card {
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: 440px;
    padding: clamp(24px, 5vw, 38px) clamp(24px, 5vw, 38px) clamp(34px, 6vw, 44px);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(217, 200, 238, 0.7);
    border-radius: 24px;
    box-shadow:
        0 1px 3px rgba(30, 20, 45, 0.05),
        0 30px 70px rgba(90, 47, 141, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);
    backdrop-filter: blur(22px) saturate(1.4);
    animation: rg-card-in 600ms cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

@keyframes rg-card-in {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }
}

/* Travelling highlight on the border (ring cut out with a mask) */
.rg-card::before {
    position: absolute;
    inset: -1px;
    z-index: -1;
    padding: 1px;
    background: conic-gradient(from var(--rg-angle),
            transparent 0 52%,
            rgba(180, 139, 230, 0.2) 62%,
            #b48be6 78%,
            #7446a8 88%,
            transparent 100%);
    border-radius: 24px;
    content: "";
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation: rg-spin 7s linear infinite;
    pointer-events: none;
}

@keyframes rg-spin {
    to {
        --rg-angle: 360deg;
    }
}

/* Lane markings rolling along the bottom edge */
.rg-card::after {
    position: absolute;
    right: 28px;
    bottom: 16px;
    left: 28px;
    height: 2px;
    background: repeating-linear-gradient(90deg, rgba(116, 70, 168, 0.45) 0 16px, transparent 16px 32px);
    background-size: 32px 100%;
    border-radius: 2px;
    content: "";
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
    animation: rg-road 1.4s linear infinite;
    pointer-events: none;
}

@keyframes rg-road {
    to {
        background-position: -32px 0;
    }
}

/* Contents rise in one after another */
.rg-card>* {
    animation: rg-rise 650ms cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

.rg-card>*:nth-child(1) {
    animation-delay: 120ms;
}

.rg-card>*:nth-child(2) {
    animation-delay: 180ms;
}

.rg-card>*:nth-child(3) {
    animation-delay: 240ms;
}

.rg-card>*:nth-child(4) {
    animation-delay: 300ms;
}

.rg-card>*:nth-child(5) {
    animation-delay: 360ms;
}

.rg-card>*:nth-child(6) {
    animation-delay: 420ms;
}

@keyframes rg-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

/* =====================================
   BRAND + HEADINGS
===================================== */

.rg-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.rg-brand-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    background: var(--rg-gradient);
    color: #fff;
    border-radius: 14px;
    box-shadow: var(--rg-shadow-brand), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.5px;
    transition: transform 300ms cubic-bezier(0.3, 1.5, 0.5, 1);
}

/* Soft pulse ring behind the logo */
.rg-brand-mark::after {
    position: absolute;
    inset: 0;
    border: 2px solid var(--rg-glow);
    border-radius: 14px;
    content: "";
    animation: rg-pulse 2.8s ease-out infinite;
    pointer-events: none;
}

@keyframes rg-pulse {
    0% {
        opacity: 0.7;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

.rg-brand:hover .rg-brand-mark {
    transform: rotate(-6deg) scale(1.08);
}

.rg-brand-name {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2.4px;
}

.rg-title {
    margin: 0 0 6px;
    color: var(--rg-ink);
    font-size: clamp(27px, 6vw, 32px);
    font-weight: 850;
    letter-spacing: -1px;
    line-height: 1.1;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .rg-title {
        background: linear-gradient(100deg, #1e1a2b 20%, #5a2f8d 60%, #9468cc 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
    }
}

.rg-subtitle {
    margin: 0 0 26px;
    color: var(--rg-muted);
    font-size: 14.5px;
    line-height: 1.6;
}

/* =====================================
   FLASH MESSAGES
===================================== */

.rg-message {
    margin: 0 0 18px;
    padding: 12px 14px;
    background: var(--rg-violet-light);
    border: 1px solid var(--rg-violet-border);
    border-radius: 12px;
    color: var(--rg-violet-dark);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.rg-message.error {
    background: #fdeeeb;
    border-color: #f6cfc7;
    color: #b23a24;
    animation: rg-shake 420ms 200ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.rg-message.success {
    background: #eaf6f0;
    border-color: #cfe9dc;
    color: #2c7a52;
}

@keyframes rg-shake {

    20%,
    60% {
        transform: translateX(-5px);
    }

    40%,
    80% {
        transform: translateX(5px);
    }
}

/* =====================================
   FORM
===================================== */

.rg-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0;
}

.rg-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.rg-label {
    color: var(--rg-ink);
    font-size: 13.5px;
    font-weight: 750;
    transition: color 160ms ease;
}

.rg-field:focus-within .rg-label {
    color: var(--rg-violet);
}

.rg-input {
    display: block;
    width: 100%;
    height: 50px;
    padding: 0 16px;
    background: rgba(250, 249, 252, 0.85);
    color: var(--rg-ink);
    border: 1px solid var(--rg-border);
    border-radius: 14px;
    font: inherit;
    font-size: 16px;
    /* 16px stops iOS from zooming in on focus */
    transition: border-color 160ms ease, box-shadow 220ms ease, background 160ms ease, transform 160ms ease;
}

.rg-input::placeholder {
    color: #9a95a8;
}

.rg-input:hover {
    border-color: var(--rg-violet-border);
}

.rg-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--rg-violet);
    box-shadow: 0 0 0 4px var(--rg-violet-light), 0 8px 22px rgba(116, 70, 168, 0.16);
    transform: translateY(-1px);
}

.rg-input:user-invalid {
    border-color: #e0634a;
    box-shadow: 0 0 0 4px rgba(224, 99, 74, 0.12);
}

.rg-pass {
    position: relative;
}

.rg-pass .rg-input {
    padding-right: 52px;
}

.rg-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    background: transparent;
    color: var(--rg-muted);
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 160ms ease, background 160ms ease;
}

.rg-toggle:hover {
    background: var(--rg-violet-light);
    color: var(--rg-violet);
}

.rg-toggle:focus-visible {
    outline: 2px solid var(--rg-violet);
    outline-offset: 1px;
}

.rg-toggle svg {
    width: 19px;
    height: 19px;
}

.rg-hint {
    margin: 0;
    color: var(--rg-muted);
    font-size: 12.5px;
}

/* =====================================
   SUBMIT BUTTON with a light sweep
===================================== */

.rg-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
    padding: 12px 20px;
    overflow: hidden;
    background: var(--rg-gradient);
    color: #fff;
    border: 0;
    border-radius: 15px;
    box-shadow: var(--rg-shadow-brand), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    font: inherit;
    font-size: 15px;
    font-weight: 750;
    cursor: pointer;
    transition: transform 160ms ease, filter 160ms ease, box-shadow 200ms ease;
}

.rg-submit::after {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.38), transparent);
    content: "";
    transform: skewX(-20deg);
    pointer-events: none;
}

.rg-submit:hover::after {
    left: 130%;
    transition: left 700ms ease;
}

.rg-submit svg {
    width: 18px;
    height: 18px;
    transition: transform 200ms ease;
}

.rg-submit:hover {
    filter: brightness(1.07);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(116, 70, 168, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.rg-submit:hover svg {
    transform: translateX(4px);
}

.rg-submit:active {
    transform: scale(0.98);
}

.rg-submit:focus-visible {
    outline: 3px solid var(--rg-violet-border);
    outline-offset: 3px;
}

.rg-submit:disabled {
    filter: grayscale(0.3) brightness(1.1);
    box-shadow: none;
    cursor: progress;
    transform: none;
}

/* =====================================
   FOOTER LINKS
===================================== */

.rg-foot {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(217, 200, 238, 0.6);
    color: var(--rg-muted);
    font-size: 13.5px;
    text-align: center;
}

.rg-foot p {
    margin: 0;
}

.rg-foot a {
    color: var(--rg-violet);
    font-weight: 750;
    transition: color 160ms ease;
}

.rg-foot a:hover {
    color: var(--rg-violet-dark);
}

.rg-foot .rg-home {
    color: var(--rg-muted);
    font-weight: 650;
}

.rg-foot .rg-home:hover {
    color: var(--rg-violet);
}

@media (max-width: 480px) {
    .rg-brand {
        margin-bottom: 22px;
    }

    .rg-card {
        border-radius: 20px;
    }

    .rg-card::before {
        border-radius: 20px;
    }
}

/* Browsers without backdrop blur get a solid card */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .rg-card {
        background: #fff;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}