/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

:root {
    --color-blue1: #172983;
    --color-blue2: #0093D2;

    --color-grey: #797979;
    --color-grey-light: #efefef;
}

html {
    color: ##000;
    font-size: 10px;
    line-height: 1.4;
    font-family: "Inter", serif;
    font-optical-sizing: auto;
    font-weight: normal;
    font-style: normal;
}

/*
   * Remove text-shadow in selection highlight:
   * https://twitter.com/miketaylr/status/12228805301
   *
   * Customize the background color to match your design.
   */

::-moz-selection {
    background: var(--color-blue2);
    color: #ffffff;
    text-shadow: none;
}

::selection {
    background: var(--color-blue2);
    color: #ffffff;
    text-shadow: none;
}

/*
   * A better looking default horizontal rule
   */

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/*
   * Remove the gap between audio, canvas, iframes,
   * images, videos and the bottom of their containers:
   * https://github.com/h5bp/html5-boilerplate/issues/440
   */

audio,
canvas,
iframe,
img,
svg,
video {
    vertical-align: middle;
}

/*
   * Remove default fieldset styles.
   */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
   * Allow only vertical resizing of textareas.
   */

textarea {
    resize: vertical;
}

/* ==========================================================================
     Layout
     ========================================================================== */

body {
    margin: 0;
    padding: 4rem;
    font-size: 1.6rem;
}

a {
    color: var(--color-blue1);
    text-underline-offset: 1px;

    transition: all 0.15s ease-in-out;
}

a:hover,
a:focus {
    color: var(--color-blue2);
    text-underline-offset: 3px;
}

header,
section,
footer {
    width: 100%;
    margin: 0 auto;
}

.site-header {
    margin-bottom: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--color-grey-light);
}

.site-header h1 {
    margin: 0 auto;
}

.site-header__logo {
    position: relative;
    width: fit-content;
    height: fit-content;
    margin: 0 auto;
}

.site-header__logo img {
    display: block;
    width: auto;
    height: 64px;
}

.site-footer {
    margin-top: 4rem;
    padding-top: 4rem;
    font-size: 1.4rem;
    color: var(--color-grey);
    border-top: 1px solid var(--color-grey-light);
}

.site-footer__brands {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.site-footer__brand a {
    color: var(--color-grey);
}

.site-footer__brand a:hover,
.site-footer__brand a:focus {
    color: var(--color-blue2);
}

/* 404 */
.site-header--404 .site-header__logo-outline {
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid var(--color-grey-light);
}

.site-header--404 img {
    position: relative;
    z-index: 2;
}

.site-content--404 {
    text-align: center;
}

.site-footer--404 .site-footer__brands {
    justify-content: center;
}

.animate__fade-in {
    opacity: 0;
    animation: fade-in 0.3s ease-in forwards 0.15s;
}

.animate__drop {
    animation: drop 0.3s cubic-bezier(0.25, 0.4, 0.55, 1.4) forwards 0.825s;
}

.animate__logo-drop {
    transform-origin: right top;
    animation: logo-drop 0.3s cubic-bezier(0.25, 0.4, 0.55, 1.4) forwards 0.6s;
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes drop {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(2rem);
    }
}

@keyframes logo-drop {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(-15deg);
    }
}

/* ==========================================================================
     Helper classes
     ========================================================================== */

/*
   * Hide visually and from screen readers
   */

.hidden,
[hidden] {
    display: none !important;
}

/*
   * Hide only visually, but have it available for screen readers:
   * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
   *
   * 1. For long content, line feeds are not interpreted as spaces and small width
   *    causes content to wrap 1 word per line:
   *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
   */

.visually-hidden {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
    /* 1 */
}

/*
   * Extends the .visually-hidden class to allow the element
   * to be focusable when navigated to via the keyboard:
   * https://www.drupal.org/node/897638
   */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    white-space: inherit;
    width: auto;
}

/*
   * Hide visually and from screen readers, but maintain layout
   */

.invisible {
    visibility: hidden;
}

/*
   * Clearfix: contain floats
   *
   * The use of `table` rather than `block` is only necessary if using
   * `::before` to contain the top-margins of child elements.
   */

.clearfix::before,
.clearfix::after {
    content: "";
    display: table;
}

.clearfix::after {
    clear: both;
}

@media only screen and (min-width: 640px) {

    body {
        padding: 0;
    }

    header,
    section,
    footer {
        max-width: 640px;
    }

    .site-header {
        margin-top: 4rem;
    }

}

/* ==========================================================================
     Print styles.
     Inlined to avoid the additional HTTP request:
     https://www.phpied.com/delay-loading-your-print-css/
     ========================================================================== */

@media print {

    *,
    *::before,
    *::after {
        background: #fff !important;
        color: #000 !important;
        /* Black prints faster */
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }

    abbr[title]::after {
        content: " (" attr(title) ")";
    }

    /*
     * Don't show links that are fragment identifiers,
     * or use the `javascript:` pseudo protocol
     */
    a[href^="#"]::after,
    a[href^="javascript:"]::after {
        content: "";
    }

    pre {
        white-space: pre-wrap !important;
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}
