@font-face {
    font-family: 'EB Garamond';
    src: url('EBGaramond[wght].ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'EB Garamond';
    src: url('EBGaramond-Italic[wght].ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

html, body {
    height: 100vh;
    margin: 0;
}

body {
    background-color: #050505;
    color: #7c693b;
    font-family: 'EB Garamond', serif;
    font-size: 18px;
    font-weight: 450;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    body {
        font-size: 12px;
    }
}

#page {
    box-sizing: border-box;
    margin: 0 auto;
    min-height: 100vh;
    max-width: 1200px;
    padding: 0 4em 2em 4em;
}

#page.bg {
    background-image: url('../images/the-noone.png');
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
}

.language-note {
    text-align: center;
    font-size: 1.2em;
    margin-top: 2em;
    opacity: 0.6;
}
.language-note a {
    color: inherit;
    text-decoration: underline;
}
.language-note a:hover {
    text-decoration: none;
}

#intro {
    margin-top: 30em;
}

#end-chapter {
    margin-top: 60em;
    text-align: center;
}


@media (max-height: 1200px) {
    #intro {
        margin-top: 2em;
    }

    #end-chapter {
        margin-top: 20em;
    }
}

h1 {
    font-size: 3em;
    font-weight: 600;
    margin: 10px 0;
    text-align: center;
}

h2 {
    font-size: 2em;
    font-weight: bold;
    margin: 0 0 1em 0;
    text-align: center;
}

p {
    font-size: 2em;
}

#navigation {
    background-color: #0a0a0a;
    display: flex;
    font-family: 'EB Garamond', serif;
    font-size: 1.5em;
    gap: 2rem;
    justify-content: center;
    padding: 2em 0;
    text-align: center;
}

#navigation a.nav {
    color: #7c693b;
    opacity: 0.9;
    text-decoration: none;
    transition: color 0.3s;
}

#navigation a.nav:hover {
    color: #bda76a;
}

#navigation a.disabled {
    color: #444;
    cursor: default;
    margin: 0 1em;
    opacity: 0.5;
    pointer-events: none;
}

#overview-page {
    column-count: 3;
    column-fill: balance-all;
    column-gap: 2em;
}

@media (max-width: 800px) {
    #overview-page {
        column-count: 1;
    }
}

#overview-page ol {
    font-size: 1.8em;
    line-height: 1.5em;
    list-style: decimal;
    margin: 0;
    orphans: 2;
    padding-left: 1.5rem;
    widows: 2;
}

#overview-page ol li a {
    color: #7c693b;
    text-decoration: none;
    transition: color 0.2s ease;
}

#overview-page ol li a:hover {
    animation: glowPulse 1.8s ease-in-out infinite;
    color: #e0d4a5;
    text-decoration: underline;
    text-decoration-color: #e0d4a5;
    text-decoration-thickness: 1px;
    text-shadow: 0 0 6px #e0d4a5aa, 0 0 10px #e0d4a555;
    text-underline-offset: 3px;
}

#overview-page ol li:last-child a {
    font-style: italic;
}

#overview-page ol li.chapter {
    font-weight: bold;
}

#overview-page ol li.touch {
    opacity: 0.9;
}

#overview-page ol li.unwritten {
    font-style: italic;
    opacity: 0.7;
}

#overview-page ol li a.disabled:hover {
    background: none;
    text-shadow: none;
}

#overview-page ol li .tooltip a.disabled {
    color: #5c4e37;
    cursor: default;
    font-style: italic;
    opacity: 0.9;
    pointer-events: none;
    text-decoration: none;
}

#page .story img {
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(255, 225, 150, 0.08);
    display: inline-block;
    float: right;
    margin: 0 0 2em 2em;
    width: 40%;
}

@media (max-width: 800px) {
    #page .story img {
        float: none;
        display: block;
        margin: 2em auto;
        width: 80%;
    }
}

#page figure.touch figcaption {
    font-style: italic;
    font-size: 2em;
}

#page div.touch {
    text-align: center;
}

#page div.touch img {
    width: 100%;
}

p {
    margin: 0;
    padding: 0 0 1em 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.tooltip {
    display: inline-block;
    position: relative;
    vertical-align: top;
}

.tooltip .tooltiptext {
    background-color: #2e2a20;
    border-radius: 4px;
    bottom: 125%;
    box-shadow: 0 0 4px #00000077;
    color: #e0d4a5;
    font-size: 0.9em;
    left: 50%;
    opacity: 0;
    padding: 4px 8px;
    pointer-events: none;
    position: absolute;
    text-align: center;
    transform: translateX(-50%);
    transition: opacity 0.2s ease;
    visibility: hidden;
    white-space: nowrap;
    z-index: 1;
}

.tooltip .tooltiptext::after {
    border-color: #2e2a20 transparent transparent transparent;
    border-style: solid;
    border-width: 5px;
    content: "";
    left: 50%;
    margin-left: -5px;
    position: absolute;
    top: 100%;
}

.tooltip:hover .tooltiptext {
    opacity: 1;
    visibility: visible;
}

@keyframes glowPulse {
    0%, 100% {
        text-shadow: 0 0 6px #e0d4a5aa, 0 0 10px #e0d4a555;
    }
    50% {
        text-shadow: 0 0 10px #fff0c0, 0 0 14px #e0d4a5;
    }
}
