@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
:root {
    --bg: #f8eeca;
    --txt: #352409;
    --link: #5aa105;
    --linkhover: #6dc009;
    --acc: #c8f26c;
    --tumm: #ded09e;
    --karmyfilter: hue-rotate(-15deg) drop-shadow(2px 5px var(--acc));
    --bodymarg: 15px;
}
.tumma {
    --bg: #121220;
    --txt: lavender;
    --link: #eddb4b;
    --linkhover: #f6bf18;
    --acc: rebeccapurple;
    --tumm: rgba(255, 255, 255, 0.3);
    --karmyfilter: hue-rotate(-35deg) drop-shadow(2px 5px var(--acc));
}
body {
    background-color: var(--bg);
    margin: 15px 0 30px 0;
    font-family: 'Inter', 'Verdana';
    font-size: 1em;
    line-height: 1.6;
    color: var(--txt);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
img {
    max-width: 100%;
}
hr {
    border: none;
    border-bottom: solid 1px var(--tumm);
    margin: 2em 0;
}
a, a:visited {
    text-decoration-line: underline;
    text-decoration-style: wavy;
    text-decoration-thickness: 1px;
    color: var(--link);
}
a:hover {
    color: var(--linkhover);
}
h1 {
    margin: 40px 0;
    text-align: center;
    text-transform: uppercase;
    font-size: 1.5em;
    letter-spacing: 2px;
}
h1:before, h1:after {
    content: '⋆.˚';
    margin: 0 5px;
    display: inline-block;
}
h1:after {
    transform: scaleY(-1);
}
h2 {
    margin: 1em 0;
    font-size: 1.4em;
}
.kaikki {
    display: block;
    margin: auto;
    max-width: 700px;
    padding: 0 var(--bodymarg);
    margin-top: 30px;
}
.kaikki.levea {
    max-width: 1000px;
}
/*listat*/
ul  {
    margin: 0;
    padding: 0 0 0 15px;
}
li {
    margin: 0;
    padding: 0;
}
ul.nobull {
    list-style-type:none;
}
ul.nobull li::before {
    content: '';
    margin-left: -15px;
}

/*menu*/
#mobinav {
    display: none;
}
nav {
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    gap: 15px 30px;
    flex-wrap: wrap;
}
nav a, nav a:visited {
    color: var(--txt);
    text-decoration: none;
    cursor: pointer;
}
nav a:hover, nav a.nykysivu {
    text-decoration-line: underline;
    text-decoration-style: wavy;
    text-decoration-thickness: 1px;
    color: var(--txt)
}
nav img {
    max-height: 1em;
    border-radius: 3px;
}
.tumma nav img {
    filter: invert(1) contrast(0.9);
}
/*etusivu*/
#karmy {
    margin-bottom: 20px;
    filter: var(--karmyfilter);
    width: 600px;
    max-width: 100%;
    margin: 0px auto 40px auto;
    display: block;
}
#mato {
    display: none;
}
.rssbtn {
    height: 17px;
    vertical-align: center;
    margin-left: 5px;
    opacity: 0.9;
    border-radius: 3px;
}
.tumma .rssbtn {
    filter: invert(1);
}
.paivi {
    display: grid;
    grid-template-columns: min-content auto;
    gap: 10px;
}
.paivi .pvm {
    margin: 0;
    font-weight: 700;
    text-wrap: nowrap;
}

/*taikarumpu navit*/
.taikar-navi {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
}
.taikar-sivunumerot a {
    width: 30px;
    line-height: 30px;
    display: inline-block;
    text-align: center;
    color: var(--link);
    text-decoration: none;
    border-radius: 50%;
}
.taikar-sivunumerot a:hover {
    background-color: var(--link);
    color: var(--bg);
}

/*kuvasivut*/
.galtsu {
    max-width: 100%;
    display: block;
    margin: auto;
    margin-top: 2em;
}
.galtsuntiedot {
    display: flex;
    align-items:baseline;
    gap: 7px;
    flex-wrap: wrap;
    flex-direction: row;
}
.galtsuntiedot h3, .galtsuntiedot h2 {
    margin: 0;
    font-size: 1.2em;
}
.galtsuntiedot span:before {
    content: '/';
    margin-right: 7px;
    color: var(--tumm);
}
.imgdsc {
    text-align: center;
}
.isokuvalinkki:after {
    content: '(Avaa isompana)';
}
.edseu {
    text-align: center;
    margin-top: 2em;
    white-space: nowrap;
    display: flex;
    gap: 20px;
    justify-content: center;
}

/*galleria esikatselut*/
.galleria {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 7px;
}
.poytalaatikko {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 2em;
}
.poytakehys {
   position: relative;
   text-align: center;
   font-weight: 600;
   line-height: 1.8;
}
.poytalaatikko .peukku {
    aspect-ratio: 1;
}
.peukku {
    aspect-ratio: 1;
    position: relative;
}
.peukku .k {
    height: 100%;
    width: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: 0.1s;
}
.peukku:hover .k {
    opacity: 0.8;
}
.peukku .moni {
    position: absolute;
    top: 5%;
    right: 5%;
    height: 30px;
    width:auto;
    filter: drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.3));
    pointer-events: none;
}

/* teemanappi */
.tmnappi {
    --korkeus: 20px;
    --leveys: 30px;
    --padding: 3px;
    --siirto: calc(var(--leveys) - var(--korkeus));
    display: inline-block;
    width: var(--leveys);
    height: var(--korkeus);
    border-radius: var(--korkeus);
    position: relative;
    background-color: rgb(50, 214, 255);
    transition: 0.1s;
}
.tmnupi {
    position: absolute;
    top: var(--padding);
    left: var(--padding);
    display: inline-block;
    aspect-ratio: 1;
    height: calc((var(--korkeus)) - (var(--padding) * 2));
    border-radius: 50%;
    transition: inherit;
    background-color: white;
    background-image: radial-gradient(circle at 30% 30%, transparent 40%, white 45%);
}
.tumma .tmnappi {
    background-color: #6563f0;
}
.tumma .tmnappi .tmnupi {
    transform: translateX(var(--siirto));
    background-color: transparent;
    outline: 0;
}

/*============== MOBIILI ================*/

@media (max-width: 500px) {
    h1:after, h1:before {
        display: none;
    }
    #mobititteli {
        display: block;
        width: 200px;
    }
    .tumma #mobititteli {
        filter: invert(0.95);
    }
    #karmy {
        display: none;
    }
    #mato {
        display: block;
        width: 200px;
        filter: var(--karmyfilter);
        margin: 40px auto 40px auto;
    }
    #mobinav {
        display: flex;
        justify-content: space-between;
        margin: 0 var(--bodymarg);
        padding-bottom: 10px;
        border-bottom: solid 1px var(--txt);
    }
    nav {
        display: none;
        flex-direction: column;
        text-align: center;
        gap: 10px;
        margin: 0 var(--bodymarg);
        border-bottom: solid 1px var(--txt);
        padding: 35px 0 30px 0;
        font-size: 1.2em;
    }
    nav a {
        padding: 0;
    }
    nav.naviesiin {
        display: flex;
    }
    nav img {
        max-height: 1.3em;
        margin-top: 10px;
    }
    #hampis {
        width: 32px;
        cursor: pointer;
        display: inline-block;
    }
    #hampis > div {
        height: 4px;
        background-color: var(--txt);
        border-radius: 5px;
        margin-bottom: 5px;
        transition: 0.1s;
    }
    #hampis.naviesiin > div:first-of-type {
        transform: translateY(9px) rotate(45deg);
    }
    #hampis.naviesiin > div:nth-of-type(2n) {
        transform: rotate(-45deg);
    }
    #hampis.naviesiin > div:nth-of-type(3n) {
        opacity: 0;
    }
    .paivi {
        grid-template-columns: auto;
        gap: 0;
    }
    .paivi .pvm {
        margin-top: 10px;
        font-size: 120%;
    }
    .paivi .paivtxt {
        margin-bottom: 1.5em;
    }
    .galleria {
        grid-template-columns: repeat(3, 1fr);
    }
    .poytalaatikko {
        grid-template-columns: repeat(2, 1fr);
    }
    .poytalaatikko .peukku {
        aspect-ratio: 1/0.6;
    }
    .galtsuntiedot {
        flex-direction: column;
        gap: 0;
    }
    .galtsuntiedot span:before {
        display: none;
    }
}