/* Sign-in flow (users_auth_base.html): /users/slack-login/, the Slack callback and the logged-out page.
   Same ink/grey tokens, washes and frosted material as the home hero, so "Log in" in the site header
   lands on a page that reads as the same product. Signature: the Spock -> Slack handoff track,
   which doubles as the loading state (dots run to Slack on click, back to Spock on success). */

.sl {
    --sl-ink: #1d1d1f; --sl-body: #424245; --sl-muted: #6e6e73; --sl-faint: #a1a1a6;
    --sl-hair: rgba(29, 29, 31, 0.1);
    --sl-blue: #0f69ff; --sl-blue-deep: #0b5be0; --sl-red: #d92d20; --sl-caret: #66b7e4;
    --sl-ease: cubic-bezier(0.22, 1, 0.36, 1);
    position: relative; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", Lato, sans-serif;
    color: var(--sl-ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    /* The home hero's washes, recentred around the card */
    background:
        radial-gradient(48% 55% at 8% 0%, rgba(15, 105, 255, 0.14) 0%, rgba(15, 105, 255, 0) 70%),
        radial-gradient(40% 50% at 78% 10%, rgba(11, 165, 236, 0.12) 0%, rgba(11, 165, 236, 0) 70%),
        radial-gradient(45% 45% at 98% 70%, rgba(164, 87, 255, 0.10) 0%, rgba(164, 87, 255, 0) 70%),
        radial-gradient(50% 40% at 30% 100%, rgba(61, 214, 201, 0.13) 0%, rgba(61, 214, 201, 0) 70%),
        #fbfbfd;
}
.sl * { box-sizing: border-box; }
.sl a { color: var(--sl-blue); text-decoration: none; }
.sl a:hover { color: var(--sl-blue-deep); text-decoration: none; }
.sl a:focus-visible, .sl button:focus-visible { outline: 2px solid var(--sl-blue); outline-offset: 3px; }

/* Bar: same box as .site-nav__bar (1120px, 24px gutters, 64px tall), so the logo doesn't move */
.sl-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    width: 100%; max-width: 1120px; height: 64px; margin: 0 auto; padding: 0 24px;
}
.sl-logo { display: flex; margin-left: -6px; border-radius: 10px; }
.sl-logo img { display: block; width: 80px; height: 50px; }
.sl-new { margin: 0; font-size: 14px; color: var(--sl-muted); white-space: nowrap; }
.sl-new a {
    display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding: 7px 14px; border-radius: 980px;
    font-weight: 500; color: var(--sl-ink);
    background: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 0 0 1px rgba(29, 29, 31, 0.08), 0 4px 12px -6px rgba(15, 23, 42, 0.18);
    transition: box-shadow 0.25s ease, color 0.2s ease;
}
.sl-new a:hover { color: var(--sl-ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 0 0 1px rgba(15, 105, 255, 0.35), 0 6px 16px -6px rgba(15, 105, 255, 0.35); }
.sl-new a svg { color: var(--sl-muted); transition: transform 0.3s var(--sl-ease), color 0.2s ease; }
.sl-new a:hover svg { color: var(--sl-blue); transform: translateX(2px); }

.sl-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px 56px; }

/* Card: the hero tray's frosted material */
.sl-card {
    width: 100%; max-width: 420px; padding: 40px 40px 32px; border-radius: 24px; text-align: center;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85), 0 0 0 1px rgba(29, 29, 31, 0.07),
                0 40px 80px -36px rgba(15, 23, 42, 0.32), 0 16px 32px -18px rgba(15, 23, 42, 0.16);
    animation: sl-rise 0.7s var(--sl-ease) both;
}
@keyframes sl-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Handoff: Spock tile . . . . . Slack tile */
.sl-handoff { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 28px; }
.sl-tile {
    position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; overflow: hidden;
    background: #ffffff; box-shadow: 0 0 0 1px rgba(29, 29, 31, 0.08), 0 6px 14px -8px rgba(15, 23, 42, 0.35);
}
.sl-tile img { display: block; width: 100%; height: 100%; }
.sl-tile svg { width: 28px; height: 28px; }
.sl-track { position: relative; display: flex; align-items: center; gap: 7px; }
.sl-track i { width: 5px; height: 5px; border-radius: 50%; background: rgba(29, 29, 31, 0.18); }
.sl-handoff[data-state="go"] .sl-track i,
.sl-handoff[data-state="back"] .sl-track i { animation: sl-dot 1.1s ease-in-out infinite; }
.sl-handoff[data-state="go"] .sl-track i:nth-child(2), .sl-handoff[data-state="back"] .sl-track i:nth-child(4) { animation-delay: 0.12s; }
.sl-handoff[data-state="go"] .sl-track i:nth-child(3), .sl-handoff[data-state="back"] .sl-track i:nth-child(3) { animation-delay: 0.24s; }
.sl-handoff[data-state="go"] .sl-track i:nth-child(4), .sl-handoff[data-state="back"] .sl-track i:nth-child(2) { animation-delay: 0.36s; }
.sl-handoff[data-state="go"] .sl-track i:nth-child(5), .sl-handoff[data-state="back"] .sl-track i:nth-child(1) { animation-delay: 0.48s; }
@keyframes sl-dot {
    0%, 60%, 100% { background: rgba(29, 29, 31, 0.18); transform: scale(1); }
    25% { background: var(--sl-blue); transform: scale(1.5); }
}
/* Failed: the track breaks in the middle */
.sl-handoff[data-state="broken"] .sl-track i { background: rgba(29, 29, 31, 0.1); }
.sl-break {
    position: absolute; left: 50%; top: 50%; display: grid; place-items: center;
    width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
    color: #ffffff; background: var(--sl-red); box-shadow: 0 0 0 4px #fbfbfd;
}
.sl-break svg { width: 10px; height: 10px; }

.sl-title { margin: 0; font-size: 30px; line-height: 1.1; letter-spacing: -0.025em; font-weight: 700; color: var(--sl-ink); text-wrap: balance; }
.sl-lead { margin: 12px auto 0; max-width: 340px; font-size: 16px; line-height: 1.5; letter-spacing: -0.006em; color: var(--sl-body); text-wrap: pretty; }
.sl-lead strong { font-weight: 600; color: var(--sl-ink); }

/* Sign in with Slack: ink pill, the provider-button convention */
.sl-btn {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; height: 50px; margin-top: 28px; padding: 0 20px; border: 0; border-radius: 980px; cursor: pointer;
    font: inherit; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: #ffffff;
    background: var(--sl-ink);
    box-shadow: 0 10px 24px -12px rgba(15, 23, 42, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: background-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s var(--sl-ease);
}
.sl a.sl-btn, .sl a.sl-btn:hover { color: #ffffff; }
.sl-btn:hover { background: #333336; box-shadow: 0 14px 28px -12px rgba(15, 23, 42, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.sl-btn:active { transform: scale(0.98); }
.sl-btn[aria-busy="true"] { cursor: progress; background: #333336; }
.sl-btn-mark { display: grid; place-items: center; width: 28px; height: 28px; margin-left: -6px; border-radius: 50%; background: #ffffff; }
.sl-btn-mark svg { width: 16px; height: 16px; }

.sl-tip { margin: 16px 0 0; font-size: 13px; line-height: 1.5; color: var(--sl-muted); text-wrap: pretty; }
.sl-error {
    margin: 16px 0 0; padding: 10px 14px; border-radius: 12px;
    font-size: 14px; line-height: 1.45; text-align: left; color: #912018; background: rgba(217, 45, 32, 0.07);
}
.sl-error[hidden] { display: none; }
.sl-alt { margin: 20px 0 0; padding-top: 20px; border-top: 1px solid var(--sl-hair); font-size: 14px; color: var(--sl-muted); }

/* Below the card: employees never need this page */
.sl-note { display: flex; gap: 12px; max-width: 420px; margin: 24px 0 0; padding: 0 8px; font-size: 14px; line-height: 1.5; color: var(--sl-muted); text-align: left; }
.sl-note-icon { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--sl-faint); }
.sl-note strong { font-weight: 600; color: var(--sl-body); }

.sl-foot {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px;
    width: 100%; max-width: 1120px; margin: 0 auto; padding: 20px 24px 28px;
    font-size: 13px; color: var(--sl-faint);
}
.sl-foot a { color: var(--sl-muted); }
.sl-foot a:hover { color: var(--sl-ink); }

@media (max-width: 480px) {
    .sl-bar { padding: 0 16px; }
    .sl-new span { display: none; }
    .sl-new a { margin-left: 0; }
    .sl-main { justify-content: flex-start; padding-top: 24px; }
    .sl-card { padding: 32px 22px 24px; border-radius: 20px; }
    .sl-title { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
    .sl-card { animation: none; }
    .sl-handoff .sl-track i { animation: none !important; }
    .sl-handoff[data-state="go"] .sl-track i, .sl-handoff[data-state="back"] .sl-track i { background: var(--sl-blue); }
}
