@import url("main.css");

/* CSS variables */
:root {
    --panel-color-100: hsl(268 100% 15%);
    --panel-color-200: hsl(268 100% 20%);
}

.page-title {
    text-align: center;
    animation: 1s ease-out 0s 1 slide-up;
}

.page-subheading {
    margin-bottom: 3.5rem;

    color: var(--subheading-color);
    font-size: 1.3rem;
    font-weight: 500;
    text-align: center;

    animation: 1s ease-out 0s 1 slide-up;
}

.container {
    --container-background-color: hsl(235 30% 30%);
    width: clamp(45ch, 50%, 70ch);
    background: var(--container-background-color);
    margin: 0.625rem;
    border-radius: var(--border-radius);
    padding: 0.625rem;
}

/* Show and hidden classes */
.hidden {
    opacity: 0%;
    filter: blur(1rem);
    transition: all 1.25s;
}

.show {
    opacity: 100%;
    filter: blur(0);
}

.hide-number {
    opacity: 0%;
    filter: blur(1rem);
    translate: -100%;
    transition: all 1.25s calc(var(--order) * 250ms);
}

.show-number {
    opacity: 100%;
    filter: blur(0);
    translate: 0%;
}

/* Panels */
.panel {
    display: flex;
    flex-direction: row;
    justify-content: center;

    background-color: var(--panel-color-100);
    background-color: hsl(262 100% calc(15% + 2% * var(--color)));
    
    margin: 3rem 1rem;
    border-radius: var(--border-radius);
}

.panel-right {
    flex-direction: row-reverse;
}

.panel-text {
    display: flex;
    flex-direction: column;
    justify-content: center;

    margin-inline: 2rem;
    padding: 0.875rem;
    width: 30%;

    /* animation: 2s ease-out 0s 1 slide; */
}

.panel-image-container {
    width: 70%;
}

.panel-image {
    object-fit: cover;

    border-radius: var(--border-radius);
    width: 100%;
    height: 100%;

}

.panel-text > h2 {
    margin-bottom: 0.5rem;
}

.panel-text > h3 {
    --font-color: var(--subheading-color);
    margin-top: 0;
}

.panel-text > p,
.panel-text > li,
.panel-text > ul {
    --font-color: var(--paragraph-color);
    margin-top: 1rem;
}

/* Other */
.number-container {
    --background-gradient: linear-gradient(145deg, hsl(180 75% 60%), hsl(220, 100%, 50%));
    background-image: var(--background-gradient);
    padding: 1.5rem;
    border-radius: 1rem;
}

.number-container > h2 {
    font-size: 2.375rem;
    margin-bottom: 0;
}

.number-container > p {
    margin-top: 0;
}


/* Animations */
@keyframes slide {
    0% {
        opacity: 0%;
        filter: blur(1rem);
        translate: -150%;
    }
    100% {
        opacity: 100%;
        filter: blur(0);
        translate: 0%;
    }
}

@keyframes slide-up {
    0% {
        opacity: 0%;
        filter: blur(1rem);
        translate: 0% 80%;
    }
    100% {
        opacity: 100%;
        filter: blur(0);
        translate: 0% 0%;
    }
}

/* Media queries */
@media (prefers-reduced-motion) {
}

@media (max-width: 70em) {
    .panel, .panel-right {
        flex-wrap: wrap;
    }
}
