/* Furia MU - registration page (W2): character-select split.
   Loaded by view.header.php after furia-pages.css for controller "registration" (class .page-registration).
   Scope: only the registration FORM view (it is the only one that contains .fp-reg); the success / activation / resend views
   of the same controller keep the calm panel from furia-pages.css.
   Markup lives in application/views/wealth/registration/view.registration.php: .fp-reg > .fp-reg__form + .fp-reg__rail > .fp-reg__stage > img.fp-reg__class x7.
   No JS: the seven real class cut-outs cross-fade with a pure CSS cycle (compositor-only: opacity + transform), off under reduced motion. */

/* 1. The outer panel dissolves: the form is the surface, the class stage stands on the ground ----------- */
.furia-shell.body-page.page-registration .dmn-page-content:has(.fp-reg) {
    max-width: none;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}
.furia-shell.body-page.page-registration .dmn-page-content:has(.fp-reg) .title {
    padding-bottom: 0;
    margin-bottom: clamp(22px, 2.6vw, 34px);
    border-bottom: 0;
    font-weight: 400;
    color: var(--fp-muted);
}
.furia-shell.body-page.page-registration .dmn-page-content .auth-page { max-width: none; }

/* 2. Split ------------------------------------------------------------------------------------------- */
.furia-shell.body-page .fp-reg {
    display: grid;
    grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
    gap: clamp(32px, 6vw, 104px);
    align-items: stretch;
}
.furia-shell.body-page .fp-reg__form {
    position: relative;
    z-index: 2;
    padding: clamp(24px, 3vw, 40px);
    background: var(--fp-panel);
    border: 1px solid var(--fp-line);
    border-radius: 3px;
}
.furia-shell.body-page .fp-reg__form .fp-form { max-width: none; }
.furia-shell.body-page .fp-reg__form .fp-auth-links {
    margin-top: 20px;
    padding-top: 6px;
    border-top: 1px solid var(--fp-line);
}

/* Inputs: a visible resting state on the panel (the global rule paints them Obsidian on Steel; give the edge more presence here) */
.furia-shell.body-page .fp-reg__form :where(input, select):where(:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])) {
    background-color: var(--fp-sunk);
    border-color: rgba(237, 231, 217, .32);
}
.furia-shell.body-page .fp-reg__form :where(input, select):where(:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])):focus {
    background-color: var(--fp-bg);
    border-color: var(--fp-cyan);
    box-shadow: 0 0 0 3px rgba(55, 217, 197, .18);
}

/* 3. The class stage ---------------------------------------------------------------------------------- */
.furia-shell.body-page .fp-reg__rail {
    position: relative;
    z-index: 1;
    min-height: 560px;
    pointer-events: none;
}
.furia-shell.body-page .fp-reg__stage {
    --fp-reg-t: 4.5s;                 /* seconds per class; the whole cycle is 7 x this */
    position: absolute;
    inset: 0;
    isolation: isolate;
}
/* focused light behind the figure, not a frame */
.furia-shell.body-page .fp-reg__stage::before {
    content: "";
    position: absolute;
    inset: 2% -6% -6%;              /* reaches below the stage so the floor ellipse is never cut by the box edge */
    z-index: -1;
    background:
        radial-gradient(48% 50% at 50% 44%, rgba(55, 217, 197, .13), transparent 72%),
        radial-gradient(46% 9% at 50% 89%, rgba(55, 217, 197, .26), transparent 72%);
}
/* soft floor shadow under the feet */
.furia-shell.body-page .fp-reg__stage::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 1.2%;
    z-index: 0;
    width: 52%;
    height: 5%;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(0, 0, 0, .7), transparent);
    filter: blur(3px);
}
.furia-shell.body-page .fp-reg__class {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 95%;
    max-width: none;
    object-fit: contain;
    object-position: 50% 100%;
    opacity: 0;
    filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .5));
    animation: fp-reg-cycle calc(var(--fp-reg-t) * 7) var(--fp-ease) infinite both;
    will-change: opacity, transform;
}
.furia-shell.body-page .fp-reg__class:nth-child(2) { animation-delay: calc(var(--fp-reg-t) * 1); }
.furia-shell.body-page .fp-reg__class:nth-child(3) { animation-delay: calc(var(--fp-reg-t) * 2); }
.furia-shell.body-page .fp-reg__class:nth-child(4) { animation-delay: calc(var(--fp-reg-t) * 3); }
.furia-shell.body-page .fp-reg__class:nth-child(5) { animation-delay: calc(var(--fp-reg-t) * 4); }
.furia-shell.body-page .fp-reg__class:nth-child(6) { animation-delay: calc(var(--fp-reg-t) * 5); }
.furia-shell.body-page .fp-reg__class:nth-child(7) { animation-delay: calc(var(--fp-reg-t) * 6); }
/* One seventh of the cycle per class: slide in from the right, hold, slide out to the left. */
@keyframes fp-reg-cycle {
    0%     { opacity: 0; transform: translateX(22px); }
    2.6%   { opacity: 1; transform: none; }
    11.6%  { opacity: 1; transform: none; }
    14.28% { opacity: 0; transform: translateX(-22px); }
    100%   { opacity: 0; transform: translateX(-22px); }
}

/* Wide screens: the figure overhangs the lede row so it stands IN the page header art, not under a heading */
@media (min-width: 1100px) {
    .furia-shell.body-page .fp-reg__stage { top: -72px; }
}

/* 4. Narrow screens: form first and alone (the seven cut-outs are decorative and ~1.5 MB; display:none keeps lazy images unloaded) */
@media (max-width: 899px) {
    .furia-shell.body-page .fp-reg { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .furia-shell.body-page .fp-reg__rail { display: none; }
}
@media (max-width: 479px) {
    .furia-shell.body-page .fp-reg__form { padding: 22px 18px; }
}

/* 5. Reduced motion: one still figure, no cycle ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .furia-shell.body-page .fp-reg__class { animation: none !important; transform: none; will-change: auto; }
    .furia-shell.body-page .fp-reg__class:first-child { opacity: 1; }
}

/* 6. Hero painting: when generated/register-hero.webp exists it fills the rail instead of the seven class cut-outs (view.registration.php) --- */
.furia-shell.body-page .fp-reg__stage.has-hero::after { display: none; }
.furia-shell.body-page .fp-reg__hero {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 50% 30%;
    border-radius: 3px;
    -webkit-mask-image: radial-gradient(ellipse 90% 92% at 50% 48%, #000 58%, transparent 100%);
    mask-image: radial-gradient(ellipse 90% 92% at 50% 48%, #000 58%, transparent 100%);
}
