/* =========================================================
   SANOSKE — ARCHIVE
   Style inspired by this AO3 skin: https://github.com/memorizingthedigitsofpi/medieval-times-AO3-skin
   ========================================================= */

@font-face {
    font-family: "Cokenvat";
    src: url("fonts/CokenvatDemo-2veJ3.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --paper: #e2d9bf;
    --paper-light: #eee7d3;
    --ink: #30291f;
    --burgundy: #a20d43;
    --burgundy-dark: #760b34;
    --gold: #b59b61;
    --gold-light: #d4c18e;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 18px;
    color: var(--ink);
    background-color: white;
    background-image: url("https://64.media.tumblr.com/b435c5f4f58a551bc2a04d3baf0966ec/28df75b586705f4b-be/s1280x1920/5212a899bdbd5f65ccc29ed438adbf5c1fb1f3ee.png");
    background-repeat: repeat;
    background-position: center;
    background-attachment: fixed;
    font-family: "EB Garamond", Georgia, serif;
}

/* PARCHMENT PAGE */

.page-frame {
    position: relative;
    width: min(100%, 1180px);
    min-height: calc(100vh - 36px);
    margin: 0 auto;
    padding: 25px;

    background: var(--paper);

    border: 75px solid transparent;
    border-image: url("https://64.media.tumblr.com/5b41b48ccce874ea293e7503e1dce1fd/ad2373978cc6ca4e-52/s640x960/422f4d1e1b61066e11832919423caba615241c68.png") 25% round;

    box-shadow: 0 8px 25px rgba(0,0,0,.15);
}

/* MASTHEAD */

.masthead {
    position: relative;
    z-index: 1;
    min-height: 220px;
    padding: 25px 24px 0;
    text-align: center;

    border: 25px solid transparent;
    border-image: url("https://64.media.tumblr.com/5b41b48ccce874ea293e7503e1dce1fd/ad2373978cc6ca4e-52/s640x960/422f4d1e1b61066e11832919423caba615241c68.png") 25% round;

    background: rgba(226,217,191,.75);
}

/* DECORATIVE CORNERS */

.corner {
    position: absolute;
    z-index: 2;
    color: var(--burgundy);
    font-family: Georgia, serif;
    font-size: 34px;
    line-height: 1;
    text-shadow: 1px 1px 0 var(--gold-light);
    pointer-events: none;
}

.corner-tl {
    top: 7px;
    left: 8px;
    transform: rotate(-45deg);
}

.corner-tr {
    top: 7px;
    right: 8px;
    transform: rotate(45deg) scaleX(-1);
}

.corner-bl {
    bottom: 7px;
    left: 8px;
    transform: rotate(-135deg);
}

.corner-br {
    right: 8px;
    bottom: 7px;
    transform: rotate(135deg) scaleX(-1);
}

/* COKENVAT TITLE FONT */

.site-title {
    display: inline-block;
    margin: 0;
    color: var(--burgundy);
    font-family: "Cokenvat";
    font-size: clamp(3.5rem, 9vw, 6.5rem);
    font-weight: normal;
    line-height: 1.2;
    letter-spacing: .015em;
    text-decoration: none;
}

/* SUBTITLE */

.site-subtitle {
    margin: 5px 0 20px;
    color: var(--burgundy);
    font-size: clamp(1rem, 2.3vw, 1.35rem);
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.site-subtitle span {
    padding: 0 .25em;
    color: var(--gold);
    font-size: .8em;
}

/* NAVIGATION */

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px 13px;

    min-height: 57px;
    padding: 12px 10px;

    border-top: 1px solid var(--burgundy);
}

.main-nav a {
    color: var(--burgundy);
    font-size: 1.03rem;
    font-weight: 700;
    letter-spacing: .035em;
    text-decoration: none;
    text-transform: uppercase;
}

.main-nav a:hover {
    color: var(--burgundy-dark);
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.main-nav > span {
    color: var(--gold);
    font-size: .7rem;
}

/* EMPTY CONTENT AREA */

main {
    position: relative;
    z-index: 1;

    margin: 14px 0 0;
    padding: 10px;

    border: 35px solid transparent;
    border-image: url("https://64.media.tumblr.com/5b41b48ccce874ea293e7503e1dce1fd/ad2373978cc6ca4e-52/s640x960/422f4d1e1b61066e11832919423caba615241c68.png") 25% round;

    background: rgba(238,231,211,.85);
}

main section {
    min-height: 1px;
}

/* ACCESSIBILITY */

a:focus-visible {
    outline: 2px solid #315f78;
    outline-offset: 4px;
}

/* MOBILE */

@media (max-width: 650px) {
    body {
        padding: 10px;
    }

    .page-frame {
        min-height: calc(100vh - 20px);
        padding: 10px;
    }

    .masthead {
        min-height: 205px;
        padding: 28px 12px 0;
    }

    .site-title {
        font-size: clamp(3rem, 13vw, 5rem);
    }

    .site-subtitle {
        margin-bottom: 15px;
        font-size: .95rem;
    }

    .main-nav {
        gap: 8px 10px;
        padding: 13px 4px;
    }

    .main-nav a {
        font-size: .92rem;
    }

    main {
        border-width: 6px;
        padding: 7px;
    }

    .corner {
        font-size: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
