html.is-scrolled {
    background: #FFFFFF;
}

/* Page-specific overrides */
#main-content {
    min-height: 50vh;
}

/* Light page body — shared across all pages */
body.page-home,
body.page-services,
body.page-apps,
body.page-about,
body.page-contact {
    background: var(--hero-light-bg);
    color: var(--text-on-light);
}

body.page-home.is-scrolled,
body.page-services.is-scrolled,
body.page-apps.is-scrolled,
body.page-about.is-scrolled,
body.page-contact.is-scrolled {
    background: #FFFFFF;
}

body.page-home::before,
body.page-services::before,
body.page-apps::before,
body.page-about::before,
body.page-contact::before {
    display: none;
}

/* Services page — scoped typography */
body.page-services .page-hero--light .page-hero__title,
body.page-services .services-page-section h2,
body.page-services .services-page-section h3,
body.page-about .page-hero--light .page-hero__title,
body.page-about .about-page-section h2,
body.page-about .about-page-section h3 {
    color: var(--text-on-light);
}

body.page-services .page-hero--light .page-hero__subtitle,
body.page-services .services-page-section p,
body.page-services .services-page-section .service-detail__description,
body.page-services .services-page-section .service-group__description,
body.page-about .page-hero--light .page-hero__subtitle,
body.page-about .about-page-section p {
    color: var(--text-on-light-muted);
}

/* Contact page — scoped typography */
body.page-contact .page-hero--light .page-hero__title,
body.page-contact .contact-page-section h2 {
    color: var(--text-on-light);
}

body.page-contact .page-hero--light .page-hero__subtitle,
body.page-contact .contact-page-section p,
body.page-contact .contact-map__address {
    color: var(--text-on-light-muted);
}

/* Apps page — scoped typography */
body.page-apps .page-hero--light .page-hero__title,
body.page-apps .apps-page-section h2 {
    color: var(--text-on-light);
}

body.page-apps .page-hero--light .page-hero__subtitle,
body.page-apps .apps-page-section p {
    color: var(--text-on-light-muted);
}

.apps-page-section {
    background: #FFFFFF;
}

.apps-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: clamp(2rem, 5vw, 3rem);
    padding: clamp(1.25rem, 3vw, 1.75rem);
    background: #F5F7FA;
    border: 1px solid #E8EAED;
    border-radius: 20px;
}

.apps-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
    padding: 0.5rem;
}

.apps-stat__value {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-on-light);
}

.apps-stat__label {
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--text-on-light-muted);
}

.apps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.25rem, 3vw, 2rem);
}

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

.services-page-section {
    background: #FFFFFF;
}

.services-page-section .service-details-grid {
    gap: 1.125rem;
}

@media (min-width: 1024px) {
    .services-page-section .service-details-grid {
        gap: 1.25rem;
    }
}

.services-section {
    background: #FFFFFF;
}

.services-section .section__title {
    color: #000000;
}

.why-us-section {
    background: #FFFFFF;
}

.why-us-section .section__title {
    color: var(--text-on-light);
}

.why-us-section .section__subtitle {
    color: var(--text-on-light-muted);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.125rem;
}

@media (min-width: 1024px) {
    .why-us-section .features-grid {
        gap: 1.25rem;
    }
}

.testimonials-section {
    background: #FFFFFF;
}

.testimonials-section .section__title {
    color: var(--text-on-light);
}

.testimonials-section .section__subtitle {
    color: var(--text-on-light-muted);
    max-width: 640px;
}

.testimonials-accordion {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 800px;
    height: min(460px, 58vw);
    min-height: 320px;
    margin: 0 auto var(--space-2xl);
}

@media (min-width: 1280px) {
    .testimonials-section .container {
        max-width: var(--container-wide);
    }
}

@media (max-width: 768px) {
    .testimonials-accordion {
        flex-direction: column;
        height: auto;
        min-height: 0;
    }
}

.services-section .grid--3 {
    gap: var(--space-lg);
}

.industries-section .section__title {
    color: var(--text-on-light);
}

.industries-section .section__subtitle {
    color: var(--text-on-light-muted);
}

.process-section .section__title {
    color: var(--text-on-light);
}

.process-section .section__subtitle {
    color: var(--text-on-light-muted);
}

.industries-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (min-width: 1024px) {
    .services-section .grid--3 {
        gap: 1.25rem;
    }

    .industries-grid {
        gap: 1.125rem;
    }
}

@media (max-width: 1024px) {
    .industries-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .industries-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .industries-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
}

@media (max-width: 768px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.service-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 768px) {
    .service-details-grid { grid-template-columns: 1fr; }
}
