/* Let it be known: I'm not a frontend dev. */

html, body {
  width:  100%;
  height: 100%;
  margin: 0;
}

body {
    font-family: 'Oswald', sans-serif;
    margin: 0;
    width: 100%;
    height: 100%;
    font-size: 1.2em;
    color: #222;
    background-color: #fdf7ee;
    text-shadow: 1px 1px 2px rgba(150, 150, 150, 1);
    background-image: url("/static/splash.jpg");
    background-attachment: fixed;
    background-size: cover;
}

canvas#bgCanvas {
    image-rendering: pixelated;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -999;
    width: 100%;
    height: 100%;
}

.page-content {
    display: flex;
    flex-direction: row;
    padding: 10% 20px 20px 5%;
}

.logo {
    flex: 0.5 1 0;
    margin-right: 60px;
    display: flex;
    flex-direction: column;
    justify-content: end;
}

.right {
    flex: 1 1 0;
}

h1 {
    font-size: 3.5em;
    margin: 0;
    font-weight: 500;
}

h2 {
    font-size: 1.75em;
    margin: 0;
    font-weight: 100;
    white-space: nowrap;
}

h3 {
    font-size: 1.25em;
    margin: 0;
    font-weight: 400;
    white-space: nowrap;
}

img {
    max-width: 100%;
}

.logo img {
    width: 220pt;
    transform: translate(0, -10%);
    margin-left: auto;
}

.buttons {
    margin-top: 30pt;
}

.buttons table {
    border-spacing: 10px;
    border-collapse: separate;
    width: auto;
}

.btn {
    width: 150px;
    text-align: right;
    padding: 5px 10px 5px 10px;
    background-color: #efefef;
    border: 1px solid #b3b3b3;
    border-radius: 4px;
    box-sizing: border-box;
    text-shadow: none;
    position: relative;
    font-family: 'VT323', monospace;
    font-size: 1.5em;
}

b {
    font-weight: 300;
}

.btn img {
    position: relative;
    float: left;
    margin-top: 4px;
    height: 22px;
}

.desc {
    font-weight: 200;
}

.buttons a {
    display: block;
    width: 100%;
    text-decoration: inherit;
}

a {
    color: inherit;
}

.promo {
    width: 100%;
    margin-left: auto;
    margin-right: 60pt;
    margin-top: 30pt;
}

.disclaimer {
    margin-top: 20pt;
    font-size: 0.6em;
    font-weight: 100;
    letter-spacing: 1px;
}

.video-container {
    position: relative;
    overflow: hidden;
    height: 0;
    padding-top: 56.25%;
}

.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.nowrap {
    white-space: nowrap;
}

.desktop {
    display: block;
}
.mobile {
    display: none;
}

.slide-in {
    overflow: hidden;
}
.slide-in > span {
    display: inline-block;
    animation: 0.75s slide-up;
    margin-top:0;
}

@keyframes slide-up {
    from {
        opacity: 0;
        margin-top: 10%;
        height: 110%;
    }
    to {
        opacity: 100%;
        margin-top: 0;
        height: 100%;
    }
}

@media only screen and (max-width: 1200px) {
    h2 {
        white-space: normal;
        height: auto;
    }
    h2.slide-in > span {
        animation: none;
    }
}

@media only screen and (max-width: 780px) {
    .desktop {
        display: none;
    }
    .mobile {
        display: block;
    }
    .page-content {
        flex-direction: column;
        margin: 30pt 0;
    }
    .logo {
        flex-direction: column-reverse;
        margin-right: 0;
    }
    .logo img {
        margin-left: 0;
        width: 120px;
        max-width: 80%;
        margin-top: 40px;
    }
    .promo {
        margin-left: auto;
        margin-right: auto;
        margin-top: 40pt;
        max-width: 640px;
    }
    h1 {
        font-size: 2.5em;
    }
    h2 {
        font-size: 1.5em;
    }
}

/* CONTENT PAGES */

.content-box {
    margin: 20pt auto auto;
    max-width: 100%;
    width: 1000px;
    padding: 20pt;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 15px;
}

.content-box p {
    text-shadow: none;
    font-weight: 300;
}

.content-box .pre {
    font-family: monospace;
}

.content-box p b {
    font-weight: normal;
}

.content-box p img {
    max-width: 100%;
}

.content-box h1 {
    margin-bottom: 20pt;
}

.content-box h2 {
    margin-bottom: 10pt;
}

.content-box h3 {
    margin-bottom: 5pt;
}

.content-box .centered {
    text-align: center
}

@media only screen and (max-width: 1200px) {
    .content-box {
        width: auto;
        max-width: 100%;
    }
}

/* END CONTENT PAGES */

/* FORM */
.red {
    color: red;
}

label {
    display: block;
    margin-top: 20px;
}

input, textarea, select, button {
    display: block;
    font-size: 1.1em;
    width: 500px;
    max-width: 90%;
}

input[type=checkbox] {
  display: inline;
  width: unset;
}

textarea {
    height: 150px;
}

button {
    margin-top: 30px;
}

.success {
    color: green;
}

form em {
    font-weight: lighter;
}

/* GALLERY */
.hack-details {
    font-weight: lighter;
}

.author {
    display: inline-block;
}

.hack-details dl {
    display: inline-block;
    margin-left: 100px;
}

.hack-details dt {
    font-weight: normal;
    display: inline-block;
    margin-left: 20px;
}

.hack-details dd {
    display: inline-block;
}

.gallery {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    justify-content: space-between;
    align-content: start;
    align-items: center;
}

.gallery > * {
    position: relative;
    flex-basis: calc(100% / 3);
    float: left;
    margin: 0.5em;
}

.gallery.two-items > * {
    flex-basis: calc(100% / 2);
}

.gallery img {
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.gallery .screenshot {
    overflow: hidden;
    height: 0;
    padding-top: 75%;
}

.links {
    display: flex;
}

.links div {
    margin: 0.5em;
}

thead tr td {
    border-bottom: 1px solid #222;
}

tbody tr td {
    font-weight: 200;
}

.hack-listing h3 {
    white-space: normal;
}

.hack-listing .hack-list {
    display: flex;
    flex-direction: column;
    gap: 100px;
}

.hack-listing .hack-content {
    display: flex;
    gap: 30px;
    flex-basis: 100%;
}

.hack-listing h2 {
    margin-top: 150px;
}

.hack-listing .hack-content dt {
    display: inline;
    font-weight: 300;
}

.hack-listing .hack-content dd {
    display: inline;
}

.hack-listing .hack-content .vote-now {
    margin-top: 20px;
}

.hack-listing .hack-content .description {
    flex-basis: 100%;
}

.hack-listing.jam-details .hack-content .description {
    flex-basis: 70%;
}

.hack-listing.jam-details .hack-content .judgement {
    flex-basis: 30%;
}

.hack-content .featured {
    font-weight: 300;
    font-style: italic;
    background: rgba(0,0,0,0.1);
    padding: 10px;
    border-radius: 10px;
    max-width: 500px;
}

.hack-content .featured.feat-none {
    margin-left: 0px;
}

.hack-content .featured.feat-bronze:before, .hack-content .featured.feat-silver:before, .hack-content .featured.feat-golden:before {
    content: "";
    background-size: cover;
    width: 50px;
    height: 66px;
    margin-right: 15px;
    display: inline-block;
    vertical-align: middle;
}

.hack-content .featured.feat-bronze:before {
    background-image: url('/static/images/bronze.png');
}

.hack-content .featured.feat-silver:before {
    background-image: url('/static/images/silver.png');
}

.hack-content .featured.feat-golden:before {
    background-image: url('/static/images/golden.png');
}

.hack-content .featured span {
    display: inline-block;
}

.hack-listing .hack-list.mode-compact {
    gap: 0;
}

.hack-listing .hack-list.mode-compact > * {
    border-top: 1px solid #999;
    padding-top: 20px;
    padding-bottom: 20px;
}

.hack-listing .hack-list.mode-compact > *:first-of-type {
    border-top: none;
}

.hack-listing .hack-list.mode-compact .hack-content .description .metadata {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.hack-listing .hack-list.mode-compact .hack-content .description .metadata h3 {
    flex: 1 0 20%;
}

.hack-listing .hack-list.mode-compact .hack-content .description .metadata .author {
    flex: 1 0 20%;
}

.hack-listing .hack-list.mode-compact .hack-content .description dl {
    flex: 0 1 40%;
    margin: 0;
}

.hack-listing .hack-list.mode-compact .hack-content .description .description-text,
.hack-listing .hack-list.mode-compact .hack-content .description .links {
    display: none;
}

.hack-listing .hack-list.mode-compact .hack-content .description .inner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hack-listing .hack-list.mode-compact .hack-content .description .inner-content .featured {
    order: 999;
}

.hack-listing .hack-list.mode-compact .hack-content .description .gallery {
    justify-content: normal;
    display: block;
}

.hack-listing .hack-list.mode-compact .hack-content .description .gallery > * {
    width: 256px;
    float: none;
    display: inline-block;
}

.toolbar {
    margin-bottom: 100px;
}

.toolbar form {
    display: flex;
    flex-wrap: wrap;
}

.toolbar input, .toolbar select {
    width: 250px;
    border: 1px solid #bbb;
    border-radius: 5px;
    background: white;
    height: 30px;
    padding: 1px 2px;
    box-sizing: content-box;
}

.awards {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
    padding-left: 10px;
    padding-bottom: 10px;
}

.awards ul {
    list-style: none;
    text-transform: uppercase;
    vertical-align: middle;
}

.awards ul .golden img {
    height: 100px;
    vertical-align: middle;
    padding-right: 10px;
}
.awards ul .golden li {
    font-size: 3em;
}

.awards ul .silver img {
    height: 75px;
    vertical-align: middle;
    padding-right: 10px;
}
.awards ul .silver li {
    font-size: 2em;
}

.awards ul .bronze img {
    height: 50px;
    vertical-align: middle;
    padding-right: 10px;
}
.awards ul .bronze li {
    font-size: 1.5em;
}
figure {
    font-style: italic;
    font-weight: normal;
    margin: 45px 0 0;
}
figure blockquote {
    margin: 0;
}
figure figcaption {
    margin-left: 20px;
}
figure figcaption:before {
    display: inline-block;
    content: '- ';
}

.foot {
    padding: 30px;
    text-align: center;
}

.link-list {
    margin: 0;
    padding: 0;
}

.link-list li {
    display: inline-block;
    font-size: 0.6em;
}

.link-list li:after {
    content: ' | ';
    font-weight: 100;
}

.link-list li:last-of-type:after {
    display: none;
}

.sm {
    font-size: 0.8em;
}

@media only screen and (max-width: 1200px) {
    .author {
        display: block;
    }
    .hack-listing .hack-content .description {
        flex-basis: 100%;
    }

    .hack-listing .hack-content .judgement {
        flex-basis: 100%;
    }
    .hack-details dl, .hack-details dt, .hack-details dd  {
        display: block;
        margin: 0;
    }
    .hack-listing .hack-content {
        flex-wrap: wrap;
        gap: 0;
    }
    .links {
        flex-wrap: wrap;
    }
    .gallery {
        flex-wrap: wrap;
    }
    .gallery > * {
        width: auto;
        flex-basis: 100% !important;
    }

    .hack-content .featured {
        font-size: 0.8em;
    }

    .hack-content .featured.feat-bronze:before, .hack-content .featured.feat-silver:before, .hack-content .featured.feat-golden:before {
        margin: auto;
        display: block;
    }

    .hack-listing .hack-list.mode-compact > *:first-of-type {
        border-top: none;
    }

    .hack-listing .hack-list.mode-compact .hack-content .description .metadata {
        flex-direction: column;
    }

    .hack-listing .hack-list.mode-compact .hack-content .description dl {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hack-listing .hack-list.mode-compact .hack-content .description .inner-content {
        flex-direction: column;
        margin-top: 10px;
    }

    .hack-listing .hack-list.mode-compact .hack-content .description .inner-content .featured {
        order: -1;
    }

    .hack-listing .hack-list.mode-compact .hack-content .description .gallery {
        display: flex;
        width: 100%;
        flex-wrap: nowrap;
        justify-content: center;
    }

    .hack-listing .hack-list.mode-compact .hack-content .description .gallery > * {
        width: auto;
        flex-basis: 50% !important;
        flex-grow: 0;
    }

    .hide-mobile {
        display: none;
    }

}
