/* Login e cadastro — layout dividido (>= 900px).
   Formulário à esquerda, imagem à direita, os dois dentro de uma moldura escura
   com respiro de 12px. Abaixo de 900px a imagem some e a página continua só com
   o formulário, como antes. Carregado DEPOIS do <style> inline das páginas, por
   isso sobrescreve o split antigo (que tinha depoimentos à direita). */

.auth-pane-art { display: none; }

@media (min-width: 900px) {
    body { padding: 16px; justify-content: stretch; }

    .auth-split {
        display: flex; flex: 1; width: 100%; align-items: stretch;
        min-height: calc(100vh - 32px);
        padding: 12px;
        background: oklch(0.105 0.005 250);
        border: 1px solid oklch(1 0 0 / 0.06);
        border-radius: 28px;
    }

    .auth-pane-form {
        display: flex; flex: 1 1 50%;
        align-items: center; justify-content: center;
        padding: 3rem clamp(2rem, 5vw, 5.5rem);
        background: none;
    }

    /* Sem cartão de vidro: o formulário fica direto na moldura. */
    .auth-pane-form .auth-card {
        display: flex; flex-direction: column;
        max-width: 440px; width: 100%; margin: 0; padding: 0;
        text-align: left;
        background: none; border: none; box-shadow: none;
        backdrop-filter: none; -webkit-backdrop-filter: none;
    }
    .auth-pane-form .auth-card > * { order: 3; }
    .auth-pane-form .auth-title { order: 1; }
    .auth-pane-form .auth-switch { order: 2; }

    /* Logo, rótulo, subtítulo e "voltar" moram na imagem no desktop. */
    .auth-pane-form .auth-logo,
    .auth-pane-form .auth-tagline,
    .auth-pane-form .auth-subtitle,
    .auth-pane-form .auth-back { display: none; }

    .auth-pane-form .auth-title {
        font-size: clamp(2.25rem, 3.4vw, 3rem);
        line-height: 1.05;
        letter-spacing: -0.025em;
        margin-bottom: 0.9rem;
    }
    .auth-pane-form .auth-switch {
        margin: 0 0 2.25rem;
        font-size: 0.9375rem;
        color: var(--text2);
    }
    .auth-pane-form .auth-switch a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }

    /* Seletor de idioma no canto do formulário (o canto direito é da imagem). */
    .auth-lang { top: 2.5rem; left: 3rem; right: auto; }
    .auth-lang.lang-menu .lang-menu-list { left: 0; right: auto; }

    .auth-pane-art {
        display: flex; flex-direction: column; justify-content: space-between;
        flex: 1 1 50%;
        position: relative; overflow: hidden;
        border-radius: 18px;
        padding: 1.75rem;
        background: #000;
    }
    /* 4 imagens que se alternam (24 s no total, 6 s cada, troca suave de ~1 s). */
    .art-slides { position: absolute; inset: 0; z-index: 0; }
    .art-slides span {
        position: absolute; inset: 0;
        background: center / cover no-repeat;
        opacity: 0;
        animation: art-fade 24s linear infinite;
    }
    .art-slides span:nth-child(1) { background-image: url("/assets/auth-scene-1.webp"); animation-delay: -1s; }
    .art-slides span:nth-child(2) { background-image: url("/assets/auth-scene-2.webp"); animation-delay: 5s; }
    .art-slides span:nth-child(3) { background-image: url("/assets/auth-scene-3.webp"); animation-delay: 11s; }
    .art-slides span:nth-child(4) { background-image: url("/assets/auth-scene-4.webp"); animation-delay: 17s; }
    @keyframes art-fade {
        0% { opacity: 0; }
        4.2% { opacity: 1; }
        25% { opacity: 1; }
        29.2% { opacity: 0; }
        100% { opacity: 0; }
    }
    @media (prefers-reduced-motion: reduce) {
        .art-slides span { animation: none; }
        .art-slides span:nth-child(1) { opacity: 1; }
    }
    /* Escurece o topo e a base pra o texto ler em cima da foto. */
    .auth-pane-art::before {
        content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
        background:
            linear-gradient(to bottom, oklch(0 0 0 / 0.55), transparent 22%),
            linear-gradient(to top, oklch(0 0 0 / 0.8), transparent 45%);
    }
    .art-top, .art-tag { position: relative; z-index: 2; }
    .art-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
    .art-logo {
        display: inline-flex; align-items: center; gap: 0.5rem;
        font-family: var(--fd); font-weight: 700; font-size: 1.2rem;
        color: oklch(0.98 0 0); text-decoration: none;
    }
    .art-back {
        display: inline-flex; align-items: center; gap: 0.4rem;
        padding: 0.55rem 0.95rem; border-radius: 999px;
        font-size: 0.875rem; font-weight: 500; color: oklch(0.98 0 0); text-decoration: none;
        background: oklch(1 0 0 / 0.12);
        backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        transition: background 150ms;
    }
    .art-back:hover { background: oklch(1 0 0 / 0.2); }
    .art-back:focus-visible, .art-logo:focus-visible { outline: 2px solid var(--found); outline-offset: 3px; }
    .art-tag {
        max-width: 16ch;
        font-family: var(--fd); font-weight: 700;
        font-size: clamp(1.75rem, 2.6vw, 2.4rem);
        line-height: 1.1; letter-spacing: -0.02em;
        color: oklch(0.98 0 0);
    }
    .art-tag small {
        display: block; margin-top: 0.75rem; max-width: 34ch;
        font-family: var(--fb); font-weight: 400; font-size: 0.9375rem; letter-spacing: 0;
        line-height: 1.5; color: oklch(1 0 0 / 0.72);
    }
}
