/* Login Page Styles
 *
 * Every rule that sets a margin is qualified with #web-application-body-container,
 * and that is load-bearing rather than defensive. spa_cloud_center.css ports the SPA's
 * global reset as `#web-application-body-container * { margin: 0 }` (tools/csssync
 * scopes it to the AEM shell's body container, which wraps the SSR pages too). At
 * specificity (1,0,0) that reset beats any bare class selector, so an unqualified
 * `margin: 0 auto` here computes to 0 and the page renders hard left. That is what put
 * a gutter down the left of this page and pushed the hero band off the right edge: the
 * band's own `margin-left: calc(50% - 50vw)` was being dropped while its `width: 100vw`
 * was not, so it started at the container's left edge and overflowed by the full inset.
 *
 * Geometry and type below are matched to the signed-out page at matlab.mathworks.com,
 * which is where this page's design and its class names come from -- measured off the
 * live page rather than guessed, so a reviewer can re-measure them.
 */

/* The AEM shell centres page content in a max-width:1320px container, so a band meant
   to reach the window edges has to escape it. 100vw counts the vertical scrollbar, so
   the escape overshoots by half a scrollbar on each side, and without clipping that
   overshoot the page gains a horizontal scrollbar.
   The clip has to be at the viewport, which is why this is on <html> and not on
   #web-application-body-container: overflow clips at the clipping element's own box, so
   clipping on the container the band is escaping clips the escape itself and the band
   comes out exactly as wide as the container -- the inset look, with extra steps.
   `clip` rather than `hidden` so this stays a non-scroll container: nothing inside
   loses position: sticky, and overflow-y is untouched, so the page still scrolls.
   :has() keeps it to this page -- login.css is only served here, but the selector is
   <html>, and a rule on <html> should say out loud which page it belongs to. */
html:has(.login-page-wrapper) {
    overflow-x: clip;
}

.login-page-wrapper {
    display: block;
    width: 100%;
}

#web-application-body-container .sign-in-container {
    background: #005487 url(https://matlab.mathworks.com/home/0.43.1/images/darak-triangles-background.15892.227c.jpg) no-repeat bottom left;
    background-size: cover;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    /* Full bleed: width follows from the negative side margins, so there is no 100vw
       width to disagree with them. See the overflow-x note above. */
    width: auto;
    margin-inline: calc(50% - 50vw);
}

#web-application-body-container .sign-in-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 2.5rem 1rem;
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* The prefix is not only about margin here: the ported SPA sheet styles h1 inside the
   same container, so an unqualified .welcome-text loses its colour as well as its
   spacing and the heading comes out link-blue on the dark band. */
#web-application-body-container .welcome-text {
    color: #fff;
    font-size: 28px;
    font-weight: 500;
    margin: 0 0 40px;
}

#web-application-body-container .welcome-button {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.2;
    padding: 9px 30px;
    background: #c05708;
    color: #fff;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s;
}

#web-application-body-container .welcome-button:hover,
#web-application-body-container .welcome-button:focus {
    background: #a04806;
    color: #fff;
    text-decoration: none;
}

/* Marketing Section
   1008px is the reference page's content column at 1440px wide (three 336px columns),
   and it is a max-width, so narrower viewports just use the width they have. */
#web-application-body-container .marketing-container {
    max-width: 1008px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 20px;
    display: flex;
    justify-content: space-between;
    text-align: center;
    flex-wrap: wrap;
}

#web-application-body-container .marketing-container > div {
    flex: 1 1 0;
    min-width: 250px;
    margin: 0 0 50px;
    height: 100px;
    background-position: center top;
    background-repeat: no-repeat;
    background-size: 60px;
    padding-top: 80px;
}

.analyze-data {
    background-image: url('https://matlab.mathworks.com/home/0.43.1/images/analyze-data-blue.96582.0d9e.svg');
}

.develop-algorithms {
    background-image: url('https://matlab.mathworks.com/home/0.43.1/images/develop-algorithms-blue.86595.0d7a.svg');
}

.create-models {
    background-image: url('https://matlab.mathworks.com/home/0.43.1/images/models-and-applications-blue.41177.1228.svg');
}

#web-application-body-container .icon-text {
    font-size: 19px;
    font-weight: 500;
    color: #212121;
    margin: 0 0 13px;
}

#web-application-body-container .marketing-text-container {
    max-width: 1008px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 20px;
    text-align: center;
}

#web-application-body-container .marketing-text {
    font-size: 18px;
    line-height: 1.6;
    color: #212121;
    margin: 18px 0;
}

#web-application-body-container .marketing-link {
    color: #1171be;
    font-size: 1rem;
    text-decoration: none;
}

#web-application-body-container .marketing-link:hover {
    text-decoration: underline;
    color: #268cdd;
}

/* Responsive adjustments */

@media (max-width: 768px) {
    #web-application-body-container .welcome-text {
        font-size: 24px;
    }

    #web-application-body-container .marketing-container {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 560px) {
    #web-application-body-container .sign-in-form {
        padding: 2rem 1rem;
    }

    #web-application-body-container .welcome-text {
        font-size: 22px;
    }

    #web-application-body-container .marketing-container > div {
        margin-bottom: 20px;
    }
}
