/* Bite the Chili Productions
   Visual system layered on Bootstrap 3. */

:root {
    --ink: #f4f0ea;
    --muted: #b7b1a8;
    --faint: #8a847c;
    --bg: #0e0e0e;
    --bg-raised: #161616;
    --bg-sunken: #0a0a0a;
    --line: #2c2c2c;
    --line-strong: #3a3a3a;
    --red: #c1121f;
    --red-bright: #e02332;
    --link: #ffb1a8;
    --header-offset: 132px;
    --font-display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
    --font-body: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body.site {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

body.site h1,
body.site h2,
body.site h3,
body.site h4 {
    color: var(--ink);
    font-weight: 700;
}

body.site h1 {
    margin: 0 0 0.35em;
    font-family: var(--font-display);
    font-size: 46px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 0.98;
    text-transform: uppercase;
}

body.site h1 small,
body.site h1 .small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.45;
    text-transform: none;
}

body.site h1:has(> small:only-child) {
    margin-top: 0;
    margin-bottom: 0;
    font-size: inherit;
    line-height: inherit;
}

body.site h2 {
    margin: 1.4em 0 0.45em;
    font-family: var(--font-body);
    font-size: 26px;
    letter-spacing: 0;
    line-height: 1.25;
    text-transform: none;
}

body.site h3 {
    margin: 1.2em 0 0.4em;
    font-family: var(--font-body);
    font-size: 20px;
    line-height: 1.3;
    text-transform: none;
}

body.site h4 {
    font-size: 17px;
    line-height: 1.4;
}

body.site p {
    margin: 0 0 1em;
}

body.site a {
    color: var(--link);
    font-weight: 600;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

body.site a:hover,
body.site a:focus {
    color: #fff;
}

body.site img {
    max-width: 100%;
}

body.site hr {
    margin: 1.5em 0;
    border: 0;
    border-top: 1px solid var(--line);
}

body.site ::selection {
    background: var(--red);
    color: #fff;
}

[id] {
    scroll-margin-top: var(--header-offset);
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -48px;
    z-index: 2000;
    padding: 8px 12px;
    background: #fff;
    color: #111;
    font-weight: 700;
}

.skip-link:focus {
    top: 8px;
    color: #111;
}

/* Header --------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #070707;
    border-bottom: 3px solid var(--red);
}

.topbar {
    background: #070707;
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 0;
    padding: 14px 0;
}

.brand {
    --mark-h: 72px;
    display: block;
    width: calc(866 / 232 * var(--mark-h));
    height: var(--mark-h);
    margin-right: auto;
    margin-left: 0;
    overflow: hidden;
    line-height: 0;
    flex: 0 0 auto;
    text-decoration: none;
}

.brand:hover,
.brand:focus {
    text-decoration: none;
}

body.site .brand-wide {
    display: block;
    width: calc(1800 / 232 * var(--mark-h));
    height: calc(280 / 232 * var(--mark-h));
    max-width: none;
    margin-top: calc(-4 / 232 * var(--mark-h));
    margin-left: calc(-460 / 232 * var(--mark-h));
}

.donate-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--red);
    color: #fff !important;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-decoration: none !important;
    text-transform: uppercase;
}

.donate-link:hover,
.donate-link:focus {
    background: var(--red-bright);
    color: #fff !important;
}

.nav-toggle {
    display: none;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 11px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: transparent;
}

.nav-toggle .bar {
    display: block;
    height: 2px;
    background: #fff;
    border-radius: 1px;
}

.site-nav.navbar {
    min-height: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #111;
}

.site-nav .navbar-collapse {
    border: 0;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
}

.site-nav .navbar-nav {
    float: none;
    margin: 0;
}

.site-nav .navbar-nav > li:first-child > a {
    padding-left: 0;
}

.site-nav .navbar-nav > li > a {
    padding: 13px 16px;
    background: transparent;
    color: var(--ink) !important;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.site-nav .navbar-nav > li > a:hover,
.site-nav .navbar-nav > li > a:focus,
.site-nav .navbar-nav > li.open > a {
    background: transparent !important;
    color: #fff !important;
}

.site-nav .navbar-nav > li.active > a {
    background: transparent !important;
    box-shadow: inset 0 -3px 0 var(--red);
    color: #fff !important;
}

.site-nav .caret {
    border-top-color: var(--ink);
    border-bottom-color: var(--ink);
}

.site-nav .dropdown-menu {
    min-width: 280px;
    max-height: 70vh;
    margin-top: 0;
    padding: 6px;
    overflow: auto;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #141414;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.site-nav .dropdown-menu > li > a {
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--ink);
    font-weight: 600;
    white-space: normal;
    text-decoration: none;
}

.site-nav .dropdown-menu > li > a:hover,
.site-nav .dropdown-menu > li > a:focus {
    background: #2a1416;
    color: #fff;
}

.site-nav .dropdown-menu > .active > a,
.site-nav .dropdown-menu > .active > a:hover {
    background: #2a1416;
    color: #fff;
}

@media (min-width: 1040px) {
    .site-nav .navbar-collapse.collapse {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
    }

    .site-nav .navbar-nav {
        display: flex;
        justify-content: flex-start;
        width: 100%;
    }

    .site-nav .navbar-nav > li {
        float: none;
    }
}

@media (max-width: 1039px) {
    .nav-toggle {
        display: inline-flex;
    }

    .brand {
        --mark-h: 48px;
    }

    .site-nav .navbar-collapse.collapse {
        display: none !important;
    }

    .site-nav .navbar-collapse.collapse.in {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
    }

    .site-nav .navbar-nav > li {
        float: none;
    }

    .site-nav .navbar-nav > li > a {
        padding: 12px 4px;
    }

    .site-nav .navbar-nav > li.active > a {
        box-shadow: inset 3px 0 0 var(--red);
    }

    .site-nav .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        max-height: none;
        margin-bottom: 8px;
        box-shadow: none;
    }

    .topbar-inner {
        min-height: 68px;
    }
}

/* Page canvas ---------------------------------------------------------- */

main {
    display: block;
    position: relative;
    z-index: 1;
    padding: 36px 0 72px;
}

main .container > .row {
    margin-bottom: 8px;
}

main .container .row > [class*="col-"] {
    margin-bottom: 18px;
}

main .container > .row:has(> h1):not(:has(> [class*="col-"])) {
    margin-right: 0;
    margin-bottom: 8px;
    margin-left: 0;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

main .container > .row:has(> a > .download-button) {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    column-gap: 10px;
    margin-right: 0;
    margin-left: 0;
}

main .container > .row:has(> a > .download-button)::before,
main .container > .row:has(> a > .download-button)::after {
    display: none;
    content: none;
}

main .container > .row:has(> a > .download-button) > h1 {
    flex: 1 0 100%;
    order: 0;
}

main .container > .row:has(> a > .download-button) > a {
    float: none;
    order: 1;
}

main .container .row > [class*="col-"] > img {
    display: block;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #000;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

/* Catalog -------------------------------------------------------------- */

.catalog-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.catalog-header h1 {
    margin: 0;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--red-bright);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1;
    text-transform: uppercase;
}

.lede {
    max-width: 62ch;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.game-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-raised);
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.game-card:hover,
.game-card:focus {
    border-color: var(--red);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

.game-card-art {
    display: block;
    background: #000;
    line-height: 0;
}

body.site .game-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: contain;
    background: #000;
}

.game-card-caption {
    display: block;
    padding: 14px 16px 16px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

.platform-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}

.platform-jump a {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.platform-jump a:hover,
.platform-jump a:focus {
    border-color: var(--red);
    color: #fff;
}

.platform-block {
    margin: 0 0 42px;
}

.platform-block h2 {
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 32px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.about-panel {
    margin-top: 56px;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-raised);
}

.about-panel h2 {
    margin-top: 0;
    font-family: var(--font-display);
    font-size: 34px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Actions, commerce, tabs --------------------------------------------- */

a > .download-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: auto;
    height: auto;
    min-height: 44px;
    margin: 0 0 10px;
    padding: 8px 16px 8px 10px;
    float: none;
    border: 0;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
}

a:hover > .download-button,
a:focus > .download-button {
    background: var(--red-bright);
    color: #fff;
}

body.site a > .download-button img {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

body.site a > .download-button::before {
    content: "";
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    background: #fff;
    -webkit-mask: center / contain no-repeat;
    mask: center / contain no-repeat;
}

body.site a > .download-button:has(img[src*="buy"])::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 18a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 18zm10 0a2 2 0 1 0 .001 4.001A2 2 0 0 0 17 18zM6.2 6l.8 2H19l-1.5 6.2c-.1.5-.6.8-1.1.8H9.1L7.4 6H6.2zM5 4H2V2h3.2l.7 2H21l-2.4 10H8.2L5 4z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 18a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 18zm10 0a2 2 0 1 0 .001 4.001A2 2 0 0 0 17 18zM6.2 6l.8 2H19l-1.5 6.2c-.1.5-.6.8-1.1.8H9.1L7.4 6H6.2zM5 4H2V2h3.2l.7 2H21l-2.4 10H8.2L5 4z'/%3E%3C/svg%3E");
}

body.site a > .download-button:has(img[src*="download"])::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M11 3h2v9.2l2.6-2.6 1.4 1.4L12 16.1 6.9 11l1.4-1.4L11 12.2V3zM5 18h14v2H5z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M11 3h2v9.2l2.6-2.6 1.4 1.4L12 16.1 6.9 11l1.4-1.4L11 12.2V3zM5 18h14v2H5z'/%3E%3C/svg%3E");
}

.download-button .download-text {
    float: none;
}

#smart-button-container {
    max-width: 420px;
    margin-top: 8px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-sunken);
}

#smart-button-container,
#smart-button-container div {
    color: var(--ink) !important;
}

body.site select,
body.site textarea,
body.site input[type="text"],
body.site input[type="email"],
body.site input[type="search"] {
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #111;
    color: var(--ink);
    font-family: inherit;
    font-size: 16px;
}

body.site select:focus,
body.site textarea:focus,
body.site input[type="text"]:focus,
body.site input[type="email"]:focus {
    border-color: var(--link);
    outline: none;
}

body.site input[type="submit"],
body.site button[type="submit"] {
    margin-top: 8px;
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-weight: 700;
}

body.site option {
    background: #111;
    color: var(--ink);
}

body.site pre {
    padding: 16px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0a0a0a;
    color: #eee;
    font-size: 13px;
}

body.site table {
    width: 100%;
    margin: 12px 0 24px;
    border-collapse: collapse;
}

body.site th,
body.site td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

body.site th {
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.site iframe {
    max-width: 100%;
    border: 0;
    border-radius: 8px;
}

.nav-tabs {
    margin-top: 12px;
    border-bottom: 1px solid var(--line);
}

.nav-tabs > li > a {
    margin-right: 4px;
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0;
    background: transparent !important;
    color: var(--muted) !important;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-decoration: none;
    text-transform: uppercase;
}

.nav-tabs > li > a:hover,
.nav-tabs > li > a:focus {
    border-bottom-color: var(--line-strong) !important;
    background: transparent !important;
    color: #fff !important;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    border-bottom-color: var(--red) !important;
    background: transparent !important;
    color: #fff !important;
}

.tab-content {
    min-height: 0;
    padding: 22px 4px 8px;
    color: var(--ink);
}

.tab-content p,
.tab-content li {
    margin-bottom: 0.75em;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin: 12px 0 24px;
    padding: 0;
    list-style: none;
}

.media-card {
    list-style: none;
}

.media-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #101010;
    color: var(--ink);
    text-align: left;
    text-decoration: none;
}

a.media-card-inner:hover,
a.media-card-inner:focus {
    border-color: var(--red);
    color: #fff;
    text-decoration: none;
}

body.site .media-card-inner img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    background: #000;
}

.media-card-inner span {
    display: block;
    padding: 10px 12px 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

/* Footer --------------------------------------------------------------- */

.site-footer {
    padding: 28px 0;
    border-top: 1px solid var(--line);
    background: #070707;
    color: var(--muted);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px 32px;
}

.footer-brand {
    --mark-h: 40px;
    width: calc(866 / 232 * var(--mark-h));
    height: var(--mark-h);
    overflow: hidden;
    line-height: 0;
    flex: 0 0 auto;
}

body.site .footer-brand img {
    display: block;
    width: calc(1800 / 232 * var(--mark-h));
    height: calc(280 / 232 * var(--mark-h));
    max-width: none;
    margin-top: calc(-4 / 232 * var(--mark-h));
    margin-left: calc(-460 / 232 * var(--mark-h));
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.footer-nav a {
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a:focus {
    color: #fff;
}

body.site :focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.site h1 {
        font-size: 36px;
    }
}

@media (max-width: 640px) {
    .brand {
        --mark-h: 40px;
    }

    .site-nav .navbar-nav > li:first-child > a {
        padding-left: 4px;
    }

    main {
        padding-top: 24px;
    }

    .game-grid {
        grid-template-columns: 1fr;
    }

    .about-panel {
        padding: 22px 16px;
    }

    body.site h1 {
        font-size: 32px;
    }
}

@media (max-width: 600px) {
    main .container .row > div[style*="float"] {
        float: none !important;
        margin-bottom: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .game-card {
        transition: none;
    }
}
