@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&family=Outfit:wght@100..900&display=swap');



/* VARIABLES */
:root {
    --bg-100: #000000;
    --bg-200: #0e0e0e;
    --bg-300: #181818;
    --bg-400: #1f1f1f;
    --bg-500: #252525;

    --accent-100: #141016;
    --accent-200: #19131b;
    --accent-300: #111a23;
    --accent-400: #37283c;
    --accent-500: #47314e;

    --info: #7070e7;
    --success: #28e028;
    --warning: #d49b31;
    --danger: #be3333;

    --text-100: #fff;
    --text-200: #e0e0e0;
    --text-300: #c0c0c0;
    --text-400: #a0a0a0;
    --text-500: #808080;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
}



/* DEFAULT */
.cos {
    margin: 0;
    padding: 0;
    font-family: 'Fredoka';
}



/* BUTTON */
.cos-btn {
    display: flex;
    align-items: center;
    background: var(--bg-400);
    color: var(--text-100);
    font-size: 0.9rem;
    border: 3px solid var(--bg-500);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0.15rem 0.75rem;
    transition: 0.1s ease;

    &:hover {
        background: var(--bg-300);
        border-color: var(--bg-400);
    }
}



/* PANEL */
.cos-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--accent-100);
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg);
    color: var(--text-100);
    font-size: 1rem;
}



/* HEADING */
.cos-heading {
    font-family: 'Outfit';
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-500);
    letter-spacing: 2px;
    text-transform: uppercase;
    scroll-margin-top: 100px;
    margin-bottom: 1rem;
}



/* CONTENT */
.cos-content {
    display: flex;
    flex-direction: column;
    gap: 2ch;

    > p {
        line-height: 1.5;
        font-size: 0.9rem;
    }
}



/* LINKS */
.cos-link {
    color: var(--accent-500);
    font-size: inherit;
    font-weight: 500;
    width: min-content;
    text-decoration: none;
    transition: 0.1s ease;
    cursor: pointer;

    &:hover {
        text-decoration: underline;
    }

    &.cos-heading {
        color: var(--text-300);
        display: flex;
        align-items: center;
        gap: 1ch;
        text-decoration: none;
        width: max-content;
        transition: 0.1s ease;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    &.cos-heading:hover {
        color: var(--text-500);
    }
    &.cos-heading > i {
        opacity: 0;
        visibility: hidden;
        transition: 0.1s ease;
        transform: translateX(-10px);
    }
    &.cos-heading:hover > i {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }
}



/* LISTS */
.cos-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
    list-style: none;
    gap: 0.5rem;

    > .cos-item {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
        background: var(--accent-500);
        border-radius: var(--radius-md);
        border: 3px solid var(--accent-400);
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
        user-select: none;
    }

    > .cos-item:has(img) {
        padding: 0;
        position: relative;
    }

    > .cos-item img {
        width: 100%;
        height: fit-content;
        object-fit: cover;
        transition: transform 0.1s ease;
    }

    > .cos-item span {
        position: absolute;
        bottom: 0;
        left: 0;
        margin: 0.25rem;
        background: var(--accent-300);
        color: var(--text-100);
        padding: 0.25rem 0.5rem;
        border-radius: var(--radius-sm);
        border: 3px solid var(--accent-200);
        font-size: 0.7rem;
        transition: opacity 0.2s ease;
        text-align: center;
    }

    > .cos-item:hover {
        background: var(--accent-400);
        border-color: var(--accent-300);
    }

    > .cos-item:hover img {
        transform: scale(1.05);
    }
}



/* BUBBLE */
.cos-bubble {
    position: relative;
    display: inline-block;
    padding: 1rem 1.5rem;
    background-color: var(--text-100);
    border-radius: var(--radius-lg);
    border: 3px solid var(--bg-100);
    color: var(--bg-100);
    font-weight: 500;
    font-size: 1.1rem;
    max-width: 300px;
    height: fit-content;
    filter: drop-shadow(3px 3px 2px rgba(0,0,0,0.5));

    &::after {
        content: '';
        position: absolute;
        bottom: -10px;
        right: -10px;
        width: 20px;
        aspect-ratio: 1 / 1;
        background: var(--text-100);
        border-radius: 50%;
        border: 3px solid var(--bg-100);
        z-index: 5;
    }

    &::before {
        content: '';
        position: absolute;
        bottom: -15px;
        right: -15px;
        width: 10px;
        aspect-ratio: 1 / 1;
        background: var(--text-100);
        border-radius: 50%;
        border: 3px solid var(--bg-100);
        z-index: 10;
    }

    > .cos-heading {
        font-family: 'Outfit';
        font-size: 1.2rem;
        font-weight: 800;
        color: var(--text-500);
        letter-spacing: 1px;
        text-transform: uppercase;
        scroll-margin-top: 100px;
        margin-bottom: 1rem;
    }

    > .cos-para {
        font-size: 0.9rem;
    }
}



/* TITLE */
.cos-title {
    color: var(--text-100);
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
}



/* HEADER */
.cos-header {
    display: flex;
    align-items: center;
    padding: 3rem 8rem;
    justify-content: space-between;
    z-index: 9999;
}


/* HEADER LINK */
.cos-header {
    > nav {
        display: flex;
        align-items: center;
        gap: 2rem;
    }
}

.cos-header nav .cos-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-100);
    font-size: 0.9rem;
    text-decoration: none;

    > i {
        font-size: 0.8rem;
    }

    &.cos-link::after {
        position: absolute;
        bottom: -2px;
        left: 50%;
        transform: translateX(-50%);
        content: '';
        width: 0;
        height: 2px;
        background: var(--text-100);
        border-radius: var(--radius-lg);
        transition: 0.1s ease;
    }

    &.cos-link:hover::after,
    &.cos-link.active::after {
        width: 100%;
        background: var(--text-300);
    }

    &.cos-link:hover,
    &.cos-link.active {
        color: var(--text-300);
    }
}



/* SECTION */
.cos-section {
    display: flex;
    flex-direction: column;
    padding: 2rem 8rem;
}



/* SECTION CONTENT */
.cos-sectioncontent {
    position: relative;
    display: flex;
    width: 100%;

    > img {
        position: absolute;
        right: 1rem;
        top: 6rem;
        width: 400px;
        aspect-ratio: 1 / 1;
        filter: drop-shadow(6px 6px 2px rgba(0,0,0,0.5));
    }

    > .cos-bubble {
        position: absolute;
        left: 30%;
        top: 6rem;
    }

    > .cos-heading {
        position: absolute;
        right: 4rem;
        top: 12rem;
        font-size: 3rem;
        font-weight: 800;
        color: var(--text-100);
    }
    > .cos-heading::after {
        position: absolute;
        content: '';
        width: 100%;
        height: 5px;
        background: var(--text-100);
        bottom: 0;
        left: 0;
        border-radius: var(--radius-sm);
    }
}



/* SEPARATOR */
.cos-separator {
    height: 2px;
    border-radius: var(--radius-lg);
    background: var(--accent-400);
    margin: 3rem 0;
}



/* SPACER */
.cos-spacer {
    height: 2px;
    margin: 0.5rem 0;
}



/* TAG */
.cos-tag {
    position: absolute;
    top: -10px;
    left: -10px;
    padding: 0.25rem 0.75rem;
    background: var(--info);
    border-radius: var(--radius-sm);
    width: fit-content;
    font-size: 0.8rem;
    font-weight: 600;
}



/* INFO */
.cos-info {
    display: inline-block;
    background: var(--info);
    color: var(--text-100);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}



/* FOOTER */
.cos-footer {
    display: flex;
    color: var(--text-100);
    background: var(--accent-100);
    font-size: 0.8rem;
    padding: 1rem 8rem;
    justify-content: space-between;

    > nav {
        display: flex;
        align-items: center;
        gap: 1rem;
        color: var(--text-100);
    }
    > nav a {
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-100);
        text-decoration: none;
    }
}



/* TABLE */
.cos-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;

    tr {
        background: var(--text-500);
    }

    td {
        padding: 0.5rem 1rem;
        border: 2px solid var(--accent-300);
        vertical-align: top;
        background: var(--accent-500);
    }

    &.vertical td:first-child {
        width: 30%;
        font-weight: 600;
        background: var(--accent-400);
    }

    &.horizontal tr:first-child td {
        font-weight: 600;
        background: var(--accent-400);
    }
}



/* DROPDOWN */
.cos-dropdown {
    position: relative;

    > .cos-dropdown-summary {
        list-style: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--text-100);
        font-size: 0.9rem;
        transition: 0.1s ease;
    }

    > .cos-dropdown-summary:hover {
        color: var(--text-300);
    }

    > .cos-dropdown-list {
        position: absolute;
        top: 30px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--text-100);
        border-radius: var(--radius-md);
        padding: 0.5rem 0;
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        list-style: none;
        width: max-content;
    }

    > .cos-dropdown-list::before {
        content: '';
        position: absolute;
        top: -4px;
        left: 50%;
        transform: translateX(-50%) rotate(45deg);
        width: 15px;
        height: 15px;
        background: var(--text-100);
        border-radius: var(--radius-sm);
    }

    > .cos-dropdown-list li .cos-link {
        color: var(--accent-100);
        padding: 0.25rem 1rem;
        text-decoration: none;
        font-size: 0.8rem;
        text-wrap: nowrap;

        &:hover {
            color: var(--accent-500);
        }
        &:hover::after {
            display: none;
        }
    }
}
