@font-face {
    font-display: swap;
    font-family: "Lexend Deca";
    font-style: normal;
    font-weight: 400;
    src: url("./assets/fonts/lexend-deca-v24-latin-regular.woff2") format("woff2"),
        url("./assets/fonts/lexend-deca-v24-latin-regular.ttf") format("truetype");
}
@font-face {
    font-display: swap;
    font-family: "Big Shoulders";
    font-style: normal;
    font-weight: 700;
    src: url("./assets/fonts/big-shoulders-v3-latin-700.woff2") format("woff2"),
        url("./assets/fonts/big-shoulders-v3-latin-700.ttf") format("truetype");
}
@font-face {
    font-display: swap;
    font-family: "Big Shoulders";
    font-style: normal;
    font-weight: 500;
    src: url("./assets/fonts/big-shoulders-v3-latin-500.woff2") format("woff2"),
        url("./assets/fonts/big-shoulders-v3-latin-500.ttf") format("truetype");
}
:root {
    --color-orange-500: hsl(31, 77%, 52%);
    --color-orange-700: hsl(31, 77%, 30%);
    --color-cyan-500: hsl(184, 100%, 22%);
    --color-cyan-700: hsl(179, 100%, 13%);

    --color-black: hsl(179, 100%, 0%);
    --color-white: hsl(0, 0%, 100%);
    --color-gray-100: hsl(0, 0%, 95%);
    --color-gray-300: hsla(0, 0%, 100%, 0.75);

    --font-main: "Lexend Deca", sans-serif;
    --font-accent: "Big Shoulders", sans-serif;
    --font-medium: 400;
    --font-bold: 700;

    --text-base: 0.9375rem;
    --text-heading-2: 2.5rem;

    --leading-none: 1;
    --leading-heading-2: 3.125rem;
    --leading-paragraph: 1.5625rem;

    --rounded-full: 9999px;
    --rounded-sm: 0.5rem;
}
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
}
body {
    line-height: var(--leading-none);
    -webkit-font-smoothing: antialiased;
}
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}
input,
button,
textarea,
select {
    font: inherit;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}
main {
    padding-top: clamp(5.5rem, 10vw + 3rem, 10.6875rem);
    padding-bottom: clamp(5.5rem, 10vw + 3rem, 8.0625rem);
    background-color: var(--color-gray-100);
    min-height: 100vh;
    font-family: var(--font-main);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.preview__wrapper {
    max-width: 34rem;
    margin: 0 auto;
    list-style: none;
    padding-left: 0;
    display: grid;
    gap: 1.5rem 0;
}
.preview__item {
    --item-shadow-value: -8px 8px 24px -4px;
    box-shadow: var(--item-shadow-value) var(--item-shadow-color, rgb(109, 109, 109));
    background-color: var(--item-surface, rgb(176, 176, 176));
    border-radius: var(--item-border-radius, var(--rounded-sm));
    padding: 3rem;
}
.preview__icon {
    margin-bottom: 2.125rem;
}
.preview__content {
    position: relative;
    margin-bottom: 5rem;
}
.preview__content::before {
    z-index: 1;
    content: "";
    position: absolute;
    top: 1.375rem;
    left: -1.5rem;
    right: -1.5rem;
    bottom: -2.375rem;
    background-color: var(--color-black);
    border-radius: var(--rounded-sm);
    opacity: 0.25;
}
.preview__title {
    z-index: 999;
    position: relative;
    font-family: var(--font-accent);
    font-size: var(--text-heading-2);
    line-height: var(--leading-heading-2);
    color: var(--color-gray-100);
    font-weight: var(--font-medium);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}
.preview__description {
    z-index: 999;
    position: relative;
    line-height: var(--leading-paragraph);
    letter-spacing: var(--tracking-paragraph);
    color: var(--color-gray-300);
    max-width: 35ch;
}
.preview__link {
    overflow: hidden;
    display: block;
    position: relative;
    text-align: center;
    text-decoration: none;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    border-radius: var(--rounded-full);
    border: 2px solid var(--color-gray-100);
    background-color: var(--color-gray-100);
    padding: 0.875rem 1.875rem 0.9375rem 1.8125rem;
    color: var(--item-button-foreground, black);
    font-weight: var(--font-bold);
    letter-spacing: 0.02em;
}
.preview__link--icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: -2rem;
    fill: var(--color-gray-100);
}
.preview__item:nth-child(1) {
    --item-surface: var(--color-orange-500);
    --item-shadow-color: var(--color-orange-500);
    --item-button-foreground: var(--color-orange-700);
}
.preview__item:nth-child(2) {
    --item-surface: var(--color-cyan-500);
    --item-shadow-color: var(--color-cyan-500);
    --item-button-foreground: var(--color-cyan-500);
}
.preview__item:nth-child(3) {
    --item-surface: var(--color-cyan-700);
    --item-shadow-color: var(--color-cyan-700);
    --item-button-foreground: var(--color-cyan-700);
}

@supports selector(:focus-visible) {
    .preview__link:focus {
        outline: none;
    }
    .preview__link:focus-visible {
        outline: 3px dashed var(--color-gray-100);
        outline-offset: 3px;
    }
}
@media (hover: hover) {
    .preview__link:hover {
        --item-button-foreground: var(--color-gray-100);
        background-color: transparent;
        padding-right: 3.25rem;
    }
    .preview__link:hover .preview__link--icon {
        right: 1.25rem;
    }
}
@media (prefers-reduced-motion: no-preference) {
    .preview__link {
        transition-property: background-color, color, padding;
        transition-duration: 300ms;
        transition-timing-function: ease;
    }
    .preview__link--icon {
        transition: right 300ms ease;
    }
}
@media screen and (min-width: 54em) {
    .preview__wrapper {
        grid-template-columns: repeat(3, 1fr);
        max-width: 58.125rem;
    }
    .preview__item {
        --item-shadow-value: 4px 8px 24px -2px;
    }
    .preview__description {
        margin-bottom: 5.1875rem;
    }
    .preview__item:nth-child(1) {
        --item-border-radius: var(--rounded-sm) 0 0 var(--rounded-sm);
    }
    .preview__item:nth-child(2) {
        --item-border-radius: 0;
    }
    .preview__item:nth-child(3) {
        --item-border-radius: 0 var(--rounded-sm) var(--rounded-sm) 0;
    }
    .preview__link {
        width: fit-content;
        margin: 0;
    }
}
