/* The selected graphite material is scoped to main: header and footer do not inherit it. */
#main-content {
    --cwa-frame-texture: url('../images/graphite-option3-v1.png');
    --cwa-frame-surface: linear-gradient(rgba(12, 15, 18, .16), rgba(12, 15, 18, .16)), var(--cwa-frame-texture);
    --cwa-panel-surface: linear-gradient(rgba(12, 15, 18, .46), rgba(12, 15, 18, .46)), var(--cwa-frame-texture);
}

/* Project showcases begin inside the same dark surround as the following sections. */
html[data-theme] body.home.wp-theme-civilworks-au #main-content .home-projects.section {
    padding-top: 0;
    padding-bottom: 0;
    border-bottom: 0;
    margin-bottom: 32px;
}
html[data-theme] body.home.wp-theme-civilworks-au #main-content > .cwa-home-dark-band > .home-projects.section {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: var(--ci-spotlight-gap) var(--ci-spotlight-inset) 0;
    border: 0;
}
#main-content .cwa-project-frame {
    padding: 18px;
    border: 0;
    border-radius: 22px;
    background: transparent;
    box-shadow: none;
}
#main-content .cwa-project-frame__inner {
    padding: 20px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    box-shadow: none;
}
html[data-theme] body.home.wp-theme-civilworks-au #main-content .cwa-project-frame .cwa-project-section-head {
    --cwa-section-title-colour: #C9AE72;
    margin: 0 0 24px;
    padding: 0;
    min-height: 0;
    align-items: center;
    border: 0;
    background: none;
}
#main-content .cwa-project-section-head .textlink {
    margin-bottom: 0;
    color: #C9AE72;
    text-shadow: none;
}
#main-content .cwa-project-section-head .cwa-chevron { --cwa-chevron-colour: #C9AE72; }
#main-content .cwa-project-frame .projectgrid { min-width: 0; }
#main-content .cwa-project-frame .project-card { min-width: 0; }

/* Solid dark feature panels, including the continuous innovations/company surround. */
html[data-theme] body.wp-theme-civilworks-au #main-content :is(
    .cwa-home-dark-band, .submission-hero, .cwa-contact-intro, .ci-square
),
html[data-theme] body.home.wp-theme-civilworks-au #main-content > .cwa-home-dark-band,
html[data-theme] body.wp-theme-civilworks-au:not(.cwa-directory-banner-page):not(.category-industry-innovations) #main-content :is(
    .pagehero:not(.community-hero):not(.light-hero):not(.cwa-learning-hero),
    .singlehero:not(.article-hero)
),
html[data-theme] body.wp-theme-civilworks-au #main-content > .industry-innovations,
html[data-theme] body.wp-theme-civilworks-au #main-content > .cwa-company-backdrop {
    background-color: #202427;
    background-image: var(--cwa-panel-surface);
    background-size: 100% 100%, 480px 480px;
    background-repeat: no-repeat, repeat;
    background-position: center, left top;
    background-blend-mode: normal;
}

/* Nested homepage bands share their parent's uninterrupted material. */
html[data-theme] body.home.wp-theme-civilworks-au #main-content > .cwa-home-dark-band > :is(.industry-innovations, .cwa-company-backdrop) {
    background: transparent;
}

/* One continuous charcoal surface keeps only a faint hint of asphalt grain. */
html[data-theme] body.home.wp-theme-civilworks-au #main-content > .cwa-home-dark-band,
html[data-theme] body.wp-theme-civilworks-au #main-content > .industry-innovations {
    background-color: #292b2c;
    background-image: linear-gradient(rgba(41, 43, 44, .90), rgba(41, 43, 44, .90)), url('../images/asphalt-dark-reference.png');
    background-size: 100% 100%, 148px 57px;
    background-repeat: no-repeat, repeat;
    background-position: center, left top;
    background-blend-mode: normal;
}

/* Cards and reading panels only gain the material when those surfaces are dark. */
html[data-theme="dark"] body.wp-theme-civilworks-au #main-content :is(
    .story-rail, .topic-panel, .factbox, .cwa-newsletter,
    .article-card, .community-card, .company-card, .review-card, .member-card, .project-card,
    .submission-card, .profile-editor, .contributor-profile-card, .submission-accountbar,
    .community-author-box, .empty-contributions, .empty-state, .innovation-empty,
    .review-section, .directory-finder, .filters, .welcome-panel,
    .cwa-related-card, .cwa-community-next > section, .cwa-article-panel,
    .cwa-post-actions, .cwa-guest-comments, .cwa-learning-menu,
    .cwa-learning-panel, .cwa-contact-form-wrap, .article-hero, .community-hero
):not(.company-band *):not(.company-band) {
    background-color: #262829;
    background-image: var(--cwa-panel-surface);
    background-size: 100% 100%, 480px 480px;
    background-repeat: no-repeat, repeat;
    background-position: center, left top;
    background-blend-mode: normal;
}

@media (max-width: 680px) {
    #main-content .cwa-project-frame { padding: 10px; border-radius: 18px; }
    #main-content .cwa-project-frame__inner { padding: 12px; border-radius: 10px; }
    html[data-theme] body.home.wp-theme-civilworks-au #main-content .cwa-project-frame .cwa-project-section-head {
        padding: 0;
        gap: 14px;
        flex-wrap: wrap;
        margin-bottom: 16px;
    }
}
@media print {
    html[data-theme] body.home.wp-theme-civilworks-au #main-content > .cwa-home-dark-band > .home-projects.section { padding: 0; }
    #main-content .cwa-project-frame,
    #main-content .cwa-project-frame__inner { padding: 0; background: #fff !important; box-shadow: none; border: 0; }
    #main-content :is(.cwa-home-dark-band, .submission-hero, .cwa-contact-intro) { background-image: none; }
    html[data-theme] body.home.wp-theme-civilworks-au #main-content > .cwa-home-dark-band,
    html[data-theme] body.wp-theme-civilworks-au #main-content > .industry-innovations {
        background-image: none;
        background-color: transparent;
    }
}
