/* The sign-in page (/login): an illustration of a script becoming slides, beside a short sign-in on white. Linked after _variables.css for Gilroy and the tokens. */

.signin {
    /* Two shades of the drawing with no token of their own: the slides' figures and shadows, and the line and the last figure. */
    --signin-figure: #DCE5F4;
    --signin-link: var(--border-blue);
    --signin-btn-hover: #173149;

    margin: 0;
    min-height: 100vh;
    display: grid;
    grid-template-columns: min(760px, 53%) 1fr;
    background: var(--surface);
    color: var(--text-primary);
    font-family: 'Gilroy', 'Avenir Next', 'Century Gothic', Arial, sans-serif;
}

/* The illustration: decoration only, drawn on a 560 x 560 stage centred in the panel. */

.signin-art {
    position: relative;
    overflow: hidden;
    background: var(--surface-chip);
}

.signin-stage {
    position: absolute;
    left: calc(50% - 270px);
    top: calc(50% - 280px);
    width: 560px;
    height: 560px;
}

/* Between the breakpoint and a full-width panel the drawing would not fit, so it is drawn smaller. */
@media (max-width: 1279px), (max-height: 639px) {
    .signin-stage {
        scale: 0.8;
    }
}

.signin-script {
    position: absolute;
    left: 0;
    top: 110px;
    width: 220px;
    height: 300px;
    box-sizing: border-box;
    padding: var(--space-24) var(--space-20);
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
}

.signin-script b {
    display: block;
    width: 55%;
    height: 12px;
    margin-bottom: var(--space-20);
    border-radius: var(--radius-md);
    background: var(--secondary);
}

.signin-script i {
    display: block;
    height: 7px;
    margin-bottom: var(--space-12);
    border-radius: var(--radius-sm);
    background: var(--bar-track);
    transform-origin: left;
}

.signin-script i:nth-of-type(1) { width: 92%; }
.signin-script i:nth-of-type(2) { width: 80%; }
.signin-script i:nth-of-type(3) { width: 88%; }
.signin-script i:nth-of-type(4) { width: 60%; }
.signin-script i:nth-of-type(5) { width: 84%; }
.signin-script i:nth-of-type(6) { width: 72%; }
.signin-script i:nth-of-type(7) { width: 90%; }
.signin-script i:nth-of-type(8) { width: 55%; }
.signin-script i:nth-of-type(9) { width: 78%; }

.signin-link {
    position: absolute;
    left: 236px;
    top: 259px;
    width: 64px;
    height: 2px;
    background: var(--signin-link);
}

/* A crisp offset shadow, never a blurred one. */
.signin-slide {
    position: absolute;
    left: 316px;
    width: 240px;
    height: 150px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    box-shadow: 6px 6px 0 var(--signin-figure);
}

.signin-slide-1 { top: 20px; }
.signin-slide-2 { top: 190px; }
.signin-slide-3 { top: 360px; }

.signin-slide b {
    position: absolute;
    left: 18px;
    top: 20px;
    width: 90px;
    height: 10px;
    border-radius: var(--radius-md);
    background: var(--secondary);
}

.signin-slide i {
    position: absolute;
    left: 18px;
    height: 6px;
    border-radius: var(--radius-sm);
    background: var(--bar-track);
}

.signin-slide i:nth-of-type(1) { top: 44px; width: 120px; }
.signin-slide i:nth-of-type(2) { top: 60px; width: 96px; }
.signin-slide i:nth-of-type(3) { top: 76px; width: 108px; }

.signin-slide u {
    position: absolute;
    right: 18px;
    bottom: 16px;
    width: 56px;
    height: 76px;
    border-radius: var(--radius-4xl) var(--radius-4xl) var(--radius-lg) var(--radius-lg);
    background: var(--signin-figure);
}

/* The first slide's title is the page's only red apart from the logo. */
.signin-slide-1 b { background: var(--primary); }
.signin-slide-3 u { background: var(--signin-link); }

/* It plays once: the script's lines draw, the slides rise, then the slides drift. With reduced motion none of it runs and
   the finished drawing above is what shows. The drift moves `translate`, not `transform`, so it does not fight the rise. */
@media (prefers-reduced-motion: no-preference) {
    .signin-script i {
        transform: scaleX(0);
        animation: signin-draw 0.7s ease-out forwards;
    }

    .signin-script i:nth-of-type(2) { animation-delay: 0.22s; }
    .signin-script i:nth-of-type(3) { animation-delay: 0.44s; }
    .signin-script i:nth-of-type(4) { animation-delay: 0.66s; }
    .signin-script i:nth-of-type(5) { animation-delay: 0.88s; }
    .signin-script i:nth-of-type(6) { animation-delay: 1.1s; }
    .signin-script i:nth-of-type(7) { animation-delay: 1.32s; }
    .signin-script i:nth-of-type(8) { animation-delay: 1.54s; }
    .signin-script i:nth-of-type(9) { animation-delay: 1.76s; }

    .signin-slide {
        opacity: 0;
        animation: signin-rise 0.9s ease-out forwards, signin-drift 7s ease-in-out infinite alternate;
    }

    .signin-slide-1 { animation-delay: 2.6s, 3.5s; }
    .signin-slide-2 { animation-delay: 3s, 4s; }
    .signin-slide-3 { animation-delay: 3.4s, 4.5s; }
}

@keyframes signin-draw {
    to { transform: scaleX(1); }
}

@keyframes signin-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@keyframes signin-drift {
    from { translate: 0 0; }
    to { translate: 0 -6px; }
}

/* The sign-in: one 380 px column centred in the panel. The space above it and the footer below share the spare height
   equally, so the column stays centred while there is room; on a short screen each shrinks to its minimum and the
   Skill Dynamics logo follows the button. */

.signin-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    min-height: 100vh;
    padding: 0 var(--space-24);
    background: var(--surface);
}

.signin-main::before {
    content: "";
    flex: 1 1 0;
    min-height: 32px;
}

.signin-box {
    flex: none;
    display: flex;
    flex-direction: column;
    width: min(380px, 100%);
}

.signin-brand {
    display: block;
    align-self: flex-start;
    width: auto;
    height: 36px;
}

.signin-brand .brand-screen { fill: var(--surface); stroke: var(--brand-navy); stroke-width: 12; stroke-linejoin: round; }
.signin-brand .brand-script { fill: none; stroke: var(--brand-navy); stroke-width: 5; stroke-linecap: round; }
.signin-brand .brand-script-accent { stroke: var(--primary); }
.signin-brand .brand-wordmark { fill: var(--brand-navy); font-family: 'Gilroy', 'Avenir Next', 'Century Gothic', Arial, sans-serif; }

.signin-box h1 {
    margin: var(--space-40) 0 var(--space-8);
    font-size: var(--text-5xl);
    font-weight: 700;
    color: var(--text-primary);
}

.signin-box p {
    margin: 0 0 var(--space-28);
    font-size: var(--font-large);
    font-weight: 400;
    color: var(--text-secondary);
}

.signin-error {
    display: flex;
    align-items: flex-start;
    gap: var(--space-10);
    margin: -8px 0 var(--space-20);
    padding: var(--space-12) var(--space-14);
    border-radius: var(--radius-xl);
    background: var(--tint-red);
    color: var(--status-missing-text);
    font-size: var(--font-regular);
    font-weight: 500;
    line-height: var(--leading-normal);
}

/* With no button, the error is the column's last item and takes the button's place. */
.signin-error:last-child {
    margin-bottom: 0;
}

.signin-error svg {
    flex: none;
    margin-top: 1px;
}

.signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-12);
    box-sizing: border-box;
    width: 100%;
    min-height: 50px;
    padding: var(--space-12) var(--space-20);
    border-radius: var(--radius-xl);
    background: var(--secondary);
    color: var(--text-inverse);
    font-size: var(--font-large);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.signin-btn:hover {
    background: var(--signin-btn-hover);
}

.signin-btn:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* The Microsoft mark: four squares in Microsoft's own colours. */
.signin-mark {
    display: inline-grid;
    flex: none;
    grid-template-columns: 9px 9px;
    gap: var(--space-2);
}

.signin-mark i {
    display: block;
    width: 9px;
    height: 9px;
}

.signin-mark i:nth-child(1) { background: #F25022; }
.signin-mark i:nth-child(2) { background: #7FBA00; }
.signin-mark i:nth-child(3) { background: #00A4EF; }
.signin-mark i:nth-child(4) { background: #FFB900; }

.signin-note {
    margin-top: var(--space-16);
    font-size: var(--text-sm);
    font-weight: 400;
    line-height: var(--leading-normal);
    color: var(--text-secondary);
}

/* No padding on the footer itself: its flex basis must be zero for the column to sit exactly in the middle. */
.signin-foot {
    flex: 1 1 0;
    display: flex;
    align-items: flex-end;
}

.signin-foot img {
    display: block;
    height: 22px;
    margin: var(--space-40) 0 var(--space-32);
}

/* Narrow screens: no illustration; the sign-in fills the screen. */
@media (max-width: 959px) {
    .signin {
        grid-template-columns: 1fr;
    }

    .signin-art {
        display: none;
    }
}
