/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
}

main {
    display: block;
}

h1 {
    font-size: 2em;
    margin: 0.67em 0;
}

hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
}

pre {
    font-family: monospace, monospace;
    font-size: 1em;
}

a {
    background-color: transparent;
}

abbr[title] {
    border-bottom: none;
    text-decoration: underline;
    text-decoration: underline dotted;
}

b,
strong {
    font-weight: bolder;
}

code,
kbd,
samp {
    font-family: monospace, monospace;
    font-size: 1em;
}

small {
    font-size: 80%;
}

sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.5em;
}

img {
    border-style: none;
}

button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

button,
input {
    overflow: visible;
}

button,
select {
    text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
    outline: 1px dotted ButtonText;
}

fieldset {
    padding: 0.35em 0.75em 0.625em;
}

legend {
    box-sizing: border-box;
    color: inherit;
    display: table;
    max-width: 100%;
    padding: 0;
    white-space: normal;
}

progress {
    vertical-align: baseline;
}

textarea {
    overflow: auto;
}

[type="checkbox"],
[type="radio"] {
    box-sizing: border-box;
    padding: 0;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
    height: auto;
}

[type="search"] {
    -webkit-appearance: textfield;
    outline-offset: -2px;
}

[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
}

::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
}

details {
    display: block;
}

summary {
    display: list-item;
}

template {
    display: none;
}

[hidden] {
    display: none;
}

/* ========================================================================
   Custom Styles
   ======================================================================== */

:root {
    --border-color: #333;
    --page-bg-color: #f0f0f0;
    --body-bg-color: #d9d9d9;
    --text-color: #333;
    --link-color: #007043;
    --swag-item-bg: #ddd;
    --swag-item-hover-bg: #d1d1d1;
    --hr-color: #ccc;
    --diamond-offset: 2rem;
}

/* Use borderbox sizing for everything */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: var(--body-bg-color);
    color: var(--text-color);
    font-family: 'Merriweather Sans', sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.5;
}

img {
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

a {
    color: var(--link-color);
    text-decoration: underline;
}


h1,
h2,
h3 {
    font-family: 'Merriweather', serif;
}

/* ========================================================================
   Layout
   ======================================================================== */

main {
    max-width: 1280px;
    margin: 0 auto;
    background-color: var(--page-bg-color);
    position: relative;
    z-index: 0;
}

.background-wrap {
    max-width: 980px;
    margin: 0 auto;
    background-color: var(--page-bg-color);

}

.content-wrap {
    max-width: 900px;
    margin: 0 auto;
}

.content-wrap::before {
    content: "";
    display: block;
    background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAKCAYAAAB10jRKAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAmSURBVHgBbco5AQAwCAPAtDiJlvgC53wzNx8k5Uczkg+XLjHF9xV3UgQHI3L7rwAAAABJRU5ErkJggg==");
    width: 1px;
    position: absolute;
    left: 187px;
    top: 0;
    bottom: 0;

}

.content {
    margin-left: var(--diamond-offset);
    background-color: var(--page-bg-color);
    margin-top: 1rem;
}

/* ========================================================================
   Typography
   ======================================================================== */

h1 {
    font-size: 4rem;
}

h2 {
    font-size: 2.5rem;
    margin: 1rem 0 1.8rem;
}

h3 {
    font-size: 1.25rem;
    margin: .8rem 0;
}

p {
    margin: 1rem 0;
}


/* ========================================================================
   Diamond markers
   ======================================================================== */

.intro h1::before,
.game h2::before,
.game h3::before {
    content: "";
    position: absolute;
    right: 0;
    border: 1px solid var(--border-color);
    background: var(--page-bg-color);
    transform: translateY(-50%) rotateZ(45deg);
    top: 50%;
}

.intro h1::before,
.game h2::before {
    left: calc((var(--diamond-offset) + 10px) * -1);
    height: 15px;
    width: 15px;
}

.game h2,
.game h3 {
    position: relative;
}

.game h3::before {
    left: calc((var(--diamond-offset) + 8px) * -1);
    height: 11px;
    width: 11px;
}

/* ========================================================================
   Intro Section
   ======================================================================== */
.intro h1 {
    font-size: 3.8rem;
    font-weight: normal;
    margin: 0;
    position: relative;
    padding-top: 1rem;
}

.intro {
    margin-top: 0;
    padding: 1rem 0;
    max-width: 45rem;

}

.intro p {
    line-height: 1.5;
    font-size: 1.25rem;
    font-weight: 100;
}

/* ========================================================================
   Game Sections
   ======================================================================== */

.game {
    padding: 2.5rem 0;
}

.game:first-of-type {
    padding-top: 1rem;
}

/* Game background image */
.game::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    margin: 0 auto;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: -1;
    width: 100%;
    min-height: 700px;
    max-width: 1280px;
}

/* TODO: Overwrite background-images in img/ with the real image for each game  */

.last-call-bbs::before {
    background-image: linear-gradient(to top, var(--page-bg-color) 20%, transparent), url('img/last-call-bbs-bg-page.png');
}


.exapunks::before {
    background-image: linear-gradient(to top, var(--page-bg-color) 20%, transparent), url('img/exapunks-bg-page.png');
}

.opus-magnum::before {
    background-image: linear-gradient(to top, var(--page-bg-color) 20%, transparent), url('img/opus-magnum-bg-page.png');
}

.shenzhen-io::before {
    background-image: linear-gradient(to top, var(--page-bg-color) 20%, transparent), url('img/shenzhen-io-bg-page.png');
}

.infinifactory::before {
    background-image: linear-gradient(to top, var(--page-bg-color) 20%, transparent), url('img/infinifactory-bg-page.png');
}

.ironclad-tactics::before {
    background-image: linear-gradient(to top, var(--page-bg-color) 20%, transparent), url('img/ironclad-tactics-bg-page.png');
}

.spacechem::before {
    background-image: linear-gradient(to top, var(--page-bg-color) 20%, transparent), url('img/spacechem-bg-page.png');
}


.game.short::before {
    min-height: 300px;
}


/* ========================================================================
   Swag Grid
   ======================================================================== */

.swag-grid {
    display: grid;
    grid-gap: 1rem;
    grid-template-columns: repeat(4, 1fr);
    padding-bottom: 1rem;
}

.swag-item {
    background: var(--swag-item-bg);
    padding: 0.8rem;
    transition: background-color 500ms;
}

.swag-item:hover {
    background-color: var(--swag-item-hover-bg);
}

.swag-item a {
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.swag-item-title {
    font-size: 0.85rem;
    margin-top: 0.5rem;
}


hr {
    border: 0;
    border-bottom: 1px dashed var(--hr-color);
    margin: 2rem 0;
}

.footer {
    text-align: center;
    font-size: 0.75rem;
    padding: 2rem 0 1rem;
}

/* ========================================================================
   Responsive Design
   ======================================================================== */

@media screen and (max-width: 1280px) {
    main {
        max-width: unset;
    }

    .background-wrap {
        max-width: unset;
    }

    .content-wrap {
        max-width: unset;
    }

    /* Remove dashed line */
    .content-wrap::before {
        display: none;
    }

    /* Remove diamond bullets */
    .intro h1::before,
    .game h2::before,
    .game h3::before {
        display: none;
    }

    .intro {
        padding: 0;
    }

    .content {
        /* Reset margins when the dashed vertical border is hidden */
        margin: 0 1rem;
    }

    /* Hide game background on smaller screens */
    .game::before {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    .intro {
        padding-top: 1rem;
    }

    .intro h1 {

        line-height: 1;
    }

    .swag-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .swag-item {
        margin: 1rem 0;
    }

    .game {
        padding: 1rem 0;
    }

}