﻿/* home.css */

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-family: var(--bs-body-font-family, -apple-system, Segoe UI, Roboto, Inter, Helvetica, Arial, sans-serif);
}

* {
    transition: color .5s, background-color .5s, border-color .5s, box-shadow .5s, padding .5s, margin .5s;
}

[id] {
    scroll-margin-top: 4.5rem;

    @media (min-width: 993px) {
        scroll-margin-top: 2rem;
    }
}

header {
    --bs-navbar-bg: color-mix(in hsl, var(--color-bg-light), transparent 10%);
    --bs-border-color: var(--color-bg-light);
    background-color: var(--bs-navbar-bg) !important;

    .navbar-brand {
        --bs-navbar-brand-hover-color: var(--color-primary);
        color: var(--color-text);
    }

    button.navbar-toggler {
        height: 3rem;
        width: 3rem;
        padding: 0;
        padding: .5rem;
        --bs-navbar-toggler-focus-width: 1px;


        .navbar-toggler-icon {
            background-image: none !important;
            position: relative;
            display: block;
            width: 1.8rem;
            height: 5px;
            border-radius: 999px;
            background-color: var(--color-text);
            transition: background-color .3s ease;

            &::before,
            &::after {
                content: "";
                position: absolute;
                left: 0;
                width: 100%;
                height: 5px;
                background-color: var(--color-text);
                border-radius: 999px;
                transform-origin: center center;
                transition: transform .3s ease;
            }

            &::before {
                transform: translateY(-8px) rotate(0deg);
            }

            &::after {
                transform: translateY(8px) rotate(0deg);
            }
        }

        &[aria-expanded="false"] .navbar-toggler-icon {
            background-color: var(--color-text);

            &::before {
                transform: translateY(-8px) rotate(0deg);
            }

            &::after {
                transform: translateY(8px) rotate(0deg);
            }
        }

        &[aria-expanded="true"] .navbar-toggler-icon {
            background-color: transparent;

            &::before {
                transform: rotate(45deg);
            }

            &::after {
                transform: rotate(-45deg);
            }
        }
    }
}



.accordion {
    --bs-accordion-bg: var(--bs-card-bg);
}

.bg-lite {
    background: var(--bs-card-bg);
}

.bg-lite-trans {
    background: var(--color-bg-light-trans);
}

.bg-body {
    background: var(--bs-body-bg) !important;
}

.btn {
    --bs-btn-border-radius: 0;
}

.pulse {
    animation: pulse 1s infinite;
}

.mcLogo {
    height: 1.5em;
}

.btn-brand {
    --_btn-bg: var(--bs-primary, var(--color-primary));
    --_btn-bg-hover: var(--bs-secondary, var(--color-secondary));
    background: var(--_btn-bg);
    border-color: var(--_btn-bg);
    color: #fff;

    &:hover {
        background: var(--_btn-bg-hover);
        border-color: var(--_btn-bg-hover);
        filter: brightness(.97);
    }
}

.text-brand {
    color: var(--bs-link-color, var(--color-primary)) !important;
}

.shadow-soft {
    box-shadow: 0 10px 30px rgba(2, 6, 23, .08), 0 1px 2px rgba(2, 6, 23, .06);
}

.cards {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
    background: var(--bs-card-bg, var(--color-bg-light));
    border: 1px solid var(--bs-card-border-color, #e5e7eb);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 .25rem 1rem rgba(0,0,0,.05);
    transition: transform .35s ease, filter .35s ease;

    * {
        color: var(--bs-body-color, var(--color-text));
    }

    h3 {
        margin: .25rem 0 .5rem;
        font-size: 1.1rem;
    }

    p {
        margin: 0 0 .5rem;
    }

    ul {
        margin: .25rem 0 0 1rem;
    }
}

#home {
    h1 {
        color: var(--color-text);
    }
    .quote-rotator {
        max-width: 800px;
        margin: 0 auto;
        min-height: 6rem;


        .quote-text {
            font-size: 1.25rem;
            font-style: italic;
            line-height: 1.5;
            opacity: 0;
            transition: opacity 0.5s ease-in-out;

            &.is-visible {
                opacity: 1;
            }
        }
    }

    .mcLogo {
        height: 2em;
    }
}

#how .mcLogo {
    height: 1em;
}


:is(#how,#features) ul {
    margin: 0 0 0 2.5ch;
    padding: 0;
}

#pricing .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#tblPricing td {
    padding: 10px;
    font-size: 18px;
    border-bottom: 1px solid color-mix(in hsl, var(--bs-body-color), transparent 90%);
    text-align: left;
    background: transparent;
}

#tblPricing {
    tr > :not(:first-child) {
        text-align: center;
        border-left: 1px solid color-mix(in hsl, var(--bs-body-color), transparent 90%);
    }

    tr > * {
        padding: 0;
    }

    td.btn-brand {
        padding: 0 1ch;
    }

    td:not(.no, .yes) {
        color: var(--bs-body-color);
    }
}

#plans {
    .yes, .no {
        font-size: 2em;
        text-align: center;
        vertical-align: middle;
        color: hsl(115, 54%, 50%);
        padding: 0;
        text-shadow: 0 0 1px hsl(0, 0%, 25%);

        [data-bs-theme="dark"] & {
            text-shadow: 0 0 1px hsl(0, 0%, 75%);
        }
    }

    .no {
        color: var(--color-text);
    }

    .amount {
        color: var(--color-primary);
    }
}

#about {
    .card {
        width: fit-content;
        max-width: 100%;
        margin: 0 auto;
        padding: 2rem;

        > div:nth-child(2n) {
            text-align: right;

            .bio-content {
                justify-content: flex-end;
            }

            .bio-photo {
                order: 1;
            }

            .bio-text {
                order: 0;
            }
        }

        > div:nth-child(2n-1) {
            text-align: left;

            .bio-content {
                justify-content: flex-start;
            }

            .bio-photo {
                order: 0;
            }

            .bio-text {
                order: 1;
            }
        }
    }

    .about-photo {
        max-width: 100px;
    }

    .bio-entry {
        margin-bottom: 1rem;
    }

    .bio-name {
        font-weight: bold;
        margin-bottom: 1rem;
    }

    .bio-content {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 1rem;
    }

    .bio-photo {
        margin: 0;
        flex-shrink: 0;
    }

    .bio-text {
        flex: 1;
        width: auto;

        ul {
            margin: 0;
            padding: 0;
            list-style: none;
        }
    }
}

#testimonials {

    #testimonialCarousel {
        position: relative;
    }

    .carousel-item {
        > div {
            max-width: 300px;
        }

        img {
            width: 100%;
            height: auto;
            display: block;
        }
    }

    .carousel-indicators {
        [data-bs-target] {
            width: 60px;
            height: 30px;
            border-radius: 10px;
            background-color: transparent;
            border: 2px solid var(--color-text);
            opacity: .4;
            transition: opacity .3s;
        }

        .active {
            opacity: 1;
            background-color: var(--color-primary);
            border: 2px solid var(--color-secondary);
        }
    }

    :is(.carousel-control-next, .carousel-control-prev) {
        filter: invert(1);
        width: 60px;
        height: 180px;
        border-radius: 10px;
        border: 2px solid var(--color-text) !important;
        top: 50%;
        transform: translateY(-50%);
        position: absolute;

        &:hover {
            background-color: color-mix(in hsl, hsl(23,100%,42%), transparent 10%);
            border: 2px solid hsl(33,82%,76%);
        }

        [data-bs-theme="dark"] & {
            filter: invert(0);

            &:hover {
                background-color: color-mix(in hsl, var(--color-primary), transparent 10%);
            }
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .quote-text {
        transition: none;
    }
}

@media (min-width: 1281px) {
    #about {
        .about-photo {
            max-width: 200px;
        }

        .bio-text {
            font-size: 1.3rem;
        }
    }
}

@media (min-width: 768px) {
    #about {
        .about-photo {
            max-width: 120px;
        }
    }
}

@media screen and (max-width: 1023px) {
    header .navbar-nav {
        flex-direction: row;
        justify-content: space-around;
        gap: 0;
        justify-content: center;

        > li {
            a {
                padding: 2ch;
            }

            :hover {
                background: color-mix(in hsl, var(--color-bg-dark), transparent 10%)
            }
        }
    }

    h2 {
        text-align: center;
    }

    .card {
        padding: .0rem;
    }

    #plans .type {
        font-weight: 200 !important;
    }
}

@media screen and (max-width: 767px) {
    header .navbar-nav {
        flex-direction: column;
        gap: 0;

        > li {
            a {
                padding-left: 2ch;
            }

            :hover {
                background: color-mix(in hsl, var(--color-bg-dark), transparent 10%)
            }
        }
    }

    #about {
        .bio-content {
            flex-direction: column;
            align-items: flex-start;
        }

        .card > div:nth-child(2n) {
            .bio-content {
                flex-direction: column;
                align-items: flex-end;
            }
        }

        .card > div:nth-child(2n-1) {
            .bio-content {
                flex-direction: column;
            }

            .bio-photo {
                order: 0;
            }

            .bio-text {
                order: 1;
            }
        }
    }

    #testimonials .carousel-indicators [data-bs-target] {
        width: 20px;
    }

    .carousel-indicators [data-bs-target] {
        width: 30px;
        height: 30px;
    }

    #tblPricing :is(tr:first-child td:nth-child(n+1), td:first-child) {
        font-size: 0.8em;
    }
}


@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}
