/* Fonts */
@font-face {
    font-family: 'Georgiaz';
    src: url("../fonts/Georgiaz.TTF");
}
@font-face {
    font-family: 'Dot Gothic 16';
    src: url("../fonts/DotGothic16-Regular.ttf");
}
@font-face {
    font-family: 'Libre Barcode 39';
    src: url("../fonts/LibreBarcode39-Regular.ttf");
}
@font-face {
    font-family: 'Caveat Brush';
    src: url("../fonts/CaveatBrush-Regular.ttf");
}
@font-face {
    font-family: 'Gochi Hand';
    src: url("../fonts/GochiHand-Regular.ttf");
}
@font-face {
    font-family: 'Courier Prime';
    src: url("../fonts/CourierPrime-Regular.ttf");
    font-style: normal;
    font-weight: normal;
}
@font-face {
    font-family: 'Courier Prime';
    src: url("../fonts/CourierPrime-Bold.ttf");
    font-style: normal;
    font-weight: bold;
}
@font-face {
    font-family: 'Courier Prime';
    src: url("../fonts/CourierPrime-Italic.ttf");
    font-style: italic;
    font-weight: normal;
}
@font-face {
    font-family: 'Courier Prime';
    src: url("../fonts/CourierPrime-BoldItalic.ttf");
    font-style: italic;
    font-weight: bold;
}

/* Base layout */
:root {
    --shadow: #1a3e586a;
    --text: rgba(0, 0, 0, 0.8);
}
html {
    background-image: url("../img/texture_tiles_wood.jpg");
    background-size: 50%;
}
body {
    margin: 30px auto 90px;

    width: 800px;
    height: 930px;

    background-image: url("../img/notebook_spiralbound.png");
    background-position: 50% 0px;
    background-size: auto 930px;
    background-repeat: no-repeat;
}

/* Global styling */
* {
    box-sizing: border-box;
}
h1, p {
    color: var(--text);
}

/* Utility/effect classes */
.centertext {
    text-align: center;
}
.dropShadow {
    filter: drop-shadow(-3px 2px 2px var(--shadow));
}
.spacer10 {
    height: 10px;
}
.centerblock {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.scrollFadeMask {
    overflow: scroll;
    mask-image: linear-gradient(to bottom,
        transparent .5em,
        red 1em calc(100% - 1em),
        transparent calc(100% - .5em));
}

/* General classes */
ul.noBullets {
    list-style-type: none;
    padding: 0;
}
img.bgImg {
    position: absolute;
}

/* Header bar */
header {
    position: relative;
    top: 100px;
    left: 10px;
    float: right;

    padding: 20px;

    width: 220px;
    
    background-color: #efefef;
    transform: rotate(-1deg);
    z-index: 2;
}
header > img {
    position: absolute;
    top: -25px;
    left: 25px;
    width: 160px;
}
header h1.headerTitle {
    text-align: center;
    margin: 20px 0 0;

    font-family: 'Georgiaz';
    font-size: 36px;
}
header p,
header ul {
    margin: 10px auto;

    font-family: 'Dot Gothic 16';
    font-size: 15px;
    line-height: 1.2;
}
header li {
    line-height: 1.4;
}
header li:hover::after,
header li:focus::after {
    content: "<";
}
header li.active::after {
    content: "<<"
}
header a {
    color: var(--text);
}
header hr {
    margin: 0;

    border: none;
    border-top: 1px dashed var(--text);
}
header p.barcode {
    font-family: 'Libre Barcode 39';
    font-size: 23px;
}

.menuButton {
    display: none;
}

/* Main */
main {
    margin-left: 70px;
    padding-top: 10px;
    
    transform: rotate(4deg);
}
main > h1 {
    margin: -10px 0 -20px;

    text-align: center;
    font-family: 'Caveat Brush';
    font-size: 60px;
    color: #a3544d;
}
main img.coffeeStain1 {
    top: 130px;

    width: 400px;

    z-index: -1;
}
main img.coffeeStain2 {
    top: 195px;
    left: 295px;

    width: 400px;
    
    z-index: -1;
}
main img.mainStroke1 {
    left: 10px;
    top: 30px;

    width: 660px;
    
    transform: rotate(-4deg);
}
main img.mainLogo {
    margin-top: 10px;

    width: 240px;
    
    transform: rotate(4deg);
}
main img.fruitStickerJuicy {
    top: 90px;
    left: 50px;

    width: 73px;
    
    transform: rotate(-30deg);
}
main img.fruitStickerBitter {
    top: 42px;
    left: 370px;

    width: 70px;
    
    transform: rotate(-10deg);
}
main img.fruitStickerSummerina {
    top: 165px;
    left: 390px;

    width: 70px;
}
main img.sectionTape {
    position: absolute;
    top: 330px;
    left: 150px;
    width: 220px;
    transform: rotate(-5deg);
    z-index: 1;
}
main img.postageLavendar {
    top: 758px;
    right: 60px;
    width: 103px;
    transform: rotate(-12deg);
}
main img.postageApple {
    top: 700px;
    right: 0px;
    width: 97px;
    transform: rotate(2deg);
}
/* Main section content */
main .sectionContainer {
    position: absolute;
    left: 75px;
    top: 350px;
    padding: 15px 50px 15px 30px;
    
    width: 450px;
    aspect-ratio: 0.71;

    background-image: url("../img/paper_main.png");
    background-position: 50% 0px;
    background-size: contain;
    background-repeat: no-repeat;
    transform: rotate(-5deg);
}
main section {
    width: 100%;
    height: 100%;
}
main section h2 {
    margin: 0.7em 0 0;

    font-size: 2.3em;

    font-family: 'Gochi Hand';
    text-align: center;
}
main section h3 {
    margin: 0.8em 0 0;

    font-size: 1.5em;

    font-family: 'Gochi Hand';
}
main section p,
main section ul,
main section ol {
    font-size: 0.95em;

    font-family: 'Courier Prime';
    color: var(--text);
}
main section a {
    color: #3c7127;
}
main section a:hover {
    color: #4ca22a;
}
main section img.imgPlain {
    width: 100%;
}
main section code {
    color: #463316dd;
    background-color: #ad895235;
}
main section a code {
    color: #637127dc;
}
main section a code:hover {
    color: #93a83adc;
}
main section .small {
    font-size: small;
}
main section .underline {
    text-decoration: underline;
}
main section hr {
    border-top: 1.5px solid var(--text);
    border-bottom: none;
}

@media (max-width: 835px) {
    /* Base layout */
    html {
        background-image: none;
    }
    body {
        position: relative;
        margin: 0;
        margin-top: 30px;

        width: 100%;
        height: auto;

        background-image: url("../img/notebook_spiralbound_mobile.jpg");
        background-size: 120%;
        background-repeat: repeat;
        filter: none !important;
        
        font-size: small;
    }
    html, body {
        max-width: 100vw;
        overflow-x: clip;
    }
    
    /* Header */
    header {
        position: fixed;
        top: -563px;
        left: 0;
        float: none;
        padding-bottom: 10px;
        
        transition: top 0.25s;
    }
    header > img {
        display: none;
    }
    header p.barcode {
        margin-bottom: -10px;
    }
    
    /* Nav menu (header) button */
    /* Y'all I am abusing the hell out of transforms */
    .menuButton {
        display: inline-block;
        white-space: nowrap;

        cursor: pointer;
    }
    .menuButton span {
        display: inline-block;
    }
    .menuButton span.menuLogo {
        font-size: x-large;
        font-family: 'Georgiaz';

        transform: translateY(0.1em);
    }
    .menuButton span.menuCollapse {
        display: none;

        font-size: large;
        font-family: 'Gochi Hand';
    }
    .menuButton img {
        width: 2em;
        transform: translate(-20%, 30%);
    }
    .menuButton input {
        appearance: none;
        margin-right: -0.5em;
    }
    /* Collapse behavior */
    html:has(.menuButton input:checked) header {
        top: -2px;

        transition: top 0.25s;
    }
    .menuButton:has(input:checked) {
        animation: menuButtonTransition 0.5s forwards;
    }
    .menuButton:has(input:checked) img {
        background: #ccf2bd;
    }
    .menuButton:has(input:checked) span.menuLogo {
        display: none;
    }
    .menuButton:has(input:checked) span.menuCollapse {
        display: inline-block;
    }
    @keyframes menuButtonTransition {
        0% {
            opacity: 0;
            transform: translate(0px, 0px);
        }
        50% {
            opacity: 0;
            transform: translate(5px, -561px);
        }
        100% {
            opacity: 1;
            transform: translate(5px, -561px);
        }
    }
    .shroud {
        position: fixed;
        top: 0;
        left: 0;

        width: 100vw;
        height: 100vh;

        opacity: 0;
        background-color: #22351b;
        z-index: 1;
        pointer-events: none;

        transition: opacity 0.25s;
    }
    html:has(.menuButton input:checked) .shroud {
        opacity: 0.5;

        transition: opacity 0.25s;
    }
    
    /* Main */
    main {
        margin-left: 0;
        padding-bottom: 10px;

        transform: none;
    }
    main > h1 {
        transform: translateX(-5px) rotate(4deg);
    }
    main img.postageLavendar,
    main img.postageApple {
        display: none;
    }
    main img.coffeeStain1 {
        top: 110px;
        left: 50%;

        transform: translateX(-260px);
    }
    main img.coffeeStain2 {
        top: 190px;
        left: 50%;

        transform: translateX(32px);
    }
    main img.mainStroke1 {
        left: 50%;

        transform: translateX(-50%);
    }
    main img.mainLogo {
        margin-top: 0;

        transform: translateX(5px) rotate(8deg);
    }
    main img.fruitStickerJuicy {
        top: 70px;
        left: 50%;

        transform: translateX(-180px) rotate(-26deg);
    }
    main img.fruitStickerBitter {
        left: 50%;

        transform: translateX(100px) rotate(-6deg);
    }
    main img.fruitStickerSummerina {
        left: 50%;

        transform: translateX(110px);
    }
    main img.sectionTape {
        top: 320px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Main content section */
    main .sectionContainer {
        left: 2%;
        top: 340px;
        padding-left: 4%;
        padding-right: 9%;

        width: 97%;
        aspect-ratio: auto;

        background-image: url("../img/paper_main_mobile.png");
        background-size: 100% auto;
        background-repeat: repeat-y;
        transform: none;
    }
}