:root {
    --title-size: 1.25rem;
    --tr-li-height: 1.75rem;
    --p-height: 1.5rem;
    --flexbox-gap: .5rem;
    --background-color-1: rgb(255, 247, 230);
    --background-color-2: rgb(255, 238, 204);
    --nav-header-footer-background-color: rgb(255, 255, 255);
    --primary-color: rgb(51, 26, 0);
    --accent-color: rgb(184, 73, 0);
}

* {
    margin: 0;
    padding: 0;
    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;
}

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

header,
footer,
article,
address,
figure {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

header > *,
footer > *,
article > *,
address > *,
figure > * {
    margin: var(--flexbox-gap);
}

header,
footer,
article,
address {
    padding: calc(var(--flexbox-gap) + .5rem);
}

figure {
    padding-top: calc(var(--flexbox-gap) + 2.5rem);
}

h1 {
    font-size: calc(var(--title-size) + .25rem);
}

h2 {
    font-size: var(--title-size);
    padding: var(--title-size) 0;
}

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

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

ul {
    list-style-type: none;
}

nav,
header,
footer {
    background-color: var(--nav-header-footer-background-color);
}

footer a {
    color: var(--primary-color);
}

table {
    border-collapse: collapse;
}

tr {
    height: var(--tr-li-height);
    border-bottom: thin solid rgb(140, 140, 140);
}

.heading a {
    color: var(--primary-color);

}

.leftcell {
    min-width: 13ch;
}

nav {
    margin-top: 10vh;
    position: fixed;
    border-radius: 1.5rem;
    font-size: calc(var(--title-size) - .25rem);
}

nav li {
    margin: 3rem 1rem;
}

nav a {
    /*  border: thin solid red;*/
    padding: 1rem .5rem .5rem .5rem;
}

article {
    min-height: 50vh;
    justify-content: space-evenly;
}

article > * {
    max-width: 53ch;
}

address {
    min-height: 30vh;
    justify-content: space-evenly;
}

.bold {
    font-weight: bold;
}

.empty {
    display: flex;
    justify-content: center;
    min-width: 240px;
}

#empty-roletermice-pret,
#roletermice-pret,
#text-roletermice-pret {
    background-color: var(--background-color-1);
}

#text-roletermice-pret .rightcell {
    min-width: 6ch;
}

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

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

#text-role-casamarcat .rightcell {
    min-width: 16ch;
    text-align: left;
}

#empty-taxi,
#role-taxi,
#text-role-taxi {
    background-color: var(--background-color-1);
}

#text-role-taxi .rightcell {
    min-width: 12ch;
    text-align: left;
}

#empty-comenzi-speciale,
#comenzi-speciale,
#text-comenzi-speciale {
    background-color: var(--background-color-2);
}

#empty-contact,
#role-termice,
address {
    background-color: var(--background-color-1);
}

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

address {
    font-style: normal;
}

address p {
    font-size: var(--title-size);
}

address ul {
    text-align: left;
}

address li {
    height: var(--tr-li-height);
}

@media (min-width: 1024px) {
    main {
        display: grid;
        grid-template-columns: auto auto auto;
    }
}

@media (min-width: 621px) and (max-width: 1023px) {

    main {
        display: grid;
        grid-template-columns: auto auto;
    }

    .empty {
        grid-row-start: span 2;
    }
}

@media (max-width: 620px) {

    .empty {
        display: none;
    }
}


/* ==================== 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 ====================  */

#roletermice-pret > *, #comenzi-speciale > * {
    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 ====================  */

#role-casamarcat > *, #role-taxi > *, #role-termice > * {
    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%);
    }
}