/* ====================================================
   DESIGN SYSTEM TOKENS
   ==================================================== */
:root {
    --color-ink: #14201E;
    --color-paper: #FAF8F4;
    --color-white: #FFFFFF;
    --color-teal-deep: #0B3B37;
    --color-teal-accent: #2F7A6F;
    --color-border: #E2DED4;
    --color-text-secondary: #4A4F49;
    --color-text-muted: #8B8F86;
    --color-teal-tint: rgba(11, 59, 55, 0.08);

    --font-serif: 'Fraunces', Georgia, serif;
    --font-sans: 'Inter', Helvetica, Arial, sans-serif;
}

/* ====================================================
   RESET & BASE
   ==================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--color-paper);
    color: var(--color-ink);
    font-family: var(--font-sans);
    font-size: 19px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}
a {
    color: var(--color-teal-accent);
    text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ====================================================
   CONTAINER
   ==================================================== */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ====================================================
   BUTTONS
   ==================================================== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
}
.btn-primary {
    background: var(--color-teal-deep);
    color: var(--color-paper);
    border-color: var(--color-teal-deep);
}
.btn-primary:hover {
    background: #0a2f2b;
    border-color: #0a2f2b;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.btn-secondary {
    background: transparent;
    color: var(--color-teal-deep);
    border-color: var(--color-teal-deep);
}
.btn-secondary:hover {
    background: var(--color-teal-deep);
    color: var(--color-paper);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.btn-cta {
    background: var(--color-paper);
    color: var(--color-teal-deep);
    border-color: var(--color-paper);
}
.btn-cta:hover {
    background: #eae6dc;
    border-color: #eae6dc;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* ====================================================
   EYEBROW
   ==================================================== */
.eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-sans);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-teal-accent);
    margin-bottom: 16px;
}
.eyebrow-line {
    display: inline-block;
    width: 40px;
    height: 2px;
    background: var(--color-teal-accent);
}

/* ====================================================
   TYPOGRAPHY
   ==================================================== */
h1, h2, h3, h4, .serif {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.2;
}
h1 { font-size: clamp(2.8rem, 6vw, 4.2rem); font-weight: 500; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 500; }
.section-title { margin-bottom: 0.5rem; }
.section-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    max-width: 720px;
    margin-bottom: 2rem;
}
p, li, .hero-description, .card-excerpt {
    font-size: 1.1rem;
}

/* ====================================================
   RULED TABLES
   ==================================================== */
.ruled-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    background: var(--color-white);
    border: 1px solid var(--color-border);
}
.ruled-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
}
.ruled-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
    color: var(--color-text-secondary);
}
.ruled-table tr:last-child td { border-bottom: none; }
.ruled-table td:first-child { font-weight: 500; color: var(--color-ink); }

/* ====================================================
   LINK WITH ARROW
   ==================================================== */
.link-arrow {
    font-weight: 500;
    color: var(--color-teal-accent);
}
.link-arrow::after {
    content: " →";
    transition: transform 0.2s;
    display: inline-block;
}
.link-arrow:hover {
    text-decoration: underline;
}
.link-arrow:hover::after {
    transform: translateX(4px);
}

/* ====================================================
   SECTIONS
   ==================================================== */
.section-padding { padding: 80px 0; }
.bg-paper { background: var(--color-paper); }
.bg-white { background: var(--color-white); }

/* ====================================================
   HEADER / NAV
   ==================================================== */
.site-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-ink);
    text-decoration: none;
}
.logo-img {
    height: 45px;
    width: auto;
    max-height: 55px;
}
.logo-wordmark {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    font-weight: 500;
    color: var(--color-ink);
    margin-left: 6px;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-list {
    display: flex;
    gap: 24px;
    list-style: none;
}
.nav-list a {
    color: var(--color-ink);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}
.nav-list a.active {
    color: var(--color-teal-accent);
    border-bottom-color: var(--color-teal-accent);
}
.nav-list a:hover {
    border-bottom-color: var(--color-teal-accent);
}

/* ====================================================
   MOBILE NAV TOGGLE – CLICKABLE & VISIBLE
   ==================================================== */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px 10px;
    z-index: 1000;
    pointer-events: auto;
    touch-action: manipulation;
    position: relative;
}
.nav-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--color-ink);
    border-radius: 2px;
    transition: 0.3s;
}

@media (max-width: 1024px) {
    .nav-toggle {
        display: flex !important;
    }
    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 16px 0;
        border-top: 1px solid var(--color-border);
        background: var(--color-white);
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 8px 24px rgba(0,0,0,0.06);
        z-index: 999;
    }
    .main-nav.open {
        display: flex;
    }
    .nav-list {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        padding: 0 16px;
    }
    .nav-list a {
        display: block;
        padding: 12px 0;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--color-border);
    }
    .nav-list a:last-child { border-bottom: none; }
}

/* ====================================================
   FOOTER – UPDATED (3 columns, no LEGAL)
   ==================================================== */
.site-footer {
    background: var(--color-teal-deep);
    color: var(--color-paper);
    padding: 60px 0 30px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-logo {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
}
.footer-mission {
    font-size: 0.95rem;
    opacity: 0.8;
    margin: 12px 0;
}
.footer-social {
    display: flex;
    gap: 16px;
}
.footer-social a { opacity: 0.7; transition: opacity 0.2s; }
.footer-social a:hover { opacity: 1; }
.footer-heading {
    font-family: var(--font-sans);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
    color: var(--color-paper);
}
.footer-links {
    list-style: none;
}
.footer-links li { margin-bottom: 8px; }
.footer-links a {
    color: rgba(250,248,244,0.7);
    text-decoration: none;
    font-size: 0.9rem;
}
.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}
.footer-bottom {
    border-top: 1px solid rgba(250,248,244,0.2);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    opacity: 0.7;
    flex-wrap: wrap;
    gap: 8px;
}

/* ====================================================
   CTA BANNER
   ==================================================== */
.cta-banner {
    background: var(--color-teal-deep);
    color: var(--color-paper);
    padding: 100px 0;
    text-align: center;
}
.cta-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    margin-bottom: 8px;
}
.cta-sub {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 28px;
}

/* ====================================================
   SCROLL ANIMATIONS (fade-up)
   ==================================================== */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ====================================================
   HOVER EFFECTS
   ==================================================== */
.article-card,
.sector-btn,
.stat-item,
.step-row {
    transition: all 0.25s ease;
}
.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}
.sector-btn:hover {
    background: var(--color-teal-tint);
    transform: scale(1.02);
}
.stat-item:hover {
    background: var(--color-teal-tint);
}
.step-row:hover {
    transform: translateX(4px);
}

/* ====================================================
   HERO — defer to styles.css, only page-specific overrides
   ==================================================== */
.hero .hero-title,
.hero .hero-description,
.hero .eyebrow {
    color: var(--color-paper);
}
.hero .eyebrow-line {
    background: var(--color-paper);
}
.hero .btn-secondary {
    color: var(--color-paper);
    border-color: var(--color-paper);
}
.hero .btn-secondary:hover {
    background: var(--color-paper);
    color: var(--color-teal-deep);
}

/* ====================================================
   BLOG SINGLE STYLES
   ==================================================== */
.blog-single { max-width: 820px; margin: 0 auto; }
.blog-single-featured { margin-bottom: 30px; border-radius: 6px; overflow: hidden; }
.blog-single-featured img { width: 100%; height: auto; display: block; }
.blog-single-header { margin-bottom: 30px; }
.blog-single-header h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 600; line-height: 1.2; margin: 8px 0 12px; }
.blog-single-meta { font-size: 0.95rem; color: var(--color-text-muted); }
.blog-single-body { font-size: 1.08rem; line-height: 1.8; color: var(--color-text-secondary); }
.blog-single-body h1, .blog-single-body h2, .blog-single-body h3, .blog-single-body h4 { color: var(--color-ink); margin-top: 1.8em; margin-bottom: 0.4em; }
.blog-single-body p { margin-bottom: 1.2em; }
.blog-single-body a { color: var(--color-teal-accent); text-decoration: underline; }
.blog-single-body ul, .blog-single-body ol { margin: 0 0 1.2em 1.8em; }
.blog-single-body li { margin-bottom: 0.4em; }
.blog-single-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 1.2em 0; }
.blog-single-body pre { background: #1e1e1e; color: #d4d4d4; padding: 16px 20px; border-radius: 6px; overflow-x: auto; font-size: 0.9rem; line-height: 1.6; margin: 1.2em 0; }
.blog-single-body pre code { background: transparent; padding: 0; color: inherit; }
.blog-single-body blockquote { border-left: 4px solid var(--color-teal-accent); padding-left: 20px; margin: 1.5em 0; font-style: italic; color: var(--color-ink); }
.blog-single-body blockquote cite { display: block; margin-top: 8px; font-style: normal; color: var(--color-text-muted); font-size: 0.95rem; }
.blog-single-body .table-wrap { overflow-x: auto; margin: 1.5em 0; }
.blog-single-body .table-wrap table { min-width: 400px; }
.blog-single-body .embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; margin: 1.5em 0; border-radius: 6px; }
.blog-single-body .embed-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.blog-single-body .blog-figure { margin: 1.5em 0; text-align: center; }
.blog-single-body .blog-figure figcaption { font-size: 0.9rem; color: var(--color-text-muted); margin-top: 6px; }
.blog-single-body .chart-container { max-width: 100%; margin: 1.5em 0; background: var(--color-white); padding: 20px; border-radius: 6px; border: 1px solid var(--color-border); }
.blog-single-footer { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--color-border); }

/* ====================================================
   RESPONSIVE BREAKPOINTS
   ==================================================== */
@media (max-width: 1024px) {
    .section-padding { padding: 60px 0; }

    /* Footer tablet: 3 columns, brand full-width */
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 30px;
    }
    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
    h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
    .section-padding { padding: 50px 0; }
    .cta-banner { padding: 60px 0; }
    .cta-title { font-size: 1.8rem; }
    .hero-title { font-size: clamp(2rem, 7vw, 3rem); }
}

@media (max-width: 640px) {
    /* Footer mobile: 2 columns, brand full-width */
    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 24px !important;
        text-align: left !important;
    }
    .footer-brand {
        grid-column: 1 / -1 !important;
        text-align: center !important;
    }
    .footer-col {
        text-align: left !important;
    }
    .footer-social {
        justify-content: center !important;
    }
    .footer-bottom {
        flex-direction: column !important;
        text-align: center !important;
        gap: 6px !important;
    }
    .footer-logo {
        margin: 0 auto !important;
    }
    .footer-heading {
        font-size: 13px !important;
        margin-bottom: 8px !important;
    }
    .footer-links li {
        margin-bottom: 4px !important;
    }

    .container { padding: 0 16px; }
    .cta-banner { padding: 50px 0; }
    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
        width: 100%;
        text-align: center;
    }
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }
    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    .stat-item {
        border-right: none !important;
        border-bottom: 1px solid var(--color-border);
    }
    .stat-item:last-child { border-bottom: none; }
    .sectors-layout {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    .sectors-list {
        flex-direction: row;
        flex-wrap: wrap;
        border-right: none;
        padding-right: 0;
        gap: 6px;
    }
    .sector-btn {
        padding: 6px 14px;
        font-size: 0.85rem;
        border: 1px solid var(--color-border);
        border-radius: 20px;
    }
    .sector-btn.active {
        background: var(--color-teal-deep);
        color: var(--color-paper);
        border-color: var(--color-teal-deep);
    }
    .insights-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }
    .approach-steps .step-row {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .step-row span {
        font-size: 50px !important;
        min-width: auto !important;
    }
    .ruled-table {
        font-size: 0.85rem;
    }
    .ruled-table th,
    .ruled-table td {
        padding: 8px 10px;
    }
    .contact-sidebar { padding: 20px; }
    .blog-single-header h1 { font-size: 1.8rem !important; }
    .blog-single-body { font-size: 1rem !important; }
    .blog-single-body .table-wrap table { min-width: 300px; }
}

/* Very small phones: keep 2 columns */
@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 16px !important;
    }
    .footer-col {
        padding: 0 4px !important;
    }
    .footer-links a {
        font-size: 0.8rem !important;
    }
}