/* The pages a member meets before they are signed in.
 *
 * These sit outside the application shell — no topbar, no sidebar — so they
 * have to carry the brand on their own. Everything structural comes from
 * Tabler's own custom properties, so light and dark mode need no second set
 * of rules; the brand's colours come from core/css/palette.css.
 *
 * The one ornament is the hairline along the card's top edge: it is the exact
 * blue and cyan of the clubnino mark. The rounded-square icon chip echoes the
 * shape of the mark for the same reason.
 */

/* ---------------------------------------------------------------- layout */

.cn-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.cn-auth__inner {
    width: 100%;
    max-width: 27rem;
}

.cn-auth__brand {
    margin-bottom: 1.75rem;
    text-align: center;
}

/* Mark plus name, so the name follows the theme's text colour instead of
   being baked into the image. */
.cn-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.cn-brand__mark {
    display: block;
    border-radius: 0.5rem;
}

.cn-brand__word {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--tblr-body-color);
}

/* The way out, deliberately outside the card: it is an escape, not an
   alternative to the action inside. */
.cn-auth__away {
    margin: 1.25rem 0 0;
    text-align: center;
    font-size: 0.875rem;
}

.cn-auth__away a {
    color: var(--tblr-secondary);
    text-decoration: none;
}

.cn-auth__away a:hover,
.cn-auth__away a:focus-visible {
    color: var(--tblr-body-color);
    text-decoration: underline;
}

/* The language switch sits below the way out, quieter than either. */
.cn-auth__languages {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
}

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

.cn-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--tblr-border-color);
    border-radius: 1rem;
    background: var(--tblr-bg-surface);
    box-shadow: 0 1px 2px rgb(15 23 42 / 4%), 0 12px 32px -12px rgb(15 23 42 / 12%);
}

.cn-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--cn-blue), var(--cn-cyan));
}

.cn-card__body {
    padding: 2.5rem 2rem 2rem;
}

/* --------------------------------------------------------------- message */

.cn-message {
    text-align: center;
}

/* A rounded square, not a circle — the clubnino mark is a rounded square.
   Kept neutral on purpose: the state is named in words just below, and
   colour alone is never the signal. */
.cn-message__chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1.25rem;
    border-radius: 0.875rem;
    background: var(--tblr-bg-surface-secondary, rgb(15 23 42 / 5%));
    color: var(--tblr-body-color);
    font-size: 1.625rem;
    line-height: 1;
    opacity: 0.75;
}

.cn-message__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--tblr-secondary);
}

.cn-message__eyebrow--stale {
    color: var(--tblr-warning);
}

.cn-message__eyebrow--waiting {
    color: var(--cn-blue);
}

.cn-message__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--tblr-body-color);
    /* Two short lines read better here than one line broken at a random
       word, so the wrap is placed rather than left to chance. */
    text-wrap: balance;
}

.cn-message__text {
    margin: 0;
    color: var(--tblr-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    /* Centred copy stays readable for two lines; past that the ragged
       edges start to fight the eye, so the measure is capped. */
    max-width: 21rem;
    margin-inline: auto;
    text-wrap: pretty;
}

.cn-message__action {
    margin-top: 1.75rem;
}

.cn-message__action .btn {
    width: 100%;
}

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

.cn-form__title {
    margin: 0 0 0.5rem;
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    text-align: center;
    color: var(--tblr-body-color);
}

.cn-form__lead {
    margin: 0 0 1.75rem;
    text-align: center;
    color: var(--tblr-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

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

/* One reveal on load, and only where the card carries a message: a form
   the user came to fill in must not be faded in underneath their cursor.
   Nothing animates on interaction. */
@media (prefers-reduced-motion: no-preference) {
    .cn-card--reveal {
        animation: cn-rise 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
    }
}

@keyframes cn-rise {
    from {
        opacity: 0;
        transform: translateY(0.5rem);
    }
}

@media (max-width: 26rem) {
    .cn-card__body {
        padding: 2rem 1.25rem 1.5rem;
    }
}
