/* Arisa Studio — shared pieces of the sign-up / log-in screens.
   Used by signup.html and login.html. Self-contained on purpose: the same
   states (password toggle, "check your email", resend with a wait) are meant
   to be reused later in a pop-up on the landing page. Colours come only from
   theme.css; nothing here defines a colour of its own except the error red the
   pages already used. */

[hidden] { display: none !important; }

/* ── page frame, phone first ─────────────────────────────────────────────── */
.auth-body {
    font-family: var(--font-heading);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
}

.auth-card {
    background: var(--color-surface);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 28px 16px;
    width: 100%;
    max-width: 380px;
}

@media (min-width: 420px) {
    .auth-card { padding: 36px 32px; }
}

.auth-logo { text-align: center; margin-bottom: 8px; }
.auth-logo img { height: 28px; width: auto; }
/* The logo links to the landing page. Looks exactly like the bare image:
   no underline, no colour, same box; only keyboard focus shows an outline. */
.auth-logo a { display: inline-block; line-height: 0; color: inherit; text-decoration: none; border-radius: 4px; }
.auth-logo a:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 4px; }

.auth-kicker {
    text-align: center;
    color: var(--color-text-faint);
    font-size: 13px;
    margin-bottom: 4px;
}

.auth-title {
    text-align: center;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 6px;
}
.auth-title:focus { outline: none; }

.auth-sub {
    text-align: center;
    color: var(--color-text-faint);
    font-size: 14px;
    margin-bottom: 20px;
}

.auth-text {
    font-size: 15px;
    line-height: 1.5;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    overflow-wrap: anywhere;
}
.auth-text strong { color: var(--color-text); }
.auth-text.faint { font-size: 14px; color: var(--color-text-faint); }

/* A link with a thumb-sized tap area. */
.auth-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 4px;
    color: var(--color-primary);
    font-weight: bold;
    font-family: inherit;
    font-size: inherit;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
}
.auth-link:hover { color: var(--color-secondary); text-decoration: underline; }
.auth-center { text-align: center; }

/* ── fields ──────────────────────────────────────────────────────────────── */
.auth-field { margin-bottom: 16px; }

.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

/* 16px stops iOS Safari zooming the page when a field is tapped. */
.auth-field input {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
}
.auth-field input:focus { border-color: var(--color-primary); }
.auth-field input[aria-invalid="true"] { border-color: #c00; }

.auth-hint { font-size: 13px; color: var(--color-text-faint); margin-top: 6px; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 56px; }

.pw-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 52px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 0 8px 8px 0;
    color: var(--color-text-muted);
    cursor: pointer;
    font-family: inherit;
}
.pw-toggle:hover { color: var(--color-primary); }
.pw-toggle:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }
.pw-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pw-toggle .eye-off { display: none; }
.pw-toggle[aria-pressed="true"] .eye-on { display: none; }
.pw-toggle[aria-pressed="true"] .eye-off { display: block; }

/* ── buttons ─────────────────────────────────────────────────────────────── */
.auth-btn {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    border: 2px solid var(--color-primary);
}
.auth-btn.primary { background: var(--color-primary); color: #fff; margin-top: 4px; }
.auth-btn.primary:hover { background: var(--color-secondary); border-color: var(--color-secondary); }
.auth-btn.secondary { background: var(--color-surface); color: var(--color-primary); }
.auth-btn.secondary:hover { background: var(--color-bg); }
.auth-btn:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: 2px; }
.auth-btn:disabled { cursor: default; }
.auth-btn.primary:disabled { background: #aaa; border-color: #aaa; }
.auth-btn.secondary:disabled { color: var(--color-text-faint); border-color: var(--color-border); background: var(--color-surface); }

/* ── messages ────────────────────────────────────────────────────────────── */
.auth-error { color: #c00; font-size: 14px; margin-top: 12px; min-height: 18px; overflow-wrap: anywhere; }

.auth-notice {
    border: 2px solid var(--color-border);
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
    background: var(--color-bg);
}
.auth-notice .auth-text { margin-bottom: 12px; color: var(--color-text); }

.resend-status { font-size: 14px; color: var(--color-text-muted); margin-top: 8px; min-height: 18px; overflow-wrap: anywhere; }
.resend-status.error { color: #c00; }
.resend-status:empty { display: none; }
.resend-ts { display: flex; justify-content: center; }
.resend-ts:empty { display: none; }
.resend-ts:not(:empty) { margin-bottom: 8px; }

#turnstile-container { margin-bottom: 16px; display: flex; justify-content: center; }

/* ── "you agree to the Terms and Privacy Policy" line, log-in footer links ── */
.auth-legal {
    text-align: center;
    font-size: 14px;
    line-height: 1.45;
    color: var(--color-text-faint);
    margin-top: 12px;
}
/* Links inside a sentence can't be 44 px tall; padding gives a bigger tap area
   without changing the line spacing. */
.auth-legal a {
    display: inline-block;
    padding: 8px 2px;
    margin: -8px 0;
    color: var(--color-primary);
    font-weight: bold;
}
.auth-legal a:hover { color: var(--color-secondary); }
.auth-footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 4px;
    font-size: 14px;
}

/* ── forgot-password link, login notice ──────────────────────────────────── */
.auth-forgot { text-align: right; margin: -8px 0 8px; }
.auth-sr-only {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
