﻿/* =========================================
   User/Registration (Scoped)
   Theme: Red / White / Black
   Responsive: min 320px
   IMPORTANT:
   - Scoped under .reg-page so it never affects Layout
   - Gender dropdown uses global .selectx from site.css
   ========================================= */

.reg-page {
    --text: rgba(255,255,255,.92);
    --muted: rgba(255,255,255,.68);
    --red: #ff2a2a;
    --red2: #ff4b4b;
    --shadow: 0 18px 55px rgba(0,0,0,.45);
    --shadow2: 0 12px 35px rgba(0,0,0,.38);
    --ease: cubic-bezier(.2,.8,.2,1);
    --ease-fast: cubic-bezier(.2,.9,.2,1);
    position: relative;
    padding: clamp(56px, 7vw, 84px) 0;
    overflow: hidden;
    min-height: calc(100vh - 120px);
    display: grid;
    place-items: center;
    isolation: isolate;
}

.reg-page__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.reg-page__orb {
    position: absolute;
    border-radius: 999px;
    opacity: .92;
    filter: blur(1px);
}

.reg-page__orb--1 {
    width: 420px;
    height: 420px;
    left: -150px;
    top: 10%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.22), rgba(255,42,42,.22), transparent 62%);
}

.reg-page__orb--2 {
    width: 520px;
    height: 520px;
    right: -220px;
    bottom: -190px;
    background: radial-gradient(circle at 30% 30%, rgba(255,42,42,.28), rgba(255,255,255,.12), transparent 64%);
}

.reg-page__ring {
    position: absolute;
    width: 620px;
    height: 620px;
    left: 50%;
    top: 52%;
    transform: translate(-50%,-50%);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.10);
    box-shadow: inset 0 0 0 1px rgba(255,42,42,.10);
    opacity: .45;
}

.reg-page__container {
    width: min(1120px, calc(100% - 32px));
    margin-inline: auto;
    z-index: 1;
    display: grid;
    place-items: center;
}

/* Card */
.reg-card {
    width: min(880px, 100%);
    border-radius: 22px;
    padding: clamp(16px, 2.6vw, 22px);
    background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: relative;
    overflow: hidden;
}

    .reg-card::before {
        content: "";
        position: absolute;
        inset: -2px;
        border-radius: 24px;
        background: radial-gradient(980px 360px at 20% 0%, rgba(255,42,42,.18), transparent 62%);
        opacity: .9;
        pointer-events: none;
    }

.reg-form {
    position: relative;
    z-index: 1;
}

.reg-title {
    margin: 14px 0 8px;
    font-size: clamp(26px, 4.2vw, 40px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: rgba(255,255,255,.94);
}

.reg-accent {
    background: linear-gradient(90deg, #fff, #ffd6d6, var(--red2), var(--red));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.reg-subtitle {
    margin: 0 0 10px;
    color: rgba(255,255,255,.70);
    line-height: 1.65;
    font-size: clamp(13.5px, 1.8vw, 16px);
}

/* Validation summary (scoped) */
.reg-validation {
    min-height: 20px;
    margin: 6px 0 12px;
    font-weight: 800;
    font-size: 12.5px;
    color: rgba(255,120,120,.95);
}

.reg-page .validation-summary-valid {
    display: none;
}

.reg-page .validation-summary-errors ul {
    margin: 0;
    padding-left: 18px;
}

.reg-page .validation-summary-errors li {
    margin: 6px 0;
}

/* Grid */
.reg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.reg-field {
    min-width: 0;
}

.reg-field--full {
    grid-column: 1 / -1;
}

.reg-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .2px;
    color: rgba(255,255,255,.88);
}

/* Inputs */
.reg-inputWrap {
    position: relative;
}

.reg-input {
    width: 100%;
    height: 46px;
    border-radius: 16px;
    padding: 0 44px 0 44px;
    background: rgba(0,0,0,.18);
    border: 1px solid rgba(255,255,255,.10);
    color: rgba(255,255,255,.92);
    outline: none;
    transition: border-color 160ms var(--ease-fast), box-shadow 160ms var(--ease-fast), background 160ms var(--ease-fast);
}

    .reg-input::placeholder {
        color: rgba(255,255,255,.45);
    }

    .reg-input:focus {
        border-color: rgba(255,255,255,.18);
        box-shadow: 0 0 0 4px rgba(255,42,42,.16);
        background: rgba(0,0,0,.22);
    }

/* Unobtrusive validation classes (scoped) */
.reg-page .input-validation-error {
    border-color: rgba(255,120,120,.55) !important;
    box-shadow: 0 0 0 4px rgba(255,120,120,.12) !important;
}

/* Icons */
.reg-inputIcon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 10px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.80), rgba(255,42,42,.20), rgba(0,0,0,.12));
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 10px 20px rgba(0,0,0,.25);
}

.reg-inputIcon--cal {
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.75), rgba(255,42,42,.22), rgba(0,0,0,.12));
}

.reg-inputIcon--link {
    background: radial-gradient(circle at 30% 30%, rgba(255,42,42,.55), rgba(255,255,255,.12), rgba(0,0,0,.12));
}

.reg-inputIcon--mail {
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.78), rgba(255,42,42,.25), rgba(0,0,0,.12));
}

.reg-inputIcon--phone {
    background: radial-gradient(circle at 30% 30%, rgba(255,42,42,.62), rgba(255,255,255,.12), rgba(0,0,0,.12));
}

.reg-inputIcon--lock {
    background: radial-gradient(circle at 30% 30%, rgba(255,42,42,.65), rgba(255,255,255,.12), rgba(0,0,0,.12));
}

/* Password */
.reg-inputWrap--pw .reg-input {
    padding-right: 92px;
}

.reg-pwBtn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.88);
    font-weight: 900;
    cursor: pointer;
    transition: transform 160ms var(--ease-fast), background 160ms var(--ease-fast), border-color 160ms var(--ease-fast);
}

    .reg-pwBtn:hover,
    .reg-pwBtn:focus-visible {
        outline: none;
        transform: translateY(-50%) translateY(-1px);
        background: rgba(255,255,255,.09);
        border-color: rgba(255,255,255,.18);
    }

/* Errors */
.reg-err {
    display: block;
    min-height: 18px;
    margin-top: 8px;
    font-size: 12.5px;
    font-weight: 800;
    color: rgba(255,120,120,.95);
}

.reg-err--check {
    margin-top: 6px;
}

/* Checks */
.reg-checks {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(0,0,0,.16);
    border: 1px solid rgba(255,255,255,.10);
}

.reg-check {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 12px;
    align-items: start;
    cursor: pointer;
    user-select: none;
    position: relative;
}

/* Hide native checkbox but keep accessible */
.reg-check__box {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.reg-check__ui {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background: rgba(0,0,0,.18);
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: inset 0 0 0 1px rgba(255,42,42,.10);
    position: relative;
    transition: transform 160ms var(--ease-fast), border-color 160ms var(--ease-fast), background 160ms var(--ease-fast), box-shadow 160ms var(--ease-fast);
}

.reg-check__text {
    color: rgba(255,255,255,.82);
    font-weight: 850;
    line-height: 1.55;
    font-size: 13.5px;
}

.reg-check:hover .reg-check__ui {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,.18);
}

.reg-check__box:focus-visible + .reg-check__ui {
    border-color: rgba(255,255,255,.20);
    box-shadow: 0 0 0 4px rgba(255,42,42,.18), inset 0 0 0 1px rgba(255,42,42,.10);
}

.reg-check__box:checked + .reg-check__ui {
    background: rgba(255,42,42,.16);
    border-color: rgba(255,255,255,.20);
}

    .reg-check__box:checked + .reg-check__ui::after {
        content: "";
        position: absolute;
        left: 6px;
        top: 6px;
        width: 9px;
        height: 5px;
        border-left: 2px solid rgba(255,255,255,.92);
        border-bottom: 2px solid rgba(255,255,255,.92);
        transform: rotate(-45deg);
    }

/* Button */
.reg-btn {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255,42,42,.52);
    cursor: pointer;
    user-select: none;
    font-weight: 950;
    letter-spacing: .2px;
    color: #0b0b0f;
    background: radial-gradient(120% 140% at 20% 20%, #ffffff 0%, #ffe8e8 12%, #ff8080 40%, #ff2a2a 75%, #b10000 110%);
    box-shadow: 0 18px 42px rgba(255,42,42,.22), 0 12px 28px rgba(0,0,0,.38);
    transition: transform 180ms var(--ease-fast), box-shadow 180ms var(--ease-fast), filter 180ms var(--ease-fast);
    will-change: transform;
}

    .reg-btn:hover {
        transform: translateY(-1px);
        filter: saturate(1.05) contrast(1.03);
        box-shadow: 0 22px 58px rgba(255,42,42,.28), 0 14px 32px rgba(0,0,0,.44);
    }

    .reg-btn:focus-visible {
        outline: none;
        box-shadow: 0 0 0 4px rgba(255,42,42,.18), 0 22px 58px rgba(255,42,42,.28), 0 14px 32px rgba(0,0,0,.44);
    }

.reg-btn__spin {
    width: 16px;
    height: 16px;
    border-radius: 99px;
    border: 2px solid rgba(0,0,0,.25);
    border-top-color: rgba(0,0,0,.65);
    display: none;
    animation: regSpin 800ms linear infinite;
}

@keyframes regSpin {
    to {
        transform: rotate(360deg);
    }
}

.reg-btn.is-loading {
    pointer-events: none;
    opacity: .92;
}

    .reg-btn.is-loading .reg-btn__spin {
        display: inline-block;
    }

/* Footer */
.reg-foot {
    grid-column: 1 / -1;
    margin: 0;
    text-align: center;
    font-size: 13.5px;
    font-weight: 850;
    color: rgba(255,255,255,.80);
}

.reg-muted {
    color: rgba(255,255,255,.70);
}

.reg-link {
    color: rgba(255,255,255,.92);
    text-decoration: none;
    margin-left: 6px;
}

    .reg-link:hover {
        text-decoration: underline;
    }

/* Reveal */
.reg-page [data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}

    .reg-page [data-reveal].is-in {
        opacity: 1;
        transform: translateY(0);
    }

/* Responsive */
@media (max-width: 820px) {
    .reg-grid {
        grid-template-columns: 1fr;
    }

    .reg-field--full {
        grid-column: auto;
    }
}

@media (max-width: 520px) {
    .reg-card {
        border-radius: 20px;
    }

    .reg-input {
        height: 44px;
    }

    .reg-btn {
        height: 42px;
    }

    .reg-inputWrap--pw .reg-input {
        padding-right: 88px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reg-page [data-reveal],
    .reg-btn,
    .reg-input,
    .reg-pwBtn,
    .reg-check__ui {
        transition: none !important;
        animation: none !important;
    }
}
