/* ============================================================
   OpenHeidelberg — style.css
   Single stylesheet. All visual decisions live here.
   Organised in 14 labelled sections.
   LLM maintenance: follow the rules in concept/31-frontend-spec.md §9
   ============================================================ */


/* === FONTS ===
   All fonts are self-hosted. Place WOFF2 files in /fonts/.
   Fallback stacks allow the site to render before fonts download.
   Sources:
     Fraunces    → github.com/uncommitted-design/fraunces   (SIL OFL 1.1)
     Atkinson    → brailleinstitute.org/freefont            (free to use)
     IBM Plex    → github.com/IBM/plex                      (SIL OFL 1.1)
   ============================================================ */

@font-face {
    font-family: 'Fraunces';
    src: url('../fonts/fraunces/Fraunces[SOFT,WONK,opsz,wght].woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Fraunces';
    src: url('../fonts/fraunces/Fraunces-Italic[SOFT,WONK,opsz,wght].woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Atkinson Hyperlegible';
    src: url('../fonts/atkinson/AtkinsonHyperlegible-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Atkinson Hyperlegible';
    src: url('../fonts/atkinson/AtkinsonHyperlegible-Italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Atkinson Hyperlegible';
    src: url('../fonts/atkinson/AtkinsonHyperlegible-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Atkinson Hyperlegible';
    src: url('../fonts/atkinson/AtkinsonHyperlegible-BoldItalic.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Mono';
    src: url('../fonts/ibm-plex-mono/IBMPlexMono-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}


/* === TOKENS ===
   All design values as CSS custom properties.
   Dark mode overrides are at the bottom of this section.
   ============================================================ */

:root {
    /* --- Colours --- */
    --color-ink:          #1A1F2E;   /* primary text; deep blue-navy, richer than pure black */
    --color-teal:         #2D6A7F;   /* brand primary; nav, links, borders, primary buttons */
    --color-amber:        #C8801A;   /* accent only; never use as body text on light bg */
    --color-cloud:        #F0F4F6;   /* page background; very light cool blue-grey */
    --color-stone:        #546070;   /* secondary text, captions, borders — darkened to meet WCAG AA on cloud bg */
    --color-white:        #FFFFFF;   /* card backgrounds, nav background, button text */
    --color-teal-subtle:  #E8F2F5;   /* light section tint; alternate section backgrounds */

    /* --- Typography --- */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body:    'Atkinson Hyperlegible', system-ui, -apple-system, sans-serif;
    --font-mono:    'IBM Plex Mono', 'Courier New', Courier, monospace;

    /* --- Type scale (modular, ratio ~1.25) --- */
    --text-xs:   0.75rem;    /* 12px — captions, fine print */
    --text-sm:   0.875rem;   /* 14px — secondary labels, nav */
    --text-base: 1rem;       /* 16px — body text */
    --text-md:   1.25rem;    /* 20px — large body, intro paragraphs */
    --text-lg:   1.563rem;   /* 25px — h3, subheadings */
    --text-xl:   1.953rem;   /* 31px — h2, section headings */
    --text-2xl:  2.441rem;   /* 39px — h1 on inner pages */
    --text-3xl:  3.052rem;   /* 49px — h1 hero */

    /* --- Spacing --- */
    --space-xs:  0.25rem;    /* 4px */
    --space-sm:  0.5rem;     /* 8px */
    --space-md:  1rem;       /* 16px */
    --space-lg:  2rem;       /* 32px */
    --space-xl:  4rem;       /* 64px */
    --space-2xl: 8rem;       /* 128px */

    /* --- Shape --- */
    --radius-sm:     4px;
    --radius-md:     8px;
    --border-accent: 3px solid var(--color-teal);

    /* --- Motion --- */
    --transition-fast: 150ms ease;
}

/* Dark mode token overrides — structural CSS unchanged */
@media (prefers-color-scheme: dark) {
    :root {
        --color-ink:         #E8EDF2;
        --color-teal:        #5AABBF;
        --color-amber:       #E09A35;
        --color-cloud:       #131820;
        --color-stone:       #7A9BAD;   /* lighter for legibility on dark background */
        --color-white:       #1E2733;
        --color-teal-subtle: #1A2B32;
    }
}


/* === RESET ===
   Minimal — only what is necessary to neutralise browser defaults.
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

ul[role="list"] {
    list-style: none;
}

img, svg, video {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font: inherit;
}


/* === BASE ===
   Body, headings, paragraphs, links, inline elements.
   ============================================================ */

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-ink);
    background-color: var(--color-cloud);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings: Fraunces for h1 and h2 only */
h1, h2 {
    font-family: var(--font-display);
    font-variation-settings: 'opsz' 72;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-ink);
}

h1 { font-size: var(--text-3xl); font-weight: 600; }
h2 { font-size: var(--text-xl);  font-weight: 600; }

/* h3 and below: body face */
h3 {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-ink);
}

h4 {
    font-family: var(--font-body);
    font-size: var(--text-md);
    font-weight: 700;
    line-height: 1.3;
}

p {
    margin-bottom: var(--space-md);
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--color-teal);
    text-underline-offset: 0.2em;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-amber);
}

a:focus-visible {
    outline: 2px solid var(--color-teal);
    outline-offset: 3px;
    border-radius: 2px;
}

strong, b { font-weight: 700; }
em, i     { font-style: italic; }

code, kbd, samp {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background-color: var(--color-teal-subtle);
    padding: 0.1em 0.35em;
    border-radius: var(--radius-sm);
}

blockquote {
    border-left: var(--border-accent);
    padding-left: var(--space-md);
    color: var(--color-stone);
    font-style: italic;
    margin: var(--space-lg) 0;
}

hr {
    border: none;
    border-top: 1px solid rgba(107, 128, 144, 0.2);
    margin: var(--space-xl) 0;
}

/* Responsive images in content */
figure { margin: var(--space-lg) 0; }
figcaption {
    font-size: var(--text-xs);
    color: var(--color-stone);
    margin-top: var(--space-sm);
}


/* === LAYOUT ===
   Site-wide structural elements.
   ============================================================ */

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-header {
    background-color: var(--color-white);
    border-bottom: 1px solid rgba(107, 128, 144, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-main {
    min-height: 60vh;
}

/* Footer is always dark — hardcoded so dark-mode token inversion
   does not accidentally turn it light. */
.site-footer {
    background-color: #0E1520;
    color: #C8D6DE;
    padding: var(--space-xl) 0 var(--space-lg);
    margin-top: var(--space-2xl);
}


/* === NAVIGATION ===
   Mobile-first. Desktop layout overrides at ≥768px.
   Mobile menu uses <details>/<summary> — no JavaScript required.
   ============================================================ */

.site-nav {
    display: flex;
    align-items: center;
    max-width: 960px;
    margin: 0 auto;
    padding: 0.875rem 1.5rem;
    gap: var(--space-md);
}

.nav-logo {
    flex-shrink: 0;
    margin-right: auto;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 36px;
    width: auto;
}

/* --- Desktop nav (≥768px): always show links --- */
@media (min-width: 768px) {
    .nav-menu {
        display: flex;
        align-items: center;
        gap: var(--space-md);
    }

    .nav-menu > summary {
        display: none;
    }

    /* Override browser default of hiding details content when closed */
    .nav-menu > ul {
        display: flex !important;
        align-items: center;
        gap: var(--space-md);
    }
}

/* --- Nav links (shared between mobile and desktop) --- */
.nav-menu a {
    text-decoration: none;
    color: var(--color-ink);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.nav-menu a:hover {
    color: var(--color-teal);
    border-bottom-color: var(--color-teal-subtle);
}

.nav-menu a[aria-current="page"] {
    color: var(--color-teal);
    border-bottom-color: var(--color-teal);
}

/* --- Language switch --- */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: var(--text-sm);
    padding-left: var(--space-md);
    border-left: 1px solid rgba(107, 128, 144, 0.25);
    flex-shrink: 0;
}

.lang-switch a {
    color: var(--color-stone);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.lang-switch a:hover {
    color: var(--color-teal);
}

.lang-switch [aria-current="true"] {
    color: var(--color-teal);
    font-weight: 700;
}

.lang-divider {
    color: rgba(107, 128, 144, 0.35);
}

/* --- Mobile nav (<768px): dropdown via <details> --- */
@media (max-width: 767px) {
    .nav-menu {
        position: relative;
    }

    .nav-menu > summary {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2.5rem;
        height: 2.5rem;
        border: 1.5px solid rgba(107, 128, 144, 0.4);
        border-radius: var(--radius-sm);
        cursor: pointer;
        font-size: 1.1rem;
        color: var(--color-ink);
        background: transparent;
        user-select: none;
        -webkit-user-select: none;
    }

    .nav-menu > summary::-webkit-details-marker,
    .nav-menu > summary::marker {
        display: none;
        content: '';
    }

    /* Hidden by default on mobile */
    .nav-menu > ul {
        display: none;
    }

    /* Shown when <details> is open */
    .nav-menu[open] > ul {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 0.5rem);
        right: 0;
        min-width: 200px;
        background-color: var(--color-white);
        border: 1px solid rgba(107, 128, 144, 0.2);
        border-radius: var(--radius-md);
        padding: var(--space-sm) 0;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        z-index: 200;
    }

    .nav-menu[open] > ul li {
        width: 100%;
    }

    .nav-menu[open] > ul li a {
        display: block;
        padding: 0.625rem 1.25rem;
        border-bottom: none;
    }

    .nav-menu[open] > ul li a:hover {
        background-color: var(--color-teal-subtle);
        color: var(--color-teal);
    }
}


/* === HERO ===
   Always dark — hardcoded so it never inverts in dark mode.
   The ::before pseudo-element echoes the logo's open-arc mark
   as a large watermark: the brand's own structural motif used
   as atmosphere. This is the one bold gesture; everything else
   stays disciplined.
   ============================================================ */

.hero {
    background-color: #1A1F2E;
    padding: var(--space-2xl) 0 var(--space-xl);
    position: relative;
    overflow: hidden;
}

/* Large watermark arc — brand mark echoed at architectural scale */
.hero::before {
    content: '';
    position: absolute;
    right: -120px;
    top: -120px;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    border: 52px solid rgba(45, 106, 127, 0.12);
    pointer-events: none;
}

.hero h1 {
    color: #F0F4F6;
    font-size: clamp(2.2rem, 5.5vw, var(--text-3xl));
    max-width: 16ch;
    margin-bottom: var(--space-md);
}

.hero__sub {
    font-size: var(--text-md);
    color: rgba(200, 220, 230, 0.72);
    max-width: 52ch;
    line-height: 1.55;
    margin-bottom: var(--space-lg);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* Outline button on the dark hero needs its own colours */
.hero .btn--outline {
    border-color: rgba(200, 220, 230, 0.35);
    color: rgba(200, 220, 230, 0.85);
}

.hero .btn--outline:hover {
    background-color: var(--color-teal);
    border-color: var(--color-teal);
    color: #ffffff;
}

@media (max-width: 767px) {
    .hero {
        padding: var(--space-xl) 0 var(--space-lg);
    }

    .hero::before {
        width: 280px;
        height: 280px;
        border-width: 32px;
        right: -60px;
        top: -60px;
    }

    .hero h1 {
        font-size: var(--text-2xl);
    }

    .hero__sub {
        font-size: var(--text-base);
    }
}


/* === SECTIONS ===
   Standard page sections and their modifiers.
   Signature element: .section--accent adds a short amber underline
   beneath its h2. This runs through the entire site.
   ============================================================ */

.section {
    padding: var(--space-xl) 0;
}

/* Alternate background: very light teal tint */
.section--tint {
    background-color: var(--color-teal-subtle);
}

/* Dark section (used sparingly) */
.section--dark {
    background-color: var(--color-ink);
    color: var(--color-cloud);
}

.section--dark p {
    color: var(--color-stone);
}

/* Signature element: the short underline on section headings.
   Apply .section--accent to the <section> element.
   The accent appears on the h2 only — never on h1, h3, or lower. */
.section--accent h2::after {
    content: '';
    display: block;
    width: 3rem;
    height: 3px;
    margin-top: 0.625rem;
    background-color: var(--color-amber);
}

.section h2 {
    margin-bottom: var(--space-lg);
}

/* Page header: used on inner pages for the page title area */
.page-header {
    padding: var(--space-xl) 0 var(--space-lg);
    border-bottom: 1px solid rgba(107, 128, 144, 0.15);
    margin-bottom: var(--space-xl);
}

.page-header h1 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-sm);
}

.page-header__sub {
    font-size: var(--text-md);
    color: var(--color-stone);
    max-width: 52ch;
    margin-bottom: 0;
}


/* === CARDS ===
   Generic card and its specialisations.
   ============================================================ */

.card {
    background-color: var(--color-white);
    border: 1px solid rgba(107, 128, 144, 0.25);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: var(--color-teal);
}

/* Target-group card: used in home page 2×2 grid.
   Top teal border replaces the uniform grey border — each card
   now reads as a distinct section rather than a generic box. */
.target-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    border-top: 3px solid var(--color-teal);
    border-left: 1px solid rgba(45, 106, 127, 0.15);
    border-right: 1px solid rgba(45, 106, 127, 0.15);
    border-bottom: 1px solid rgba(45, 106, 127, 0.15);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.target-group__eyebrow {
    font-size: var(--text-sm);
    color: var(--color-amber);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0;
}

.target-group h2 {
    font-size: var(--text-lg);
    font-family: var(--font-display);
    font-variation-settings: 'opsz' 72;
    margin-bottom: 0;
    /* No border-left here — cards are not section headings */
}

.target-group__description {
    color: var(--color-stone);
    flex-grow: 1;
    margin-bottom: 0;
    font-size: var(--text-base);
    line-height: 1.6;
}

.target-group .btn {
    align-self: flex-start;
    margin-top: var(--space-sm);
}

/* Grid container for target-group cards */
.target-groups {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .target-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* === MEMBER CARDS ===
   Public member directory cards and detail profiles.
   ============================================================ */

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.member-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    background-color: var(--color-white);
    border: 1px solid rgba(107, 128, 144, 0.25);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.member-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: var(--color-teal);
}

/* Detail layout: photo beside content on wider screens */
.member-card--detail {
    padding: var(--space-xl);
}

@media (min-width: 600px) {
    .member-card--detail {
        flex-direction: row;
        align-items: flex-start;
        gap: var(--space-xl);
    }

    .member-card--detail .member-card__photo-wrap {
        flex-shrink: 0;
    }
}

.member-card__photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-teal-subtle);
}

/* Placeholder when no photo is available */
.member-card__photo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--color-teal-subtle);
    border: 3px solid rgba(45, 106, 127, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-teal);
    font-size: var(--text-2xl);
    font-family: var(--font-display);
    font-variation-settings: 'opsz' 72;
}

.member-card__role {
    font-size: var(--text-sm);
    color: var(--color-teal);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0;
}

.member-card h3 {
    font-family: var(--font-display);
    font-variation-settings: 'opsz' 72;
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: 0;
}

.member-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.member-card__contact a {
    font-size: var(--text-sm);
    color: var(--color-stone);
    word-break: break-word;
}

.member-card__projects h4 {
    font-size: var(--text-sm);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-stone);
    margin-bottom: var(--space-sm);
}

.member-card__projects ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding-left: var(--space-md);
    list-style: disc;
}

.member-card__projects ul li {
    font-size: var(--text-sm);
    color: var(--color-stone);
}

.member-card__projects ul li a {
    color: var(--color-teal);
}


/* === PARTNER CARDS ===
   Partner profile cards on the partners index.
   ============================================================ */

.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.partner-card {
    background-color: var(--color-white);
    border: 1px solid rgba(107, 128, 144, 0.25);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.partner-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: var(--color-teal);
}

.partner-card h3 {
    margin-bottom: 0;
}

.partner-card p {
    color: var(--color-stone);
    flex-grow: 1;
    margin-bottom: 0;
}

.partner-card .btn {
    align-self: flex-start;
}


/* === PRESENTATION ITEMS ===
   List of presentations on the presentations page.
   ============================================================ */

.presentation-list {
    display: flex;
    flex-direction: column;
}

.presentation-item {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid rgba(107, 128, 144, 0.2);
}

.presentation-item:first-child {
    padding-top: 0;
}

.presentation-item:last-child {
    border-bottom: none;
}

.presentation-item h3 {
    margin-bottom: var(--space-xs);
}

.presentation-item h3 a {
    text-decoration: none;
    color: var(--color-ink);
    transition: color var(--transition-fast);
}

.presentation-item h3 a:hover {
    color: var(--color-teal);
}

.presentation-item p {
    color: var(--color-stone);
    font-size: var(--text-base);
    margin-bottom: 0;
}

.presentation-item__meta {
    font-size: var(--text-sm);
    color: var(--color-stone);
    margin-bottom: var(--space-xs);
}


/* === BUTTONS ===
   Two variants: primary (filled) and outline.
   Use .btn as base class plus one modifier.
   ============================================================ */

.btn {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    line-height: 1.4;
    transition:
        background-color var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast);
    white-space: normal;
}

.btn:focus-visible {
    outline: 2px solid var(--color-teal);
    outline-offset: 3px;
}

.btn--primary {
    background-color: var(--color-teal);
    color: var(--color-white);
    border-color: var(--color-teal);
}

.btn--primary:hover {
    background-color: #235a6c;
    border-color: #235a6c;
    color: var(--color-white);
}

.btn--outline {
    background-color: transparent;
    color: var(--color-teal);
    border-color: var(--color-teal);
}

.btn--outline:hover {
    background-color: var(--color-teal);
    color: var(--color-white);
}

.channel-option + .channel-option {
    margin-top: var(--space-lg);
}


/* === TABLES === */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
}

th {
    text-align: left;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 2px solid var(--color-teal);
    font-weight: 700;
    color: var(--color-ink);
}

td {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid rgba(107, 128, 144, 0.15);
    vertical-align: top;
}

tr:last-child td {
    border-bottom: none;
}

/* Responsive table wrapper */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


/* === FORMS ===
   Reserved for future use. No forms in v1.
   ============================================================ */

/* Placeholder — add form styles here when forms are introduced */


/* === FOOTER ===
   Dark background footer with three columns.
   ============================================================ */

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
    flex: 1 1 200px;
}

.footer-brand img {
    height: 32px;
    width: auto;
    margin-bottom: var(--space-sm);
}

.footer-tagline {
    color: rgba(200, 220, 230, 0.5);
    font-size: var(--text-sm);
    margin-bottom: 0;
}

.footer-nav {
    flex: 0 1 auto;
}

.footer-nav h4 {
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-stone);
    margin-bottom: var(--space-sm);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-links a {
    color: rgba(232, 237, 242, 0.7);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-cloud);
}

.footer-contact {
    flex: 1 1 200px;
}

.footer-contact h4 {
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-stone);
    margin-bottom: var(--space-sm);
}

.footer-contact p {
    margin-bottom: var(--space-xs);
    font-size: var(--text-sm);
}

.footer-contact p:last-child {
    margin-bottom: 0;
}

.footer-contact a {
    color: rgba(232, 237, 242, 0.7);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-contact a:hover {
    color: var(--color-teal);
}

.footer-copy {
    color: rgba(107, 128, 144, 0.5);
    font-size: var(--text-xs);
    margin-bottom: 0;
}


/* === UTILITIES === */

/* Accessible hide — visually hidden but available to screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip to main content link — visible only on focus */
.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(-100%);
    background-color: var(--color-teal);
    color: var(--color-white);
    padding: var(--space-sm) var(--space-md);
    font-weight: 700;
    font-size: var(--text-sm);
    text-decoration: none;
    z-index: 999;
    transition: transform var(--transition-fast);
}

.skip-link:focus {
    transform: translateY(0);
}

/* Constrained readable width for body text */
.prose {
    max-width: 65ch;
}

/* Button group: row of buttons with wrapping */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
}

/* Back-link wrapper: spacing above page header on detail pages */
.back-link-wrapper {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-md);
}

/* Mailing-list instruction block */
.howto {
    background-color: var(--color-teal-subtle);
    border-left: var(--border-accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-lg) 0;
}

.howto ol {
    padding-left: var(--space-lg);
    margin-top: var(--space-sm);
}

.howto li {
    margin-bottom: var(--space-xs);
    font-size: var(--text-base);
}

.howto li:last-child {
    margin-bottom: 0;
}

/* Tag/badge for partner status, eyebrow labels etc. */
.tag {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-teal);
    background-color: var(--color-teal-subtle);
    padding: 0.2em 0.6em;
    border-radius: var(--radius-sm);
}


/* === DARK MODE ===
   Token values are already overridden in the TOKENS section above.
   These structural overrides handle components that need adjustments
   beyond token swaps.
   ============================================================ */

@media (prefers-color-scheme: dark) {
    /* Footer stays dark even in dark mode — go slightly deeper */
    .site-footer {
        background-color: #070C14;
    }

    .site-header {
        border-bottom-color: rgba(255, 255, 255, 0.06);
    }

    .card,
    .member-card,
    .partner-card {
        border-color: rgba(90, 171, 191, 0.15);
    }

    .card:hover,
    .member-card:hover,
    .partner-card:hover {
        border-color: var(--color-teal);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    }

    .nav-menu[open] > ul {
        border-color: rgba(90, 171, 191, 0.2);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    }

    table th {
        border-bottom-color: var(--color-teal);
    }

    td {
        border-bottom-color: rgba(90, 171, 191, 0.1);
    }
}


/* === REDUCED MOTION ===
   Remove all transitions and animations for users who prefer it.
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}
