@font-face {
    font-family: 'Instrument Serif';
    src: url('../../assets/fonts/ttf/InstrumentSerif-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Instrument Serif';
    src: url('../../assets/fonts/ttf/InstrumentSerif-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'PP Neue Montreal';
    src: url('../../assets/fonts/otf/ppneuemontreal-medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'PP Neue Montreal';
    src: url('../../assets/fonts/otf/ppneuemontreal-semibolditalic.otf') format('opentype');
    font-weight: 600;
    font-style: italic;
}

:root {
    --color-bg: #230af9;
    --color-accent: #00FB17;
    --color-white: #FFFFFF;
    --color-black: #000000;
    --color-grid-line: rgb(255, 255, 255);
    --font-display: 'Instrument Serif', serif;
    --font-body: 'PP Neue Montreal', sans-serif;
    --font-size-body: 2.5rem;
    --font-size-menu: clamp(1.2rem, 2.5vw, 2.5rem);
    --layout-col-left: 52%;
    --cursor-size: 30px;
}

#custom-cursor {
    position: fixed;
    width: var(--cursor-size);
    height: var(--cursor-size);
    background: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
    display: block;
}

body,
body * {
    cursor: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.highlight {
    background-color: var(--color-accent);
    color: var(--color-black);
    display: inline;
    font-family: var(--font-body);
    font-style: italic;
    padding: 0 0.375rem;
}

.grid {
    display: grid;
    grid-template-columns: 7vw 86vw 7vw;
    grid-template-rows: 7vh 13vh 72vh 8vh;
    width: 100vw;
    height: 100vh;
    background: var(--color-bg);
}

.cell {
    border: none;
    border-right: 1px solid var(--color-grid-line);
    border-bottom: 1px solid var(--color-grid-line);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.cell:nth-child(3n+1) {
    border-left: 1px solid var(--color-grid-line);
}

.cell:nth-child(-n+3) {
    border-top: 1px solid var(--color-grid-line);
}

#split-cell {
    padding: 0;
}

.sub-grid {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
}

.logo-cell {
    flex: 0 0 var(--layout-col-left);
    height: 192%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: visible;
    position: relative;
    z-index: 2;
}

.logo {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: left top;
    display: block;
}

.menu-bar {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    background: var(--color-bg);
    overflow: hidden;
}

.menu-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
}

.menu-item a {
    color: var(--color-white);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 1rem;
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: var(--font-size-menu);
    white-space: nowrap;
}

.menu-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-white);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.menu-item a:hover::after {
    transform: scaleX(1);
}

.menu-item a:hover {
    font-style: italic;
}

.menu-item a.active {
    color: var(--color-black);
}

.menu-item a.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-accent);
    z-index: -1;
    animation: swipeActive 0.45s ease-out;
    transform-origin: left;
}

@keyframes swipeActive {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

#scroll-bar-cell {
    padding: 0 2vw;
}

.scroll-bar-status {
    display: flex;
    align-items: center;
    gap: 2vw;
    width: 100%;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    color: var(--color-white);
}

.scroll-bar-track {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    position: relative;
}

.scroll-bar-progress {
    position: absolute;
    top: -1px;
    left: 0;
    height: 3px;
    width: 20%;
    background: var(--color-accent);
}

.cell.mobile-fill {
    display: none;
}

@media (max-width: 1100px) {
    html,
    body {
        height: auto;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
    }

    #custom-cursor {
        display: none;
    }

    body,
    body * {
        cursor: auto !important;
    }

    .grid {
        grid-template-rows: 5vh 13vh 7vh auto 7vh;
        height: auto;
        min-height: 100dvh;
    }

    .cell.mobile-fill {
        display: flex;
    }

    .cell:nth-child(5) {
        grid-row: 2 / 4;
        grid-column: 2;
    }

    .cell:nth-child(8) {
        grid-row: 4;
        grid-column: 2;
    }

    .cell:nth-child(11) {
        grid-row: 5;
        grid-column: 2;
    }

    .sub-grid {
        flex-direction: column;
    }

    .logo-cell {
        flex: 0 0 auto;
        width: 100%;
        height: 65%;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        padding: 0;
        border-bottom: 1px solid var(--color-grid-line);
    }

    .logo {
        height: 100%;
        width: auto;
        max-width: 100%;
        object-position: center;
    }

    .menu-bar {
        flex: 0 0 auto;
        width: 100%;
        height: 35%;
        overflow: visible;
    }

    :root {
        --font-size-menu: clamp(1.05rem, 5vw, 1.8rem);
    }

    .menu-item a {
        padding: 0.25rem 0.3rem;
    }

    .scroll-bar-status {
        display: none;
    }
}