@import url('https://fonts.googleapis.com/css2?family=Droid+Serif:wght@400;700&family=Montserrat:wght@400;700&display=swap');

:root {
    /* Colors */
    --primary-color: #3c10e1;
    --secondary-color: #856036;
    --accent-color: #0DAB05;
    --accent-hover-color: #0c9e04;
    --surface-text-on-dark: #ffffff;
    --text-color: #0a0a0a;
    --surface-hero: #f9f9f9;
    --surface-card: #fcfcfc;
    --border-color: #eeeeee;
    --text-muted: #555555;
    --shadow-color: rgba(0,0,0,0.05);

    /* Typography - Font Families */
    --heading-font: 'Droid Serif', serif;
    --body-font: 'Montserrat', sans-serif;

    /* Typography - Base */
    --body-font-size: 16px;
    --body-line-height: 1.5;
    --body-font-weight: normal;
    --heading-line-height: 1.2;
    --heading-font-weight: bold;

    /* Typography - Scale */
    --h1-hero-size: 3em;
    --h1-site-title-size: 1.8em;
    --h1-base-size: 2.5em;
    --h2-size: 2em;
    --h3-team-size: 1.4em;
    --h3-base-size: 1.75em;
    --h4-base-size: 1.5em;
    --hero-paragraph-size: 1.2em;
    --cta-paragraph-size: 1.1em;
    --team-member-text-size: 0.9em;
    --nav-font-size: 1em;
    --breadcrumb-font-size: 0.9em;
    --footer-font-size: 0.9em;
    --cta-button-font-size: 1em;
    --back-to-top-button-font-size: 1.2em;

    /* Spacing Scale */
    --space-4: 4px;
    --space-6: 6px;
    --space-8: 8px;
    --space-10: 10px;
    --space-12: 12px;
    --space-15: 15px;
    --space-16: 16px;
    --space-24: 24px;
    --space-32: 32px;
    --space-48: 48px;
    --space-64: 64px;

    /* Layout */
    --max-width: 800px;
    --breakpoint-mobile: 799px; /* Used for reference, hardcoded in media query */
}

/* Base Styles & Resets */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--body-font-size);
    line-height: var(--body-line-height);
    color: var(--text-color);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: var(--heading-font-weight);
    line-height: var(--heading-line-height);
    color: var(--primary-color); /* Default heading color */
    margin-top: 0;
    margin-bottom: var(--space-16);
}

h1 { font-size: var(--h1-base-size); }
h2 { font-size: var(--h2-size); }
h3 { font-size: var(--h3-base-size); }
h4 { font-size: var(--h4-base-size); }

p {
    margin-top: 0;
    margin-bottom: var(--space-16);
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-16);
    flex-grow: 1; /* Applies to main content areas */
}

/* Components */
.site-header {
    width: 100%;
    background-color: var(--surface-text-on-dark);
    border-bottom: 1px solid var(--secondary-color);
    padding: var(--space-16) 0;
}

.site-header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
    flex-grow: 0; /* Override flex-grow for header container */
}

.site-title {
    font-size: var(--h1-site-title-size);
    color: var(--primary-color);
    margin: 0;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.site-title a:hover {
    text-decoration: none;
}

.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-16);
}

.site-nav li {
    position: relative;
}

.site-nav li:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: calc(-1 * var(--space-8));
    color: var(--text-color);
}

.site-nav a {
    font-family: var(--body-font);
    font-size: var(--nav-font-size);
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
    padding: var(--space-4) 0;
}

.site-nav a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.site-nav a.active {
    color: var(--primary-color);
    text-decoration: underline;
}

.breadcrumbs {
    max-width: var(--max-width);
    margin: var(--space-8) auto var(--space-16);
    padding: 0 var(--space-16);
    font-family: var(--body-font);
    font-size: var(--breadcrumb-font-size);
    color: var(--text-color);
    text-align: left;
}

.breadcrumbs a {
    color: var(--secondary-color);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: var(--text-color);
}

.hero {
    width: 100%;
    background-color: var(--surface-hero);
    padding: var(--space-32) 0;
    margin-bottom: var(--space-32);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.hero .container {
    flex-grow: 0; /* Override flex-grow for hero container */
}

.hero h1 {
    font-size: var(--h1-hero-size);
    color: var(--primary-color);
    margin-bottom: var(--space-16);
}

.hero p {
    font-size: var(--hero-paragraph-size);
    max-width: 600px;
    margin: 0 auto var(--space-32);
}

.hero img {
    margin: 0 auto;
}

.section {
    padding: var(--space-16) 0;
    margin-bottom: var(--space-16);
    text-align: left;
}

.section h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: var(--space-32);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-16);
    margin-top: var(--space-32);
    margin-bottom: var(--space-32);
}

.team-member {
    background-color: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: var(--space-16);
    text-align: center;
    box-shadow: 0 2px 5px var(--shadow-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    object-fit: cover;
    margin-bottom: var(--space-16);
}

.team-member h3 {
    font-size: var(--h3-team-size);
    color: var(--primary-color);
    margin: 0 0 var(--space-4) 0;
}

.team-member p {
    font-family: var(--body-font);
    font-size: var(--team-member-text-size);
    color: var(--text-muted);
    margin: 0;
}

.team-member p:first-of-type { /* Role title paragraph */
    margin-bottom: var(--space-8);
}

.cta-section {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--surface-text-on-dark);
    padding: var(--space-32);
    text-align: center;
}

.cta-section .container {
    flex-grow: 0; /* Override flex-grow for cta-section container */
}

.cta-section h2 {
    font-size: var(--h2-size);
    color: var(--surface-text-on-dark);
    margin-bottom: var(--space-16);
}

.cta-section p {
    font-size: var(--cta-paragraph-size);
    color: var(--surface-text-on-dark);
    margin-bottom: var(--space-24);
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--surface-text-on-dark);
    font-family: var(--body-font);
    font-size: var(--cta-button-font-size);
    font-weight: bold;
    padding: var(--space-12) var(--space-24);
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: var(--accent-hover-color);
    text-decoration: none;
}

.site-footer {
    width: 100%;
    background-color: var(--surface-text-on-dark);
    border-top: 1px solid var(--secondary-color);
    padding: var(--space-16) 0;
    font-family: var(--body-font);
    font-size: var(--footer-font-size);
    color: var(--text-color);
    margin-top: auto;
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
    flex-grow: 0; /* Override flex-grow for footer container */
}

.site-footer p {
    margin: 0;
}

.site-footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-16);
}

.site-footer-nav a {
    color: var(--text-color);
    text-decoration: none;
}

.site-footer-nav a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

#back-to-top {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    background-color: var(--secondary-color);
    color: var(--surface-text-on-dark);
    font-family: var(--body-font);
    font-size: var(--back-to-top-button-font-size);
    padding: var(--space-10) var(--space-16);
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#back-to-top:hover {
    background-color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 799px) {
    /* Site Header */
    .site-header .container {
        gap: var(--space-16);
    }

    /* Site Nav */
    .site-nav ul {
        flex-direction: column;
        gap: var(--space-8);
    }

    .site-nav li:not(:last-child)::after {
        content: none; /* Remove separator on mobile nav */
    }

    /* Hero */
    .hero h1 {
        font-size: 2.5em;
    }

    .hero p {
        font-size: 1em;
    }

    /* Section h2 */
    .section h2 {
        font-size: 1.8em;
    }

    /* Team Grid */
    .team-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }

    /* CTA Section */
    .cta-section h2 {
        font-size: 1.8em;
    }

    /* Back to Top button */
    #back-to-top {
        bottom: 10px;
        right: 10px;
        padding: var(--space-8) var(--space-12);
        font-size: 1em;
    }
}

/* --- Navigation resilience (appended, structural only) --- */
header nav { flex-wrap: wrap; max-width: 100%; }
header nav ul { flex-wrap: wrap; }

/* Nav-spacing safety net.
   Some generated headers nest the list item inside the anchor (<a><li>…</li></a>)
   and move the list class onto the <ul> itself. When that happens, the design's
   own spacing rule — which is scoped to a NESTED <ul> (e.g. `.list ul { gap }`) —
   no longer matches anything, and the nav links collapse together with no space
   between them. Give the container that directly holds those inverted anchors a
   flex gap so the links always separate. This targets only the broken shape (an
   anchor that directly contains an <li>); correct <li><a> markup never matches it,
   so working designs are left completely untouched. The low element-count
   specificity here loses to any per-design rule, so a design's own gap still wins. */
header nav :has(> a > li) { display: flex; flex-wrap: wrap; gap: 1.5rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 9px;
  background: transparent;
  border: 0;
  cursor: pointer;
  margin-left: auto;
  color: inherit;
}
.nav-toggle span { display: block; width: 100%; height: 2px; background: currentColor; }
@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  header nav {
    display: none !important;
    flex-basis: 100%;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  header[data-nav-open] nav { display: flex !important; }
}
.center {
}
