/* ============================================================
   DIGED.AU — GLOBAL BRAND STYLESHEET
   Save as /css/diged.css and link from every page.
   This handles: design tokens, typography (h1–h6, body, links),
   buttons, eyebrows, backgrounds, layout helpers, plus the
   complete header + footer styling.
   ============================================================ */


/* ============================================================
   1. DESIGN TOKENS
   Change a colour or font here and it updates everywhere.
   ============================================================ */
:root {
    /* Brand colours */
    --bg: #F5F1E8;            /* warm cream — main background */
    --bg-card: #FAF7EE;       /* slightly lighter — cards */
    --sand: #E8DEC9;          /* subtle warm tint */
    --ink: #1A2332;           /* primary text + dark sections */
    --ink-deep: #0F1822;      /* deepest — footer strip */
    --ink-soft: #3A4A5C;      /* secondary text */
    --ink-mute: #5C6B7A;      /* tertiary text */
    --clay: #B5482E;          /* primary accent */
    --clay-dark: #8F3621;     /* AAA-safe accent */
    --clay-light: #E9B69E;    /* highlight on dark backgrounds */
    --forest: #2D4A3E;        /* secondary accent */
    --rule: rgba(26, 35, 50, 0.14);
    --rule-strong: rgba(26, 35, 50, 0.28);
    --rule-light: rgba(245, 241, 232, 0.18);

    /* Typography */
    --font-display: 'Fraunces', 'Times New Roman', serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    /* Layout */
    --max: 1240px;
    --gutter: clamp(20px, 4vw, 56px);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 14px;
    --radius-pill: 999px;
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }


/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 0 0 0.5em;
    color: var(--ink);
}

h1 {
    font-size: clamp(40px, 6.6vw, 88px);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: -0.025em;
    margin-bottom: 0.4em;
}
h2 {
    font-size: clamp(32px, 4.6vw, 56px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
}
h3 {
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 500;
}
h4 {
    font-size: 18px;
    font-weight: 600;
}
h5 { font-size: 16px; font-weight: 600; }
h6 { font-size: 14px; font-weight: 600; }

/* Italic emphasis inside headings — clay-coloured for the brand look */
h1 em, h2 em, h3 em {
    font-style: italic;
    color: var(--clay-dark);
    font-weight: 500;
}

/* Body paragraphs */
p {
    margin: 0 0 1em;
    color: var(--ink-soft);
}
p:last-child { margin-bottom: 0; }

/* Body in light cream sections */
body, .section-light p { color: var(--ink); }
.section-light p { color: var(--ink-soft); }

/* Body on dark backgrounds */
.section-dark { background: var(--ink); color: var(--bg); }
.section-dark h1, .section-dark h2, .section-dark h3,
.section-dark h4, .section-dark h5, .section-dark h6 { color: var(--bg); }
.section-dark h1 em, .section-dark h2 em, .section-dark h3 em { color: var(--clay-light); }
.section-dark p { color: rgba(245, 241, 232, 0.78); }

/* Sand background sections */
.section-sand { background: var(--sand); }

/* Links */
a {
    color: var(--clay-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color .2s ease;
}
a:hover { color: var(--ink); }
a:focus-visible {
    outline: 2px solid var(--clay-dark);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Lists */
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: 0.4em; color: var(--ink-soft); }

/* Inline elements */
strong { font-weight: 600; color: var(--ink); }
em { font-style: italic; }

/* Blockquotes */
blockquote, .pullquote {
    margin: 28px 0;
    padding: 28px 32px;
    border-left: 3px solid var(--clay);
    background: var(--sand);
    border-radius: 0 8px 8px 0;
}
blockquote p, .pullquote q {
    font-family: var(--font-display);
    font-size: 22px;
    font-style: italic;
    line-height: 1.35;
    color: var(--ink);
    margin: 0;
}
.pullquote cite {
    display: block;
    margin-top: 14px;
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-mute);
}

/* Code (for any technical pages) */
code {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.92em;
    background: var(--sand);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--ink);
}


/* ============================================================
   4. LAYOUT HELPERS
   ============================================================ */
.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.section {
    padding: clamp(60px, 8vw, 120px) 0;
}
.section-lg {
    padding: clamp(80px, 10vw, 140px) 0;
}


/* ============================================================
   5. EYEBROW (section labels)
   ============================================================ */
.eyebrow {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--clay-dark);
    margin: 0 0 18px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--clay-dark);
}
.section-dark .eyebrow { color: var(--clay-light); }
.section-dark .eyebrow::before { background: var(--clay-light); }


/* ============================================================
   6. BUTTONS
   ============================================================ */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    transition: all .25s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

/* Primary — dark pill on light backgrounds */
.btn-primary {
    background: var(--ink);
    color: var(--bg);
}
.btn-primary:hover {
    background: var(--clay-dark);
    color: var(--bg);
}

/* Secondary — outlined on light backgrounds */
.btn-secondary {
    background: transparent;
    color: var(--ink);
    border-color: var(--rule-strong);
}
.btn-secondary:hover {
    border-color: var(--ink);
    color: var(--ink);
}

/* Light — cream pill on dark backgrounds */
.btn-light {
    background: var(--bg);
    color: var(--ink);
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 15px;
    display: inline-block;
    transition: background .25s;
}
.btn-light:hover { background: var(--clay-light); color: var(--ink); }

/* Outline light — on dark backgrounds */
.btn-outline-light {
    background: transparent;
    color: var(--bg);
    border: 1px solid rgba(245, 241, 232, 0.4);
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 15px;
    display: inline-block;
    transition: border-color .25s, color .25s;
}
.btn-outline-light:hover { border-color: var(--bg); color: var(--bg); }


/* ============================================================
   7. SKIP LINK (accessibility)
   ============================================================ */
.skip-link {
    position: absolute;
    top: -40px;
    left: 12px;
    background: var(--ink);
    color: var(--bg);
    padding: 10px 16px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}
.skip-link:focus { top: 12px; color: var(--bg); }


/* ============================================================
   8. HEADER
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 241, 232, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rule);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--ink);
    flex-shrink: 0;
}
.brand-logo {
    height: 44px;
    width: auto;
    display: block;
}

.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}
.nav a {
    color: var(--ink);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    position: relative;
    padding: 6px 0;
    transition: color .2s ease;
}
.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--clay);
    transition: width .3s ease;
}
.nav a:hover::after,
.nav a:focus-visible::after { width: 100%; }

/* Active nav item (highlights the current page) */
.nav a.is-active::after { width: 100%; }
.nav a.is-active { color: var(--clay-dark); }

/* Nav CTA buttons */
.nav-cta {
    background: var(--ink);
    color: var(--bg) !important;
    padding: 10px 18px !important;
    border-radius: var(--radius-pill);
    font-size: 14px !important;
}
.nav-cta:hover { background: var(--clay-dark) !important; }
.nav-cta::after { display: none; }

.nav-cta.nav-cta-alt {
    background: var(--clay-dark);
}
.nav-cta.nav-cta-alt:hover {
    background: var(--ink) !important;
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    cursor: pointer;
}


/* ============================================================
   9. FOOTER (dark contact section + bottom strip)
   ============================================================ */
.contact {
    padding: clamp(80px, 10vw, 140px) 0 clamp(60px, 8vw, 100px);
    background: var(--ink);
    color: var(--bg);
}
.contact .eyebrow { color: var(--clay-light); }
.contact .eyebrow::before { background: var(--clay-light); }

.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact h2 {
    color: var(--bg);
    font-size: clamp(40px, 6vw, 76px);
    margin: 0 0 28px;
}
.contact h2 em { color: var(--clay-light); }

.contact-lede {
    font-size: 18px;
    color: rgba(245, 241, 232, 0.78);
    line-height: 1.6;
    margin: 0 0 36px;
    max-width: 48ch;
}

.contact-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.contact-info {
    border-left: 1px solid var(--rule-light);
    padding-left: 60px;
}
.contact-info h4 {
    color: var(--clay-light);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: 0 0 14px;
}
.contact-info p {
    color: rgba(245, 241, 232, 0.85);
    line-height: 1.6;
    margin: 0 0 28px;
    font-size: 15.5px;
}
.contact-info p a {
    color: rgba(245, 241, 232, 0.85);
    text-decoration: none;
}
.contact-info p a:hover {
    color: var(--bg);
    text-decoration: underline;
}

.partner-block {
    margin-top: 20px;
    padding-top: 28px;
    border-top: 1px solid var(--rule-light);
}
.partner-name {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--bg);
    margin-bottom: 6px;
}
.partner-link { margin: 0 0 22px !important; }

/* STEM Portal button in footer */
.footer-btn {
    display: inline-block;
    background: var(--bg);
    color: var(--ink) !important;
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    transition: background .25s;
}
.footer-btn:hover {
    background: var(--clay-light);
    color: var(--ink) !important;
}

/* Bottom strip */
.footer {
    background: var(--ink-deep);
    color: rgba(245, 241, 232, 0.6);
    padding: 36px 0;
    font-family: var(--font-body);
    font-size: 13.5px;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
}
.footer a {
    color: rgba(245, 241, 232, 0.7);
    text-decoration: none;
    margin-right: 22px;
}
.footer a:hover { color: var(--bg); }
.footer-socials a {
    margin-right: 14px;
    font-size: 14px;
}


/* ============================================================
   10. RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        gap: 0;
        padding: 12px 0;
        border-bottom: 1px solid var(--rule);
    }
    .nav.open { display: flex; }
    .nav a {
        padding: 14px var(--gutter);
        width: 100%;
    }
    .nav-cta {
        margin: 8px var(--gutter);
        width: calc(100% - 2 * var(--gutter));
        text-align: center;
    }
    .menu-toggle { display: block; }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .contact-info {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--rule-light);
        padding-top: 32px;
    }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .brand-logo { height: 38px; }
}

/* Forced colours / high contrast safety */
@media (forced-colors: active) {
    .btn, .nav-cta, .footer-btn { border: 1px solid CanvasText; }
}
