/**
 * HRMG Login — wp-login.php skin.
 *
 * THE PALETTE IS THE LOGO'S OWN, same tokens as hrmg-portfolio. Ember is the
 * one action colour; amber is the focus ring; teal and indigo only appear in
 * the mark and the backdrop light. Nothing here is a large fill of any of them.
 * The mark and wordmark in the card header are the real artwork (assets/img):
 * the mark is the vector traced from the logo's own layers (see
 * brand/README.md), the wordmark the gold-outline PNG from the symbol file.
 * The backdrop deliberately does NOT show the logo as a picture: rain.js draws
 * its geometry (three frames) and fills it with the work. Pasting the mark on
 * the background, at any size, read as "logo thrown on" (Jon, 2026-10-19).
 *
 * Everything hangs off body.hrmg-login (added by the login_body_class filter)
 * so a plugin that renders its own login page without our body class is left
 * alone. Core's login.css loads before this file (we depend on the 'login'
 * handle), so plain selectors of equal specificity win without !important,
 * except where Magic Login's inline <style> uses it first.
 */

body.hrmg-login {
    --ember:   #F15A29;
    --ember-2: #D94B1C;
    --amber:   #F7941D;
    --teal:    #3E92A3;
    --indigo:  #3A2E6E;
    --ink:     #14161C;
    --ink-2:   #1E2129;
    --paper:   #F8F6F3;
    --paper-70: rgba(248, 246, 243, .72);
    --paper-50: rgba(248, 246, 243, .5);
    --line:    rgba(248, 246, 243, .12);
    --line-2:  rgba(248, 246, 243, .22);
    --field:   rgba(248, 246, 243, .05);

    background: var(--ink);
    color: var(--paper);
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;

    /* Center the card in the viewport instead of core's 5% top padding. */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px;
    box-sizing: border-box;
    position: relative;
    overflow-x: hidden;
}

/* ---------------------------------------------------------------- backdrop */

/* assets/js/rain.js paints this: the pictograph's three frames, code raining
   through them. It sits under everything; the card's frosted glass softens it. */
.hrmg-login-rain {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* A vignette over the rain so the edges settle into ink and the centre, where
   the card sits, is a touch darker for legibility. body::after paints above
   the canvas (it comes last in the box), still under the card (z-index 1). */
body.hrmg-login::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(60% 70% at 50% 50%, rgba(20, 22, 28, .35), transparent 70%),
        radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(20, 22, 28, .9) 100%);
}

/* ---------------------------------------------------------------- the card */

body.hrmg-login #login {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    margin: 0;
    padding: 40px 40px 24px;
    box-sizing: border-box;
    background: rgba(20, 22, 28, .62);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
    -webkit-backdrop-filter: blur(22px) saturate(1.2);
    backdrop-filter: blur(22px) saturate(1.2);
}

/* Mark + wordmark, left aligned. Core hides the link text with text-indent;
   we keep that and draw the wordmark ourselves so it sets in Poppins. */
body.hrmg-login h1.wp-login-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    margin: 0 0 22px;
}

body.hrmg-login h1.wp-login-logo a {
    background-image: url('../img/mark.svg?ver=1.2.0');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    width: 34px;   /* 332x526 artwork at 54px tall */
    height: 54px;
    margin: 0;
    flex: 0 0 auto;
    border-radius: 4px;
}

/* The gold-outline wordmark from the logo's own dark-background version. */
body.hrmg-login h1.wp-login-logo::after {
    content: "";
    display: block;
    width: 106px;  /* 1033x272 artwork at 28px tall */
    height: 28px;
    background: url('../img/wordmark.png?ver=1.2.0') center / contain no-repeat;
    margin-top: 2px; /* optical: sit on the mark's visual centre */
}

body.hrmg-login .hrmg-login-tagline {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-weight: 300;
    font-variation-settings: 'opsz' 72;
    font-size: 27px;
    line-height: 1.22;
    letter-spacing: -.005em;
    color: var(--paper);
    margin: 0 0 4px;
    max-width: 15em;
    text-wrap: balance;
}

/* ---------------------------------------------------------------- the form */

body.hrmg-login form {
    margin: 24px 0 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
}

body.hrmg-login label {
    font-size: 13px;
    font-weight: 500;
    color: var(--paper-70);
    margin-bottom: 7px;
}

body.hrmg-login form .input,
body.hrmg-login input[type="text"],
body.hrmg-login input[type="password"],
body.hrmg-login input[type="email"] {
    font-family: inherit;
    font-size: 16px;
    line-height: 1.4;
    color: var(--paper);
    background: var(--field);
    border: 1px solid var(--line-2);
    border-radius: 10px;
    padding: 11px 14px;
    min-height: 48px;
    margin: 0 0 18px;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

body.hrmg-login input.password-input {
    font-family: inherit;
    letter-spacing: .08em;
}

body.hrmg-login.js input.password-input {
    padding-right: 3rem;
}

body.hrmg-login form .input:focus,
body.hrmg-login input[type="text"]:focus,
body.hrmg-login input[type="password"]:focus,
body.hrmg-login input[type="email"]:focus {
    background: rgba(248, 246, 243, .07);
    border-color: var(--amber);
    box-shadow: 0 0 0 3px rgba(247, 148, 29, .22);
    outline: 2px solid transparent;
}

body.hrmg-login input::placeholder {
    color: var(--paper-50);
}

/* Chrome paints autofilled fields pale yellow; keep them in the dark. */
body.hrmg-login input:-webkit-autofill,
body.hrmg-login input:-webkit-autofill:hover,
body.hrmg-login input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--paper);
    -webkit-box-shadow: 0 0 0 1000px #23262E inset;
    caret-color: var(--paper);
    transition: background-color 9999s ease-out;
}

/* Show/hide password */
body.hrmg-login .button.wp-hide-pw {
    color: var(--paper-50);
    height: 48px;
    width: 2.75rem;
    border-radius: 0 10px 10px 0;
}

body.hrmg-login .button.wp-hide-pw:hover,
body.hrmg-login .button.wp-hide-pw:focus {
    color: var(--paper);
    border-color: transparent;
    box-shadow: none;
}

/* Remember me */
body.hrmg-login form .forgetmenot {
    gap: 8px;
    min-height: 0;
    float: none;
    margin: -2px 0 20px;
}

body.hrmg-login form .forgetmenot label {
    color: var(--paper-70);
    font-weight: 400;
}

body.hrmg-login input[type="checkbox"] {
    width: 18px;
    height: 18px;
    background: var(--field);
    border: 1px solid var(--line-2);
    border-radius: 5px;
    box-shadow: none;
    transition: border-color .15s ease, background-color .15s ease;
}

body.hrmg-login input[type="checkbox"]:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 3px rgba(247, 148, 29, .22);
    outline: 2px solid transparent;
}

body.hrmg-login input[type="checkbox"]:checked {
    background: var(--ember);
    border-color: var(--ember);
}

body.hrmg-login input[type="checkbox"]:checked::before {
    content: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M14.83 4.89l1.34.94-5.81 8.38H9.02L5.78 9.67l1.34-1.25 2.57 2.4z' fill='%23F8F6F3'/%3E%3C/svg%3E");
    width: 18px;
    height: 18px;
    margin: -1px 0 0 -1px;
}

/* The "Remember me" help toggletip */
body.hrmg-login .wp-tooltip__toggle {
    color: var(--paper-50);
}

body.hrmg-login .wp-tooltip__toggle:hover,
body.hrmg-login .wp-tooltip__toggle:focus {
    color: var(--paper);
}

body.hrmg-login .wp-tooltip__bubble {
    background: var(--ink-2);
    color: var(--paper);
    border: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
    font-size: 13px;
}

body.hrmg-login .wp-tooltip__close {
    color: var(--paper-70);
}

/* ------------------------------------------------------------- the buttons */

body.hrmg-login #loginform p.submit,
body.hrmg-login .login-action-lostpassword p.submit {
    margin: 0;
}

body.hrmg-login .button-primary,
body.hrmg-login .button-primary.button-hero {
    float: none;
    width: 100%;
    min-height: 50px;
    height: 50px;
    line-height: 50px;
    padding: 0 20px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: var(--ember);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(241, 90, 41, .28);
    text-shadow: none;
    transition: background-color .15s ease, box-shadow .15s ease, transform .1s ease;
}

body.hrmg-login .button-primary:hover,
body.hrmg-login .button-primary:focus {
    color: #fff;
    background: var(--ember-2);
    border: 0;
    box-shadow: 0 10px 28px rgba(241, 90, 41, .36);
}

body.hrmg-login .button-primary:active {
    transform: translateY(1px);
    box-shadow: 0 4px 14px rgba(241, 90, 41, .3);
}

body.hrmg-login .button-primary:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 3px;
}

/* Magic Login's injected pair: Log In stays primary, the email link is the
   quiet alternative. Its inline <style> uses !important on padding only. */
body.hrmg-login .magic-login-normal-login {
    padding-top: 0;
}

body.hrmg-login #magic-login-button,
body.hrmg-login #magic-login-button.button-primary {
    color: var(--paper);
    background: transparent;
    border: 1px solid var(--line-2);
    box-shadow: none;
    font-weight: 500;
}

body.hrmg-login #magic-login-button:hover,
body.hrmg-login #magic-login-button:focus {
    background: rgba(248, 246, 243, .06);
    border-color: rgba(248, 246, 243, .4);
    box-shadow: none;
}

body.hrmg-login .magic-login-or-separator {
    margin: 14px auto;
}

body.hrmg-login .magic-login-or-separator::before {
    background: transparent;
    color: var(--paper-50);
    font-size: 12px;
    width: auto;
    padding: 0 12px;
}

body.hrmg-login .magic-login-or-separator::after {
    /* Line with a gap behind the word, since a solid "or" can't mask a
       translucent card. */
    background: linear-gradient(90deg, var(--line) 0 calc(50% - 22px), transparent calc(50% - 22px) calc(50% + 22px), var(--line) calc(50% + 22px));
}

/* ------------------------------------------------------------------ notices */

body.hrmg-login #login_error,
body.hrmg-login .message,
body.hrmg-login .notice,
body.hrmg-login .success {
    background: rgba(248, 246, 243, .05);
    border: 1px solid var(--line);
    border-left: 3px solid var(--teal);
    border-radius: 10px;
    color: var(--paper);
    padding: 12px 14px;
    margin: 0 0 18px;
    font-size: 13px;
    box-shadow: none;
}

body.hrmg-login .success { border-left-color: var(--teal); }

body.hrmg-login #login_error,
body.hrmg-login .notice-error {
    border-left-color: var(--ember);
}

body.hrmg-login #login_error a,
body.hrmg-login .message a,
body.hrmg-login .notice a,
body.hrmg-login .success a {
    color: var(--amber);
}

body.hrmg-login #pass-strength-result {
    border-radius: 8px;
    margin: 2px 0 16px;
}

/* -------------------------------------------------------------------- links */

body.hrmg-login #nav,
body.hrmg-login #backtoblog {
    padding: 0;
    font-size: 13px;
}

body.hrmg-login #nav {
    margin: 22px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

body.hrmg-login #backtoblog {
    margin: 10px 0 0;
}

body.hrmg-login #nav a,
body.hrmg-login #backtoblog a {
    color: var(--paper-70);
    text-decoration: underline;
    text-decoration-color: var(--line-2);
    text-underline-offset: 3px;
    transition: color .15s ease, text-decoration-color .15s ease;
}

body.hrmg-login #nav a:hover,
body.hrmg-login #backtoblog a:hover,
body.hrmg-login #nav a:focus,
body.hrmg-login #backtoblog a:focus {
    color: var(--paper);
    text-decoration-color: var(--amber);
    box-shadow: none;
}

body.hrmg-login a:focus-visible,
body.hrmg-login h1.wp-login-logo a:focus-visible,
body.hrmg-login .button.wp-hide-pw:focus-visible,
body.hrmg-login .wp-tooltip__toggle:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 3px;
    box-shadow: none;
}

body.hrmg-login .privacy-policy-page-link {
    text-align: left;
    margin: 22px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 12px;
}

body.hrmg-login .privacy-policy-page-link a {
    color: var(--paper-50);
    text-decoration: none;
}

body.hrmg-login .privacy-policy-page-link a:hover,
body.hrmg-login .privacy-policy-page-link a:focus {
    color: var(--paper);
}

body.hrmg-login .language-switcher {
    position: relative;
    z-index: 1;
    padding: 20px 0 0;
}

/* ------------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {
    body.hrmg-login #login {
        animation: hrmg-login-card .7s cubic-bezier(.2, .7, .2, 1) both;
        animation-delay: .15s;
    }
}

@keyframes hrmg-login-card {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* Core's wrong-password shake still works; keep it. */

/* --------------------------------------------------------------- responsive */

@media screen and (max-width: 640px) {
    body.hrmg-login {
        padding: 16px;
        justify-content: flex-start;
        padding-top: max(48px, 12vh);
    }

    body.hrmg-login #login {
        padding: 28px 22px 18px;
        border-radius: 16px;
    }

    body.hrmg-login .hrmg-login-tagline {
        font-size: 23px;
    }

}

@media screen and (max-height: 600px) and (min-width: 641px) {
    body.hrmg-login { padding: 16px; }
    body.hrmg-login #login { padding: 28px 32px 18px; }
    body.hrmg-login .hrmg-login-tagline { font-size: 22px; }
}

/* ---------------------------------------------------- interim (re-auth) modal */

body.hrmg-login.interim-login {
    display: block;
    min-height: 0;
    padding: 0;
}

body.hrmg-login.interim-login #login {
    max-width: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding: 20px 24px;
}
