/* **************************************************************** */
/* Imports */
/* **************************************************************** */

@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@24,200..600');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@24,200..400,0..1');

/* **************************************************************** */
/* Variables */
/* **************************************************************** */

:root {

    --cl-primary      :  36  36  48;
    --cl-white        : 252 252 252;
    --cl-secondary    :   0   0 200;
    --cl-error        : 240  20 100;
    --cl-warn         : 240 180  20;
    --cl-success      :  20 200 100;

    --sp-xxs          : 0.125rem; /*  2 px */
    --sp-xs           : 0.250rem; /*  4 px */
    --sp-s            : 0.500rem; /*  8 px */
    --sp-m            : 1.000rem; /* 16 px */
    --sp-l            : 1.500rem; /* 24 px */
    --sp-xl           : 2.250rem; /* 36 px */
    --sp-xxl          : 3.000rem; /* 48 px */

    --fs-xs           : 0.750rem; /* 12 px */
    --fs-s            : 0.875rem; /* 14 px */
    --fs-m            : 1.000rem; /* 16 px */
    --fs-l            : 1.125rem; /* 18 px */
    --fs-xl           : 1.375rem; /* 22 px */

    --fw-xs           : 200;
    --fw-s            : 300;
    --fw-m            : 400;
    --fw-l            : 500;
    --fw-xl           : 600;

    --br-s            : 0.750rem; /* 12 px */
    --br-m            : 1.000rem; /* 16 px */
    --br-l            : 1.375rem; /* 22 px */

}

/* **************************************************************** */
/* Reset & Base */
/* **************************************************************** */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-variation-settings: 'opsz' 24;
    line-height: var(--sp-m);
    background-color: rgb(var(--cl-white));
    color: rgb(var(--cl-primary));
}

body {
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a,
a:visited,
a:hover,
a:active {
    color: inherit;
    text-decoration: none;
}

/* **************************************************************** */
/* Typography */
/* **************************************************************** */

span                  {display: inline-block;}
span.center           {text-align: center;}
span.justify          {text-align: justify;}
span.underline        {text-decoration: underline;}
span.link:hover       {cursor: pointer; text-decoration: underline;}

span.primary          {color: rgb(var(--cl-primary));}
span.white            {color: rgb(var(--cl-white));}
span.secondary        {color: rgb(var(--cl-secondary));}
span.error            {color: rgb(var(--cl-error));}
span.warn             {color: rgb(var(--cl-warn));}
span.success          {color: rgb(var(--cl-success));}
span.grey             {color: rgb(var(--cl-primary) / 0.25);}

span.fs__xs           {font-size: var(--fs-xs); line-height: calc(var(--fs-xs) * 1.5); letter-spacing: 0.1px;}
span.fs__s            {font-size: var(--fs-s); line-height: calc(var(--fs-s) * 1.5);}
span.fs__m            {font-size: var(--fs-m); line-height: calc(var(--fs-m) * 1.5);}
span.fs__l            {font-size: var(--fs-l); line-height: calc(var(--fs-l) * 1.5);}
span.fs__xl           {font-size: var(--fs-xl); line-height: calc(var(--fs-xl) * 1.5);}

span.fw__xs           {font-weight: var(--fw-xs);}
span.fw__s            {font-weight: var(--fw-s);}
span.fw__m            {font-weight: var(--fw-m);}
span.fw__l            {font-weight: var(--fw-l);}
span.fw__xl           {font-weight: var(--fw-xl);}

/* **************************************************************** */
/* Symbols */
/* **************************************************************** */

.material-symbols-outlined {
    font-variation-settings: 'opsz' 24;
}

.material-symbols-outlined[data-var="fill"] {
    font-variation-settings: 'FILL' 1;
}

.material-symbols-outlined[data-var="spin"] {
    animation: spin__cw 600ms linear infinite;
    opacity: 0.80;
}

/* **************************************************************** */
/* Utilities */
/* **************************************************************** */

.sp__xxs {margin-top: var(--sp-xxs);}
.sp__xs  {margin-top: var(--sp-xs);}
.sp__s   {margin-top: var(--sp-s);}
.sp__m   {margin-top: var(--sp-m);}
.sp__l   {margin-top: var(--sp-l);}
.sp__xl  {margin-top: var(--sp-xl);}
.sp__xxl {margin-top: var(--sp-xxl);}

/* **************************************************************** */
/* Layout */
/* **************************************************************** */

.layout {
    margin: auto;
    max-width: 600px;
}

.header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

/* **************************************************************** */
/* Logo */
/* **************************************************************** */

.logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
}

.logo__icon {
    animation: spin__cc 480ms ease-out;
}

.logo__icon img {
    width: 2.000rem;
    aspect-ratio: 1/1;
}

.logo:hover .logo__icon {
    animation: spin__cw 600ms ease-out;
}

.logo__text {
    margin-left: var(--sp-m);
}

.logo[data-var="light"] {
    filter: invert(1);
}

.logo[data-var="light"] .logo__icon {
    animation: none;
}

/* **************************************************************** */
/* Button */
/* **************************************************************** */

.button__group {
    display: flex;
    flex-direction: row;
    gap: var(--sp-m);
    align-items: center;
}

.button__wrapper {
    display: flex;
    flex-direction: row;
    gap: var(--sp-m);
    align-items: center;
}

.button {
    padding: var(--sp-m) var(--sp-l);
    border-radius: var(--br-m);
    outline-offset: var(--sp-xxs);
    width: fit-content;
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
    color: rgb(var(--cl-white));
    background-color: rgb(var(--cl-primary));
}

.button:hover {
    outline: solid var(--sp-xxs) rgb(var(--cl-primary));
}

.button[data-var="secondary"] {
    color: rgb(var(--cl-white));
    background-color: rgb(var(--cl-secondary));
}

.button[data-var="secondary"]:hover {
    outline: solid var(--sp-xxs) rgb(var(--cl-secondary));
}

.button[data-var="small"] {
    padding: var(--sp-m) calc(var(--sp-m) * 0.75);
    color: rgb(var(--cl-primary));
    background-color: rgb(var(--cl-primary) / 0.10);
}

.button[data-var="small"] span {
    line-height: var(--sp-m);
}

.button[data-var="small"]:hover {
    background-color: rgb(var(--cl-primary) / 0.15);
    outline: solid var(--sp-xxs) rgb(var(--cl-primary) / 0.15);
}

/* **************************************************************** */
/* Tab */
/* **************************************************************** */

.tab {
    display: flex;
    flex-direction: column;
}

.tab__group {
    display: flex;
    flex-direction: row;
    padding: var(--sp-xs);
    overflow: hidden;
    background-color: rgb(var(--cl-primary) / 0.05);
    border-radius: var(--br-m);
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
    position: relative;
}

.tab__item {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: var(--sp-m)!important;
    color: rgb(var(--cl-secondary));
    position: relative;
    padding-block: calc(var(--sp-m) - var(--sp-xs));
    cursor: pointer;
    flex: 1;
    z-index: 1;
}

.tab__slider {
    position: absolute;
    background-color: rgb(var(--cl-white));
    border-radius: var(--br-s);
    box-shadow: 0 0 var(--sp-xs) rgb(var(--cl-primary) / 0.15);
    height: calc(100% - var(--sp-s));
    width: 0;
    left: 0;
    transform: translateX(0);
    transition: transform 200ms ease;
    z-index: 0;
}

.tab__wrapper {
    display: flex;
    flex-direction: column;
}

/* **************************************************************** */
/* Inputs */
/* **************************************************************** */

.input__field {
    display: flex;
    flex-direction: column;
    gap: var(--sp-m);
    flex: 1;
}

.input__field input,
.input__field textarea {
    all: unset;
    display: block;
    width: 100%;
    box-sizing: border-box;
    background-color: rgb(var(--cl-primary) / 0.05);
    border-radius: var(--br-m);
    padding: var(--sp-m);
    color: rgb(var(--cl-primary));
    font-size: var(--fs-s);
    outline: solid 1px rgb(var(--cl-primary) / 0.05);
}

.input__field input:hover,
.input__field textarea:hover,
.input__field input:focus,
.input__field textarea:focus {
    background-color: rgb(var(--cl-primary) / 0.075);
}

.input__field input::placeholder,
.input__field textarea::placeholder,
.input__field input:-ms-input-placeholder,
.input__field textarea:-ms-input-placeholder,
.input__field input::-webkit-input-placeholder,
.input__field textarea::-webkit-input-placeholder {
    color: rgb(var(--cl-success));
    opacity: 1;
}

.input__field input[data-var="error"],
.input__field textarea[data-var="error"] {
    background-color: rgb(var(--cl-error) / 0.05);
    color: rgb(var(--cl-error));
}

.input__field input[data-var="error"]:hover,
.input__field textarea[data-var="error"]:hover,
.input__field input[data-var="error"]:focus,
.input__field textarea[data-var="error"]:focus {
    background-color: rgb(var(--cl-error) / 0.10);
}

.input__field label {
    font-size: var(--fs-s);
    margin-left: var(--sp-xxs);
}

.input__field label[data-required]::after {
    content: ' *';
    color: rgb(var(--cl-error));
}

.input__loading,
.input__message {
    display: none;
}

/* **************************************************************** */

.input__select {
    position: relative;
    margin-left: auto;
}

.input__select span {
    position: absolute;
    color: rgb(var(--cl-white));
    font-weight: var(--fw-s);
    right: var(--sp-s);
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.input__select select {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    padding: var(--sp-m) var(--sp-xxl) var(--sp-m) var(--sp-m);
    background-color: rgb(var(--cl-white) / 0.10);
    border-radius: var(--br-m);
    color: rgb(var(--cl-white));
    cursor: pointer;
    font-size: var(--fs-s);
    font-weight: var(--fw-s);
    border: none;
    outline: none;
}

.input__select select:hover,
.input__select select:focus {
    background-color: rgb(var(--cl-white) / 0.15);
}

.input__select select option {
    color: rgb(var(--cl-primary));
}

/* **************************************************************** */

.input__checkbox {
    display: flex;
    flex-direction: row;
    gap: calc(var(--sp-m) * 0.750);
    padding-left: var(--sp-xxs);
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
}

.input__checkbox input {
    all: unset;
    width: calc(var(--sp-xxs) * 10);
    height: calc(var(--sp-xxs) * 10);
    background-color: rgb(var(--cl-primary) / 0.10);
    border: none;
    border-radius: calc(var(--br-m) * 0.5);
    cursor: pointer;
    position: relative;
}

.input__checkbox input:hover {
    background-color: rgb(var(--cl-primary) / 0.20);
}

.input__checkbox input:checked {
    background-color: rgb(var(--cl-secondary));
}

.input__checkbox input:checked::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: calc(var(--sp-xxs) * 2.4);
    height: calc(var(--sp-xxs) * 4.8);
    border: solid rgb(var(--cl-white));
    border-width: 0 var(--sp-xxs) var(--sp-xxs) 0;
    transform: translate(-48%, -64%) rotate(45deg);
}

/* **************************************************************** */

.form__radio {
    display: flex;
    flex-direction: column;
    gap: var(--sp-s);
    user-select: none;
    -webkit-user-select: none;
}

.input__radio {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: rgb(var(--cl-primary) / 0.025);
    border-radius: var(--br-m);
    padding: calc(var(--sp-m) * 0.875);
    cursor: pointer;
    overflow: hidden;
}

.form__radio[data-var="selected"] .input__radio {
    cursor: default;
}

.input__radio:hover {
    background-color: rgb(var(--cl-primary) / 0.05);
}

.form__radio[data-var="selected"] .input__radio:hover {
    background-color: rgb(var(--cl-primary) / 0.025);
}

.input__radio input {
    all: unset;
    appearance: none;
    width: calc(var(--sp-xxs) * 10);
    aspect-ratio: 1 / 1;
    outline: solid var(--sp-xxs) rgb(var(--cl-secondary));
    border-radius: var(--br-m);
    position: relative;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.form__radio[data-var="selected"] .input__radio input:checked {
    outline-color: rgb(var(--cl-white));
}

.input__radio input:checked::after {
    content: "";
    width: 74%;
    aspect-ratio: 1 / 1;
    background: rgb(var(--cl-secondary));
    border-radius: 50%;
}

.form__radio[data-var="selected"] .input__radio input:checked::after {
    background: rgb(var(--cl-white));
}

.input__radio span[data-var="label"] {
    margin-left: calc(var(--sp-m) * 0.750);
    position: relative;
    z-index: 1;
}

.input__radio span[data-var="percent"] {
    margin-left: auto;
    display: none;
    line-height: var(--sp-m)!important;
    font-variant-numeric: tabular-nums;
}

.form__radio[data-var="selected"] .input__radio input:checked ~ span[data-var="label"],
.form__radio[data-var="selected"] .input__radio input:checked ~ span[data-var="percent"] {
    color: rgb(255, 255, 0);
    mix-blend-mode: difference;
    font-weight: 350;
    letter-spacing: 0.10px;
}

.input__radio span[data-var="fill"] {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background-color: rgb(var(--cl-secondary) / 0.05);
    border-radius: var(--br-m);
    transition: width 300ms ease;
    z-index: -1;
}

.form__radio[data-var="selected"] .input__radio input:checked ~ span[data-var="fill"] {
    background-color: rgb(var(--cl-secondary));
}

/* **************************************************************** */
/* Form */
/* **************************************************************** */

.form__info {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
    opacity: 0.60;
}

.form__submit {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
}

.form__invite {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-m);
}

/* **************************************************************** */
/* Hero */
/* **************************************************************** */

.hero {
    display: flex;
    flex-direction: column;
}

.hero__title {
    line-height: calc(var(--fs-xl) * 2.4);
    font-size: calc(var(--fs-xl) * 2);
    font-weight: var(--fw-xl);
}

/* **************************************************************** */
/* Feature */
/* **************************************************************** */

.feature {
    display: flex;
    flex-direction: row;
    gap: var(--sp-l);
    background-color: rgb(var(--cl-primary) / 0.05);
    padding: var(--sp-l) var(--sp-xl);
    border-radius: var(--br-l);
}

.feature__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.feature__icon {
    display: flex;
    flex-direction: row;
    gap: var(--sp-xxs);
}

.feature__icon[data-var="warn"] {
    color: rgb(var(--cl-warn));
}

.feature__icon span {
    font-weight: var(--fw-s);
}

/* **************************************************************** */
/* Notice */
/* **************************************************************** */

.notice {
    text-align: justify;
}

.notice span {
    display: inline!important;
}

/* **************************************************************** */
/* Profile */
/* **************************************************************** */

.profile {
    display: flex;
    flex-direction: row;
    gap: var(--sp-m);
    align-items: center;
    cursor: pointer;
}

.drawer .profile {
    cursor: default;
}

.profile__media {
    position: relative;
}

.profile__media img {
    width: var(--sp-xxl);
    height: var(--sp-xxl);
    border-radius: var(--sp-xxl);
}

.profile__status {
    width: var(--fs-xs);
    height: var(--fs-xs);
    background-color: rgb(var(--cl-success));
    border-radius: var(--br-s);
    margin-left: var(--sp-m);
    outline: solid var(--sp-xxs) rgb(var(--cl-white));
    position: absolute;
    bottom: 0;
    right: 0;
}

.profile__info {
    display: flex;
    flex-direction: column;
    gap: var(--sp-s);
}

.profile__subtitle {
    line-height: var(--sp-m)!important;
    opacity: 0.60;
}

.profile__stats {
    display: flex;
    flex-direction: row;
    gap: var(--sp-l);
}

.profile__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-s);
    background-color: rgb(var(--cl-primary) / 0.025);
    border: dashed 1px rgb(var(--cl-primary) / 0.20);
    border-radius: var(--sp-s);
    padding: var(--sp-m);
}

/* **************************************************************** */
/* Status */
/* **************************************************************** */

.status {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-m);
}

.status__circle {
    width: var(--fs-xs);
    height: var(--fs-xs);
    background-color: rgb(var(--cl-success));
    border-radius: var(--br-s);
    margin-left: var(--sp-m);
}

.status__text {
    color: rgb(var(--cl-white) / 0.60);
}

/* **************************************************************** */
/* Info */
/* **************************************************************** */

.info__text {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-s);
}

.info__text span {
    line-height: var(--sp-m)!important;
}

/* **************************************************************** */
/* Invite */
/* **************************************************************** */

.invite__form {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-m);
}

.invite__code {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-l);
    padding: var(--sp-l);
    border: dashed 1px rgb(var(--cl-primary) / 0.20);
    border-radius: var(--sp-m);
}

.invite__code img {
    width: calc(var(--sp-m) * 10);
    aspect-ratio: 1 / 1;
}

.invite__text {
    display: flex;
    flex-direction: column;
    gap: var(--sp-s);
}

.invite__social {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: var(--sp-l) var(--sp-s);
    border: dashed 1px rgb(var(--cl-primary) / 0.20);
    border-radius: var(--sp-m);
}

.invite__item {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: calc(var(--sp-m) - var(--sp-xs));
    align-items: center;
    cursor: pointer;
}

.invite__icon {
    background-color: rgb(var(--cl-primary) / 0.05);
    border-radius: var(--sp-m);
    padding: calc(var(--sp-m) - var(--sp-xs));
}

.invite__icon[data-var="secondary"] {
    background-color: rgb(var(--cl-secondary));
}

.invite__item:hover .invite__icon {
    background-color: rgb(var(--cl-primary) / 0.10);
}

.invite__item:hover .invite__icon[data-var="secondary"] {
    background-color: rgb(var(--cl-secondary));
}

.invite__icon img {
    width: var(--sp-l);
    aspect-ratio: 1 / 1;
    filter: opacity(0.8);
}

.invite__icon[data-var="secondary"] img {
    filter: invert(1);
}

/* **************************************************************** */
/* Drawer */
/* **************************************************************** */

.drawer__overlay {
    position: fixed;
    inset: 0;
    background: rgb(var(--cl-primary) / 0.10);
    backdrop-filter: blur(var(--sp-xxs));
    -webkit-backdrop-filter: blur(var(--sp-xxs));
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 200ms linear;
    will-change: opacity;
}

.drawer__overlay[data-shown="true"] {
    pointer-events: auto;
    opacity: 1;
}

.drawer {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: calc(var(--sp-xxl) * 10);
    background-color: rgb(var(--cl-white));
    z-index: 1000;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform 200ms linear;
    will-change: transform;
}

.drawer__content {
    width: 100%;
    height: 100%;
    padding-inline: var(--sp-l);
    padding-bottom: calc(var(--sp-xxl) * 2);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.drawer::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: calc(var(--sp-xxl) * 2);
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgb(var(--cl-white) / 0),
        rgb(var(--cl-white))
    );
}

.drawer::-webkit-scrollbar {
    display: none;
}

.drawer[data-shown="true"] {
    pointer-events: auto;
    transform: translateX(0);
}

.drawer__title {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.drawer__wrapper {
    display: flex;
    flex-direction: column;
}

/* **************************************************************** */
/* Footer */
/* **************************************************************** */

footer {
    padding-block: var(--sp-xl);
    background-color: rgb(var(--cl-primary));
}

.footer {
    display: flex;
    flex-direction: column;
}

.footer__menu {
    display: flex;
    flex-direction: column;
}

.footer__item {
    display: flex;
    flex-direction: row;
    gap: var(--sp-s);
    align-items: center;
}

.footer__link {
    color: rgb(var(--cl-white) / 0.80);
    cursor: pointer;
}

.footer__link:hover {
    color: rgb(var(--cl-white));
    text-decoration: underline;
}

.footer__version {
    color: rgb(var(--cl-white));
    background-color: rgb(var(--cl-white) / 0.15);
    padding: var(--sp-xxs) var(--sp-s);
    border-radius: calc(var(--br-s) / 1.50);
    line-height: var(--sp-m)!important;
}

.footer__copyright {
    color: rgb(var(--cl-white) / 0.60);
}

/* **************************************************************** */
/* Mobile */
/* **************************************************************** */

@media (max-width: 600px) {

    .layout {
        padding-inline: var(--sp-m);
    }

    .drawer {
        width: 100%;
    }

    .drawer__content {
        padding-inline: var(--sp-m);
    }

    .feature {
        padding-inline: var(--sp-l);
    }

    .feature .feature__item:first-child {
        display: none;
    }

    .status__text {
        display: none;
    }

    .profile__stats {
        gap: var(--sp-m);
    }

    .profile__item span span {
        width: 100%;
    }

    .invite__code img {
        width: calc(var(--sp-m) * 6);
    }

}

/* **************************************************************** */
/* Animations */
/* **************************************************************** */

@keyframes spin__cw {
    0%   {transform: rotate(0deg);}
    100% {transform: rotate(360deg);}
}

@keyframes spin__cc {
    0%   {transform: rotate(0deg);}
    100% {transform: rotate(-360deg);}
}

/* **************************************************************** */