@import "tailwindcss"; 

:root {
    --spacing: 1px;
    --refpx: 16; /*value used as a reference to convert some pixel values into rem values. DO NOT change.*/
}
/* 
html{
    font-size: clamp(12px, 100vw/120, 16px);
} */

@font-face{
    font-family: "baskervville-r";
    src: url("https://cdn.jsdelivr.net/gh/YaozhengS/Colorblind-Students-in-Gaokao@main/typefaces/Baskervville/Baskervville-Regular.ttf") format("truetype");
}

@font-face{
    font-family: "baskervville-i";
    src: url("https://cdn.jsdelivr.net/gh/YaozhengS/Colorblind-Students-in-Gaokao@main/typefaces/Baskervville/Baskervville-Italic.ttf") format("truetype");
}

@font-face {
    font-family: "openBaskerville-r";
    src: url("https://cdn.jsdelivr.net/gh/YaozhengS/Colorblind-Students-in-Gaokao@main/typefaces/OpenBaskerville/OpenBaskerville-0.0.53.otf") format("opentype");
}

@font-face {
    font-family: "libreBaskerville-b";
    src: url("https://cdn.jsdelivr.net/gh/YaozhengS/Colorblind-Students-in-Gaokao@main/Libre_Baskerville/LibreBaskerville-Bold.ttf") format("truetype");
}

@font-face {
    font-family: "sourceSongti-r";
    src: url("https://cdn.jsdelivr.net/gh/YaozhengS/Colorblind-Students-in-Gaokao@main/typefaces/SourceSongti/SourceHanSerifCN-Regular.otf") format("opentype");
}

@font-face {
    font-family: "sourceSongti-m";
    src: url("https://cdn.jsdelivr.net/gh/YaozhengS/Colorblind-Students-in-Gaokao@main/typefaces/SourceSongti/SourceHanSerifCN-Medium.otf") format("opentype");
}

@font-face {
    font-family: "sourceSongti-sb";
    src: url("https://cdn.jsdelivr.net/gh/YaozhengS/Colorblind-Students-in-Gaokao@main/typefaces/SourceSongti/SourceHanSerifCN-SemiBold.otf") format("opentype");
}

@font-face {
    font-family: "sourceSongti-b";
    src: url("https://cdn.jsdelivr.net/gh/YaozhengS/Colorblind-Students-in-Gaokao@main/typefaces/SourceSongti/SourceHanSerifCN-Bold.otf") format("opentype");
}

@font-face {
    font-family: "sourceHeiti-n";
    src: url("https://cdn.jsdelivr.net/gh/YaozhengS/Colorblind-Students-in-Gaokao@main/typefaces/SourceHeiti/SourceHanSansCN-Normal.otf") format("opentype");
}

@font-face{
    font-family: "sourceHeiti-h";
    src: url("https://cdn.jsdelivr.net/gh/YaozhengS/Colorblind-Students-in-Gaokao@main/typefaces/SourceHeiti/SourceHanSansCN-Heavy.otf") format("opentype");
}

/* @font-face {
    font-family: "sourceSongti-r";
    src: url("../typefaces/SourceSongti/SourceHanSerifCN-Regular.otf") format("opentype");
}
@font-face {
    font-family: "sourceSongti-m";
    src: url("../typefaces/SourceSongti/SourceHanSerifCN-Medium.otf") format("opentype");
}
@font-face {
    font-family: "sourceSongti-sb";
    src: url("../typefaces/SourceSongti/SourceHanSerifCN-SemiBold.otf") format("opentype");
}
@font-face {
    font-family: "sourceSongti-b";
    src: url("../typefaces/SourceSongti/SourceHanSerifCN-Bold.otf") format("opentype");
}
@font-face {
    font-family: "sourceHeiti-n";
    src: url("../typefaces/SourceHeiti/SourceHanSansCN-Normal.otf") format("opentype");
}
@font-face{
    font-family: "sourceHeiti-h";
    src: url("../typefaces/SourceHeiti/SourceHanSansCN-Heavy.otf") format("opentype");
} */

/* @media (1350px <= width < 1690px){
    html{font-size: calc(0.8 * 16px);}
}

@media (width < 1350px){
    html{font-size: calc(0.7 * 16px);}
}  */

body{
    background-color: #FFF0CC;
    padding: 0;
    margin: 0;
}

section{
    height: 205vh;
    width: 100vw;
}

h1{
    font-family: openBaskerville-r;
    font-size: 2.25rem;
    font-weight: normal;
    line-height: normal;
    color: #DC4040;
    margin: 0;
}

h2{
    font-family: sourceSongti-b;
    font-size: 1.5rem;
    font-weight: normal;
    line-height: normal;
    color: #DC4040;
    margin: 0;
}

/* Navigation Bar Elements */

.navBar{
    position: fixed;
    display: flex;
    height: 7.375rem;
    width: calc(100vw - 4.5rem);
    top: 0;
    left: 0;
    margin: 0 2.25rem 0 2.25rem;
    z-index: 10;
    pointer-events: none;
}

.navBarTitleEN{
    font-family: openBaskerville-r;
    font-weight: normal;
    line-height: normal;
    color: #DC4040;
    font-size: 2.25rem;
    letter-spacing: calc(1rem * 1.08/var(--refpx));
    margin: 2.625rem 0 0 1.875rem;
    transition-duration: 0.55s;
    transition-timing-function: ease;
}

.navBarTitleCH{
    font-family: sourceSongti-b;
    font-weight: normal;
    line-height: normal;
    color: #DC4040;
    font-size: 1.5rem;
    letter-spacing: calc(1rem * 23.28/var(--refpx));
    margin: calc(1rem * 46.5/var(--refpx)) 0 0 calc(1rem * 27/var(--refpx));
    transition-duration: 0.55s;
    transition-timing-function: ease;
}

@media (max-width: 1689px){
    .navBarTitleCH{
        display: none;
    }
}

@media (max-width: 1325px){
    .navBarTitleEN{
        margin: 23px 0 0 1.875rem;
    }
}

#pageTitle1, #pageTitle2{
    opacity: 0;
}

a{
    pointer-events: auto;
}

.spacer{
    flex: 1;
}

.navBarButton1, .navBarButton2{
    display: flex;
    flex: none;
    flex-direction: column;
    padding: 1.375rem 1.875rem 0 1.875rem;
    margin-left: 2.25rem;
    align-items: center;
    pointer-events: auto;
    border-bottom: 3.5px solid #DC4040;
    background-color: #FFFBF0;
    transition-duration: 0.15s;
}

.navBarButton1:hover, .navBarButton2:hover{
    border-bottom: 4.5px solid #4D3636;
    transition-duration: 0.15s;
}

.navBarButton1:hover .navButtonTextCH{
    color: #4D3636;
    transition-duration: 0.15s;
}

.navBarButton1:hover .navButtonTextEN{
    color: #4D3636;
    transition-duration: 0.15s;
}

.navBarButton2:hover .navButtonTextCH{
    color: #4D3636;
    transition-duration: 0.15s;
}

.navBarButton2:hover .navButtonTextEN{
    color: #4D3636;
    transition-duration: 0.15s;
}

.navButtonTextCH{
    font-size: 1.25rem;
    letter-spacing: 1.5625rem;
    margin: -0.25rem -1.5625rem 0 0;
}

#ckzl{
    letter-spacing: 27px;
    margin: -4px -27px 0 0;
}

a{
    text-decoration: none;
}

/* Opening Page */

.openingPage{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.identityTitle{
    position: relative;
    width: 1170px;
    height: 157px;
    color: #DC4040;
}

.titleRedline{
    position: relative;
    top: 0;
    left: 6px;
    width: 1156px;
    height: 2px;
    background-color: #DC4040;
}

#idt1{
    position: absolute;
    top: 35px;
    left: 2px;
    font-size: 2.125rem;
}

#idt2{
    position: absolute;
    top: 38px;
    left: 292px;
    font-family: sourceSongti-m;
    font-size: 1.5rem;
    letter-spacing: 18px;
    color: black;
}

#idt3{
    position: absolute;
    top: 71px;
    left: 0;
    font-size: 4rem;
}

#idt4{
    position: absolute;
    top: 14px;
    left: 590px;
    font-size: 8rem;
}

.tips{
    position: absolute;
    bottom: 10vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    font-family: librebaskerville-b;
    font-size: 1.25rem;
    color: #DC4040;
    text-align: center;
}

.downArrow{
    position: relative;
    font-family: sourceSongti-m;
    font-size: 3rem;
    animation: movedown 3s infinite;
}

@keyframes pulse {
    0%{transform: scale(1);}
    50%{transform: scale(1.25);}
    100%{transform: scale(1);}
}

@keyframes movedown {
    0%{top: 0px;}
    67%{top: 18px;}
    70%{top: 18px;}
    100%{top: 0px;}
}

/* narrative pages */

.snapWrapper{
    height: 165vh;
    width: 100vw;
}

.snapWrapperFlex{
    height: 225vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.scrollDummy{
    position: absolute;
    height: 225vh;
    width: 100vw;
}

.contentWrapper{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.textHalf{
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-align: center;
    height: 37.5vh;
    width: 1520px;
    font-family: baskervville-r;
    font-size: 1.75rem;
    line-height: 2.75rem;
    color: black;
}

@media (width < 1600px){
    .textHalf br{
        display: none;
    }
    .textHalf{
        width: 90%;
        height: 42.5vh
    }
    .graphicHalf{
        width: 90vw !important;
        height: 57.5vh;
    }
}

sup{
    margin-left: 3px;
    color: #DC4040;
    font-family: sourceSongti-r;
}

.graphicHalf{
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    height: 62.5vh;
    width: 100vw;
}

.quote{
    font-family: baskervville-i;
    font-size: 2rem;
}

@layer components{
    .note{
        font-family: baskervville-r;
        font-size: 1.5rem;
        line-height: 2.25rem;
        margin-top: 5px;
    }
}

/* data visualization */

.dots{
    opacity: 0;
    transition-duration: 1.1s;
    aspect-ratio: 1000/98;
    height: 98px;
}

.dots-full{
    aspect-ratio: 1000/330;
    height: 330px;
}

.dots-special1{
    opacity: 0;
    transition-duration: 1.1s;
    position: absolute;
    top: calc(10vh + 58px);
    aspect-ratio: 424/40;
    height: 40px;
}

.dots-special2{
    opacity: 0;
    transition-duration: 1.1s;
    position: absolute;
    top: calc(10vh + 58px);
    margin-right: 32px;
    aspect-ratio: 840/98;
    height: 98px;
}

@media (width < 1600px){
    .dots{
        height: calc(0.75 * 98px);
    }
    .dots-full{
        height: calc(0.75 * 330px);
    }
    .dots-special1{
        height: calc(0.75 * 40px);
        top: calc(10vh + 0.75 * 58px);
    }
    .dots-special2{
        height: calc(0.75 * 98px);
        top: calc(10vh + 0.75 * 58px);
        margin-right: calc(0.75 * 32px);
    }
}

.scrollYindicator{
    position: fixed;
    left: 20px;
    bottom: 20px;
    font-size: 3rem;
    color: green;
}

.dropdown{
    font-size: 1.75rem;
    font-family: baskervville-r;
    padding: 5px 10px 5px 10px;
    background-color: white;
    border: 1px solid black;
    border-radius: 5px;
}

/* ending page */

.credits{
    width: 1110px;
    font-family: baskervville-r;
    font-size: 1.5rem;
    line-height: 2.25rem;
    text-align: center;
    color: black;
}

.highlight{
    font-family: libreBaskerville-b;
    color: #DC4040;
}

p + p{
    margin-top: 1.5rem;
}

.indicator{
    font-family: libreBaskerville-b;
    font-size: 1.5rem;
    color: #DC4040;
}

/* restart button */

.floatingButton{
    position: fixed;
    left: 66px;
    bottom: 41px;
    width: 197px;
    height: 114px;
    border: 2px solid #DC4040;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition-duration: 0.15s;
    opacity: 0;
}

.floatingButton:hover{
    width: 199px;
    height: 116px;
    border: 3px solid #4D3636;
    transition-duration: 0.15s;
}

.floatingButton:hover .rsb1{
    color: #4D3636;
    transition-duration: 0.15s;
}

.floatingButton:hover .rsb2{
    color: #4D3636;
    transition-duration: 0.15s;
}

.rsb1{
    margin-top: -4px;
    font-family: sourceSongti-b;
    font-size: 1.5rem;
    line-height: normal;
    color: #DC4040;
    transition-duration: 0.15s;
}

.rsb2{
    margin-top: -4px;
    font-family: openBaskerville-r;
    font-size: 2rem;
    line-height: normal;
    color: #DC4040;
    transition-duration: 0.15s;
}
