@import url('navbar.css');


/* FONTS */

@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Julius+Sans+One&family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap');
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css");


/* GENERAL */

:root {
    --primary-color: #8a6e9d;
    --slide-in-delay: 0.2s;
}

body, html {
    overflow-x: hidden;
}

body {
    font-family: "Nunito Sans", sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

main {
    flex: 1; /* Make content fill page to put footer at bottom if content less than page height */
}

.button {
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: 10px;
    text-decoration: none;
    padding: 0.7rem;
    font-size: 1rem;
    width: fit-content;
}


/* ANIMATIONS */

.slide-in {
    transform: translateX(50px);
    opacity: 0;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.slide-in.delay {
    transition-delay: var(--slide-in-delay);
}

.slide-in.active {
    transform: translateX(0);
    opacity: 1;
}


/* BANNER */

.banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 4rem;
    padding-top: calc(var(--nav-height) + 4rem); /* Banner image starts underneath navbar so need extra top padding to make text go after navbar */
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    text-align: center;
    background-image: linear-gradient(rgb(from var(--primary-color) r g b / 50%), rgb(from var(--primary-color) r g b / 50%)), var(--bg-image);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.banner h1, .banner p {
    max-width: 1000px;
}

@media (max-width: 768px) {
    .banner {
        gap: 0;
        padding: 2rem;
        padding-top: calc(var(--nav-height) + 2rem);
        font-size: 1rem;
    }
}


/* IMAGE TEXT ROWS */

.row {
    display: flex;
    flex-direction: row;
    align-items: center;
    max-width: 100rem;
    margin: auto;
}

.row > div {
    width: 50%;
}

.row img {
    display: block;
    width: 100%;
}

.row-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 8rem;
    box-sizing: border-box;
}

.row-text > h1 {
    color: var(--primary-color);
    font-weight: 500;
    margin: 0;
}

.row:nth-child(odd) {
    flex-direction: row-reverse;
}

/* On odd rows the image comes second so delay goes on text */
.row:nth-child(odd) > .row-text {
    transition-delay: 0s;
}
.row:nth-child(odd) > div:has(img) {
    transition-delay: var(--slide-in-delay);
}

/* On even rows the text comes second so delay goes on text */
.row:nth-child(even) > .row-text {
    transition-delay: var(--slide-in-delay);
}
.row:nth-child(even) > div:has(img) {
    transition-delay: 0s;
}

@media (max-width: 768px) {
    .row, .row:nth-child(odd) {
        flex-direction: column;
    }

    .row > div {
        width: 100%;
    }

    .row-text {
        padding: 2rem;
    }

    .row:nth-child(odd) > div:has(img) {
        transition-delay: 0s;
    }

    .row:nth-child(even) > .row-text {
        transition-delay: 0s;
    }
}


/* FOOTER */

footer {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

footer > nav {
    display: flex;
    gap: 1rem;
}

footer > nav a {
    color: white;
}