/*
Theme Name: Tofai STEM Council
Theme URI: #
Author: Tofai Global Tech
Description: A custom, standalone theme for the STEM Council website framework featuring Source Serif 4 headings, DM Sans body text, deep navy, and warm gold.
Version: 2.2.1
License: GNU General Public License v2 or later
Text Domain: tofai-stem
*/

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
    src: url('assets/fonts/dm-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 100 1000;
    font-display: swap;
    src: url('assets/fonts/dm-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Source Serif 4';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url('assets/fonts/source-serif-4-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Source Serif 4';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url('assets/fonts/source-serif-4-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --council-navy: #0B1727;
    --council-navy-deep: #070E18;
    --council-blue-card: #142338;
    --council-gold: #C5A059;
    --council-gold-hover: #B38E4A;
    --council-gold-light: #F7F3E9;
    --council-slate: #334155;
    --council-muted: #64748B;
    --council-light-bg: #F8FAFC;
    --council-border: #E2E8F0;
    --council-font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --council-font-heading: 'Source Serif 4', Georgia, serif;
    --council-icon-blue: #062C50;
    --council-gold-ink: #927034;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--council-font-body);
    color: var(--council-slate);
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    line-height: 1.65;
    font-size: 1rem;
}

h1, h2, h3, h4, .font-serif, .font-display {
    font-family: var(--council-font-heading);
    color: var(--council-navy);
    letter-spacing: -0.025em;
    font-weight: 600;
    font-optical-sizing: auto;
    text-wrap: balance;
}

/* Shared typography rules also cover headings that use Tailwind font utilities. */
main :is(h1, h2, h3, h4).font-serif,
main :is(h1, h2, h3, h4).font-display {
    font-weight: 600;
    line-height: 1.16;
    letter-spacing: -0.025em;
}

main :is(h3, h4).font-sans {
    font-family: var(--council-font-body);
    font-weight: 600;
    letter-spacing: -0.015em;
}

.home-hero-title {
    font-family: var(--council-font-heading);
    font-size: clamp(2.25rem, 4vw, 3.75rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.035em;
    max-width: 12em;
}

.home-hero-title > span {
    display: block;
}

.home-hero-image {
    object-position: 60% center;
}

.home-hero-overlay {
    background: linear-gradient(90deg, rgba(5, 21, 38, 0.8) 0%, rgba(5, 21, 38, 0.62) 35%, rgba(5, 21, 38, 0.16) 64%, rgba(5, 21, 38, 0.04) 100%);
}

@media (max-width: 767px) {
    .home-hero-image {
        object-position: 68% center;
    }

    .home-hero-overlay {
        background: linear-gradient(90deg, rgba(5, 21, 38, 0.9), rgba(5, 21, 38, 0.66));
    }
}

/* Header Styles */
#sc-header {
    transition: all 0.3s ease;
}
#sc-header.scrolled {
    box-shadow: 0 4px 20px -2px rgba(11, 23, 39, 0.08);
}

.site-logo img {
    height: 48px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .site-logo img {
        height: 56px;
    }
}

/* Button System */
.btn-gold {
    background-color: var(--council-gold);
    color: #ffffff !important;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
    border: 1px solid var(--council-gold);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}
.btn-gold:hover {
    background-color: var(--council-gold-hover);
    border-color: var(--council-gold-hover);
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.25);
}

.btn-navy {
    background-color: var(--council-navy);
    color: #ffffff !important;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid var(--council-navy);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}
.btn-navy:hover {
    background-color: #172a45;
    border-color: #172a45;
}

.btn-outline-gold {
    background-color: transparent;
    color: var(--council-gold) !important;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 6px;
    border: 1.5px solid var(--council-gold);
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-outline-gold:hover {
    background-color: var(--council-gold);
    color: #ffffff !important;
}

.btn-outline-white {
    background-color: transparent;
    color: #ffffff !important;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 6px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-outline-white:hover {
    background-color: #ffffff;
    color: var(--council-navy) !important;
    border-color: #ffffff;
}

.btn-outline-navy {
    background-color: transparent;
    color: var(--council-navy) !important;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 6px;
    border: 1.5px solid var(--council-navy);
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-outline-navy:hover {
    background-color: var(--council-navy);
    color: #ffffff !important;
}

/* Category & Section Tag */
.tag-gold {
    color: var(--council-gold);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Card treatments */
.council-card {
    background: #ffffff;
    border: 1px solid var(--council-border);
    border-radius: 8px;
    transition: all 0.25s ease-in-out;
}
.council-card:hover {
    border-color: rgba(197, 160, 89, 0.4);
    box-shadow: 0 10px 25px -5px rgba(11, 23, 39, 0.06);
    transform: translateY(-2px);
}

/* Step pipeline horizontal line connector (desktop only to prevent mobile horizontal overflow) */
.step-connector {
    position: relative;
}
@media (min-width: 1024px) {
    .step-connector::after {
        content: '';
        position: absolute;
        top: 20px;
        right: -50%;
        width: 100%;
        height: 1px;
        background: rgba(255, 255, 255, 0.2);
        z-index: 1;
    }
    .step-connector:last-child::after {
        display: none;
    }
}

/* Global Mobile Overflow-X Guard */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Accordion transition */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.accordion-item.active .accordion-content {
    max-height: 500px;
}
.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

/* The twelve-domain framework: shared icons, two deliberate card layouts. */
.framework-section > div {
    max-width: 1280px;
}

.framework-section > div > .text-center {
    max-width: 850px;
    margin-bottom: 44px;
}

.framework-section > div > .text-center:last-child {
    margin: 44px auto 0;
}

.framework-section h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
}

.framework-section .tag-gold {
    letter-spacing: 0.16em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--council-gold-ink);
    margin-bottom: 14px;
}

.domain-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr);
}

.domain-card {
    position: relative;
    min-width: 0;
    background: #fff;
    border: 1px solid #E5EAF0;
    border-radius: 12px;
    color: var(--council-navy);
    box-shadow: 0 2px 8px rgba(11, 23, 39, 0.025);
    text-decoration: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
    scroll-margin-top: 108px;
}

.domain-card:hover,
.domain-card:focus-within {
    border-color: var(--council-gold);
    box-shadow: 0 8px 24px rgba(11, 23, 39, 0.07);
    transform: translateY(-2px);
}

.domain-card:target {
    border-color: var(--council-gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.16);
}

.domain-card:focus-visible,
.domain-criteria-link:focus-visible {
    outline: 3px solid var(--council-icon-blue);
    outline-offset: 4px;
}

.domain-icon {
    display: flex;
    width: 88px;
    height: 88px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--council-icon-blue);
    color: #fff;
}

.domain-icon-svg {
    display: block;
    width: 48px;
    height: 48px;
}

.domain-number {
    display: block;
    color: var(--council-gold-ink);
    font-family: var(--council-font-body);
    font-size: 0.75rem;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
}

.domain-title {
    margin: 0;
    color: var(--council-navy);
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.domain-description {
    margin: 0;
    color: #647083;
    font-size: 0.9375rem;
    line-height: 1.6;
    text-wrap: pretty;
}

.domain-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #EDF0F3;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.domain-card-footer svg {
    flex-shrink: 0;
}

.domain-card--home {
    display: grid;
    grid-template-rows: 88px minmax(2.7em, auto) 1fr auto;
    justify-items: center;
    gap: 16px;
    padding: 30px 26px 20px;
    text-align: center;
}

.domain-card--home > .domain-number {
    position: absolute;
    top: 22px;
    left: 22px;
    font-size: 0.9375rem;
    letter-spacing: 0;
}

.domain-card--home .domain-title {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--council-font-body);
    max-width: 18em;
}

.domain-card--home .domain-description {
    max-width: 29ch;
}

.domain-card--home .domain-card-footer {
    width: 100%;
    margin-top: 4px;
    color: var(--council-gold-ink);
    font-weight: 500;
}

.domain-card--standard {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 22px;
    padding: 24px;
}

.domain-card-main {
    display: flex;
    align-items: center;
    gap: 22px;
}

.domain-card-copy {
    min-width: 0;
}

.domain-card--standard .domain-icon {
    width: 96px;
    height: 96px;
}

.domain-card--standard .domain-icon-svg {
    width: 54px;
    height: 54px;
}

.domain-card--standard .domain-title {
    font-family: var(--council-font-heading);
    font-size: 1.375rem;
    line-height: 1.25;
    text-wrap: pretty;
    margin: 6px 0 8px;
}

.domain-card--standard .domain-card-footer {
    color: #647083;
}

.domain-criteria-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 28px;
    color: var(--council-gold-ink);
    font-weight: 500;
    text-decoration: none;
}

.domain-criteria-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

@media (min-width: 600px) {
    .domain-grid--home {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 1fr;
    }
}

@media (min-width: 1000px) {
    .domain-grid--home {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .domain-grid--standards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 1fr;
    }
}

@media (max-width: 599px) {
    .framework-section > div > .text-center {
        margin-bottom: 32px;
    }

    .domain-grid {
        gap: 16px;
    }

    .domain-card--standard {
        padding: 20px;
    }

    .domain-card-main {
        align-items: flex-start;
        gap: 16px;
    }

    .domain-card--standard .domain-icon {
        width: 64px;
        height: 64px;
    }

    .domain-card--standard .domain-icon-svg {
        width: 38px;
        height: 38px;
    }

    .domain-card--standard .domain-title {
        font-size: 1.25rem;
    }

    .domain-card--standard .domain-card-footer {
        flex-wrap: wrap;
        row-gap: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .domain-card {
        transition: none;
    }

    .domain-card:hover,
    .domain-card:focus-within {
        transform: none;
    }
}

/* Standard WordPress content and the public HTML sitemap. */
.council-page-content {
    color: var(--council-slate);
    font-size: 1.0625rem;
    line-height: 1.8;
}

.council-page-content > * + * {
    margin-top: 1.25rem;
}

.council-page-content a {
    color: var(--council-icon-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.council-sitemap-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 100%;
    padding: 20px 24px;
    border: 1px solid var(--council-border);
    border-radius: 10px;
    color: var(--council-navy);
    font-weight: 500;
}

.council-sitemap-link:hover,
.council-sitemap-link:focus-visible {
    border-color: var(--council-gold);
    background: var(--council-gold-light);
}

.council-sitemap-link > span {
    color: var(--council-gold-ink);
}
