@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&family=Noto+Sans+Arabic:wght@100..900&family=Noto+Serif+TC:wght@200..900&display=swap');
/* font-family: "Lexend", serif; */

@property --scroll-position {
    syntax: "<number>";
    inherits: true;
    initial-value: 0;
}

@property --scroll-position-delayed {
    syntax: "<number>";
    inherits: true;
    initial-value: 0;
}

:root {
    --mugShadow: -4px 7px 7px rgba(0, 0, 0, 0.2);
    scrollbar-color: var(--material7) var(--buttonHover);
    --linearGradiend: linear-gradient(180deg, var(--material2), var(--material3));
    background-color: var(--mainWhite);
}

* {
    -webkit-box-sizing: border-box;
    -o-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

::-webkit-scrollbar {
    width: 20px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--material7);
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--buttonHover);
}

::-webkit-scrollbar-track {
    background: var(--buttonHover);
}

main {
    direction: rtl;
    overflow: clip;
}

header {
    position: fixed;
    z-index: 100;
    top: 5px;
    left: 5px;
    right: 5px;
    direction: ltr;
    animation-name: slideDown;
    animation-duration: 2100ms;
    transform: translateY(calc(5rem * var(--scrolling-up)));
}

nav {
    width: 100%;
    padding: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    background-color: hsla(42, 31%, 87%, 0.6);
    border-radius: 50px;
    background-image: url("./../../Main\ page\ photos/wallpaper.png");
    background-blend-mode: overlay;
    background-position: center;
    background-repeat: repeat;
    backdrop-filter: blur(10px);
    box-shadow: var(--buttonShadow);
    border: 1px solid var(--material5);

    h1 {
        margin: 0;
        color: var(--material5);
        animation-name: slideDown;
        font-family: "Lexend", serif;
        font-weight: 900;
        text-align: center;
        animation-duration: 2400ms;
    }

    a#logo {
        flex-basis: fit-content;
        clip-path: circle();
        animation-name: slidedown;
        animation-duration: 2000ms;
        animation-fill-mode: both;
        animation-name: slideDown;
        animation-duration: 2150ms;
    }

    a#logo img {
        width: max(3.25em);
        vertical-align: middle;
        background-color: var(--material1);
        border-radius: 50%;
    }

    .humburger {
        cursor: pointer;
        aspect-ratio: 1/1;
        width: 51.99px;
        background-color: var(--material1);
        border: none;
        border-radius: 50%;
        padding: calc(52px - 3.25em);
        display: none;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        position: relative;
        animation-name: slideDown;
        animation-duration: 2700ms;

        .bar {
            width: 25px;
            height: 4px;
            background-color: var(--material4);
            margin: 2px;
            border-radius: 0.2em;
        }
    }


    #menu-nav {
        position: relative;
        z-index: 2;
    }
}

.nav-buttons {
    animation-name: slideDown;
    animation-duration: 2700ms;
}

.nav-buttons,
.nav-buttons-small {
    list-style-type: none;
    margin: 0 0.5em 0 0;
    padding: 0.25em;
    border-radius: 20em;
    background-color: var(--material1);
    display: flex;
    flex-direction: row-reverse;
    gap: 20px;
    font-weight: 400;

    a {
        text-decoration: none;
        color: var(--text);
        padding: 0 10px;
        width: fit-content;
        height: fit-content;
        border-radius: 20em;
        transition: 200ms;
    }

    a:hover {
        background-color: #6f4e3761;
    }

    a:active {
        background-color: var(--material4);
        color: var(--mainWhite);
    }

    #info {
        background-color: var(--material4);
        color: white;
        pointer-events: none;
    }
}

.nav-buttons-small {
    display: none;
    background-color: #c6a988a5;
    backdrop-filter: blur(10px);
    direction: rtl;
}

.introduction {
    height: 100vh;
    width: 100%;
    background-image: var(--linearGradiend);
    overflow: hidden;

    .img {
        background-image: url("./../../Main\ page\ photos/allam cover photo.webp");
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
        position: relative;
        z-index: 6;
        width: 100%;
        height: 100vh;
        animation-name: fadeIn;
        animation-duration: 3000ms;
        animation-fill-mode: both;
        animation-delay: 1000ms;
    }

}

#svg-waves {
    position: relative;
    top: -149px;
    width: 100%;
    height: 150px;
    overflow: hidden;
}

#wave {
    position: absolute;
    z-index: 7;
    width: calc(100vw + 250px);
    animation-name: wave;
    animation-duration: 11s;
    animation-iteration-count: infinite;
    animation-fill-mode: both;
    animation-direction: alternate;
}

#back-wave {
    position: absolute;
    bottom: -30px;
    z-index: 6;
    opacity: 0.6;
    width: calc(100vw + 250px);
    animation-name: wave;
    animation-duration: 11500ms;
    animation-iteration-count: infinite;
    animation-fill-mode: both;
    animation-direction: alternate;
}

#backback-wave {
    position: absolute;
    bottom: -30px;
    z-index: 6;
    opacity: 0.4;
    width: calc(100vw + 250px);
    animation-name: wave;
    animation-duration: 11900ms;
    animation-delay: 1s;
    animation-iteration-count: infinite;
    animation-fill-mode: both;
    animation-direction: alternate;
}

.wave {
    transform-origin: 0 100%;
    bottom: 0;
}

.main-body {
    background-color: var(--mainWhite);

    .main-content {
        a {
            display: inline-block;
            text-decoration: none;
            color: white;
        }

        li a:hover {
            background-color: var(--buttonHover);
        }

        #about-allam {
            h2 {
                margin-right: 30px;
                position: relative;
                animation: media-scrolling linear;
                animation-timeline: view();
            }

            h2::before {
                content: '';
                width: 9px;
                height: 70%;
                position: absolute;
                top: 50%;
                transform: translate(0, -50%);
                right: -20px;
                background-color: var(--material6-orange);
            }

            p {
                padding: 0 2em;
                max-width: 75ch;
                animation: media-scrolling linear;
                animation-timeline: view();
            }

            .map-background {
                width: 100%;
                text-align: center;
                padding: 30px 0;
                background-image: var(--linearGradiend);
                box-shadow: var(--buttonShadow);

                iframe {
                    border-radius: 10px;
                    box-shadow: var(--buttonShadow);
                    width: 80%;
                    margin: 0;
                    animation: media-scrolling linear;
                    animation-timeline: view();
                }
            }
        }

        article:not(#about-allam) {
            padding-top: 10rem;
        }

        article:not(#about-allam) h2 {
            margin: 2em 0 0 0;
            transform: translateX(50%);
            position: relative;
            right: 50%;
            width: fit-content;
            background-color: var(--material2);
            text-align: center;
            border-radius: 0.75em 0.75em 0 0;
            padding: 0.5em;
            color: white;

            span {
                background-color: var(--material5);
                padding: 0 0.5em;
                border-radius: 0.25em;
                box-shadow: var(--buttonShadow);
            }
        }

        article:not(#about-allam) h2::before {
            content: '';
            height: 1.125em;
            width: 1.125em;
            position: absolute;
            bottom: 0;
            right: -1.125em;
            background-color: transparent;
            border-bottom-left-radius: 0.625em;
            box-shadow: -0.375em 0.375em 0 0 var(--material2);
        }

        article:not(#about-allam) h2::after {
            content: '';
            height: 1.125em;
            width: 1.125em;
            position: absolute;
            bottom: 0;
            left: -1.125em;
            background-color: transparent;
            border-bottom-right-radius: 0.625em;
            box-shadow: 0.375em 0.375em 0 0 var(--material2);
        }

        article:has(.contacts, .menu-section) {
            animation: media-scrolling linear both;
            animation-timeline: view();
        }

        .menu-section {
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
            margin: 0 auto;
            width: 95%;
            max-width: 1000px;

            .small-menu {
                order: 1;
                background-image: var(--linearGradiend);
                padding: 0.5em;
                border-radius: 1em;
                width: inherit;
                box-shadow: var(--buttonShadow);

                ul {
                    list-style-type: none;
                    margin: 0;
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    justify-content: center;
                    background-color: var(--material5);
                    border-radius: 10px;
                    padding: 5px;
                    box-shadow: var(--buttonShadow);

                    li {
                        width: 100%;
                        border-radius: 5px;
                        padding: 5px;
                        text-align: center;
                    }

                    li a {
                        transition: 200ms;
                        border-radius: 5px;
                        width: 100%;
                        text-align: center;
                    }
                }
            }

            img {
                position: absolute;
                top: 60%;
                left: 75%;
                width: 300px;
                transform: rotate(10deg);
                filter: drop-shadow(var(--mugShadow));
                clip-path: url("./../3D models/mug.webp");
                animation: media-scrolling linear both;
                animation-timeline: view();
            }
        }

        #contacts {
            margin-top: 10em;
            margin-bottom: 10em;
        }

        .contacts {
            direction: ltr;
            list-style-type: none;
            margin: 0 auto;
            width: 80%;
            max-width: 1000px;
            padding: 1em;
            border-radius: 1em;
            background-image: var(--linearGradiend);
            font-family: "Lexend", serif;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-evenly;
            flex-wrap: wrap;
            gap: 1em;
            align-content: space-evenly;
            box-shadow: var(--buttonShadow);

            li {
                width: 100%;
                text-align: center;
                animation: media-scrolling linear both;
                animation-timeline: view();

                a {
                    width: 100%;
                    background-color: var(--material5);
                    padding: 5px 10px;
                    border-radius: 5px;
                }

                a:hover {
                    opacity: 0.8;
                    box-shadow: var(--buttonShadow);
                }
            }

            #tele {
                color: white;
                border-radius: 5px;
                padding: 5px 10px;
                background-color: var(--material5);
                transition: 200ms;

                span {
                    display: none;
                    font-weight: 300;
                }
            }

            #tele:hover {
                opacity: 0.8;
            }

        }
    }
}

footer {
    background-color: var(--material5);
    color: white;
    padding: 1em;
    font-family: "Lexend", serif;
    padding-top: 4em;
}

footer a:hover {
    color: rgba(255, 255, 255, 0.31);
}

.top-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-content: space-between;
    flex-wrap: wrap;
    width: 95%;
    margin-left: auto;
}

.bottom-footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    align-content: flex-start;
    flex-wrap: wrap;
}

.bottom-footer .links {
    display: flex;
    width: 100%;
    justify-content: center;
}

.bottom-footer a {
    margin: 0 1%;
    color: white;
}

.bottom-footer p {
    margin: 5px 0 10px;
    font-weight: 50;
    font-size: 0.65rem;
}

.logo-footer {
    color: white;
    font-weight: 900;
    font-size: 2rem;
    flex: 2 70px;
    position: relative;
    text-wrap: nowrap;
    line-height: 0.8;
    letter-spacing: 0;
}

.footer-fast-links {
    flex: 0.5 1 auto;
}

.top-footer a {
    color: white;
    text-transform: uppercase;
    font-size: 0.65rem;
}

footer hr {
    width: 85%;
    margin-top: 1.75em;
    margin-bottom: 1em;
}

@media (max-width:645px) {

    a:focus,
    button:focus {
        outline: 1.5px solid var(--material5);
        -webkit-tap-highlight-color: transparent;
    }

    .nav-buttons {
        display: none;
    }

    nav .humburger {
        display: flex;
    }

    .nav-buttons-small {
        /*JavaScript issue*/
        visibility: hidden;
        display: flex;
        justify-content: flex-end;
        flex-direction: column;
        border-radius: 0 0 10px 10px;
        box-shadow: var(--buttonShadow);
        position: absolute;
        z-index: 1;
        top: 20px;
        right: 0;
        width: 200px;
        height: 200px;

        a {
            border-radius: 5px;
            width: 100%;
            font-weight: 450;
        }
    }

    article h2 {
        font-size: clamp(1.125rem, 1vw, 1vw);
    }

    #back-wave,
    #backback-wave {
        bottom: 0;
    }

    .main-body .main-content .menu-section img {
        width: 250px;
        left: 65%;
    }

    .logo-footer {
        flex: 2 1 100%;
        margin-bottom: 20px;
    }
}

@media (prefers-reduced-motion:no-preference) {
    @keyframes scroll-velocity {
        from {
            --scroll-position: 0;
            --scroll-position-delayed: 0;
        }

        to {
            --scroll-position: 1;
            --scroll-position-delayed: 1;
        }
    }

    @keyframes media-scrolling {
        entry 0% {
            transform: translateY(20px) scale(0.9);
            opacity: 0.4;
        }

        entry 80% {
            transform: translateY(0);
            opacity: 1;
        }
    }

    @keyframes slideDown {
        0% {
            transform: translateY(-100px);
        }
    }

    @keyframes fadeIn {
        0% {
            scale: 1.1;
            opacity: 0;
        }
    }

    @keyframes wave {
        100% {
            transform: translateX(250px);
        }
    }
}