/* /Components/Pages/Login.razor.rz.scp.css */
/*
  The sign-in screen's own layout and colour, scoped to Login.razor.

  This is the one place colour lives outside brand.css, and it earns the exception: the screen is a
  branded composition rather than an arrangement of themed components. It still spends only the
  --rps-* tokens brand.css publishes, so switching palette restyles it along with the rest of the app.
*/

.rps-landing[b-9pl50nrjbc] {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--rps-surface);
}

/* --- Top bar ------------------------------------------------------------- */

.rps-topbar[b-9pl50nrjbc] {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--rps-surface);
    border-bottom: 3px solid var(--rps-brand);
}

.rps-logo[b-9pl50nrjbc] {
    flex: none;
    width: 2.25rem;
    height: 2.5rem;
    color: var(--rps-brand);
}

.rps-wordmark[b-9pl50nrjbc] {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rps-ink);
}

/* --- Hero ---------------------------------------------------------------- */

.rps-hero[b-9pl50nrjbc] {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    min-height: 32rem;
}

/*
  Three stacked layers, cross-fading on a 30s loop so each photograph holds for about ten seconds.
  Only opacity animates, which the compositor can do on its own; animating background-image would
  re-decode a JPEG every ten seconds instead.

  Each layer gets its own keyframes rather than one shared set offset by a negative animation-delay.
  Same result, but the first frame is then unambiguous - layer one opaque, the others clear - instead
  of depending on the animation clock having been read before the first paint. The fade windows
  overlap by design: one layer is still fading in while the previous fades out, so the hero is never
  momentarily empty.
*/
.rps-hero-bg[b-9pl50nrjbc] {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    animation: 30s linear infinite;
}

.rps-hero-bg-1[b-9pl50nrjbc] {
    background-image: url('/img/background-1.jpg');
    opacity: 1;
    animation-name: rps-bg-1-b-9pl50nrjbc;
}

.rps-hero-bg-2[b-9pl50nrjbc] {
    background-image: url('/img/background-2.jpg');
    opacity: 0;
    animation-name: rps-bg-2-b-9pl50nrjbc;
}

.rps-hero-bg-3[b-9pl50nrjbc] {
    background-image: url('/img/background-3.jpg');
    opacity: 0;
    animation-name: rps-bg-3-b-9pl50nrjbc;
}

@keyframes rps-bg-1-b-9pl50nrjbc {
    0%, 30% { opacity: 1; }
    36%, 97% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes rps-bg-2-b-9pl50nrjbc {
    0%, 30% { opacity: 0; }
    36%, 63% { opacity: 1; }
    69%, 100% { opacity: 0; }
}

@keyframes rps-bg-3-b-9pl50nrjbc {
    0%, 63% { opacity: 0; }
    69%, 97% { opacity: 1; }
    100% { opacity: 0; }
}

/*
  Not decoration: the three photographs range from a dark meeting room to a near-white illustration,
  and the headline has to stay readable over all of them. The gradient is weighted to the side the
  text sits on.
*/
.rps-hero-scrim[b-9pl50nrjbc] {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(100deg,
        rgba(0, 0, 0, 0.78) 0%,
        rgba(0, 0, 0, 0.62) 45%,
        rgba(0, 0, 0, 0.30) 100%);
}

.rps-hero-inner[b-9pl50nrjbc] {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 23rem);
    gap: 3rem;
    align-items: center;
    width: 100%;
    max-width: 76rem;
    margin-inline: auto;
    padding: 4rem 1.5rem;
}

.rps-headline[b-9pl50nrjbc] {
    /* Breaks the headline where the mockup breaks it. Without a limit the line only gives way when
       it runs out of column, which in a face this narrow means it does not break at all and crowds
       the sign-in card. Measured in Roboto at weight 800: "OPTIMIZE YOUR RESOURCES." is 13.5em and
       "BOOST PRODUCTIVITY." is 10.6em, so a limit between the two wraps the first and keeps the
       second whole. In em, so it follows the font-size clamp. Re-measure if the wording changes. */
    max-width: 12em;
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4.6vw, 3.5rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: #ffffff;
}

/* The brand lime is a fill colour on white, but it is 11:1 over the scrim, so here it can be ink. */
.rps-headline-accent[b-9pl50nrjbc] {
    display: block;
    color: var(--rps-brand);
}

.rps-sub[b-9pl50nrjbc] {
    max-width: 34rem;
    margin: 0;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
}

/* --- Sign-in card -------------------------------------------------------- */

.rps-card[b-9pl50nrjbc] {
    justify-self: end;
    width: 100%;
    padding: 1.75rem;
    background-color: var(--rps-surface);
    border: 2px solid var(--rps-brand);
    border-radius: 0.5rem;
    box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.28);
}

.rps-card-title[b-9pl50nrjbc] {
    margin: 0 0 1.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--rps-brand-ink);
}

.rps-error[b-9pl50nrjbc] {
    margin: 0 0 1rem;
    padding: 0.625rem 0.75rem;
    border-inline-start: 4px solid var(--rps-danger-edge);
    border-radius: 0.25rem;
    background-color: var(--rps-danger-surface);
    color: var(--rps-danger-ink);
    font-size: 0.875rem;
}

.rps-field[b-9pl50nrjbc] {
    margin-bottom: 1rem;
}

.rps-field label[b-9pl50nrjbc] {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--rps-ink);
}

.rps-input[b-9pl50nrjbc] {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.75rem;
    font: inherit;
    font-size: 1rem;
    color: var(--rps-ink);
    background-color: var(--rps-surface);
    border: 2px solid var(--rps-brand);
    border-radius: 0.375rem;
}

.rps-input:focus-visible[b-9pl50nrjbc] {
    border-color: var(--rps-brand-ink);
    outline: 2px solid var(--rps-brand-ink);
    outline-offset: 1px;
}

.rps-submit[b-9pl50nrjbc] {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 1rem;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: var(--rps-on-brand);
    background-color: var(--rps-brand);
    border: 2px solid var(--rps-brand);
    border-radius: 0.375rem;
    cursor: pointer;
}

.rps-submit:hover[b-9pl50nrjbc] {
    filter: brightness(0.93);
}

.rps-submit:focus-visible[b-9pl50nrjbc] {
    outline: 2px solid var(--rps-brand-ink);
    outline-offset: 2px;
}

/* --- Footer -------------------------------------------------------------- */

.rps-footer[b-9pl50nrjbc] {
    padding: 1rem 1.5rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--rps-ink-muted);
    background-color: var(--rps-surface-muted);
}

/* --- Narrow screens ------------------------------------------------------ */

@media (max-width: 60rem) {
    .rps-hero-inner[b-9pl50nrjbc] {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
        padding: 2.5rem 1.25rem;
    }

    .rps-card[b-9pl50nrjbc] {
        justify-self: stretch;
        max-width: 26rem;
    }

    /* A display:none layer never fetches its background, so a phone downloads one photograph
       instead of three. */
    .rps-hero-bg-2[b-9pl50nrjbc],
    .rps-hero-bg-3[b-9pl50nrjbc] {
        display: none;
    }

    .rps-hero-bg-1[b-9pl50nrjbc] {
        animation: none;
    }
}

/*
  Reduced motion stops the rotation rather than blanking the hero: layer one's resting state is
  already opacity 1, so removing the animation leaves the first photograph in place.
*/
@media (prefers-reduced-motion: reduce) {
    .rps-hero-bg[b-9pl50nrjbc] {
        animation: none;
    }

    .rps-hero-bg-2[b-9pl50nrjbc],
    .rps-hero-bg-3[b-9pl50nrjbc] {
        display: none;
    }
}
