/*
 * BiteByte Custom Styles - V25 (Final Scroll Behavior Fix)
 */

/* --- Professional Fonts (Using Carlito, the Calibri alternative) --- */
@import url('https://fonts.googleapis.com/css2?family=Carlito:wght@400;700&display=swap');

/* --- Base Styles --- */
body {
    background-color: #ffffff;
    color: #4a4a4a;
    font-family: 'Carlito', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.landing {
    background-color: transparent;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #1a1a1a;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.button.primary,
input[type="submit"].primary {
    background-color: #5A51FE !important;
    color: #ffffff !important;
    box-shadow: none !important;
    border-radius: 8px;
    font-weight: 700;
}

.button.primary:hover {
    background-color: #4a41d4 !important;
}

.button {
    box-shadow: inset 0 0 0 1px #e0e0e0 !important;
    color: #333 !important;
    border-radius: 8px;
    font-weight: 700;
}

.button:hover {
    background-color: #f5f5f5 !important;
}

/* --- Header & Menu --- */
#header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
}

#header h1.logo img {
    height: 35px;
    width: auto;
    margin-right: 10px;
}

#header h1.logo a {
    display: flex;
    align-items: center;
    font-family: 'Carlito', sans-serif;
    font-size: 1.6em;
    font-weight: 700;
    letter-spacing: 0;
    color: #1a1a1a;
    text-transform: none;
}

#header .menuToggle:after {
    background-image: url("../images/bars.svg");
    filter: invert(1);
    opacity: 0.6;
}

/* This is the transparent header state (used at the top of the landing page) */
#header.alt {
    background: transparent;
    backdrop-filter: none;
}

#header.alt h1.logo a,
#header.alt nav>ul>li>a {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

#header.alt .menuToggle:after {
    filter: none;
    opacity: 1;
}

/* This is our only custom override for the landing page header */
body.landing #header h1.logo {
    display: none;
    /* Hide the logo on the homepage */
}

#menu {
    background: #222;
}

/* --- Inner Page Header --- */
#main>header {
    position: relative;
    color: #fff;
}

#main>header:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 0;
}

#main>header>* {
    position: relative;
    z-index: 1;
}

#main>header h2,
#main>header p {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* --- Hero Banner & Mockup --- */
body.landing #page-wrapper {
    padding-top: 0;
}

#banner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    color: #fff;
    overflow: hidden;
}

#banner .inner {
    padding-top: 7em;
    flex-shrink: 0;
    position: relative;
    z-index: 3;
}

#banner h2,
#banner p {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#banner h2 {
    font-weight: 700;
    font-size: 3em;
}

.download-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1.5em;
}

.download-buttons .badge {
    height: 55px;
    width: auto;
    margin: 10px;
    transition: transform 0.2s ease;
}

.download-buttons .badge:hover {
    transform: scale(1.05);
}

.skew-mockup-container {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}

.skew-mockup-phone-frame {
    position: relative;
    width: 750px;
    height: 468px;
    background-image: url('../images/phone.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

@media (max-width: 750px) {
    .skew-mockup-phone-frame {
        width: 500px;
        height: 312px;
    }
}

@media (max-width: 500px) {
    .skew-mockup-phone-frame {
        width: 400px;
        height: 250px;
    }
}

.skew-mockup-screenshot {
    position: absolute;
    top: 2.1%;
    left: 35%;
    width: 29.7%;
    transform: perspective(100px) rotateZ(-59.8deg) skewY(27deg) skewX(0.5deg) scaleY(1.15);
}

.screenshot-aspect-ratio-box {
    position: relative;
    padding-bottom: 177.778%;
}

.screenshot-fitter {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.screenshot-fitter img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: top;
}

#banner .more {
    position: relative;
    z-index: 3;
    flex-shrink: 0;
    color: #ffffff !important;
}

/* --- "BiteByte Story" Page Polish --- */
.story-image img {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.wrapper.style5 .spotlight .image.story-image {
    max-width: 100%;
}

.story-screenshots-container {
    max-width: 700px;
    margin: 0 auto;
}

/* --- Other Page Sections --- */
#cta.wrapper.style4 {
    background-color: #1a1a1a;
    text-align: center;
}

#cta header h2 {
    color: #ffffff !important;
}

#cta header p {
    color: rgba(255, 255, 255, 0.8) !important;
}

#footer {
    background-color: #1d2a2a;
}

#footer .icons a:hover {
    color: #5A51FE !important;
}

/* --- Dark Section Text Color Fix --- */
.wrapper.style2 .major h2 {
    color: #ffffff;
}

.wrapper.style2 .major p {
    color: rgba(255, 255, 255, 0.8);
}

/* --- Banner Logo Styles --- */
.banner-logo {
    margin-bottom: 1.5em;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.banner-logo img {
    width: 100px;
    height: auto;
}

.banner-logo h1 {
    font-family: 'Carlito', sans-serif;
    font-size: 3.5em;
    font-weight: 800;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-top: 0.25em;
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: -0.03em;
}

/* --- Video --- */
.video-container {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 2em auto 0 auto;
    overflow: hidden;
    padding-bottom: 100%;
    height: 0;
}

@media (min-width: 737px) {
    .video-container {
        padding-bottom: 56.25%;
    }
}

@media (max-width: 736px) {
    .video-container {
        padding-bottom: 177.78%;
    }
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Mobile View Adjustments --- */
@media screen and (max-width: 980px) {
    body.is-mobile.landing #page-wrapper {
        background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("../../images/banner.jpg");
        background-position: center center;
        background-repeat: no-repeat;
        background-size: cover;
        background-attachment: scroll;
    }

    .skew-mockup-container,
    #banner .more {
        display: none;
    }

    body.landing #page-wrapper {
        padding-top: 3em;
    }

    #banner {
        justify-content: center;
        height: auto;
        min-height: calc(100vh - 3em);
        padding: 4em 1.5em;
    }

    #banner .inner {
        padding-top: 0;
        flex-shrink: 1;
    }

    .banner-logo h1 {
        font-size: 2.8em;
    }

    #banner h2 {
        font-size: 1.75em;
    }

    #banner p {
        font-size: 0.9em;
    }

    .download-buttons .badge {
        height: 45px;
    }
}

/* --- Article & Story Page Styles --- */
.story-content {
    max-width: 45em;
    margin: 0 auto;
}

.story-content p,
.story-content h3 {
    text-align: left;
}

.story-content p {
    line-height: 1.75;
}

.story-content h3 {
    margin-top: 2em;
}

.story-content .story-profile-img {
    float: left;
    width: 125px;
    margin-right: 1.5em;
    margin-bottom: 0.5em;
}

.story-content .story-media {
    margin: 2.5em 0;
}

@media screen and (max-width: 736px) {
    .story-content .story-profile-img {
        float: none;
        display: block;
        width: 150px;
        max-width: 50%;
        margin: 0 auto 1.5em auto;
    }
}

/* --- Screenshot Carousel Styles --- */
#screenshot-carousel {
    background-color: #fff;
    color: #4a4a4a;
    padding-top: 5em;
    padding-bottom: 5em;
}

#screenshot-carousel .major h2 {
    color: #1a1a1a;
    /* THIS IS THE FIX: Changes the underline to be visible on a white background */
    border-bottom-color: #e0e0e0;
}

#screenshot-carousel .major p {
    color: #4a4a4a;
}

.feature-carousel {
    max-width: 450px;
    margin: 2em auto 0 auto;
}

.feature-carousel img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.slick-dots li button:before {
    font-size: 12px;
    color: #d0d0d0;
    opacity: 1;
    transition: color 0.2s ease;
}

.slick-dots li.slick-active button:before {
    color: #5A51FE;
}

.slick-prev,
.slick-next {
    display: none !important;
}