@import url("https://fonts.cdnfonts.com/css/chow-fun");

:root {
    --border: solid 1px rgba(0 0 0 / 0.3);
    --color-accent: #e10409;
    --color-background: #fff;
    --color-text: #000;
    --color-heading: var(--color-accent);
    --font-family-body: sans-serif;
    --font-family-heading: "Chow Fun", sans-serif;
}

* {
    margin: 0;
    padding: 0;

    &,
    &::before,
    &::after {
        box-sizing: border-box;
    }
}

body {
    padding: 1rem;
    overflow-x: hidden;
    overflow-y: auto;
    font: normal 1.1rem/1.5 var(--font-family-body);
    background: var(--color-background);
    color: var(--color-text);
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

main {
    padding-block: 2rem;
    gap: 48px;
}

h1, h2, h3 {
    font-family: var(--font-family-heading);
    font-weight: normal;
    text-transform: uppercase;
    color: var(--color-heading);
}

h1, h2, h3, details {
    &:not(:first-child) {
        margin-top: 1em;
    }
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25em;
}

h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5em;
}

p {
    & + & {
        margin-top: 0.5em;
    }
}

.small-text {
    font-size: 0.9rem;
}

a,
summary {
    color: currentcolor;
    text-decoration: underline;
    text-decoration-color: color-mix(
        in srgb,
        var(--color-text) 25%,
        transparent
    );


    &:where(
        :hover,
        :focus
    ) {
        color: var(--color-accent);
        text-decoration-thickness: 0.15em;
    }
}

time {
    display: inline-block;
    font-weight: bold;
}

.sr-only {
    position: absolute;
    width: 0;
    height: 0;
    clip-path: rect(1px 1px 1px 1px);
    overflow: hidden;
    word-wrap: normal;
}

details {
    display: inline-block;
    border: var(--border);
    border-radius: 0.5em;

    ::marker {
        content: none;
    }


    &[open] {
        .details__content {
            animation: fadein 0.25s ease-in-out;
        }
    }
}

summary,
.details__content {
    padding: 0.5em 1em;
}

summary {
    cursor: pointer;
}



@media screen and (width < 576px) {
    main {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .logo {
        width: 102px;
        height: 261px;
    }
}

@media screen and (width >= 576px) {
    body {
        padding-block: 3rem;
    }

    main {
        display: grid;
        grid-template-columns: 204px 1fr;
        grid-template-rows: auto 1fr;
    }

    .logo {
        grid-column: 1;
        grid-row: 1/4;
    }

    section {
        grid-column: 2;
        width: min(400px, 100%);
        margin-inline: auto;
    }
}


@keyframes fadein {
    0% {
        opacity: 0%;
    }

    100% {
        opacity: 100%;
    }
}
