@import url('https://fonts.googleapis.com/css2?family=Markazi+Text:wght@400..700&display=swap');

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    scroll-margin-top: 40px;
    /*     outline-offset: -3px;
    transition: outline-offset .15s; */
}

*:focus-visible {
    outline: 4px solid var(--focus-visible);
}

header *:focus-visible {
    outline: 4px solid var(--light-primary);
    color: white;
}

::selection {
    background-color: var(--links);
}

main *::selection,
footer *::selection {
    color: var(--white);
}

main a::selection,
footer a::selection {
    color: #99c4d4;
}

:root {
    --dark-primary: #AF3235;
    --dark-secondary: #002846;
    --light-primary: #F4EFDA;
    --links: #17566D;
    --white: #FFFFFF;
    --hover-accent: rgba(0, 0, 0, 0.2);

    --text-primary: var(--dark-secondary);
    --nav-links: var(--light-primary);
    --focus-visible: var(--dark-primary);

    /* --font-xl: clamp(1.5rem, 10vw, 2.5rem); */
    /* --font-xl: clamp(1.5rem, 8vw, 2.5rem);
    --font-l: clamp(1rem, 6vw, 1.5rem);
    --font-m: clamp(1.8rem, 3vw, 2rem);
    --font-s: clamp(.8rem, 2.5vw, 1rem);
    --font-xs: clamp(.7rem, 2vw, .8rem); */
    --font-xl: 2.5rem;
    --font-l: 1.5rem;
    --font-m: 2rem;
    --font-s: 1rem;
    --font-xs: .8rem;

    --header-width: 1600px;
    --content-width: 1408px;
}

html {
    background-color: var(--light-primary);
    font-family: 'Markazi Text', 'Times New Roman', serif;
    font-size: var(--font-m);
    color: var(--text-primary);
    scroll-behavior: smooth;
    overflow-x: hidden;
    interpolate-size: allow-keywords;
}

a {
    color: var(--links);
    font-weight: 700;
    border-radius: 2px;
    text-decoration: underline 2px solid;
}

#siirry-sisaltoon {
    color: var(--nav-links);
    background-color: var(--links);
    padding: 8px 16px;
    position: absolute;
    top: 8px;
    left: 8px;
    text-decoration: none;
    transform: translateX(-200%);
}

#siirry-sisaltoon:focus-visible {
    transform: translateX(0%);
}

#siirry-sisaltoon:hover {
    background-color: var(--dark-secondary);
    text-decoration: underline;
    text-decoration-thickness: 3px;
    color: var(--white);
}

header {
    background-color: var(--dark-primary);
    background-image: url('/kuvat/hero-bg.svg');
    background-size: cover;
    background-position: bottom left;
    background-repeat: no-repeat;
}

#header-logo {
    padding: 0;
    border-radius: 2px;
    margin-right: 24px;
    width: 350px;
    max-width: 100%;
}

@media (max-width: 1200px) {
    #header-logo {
        width: min(100dvw, 300px);
    }
}


nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 24px 40px 24px 24px;
    max-width: var(--header-width);
    margin: auto;
}

nav ul {
    display: flex;
    flex-direction: row;
    list-style-type: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 24px;
}

nav ul li a {
    /* text-decoration: none; */
    color: var(--nav-links);
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 2px;
}

@media (max-width: 928px) {
    nav {
        flex-direction: column;
        gap: 24px;
        padding-left: 8px;
        padding-right: 8px;
    }

    #header-logo {
        margin-right: 0;
        padding: 0 8px;
    }
}

nav a:hover {
    color: var(--white);
    background-color: rgba(0, 0, 0, 0.2);
}

a:hover {
    color: var(--dark-secondary);
    text-decoration: underline;
    text-decoration-thickness: 3px;
}

.hero {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    margin: auto;
    max-width: var(--header-width);
    padding: 0 24px;
    gap: 40px;

    @media (max-width: 600px) {
        padding: 0 8px;
    }
}

.hero-content {
    margin: 80px auto;
}

@media (max-width: 1100px) {
    .hero {
        flex-direction: column;
        gap: 0;
        align-items: center;
        text-align: center;
    }

    .hero-content {
        margin-top: 24px;
        margin-bottom: 32px;
    }
}

h1 {
    color: var(--white);
    font-size: var(--font-xl);
    line-height: 80%;
    margin-bottom: 8px;
}

h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

#aukioloajat {
    margin-top: 0;
}

.subheading {
    color: var(--light-primary);
    font-size: var(--font-l);
    line-height: 1;
}

.hero picture img {
    max-width: min(600px, calc(100vw - 16px));
    margin-bottom: -40px;
    border: 8px solid var(--light-primary);

    @media (max-width: 600px) {
        border: 4px solid var(--light-primary);
    }
}

.hero picture source {
    max-width: 100%;
}

main {
    max-width: var(--content-width);
    margin: auto;
    text-align: center;
    padding: 0 min(24px, 3vw);
}

*[tabindex="-1"]:focus-visible {
    outline: none;
}

.section {
    margin-bottom: 128px;
}

.storefront-and-opening-hours {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap-reverse;
    align-items: center;
}

.storefront-and-opening-hours dl {
    margin-bottom: 56px;
}

.opening-hours {
    padding: 0 2rem;
}

img {
    max-width: 100%;
}

.spaceholder {
    width: 33%;
    height: 1px;
    min-width: min(500px, 100%);
}

/* @media (max-width: 880px) {
    .storefront-and-opening-hours {
        grid-template-columns: 1;
        grid-template-rows: auto auto auto;
    }
} */

.storefront {
    max-width: 100vw;
}

dl {
    display: grid;
    grid-template-columns: 2em 1em max-content;
    text-align: left;
    justify-content: center;
}

dt {
    grid-column-end: 2;
    text-align: right;
}

.hours,
dd {
    grid-column-start: 3;
}

p {
    margin: auto;
    margin-bottom: 1rem;
    max-width: 70ch;
    font-size: var(--font-s);
}

.image {
    width: 100%;
    font-size: var(--font-s);
    max-width: 50ch;
}

details {
    font-size: var(--font-s);
    font-weight: 400;
    border: 2px solid var(--links);
    border-radius: 4px;
    max-width: 70ch;
    margin: auto;
    margin-bottom: 16px;
    

    &:hover {
        border-color: var(--dark-secondary);
    }
}

details[open] {
    border-color: var(--dark-secondary);
}

details::details-content {
    block-size: 0;
    padding: 0 8px;
    @media (prefers-reduced-motion: no-preference) {
        transition: block-size .25s ease, content-visibility .25s ease;
    }

    transition-behavior: allow-discrete;
    overflow: hidden;
}

details[open]::details-content {
    block-size: auto;
}

details p {
    margin-top: 8px;
    font-size: var(--font-xs);
}

summary {
    font-weight: 700;
    color: var(--links);
    cursor: pointer;
    max-width: 70ch;
    margin: auto;
    padding: 16px;
    border-radius: 4px;
    list-style-position: inside;
}

summary::marker {
    content: "";
}


details[open] summary svg {
    rotate: 180deg;
}

summary svg {
    margin-right: .3rem;
    height: .4rem;

    @media (prefers-reduced-motion: no-preference) {
        transition: rotate .25s ease;
    }
}

summary path {
    fill: var(--links);
}

summary:hover {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-thickness: 3px;

    path {
        fill: var(--text-primary);
    }
}

.contact-info p {
    margin-bottom: 24px;
    line-height: 100%;
    text-align: center;
}

.contact-info p span {
    font-weight: 700;
}

footer {
    max-width: var(--content-width);
    margin: auto;
    margin-top: 128px;
    text-align: center;
}

footer img {
    max-width: 100vw;
}

.small {
    font-size: var(--font-xs);
}

footer p {
    margin: 0 auto;
    padding: 0 .5rem;
    margin-bottom: .5rem
}

.button {
    color: var(--nav-links);
    background-color: var(--links);
    padding: 8px 16px;
    text-decoration: none;
    margin-bottom: 1rem;
    display: inline-block;
    border-radius: 8px;
    outline-offset: 2px;
    font-size: var(--font-s);
}

.button:hover {
    background-color: var(--dark-secondary);
    color: var(--white);
    text-decoration: none;
}

@media screen and (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}