/* styling variables */
:root {
    --first-main-color: #a5876b;
    --second-main-color: #342f29;
    --cta-color: #deba82;
    --light-bg-color: rgb(234, 233, 229);
    --light-text-color: white;
    --dark-text-color: black;
    --title-ff: "Cinzel", serif;
    --subtitle-ff: "Montserrat", sans-serif;
    --parag-ff: "Crimson Text", serif;
    --technical-ff: Helvetica, sans-serif;
    --image-box-shadow: 7px 7px 7px rgba(0, 0, 0, 0.5);
    /* related to header */
    --shrink-value: '0 -5rem';
    --header-height: 12rem;
    --test-ff: "Nothing You Could Do", cursive;
}

*,
*::after,
*::before {
    padding: 0;
    margin: 0;
    outline: none;
    border: none;
    box-sizing: border-box;
    text-decoration: none;
}

html {
    font-size: 62.5%;
    font-family: var(--parag-ff);
    background-color: var(--light-bg-color);
    scroll-behavior: smooth;
}

/* general styling */
h1 {
    font-family: var(--title-ff);
    font-size: 3.6rem;
    letter-spacing: 2px;
    margin-bottom: 0.8rem;
}

h2 {
    font-family: var(--test-ff);
    font-size: 2.4rem;
    letter-spacing: 2px;
    margin-bottom: 0.8rem;

}

h3 {
    font-family: var(--subtitle-ff);
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    text-transform: capitalize;
    letter-spacing: 3px;

}

h4 {
    font-family: var(--subtitle-ff);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    text-transform: capitalize;
    letter-spacing: 3px;

}

.btn {
    padding-block: 0.8rem;
    padding-inline: 2.8rem;
    border-radius: 5px;
    font-family: var(--title-ff);
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn:hover {
    transform: scale(1.05);
}

.cta {
    background-color: var(--cta-color) !important;
    color: var(--second-main-color) !important;
}

.cta a {
    color: var(--second-main-color) !important;
}

.contact-info-group {
    display: flex;
    flex-wrap: wrap;
}

.contact-info-group .contact-info-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    margin-right: 1.8rem;
    min-width: 0;
}

.contact-info-group .contact-info-item svg {
    width: 2.4rem;
    fill: var(--cta-color);
}

.contact-info-group .contact-info-item span {
    font-family: var(--subtitle-ff);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1.4px;
    color: var(--light-bg-color);
}

.social-media {
    display: flex;
    gap: 1.8rem;
}

.social-media svg {
    fill: var(--cta-color);
    width: 2.4rem;
    transition: 0.2s;
}

.social-media svg:hover {
    fill: var(--light-bg-color);
}

.hidden {
    display: none;
}

.show-vertical-nav {
    transform: translateX(-16rem) !important;
}

.section-padding {
    padding-inline: 3rem;
    padding-block: 2.4rem;
}

.section-margin {
    margin-inline: 3%;
}

body {
    background-color: var(--light-bg-color);
    position: relative;
}

.app-wrapper {
    position: absolute;
    z-index: 1;
    background-color: var(--light-bg-color);
}

header {
    box-shadow: 7px 14px 7px rgba(0, 0, 0, 0.4);
    position: fixed;
    inset: 0 0 auto 0;
    max-width: 100%;
    z-index: 1000;
    transition: translate 0.3s;
}

header .part1 {
    padding-inline: 2rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--second-main-color);
    transition: opacity 0.3s;
}


header .part2 {
    padding-inline: 2rem;
    height: 7rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--light-bg-color);

}

header .part2 .logo {
    width: 17rem;
    height: 100%;
    display: flex;
    align-items: center;
    overflow-y: hidden;
}

header .part2 .logo img {
    width: 100%;
}

header .part2 nav {
    margin-right: 5%;
}

header .part2 nav ul {
    display: flex;
    gap: 2.4rem;
}

header .part2 nav ul li {
    height: 4rem;
    display: flex;
    flex-direction: column;
}

header .part2 nav ul a {
    font-family: var(--title-ff);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--second-main-color);
}

header .part2 nav ul li::after {
    content: "▲";
    align-self: center;
    opacity: 0;
    transition: 0.4s;
}

header .part2 nav ul li:hover::after {
    opacity: 1;
}

header .part2 .close,
header .part2 .menu {
    display: none;
}

/* animate the header while scrolling */
.shrink {
    translate: var(--shrink-value);
}

header.shrink .part1 {
    opacity: 0.3;
}

#hero {
    height: 100vh;
    max-height: 900px;
    margin-top: var(--header-height);
    padding-top: 10vh;
    background-image: url('images/hero.webp');
    background-position: center;
    background-size: cover;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    gap: 6vh;
}

#hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(40, 16, 0, 49%);
    z-index: 0;
}

#hero>* {
    z-index: 1;
    margin-block: 1rem;
    color: white;
}

#hero p {
    font-size: 1.4rem;
    font-family: var(--subtitle-ff);
    letter-spacing: 2px;
    font-style: italic;
    font-weight: 600;
}

#hero .btns {
    display: flex;
    gap: 2rem;
}

#about {
    height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.4rem;
    background-color: var(--first-main-color);
    scroll-margin-top: 5.5rem;
}

#about .box-left {
    flex: 1 1 35%;
    height: 90%;
    overflow: hidden;
    box-shadow: var(--image-box-shadow);
    border-radius: 20rem;
}

#about .box-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#about .box-right {
    flex: 2 1 40%;
    border-left: 2px solid var(--second-main-color);
    padding-left: 1.6rem;
    padding-block: 0.8rem;
}

#about .box-right p {
    font-size: 1.8rem;
    padding-block: 2.4rem;
    color: var(--second-main-color);

}

#about .box-right p::first-letter {
    font-size: 3.2rem;
    color: var(--cta-color);
}

#gallery {
    text-align: center;
    padding-block: 2.4rem;
    scroll-margin-top: 6rem;
    background-color: var(--light-bg-color);

}

.box-container {
    display: flex;
    justify-content: center;
    gap: 1.6rem;
    margin-block: 3.2rem;
}

.box-container .box {
    flex-basis: 35rem;
    flex-grow: 0;
    flex-shrink: 1;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.box-container .box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    box-shadow: var(--image-box-shadow);
    border-radius: 4px;
}

.box-container .box .open-box {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    inset: 0;
    transition: all 0.5s;
    background-color: rgba(0, 0, 0, 0);
}

.box-container .box .open-box svg {
    fill: var(--light-bg-color);
    width: 3.2rem;

}

.box-container .box:hover .open-box {
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 1;
}

#contact {
    background-color: var(--cta-color);
    scroll-margin-top: 7rem;
}

#contact .map {
    width: 100%;
    height: 35rem;
    margin-block: 3.2rem;
}

#contact .map iframe {
    width: 100%;
    height: 100%;
}

#contact .contact-container {
    display: flex;
    justify-content: space-between;
    gap: 2.4rem;
    flex-wrap: wrap;
    text-align: center;
}

#contact .contact-container form {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    flex: 1 0 55%;
}

#contact .contact-container form input,
#contact .contact-container form textarea {
    border: 2px solid rgba(0, 0, 0, 0.3);
    padding-block: 0.6rem;
    padding-left: 0.8rem;
    border-radius: 2px;
    resize: none;
}

#contact .contact-container form input::placeholder,
#contact .contact-container form textarea::placeholder {
    color: var(--second-main-color);
    font-family: var(--subtitle-ff);
    font-size: 1.2rem;

}

#contact .contact-container form button {
    align-self: flex-start;
}

#form-success {
    display: none;
    color: rgb(2, 123, 2);
    font-size: 1.6rem;
    font-weight: 600;
    margin-top: 0.4rem;
}
#form-error{
    display: none;
    color:rgb(128, 0, 0);
    font-size: 1.6rem;
    font-weight: 600;
    margin-top: 0.4rem;
}
#contact .contact-container .contact {
    padding-block: 1.6rem;
    padding-inline: 1.6rem;
    border-radius: 3px;
    box-shadow: var(--image-box-shadow);
    background-color: var(--second-main-color);
}

#contact .contact-container .contact h3 {
    color: var(--cta-color);
    margin-bottom: 3rem;
}

#contact .contact-container .contact .contact-info-group {
    flex-direction: column;
    gap: 1.4rem
}

footer {
    height: 5rem;
    padding-inline: 1.6rem;
    padding-block: 0.8rem;
    border-top: 2px solid rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--light-bg-color);
    font-family: var(--technical-ff);
    font-size: 1.2rem;
    letter-spacing: 1px;
}

footer .copyright svg {
    height: 2.4rem;
    vertical-align: middle;
}

footer .designed {
    margin-right: auto;
    margin-left: auto;
}

/* the project-car specific styles */

.project-card {
    position: fixed;
    z-index: -1;
    top: 0;
    right: 0;
    left: 0;
    height: 100dvh;
    height: 100vh; /* fallback */
    display: flex;
    align-items: center;
    justify-content: center;

}

.project-card-inner {
    min-height: 50rem;
    height: fit-content;
    max-height: 93dvh;
    width: 76vw;
    outline: 4px solid var(--cta-color);
    border-radius: 8px;
    padding: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.4rem;
    background-color: var(--light-bg-color);
    position: relative;
}

.project-card .box-left {
    overflow: hidden;
    width: 55%;
    max-height: 100%;
    flex-shrink: 0;
    align-self: stretch;

}

.project-card .box-left img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

.project-card .box-right {
    max-width: 100ch;
}

.project-card .box-right h3 {
    font-size: 2rem;
    margin-bottom: 1.6rem;
}

.project-card .box-right h3::after {
    content: '';
    display: block;
    width: 85%;
    height: 2px;
    padding-block: 0.2rem;
    background-color: var(--cta-color);
}

.project-card .box-right p {
    font-size: 1.6rem;
}

.project-card .close {
    cursor: pointer;
    position: absolute;
    top: -3%;
    right: -1%;
}

.project-card .close svg {
    width: 4.8rem;
    fill: var(--second-main-color);
    background-color: var(--light-bg-color);
    border-radius: 100%;
}

.project-card .close svg:hover {
    fill: var(--first-main-color);
}

.project-card.modal-open {
    z-index: 1002;
}

.body-overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    background-color: transparent;
    z-index: -1;
    transition: 1s;
}

.body-overlay.modal-open {
    display: block;
    z-index: 1001;
    background-color: rgba(0, 0, 0, 0.7);
}

.banner {
    margin-top: var(--header-height);
    background-image: url(/images/banner-backrgound.PNG);
    background-position: center;
    background-size: contain;
    height: 10rem;
    position: relative;
    text-align: center;
}

.banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(234, 233, 229, 0.55);
    z-index: 1;
}

.banner .banner-wrapper {
    position: absolute;
    width: 100%;
    z-index: 10;
}

/* about.html specific styles */
.about .app-wrapper {
    width: 100%;
}

article p {
    font-size: 1.6rem;
    padding-block: 1.6rem;
}

article p:first-of-type {
    border-top: 2px solid var(--cta-color);
}

article p:last-of-type {
    border-bottom: 2px solid var(--cta-color);
}

article p:first-of-type::first-letter {
    font-size: 3.2rem;
}

.about-calista-intro {
    max-width: 85vw;
    margin-inline: auto;
    display: flex;
    gap: 3.2rem;
}

.about-calista-intro .image {
    flex: 1 0 37%;
}

.about-calista-intro .image img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center;
    box-shadow: 10px 5px 5px rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.about-calista-intro .content {
    align-self: center;
}

.about-calista-chief {
    margin-block: 3rem;
    background-color: var(--first-main-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.about-calista-chief .content {
    flex-basis: 50%;
}

.about-calista-chief .image {
    width: 35%;
    max-width: 30rem;
    height: 100%;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 7px 7px 7px rgba(172, 111, 30, 0.452);
}

.about-calista-chief .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;

}

.about-calista-team {
    overflow-x: hidden;
    width: 100%;
}

.about-calista-team p {
    max-width: 120ch;
    margin-inline: auto;
    margin-block: 1.6rem;
    text-align: center;
}

.team-slider {
    width: 100%;
    overflow: hidden;
    margin-block: 3.2rem;
}

.slider-track {
    display: flex;
    gap: 1.6rem;
    width: max-content;
    animation: slide 20s linear infinite;

}

.team-slider:hover .slider-track {
    animation-play-state: paused;
}

.slider-track img {
    width: 18rem;
    height: auto;
    flex: 0 0 auto;
}

@keyframes slide {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-30%);
    }
}

/* gallery.html specific styles */

.products-section {
    margin-block: 3.2rem;
    margin-inline: 2%;
    border: 2px solid var(--cta-color);
    position: relative;
}

.products-section h2 {
    position: absolute;
    top: -1.6rem;
    z-index: 1;
    background-color: var(--light-bg-color);
    padding-inline: 1rem;

}

.products-container {
    width: 100%;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: space-between;
    gap: 1.6rem;

}

.box-container .product-box {
    flex-basis: 25rem;
    flex-grow: 1;
    flex-shrink: 0;
}

/* animated loader */

#loader {
    position: fixed;
    z-index: 1;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    background-color: var(--second-main-color);
}

.bar {
    width: 50%;
    height: 0.8rem;
}

.bar-fill {
    width: 0%;
    height: 100%;
    background: var(--cta-color);
    transition: width 0.2s ease;
    border-radius: 50%;
}

#percent {
    color: var(--cta-color);
    padding-block: 0.6rem;
    font-size: 1.6rem;
    font-family: var(--technical-ff);
}

/* media queries */

@media (max-width:748px) {
    html {
        font-size: 55%;
    }

    header .part1 {
        height: fit-content;
        padding-inline: 1rem;
    }

    header .part2 {
        position: relative;
    }

    header .part2 nav {
        position: absolute;
        top: 0;
        /* right:0; */
        right: -16rem;
        height: 100vh;
        margin-right: 0;
        padding: 1rem;
        padding-left: 1.6rem;
        background-color: var(--light-bg-color);
        transition: 0.3s;
        box-shadow: -5px 5px 7px rgba(0, 0, 0, 0.6);
    }

    header .part2 nav ul {
        flex-direction: column;
        gap: 1.6rem;
        margin-top: 1.6rem;
    }

    header .part2 nav ul {
        font-size: 1.6rem;
    }

    header .part2 nav .close,
    header .part2 .menu {
        display: block;
        width: 3.2rem;
        fill: var(--second-main-color);
        cursor: pointer;
    }

    header .part2 nav .close:hover,
    header .part2 .menu:hover {
        fill: var(--cta-color);
    }

    #hero {
        height: fit-content;
    }

    #about {
        flex-direction: column;
        height: fit-content;
    }

    #about .box-left {
        width: 50%;
        flex: 0 0 28rem;
        order: 1;
        border-radius: 0.5rem;
    }

    #gallery .box-container {
        gap: 0.6rem;
    }

    #gallery .box-container .box {
        flex-basis: 30rem;
    }

}

@media (max-width:670px) {
    #gallery .box-container {
        gap: 1.6rem;
        flex-direction: column;
        width: 70%;
        margin-inline: auto;
        margin-bottom: 4.6rem;
    }

    .project-card-inner {
        padding: 0.8rem;
        gap: 1rem;
    }

    .project-card .box-left {
        width: 50%;
    }
}

@media (max-width:600px) {
    .project-card-inner {
        flex-direction: column;
        height: 90svh;
        justify-items: flex-start;
        text-align: center;
        padding-inline: 2%;
        padding-block: 1.4rem;
    }

    .project-card .box-left {
        align-self: center;
        height: 60%;
    }

    .project-card .box-right h3::after {

        margin-inline: auto;
    }

    .about-calista-intro .image {
        display: none;
    }

    .about-calista-chief {
        flex-direction: column;
    }

    .about-calista-chief .image {
        width: 50%;
    }
}

@media (max-width:468px) {

    header .social-media {
        flex-direction: column;
        gap: 0.4rem;
    }

    header .part2 .logo {
        width: 14rem;
    }

    #gallery .box-container {
        width: 75%;
    }

    #contact .contact-container .contact {
        padding-block: 2.6rem;
        padding-inline: 1rem;
    }

    .section-padding {
        padding-inline: 1.4rem;
    }

    .project-card .box-left {
        width: 88%;
    }
}

@media (max-width:360px) {

    html {
        font-size: 50%;
    }

    #gallery .box-container {
        width: 90%;
    }

    .project-card-inner {
        width: 85vw;
    }
}