:root {
    --scroll-snap-height: 90vh;
    --min-viewport-height: 776px;
    --min-header-height: 72px;
    --title-size: 1.25rem;
    --tr-height: 1.75rem;
    --p-height: 1.75rem;
    --figure-article-gap: 2rem;
    --background-color-nav: white;
    --background-color-header: rgb(255, 225, 179);
    --background-color-1: rgb(255, 247, 230);
    --background-color-2: rgb(255, 238, 204);
    --primary-color: rgb(51, 26, 0);
    --accent-color: rgb(184, 73, 0);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

@font-face {
    font-family: OpenSans;
    src: url("/fonts/OpenSans-Regular.woff");
    font-style: normal;
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: OpenSans;
    src: url("/fonts/OpenSans-Bold.woff");
    font-style: normal;
    font-weight: bold;
    font-display: swap;
}

@font-face {
    font-family: Ubuntu;
    src: url("/fonts/Ubuntu-Bold.woff2");
    font-style: normal;
    font-weight: bold;
    font-display: swap;
}

body {
    text-align: center;
    font-family: "Open Sans", OpenSans, sans-serif;
    color: var(--primary-color);
}

header,
.navbar-space,
figure,
nav {
    display: flex;
    justify-content: center;
    align-items: center;
}

h1 {
    font-family: Ubuntu, sans-serif;
    font-size: calc(var(--title-size) + .25rem);
    max-width: 40ch;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    padding-bottom: .2rem;
    position: relative;
}

p {
    line-height: var(--p-height);
}

.title {
    font-size: var(--title-size);
    line-height: 24px;
    font-weight: bold;
    text-align: center;
    /*margin-bottom: calc(var(--figure-article-gap) / 4);*/
    padding: calc(var(--title-size)) 0;
}

.title a, h1 a {
    color: var(--primary-color);
}

table {
    padding: calc(var(--p-height) / 2) 0;
}

tr {
    height: var(--tr-height);
    text-align: left;
}

#role-casamarcat tr {
    height: calc(var(--tr-height) - .25rem);
}

.leftcell {
    min-width: 13ch;
}

.bold {
    font-weight: bold;
}

.navbar-space {
    width: 230px;
    align-items: start;
    margin-top: 10vh;
}

figure {
    width: 240px;
    margin-top: var(--figure-article-gap);
}

article {
    max-width: 500px;
    margin: var(--figure-article-gap);
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
}

section {
    display: grid;
}

header {
    background-color: var(--background-color-header);
    height: calc(100vh - var(--scroll-snap-height));
}

nav {
    background-color: var(--background-color-nav);
    position: fixed;
    flex-direction: column;
    border-radius: 1.5rem;
    padding: 1.5rem 1rem;
    font-size: calc(var(--title-size) - .25rem);
}

nav a {
    padding: .75rem .5rem;
    margin: .75rem 0;
}

#roletermice-pret, #role-taxi {
    background-color: var(--background-color-1);
}

.delivery-details {
    color: var(--accent-color);
}

.align-center {
    text-align: center;
}

#role-casamarcat, #contact {
    background-color: var(--background-color-2);
}

#contact-svg {
    filter: invert(12%) sepia(26%) saturate(5022%) hue-rotate(28deg) brightness(88%) contrast(105%);
}

#copyright {
    color: var(--primary-color);
}

@media (min-width: 1024px) and (min-height: 776px) {
    header {
        min-height: var(--min-header-height);
    }

    main {
        height: var(--scroll-snap-height);
        overflow-y: scroll;
        scroll-snap-type: y mandatory;
    }

    section {
        text-align: left;
        scroll-snap-align: start;
        height: var(--scroll-snap-height);
        min-height: calc(var(--min-viewport-height) - var(--min-header-height));
        grid-template-columns: auto auto auto;
        justify-content: space-evenly;
    }
}

@media (min-width: 1024px) and (max-height: 775px) {
    header {
        min-height: var(--min-header-height);
    }

    section {
        grid-template-columns: auto auto auto;
        justify-content: space-evenly;
    }
}

@media (min-width: 621px) and (max-width: 1023px) {
    header {
        min-height: var(--min-header-height);
    }

    section {
        grid-template-columns: auto auto;
        justify-content: space-evenly;
    }

    .navbar-space {
        grid-row: 1 / span 2;
    }

    figure {
        justify-self: center;
    }
}

@media (max-width: 620px) {
    header {
        min-height: calc(var(--min-header-height) * 1.8);
    }

    h1 {
        font-size: var(--title-size);
    }

    .navbar-space {
        display: none;
    }

    figure {
        justify-self: center;
    }

    article {
        margin: calc(var(--figure-article-gap) / 2);
        justify-self: center;
    }
}

/* ==================== links decorations ====================  */
nav a::before, .underline a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, rgb(255, 170, 0), rgb(184, 73, 0));
    z-index: 1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s ease-in-out;
}

nav a:hover::before, .underline a:hover::before {
    transform: scaleX(1);
    transform-origin: left;
    transition-timing-function: cubic-bezier(0.2, 1, 0.82, 0.94);
}

/* ==================== Header ====================  */

h1 {
    transform: scale(0.90);
    animation: scale 3s forwards cubic-bezier(0.5, 1, 0.89, 1);
}

@keyframes scale {
    100% {
        transform: scale(1);
    }
}

h1 span {
    display: inline-block;
    opacity: 0;
    filter: blur(4px);
}

h1 span:nth-child(1) {
    animation: fade-in 1s 0s forwards cubic-bezier(0.11, 0, 0.5, 0);
}

h1 span:nth-child(2) {
    animation: fade-in 1s 0.2s forwards cubic-bezier(0.11, 0, 0.5, 0);
}

h1 span:nth-child(3) {
    animation: fade-in 1s 0.4s forwards cubic-bezier(0.11, 0, 0.5, 0);
}

h1 span:nth-child(4) {
    animation: fade-in 1s 0.6s forwards cubic-bezier(0.11, 0, 0.5, 0);
}

h1 span:nth-child(5) {
    animation: fade-in 1s 0.8s forwards cubic-bezier(0.11, 0, 0.5, 0);
}


@keyframes fade-in {
    100% {
        opacity: 1;
        filter: blur(0);
    }
}

/* ==================== throb small ====================  */

#cutie-roletermice {
    animation: throb-small 20s cubic-bezier(.29, 1.01, 1, -0.68) infinite running;
}

@keyframes throb-small {
    0% {
        transform: scale(100%, 100%);
    }
    35% {
        transform: scale(100%, 100%);
    }
    45% {
        transform: scale(85%, 85%);
    }
    90% {
        transform: scale(85%, 85%);
    }
    100% {
        transform: scale(100%, 100%);
    }
}

/* ==================== throb big ====================  */

#img-role-casamarcat, #img-role-taxi, #img-contact {
    animation: throb-big 20s cubic-bezier(.29, 1.01, 1, -0.68) infinite running;
}

@keyframes throb-big {
    0% {
        transform: scale(100%, 100%);
    }
    35% {
        transform: scale(100%, 100%);
    }
    45% {
        transform: scale(110%, 110%);
    }
    90% {
        transform: scale(110%, 110%);
    }
    100% {
        transform: scale(100%, 100%);
    }
}