/*
 * Sign-in pages (templates/auth): the marketing site's look (base.css under
 * .mk) in a split layout: the form on white on the left (logo, form, a line
 * under it), a black side on the right with three example sites floating and
 * a caption. The six code boxes of the code after the password: assets/auth/code-boxes.js.
 */
@layer marketing {
    .mk {
        & .au {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
            min-height: 100vh;
            background: #fff;
        }
        & .au-form {
            display: flex;
            flex-direction: column;
            padding: 28px clamp(20px, 5vw, 64px);
        }

        /* the logo (as in the nav) */
        & .logo {
            display: flex;
            align-items: center;
            gap: 8px;
            width: fit-content;
            font-weight: 600;
            font-size: 18px;
            letter-spacing: -0.03em;
            text-decoration: none;
            color: #0a0a0a;
        }
        & .logo i {
            position: relative;
            width: 18px;
            height: 18px;
            border-radius: 5px;
            background: var(--text);
        }
        & .logo i::after {
            content: "";
            position: absolute;
            left: 4px;
            right: 4px;
            bottom: 4px;
            height: 3px;
            border-radius: 2px;
            background: #fff;
        }

        /* the form */
        & .au-box {
            width: 100%;
            max-width: 400px;
            margin: auto;
            padding: 48px 0;
        }
        & .au-box h1 {
            font-size: clamp(34px, 3.6vw, 46px);
            font-weight: 600;
            letter-spacing: -0.045em;
            line-height: 1.02;
        }
        & .au-sub {
            margin-top: 12px;
            color: var(--muted);
            font-size: 16px;
        }
        & .au-sub b,
        & .au-sub strong {
            color: #0a0a0a;
            font-weight: 500;
        }
        & .au-box form {
            display: grid;
            gap: 16px;
            margin-top: 32px;
        }
        & .au-f {
            display: grid;
            gap: 7px;
        }
        & .au-f label {
            display: flex;
            justify-content: space-between;
            font-size: 14px;
            font-weight: 500;
            color: #0a0a0a;
        }
        & .au-f label a,
        & .au-foot a,
        & .au-note a {
            color: #0a0a0a;
            font-weight: 500;
            text-underline-offset: 3px;
        }
        & .au-f label a {
            font-weight: 400;
            color: var(--muted);
        }
        & .au-f input {
            height: 50px;
            padding: 0 16px;
            border: 1px solid #dcdcdc;
            border-radius: 12px;
            font: inherit;
            font-size: 16px;
            background: #fff;
            color: #0a0a0a;
            outline: none;
            transition:
                border-color 0.2s,
                box-shadow 0.2s;
        }
        & .au-f input:focus {
            border-color: #0a0a0a;
            box-shadow: 0 0 0 4px rgb(0 0 0 / 0.06);
        }
        & .au-f input:disabled {
            background: #f6f6f6;
            color: var(--muted);
        }
        & .au-f small {
            color: var(--faint);
            font-size: 13px;
        }
        & .au-check {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            color: #333;
        }
        & .au-check input {
            width: 18px;
            height: 18px;
            margin: 0;
            accent-color: #0a0a0a;
        }
        & .au-box .btn {
            width: 100%;
            justify-content: center;
            height: 52px;
            font-size: 16px;
            margin-top: 6px;
        }
        /* a result page's one button, straight under its text */
        & .au-box .au-cta {
            margin-top: 32px;
        }
        & .au-box .btn-line {
            box-shadow: inset 0 0 0 1px #dcdcdc;
        }

        /* the code: six boxes (with JS; the label stays for screen readers) */
        & .au-code {
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: 8px;
        }
        & .au-code[hidden] {
            display: none;
        }
        & .au-code input {
            height: 60px;
            min-width: 0;
            text-align: center;
            font: 600 24px / 1 var(--f-mono);
            padding: 0;
        }
        & .au-f.has-boxes > label {
            display: none;
        }

        & .au-note {
            margin-top: 22px;
            font-size: 14px;
            color: var(--muted);
        }
        & .au-icon {
            width: 56px;
            height: 56px;
            border-radius: 16px;
            background: #f2f2f2;
            display: grid;
            place-items: center;
            margin-bottom: 26px;
            color: #0a0a0a;
        }
        & .au-icon svg {
            width: 24px;
            height: 24px;
        }
        & .au-icon--ok {
            color: var(--green);
        }
        & .au-icon--error {
            color: #c2410c;
        }
        & .au-invite {
            display: flex;
            gap: 12px;
            align-items: center;
            margin-top: 22px;
            padding: 14px;
            border: 1px solid var(--line);
            border-radius: 14px;
        }
        & .au-invite-icon {
            display: grid;
            place-items: center;
            flex: 0 0 auto;
            width: 64px;
            height: 40px;
            border-radius: 6px;
            background: #f2f2f2;
        }
        & .au-invite-icon svg {
            width: 18px;
            height: 18px;
        }
        & .au-invite b {
            display: block;
            font-size: 15px;
        }
        & .au-invite span {
            font-size: 13px;
            color: var(--muted);
        }

        /* an error or a confirmation above the form */
        & .au-alert {
            margin-top: 22px;
            padding: 12px 14px;
            border-radius: 12px;
            font-size: 14px;
            line-height: 1.5;
        }
        & .au-alert--danger {
            background: #fef2f2;
            color: #991b1b;
            box-shadow: inset 0 0 0 1px #fecaca;
        }
        & .au-alert--success {
            background: #ecfdf5;
            color: #065f46;
            box-shadow: inset 0 0 0 1px #a7f3d0;
        }

        /* the line under the form; the code page's is a logout form that looks like a link */
        & .au-foot {
            font-size: 14px;
            color: var(--muted);
        }
        & .au-foot .logout-form {
            display: inline;
        }
        & .au-link-btn {
            padding: 0;
            border: 0;
            background: none;
            font: inherit;
            font-weight: 500;
            color: #0a0a0a;
            text-decoration: underline;
            text-underline-offset: 3px;
            cursor: pointer;
        }

        /* the black side */
        & .au-side {
            position: relative;
            overflow: hidden;
            background: radial-gradient(70% 60% at 50% 45%, #2a2a2a 0%, #111 55%, #000 100%);
            color: #fff;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding: clamp(28px, 4vw, 56px);
        }
        & .au-side::after {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(rgb(0 0 0 / 0) 45%, rgb(0 0 0 / 0.9) 85%);
            pointer-events: none;
        }
        & .au-stack {
            position: absolute;
            inset: 0;
        }
        & .au-stack figure {
            position: absolute;
            margin: 0;
            border-radius: 12px;
            overflow: hidden;
            background: #fff;
            box-shadow: 0 50px 100px -40px rgb(0 0 0 / 0.9);
        }
        & .au-stack figure::before {
            content: "";
            display: block;
            height: 22px;
            background: #f3f3f3 radial-gradient(circle, #cfcfcf 3px, transparent 3.5px) 10px 50% / 12px 12px repeat-x;
            border-bottom: 1px solid #e5e5e5;
        }
        & .au-stack img {
            display: block;
            width: 100%;
            aspect-ratio: 16 / 10;
            object-fit: cover;
            object-position: center top;
        }
        & .au-stack .f1 {
            width: 62%;
            left: 10%;
            top: 9%;
            transform: rotate(-3deg);
            animation: au-float 9s ease-in-out infinite;
        }
        & .au-stack .f2 {
            width: 54%;
            right: -6%;
            top: 30%;
            transform: rotate(4deg);
            animation: au-float 11s ease-in-out -3s infinite;
        }
        & .au-stack .f3 {
            width: 46%;
            left: 4%;
            top: 50%;
            transform: rotate(-1deg);
            animation: au-float 10s ease-in-out -6s infinite;
            opacity: 0.95;
        }
        & .au-cap {
            position: relative;
            z-index: 1;
            max-width: 30ch;
        }
        & .au-cap b {
            display: block;
            font-size: clamp(26px, 2.6vw, 36px);
            font-weight: 600;
            letter-spacing: -0.04em;
            line-height: 1.08;
        }
        & .au-cap > span {
            display: block;
            margin-top: 14px;
            font: 500 12px / 1 var(--f-mono);
            color: rgb(255 255 255 / 0.6);
        }
    }

    @keyframes au-float {
        50% {
            translate: 0 -12px;
        }
    }

    @media (max-width: 860px) {
        .mk .au {
            grid-template-columns: minmax(0, 1fr);
        }
        .mk .au-side {
            display: none;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .mk .au-stack figure {
            animation: none;
        }
    }
}
