/* ========================== */
/*  Table of Contents        */
/*   Global Styles            */
/*   Header and Navigation Menu     */
/*   CTA Styles                */
/*   Home Section       */
/*   About Section       */
/* ========================== */

/* ========================== */
/*       Global Styles       */
/* ========================== */

:root {
    --background-main-color: rgba(230, 220, 199, 0.45);
    --background-alt-color: rgba(230, 220, 199, 0.15);
    --accent-color: #336D2B;
    --grey-dark-color: #888888;
    --grey-light-color: #B3B3B3;
    --black-color: hsl(41, 10%, 10%);
    --vollkorn: 'Vollkorn', serif;
    --noto: 'Noto Serif', serif;
    --source: 'Source Serif 4', serif;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    line-height: 1.6;
    color: var(--black-color);
    background: var(--background-main-color);
    width: 100vw;
    overflow-x: hidden;
}

section {
    padding: 6rem 5vw;
}

h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.3rem;
    margin-bottom: 0.35rem;
}

a {
    color: inherit;
    text-decoration: none;
}

.section-heading {
    font-size: 1.6rem;
    font-family: var(--vollkorn);
    font-weight: 400;
    text-align: center;
    text-decoration: underline;
    text-decoration-color: var(--accent-color);
    text-decoration-thickness: 4px;
    text-underline-offset: 0.5em;
}

/* =============================== */
/*   Header and Navigation Menu  */
/* =============================== */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    pointer-events: none;
}

nav {
    width: 90vw;
    margin: 2.5rem auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    pointer-events: none; /* gap passes clicks through to page */
}

nav .nav-logo,
nav .nav-links,
nav .nav-menu-toggle {
    pointer-events: auto;
}

nav .nav-logo,
.nav-links,
.nav-menu-toggle {
    transition: transform 520ms ease, opacity 360ms ease;
    will-change: transform, opacity;
}

nav .nav-logo {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
}

header.is-hidden nav,
header.is-hidden nav .nav-logo,
header.is-hidden nav .nav-links,
header.is-hidden nav .nav-menu-toggle {
    pointer-events: none;
}

header.is-hidden .nav-logo {
    opacity: 0;
    transform: translateX(-140%);
}

header.is-hidden .nav-links {
    opacity: 0;
    transform: translateX(140%);
}

header.is-hidden .nav-menu-toggle {
    opacity: 0;
    transform: translateX(140%);
}

header.has-scrolled .nav-logo,
header.has-scrolled .nav-links,
header.has-scrolled .nav-menu-toggle {
    background-color: rgba(230, 220, 199, 0.5);
    border: 1px solid rgba(51, 109, 43, 0.12);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

header.is-visible .nav-logo,
header.is-visible .nav-links,
header.is-visible .nav-menu-toggle {
    opacity: 1;
    transform: translateX(0);
}

nav img {
    height: 75px;
    width: auto;
}

@media (max-width: 720px) {
    nav img {
        height: 55px;
    }
}

.nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    font-size: 0.9rem;
    font-family: var(--vollkorn);
    padding: 1.5rem 1rem;
}

.nav-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    font-family: var(--vollkorn);
    font-size: 0.9rem;
    color: inherit;
    border: 1px solid rgba(51, 109, 43, 0.12);
    padding: 0.7rem 1.6rem 0.6rem;
    background-color: rgba(230, 220, 199, 0.85);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

@media (max-width: 720px) {
    header.has-scrolled nav {
        margin: 1rem auto;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    
    header.has-scrolled .nav-links {
        width: var(--nav-logo-width, 100%);
        align-items: stretch;
        gap: 0;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        transform: translateY(-0.4rem);
        transition: max-height 220ms ease, opacity 200ms ease, transform 200ms ease;
    }

    header.has-scrolled .nav-links {
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    header.has-scrolled nav.is-menu-open .nav-links {
        max-height: 500px;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(-1px);
    }

    header.is-hidden .nav-menu-toggle,
    header.is-hidden .nav-links {
        opacity: 0;
        transform: translateX(-140%);
    }

    header.is-hidden nav.is-menu-open .nav-links {
        max-height: 0;
        pointer-events: none;
    }

    .nav-menu-toggle {
        display: none;
    }

    header.has-scrolled .nav-menu-toggle {
        display: inline-flex;
    }

    header.has-scrolled .nav-links a,
    header.has-scrolled .nav-menu-toggle {
        width: var(--nav-logo-width, 100%);
        border-radius: 0;
        padding: 0.75rem 1.6rem 0.65rem;
        background-color: rgba(230, 220, 199, 0.9);
        border: 1px solid rgba(51, 109, 43, 0.12);
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
        text-align: center;
    }
}

.nav-links a:hover {
    text-decoration: underline;
    text-decoration-color: var(--accent-color);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.3em;
    color: inherit;
}

@media (prefers-reduced-motion: reduce) {
    nav .nav-logo,
    .nav-links,
    .nav-menu-toggle {
        transition: none;
        transform: translateX(0);
    }
}

@supports (backdrop-filter: blur(6px)) {
    nav .nav-logo,
    .nav-links,
    .nav-menu-toggle {
        backdrop-filter: blur(6px);
    }
}

/* ========================== */
/*        CTA Styles          */
/* ========================== */

.main-cta {
    background-color: var(--accent-color);
    color: white;
    padding: 0.6rem 3.5rem;
    display: inline-block;
    font-weight: 500;
    font-size: 1.1rem;
    cursor: pointer;
    transform: translateY(0);
    text-align: center;
    line-height: 1.5;
    transition:
        transform 160ms cubic-bezier(0.2, 0.7, 0.3, 1),
        box-shadow 200ms ease,
        background-color 200ms ease,
        color 200ms ease,
        border-color 200ms ease;
}

.alt-cta {
    border: 2px solid var(--accent-color);
    background-color: transparent;
    color: var(--accent-color);
    padding: 0.6rem 3.5rem;
    display: inline-block;
    font-weight: 500;
    font-size: 1.1rem;
    cursor: pointer;
    transform: translateY(0);
    text-align: center;
    line-height: 1.5;
    transition:
        transform 160ms cubic-bezier(0.2, 0.7, 0.3, 1),
        box-shadow 200ms ease,
        background-color 200ms ease,
        color 200ms ease,
        border-color 200ms ease;
}

/* Subtle CTA hover/focus treatments (professional + on-brand) */
@media (hover: hover) and (pointer: fine) {
    .main-cta:hover,
    .alt-cta:hover {
        transform: translateY(-2px);
        box-shadow:
            0 6px 14px rgba(15, 23, 42, 0.12),
            0 1px 2px rgba(15, 23, 42, 0.10);
    }

    @supports (background-color: color-mix(in srgb, white 50%, black)) {
        .main-cta:hover {
            background-color: color-mix(in srgb, var(--accent-color) 92%, var(--black-color));
        }

        .alt-cta:hover {
            background-color: color-mix(in srgb, var(--accent-color) 12%, white);
            border-color: color-mix(in srgb, var(--accent-color) 92%, var(--black-color));
        }
    }
}

.main-cta:focus-visible,
.alt-cta:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.10);
}

@supports (outline-color: color-mix(in srgb, white 50%, black)) {
    .main-cta:focus-visible,
    .alt-cta:focus-visible {
        outline-color: color-mix(in srgb, var(--accent-color) 55%, transparent);
        box-shadow:
            0 0 0 3px color-mix(in srgb, var(--accent-color) 22%, transparent),
            0 1px 2px rgba(15, 23, 42, 0.10);
    }
}

.main-cta:active,
.alt-cta:active {
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    .main-cta,
    .alt-cta {
        transition: none;
        transform: none;
    }

    .main-cta:hover,
    .alt-cta:hover,
    .main-cta:active,
    .alt-cta:active {
        transform: none;
    }
}

/* ========================== */
/*       Home Section         */
/* ========================== */

#home {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 1000px;
    background-color: var(--background-main-color);
    padding-top: 16rem;
    padding-bottom: 5rem;
    font-family: var(--vollkorn);
    text-align: center;
}

#pre-headline {
    font-size: 2rem;
}

#headline {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 780px) {
    #pre-headline {
        font-size: 1.5rem;
    }
    #headline {
        font-size: 2.2rem;
    }
}

@media (max-width: 540px) {
    #pre-headline {
        width: 250px;
        line-height: 2;
    }
}

.headline-rotator {
    display: inline-grid;
    grid-auto-flow: row;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    will-change: transform;
    text-align: center;
    padding-bottom: 0.15em; /* reserve space for underline reveal */
}

.headline-rotator::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: var(--headline-underline-width, 0px);
    border-bottom: 4px solid var(--accent-color);
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) scaleX(0);
    transform-origin: 0% 50%;
    will-change: transform;
}

.headline-rotator.show-underline::after {
    opacity: 1;
    animation: headlineUnderlineDraw 1100ms linear forwards;
}

.headline-rotator.underline-done::after {
    opacity: 1;
    animation: none;
    transform: translateX(-50%) scaleX(1);
}

@keyframes headlineUnderlineDraw {
    0% {
        transform: translateX(-50%) scaleX(0);
    }
    /* slow start */
    15% {
        transform: translateX(-50%) scaleX(0.08);
    }
    /* fast majority */
    85% {
        transform: translateX(-50%) scaleX(0.92);
    }
    /* slow finish */
    100% {
        transform: translateX(-50%) scaleX(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .headline-rotator.show-underline::after {
        animation: none;
        opacity: 1;
        transform: translateX(-50%) scaleX(1);
    }

    .headline-rotator.show-underline .headline-word::after {
        animation: none;
        opacity: 1;
        transform: scaleX(1);
    }
}

.headline-rotator-text {
    grid-area: 1 / 1;
    display: block;
    will-change: transform;
    width: 100%;
    text-align: center;
}

.headline-rotator-text-current {
    transform: translate3d(0, 0, 0);
}

.headline-rotator-text-next {
    transform: translate3d(0, 110%, 0);
}

.headline-rotator.is-animating .headline-rotator-text-current {
    animation: headlineSwipeOut 520ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}

.headline-rotator.is-animating .headline-rotator-text-next {
    animation: headlineSwipeIn 520ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}

@keyframes headlineSwipeOut {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(0, -110%, 0);
    }
}

@keyframes headlineSwipeIn {
    0% {
        transform: translate3d(0, 110%, 0);
    }
    70% {
        transform: translate3d(0, -6%, 0);
    }
    100% {
        transform: translate3d(0, 0, 0);
    }
}

#sub-headline {
    margin-top: 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

#sub-headline p {
    margin: 0;
    font-size: 1.25rem;
}

#sub-headline p:not(:last-child)::after {
    content: " | ";
    margin-left: 1rem;
    margin-right: 1rem;
    color: var(--accent-color);
}

@media (max-width: 1150px) {
    #sub-headline {
        max-width: 600px;
    }
    #sub-headline p:nth-child(2)::after {
        content: "";
        margin: 0;
        color: inherit;
    }
}

@media (max-width: 780px) {
    #sub-headline p {
        font-size: 1.1rem;
    }
    #sub-headline {
        max-width: 500px;
    }
}

@media (max-width: 540px) {
    #sub-headline {
        display: none;
    }

    /* Mobile headline: allow explicit word-per-line breaks */
    .headline-rotator {
        white-space: normal;
    }

    /* Mobile headline: draw underline per line instead */
    .headline-rotator::after {
        content: none;
    }

    .headline-word {
        display: inline-block;
        position: relative;
        padding-bottom: 0.15em;
    }

    .headline-word::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        border-bottom: 4px solid var(--accent-color);
        opacity: 0;
        transform: scaleX(0);
        transform-origin: left center;
        will-change: transform;
    }

    .headline-rotator.show-underline .headline-word::after {
        opacity: 1;
        animation: headlineUnderlineDrawMobile 1100ms linear forwards;
    }

    .headline-rotator.underline-done .headline-word::after {
        opacity: 1;
        animation: none;
        transform: scaleX(1);
    }

    .headline-rotator-text {
        line-height: 1.5;
    }
}

@keyframes headlineUnderlineDrawMobile {
    0% {
        transform: scaleX(0);
    }
    /* slow start */
    15% {
        transform: scaleX(0.08);
    }
    /* fast majority */
    85% {
        transform: scaleX(0.92);
    }
    /* slow finish */
    100% {
        transform: scaleX(1);
    }
}

#home-cta {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin-top: 2.5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 7.5rem;
}

@media (max-width: 960px) {
    #home-cta {
        margin-bottom: 3.5rem;    
    }
}

@media (max-width: 540px) {
    #home-cta {
        margin-top: 2rem;
    }
}

#tax-savings {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    font-size: 1.1rem;
    color: var(--grey-dark-color);
    width: 100%;
    max-width: 70rem;
}

@media (max-width: 960px) {
    #tax-savings {
        display: none;
    }
}

#tax-savings-amounts {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

#tax-savings .amount {
    font-family: var(--noto);
    font-weight: 600;
    font-size: 1.8rem;
    color: var(--grey-light-color);
}

@media (max-width: 1325px) {
    #tax-savings-amounts .amount:nth-of-type(5) {
        display: none;
    }
}

@media (max-width: 1150px) {
    #tax-savings-amounts .amount:nth-of-type(6) {
        display: none;
    }
}

#client-companies {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: nowrap;
    font-size: 1.1rem;
    color: var(--grey-dark-color);
    width: 100%;
    max-width: 70rem;
}

#client-companies-title {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 960px) {
    #client-companies {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
        overflow-x: hidden;
    }

    #client-companies-title {
        width: 100%;
        text-align: center;
    }
}

#client-companies-marquee {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    --marquee-gap: 1.5rem;
}

.marquee-track {
    display: flex;
    width: max-content;
    gap: 0;
    will-change: transform;
}

.marquee-group {
    display: flex;
    align-items: center;
    gap: var(--marquee-gap);
    padding-right: var(--marquee-gap);
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.company-tag {
    padding: 0.2rem 0.9rem;
    font-family: var(--noto);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--grey-light-color);
    line-height: 1;
    white-space: nowrap;
}

/* ========================== */
/*       Motion Helpers       */
/* ========================== */

.fade-in-up {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .fade-in-up {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@media (max-width: 720px) {
    .about-card.fade-in-up:not(.value-card) {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ========================== */
/*       Savings Section      */
/* ========================== */

#savings {
    background-color: var(--background-alt-color);
    text-align: center;
}

.savings-stats {
    --savings-gap: 1.25rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: calc(1.5 * var(--savings-gap)) var(--savings-gap);
    margin-top: 3.5rem;
    width: 100%;
}

.savings-stats-item {
    flex: 0 0 calc((100% - (6 * var(--savings-gap))) / 7);
    min-width: 10.5rem;
}

.savings-stats-amount {
    font-family: var(--noto);
    font-weight: 800;
    font-size: 1.8rem;
    line-height: 1.1;
    color: var(--accent-color);
}

.savings-stats-desc {
    font-family: var(--source);
    margin-top: 1rem;
    color: var(--black-color);
    font-size: 0.98rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

@media (max-width: 1200px) {
    .savings-stats-item {
        flex-basis: calc((100% - (3 * var(--savings-gap))) / 4);
    }
}

@media (max-width: 900px) {
    .savings-stats-item {
        flex-basis: calc((100% - (2 * var(--savings-gap))) / 3);
    }
}

@media (max-width: 650px) {
    .savings-stats-item {
        flex-basis: calc((100% - (1 * var(--savings-gap))) / 2);
    }
}

@media (max-width: 420px) {
    .savings-stats-item {
        flex-basis: 100%;
    }
}

#savings-subtext {
    font-family: var(--source);
    margin-top: 3rem;
    color: var(--grey-dark-color);
    font-size: 1rem;
    text-align: center;
}

/* ========================== */
/*       About Section        */
/* ========================== */

#about {
    background-color: var(--background-main-color);
}

.about-scroll {
    position: relative;
}

.about-track {
    position: static;
}

.about-progress {
    display: none;
}

.about-layout {
    --about-image-width: clamp(220px, 22vw, 320px);
    margin-top: 3.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--about-image-width) minmax(0, 1fr);
    grid-template-areas: "left image right";
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: stretch; /* makes center image match column height */
    width: 100%;
    max-width: 70rem;
    margin-left: auto;
    margin-right: auto;
}

.about-column-left {
    grid-area: left;
}

.about-column-right {
    grid-area: right;
}

.about-column {
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
    min-width: 0;
}

.about-card h2 {
    font-family: var(--source);
    font-weight: 600;
    letter-spacing: 0.01em;
    margin-bottom: 0.65rem;
}

.about-card p {
    font-family: var(--source);
    font-size: 0.9rem;
    color: var(--black-color);
    opacity: 0.86;
}

.about-card p + p {
    margin-top: 1rem;
}

.about-figure {
    grid-area: image;
    margin: 0;
    align-self: stretch;
    width: 100%;
    min-height: 28rem;
    display: flex;
}

.about-image {
    width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 14px;
    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.12),
        0 2px 8px rgba(15, 23, 42, 0.10);
}

@media (max-width: 960px) {
    .about-layout {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "image image"
            "left right";
    }

    .about-figure {
        width: min(22rem, 100%);
        aspect-ratio: 1 / 1;
        min-height: unset;
        justify-self: center;
        align-self: start;
    }

    .about-column {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .about-image {
        height: 100%;
        object-position: 50% 35%;
        margin-bottom: 1rem;
    }
}

@media (max-width: 720px) {
    .about-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "image"
            "left"
            "right";
    }

    .about-card p {
        margin-bottom: 0.5rem;
    }

    .about-column {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    /* Normal accordion (click to expand) */
    .about-accordion-enhanced .about-accordion-trigger {
        display: block;
        width: 100%;
        padding: 0.75rem 0;
        margin: 0;
        font: inherit;
        font-family: var(--source);
        font-weight: 600;
        letter-spacing: 0.01em;
        text-align: left;
        color: inherit;
        background: none;
        border: none;
        cursor: pointer;
        position: relative;
        padding-right: 2rem;
    }

    .about-accordion-enhanced .about-accordion-trigger::after {
        content: "";
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 0.6em;
        height: 0.6em;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: translateY(-40%) rotate(45deg);
        transition: transform 0.2s ease;
    }

    .about-accordion-enhanced .about-card.is-open .about-accordion-trigger::after {
        transform: translateY(-60%) rotate(-135deg);
    }

    .about-accordion-enhanced .about-card-body {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.25s ease;
        margin-top: 0;
    }

    .about-accordion-enhanced .about-card.is-open .about-card-body {
        max-height: 1200px;
        opacity: 1;
        margin-top: 0.65rem;
    }

    .about-accordion-enhanced .about-card h2 {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .about-figure {
        width: auto;
        height: 25vh;
    }
}

/* ========================== */
/*       Values Section       */
/* ========================== */

#values {
    background-color: var(--background-alt-color);
    position: relative;
    padding-left: 10vw;
    padding-right: 10vw;
}

.values-grid {
    margin-top: 3.5rem;
    width: 100%;
    max-width: 70rem;
    margin-left: auto;
    margin-right: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    align-items: start;
}

@media (max-width: 820px) {
    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

.value-item {
    display: flex;
    align-items: flex-start; /* keep cards aligned at the top */
    gap: 1rem;
    min-width: 0;
}

.value-item-number {
    flex: 0 0 auto;
    font-family: var(--vollkorn);
    font-weight: 400;
    font-size: 4rem;
    color: var(--grey-dark-color);
    opacity: 0.6;
    user-select: none;
    pointer-events: none;
    align-self: flex-start;
    padding: 1rem 0;
    line-height: 1;
}

.value-card {
    padding: 1.5rem;
    border-radius: 14px;
    overflow: hidden;
    flex: 1 1 auto;
}

.value-card h2,
.value-card p {
    position: relative;
    z-index: 1;
}

@media (max-width: 420px) {
    .value-item {
        gap: 0.75rem;
    }

    .value-item-number {
        font-size: clamp(2.6rem, 10vw, 3.4rem);
    }
}

#values-column-left {
    position: absolute;
    top: 0;
    left: 1rem;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    opacity: 0.28;
}

#values-column-right {
    position: absolute;
    top: 0;
    right: 1rem;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    opacity: 0.28;
    transform: scaleX(-1);
    transform-origin: center;
}

#values > .section-heading,
#values > .values-grid {
    position: relative;
    z-index: 1;
}

@media (max-width: 650px) {
    #values-column-right, #values-column-left {
        display: none;
    }
}

/* ========================== */
/*       Services Section     */
/* ========================== */

#services {
    background-color: var(--background-main-color);
    padding-left: 10vw;
    padding-right: 10vw;
}

@media (max-width: 1200px) {
    #services {
        padding-left: 5vw;
        padding-right: 5vw;
    }
}

.services-layout {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: minmax(6.5rem, 0.35fr) auto minmax(0, 1fr);
    gap: 3.5rem;
    align-items: start;
    max-width: 70rem;
    margin-left: auto;
    margin-right: auto;
}

.services-categories,
.services-offers-column,
.services-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.services-tabs {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

@media (max-width: 960px) {
    #services {
        padding-left: 10vw;
        padding-right: 10vw;
    }

    .services-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        justify-items: center;
    }

    .services-categories,
    .services-offers-column,
    .services-right {
        align-items: center;
    }

    .services-offers-column .services-offers {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .services-tabs {
        align-items: center;
        flex-direction: row;
        gap: 1.25rem;
    }
}

@media (max-width: 780px) {
    .services-offers-column .services-offers {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 400px) {
    .services-tabs {
        flex-direction: column;
        gap: 0.75rem;
    }
}


.services-offers-column .services-panels {
    width: 100%;
}

.services-offers-column {
    width: fit-content;
}

.services-tab {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--vollkorn);
    font-size: 1.5rem;
    color: var(--grey-light-color);
    cursor: pointer;
    transition: color 180ms ease;
    position: relative;
}

.services-tab.is-active, .services-tab:hover {
    color: var(--black-color);
}

.services-tab.is-active {
    text-decoration: underline;
    text-decoration-color: var(--accent-color);
    text-decoration-thickness: 3px;
    text-underline-offset: 0.4em;
}

.services-tab:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
}

.services-panel {
    display: none;
}

.services-panel.is-active {
    display: block;
}

.services-offers {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.service-card {
    background-color: rgba(249, 247, 243, 0.9);
    padding: 1.25rem 1.25rem;
    display: grid;
    grid-template-columns: minmax(4.5rem, 5.5rem) minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    max-width: 380px;
}

.service-card-amount {
    font-family: var(--source);
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    transform: scaleX(1.07);
    display: inline-block;
}

.service-card-amount.large-amount {
    font-size: 1.6rem;
}

@media (max-width: 600px) {
    .service-card {
        grid-template-columns: minmax(3.75rem, 4.5rem) minmax(0, 1fr);
        padding: 0.9rem 1rem;
    }
    .service-card-amount {
        font-size: 1.4rem;
    }
    .service-card-amount.large-amount {
        font-size: 1.2rem;
    }
}

.service-card-info h3 {
    font-family: var(--source);
    font-size: 1.2rem;
    line-height: 1.2;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: var(--black-color);
}

.service-card-info p {
    font-size: 0.95rem;
    line-height: 1.2;
    font-weight: 400;
}

.services-details {
    display: none;
    gap: 1.5rem;
    flex-direction: column;
}

.services-details.is-active {
    display: flex;
}

.services-details-group h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.services-details-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.services-details-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: var(--black-color);
    font-size: 0.95rem;
    line-height: 1.4;
}

.services-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin-top: 2px;
}

.services-icon-check {
    color: var(--accent-color);
}

.services-icon-plus,
.services-details-list.is-addons .services-details-text {
    color: var(--grey-light-color);
}

.services-details-list.is-addons .services-details-item {
    color: var(--grey-light-color);
}

/* ========================== */
/*     Tax Education Section  */
/* ========================== */

#education {
    background-color: var(--background-alt-color);
    padding-left: 10vw;
    padding-right: 10vw;
}

.education-layout {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 3rem;
    align-items: stretch;
    max-width: 70rem;
    margin-left: auto;
    margin-right: auto;
}

.education-description {
    font-family: var(--source);
    font-size: 1rem;
    color: var(--black-color);
    opacity: 0.9;
    line-height: 1.65;
}

.education-stats {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.education-stat {
    background-color: var(--background-alt-color);
    padding: 1.25rem 1.5rem;
}

.education-stat-value {
    font-family: var(--noto);
    font-weight: 700;
    font-size: 2rem;
    line-height: 1.1;
    color: var(--accent-color);
}

.education-stat-label {
    font-family: var(--source);
    font-size: 0.95rem;
    color: var(--black-color);
    margin-top: 0.5rem;
}

.education-figure {
    margin: 0;
    display: flex;
    justify-content: center;
    align-self: stretch;
}

.education-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.12),
        0 2px 8px rgba(15, 23, 42, 0.10);
}

@media (max-width: 900px) {
    .education-layout {
        grid-template-columns: 1fr;
    }

    .education-figure {
        order: -1;
    }

    .education-image {
        max-height: 20rem;
    }
}

@media (max-width: 640px) {
    .education-stats {
        grid-template-columns: 1fr;
    }
}

/* ========================== */
/*       Contact Section      */
/* ========================== */

#contact {
    padding-left: 10vw;
    padding-right: 10vw;
}

.contact-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
}

.contact-actions .main-cta,
.contact-actions .alt-cta {
    padding: 0.6rem 2.2rem;
    font-size: 1rem;
}

.contact-grid {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
}

.contact-card {
    background-color: rgba(249, 247, 243, 0.9);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-map {
    width: 100%;
    height: 210px;
    border: 0;
}

.contact-location {
    font-family: var(--vollkorn);
    font-size: 1.2rem;
    margin-bottom: 0;
}

.contact-address {
    font-style: normal;
    font-family: var(--source);
    font-size: 0.95rem;
    color: var(--black-color);
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.contact-cta {
    padding: 0.6rem 2.25rem 0.5rem 1rem;
    margin-top: 0.5rem;
    display: inline-block;
    font-weight: 500;
    font-size: 1.1rem;
    cursor: pointer;
    transform: translateY(0);
    text-align: left;
    line-height: 1.5;
    border: 2px solid var(--accent-color);
    background-color: transparent;
    color: var(--accent-color);
    position: relative;
    transition:
        transform 160ms cubic-bezier(0.2, 0.7, 0.3, 1),
        box-shadow 200ms ease,
        background-color 200ms ease,
        color 200ms ease,
        border-color 200ms ease;
}

.contact-cta::after {
    content: "\2192";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: inherit;
    font-size: 1rem;
    line-height: 1;
    transition: color 200ms ease, transform 200ms ease;
}

.contact-cta:hover::after {
    transform: translateY(-50%) rotate(-45deg);
}

/* Contact card CTAs: room for arrow and arrow inherits button color (white on green, green on transparent) */
.contact-card .contact-cta {
    padding-right: 2.25rem;
}
/* On hover, the hovered button gets green background */
.contact-card:hover .contact-cta {
    background-color: var(--accent-color);
    color: white;
}

@media (max-width: 1000px) {
    .contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-map {
        height: 200px;
    }
}

/* ========================== */
/*       Schedule Modal       */
/* ========================== */

.schedule-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: none;
    padding: 0;
    max-width: min(90vw, 28rem);
    max-height: 90vh;
    width: 100%;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
    background-color: rgba(249, 247, 243, 0.98);
}

.schedule-dialog::backdrop {
    background-color: rgba(41, 37, 36, 0.5);
    backdrop-filter: blur(4px);
}

.schedule-dialog-inner {
    position: relative;
    padding: 1.75rem 1.5rem 0 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.schedule-dialog-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--grey-dark-color);
    background: none;
    border: none;    
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease;
}

.schedule-dialog-close:hover,
.schedule-dialog-close:focus-visible {
    color: var(--black-color);
    background-color: var(--background-alt-color);
}

.schedule-dialog-close:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.schedule-dialog-title {
    font-family: var(--vollkorn);
    font-size: 1.35rem;
    margin: 0;
    padding-right: 2rem;
}

.schedule-options {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.schedule-fieldset {
    border: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.schedule-legend {
    font-family: var(--source);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--black-color);
    margin-bottom: 0.5rem;
}

.schedule-option-boxes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.schedule-option-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    font-family: var(--source);
    font-size: 1rem;
    color: var(--black-color);
    background-color: transparent;
    border: 2px solid var(--grey-light-color);
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.schedule-option-box:hover {
    border-color: var(--grey-dark-color);
}

.schedule-option-box:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.schedule-option-box.is-selected {
    border-color: var(--accent-color);
    background-color: color-mix(in srgb, var(--accent-color) 8%, transparent);
}

.schedule-option-box .schedule-option-label {
    font-weight: 600;
}

.schedule-option-box .schedule-option-desc {
    margin: 0;
    font-size: 0.85rem;
    color: var(--grey-dark-color);
    line-height: 1.4;
}

.schedule-confirm-bar {
    position: sticky;
    bottom: 0;
    margin-top: 1.25rem;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding: 1.25rem 1.5rem;
    background: rgba(249, 247, 243, 0.98);
}

.schedule-confirm {
    display: inline-block;
    padding: 0.6rem 1.5rem 0.5rem;
}

/* Ensure CTA-style buttons (used as buttons) look like links for schedule triggers */
.schedule-trigger {
    font: inherit;
}

/* ========================== */
/*          Footer            */
/* ========================== */

.site-footer {
    background-color: rgba(230, 220, 199, 0.6);
    border-top: 1px solid rgba(51, 109, 43, 0.15);
    padding: 1.75rem 5vw;
}

.footer-inner {
    max-width: 72rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    flex-wrap: wrap;
    font-family: var(--source);
    font-size: 0.95rem;
    color: var(--black-color);
}

.footer-copy {
    margin: 0;
}

.footer-link {
    text-decoration: underline;
    text-decoration-color: var(--accent-color);
    text-underline-offset: 0.2em;
}

.footer-link:focus-visible,
.footer-link:hover {
    color: var(--accent-color);
}

@media (max-width: 640px) {
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}