/*very minimal reset*/
*,
::after,
::before,
::backdrop,
::file-selector-button {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0 solid;
    font-family: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
}

:root {
    color-scheme: light dark;
}

[class^="bx"]::before,
[class*=" bx"]::before,
.bx::before {
    font-family: boxicons;
}

[class^="bxl"]::before,
[class*=" bxl"]::before,
.bxl::before {
    font-family: boxicons-brands;
}

button,
input,
select,
optgroup,
textarea,
::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    border-radius: 0;
    background-color: transparent;
    opacity: 1;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
    display: block;
}

img,
video {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    -webkit-text-decoration: inherit;
    text-decoration: inherit;
}

ol,
ul,
menu {
    list-style: none;
}

hr {
    border-bottom: 1px solid var(--border-color);
    margin: 16px 0;
}

.dropdown__hr {
    margin: 4px 0;
}

/*and here we define our themes*/
:root,
:host {
    --border-color: light-dark(#adadad, #2c2c2c);
    --form-bg: light-dark(#fff, #2c2c2c);
    --gray-state-1: light-dark(#f5f5f5, #2c2c2c);
    --gray-state-2: light-dark(#e2e2e2, #3f3f3f);
    --neutral-bg: light-dark(white, #0e1113);
    color: light-dark(#454545, #d9d9d9);
}

/*some sane containers for consistent element widths*/
.container {
    width: 100%;

    @media (width >=40rem) {
        max-width: 40rem;
    }

    @media (width >=48rem) {
        max-width: 48rem;
    }

    @media (width >=64rem) {
        max-width: 64rem;
    }

    @media (width >=80rem) {
        max-width: 80rem;
    }

    @media (width >=96rem) {
        max-width: 96rem;
    }
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: var(--neutral-bg);
    border-bottom: 1px var(--border-color) solid;
    position: fixed;
    width: 100%;
    z-index: 10;
}

.navbar__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    width: 48px;
}

.inlineBadge img.badge {
    width: 24px;
    border: none;
    aspect-ratio: 1/1;
    object-fit: contain;
}

.inlineBadge {
    display: flex;
    gap: 4px;
    align-items: center;
}

.section {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.user__btn,
.user__pill {
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 6px;
    text-decoration: none;
    background: var(--gray-state-1);
    transition: background-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
    gap: 8px;
}

.user__pill {
    cursor: unset;
}

.user__btn img,
.user__pill img {
    border-radius: 6px;
    max-width: 36px;
    padding: 2px;
    border: 1px var(--border-color) solid;
}

.bigavatar {
    border-radius: 18px;
    max-width: min(180px, 50vw);
    padding: 4px;
    border: 1px var(--border-color) solid;
    margin: 0 auto;
}

.chevron {
    margin-top: 4px;
    margin-right: 4px;
}

.login__btn {
    padding: 11.5px;
}

/* Dropdown Wrapper */
.dropdown {
    position: relative;
}

/* Dropdown Panel */
.dropdown__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 180px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    background: var(--neutral-bg);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Dropdown Items */
.dropdown__item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    gap: 8px;
}

.dropdown__item>.bx {
    font-size: 18px;
}

.dropdown__item:hover,
.dropdown__item:focus-visible {
    background: var(--gray-state-1);
}

/* menu */

.menu,
.navbar__left,
.navbar__right {
    display: flex;
    gap: 8px;
}

.navbar__left>.menu {
    align-items: center;
    display: none;

    @media (width >=40rem) {
        display: flex;
    }
}

.mobile {
    @media (width >=40rem) {
        display: none;
    }
}

.desktop {
    display: none;

    @media (width >=24rem) {
        display: initial;
    }
}

.link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    background: var(--gray-state-1);
    transition: background-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
    gap: 8px;
}

.dropdown__item.discord {
    background: var(--gray-state-1);
}

.dropdown__item.google {
    background: var(--gray-state-1);
}

.dropdown__item.discord:hover {
    background: #4285F4;
    color: white;
}

.dropdown__item.google:hover {
    background: #5865F2;
    color: white;
}

.link>.bx {
    font-size: 18px;
}

.link>.bxl {
    font-size: 22px;
}

.danger {
    color: #f00;
}

.link:hover,
.link:active,
.user__btn:hover,
.user__btn:active {
    background: var(--gray-state-2);
}

.link:disabled,
.link:hover:disabled,
.link:active:disabled {
    opacity: 66%;
    cursor: unset;
    background: var(--gray-state-1);
}

.editors {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.editors__item {
    display: flex;
    align-items: end;
    justify-content: end;
    aspect-ratio: 36/9;
    background: linear-gradient(90deg, var(--editor-color1) 0%, var(--editor-color2) 100%);
    ;
    width: min(100%, 800px);
    margin: auto;
    border-radius: 15px;
    padding: 15px 20px;
    position: relative;
    overflow: hidden;
    color: white;
    font-size: 1.5em;
    transition: all 0.15s ease;
}

.editors__item:hover {
    transition: all 0.15s ease;
    transform: scale(1.05);
}

.editors__item::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 10px;
    left: -20px;
    z-index: 0;
    background: #fff;
    opacity: 50%;
    mask-size: 25%;
    mask-repeat: no-repeat;
    mask-position: bottom -28px;
    rotate: -5deg;
}

.editors__item__donations::before {
    mask-image: url("/static/img/svg/donate.svg");
}

.editors__item__donations {
    --editor-color1: rgba(155, 42, 42, 1);
    --editor-color2: rgba(232, 117, 35, 1);
}

.editors__item__events::before {
    mask-image: url("/static/img/svg/calendar.svg");
}

.editors__item__events {
    --editor-color1: rgba(12, 75, 201, 1);
    --editor-color2: rgba(120, 35, 232, 1);
}

.editors__item__badges::before {
    mask-image: url("/static/img/svg/badge.svg");
}

.editors__item__badges {
    --editor-color1: rgba(20, 166, 69, 1);
    --editor-color2: rgba(25, 201, 12, 1);
}

.editors__item__users::before {
    mask-image: url("/static/img/svg/user.svg");
}

.editors__item__users {
    --editor-color1: rgb(148, 6, 6);
    --editor-color2: rgb(156, 73, 73);
}

.editors__item__backerlink::before {
    mask-image: url("/static/img/svg/backer.svg");
}

.editors__item__backerlink {
    --editor-color1: rgb(201, 12, 106);
    --editor-color2: rgb(241, 37, 156);
}

.glance {
    margin: auto;
    width: 75vw;
    border-radius: 15px;
    padding: 10px 15px;
    background: var(--gray-state-1);

    @media (width >=32rem) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: min(100%, 800px);
    }
}

.glance__block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.glance__caption {
    font-size: 1.25em;
    font-weight: 100;
}

.glance__value {
    font-size: 1.75em;
    font-weight: 700;
}

.bold__table {
    font-weight: bold;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form__field input,
.form__field textarea,
.form__field select {
    padding: 6px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--form-bg);
}

.subcontainer {
    width: min(100%, 800px);
}

.grid__2 {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 16px;

    @media (width >=64rem) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.grid__2b {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 8px;

    @media (width >=32rem) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.grid__3 {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));

    @media (width >=32rem) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.grid__4 {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 16px;

    @media (width >=32rem) {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        @media (width >=64rem) {
            grid-template-columns: repeat(4, minmax(0, 1fr));
        }
    }
}

.grid__4b {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;

    @media (width >=32rem) {
        grid-template-columns: repeat(3, minmax(0, 1fr));

        @media (width >=64rem) {
            grid-template-columns: repeat(4, minmax(0, 1fr));
        }
    }
}

.hero {
    background-attachment: fixed;
    background-size: cover;
    background-position: top left;
    align-items: center;
    justify-content: center;
    color: white;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.hero__text {
    margin: 20vh 16px;
    width: fit-content;
}

.heading__intro {
    font-size: 20px;
    font-weight: 600;
}

.heading {
    font-size: 40px;
    font-weight: 700;
}

.donations,
.section {
    margin: 32px 16px;
}

.center {
    text-align: center;
}

#capi_btn {
    margin-left: none;

    @media (width >=48rem) {
        margin-left: auto;
    }
}

.badge_uploader {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    @media (width >=32rem) {
        flex-direction: row;
    }
}

.badge__name {
    flex-grow: 1;
    width: 100%;
}

.img-uploader {
    aspect-ratio: 1/1;
    width: 128px;
    display: flex;
    flex-grow: 1;
    border: 2px dashed var(--gray-state-2);
    border-radius: 0.5rem;
    padding: 0.25rem;
    cursor: pointer;
}

.img-uploader-banner {
    aspect-ratio: 16/9;
    height: 100px;
    display: flex;
    flex-grow: 1;
    border: 2px dashed var(--gray-state-2);
    border-radius: 0.5rem;
    padding: 0.25rem;
    cursor: pointer;
}

.img-uploader-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: all 150ms ease-in-out;
}

.img-uploader:hover .img-uploader-inner {
    background: var(--gray-state-2);
    border-radius: 0.5rem;
}

.img-uploader-inner i {
    font-size: 1.875rem;
}

.img-preview-container {
    position: relative;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    padding: 0.375rem;
    width: 128px;
    cursor: pointer;
}

.img-preview-container-banner {
    position: relative;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    padding: 0.375rem;
    height: 100px;
    cursor: pointer;
    aspect-ratio: 16/9;
}

.img-preview {
    width: 128px;
    aspect-ratio: 1/1;
    background: #f3f4f6;
    transition: opacity 150ms;
}

.img-preview-banner {
    height: 100px;
    aspect-ratio: 16/9;
    background: #f3f4f6;
    transition: opacity 150ms;
}

.img-preview:hover {
    opacity: 0.75;
}

.delete-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem;
    display: flex;
    aspect-ratio: 1;
    align-items: center;
    justify-content: center;
    background: #4b5563;
    color: white;
    border-radius: 9999px;
    font-size: 1.125rem;
    cursor: pointer;
}

.two_fields {
    display: flex;
    width: 100%;
}

.grid__2b>input:first-child {
    text-align: center;

    @media (width >=32rem) {
        text-align: right;
    }
}

.badge__editor {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 150ms;
}

.badge__editor.active,
.badge__list__block:hover {
    border: 1px solid var(--border-color);
    transition: all 150ms;
    background-color: var(--gray-state-2);
}

.badge__editor__img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.badge__editor__img__small {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.badge__editor__name {
    font-weight: 600;
    font-size: 1.1em;
}

.badge__editor__name__big {
    font-weight: 600;
    font-size: 1.3em;
}

.badge__editor__desc {
    font-style: italic;
    text-align: justify;
    margin: 4px 0;
}

.badge__editor__desc__big {
    font-style: italic;
    text-align: justify;
    margin: 4px 0;
    font-size: 1.05em;
}

.badge__editor__date {
    opacity: 0.75;
    font-size: 0.9em;
}

.badge__editor__date__text {
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
}

.section {
    margin: 32px 16px;
}

.crewMemberDescription>article {
    margin: 0;
    display: flex;
    gap: 1rem;
    flex-direction: column;
    text-align: justify;

    @media (width >=40rem) {
        text-align: unset;
        margin: 1rem;
    }
}

.crewMember {
    display: flex;
    width: 100%;
    gap: 4px;
    flex-direction: column;

    @media (width >=40rem) {
        flex-direction: row;
    }
}

.crewMember>.crewMemberDescription {
    width: 100%;
}

.crewMemberDescription {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 8px;

    @media (width >=32rem) {
        text-align: left;
    }
}

.crewMember>img {
    border-radius: 50%;
    max-width: min(250px, 85%);
    margin: 0 auto;

    @media (width >=40rem) {
        max-width: min(25rem, calc(100% / 9 * 5));
        margin: 0;
    }
}

.left>img,
.right>.crewMemberDescription {
    order: 1;
}

.right>img,
.left>.crewMemberDescription {
    order: 1;

    @media (width >=40rem) {
        order: 2;
    }
}

.crew {
    max-width: 64rem;
}

.hero__crew {
    background-image:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.65) 100%),
        url('/static/img/CReW.png');
}

.event {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 16px;
    background-color: var(--gray-state-1);
    transition: .25s all;
    position: relative;
}

.event:hover {
    background-color: var(--gray-state-2);
}

.event__img {
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
}

.event__img > img {
    width: 100%;
    height: 100%;
}

.event__heading {
    font-weight: 700;
    font-size: 1.75em;
}

.badge__rect {
    display: flex;
    width: 100%;
    align-items: center;
    border: 1px solid var(--border-color);
    margin: 8px 0;
    gap: 8px;
    padding: 8px;
    position: relative;
    flex-direction: column;
    @media (width >=32em) {
        flex-direction: row;
    }
}

.badge__rect:after {
    content: '\A';
    position: absolute;
    background: var(--gray-state-1);
    top: 0; bottom: 0;
    left: 0; 
    width: var(--percentage);
    z-index: -1;
}

.badge__text {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    align-items: center;
    flex: auto;
    flex-direction: column;
    @media (width >=32em) {
        flex-direction: row;
    }
}

.badge__details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.badge__details__right {
    align-items: center;
    text-align: center;
    @media (width >=32em) {
        align-items: end;
        text-align: right;
    }
}