/* Base Styles */
body {
    margin: 0;
    padding: 0;
    overscroll-behavior: none;
    font-family: 'Nanum Myeongjo', serif;
    color: #fff;
    background: #050505;
    scroll-behavior: smooth;
    overflow: hidden;
}

/* ========== LOADING SCREEN ========== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #050505;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 320px;
}

.loader-title {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 28px;
    font-weight: 100;
    letter-spacing: 1.2em;
    color: #fff;
    text-indent: 1.2em;
    opacity: 0;
    animation: loaderTitleIn 1s ease forwards 0.2s;
}

.loader-bar {
    width: 100%;
    height: 1px;
    background: #ffffff15;
    position: relative;
    overflow: hidden;
}

.loader-bar-inner {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, transparent, #ffffff80, #fff);
    transition: width 0.3s ease;
    position: relative;
}

.loader-bar-inner::after {
    content: '';
    position: absolute;
    right: 0;
    top: -3px;
    width: 6px;
    height: 7px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 12px #fff, 0 0 24px rgba(255,255,255,0.3);
}

.loader-percent {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 11px;
    font-weight: 100;
    letter-spacing: 0.5em;
    color: #ffffff50;
    transition: color 0.3s ease;
}

.loader-subtitle {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 11px;
    font-weight: 100;
    color: #ffffff30;
    letter-spacing: 0.3em;
    animation: subtitlePulse 2s ease-in-out infinite;
}

@keyframes loaderTitleIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes subtitlePulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* ========== NAVIGATION ========== */
nav {
    width: 100%;
    padding: 1rem;
    position: fixed;
    z-index: 2;
}

nav span {
    display: inline-block;
    pointer-events: none;
    transition: transform 0.1s linear;
}

/* Cursor Styles */
.cursor {
    pointer-events: none;
    position: fixed;
    top: 10px;
    left: 10px;
    padding: 10px;
    background-color: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    transition: transform .8s ease, opacity 0.6s ease;
    z-index: 2;
    will-change: transform;
}

.a {
    display: inline-block;
    color: #fff;
    padding: 1rem;
    margin-right: 4rem;
    letter-spacing: .4em;
    font-size: .9em;
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
}

/* Navigation Hover Effects */
nav.header .a:hover {
    cursor: pointer;
    color: rgb(175, 175, 175);
    transform: scale(1.1);
}

nav.header .a:hover ~ .cursor {
    transform: translate(-50%, -50%) scale(5);
    opacity: 0.1;
}

/* ========== CANVAS CONTAINERS ========== */
#canvas-container {
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    outline: none;
    z-index: 0;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at center, #171717 0, #050505 58%);
}

#canvas-container-details {
    position: absolute;
    top: 0;
    left: 0;
    outline: none;
    z-index: 0;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    pointer-events: all;
    overflow: hidden;
}

/* ========== SECTIONS ========== */
.section {
    user-select: none;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    padding-left: 5%;
    padding-right: 5%;
    z-index: 1;
    width: 65%;
    height: 100vh;
    pointer-events: none;
}

/* ========== HEADER ========== */
.header {
    position: absolute;
    top: -2em;
    left: 0;
    color: #fff;
    font-size: .8em;
    width: 100%;
    text-align: center;
    font-family: 'Josefin Sans', sans-serif;
    z-index: 2;
    opacity: 0;
    transition: top 1.9s ease-in-out, opacity 1.9s ease-in-out;
    padding: 0;
    margin: 0;
}

.header.ended {
    top: 3em;
    opacity: 1;
}

.header>span {
    padding: 0 3.25em;
    letter-spacing: .4em;
    position: relative;
}

.header>span.active:after,
.first {
    position: absolute;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
}

.header>span.active:after {
    content: "";
    bottom: -10px;
    width: 20px;
    height: 2px;
    background: #fff;
}

/* ========== FIRST SECTION ========== */
.first {
    pointer-events: none;
    font-size: 2em;
    letter-spacing: .5em;
    text-align: center;
    width: 100%;
    display: flex;
    height: 120vh;
    align-content: center;
    justify-content: flex-end;
    align-items: center;
    flex-direction: column;
    user-select: none;
    position: relative;
    z-index: 1;
    background: linear-gradient(0deg, rgba(5, 5, 5, 1) 20%, rgba(5, 5, 5, 0) 50%);
}

.first>h2 {
    font-size: 1em;
    line-height: 0;
    font-weight: 100;
    letter-spacing: .25em;
    font-style: italic;
    margin: 35px;
}

.first>h1 {
    margin: 10px 0;
    font-weight: 100;
    letter-spacing: 0.4em;
}

.first>h1:after {
    content: "";
    position: absolute;
    margin-top: 105px;
    left: calc(50% - 25px);
    width: 50px;
    height: 2px;
    background: #ffffff70;
}

.first>p {
    font-size: 13px;
    letter-spacing: 0px;
    font-family: sans-serif;
    max-width: 700px;
    width: 90%;
    line-height: 30px;
    font-weight: lighter;
    margin-top: 50px;
    margin-bottom: 100px;
    color: #c9c9c996;
    opacity: 0;
    transition: opacity 3.9s ease-in-out;
}

.first>p.ended {
    opacity: 1;
}

/* ========== SECTION DIVIDER ========== */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    z-index: 1;
    position: relative;
    background: #050505;
}

.divider-line {
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ffffff30, transparent);
}

.divider-symbol {
    font-size: 8px;
    color: #ffffff30;
    margin: 0 20px;
}

/* ========== SECOND SECTION ========== */
.second {
    pointer-events: all;
    font-size: 2em;
    width: 100%;
    display: flex;
    height: 100vh;
    background: #141414;
    z-index: 1;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.second-container {
    pointer-events: all;
    width: 100%;
    display: flex;
    height: 100vh;
    margin: 0;
    padding: 0 10%;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
    background: radial-gradient(circle at 90% 50%, rgba(5, 5, 5, 0) 30%, #141414 70%);
}

.section-label {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 10px;
    font-weight: 100;
    letter-spacing: 0.6em;
    color: #ffffff25;
    text-transform: uppercase;
    margin: 0 0 30px 60px;
}

.second-container>ul {
    list-style: none;
    display: inline-flex;
    padding: 0px;
    margin: 0px 0px 30px 60px;
    font-family: 'DM Serif Display', serif;
    color: #ffffff1c;
    z-index: 2;
}

.second-container>ul>li.active:after {
    content: "";
    top: 20px;
    width: 50px;
    height: 2px;
    background: #fff;
    position: relative;
    left: 0px;
    display: block;
}

.second-container>ul>li {
    padding-right: 20px;
    transition: color 0.8s ease-out;
}

.second-container>ul>li:hover {
    color: whitesmoke;
    pointer-events: all;
    cursor: pointer;
}

.second-container>ul>li.active {
    color: whitesmoke;
}

.second-container>p {
    font-size: 14px;
    font-family: sans-serif;
    line-height: 26px;
    width: 35%;
    color: #898989;
    margin-left: 60px;
    min-height: 200px;
}

/* ========== THIRD SECTION ========== */
.third {
    user-select: none;
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.third>h1 {
    width: 100%;
    text-align: center;
    font-size: 15vw;
    font-weight: 100;
    letter-spacing: -6px;
    color: whitesmoke;
    margin: 40px 0;
    padding: 0;
}

.third>p {
    width: 60%;
    font-size: 15px;
    font-family: sans-serif;
    font-weight: 100;
    line-height: 30px;
    color: #898989;
    text-align: center;
}

/* ========== FOURTH SECTION ========== */
.fourth {
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    min-height: 80vh;
    z-index: 1;
    background: linear-gradient(180deg, transparent 0%, #0a0a0a 20%, #0a0a0a 80%, transparent 100%);
}

.fourth-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 900px;
    width: 90%;
    padding: 60px 0;
}

.fourth-content>h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 3em;
    font-weight: 100;
    letter-spacing: 0.15em;
    color: #ffffff;
    margin: 0 0 60px 0;
    text-align: center;
}

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-bottom: 60px;
    width: 100%;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.stat-number {
    font-family: 'DM Serif Display', serif;
    font-size: 42px;
    font-weight: 100;
    color: #fff;
    letter-spacing: 0.05em;
}

.stat-label {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 10px;
    font-weight: 100;
    letter-spacing: 0.4em;
    color: #ffffff40;
    text-transform: uppercase;
}

.fourth-text {
    font-size: 14px;
    font-family: sans-serif;
    line-height: 28px;
    color: #898989;
    text-align: center;
    max-width: 600px;
    font-weight: lighter;
}

/* ========== FOOTER ========== */
.footer {
    border: none;
    width: 100%;
    margin-bottom: 40px;
    font-family: sans-serif;
    font-size: 9px;
    transition: all 0.8s ease-out 1.1s;
    bottom: 0;
    color: antiquewhite;
    font-weight: 100;
    opacity: 0.5;
    text-align: center;
}

.footer a {
    text-decoration: none;
    pointer-events: auto;
    color: antiquewhite;
}

/* ========== RESPONSIVE ========== */

/* Tablet */
@media only screen and (max-width: 1024px) {
    .a {
        margin-right: 2rem;
    }

    .second-container>p {
        width: 50%;
    }

    .stats-grid {
        gap: 50px;
    }

    .third>p {
        width: 75%;
    }
}

/* Mobile */
@media only screen and (max-width: 660px) {
    .a {
        padding: 8px 6px;
        margin-right: 0;
        letter-spacing: 0.2em;
        font-size: .7em;
    }

    .header {
        font-size: .6em;
    }

    .header.ended {
        top: 1.5em;
    }

    .header>span {
        padding: 0 0.6em;
    }

    .cursor {
        display: none;
    }

    .footer {
        margin-bottom: 20px;
    }

    .first>h2 {
        font-size: 0.7em;
        margin: 20px;
    }

    .first>h1 {
        font-weight: 100;
        letter-spacing: 0.15em;
        font-size: 11vw;
    }

    .first>h1:after {
        margin-top: 70px;
    }

    .first>p {
        width: 85%;
        line-height: 24px;
        font-size: 12px;
        margin-top: 35px;
        margin-bottom: 60px;
    }

    .section-divider {
        padding: 10px 0;
    }

    .divider-line {
        width: 60px;
    }

    .second {
        height: auto;
        min-height: 100vh;
    }

    .second-container {
        padding: 60px 5% 40px;
        justify-content: flex-end;
        height: auto;
        min-height: 100vh;
    }

    .section-label {
        margin-left: 20px;
        font-size: 8px;
        margin-bottom: 20px;
    }

    .second-container>ul {
        margin: 0 0 20px 20px;
        width: 90%;
        flex-wrap: wrap;
        gap: 5px;
    }

    .second-container>ul>li {
        padding-right: 15px;
        font-size: 18px;
    }

    .second-container>p {
        width: 90%;
        margin-left: 20px;
        line-height: 22px;
        font-size: 13px;
        margin-bottom: 40px;
        min-height: auto;
    }

    .third {
        height: auto;
        min-height: 80vh;
        padding: 60px 0;
    }

    .third>h1 {
        font-size: 16vw;
        margin: 20px 0;
    }

    .third>p {
        width: 85%;
        line-height: 24px;
        font-size: 13px;
    }

    .fourth {
        min-height: auto;
        padding: 40px 0;
    }

    .fourth-content {
        padding: 40px 0;
    }

    .fourth-content>h2 {
        font-size: 1.8em;
        margin-bottom: 40px;
        letter-spacing: 0.1em;
    }

    .stats-grid {
        flex-direction: column;
        gap: 30px;
        align-items: center;
        margin-bottom: 40px;
    }

    .stat-number {
        font-size: 32px;
    }

    .stat-label {
        font-size: 9px;
        letter-spacing: 0.3em;
    }

    .fourth-text {
        width: 85%;
        line-height: 24px;
        font-size: 13px;
    }

    .loader-content {
        width: 260px;
    }

    .loader-title {
        font-size: 20px;
        letter-spacing: 0.8em;
        text-indent: 0.8em;
    }
}

/* Very small screens */
@media only screen and (max-width: 380px) {
    .a {
        padding: 6px 4px;
        letter-spacing: 0.12em;
        font-size: .6em;
    }

    .header>span {
        padding: 0 0.4em;
    }

    .first>h1 {
        font-size: 9vw;
        letter-spacing: 0.1em;
    }

    .first>p {
        width: 90%;
        font-size: 11px;
        line-height: 22px;
    }

    .second-container>ul>li {
        font-size: 16px;
    }

    .third>h1 {
        font-size: 14vw;
    }

    .fourth-content>h2 {
        font-size: 1.4em;
    }

    .stat-number {
        font-size: 28px;
    }
}

