@import "all";

@color1: #450a0a;
@color1-dark: #ff9999;
@color2: #9999ff;

@image-width: 200px;

body {
    margin: 0;
    position: relative;
}

header,
[role="banner"] {
    margin: 0;
    position: relative;
    border-bottom: solid 1px rgba(0, 0, 0, 0.4);

    /*
   * Used to work around a Safari OSX bug with sticky table content
   * stacking on top of the banner
   */
    transform: translateZ(2px);

    /* Firefox needed this to work around the Safari workaround. */
    position: relative;
    z-index: 3;

    /*
   * When the hamburger menu is open, we need to undo all of the
   * above so the stacking order doesn't mess up with its overlay
   * screen.
   */
    .enable-flyout__body--is-open & {
        transform: initial;
        position: initial;
        z-index: initial;
    }

    h1 {
        font-size: inherit;
        font-weight: inherit;
    }

    .search-form {
        position: absolute;
        top: 1em;
        right: 1em;
    }
}

.logo {
    position: relative;
    display: inline-block;
    padding: 20px;
    background: @color2;
    border-radius: 50%;
    transform: rotate(-10deg);

    .acme,
    .zoltipedia {
        display: inline-block;
        position: relative;
        transform: scale(1.1) translateY(-20px) rotate(10deg);
        color: @color1-dark;
        text-shadow:
            1px 0 0 #000,
            -1px 0 0 #000,
            0 1px 0 #000,
            0 -1px 0 #000,
            3px 3px #000;
    }

    .acme {
        font-size: (70/@px);
        font-weight: 900;
    }

    .zoltipedia {
        font-size: (60/@px);
    }

    .corp {
        position: absolute;
        display: inline-block;
        transform: rotate(10deg) scaleY(0.7);
        top: 60%;
        right: 5%;
    }

    .zoltipedia + .corp {
        top: 70%;
    }
}

.motto {
    position: absolute;
    transform: rotate(10deg);
    bottom: -20px;
    left: 30px;
    font-size: 0.8em;
    font-family: "Palatino", serif;
    font-style: italic;
    width: 500px;
}

main:not(.with-full-bleed-hero),
[role="main"]:not(.with-full-bleed-hero),
#main:not(.with-full-bleed-hero),
.with-full-bleed-hero__content {
    padding: @mobile-page-padding;
    margin: 0 auto;
    max-width: 1024px;
    line-height: 1.4;
    position: relative;

    @media @tablet {
        padding: @page-padding;
    }
}

.inline-left {
    float: left;
    margin: 0 1em 1em 0;
}

.inline-right {
    float: right;
    margin: 0 0 1em 1em;
}

.inline-left,
.inline-right {
    width: @image-width;
}

article {
    &:after {
        content: "";
        display: table;
        clear: both;
    }
}

aside,
[role="complementary"] {
    display: block;
    background: #ddd data-uri("../../images/notepad-icon.svg") no-repeat 1em 1em;
    margin: 1em auto;
    padding: 1em 1em 1em calc(100px + 2em);
    min-height: (139 / @px);
    border: solid 1px black;
    box-shadow: 4px 4px 0 black;
    line-height: 1.4;

    max-width: 1024px;

    h2 {
        font-family: "OpenSans", "Helvetica", "Arial", sans-serif;
        font-weight: bold;
        margin-top: 0;
    }

    @media @mobile {
        background-size: 3rem;
        padding-left: 1rem;
        background: #ddd;

        h2 {
            &::before {
                content: "";
                background: data-uri("../../images/notepad-icon.svg");
                width: 2rem;
                height: 2rem;
                display: inline-block;
                background-size: contain;
                background-repeat: no-repeat;
                position: relative;
                top: 0.4rem;
            }
        }
    }

    h3 {
        color: @color2;
        text-shadow:
            1px 0 0 #000,
            -1px 0 0 #000,
            0 1px 0 #000,
            0 -1px 0 #000,
            3px 3px #000;

        font-size: (40/@px);
        font-weight: bold;
    }

    a {
        color: #905300;
    }
}

footer,
[role="contentinfo"] {
    bottom: 0;
    width: 100%;
    background: black;
    color: white;
    padding: 1em;
    text-align: center;
    line-height: 1.4;

    a {
        color: #ccccff;
    }
}

.enable__is-dark-mode {
    aside, [role="complementary"] {
        background: #444;        
        border-color: #aaa;

        @media @tablet-up {
            background: data-uri("../../images/notepad-icon.svg") no-repeat 1em 1em;
        }
        
        a {
            color: @light-orange;
        }
    }
}