/* ==========================================================================
   Marketing-matched auth theme — "student" (2026-08)
   Layered on top of auth.css and scoped to <body class="auth-mk">, so the
   worker-claim pages that share auth.css keep their current look.
   Palette and shapes mirror assets/css/marketing.css: white/mist surface with
   a faint dot grid, ink outlines, hard offset shadows, Unbounded + Karla type,
   and the amber / pink / indigo brand dots.

   The previous slate "corporate" skin is snapshotted at
   frontend/themes/corporatev1/css/auth_marketing.css.

   Specificity note: auth.css ships a prefers-color-scheme:dark block whose
   selectors are up to (0,3,1); every rule here is prefixed with body.auth-mk so
   it wins regardless of the OS colour scheme.
   ========================================================================== */

body.auth-mk {
    --mk-white: #ffffff;
    --mk-ink: #1e2235;
    --mk-ink-soft: #565c74;
    --mk-mist: #f4f4f8;
    --mk-line: rgba(30, 34, 53, 0.18);
    --mk-shadow-tint: rgba(30, 34, 53, 0.16);
    --mk-amber: #ffb454;
    --mk-pink: #ff6b87;
    --mk-indigo: #5b5bd6;
    --mk-indigo-deep: #4646b8;
    --mk-display: 'Unbounded', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mk-body: 'Karla', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Per-page accent for the card's hard shadow (login = amber, register = pink) */
    --auth-accent: var(--mk-amber);

    background: var(--mk-mist);
    color: var(--mk-ink);
    font-family: var(--mk-body);
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

body.auth-mk.auth-mk--register { --auth-accent: var(--mk-pink); }

/* Form controls don't inherit the page font by default */
body.auth-mk input,
body.auth-mk button,
body.auth-mk select,
body.auth-mk textarea { font-family: inherit; }

/* Surface: mist with the DOTBoard's dot grid. .auth-background/.auth-particles
   are existing empty hooks in auth.css. */
body.auth-mk .auth-background { background: var(--mk-mist); }

body.auth-mk .auth-particles {
    background-image: radial-gradient(rgba(30, 34, 53, 0.14) 1.6px, transparent 1.6px);
    background-size: 30px 30px;
}

/* Three brand dots drifting behind the card */
body.auth-mk .auth-particles::before,
body.auth-mk .auth-particles::after,
body.auth-mk .auth-background::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 3px solid var(--mk-ink);
    pointer-events: none;
}
body.auth-mk .auth-particles::before {
    width: 120px; height: 120px;
    background: var(--mk-amber);
    left: max(2vw, calc(50% - 560px));
    top: 12vh;
}
body.auth-mk .auth-particles::after {
    width: 72px; height: 72px;
    background: var(--mk-pink);
    right: max(4vw, calc(50% - 520px));
    top: 20vh;
}
body.auth-mk .auth-background::after {
    width: 180px; height: 180px;
    background: var(--mk-indigo);
    right: max(-40px, calc(50% - 640px));
    bottom: -30px;
}

@media (prefers-reduced-motion: no-preference) {
    body.auth-mk .auth-particles::before,
    body.auth-mk .auth-particles::after,
    body.auth-mk .auth-background::after { animation: mkAuthBob 7s ease-in-out infinite; }
    body.auth-mk .auth-particles::after { animation-delay: 1.4s; }
    body.auth-mk .auth-background::after { animation-delay: 2.6s; }
    @keyframes mkAuthBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */

body.auth-mk .auth-card {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 3px solid var(--mk-ink);
    border-radius: 24px;
    box-shadow: 10px 10px 0 var(--auth-accent);
    max-width: 520px;
    padding: 2.6rem 2.75rem 2.4rem;
}

body.auth-mk .auth-header { text-align: left; margin-bottom: 1.6rem; }

body.auth-mk .auth-logo {
    justify-content: flex-start;
    margin-bottom: 1.4rem;
}

/* Wordmark: three ascending dots + the name in the display face */
body.auth-mk .auth-logo a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--mk-ink);
    font-family: var(--mk-display);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    line-height: 1;
    border-radius: 8px;
}
body.auth-mk .mk-logo__dots { display: inline-flex; align-items: flex-end; gap: 4px; }
body.auth-mk .mk-logo__dots span { display: block; border-radius: 50%; }
body.auth-mk .mk-logo__dots span:nth-child(1) { width: 8px;  height: 8px;  background: var(--mk-amber); }
body.auth-mk .mk-logo__dots span:nth-child(2) { width: 11px; height: 11px; background: var(--mk-pink); }
body.auth-mk .mk-logo__dots span:nth-child(3) { width: 14px; height: 14px; background: var(--mk-indigo); }

body.auth-mk .auth-title {
    font-family: var(--mk-display);
    font-weight: 800;
    font-size: clamp(1.5rem, 3.6vw, 1.85rem);
    letter-spacing: -0.015em;
    line-height: 1.18;
    margin: 0 0 8px;
    color: var(--mk-ink);
}

/* Bouncing "O" in D·O·T, borrowed from the splash headline */
body.auth-mk .mk-dot-o {
    display: inline-block;
    width: 0.68em;
    height: 0.68em;
    border-radius: 50%;
    background: var(--mk-amber);
    border: 0.06em solid var(--mk-ink);
    vertical-align: baseline;
    margin: 0 0.02em -0.02em;
}
@media (prefers-reduced-motion: no-preference) {
    body.auth-mk .mk-dot-o { animation: mkAuthBoing 2.6s cubic-bezier(0.3, 1.6, 0.4, 1) infinite; }
    @keyframes mkAuthBoing {
        0%, 100% { transform: translateY(0); }
        12%       { transform: translateY(-0.28em); }
        24%       { transform: translateY(0); }
        30%       { transform: translateY(-0.1em); }
        36%       { transform: translateY(0); }
    }
}

body.auth-mk .auth-subtitle {
    color: var(--mk-ink-soft);
    font-weight: 600;
    font-size: 1rem;
}

/* --------------------------------------------------------------------------
   Fields
   -------------------------------------------------------------------------- */

body.auth-mk .form-group label {
    color: var(--mk-ink);
    font-weight: 800;
    font-size: 0.9rem;
}

body.auth-mk .auth-form .input-group input {
    background: #fff;
    border: 2px solid var(--mk-ink);
    border-radius: 12px;
    color: var(--mk-ink);
    font-weight: 600;
    height: 50px;
    box-shadow: 3px 3px 0 var(--mk-shadow-tint);
    transition: box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

body.auth-mk .auth-form .input-group input::placeholder {
    color: rgba(86, 92, 116, 0.7);
    font-weight: 500;
}

body.auth-mk .auth-form .input-group input:focus {
    background: #fff;
    border-color: var(--mk-ink);
    box-shadow: 3px 3px 0 var(--mk-indigo), 0 0 0 3px rgba(91, 91, 214, 0.22);
}

/* Neutral resting border regardless of :valid/:invalid, matching auth.css intent */
body.auth-mk .auth-form .input-group input:valid:not(:placeholder-shown):not(:focus):not(.error),
body.auth-mk .auth-form .input-group input:invalid:not(:placeholder-shown):not(:focus):not(.error) {
    border-color: var(--mk-ink);
}

/* Chrome paints autofilled fields pale yellow without this. */
body.auth-mk .auth-form .input-group input:-webkit-autofill,
body.auth-mk .auth-form .input-group input:-webkit-autofill:hover,
body.auth-mk .auth-form .input-group input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset, 3px 3px 0 var(--mk-shadow-tint);
    -webkit-text-fill-color: var(--mk-ink);
    caret-color: var(--mk-ink);
}

body.auth-mk .input-group > i { color: var(--mk-ink-soft); }
body.auth-mk .input-group input:focus + i { color: var(--mk-indigo-deep); }
body.auth-mk .input-group .password-toggle { color: var(--mk-ink-soft); }
body.auth-mk .password-toggle:hover { color: var(--mk-indigo-deep); }

body.auth-mk .help-text { color: var(--mk-ink-soft); font-weight: 600; }
body.auth-mk .strength-text { color: var(--mk-ink-soft); font-weight: 700; }
body.auth-mk .strength-bar {
    height: 10px;
    border-radius: 99px;
    border: 2px solid var(--mk-ink);
    background: var(--mk-mist);
}
body.auth-mk .strength-fill { border-radius: 99px; }
body.auth-mk .strength-fill.weak   { background: var(--mk-pink); }
body.auth-mk .strength-fill.fair   { background: var(--mk-amber); }
body.auth-mk .strength-fill.good   { background: var(--mk-indigo); }
body.auth-mk .strength-fill.strong { background: #22a06b; }

body.auth-mk .error-message { color: #d6304f; font-weight: 700; }

/* --------------------------------------------------------------------------
   Checkboxes + links
   -------------------------------------------------------------------------- */

/* Register stacks two full-sentence consent lines; login keeps its
   "Remember me" / "Forgot password?" row side by side (auth.css default). */
body.auth-mk .form-options--stack {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
}

body.auth-mk .forgot-link { color: var(--mk-indigo-deep); font-weight: 800; }
body.auth-mk .forgot-link:hover { color: var(--mk-indigo); }

/* auth.css makes the label a flex row, which turns every text node and link
   into its own flex item — the consent line then wraps into ragged columns on
   narrow screens. Inline flow with a hanging indent keeps it reading as a
   sentence, with wrapped lines clearing the box. */
body.auth-mk .checkbox-label {
    display: block;
    color: var(--mk-ink);
    font-weight: 600;
    line-height: 1.45;
    padding-left: 30px;
    text-indent: -30px;
}

/* auth.css hides the real input (display:none) and paints .checkmark in its
   place, which drops the box out of the tab order. Style the input itself
   instead so it stays focusable, and retire the decorative span. */
body.auth-mk .checkbox-label .checkmark { display: none; }

body.auth-mk .checkbox-label input[type="checkbox"] {
    display: inline-grid;      /* inline so it flows with the sentence */
    place-items: center;
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin: 0 10px 0 0;
    vertical-align: -4px;
    text-indent: 0;
    flex: 0 0 auto;
    border: 2px solid var(--mk-ink);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: background 0.15s ease;
}

body.auth-mk .checkbox-label input[type="checkbox"]:checked {
    background: var(--mk-indigo);
}

body.auth-mk .checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
}

body.auth-mk .checkbox-label input[type="checkbox"]:focus-visible {
    outline: 3px solid var(--mk-indigo);
    outline-offset: 2px;
}

body.auth-mk .checkbox-label a,
body.auth-mk .checkbox-label a:visited { color: var(--mk-indigo-deep); font-weight: 800; }
body.auth-mk .checkbox-label a:hover { color: var(--mk-indigo); }

/* --------------------------------------------------------------------------
   Actions — the ink pill with a hard amber shadow
   -------------------------------------------------------------------------- */

body.auth-mk .auth-button {
    background: var(--mk-ink);
    color: #fff;
    border: 2px solid var(--mk-ink);
    border-radius: 999px;
    height: 54px;
    font-weight: 800;
    font-size: 1.02rem;
    letter-spacing: 0.005em;
    box-shadow: 4px 4px 0 var(--auth-accent);
    margin-top: 0.5rem;
    transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

body.auth-mk .auth-button:hover:not(:disabled) {
    background: var(--mk-ink);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--auth-accent);
}

body.auth-mk .auth-button:active:not(:disabled) {
    transform: translate(0, 0);
    box-shadow: 2px 2px 0 var(--auth-accent);
}

body.auth-mk .auth-button:disabled,
body.auth-mk .auth-button[aria-disabled="true"] {
    background: var(--mk-ink-soft);
    border-color: var(--mk-ink-soft);
    box-shadow: 4px 4px 0 var(--mk-shadow-tint);
    transform: none;
    opacity: 0.85;
}

body.auth-mk .social-button {
    background: #fff;
    border: 2px solid var(--mk-ink);
    border-radius: 999px;
    color: var(--mk-ink);
    font-weight: 800;
    height: 50px;
    box-shadow: 4px 4px 0 var(--mk-shadow-tint);
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}

body.auth-mk .social-button:hover {
    border-color: var(--mk-ink);
    color: var(--mk-ink);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--mk-shadow-tint);
}
body.auth-mk .social-button.google:hover { box-shadow: 6px 6px 0 var(--mk-pink); }
body.auth-mk .social-button.github:hover { box-shadow: 6px 6px 0 var(--mk-indigo); }

/* --------------------------------------------------------------------------
   Divider — dashed ink rules flanking the label
   -------------------------------------------------------------------------- */

body.auth-mk .auth-divider::before {
    right: calc(50% + 30px);
    height: 0;
    background: none;
    border-top: 2px dashed var(--mk-line);
}

body.auth-mk .auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(50% + 30px);
    right: 0;
    height: 0;
    border-top: 2px dashed var(--mk-line);
}

body.auth-mk .auth-divider span {
    background: transparent;
    color: var(--mk-ink-soft);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
}

/* --------------------------------------------------------------------------
   Footer + modals
   -------------------------------------------------------------------------- */

body.auth-mk .auth-footer { border-top: 2px dashed var(--mk-line); }
body.auth-mk .auth-footer p { color: var(--mk-ink-soft); font-weight: 600; }
body.auth-mk .auth-footer a { color: var(--mk-indigo-deep); font-weight: 800; }
body.auth-mk .auth-footer a:hover { color: var(--mk-indigo); }

body.auth-mk .modal { background: rgba(30, 34, 53, 0.55); }
body.auth-mk .modal-content {
    background: #fff;
    border: 3px solid var(--mk-ink);
    border-radius: 20px;
    box-shadow: 8px 8px 0 var(--auth-accent);
}
body.auth-mk .modal-header { border-bottom: 2px dashed var(--mk-line); }
body.auth-mk .modal-header h3 { color: var(--mk-ink); font-family: var(--mk-display); font-weight: 700; font-size: 1.1rem; }
body.auth-mk .modal-close { color: var(--mk-ink-soft); }
body.auth-mk .modal-close:hover { background: var(--mk-mist); color: var(--mk-ink); }
body.auth-mk .modal-body p { color: var(--mk-ink-soft); font-weight: 600; }
body.auth-mk .success-icon { color: #22a06b; }

body.auth-mk .btn-primary {
    background: var(--mk-ink);
    color: #fff;
    border: 2px solid var(--mk-ink);
    border-radius: 999px;
    padding: 0.7rem 1.75rem;
    font-weight: 800;
    box-shadow: 4px 4px 0 var(--auth-accent);
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}
body.auth-mk .btn-primary:hover {
    background: var(--mk-ink);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--auth-accent);
}

/* Visible keyboard focus */
body.auth-mk :focus-visible {
    outline: 3px solid var(--mk-indigo);
    outline-offset: 3px;
}

/* Below the card on small screens the decorative dots would crowd the form. */
@media (max-width: 720px) {
    body.auth-mk .auth-card { padding: 2rem 1.5rem 1.8rem; box-shadow: 6px 6px 0 var(--auth-accent); }
    body.auth-mk .auth-particles::before { width: 72px; height: 72px; top: 4vh; left: -20px; }
    body.auth-mk .auth-particles::after { width: 40px; height: 40px; top: 6vh; right: 8vw; }
    body.auth-mk .auth-background::after { width: 110px; height: 110px; right: -40px; }
}

@media (prefers-reduced-motion: reduce) {
    body.auth-mk .auth-card,
    body.auth-mk .form-group { animation: none; }
    body.auth-mk .auth-button:hover:not(:disabled),
    body.auth-mk .social-button:hover,
    body.auth-mk .btn-primary:hover { transform: none; }
}
