:root {
	--base: #f0f0f0;

	--header: #d70909;
	--header-dark: #ba0a1b;
	/*
	--header: #ba0a1b;
	--header-dark: #a9282a;
	*/
    --header-transparent: #ba0a1be6;

	--cool: #2877A8;
	--earthy: #533030;
	--dark: #262E33;

	--slope-size: 6vw;
	--anim-time: 0.4s;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--base);

    font-family: 'work-sans', sans-serif;
    font-size: 16px;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    padding: 0 32px;
}

:is(h1, h2, h3, h4, h5, h6) {
    font-family: 'neue-haas-grotesk-display', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;

    margin: 0;
    line-height: 1;
}

h1 {
    font-size: 40px;
}

h2 {
    font-size: 30px;
}

hr {
    border: 2px solid black;
    margin-top: 0;
}

main p a:link:not([class]) {
    color: var(--header);
    transition: color 0.2s linear, background-color 0.2s linear;
}

main p a:hover:not([class]) {
    background-color: var(--header);
    color: white;
}


/* === FORMATTING === */
.flex-row {
    display: flex;
    flex-flow: row wrap;
    column-gap: 48px;
    row-gap: 32px;
    justify-content: center;
}

@media (min-width: 767px) {
	.textbox {
		max-width: 600px;
		min-width: 400px;
		flex: 1;
	}
}

img.portrait {
    float: left;
    width: 180px;
    height: 240px;
    margin: 16px 16px 16px 0;
}

.title {
    display: flex;
    flex-flow: nowrap;
    width: 100%;
}

.title :is(h1, h2, h3, h4, h5, h6) {
    flex: 1;
}

.title a {
    align-self: flex-end;
    margin-bottom: 4px;

    color: white;
    background-color: black;
    font-weight: bold;
    text-decoration: none;
    padding: 4px 10px;

    transition: background-color 0.2s ease-out, color 0.2s ease-out;
}

.title a:hover {
    background-color: var(--header);
    color: white;
}

.strikethrough-title {
    display: flex;
    flex-flow: row nowrap;
    width: 100%;
}

.strikethrough-title > *:first-child {
    border-left: 6px solid black;
    padding-left: 8px;
}

.strikethrough-title .line {
    height: 0;
    flex-grow: 1;
    border: 3px solid black;
    align-self: center;
    margin-left: 8px;
}

h1.primary-title {
    font-size: 50px;
	font-weight: 900;
    text-align: center;

    margin: 16px 0 48px;
}

a.link-box {
    display: inline-block;

    color: var(--header);
    border: 3px solid var(--header);
    padding: 8px 12px;

    font-size: 18px;
    text-transform: uppercase;
    font-weight: bold;
    text-decoration: none;

    transition: color 0.3s ease-out, background-color 0.3s ease-out;
}

a.link-box:hover {
    color: white;
    background-color: var(--header);
}

a.link-box p {
    margin: 0;
    line-height: 1;
}

a.link-box.flex-row {
    display: inline-flex;
    flex-grow: 0;
    flex-wrap: nowrap;
    column-gap: 12px;

    margin: 0 auto;
}

a.link-box.flex-row h2:last-child {
    align-self: center;
}

.red-panel {
    color: var(--header);
    border: 3px solid var(--header);

    padding: 16px;
}

.red-panel hr {
    border-color: var(--header);
}


/* === FORMS === */
input {
    background-color: transparent;
    color: black;
    border: 2px solid black;

    font-size: 18px;
}

input:-webkit-autofill {
    -webkit-box-shadow:0 0 0 50px white inset;
}

input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 50px white inset;
}

form .flex-row {
    column-gap: 16px;
    row-gap: 12px;
    margin-bottom: 12px;
}

form .flex-row input {
    flex: 1;
}

.red-panel input {
    background: transparent;
    color: var(--header);
    border-color: var(--header);
    
    padding: 4px 8px;
}

.red-panel input[type="submit"] {
    background-color: transparent;
    color: var(--header);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 3px;
    padding: 8px 0;

    cursor: pointer;
    transition: color var(--anim-time) ease-out, background-color var(--anim-time) ease-out;
}

.red-panel input[type="submit"]:hover {
    background-color: var(--header);
    color: white;
}


/* === HEADER MENU === */
header {
    position: fixed;
    width: 100%;
    z-index: 100;
    padding-top: 10px;

    display: flex;
    flex-flow: row wrap;
    justify-content: flex-end;
    align-items: center;
    column-gap: 15px;

    font-family: "work-sans", sans-serif;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;

    transition: padding 0.2s linear, transform 0.2s linear;
	transform: scale(1.1);
	transform-origin: top right;
}

@media (min-width: 767px) {
    header.scrolled {
        background-color: var(--header);
        background-image: linear-gradient(30deg, var(--header-dark), var(--header), var(--header-dark));
        filter: drop-shadow(0 0 0.65ren var(--earthy));
        padding-top: 5px;
        padding-bottom: 5px;

		transform: scale(1);
    }
}

#top-links, #top-buttons {
    display: flex;
    flex-flow: row wrap;
    column-gap: 5px;
}

#top-links {
    column-gap: 15px;
}

#top-buttons {
    margin-right: 15px;
}

header a {
    color: white;
    text-decoration: none;
}

#top-links a:hover {
    text-decoration: underline;
}

#top-buttons a {
    border: 2px solid white;
    width: 120px;
    padding: 10px;
    text-align: center;
    transition: background-color 0.4s ease-out;
}

#top-buttons a:hover {
    background-color: white;
    color: var(--header);
}

#hamburger {
    display: none;
}

@media (max-width: 766px) {
    header.scrolled:not(.active) {
        background-color: var(--header);
        background-image: linear-gradient(30deg, var(--header-dark), var(--header), var(--header-dark));
        filter: drop-shadow(0 0 0.65ren var(--earthy));
        padding-top: 5px;
        padding-bottom: 5px;
    }
    
    #top-links {
        display: none;
        order: 2;
    }

    #top-buttons {
        display: none;
        order: 3;
    }

    #hamburger {
        display: flex;
        flex-flow: row nowrap;
        column-gap: 5px;
        align-items: center;
        align-self: flex-end;

        color: white;
        margin-right: 24px;
        border: 2px solid white;
        padding: 6px 10px;
        cursor: pointer;

        font-weight: bold;
        font-size: 18px;

        order: 1;
    }

    #hamburger:hover {
        background-color: white;
        color: var(--header);
    }

    #hamburger p {
        margin: 0;
        line-height: 1;
    }

    #hamburger > p:last-child {
        font-size: 26px;
    }

    header {
        transition: background-color 0.2s linear;
    }

    header.active {
        height: 100%;
        background-color: var(--header-transparent);

        flex-flow: column nowrap;
        justify-content: flex-start;
        align-items: center;
        row-gap: 12px;
    }

    header.active #top-links, header.active #top-buttons {
        display: flex;
        flex-flow: column nowrap;
        width: 90%;
        max-width: 400px;
        margin: 0;
        padding: 0;
        row-gap: 12px;

        font-size: 24px;
        text-align: center;
    }

    header.active #top-links a, header.active #top-buttons a {
        width: 100%;
        padding: 8px;
        border: 2px solid white;
        transition: color var(--anim-time) ease-out, background-color var(--anim-time) ease-out;
    }

    header.active #top-links a:hover {
        color: var(--header);
        background-color: white;
        text-decoration: none;
    }
}

/* === PAGE HERO === */
#hero {
    width: 100%;
    height: calc(250px + var(--slope-size));
    clip-path: polygon(
        0 0,
        100% 0,
        100% calc(100% - var(--slope-size)),
        0 100%
    );
    overflow: hidden;
    margin-bottom: 16px;

    background-color: var(--header);
    background-image: linear-gradient(30deg, var(--header-dark), var(--header), var(--header-dark));
    color: white;

    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    flex-shrink: 0;
}

#hero a {
    display: block;
    text-decoration: none;
    color: white;
    width: 482px;

    margin-left: calc(20px + 4vw);
    margin-bottom: calc(10px + 3vw);
}

#hero img {
    width: 482px;
    height: 174px;
}

#hero p {
    font-size: 20px;
    font-variant: small-caps;
    text-indent: 2px;
    letter-spacing: 4px;

    margin: 0;
    line-height: 1;
    width: 482px;
}

#hero h2 {
    font-family: "neue-haas-grotesk-text", sans-serif; 
    font-size: 26px;
    font-style: italic;
    letter-spacing: 1px;
    text-transform: none;
    font-variant: small-caps;

    margin: 0;
    line-height: 1;
    width: 482px;
}

@media (max-width: 766px) {
    #hero {
        align-items: center;
    }

    #hero a {
        width: 380px;
        margin-left: 0;
    }

    #hero img {
        width: 362px;
        height: 130px;
    }

    #hero p {
        font-size: 16px;
    }

    #hero h2 {
        font-size: 20px;
    }
}


/* === FOOTER === */
footer {
    min-height: 10em;
    padding: 0.5em 16px 0;
    margin-top: 48px;

    text-align: center;

    color: white;
    background-color: var(--header);
    background-image: linear-gradient(-30deg, var(--header-dark), var(--header), var(--header-dark));
}

footer a:link {
    color: white;
}


/* === BROWSER RULES === */
