/* ============================================================
   fmf-login.css
   Skin for wp-login.php — the WordPress core login screen.
   Enqueued via login_enqueue_scripts ONLY on the login page,
   so this does not affect the rest of the site.

   Design direction: "member access card" — a bone paper card
   with red banner on a velvet-black backdrop. Nosifer brand
   mark, typewriter labels, rubber-stamp submit, torn-note error.

   CSS variables come from fmf-global.css which is enqueued
   alongside this stylesheet.
   ============================================================ */

/* ─── 1. Backdrop: velvet black with red + amber vignettes ───── */
html,
body.login {
    background: var(--fm-black) !important;
    background-image:
        radial-gradient(ellipse at 18% 12%, rgba(139, 0, 0, 0.28), transparent 55%),
        radial-gradient(ellipse at 82% 88%, rgba(255, 180, 50, 0.14), transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.35), transparent 70%) !important;
    min-height: 100vh !important;
    color: var(--fm-bone) !important;
    font-family: Georgia, 'Times New Roman', serif !important;
}

/* Subtle film-grain texture via noise — optional decorative overlay */
body.login::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.06;
    background-image:
        repeating-radial-gradient(circle at 25% 75%, rgba(255,255,255,0.15) 0 1px, transparent 1px 3px),
        repeating-radial-gradient(circle at 75% 25%, rgba(255,255,255,0.1) 0 1px, transparent 1px 4px);
    mix-blend-mode: screen;
}

/* ─── 2. Container: center, breathe, above grain ─────────────── */
body.login #login {
    position: relative;
    z-index: 1;
    padding-top: 5vh;
    padding-bottom: 4vh;
    width: 420px;
    max-width: 92vw;
}

/* ─── 3. Brand mark: kill WP logo, render Nosifer two-liner ──── */
body.login h1.wp-login-logo,
body.login #login h1 {
    margin: 0 0 24px 0 !important;
    padding: 0 !important;
    text-align: center;
}
body.login h1.wp-login-logo a,
body.login #login h1 a {
    background: none !important;
    background-image: none !important;
    width: auto !important;
    height: auto !important;
    text-indent: 0 !important;
    overflow: visible !important;
    /* Hide the inner text (we set via login_headertext) with font-size 0,
       then render our own two-line brand via pseudos. */
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
    display: block !important;
    padding: 8px 0 !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
}
body.login h1.wp-login-logo a::before {
    content: "Famous Monsters";
    display: block;
    font-family: 'Nosifer', 'Impact', sans-serif;
    color: var(--fm-red);
    font-size: 2.4rem;
    line-height: 0.95;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}
body.login h1.wp-login-logo a::after {
    content: "Forryever";
    display: block;
    font-family: 'Nosifer', 'Impact', sans-serif;
    color: var(--fm-bone);
    font-size: 1.55rem;
    line-height: 1;
    margin-top: 6px;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
body.login h1.wp-login-logo a:focus {
    outline: 2px solid var(--fm-amber) !important;
    outline-offset: 4px;
}

/* ─── 4. Member-access card: paper clipping with red banner ──── */
body.login #loginform,
body.login #registerform,
body.login #lostpasswordform,
body.login #resetpassform {
    position: relative;
    background: var(--fm-paper) !important;
    background-image:
        radial-gradient(ellipse at 12% 8%, rgba(0,0,0,0.04), transparent 55%),
        radial-gradient(ellipse at 88% 92%, rgba(139, 0, 0, 0.05), transparent 60%) !important;
    border: 1px solid rgba(0, 0, 0, 0.25) !important;
    border-radius: 0 !important;
    padding: 64px 26px 26px !important;  /* top padded for red banner + subtitle */
    margin-top: 12px !important;
    box-shadow:
        0 2px 3px rgba(0, 0, 0, 0.35),
        0 10px 22px rgba(0, 0, 0, 0.55),
        0 28px 60px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    transform: rotate(-0.6deg);
}

/* Red banner across the top of the card */
body.login #loginform::before,
body.login #registerform::before,
body.login #lostpasswordform::before,
body.login #resetpassform::before {
    content: "MEMBER ACCESS";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--fm-red);
    color: var(--fm-bone);
    font-family: 'Nosifer', 'Impact', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.12em;
    text-align: center;
    padding: 9px 0 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid #4a0000;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

/* Subtitle typewriter note below banner */
body.login #loginform::after {
    content: "punch in your super-secret handshake";
    position: absolute;
    top: 38px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 0.78rem;
    color: rgba(0, 0, 0, 0.55);
    letter-spacing: 0.04em;
    font-style: italic;
}

/* ─── 5. Labels: typewriter, uppercase, faded ink ────────────── */
body.login #loginform label,
body.login #registerform label,
body.login #lostpasswordform label,
body.login #resetpassform label {
    /* Readability Batch 2 (2026-05-05): bumped #6b5840 → #4a3a20 for
       AAA contrast (8.6:1) on paper bg; size 0.82rem → 1rem to meet
       the UI label floor. Special Elite is 400-only, so size + color
       carry the readability lift. */
    color: #4a3a20 !important;
    font-family: 'Special Elite', 'Courier New', monospace !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    display: block;
    margin-bottom: 6px;
}
/* The "Remember Me" label sits next to the checkbox, not uppercase */
body.login .forgetmenot label,
body.login label[for="rememberme"] {
    color: var(--fm-black) !important;
    text-transform: none !important;
    font-size: 0.88rem !important;
    letter-spacing: 0.02em !important;
    display: inline;
    margin-left: 6px;
}

/* ─── 6. Text inputs: bone paper, red focus ring ─────────────── */
body.login input[type="text"],
body.login input[type="email"],
body.login input[type="password"],
body.login input.input {
    background: var(--fm-bone) !important;
    background-image: none !important;
    border: 1px solid rgba(0, 0, 0, 0.22) !important;
    border-radius: 0 !important;
    color: var(--fm-black) !important;
    font-family: 'Special Elite', 'Courier New', monospace !important;
    font-size: 1rem !important;
    padding: 10px 12px !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    width: 100% !important;
    transition: border-color 150ms ease, box-shadow 150ms ease !important;
}
body.login input[type="text"]:focus,
body.login input[type="email"]:focus,
body.login input[type="password"]:focus {
    border-color: var(--fm-red) !important;
    outline: none !important;
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.08),
        0 0 0 2px rgba(139, 0, 0, 0.2) !important;
}

/* Checkbox + label row: center vertically */
body.login .forgetmenot {
    margin: 14px 0 !important;
}
body.login input[type="checkbox"] {
    accent-color: var(--fm-red);
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

/* ─── 7. Submit: red rubber stamp ────────────────────────────── */
body.login p.submit {
    margin-top: 18px !important;
    text-align: right !important;
}
body.login .wp-core-ui .button-primary,
body.login input[type="submit"] {
    background: var(--fm-red) !important;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 60%) !important;
    color: var(--fm-bone) !important;
    border: 2px solid #4a0000 !important;
    border-radius: 2px !important;
    padding: 10px 26px !important;
    min-width: 170px !important;
    width: auto !important;
    font-family: 'Nosifer', 'Impact', sans-serif !important;
    font-size: 1rem !important;
    letter-spacing: 0.1em !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45) !important;
    box-shadow:
        0 2px 0 #4a0000,
        0 4px 10px rgba(139, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    cursor: pointer;
    transform: rotate(-1deg);
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease !important;
}
body.login .wp-core-ui .button-primary:hover,
body.login input[type="submit"]:hover,
body.login .wp-core-ui .button-primary:focus,
body.login input[type="submit"]:focus {
    background: #a00000 !important;
    transform: rotate(-0.4deg) translateY(-1px);
    box-shadow:
        0 3px 0 #4a0000,
        0 6px 16px rgba(139, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
    outline: none !important;
}
body.login .wp-core-ui .button-primary:active,
body.login input[type="submit"]:active {
    transform: rotate(-1deg) translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* ─── 8. Footer links: "Register" / "Lost password" / "Back" ── */
body.login #nav,
body.login #backtoblog {
    margin: 18px 0 0 !important;
    padding: 0 4px !important;
    text-align: center !important;
    font-family: 'Special Elite', 'Courier New', monospace !important;
    font-size: 0.85rem !important;
    color: rgba(232, 220, 200, 0.7) !important;
}
/* Default styling for most footer links (subtle, typewriter amber on hover) */
body.login #nav a,
body.login #backtoblog a,
body.login #nav a:visited,
body.login #backtoblog a:visited {
    color: var(--fm-bone) !important;
    text-decoration: none !important;
    border-bottom: 1px dashed rgba(232, 220, 200, 0.35) !important;
    padding-bottom: 1px;
    transition: color 150ms ease, border-color 150ms ease, background 180ms ease, transform 180ms ease;
}
body.login #nav a:hover,
body.login #backtoblog a:hover,
body.login #nav a:focus,
body.login #backtoblog a:focus {
    color: #C9860A !important;
    border-bottom-color: #C9860A !important;
    outline: none !important;
}

/* ─── 8b. REGISTER link — punch and pop. Rubber-stamp CTA ────── */
/* Targets the Register link specifically by its action param so it
   only fires on the login page (where #nav shows Register + Lost pw),
   not on the register page itself (where #nav shows "Log in").
   The " | " text separator between links is killed via font-size: 0
   on the container, then restored on anchors explicitly. */
body.login #nav {
    font-size: 0 !important;  /* hides the " | " text node */
    line-height: 1.2 !important;
    padding-top: 24px !important;  /* space for the Register kicker */
}
body.login #nav a {
    font-size: 0.85rem !important;  /* restore for links */
}
body.login #nav a[href*="action=register"] {
    display: block !important;
    margin: 0 auto 16px !important;
    width: fit-content !important;
    background: var(--fm-red) !important;
    color: var(--fm-bone) !important;
    border: 2px solid #4a0000 !important;
    border-radius: 2px !important;
    border-bottom: 2px solid #4a0000 !important;
    padding: 8px 18px 7px !important;
    font-family: 'Nosifer', 'Impact', sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    line-height: 1.15 !important;
    text-transform: uppercase !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45) !important;
    transform: rotate(1.5deg) !important;
    box-shadow:
        0 2px 0 #4a0000,
        0 4px 10px rgba(139, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
    position: relative;
}
/* Prefix the Register link with a kicker line (decorative, no anchor needed) */
body.login #nav a[href*="action=register"]::before {
    content: "new to the crypt?";
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) rotate(-1.5deg);
    font-family: 'Special Elite', 'Courier New', monospace !important;
    font-size: 0.76rem !important;
    font-weight: 400 !important;
    letter-spacing: 0.04em !important;
    color: rgba(255, 230, 180, 0.95) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7), 0 0 6px rgba(0, 0, 0, 0.4) !important;
    text-transform: none !important;
    white-space: nowrap;
    pointer-events: none;
}
body.login #nav a[href*="action=register"]:hover,
body.login #nav a[href*="action=register"]:focus {
    background: #a00000 !important;
    color: var(--fm-bone) !important;
    border-color: #a00000 !important;
    border-bottom-color: #4a0000 !important;
    transform: rotate(0.5deg) translateY(-1px) !important;
    box-shadow:
        0 3px 0 #4a0000,
        0 6px 14px rgba(139, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}
body.login #nav a[href*="action=register"]:active {
    transform: rotate(1deg) translateY(1px) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}
/* Keep "Lost your password?" subtle — it's a recovery action, not a CTA.
   Readability Batch 2 (2026-05-05): bumped 0.82rem → 0.875rem (14px floor)
   and alpha 0.55 → 0.7 for older-reader recoverability. */
body.login #nav a[href*="action=lostpassword"] {
    font-size: 0.875rem !important;
    color: rgba(232, 220, 200, 0.7) !important;
    border-bottom-color: rgba(232, 220, 200, 0.3) !important;
}
body.login #nav a[href*="action=lostpassword"]:hover {
    color: #C9860A !important;
    border-bottom-color: #C9860A !important;
}

/* ─── 9. Error / message boxes: torn red note, pinned ────────── */
body.login #login_error,
body.login .login .message,
body.login .notice {
    background: #fff8e6 !important;
    background-image:
        radial-gradient(ellipse at 10% 10%, rgba(139, 0, 0, 0.06), transparent 50%) !important;
    color: var(--fm-black) !important;
    border-left: 5px solid var(--fm-red) !important;
    border-right: none !important;
    border-top: 1px solid rgba(139, 0, 0, 0.45) !important;
    border-bottom: 1px solid rgba(139, 0, 0, 0.45) !important;
    border-radius: 0 !important;
    padding: 12px 14px !important;
    margin: 0 0 16px !important;
    font-family: 'Special Elite', 'Courier New', monospace !important;
    font-size: 0.92rem !important;
    line-height: 1.4 !important;
    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.35),
        0 8px 16px rgba(0, 0, 0, 0.45) !important;
    transform: rotate(0.7deg);
    position: relative;
}
body.login #login_error strong,
body.login .login .message strong {
    color: var(--fm-red) !important;
}
body.login #login_error a,
body.login .login .message a {
    color: var(--fm-red) !important;
    font-weight: 700 !important;
}

/* ─── 10. Legal footer — Privacy + Terms, amber typewriter chips ─ */
/* WP renders its own .privacy-policy-page-link automatically. We hide
   that and render our own footer row (added via login_footer action in
   functions.php) that includes BOTH Privacy and Terms of Service. */
body.login .privacy-policy-page-link {
    display: none !important;
}

body.login .fmf-login-legal {
    /* Readability Batch 2 (2026-05-05): size 0.8 → 0.95rem, alpha 0.55 → 0.7. */
    margin: 22px 0 6px !important;
    padding: 12px 14px !important;
    text-align: center !important;
    background: rgba(26, 26, 26, 0.35);
    border: 1px dashed rgba(201, 134, 10, 0.35);
    border-radius: 0;
    font-family: 'Special Elite', 'Courier New', monospace !important;
    font-size: 0.95rem !important;
    color: rgba(232, 220, 200, 0.7) !important;
    letter-spacing: 0.04em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
body.login .fmf-login-legal a,
body.login .fmf-login-legal a:visited {
    color: var(--fm-amber) !important;
    text-decoration: none !important;
    border-bottom: 1px dashed rgba(201, 134, 10, 0.5) !important;
    padding: 2px 4px 3px !important;
    transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}
body.login .fmf-login-legal a:hover,
body.login .fmf-login-legal a:focus {
    color: var(--fm-bone) !important;
    border-bottom-color: var(--fm-bone) !important;
    background: rgba(201, 134, 10, 0.12) !important;
    outline: none;
}
body.login .fmf-login-legal .fmf-login-legal-sep {
    /* Readability Batch 2: alpha 0.35 → 0.55 — separator was nearly invisible. */
    color: rgba(232, 220, 200, 0.55);
    user-select: none;
    font-size: 0.95rem;
}
body.login .fmf-login-legal-intro {
    /* Readability Batch 2: size 0.72 → 0.85rem, alpha 0.5 → 0.65. */
    display: block;
    width: 100%;
    color: rgba(232, 220, 200, 0.65);
    font-size: 0.85rem;
    margin-bottom: 4px;
    font-style: italic;
    letter-spacing: 0.02em;
}

/* ─── 10b. Copyright line — Ridgeline credit, mirrors main footer ─ */
/* Sits below the legal trio. Same readability rubric as Batch 1's
   .fmf-footer-copyright (≥14px, AA contrast on velvet-black). */
body.login .fmf-login-copyright {
    margin: 10px 0 0 !important;
    text-align: center;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.875rem;
    color: rgba(232, 220, 200, 0.65);
    letter-spacing: 0.04em;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}
body.login .fmf-login-copyright a {
    color: var(--fm-bone) !important;
    text-decoration: none;
    border-bottom: 1px dotted rgba(232, 220, 200, 0.45);
    padding-bottom: 1px;
    transition: color 200ms ease, border-color 200ms ease;
}
body.login .fmf-login-copyright a:hover,
body.login .fmf-login-copyright a:focus {
    color: var(--fm-amber) !important;
    border-bottom-color: rgba(201, 134, 10, 0.55);
    outline: none;
}
body.login .fmf-login-copyright-sep {
    color: rgba(232, 220, 200, 0.45);
    margin: 0 0.4em;
}

/* ─── 11. "Language switcher" dropdown (if shown) — discrete ─── */
body.login .language-switcher {
    margin-top: 18px !important;
    text-align: center;
}
body.login .language-switcher select {
    background: var(--fm-bone);
    border: 1px solid rgba(0, 0, 0, 0.25);
    padding: 4px 8px;
    font-family: 'Special Elite', 'Courier New', monospace;
    color: var(--fm-black);
    border-radius: 0;
}

/* ─── 12. Back-to-blog bottom tagline — pin the vibe ─────────── */
body.login #backtoblog::before {
    /* Readability Batch 2: size 0.8 → 0.95rem, alpha 0.45 → 0.65. */
    content: "Dying to keep the memory of Famous Monsters of Filmland alive — ";
    display: block;
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: 0.95rem;
    color: rgba(232, 220, 200, 0.65);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

/* ─── 13. Responsive: tighten on small viewports ─────────────── */
@media (max-width: 480px) {
    body.login #login {
        padding-top: 3vh;
        width: 94vw;
    }
    body.login h1.wp-login-logo a::before { font-size: 1.9rem; }
    body.login h1.wp-login-logo a::after  { font-size: 1.25rem; }
    body.login #loginform,
    body.login #registerform,
    body.login #lostpasswordform,
    body.login #resetpassform {
        transform: none;
        padding: 58px 18px 22px !important;
    }
    body.login .wp-core-ui .button-primary,
    body.login input[type="submit"] {
        width: 100% !important;
        transform: none;
    }
}

/* ─── 14. Skip: any WP admin bar leak (shouldn't appear, guard) ── */
body.login #wpadminbar { display: none !important; }

/* ─── 15. Erik flourish + whisper line — "party not a library" ──── */
/* Erik peeks from the bottom-right corner of the viewport. Fixed
   position so he stays put on scroll; pointer-events: none so he
   never intercepts clicks on the form above. Hidden on very small
   screens (keeps the form real estate clear).                       */
body.login .fmf-login-erik {
    position: fixed;
    right: -18px;
    bottom: -10px;
    width: 180px;
    height: auto;
    z-index: 2;
    opacity: 0.85;
    pointer-events: none;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
    transform: rotate(4deg);
    user-select: none;
}

/* Whisper line sits just above the legal footer, handwritten typewriter
   tone. Decorative — aria-hidden in PHP.                              */
body.login .fmf-login-whisper {
    /* Readability Batch 2: size 0.82 → 0.95rem, alpha 0.45 → 0.65. */
    margin: 14px auto 0 !important;
    text-align: center;
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 0.95rem;
    color: rgba(232, 220, 200, 0.65);
    letter-spacing: 0.06em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    transform: rotate(-0.8deg);
    position: relative;
    z-index: 2;
}

@media (max-width: 480px) {
    body.login .fmf-login-erik { width: 120px; right: -14px; bottom: -8px; opacity: 0.7; }
    /* Readability Batch 2: removed font-size: 0.74rem mobile override.
       Whisper now inherits the 0.95rem base on phone too. */
}

/* If the viewport is really short (phone landscape), drop Erik entirely
   so he doesn't overlap the form.                                      */
@media (max-height: 560px) {
    body.login .fmf-login-erik { display: none; }
}
html.wp-toolbar { padding-top: 0 !important; }
