/* Homepage only: shared site styles and all other pages remain independent. */
.home-page {
    --hero-edge: max(clamp(1.5rem, 5vw, 4.5rem), calc((100% - 1360px) / 2));
}

/* One alignment line for the real logo and the hero copy. */
.home-nav {
    padding-inline: var(--hero-edge);
    height: 80px;
    background: #fff;
    border: 0;
    box-shadow: 0 1px 0 rgba(31, 48, 38, 0.08);
    backdrop-filter: none;
}

/* Compensate for the transparent margins in the original, unedited logo. */
.home-nav .logo a {
    display: block;
    position: relative;
    width: 152px;
    height: 48px;
}

.home-nav .logo img {
    position: absolute;
    left: -36px;
    top: -10px;
    width: 224px !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
}

@media (min-width: 1101px) {
    .home-nav .nav-links {
        gap: clamp(1.1rem, 1.6vw, 2rem);
    }

    .home-nav .nav-links a {
        font-size: clamp(0.8125rem, 0.98vw, 0.9375rem);
        letter-spacing: 0.035em;
    }

    .home-nav .nav-links a::after {
        height: 2px;
    }
}

#home {
    --hero-wave-height: clamp(88px, 5.2vw, 140px);
    min-height: 650px;
    /* Keep enough photo height for the cab and wheels on ultrawide screens. */
    height: max(clamp(650px, 76vh, 780px), 36.8vw);
    max-height: none;
    padding: 0 var(--hero-edge) 48px;
    align-items: center;
    justify-content: flex-start;
    background: #14291d;
    text-align: left;
    overflow: visible;
    isolation: isolate;
}

#home .hero-slider {
    overflow: hidden;
}

/* The text and wave stay still while only the photographs dissolve. */
#home .hero-frame {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
}

#home .hero-frame.is-previous {
    opacity: 1;
    z-index: 1;
}

#home .hero-frame.is-active {
    opacity: 1;
    z-index: 2;
    transition: opacity 1.6s ease-in-out;
}

#home .hero-frame--summer::after,
#home .hero-frame--winter::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 25, 15, 0.3), transparent 65%);
}

#home .hero-frame--summer .hero-photo {
    object-position: 50% 62%;
}

/* The wider winter asset fills the banner as one sharp photograph. */
#home .hero-frame--winter .hero-photo {
    object-position: 50% 60%;
}

@media (max-width: 768px) {
    #home .hero-frame--summer .hero-photo {
        object-position: 12% 58%;
    }

    #home .hero-frame--winter .hero-photo {
        object-position: 85% 58%;
    }
}

@media (prefers-reduced-motion: reduce) {
    #home .hero-frame.is-active {
        transition: none;
    }
}

#home .hero-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 60%;
}

/* Leave the cab, sky and road untouched; shade only the reading area. */
#home .hero-overlay {
    background: linear-gradient(90deg,
        rgba(8, 25, 15, 0.63) 0%,
        rgba(8, 25, 15, 0.48) 28%,
        rgba(8, 25, 15, 0.15) 43%,
        transparent 57%);
    pointer-events: none;
}

#home .hero-content {
    width: min(520px, 40vw);
    max-width: none;
    margin: 0;
    padding: 0;
    animation: none;
    transform: none;
}

#home .hero-kicker {
    margin-bottom: 1.5rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #fff;
    gap: 0.7rem;
}

#home .hero-kicker::before {
    display: block;
    width: 28px;
    flex: 0 0 28px;
}

#home .hero-content h1 {
    max-width: none;
    margin: 0 0 1.5rem;
    font-size: clamp(3rem, 4.72vw, 4.5rem);
    font-weight: 500;
    line-height: 1.07;
    letter-spacing: -0.018em;
    text-shadow: none;
}

#home .hero-content h1 span {
    white-space: nowrap;
}

#home .hero-content p {
    max-width: 510px;
    margin: 0 0 1.7rem;
    font-size: 1.125rem;
    line-height: 1.55;
    color: #fff;
    text-shadow: none;
}

#home .hero-cta,
#home .hero-cta:hover,
#home .hero-cta:active {
    min-height: 52px;
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    font-size: 1rem;
    line-height: 1.4;
    box-shadow: none;
    transform: none;
}

/* A soft central rise, with the authentic leaf resting on its crest. */
#home::after {
    height: var(--hero-wave-height);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' viewBox='0 0 1440 118'%3E%3Cpath fill='%23fffefa' d='M0 76C220 88 360 88 520 54C610 35 660 22 720 22C780 22 830 35 920 54C1080 88 1220 88 1440 76V118H0Z'/%3E%3C/svg%3E");
}

#home::before {
    bottom: calc(var(--hero-wave-height) * 0.8136 - 30px);
    width: 60px;
    height: 60px;
    background-size: 38px;
    box-shadow: 0 8px 22px rgba(31, 48, 38, 0.09);
}

#home + .welcome-section {
    padding-top: clamp(3rem, 5vw, 5rem);
}

/* Keep the tablet crop wide enough to include the complete cab. */
@media (min-width: 701px) and (max-width: 900px) {
    #home {
        min-height: 0 !important;
        height: clamp(530px, 78vw, 640px) !important;
        padding: 0 var(--hero-edge) 40px !important;
    }

    #home .hero-content h1 {
        font-size: clamp(2.4rem, 5.6vw, 3rem) !important;
    }

    #home .hero-content p {
        font-size: 1rem !important;
    }

    #home .hero-kicker {
        font-size: 0.75rem;
        letter-spacing: 0.06em;
    }

    #home .hero-photo {
        object-position: 70% 65%;
    }
}

@media (max-width: 768px) {
    .home-page {
        --hero-edge: var(--mobile-edge, 1.2rem);
    }
}

/* On narrow screens, give the photograph its own uncrowded space. */
@media (max-width: 700px) {
    #home {
        --hero-wave-height: 60px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        min-height: 0 !important;
        height: auto !important;
        padding: 0 !important;
    }

    #home .hero-content {
        order: 0;
        width: auto;
        max-width: none;
        padding: clamp(2.25rem, 6vw, 3.5rem) var(--mobile-edge, 2rem) 2.5rem;
    }

    #home .hero-content h1 {
        font-size: clamp(2rem, 11.4vw, 3.5rem) !important;
        max-width: none !important;
    }

    #home .hero-content p {
        max-width: 500px;
        font-size: 1.05rem !important;
    }

    #home .hero-slider {
        order: 1;
        position: relative;
        aspect-ratio: 1.7;
        height: auto;
        flex: none;
    }

    #home .hero-photo {
        position: absolute;
        inset: 0;
    }

    #home .hero-overlay {
        display: none;
    }

    #home::before {
        display: block !important;
        bottom: calc(var(--hero-wave-height) * 0.8136 - 26px);
        width: 52px;
        height: 52px;
        background-size: 34px;
    }
}

@media (max-width: 480px) {
    #home .hero-kicker {
        font-size: 0.75rem;
        letter-spacing: 0.065em;
        margin-bottom: 1.1rem;
    }

    #home .hero-kicker::before {
        width: 20px;
        flex-basis: 20px;
    }

    #home .hero-content h1 {
        margin-bottom: 1.1rem;
    }

    #home .hero-content p {
        margin-bottom: 1.4rem;
        font-size: 1rem !important;
    }

    #home .hero-slider {
        aspect-ratio: 1.2;
    }

    #home .hero-photo {
        object-position: 75% 65%;
    }
}
