@property --translate-from {
    syntax: "<length> | <percentage>";
    inherits: true;
    initial-value: 100%;
}

@property --translate-to {
    syntax: "<length> | <percentage>";
    inherits: true;
    initial-value: 0;
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(var(--translate-from));
    }

    to {
        opacity: 1;
        transform: translateX(var(--translate-to));
    }
}

:root {
    --theme-accent: 0.4462 0.1412 357.88;
    --theme-dark: 0 0 0;

    --logo-c1: oklch(var(--theme-accent));
    --logo-c2: oklch(var(--theme-dark));

    font-size: 125%;
    accent-color: oklch(var(--theme-accent));
}

@font-face {
    font-family: "Fira Sans";
    src: url("fonts/Fira_Sans/FiraSans-Light.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: "Fira Sans";
    src: url("fonts/Fira_Sans/FiraSans-Italic.ttf") format("truetype");
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: "Fira Sans";
    src: url("fonts/Fira_Sans/FiraSans-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Fira Sans";
    src: url("fonts/Fira_Sans/FiraSans-SemiBold.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: "Fira Sans";
    src: url("fonts/Fira_Sans/FiraSans-SemiBoldItalic.ttf") format("truetype");
    font-weight: 500;
    font-style: italic;
}

@media screen {
    .screen-reader-text {
        display: none;
    }
}

.has-luminous-vivid-amber-background-color {
    background-color: #ffc000;
}

html,
body,
textarea,
input,
select,
button {
    font:
        300 1rem/1.7 "Fira Sans",
        sans-serif;
}

html,
body {
    margin: 0;
    scroll-behavior: smooth;
}

body {
    position: relative;
    transition:
        color 0.6s ease,
        background-color 0.6s ease;

    &.dark {
        color: #fff;
        background-color: oklch(var(--theme-dark));

        .page-separator {
            --logo-c2: #fff;
        }
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 500;
}

h3 {
    font-size: 1em;
    font-weight: 500;
    font-style: italic;
    color: oklch(var(--theme-accent));
    margin-block: 2rem 0.5rem;
}

h3 + :is(ul, ol) {
    margin-top: 0.5rem;
}

ul {
    list-style-type: "– ";
}

em,
i {
    font-size: 1.0625em;
    font-weight: 400;
    font-style: italic;
}

strong,
b {
    font-weight: 500;
    font-style: italic;
    font-size: 1.25em;
}

em strong,
em b,
i strong,
i b,
b em,
strong em,
b i,
strong i {
    font-size: 1em;
    font-weight: 500;
    font-style: italic;
    color: oklch(var(--theme-accent));
}

.relative {
    position: relative;
}

figure {
    margin: 0;

    img {
        display: block;
        max-width: 100%;
        height: auto;
    }
}

.visual {
    position: relative;
    margin-bottom: 4rem;
    overflow: hidden;

    figure img {
        width: 90%;
        height: auto;
        clip-path: polygon(0% 0%, 0% 100%, 100% 80%, 100% 0%);

        @media screen and (max-width: 767px) {
            width: 95%;
        }
    }

    .no-image {
        aspect-ratio: 16 / 9;
        background-color: #ccc;
    }

    .visual-text {
        position: absolute;
        right: 1em;
        bottom: 1.5em;
        z-index: 1;

        color: #fff;
        font-size: 1em;
        font-weight: 500;
        font-style: italic;
        text-transform: uppercase;
        line-height: 1.5;

        font-size: max(1rem, 3vw);

        display: grid;
        gap: 0.5rem;

        & > * {
            padding-inline: 0.5em;
            background-color: oklch(var(--theme-accent));
            margin: 0 0 0 auto;
            width: max-content;
            opacity: 0;
            animation: slide-in 0.5s ease forwards;
        }

        & > :nth-child(1) {
            font-size: 1.33em;
            background-color: #000;
            --translate-to: -4em;
            animation-delay: 0.5s;
        }

        & > :nth-child(2) {
            animation-delay: 0.6s;
        }

        & > :nth-child(3) {
            --translate-to: -6em;
            animation-delay: 0.7s;
        }

        & > :nth-child(4) {
            --translate-to: -2em;
            animation-delay: 0.8s;
        }

        @media screen and (max-width: 767px) {
            position: relative;
            bottom: 0.5em;
            gap: 0.25rem;
        }
    }

    @media screen and (max-width: 767px) {
        margin-bottom: 2rem;
    }
}

.intro-text {
    letter-spacing: 0.0625em;
    hyphens: auto;
    max-width: 40em;
    padding-inline: 1rem;
    box-sizing: border-box;

    @media screen and (max-width: 767px) {
        font-size: 1.25rem;
        margin-bottom: 2rem;
    }

    @media screen and (min-width: 124em) {
        font-size: 1.5rem;
    }
}

main {
    & > :is(h1, h2, h3, h4, h5, h6, ul, ol, p) {
        max-width: 48rem;
        margin-inline: auto;
    }

    a {
        color: inherit;
        text-decoration-color: oklch(var(--theme-accent));
        text-decoration-inset: 1px;
        text-underline-offset: 2px;

        &:hover {
            color: oklch(var(--theme-accent));
        }
    }
}

.wp-block-buttons {
    text-align: center;
    margin-block: 3rem 6rem;
    padding-inline: 1rem;

    @media screen and (max-width: 767px) {
        padding-inline: 0rem;
        margin-block: 3rem;
    }
}

.wp-block-button__link,
.contact-form button {
    display: inline-block;
    color: #fff;
    background-color: oklch(var(--theme-accent));
    border-radius: 9999px;
    box-shadow: none;
    text-decoration: none;
    padding: 0.3rem 1.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    font-style: italic;
    letter-spacing: 0.125em;
    text-transform: uppercase;
    border: 0;
    cursor: pointer;
    min-width: 16rem;
    transition:
        background-color 0.3s ease,
        transform 0.3s ease;

    &:hover,
    &:focus-visible {
        outline: 0;
        background-color: #000;
        transform: scale(1.25);
    }

    @media screen and (max-width: 767px) {
        font-size: 0.6125rem;
        padding: 0.3rem 0.8rem;
    }
}

header {
    padding: 1.5rem 5vw 1.5rem 5vw;
    box-sizing: border-box;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;

    @media screen and (min-width: 1280px) {
        padding: 1.5rem 0 1.5rem 3rem;
        max-width: 127.25rem;
        flex-direction: row-reverse;
    }

    .logo {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.75rem;
        font-weight: 500;
        letter-spacing: 0.05rem;
        flex-direction: column;

        @media screen and (min-width: 768px) {
            flex-direction: row;
            height: 4rem;
            gap: 1.5rem;
        }

        @media screen and (min-width: 1280px) {
            margin-right: 10%;
        }

        figcaption {
            color: #6a223f;
        }

        img {
            width: 90%;
            height: auto;
            margin: 0 auto;

            @media screen and (min-width: 768px) {
                width: auto;
                height: 100%;
            }

            @media screen and (min-width: 1280px) {
                width: auto;
                height: 100%;
            }
        }
    }

    span {
        font-weight: 600;
        font-style: italic;
        font-size: 1.5rem;
        line-height: 1.15;
        text-align: center;
        margin-top: 1.25rem;

        @media screen and (min-width: 1280px) {
            font-size: 1.5rem;
            text-align: left;
            margin-top: 0;
        }

        @media screen and (min-width: 1920px) {
            font-size: 2rem;
        }
    }
}

footer {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.25;
    padding: 0 0 3rem;
    font-weight: 400;
    font-size: 1.125em;
    flex-direction: column;

    @media screen and (min-width: 1280px) {
        flex-direction: row;
    }

    .block {
        padding: 1rem 0;
        width: 90%;

        @media screen and (min-width: 1280px) {
            width: auto;
        }

        p {
            margin: 0;
            strong {
                font-style: normal;
                font-size: 1.125rem;
            }

            a {
                text-decoration: none;
                color: inherit;
                transition: color 0.25s;
                &:hover {
                    color: oklch(var(--theme-accent));
                }
            }
        }
    }

    .sep {
        width: 5rem;
        height: 1px;
        align-self: stretch;
        background-color: oklch(var(--theme-accent));
        margin: 0.25rem 0 0.25rem 5vw;

        @media screen and (min-width: 1280px) {
            width: 1px;
            height: unset;
            margin: 0 3rem;
        }
    }
}
