/* ==========================================================================
   The Brilloco Institute — shared stylesheet
   Palette drawn from the logo (institute blue + charcoal) with a warm
   "bridge" accent. System fonts only: no external font requests.
   ========================================================================== */

:root {
    --ink: #0f1f33;
    --ink-2: #17304d;
    --ink-3: #22446b;
    --brand: #1569c7;          /* logo blue — 5.4:1 on white */
    --brand-dark: #0e4f99;
    --brand-light: #6db6ff;    /* for text on dark backgrounds */
    --accent: #f2a541;         /* warm bridge accent — decorative / on dark only */
    --paper: #f6f4ef;
    --paper-2: #ece8df;
    --surface: #ffffff;
    --line: #ddd8cc;
    --text: #1f2a37;
    --muted: #4f5b69;

    /* Legacy variable names kept for any inline usage */
    --primary-color: var(--ink);
    --secondary-color: var(--brand);
    --accent-color: var(--accent);
    --light-color: var(--paper);
    --dark-color: var(--ink);
    --text-color: var(--text);
    --text-light: #f8f9fa;

    --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;

    --radius: 14px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(15, 31, 51, .06), 0 2px 8px rgba(15, 31, 51, .06);
    --shadow: 0 2px 4px rgba(15, 31, 51, .05), 0 12px 32px rgba(15, 31, 51, .10);
    --transition: .25s cubic-bezier(.2, .7, .2, 1);
    --header-h: 84px;
}

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

html { scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-main);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--paper);
    overflow-x: hidden;
}

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

h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); }
h1, h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }

p + p { margin-top: 1em; }

a { color: var(--brand); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-dark); text-decoration: underline; text-underline-offset: .2em; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[tabindex="-1"]:focus { outline: none; }

::selection { background: var(--accent); color: var(--ink); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 32px); }

/* Accessibility: skip link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 12px;
    background: var(--accent);
    color: var(--ink);
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 0 0 8px 8px;
    z-index: 2000;
    transition: top .2s;
}
.skip-link:focus { top: 0; color: var(--ink); }

/* ---------- Header ---------- */
header {
    background-color: var(--ink);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    transition: box-shadow var(--transition);
}
header.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }

header > .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: var(--header-h);
}

.header-top { display: flex; align-items: center; justify-content: space-between; flex: none; }

.logo {
    display: block;            /* not flex: keeps the spaces between "The Brilloco Institute" */
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}
.logo:hover { color: #fff; text-decoration: none; }
.logo img {
    display: inline-block;
    vertical-align: middle;
    margin-right: 12px;
    width: 46px;
    height: 46px;
    object-fit: contain;
    background: #fff;
    border-radius: 12px;
    padding: 4px;
}
.logo span { color: var(--brand-light); }

.mobile-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff;
    font-size: 1.25rem;
    width: 46px;
    height: 46px;
    border-radius: 10px;
    cursor: pointer;
}
.mobile-toggle:hover { background: rgba(255, 255, 255, .08); }

/* Navigation */
nav#mainNav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.nav-main, .nav-locations { display: flex; flex-wrap: wrap; list-style: none; }

.nav-main { gap: 2px; justify-content: flex-end; }

.nav-main a {
    display: block;
    color: rgba(255, 255, 255, .88);
    font-size: .88rem;
    font-weight: 500;
    padding: 6px 8px;
    white-space: nowrap;
    border-radius: 8px;
}
.nav-main a:hover { color: #fff; background: rgba(255, 255, 255, .08); text-decoration: none; }
.nav-main a.active, .nav-main a[aria-current="page"] {
    color: var(--ink);
    background: var(--accent);
}

.nav-locations {
    order: -1;
    gap: 0;
    font-size: .76rem;
    letter-spacing: .02em;
}
.nav-locations li + li::before {
    content: "·";
    color: rgba(255, 255, 255, .35);
    padding: 0 6px;
}
.nav-locations a { color: rgba(255, 255, 255, .62); }
.nav-locations a:hover { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55em;
    padding: 13px 24px;
    background-color: var(--brand);
    color: #fff;
    border: 2px solid var(--brand);
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.btn:hover { background-color: var(--ink); border-color: var(--ink); color: #fff; text-decoration: none; transform: translateY(-2px); }

.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn-accent:hover { background: #fff; border-color: #fff; color: var(--ink); }

.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-ghost:hover { background: #fff; border-color: #fff; color: var(--ink); }

.btn-outline { background: transparent; color: var(--brand-dark); border-color: currentColor; }
.btn-outline:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

/* ---------- Page hero (sub-pages) ---------- */
.page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(15, 31, 51, .96) 30%, rgba(21, 105, 199, .82)),
        url("../../img/bigstockGroupofDiverseHandsTogethe109645244.jpg") center 40% / cover no-repeat,
        var(--ink);
    color: #fff;
    padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 84px);
    text-align: center;
}
.page-hero::after {                      /* bridge arc motif */
    content: "";
    position: absolute;
    left: 50%;
    top: 62%;
    width: min(1100px, 160%);
    aspect-ratio: 2 / 1;
    transform: translateX(-50%);
    border: 2px solid rgba(242, 165, 65, .55);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: 14px; }

.breadcrumb {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    font-size: .92rem;
    color: rgba(255, 255, 255, .8);
}
.breadcrumb li { margin: 0 4px; }
.breadcrumb li::after { content: "/"; margin-left: 10px; color: rgba(255, 255, 255, .45); }
.breadcrumb li:last-child::after { content: ""; margin: 0; }
.breadcrumb a { color: #fff; text-decoration: underline; text-underline-offset: .2em; text-decoration-color: rgba(255, 255, 255, .4); }

/* ---------- Sections ---------- */
section { padding: clamp(60px, 8vw, 104px) 0; }

.section-title { text-align: center; margin-bottom: clamp(32px, 5vw, 52px); position: relative; }
.section-title h2 {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    color: var(--ink);
    display: inline-block;
    padding-bottom: 14px;
}
.section-title h2::after {
    content: "";
    position: absolute;
    width: 56px;
    height: 4px;
    border-radius: 4px;
    background-color: var(--accent);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.bg-light { background-color: var(--paper-2); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-main);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brand-dark);
    margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }

.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 2.9rem); }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 1.1rem; }

/* ==========================================================================
   Homepage
   ========================================================================== */

/* Hero */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--ink);
    color: #fff;
    padding: clamp(48px, 7vw, 96px) 0 0;
}
.hero::before {                          /* soft glow */
    content: "";
    position: absolute;
    inset: -20% -10% auto auto;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(closest-side, rgba(21, 105, 199, .45), transparent);
    z-index: -1;
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
}
.hero .eyebrow { color: var(--accent); }
.hero h1 {
    color: #fff;
    font-size: clamp(2.5rem, 6.2vw, 4.6rem);
    line-height: 1.04;
    margin-bottom: 22px;
}
.hero h1 em { font-style: italic; color: var(--brand-light); }
.hero-lead { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: rgba(255, 255, 255, .86); max-width: 38em; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-media { position: relative; justify-self: center; width: min(100%, 480px); }
.hero-media img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 999px 999px var(--radius-lg) var(--radius-lg);   /* arch */
    box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
}
.hero-media::before {                    /* offset arch outline */
    content: "";
    position: absolute;
    inset: -14px 14px 14px -14px;
    border: 2px solid var(--accent);
    border-radius: 999px 999px var(--radius-lg) var(--radius-lg);
    z-index: -1;
}

.hero-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: clamp(48px, 6vw, 80px);
    border-top: 1px solid rgba(255, 255, 255, .12);
    list-style: none;
}
.hero-facts li {
    padding: 22px 20px 26px 0;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    color: rgba(255, 255, 255, .78);
    font-size: .95rem;
}
.hero-facts li + li { padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, .12); }
.hero-facts i { color: var(--accent); font-size: 1.15rem; margin-top: 3px; }
.hero-facts strong { display: block; color: #fff; font-size: 1.02rem; }

/* About / mission */
.about { background: var(--paper); }
.mission-statement {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.1vw, 2.3rem);
    line-height: 1.3;
    color: var(--ink);
    max-width: 30em;
    margin-bottom: clamp(36px, 5vw, 60px);
}
.mission-statement mark { background: linear-gradient(transparent 62%, rgba(242, 165, 65, .45) 0); color: inherit; }

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: clamp(24px, 4vw, 56px);
}
.about-text h3 { font-size: 1.35rem; margin-bottom: 14px; color: var(--ink); }
.about-text ul { padding-left: 1.3rem; margin: .5em 0 1em; }
.about-text li { margin-bottom: .4em; }
.about-text h2 { margin-bottom: 14px; }
.about-text h3 + ul { margin-top: 0; }
.about-text p + h3 { margin-top: 1.4em; }

.pull-quote {
    margin: 1.4em 0;
    padding: 22px 24px 22px 26px;
    background: var(--surface);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: var(--shadow-sm);
}
.pull-quote p { font-family: var(--font-display); font-size: 1.2rem; font-style: italic; color: var(--ink); }
.pull-quote footer, .pull-quote cite {
    display: block;
    margin-top: 10px;
    padding: 0;
    background: none;
    color: var(--muted);
    font-style: normal;
    font-size: .92rem;
    font-weight: 600;
}

/* Pathway (bridge) */
.pathway { background: var(--surface); }
.path-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    position: relative;
    counter-reset: step;
}
.path-steps::before {                    /* the bridge line */
    content: "";
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    height: 3px;
    background: repeating-linear-gradient(90deg, var(--accent) 0 14px, transparent 14px 22px);
}
.path-steps li { position: relative; counter-increment: step; }
.path-steps .step-dot {
    position: relative;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 18px;
    box-shadow: 0 0 0 8px var(--surface);
}
.path-steps li:last-child .step-dot { background: var(--brand); }
.path-steps .step-num {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brand-dark);
}
.path-steps h3 { font-size: 1.2rem; margin: 2px 0 6px; }
.path-steps p { color: var(--muted); font-size: .98rem; }

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: clamp(20px, 2.4vw, 30px);
}

.service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
    transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.service-card img, .service-card .service-visual {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.service-visual {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 80% 20%, rgba(109, 182, 255, .35), transparent 55%),
        linear-gradient(135deg, var(--ink-2), var(--brand-dark));
    color: #fff;
    font-size: 3.4rem;
}
.service-visual i { opacity: .9; }

.service-content { padding: 22px 24px 26px; }
.service-content h3 { margin-bottom: 8px; font-size: 1.22rem; color: var(--ink); }
.service-content p { color: var(--muted); font-size: 1rem; }

.service-num {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(15, 31, 51, .85);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    padding: 4px 10px;
    border-radius: 999px;
}

/* Get involved / audiences */
.involve { padding-top: 0; }   /* continues the services band above */
.involve-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.involve-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: clamp(26px, 3vw, 38px);
    background: var(--surface);
}
.involve-card:nth-child(2) { background: var(--ink); color: rgba(255, 255, 255, .85); }
.involve-card:nth-child(2) h3 { color: #fff; }
.involve-card:nth-child(3) { background: var(--brand-dark); color: rgba(255, 255, 255, .9); }
.involve-card:nth-child(3) h3 { color: #fff; }
.involve-card h3 { font-size: 1.3rem; }
.involve-card i.involve-icon { font-size: 1.6rem; color: var(--accent); }
.involve-card:first-child i.involve-icon { color: var(--brand); }
.involve-card p { flex: 1; }
.involve-card .text-link { font-weight: 700; color: inherit; display: inline-flex; align-items: center; gap: .5em; }
.involve-card:first-child .text-link { color: var(--brand-dark); }
.involve-card .text-link i { transition: transform var(--transition); }
.involve-card .text-link:hover i { transform: translateX(4px); }

/* Values */
.values { background: var(--ink); color: rgba(255, 255, 255, .82); }
.values .eyebrow { color: var(--accent); }
.values .section-head h2 { color: #fff; }

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: clamp(18px, 2vw, 26px);
}

.value-card {
    padding: 30px 26px;
    border-radius: var(--radius);
    background-color: var(--surface);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform var(--transition);
}
.value-card:hover { transform: translateY(-4px); }
.value-card i { font-size: 2.4rem; color: var(--brand); margin-bottom: 18px; }
.value-card h3 { margin-bottom: 10px; color: var(--ink); }

.values .value-card {
    text-align: left;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: none;
}
.values .value-card i {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
    border-radius: 14px;
    background: rgba(242, 165, 65, .14);
    color: var(--accent);
}
.values .value-card h3 { color: #fff; font-family: var(--font-display); font-size: 1.45rem; }
.values .value-card p { color: rgba(255, 255, 255, .78); }

/* Research */
.research-layout {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}
.research-figure img {
    width: 100%;
    aspect-ratio: 5 / 4;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.research-list { list-style: none; border-top: 1px solid var(--line); margin-bottom: 30px; }
.research-list li { border-bottom: 1px solid var(--line); }
.research-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 4px;
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    color: var(--ink);
}
.research-list a:hover { color: var(--brand-dark); text-decoration: none; padding-left: 12px; }
.research-list a { transition: padding var(--transition), color var(--transition); }
.research-list a i { font-size: 1rem; color: var(--brand); transition: transform var(--transition); }
.research-list a:hover i { transform: translateX(4px); }

/* Legacy research menu (kept for compatibility) */
.research-menu { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.research-menu a {
    padding: 10px 20px;
    background-color: var(--surface);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}
.research-menu a:hover, .research-menu a.active { background-color: var(--brand); color: #fff; text-decoration: none; }

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
    gap: 28px;
}
.research-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background-color: var(--surface);
    padding: 36px 30px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    text-align: center;
}
.research-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.research-card i { font-size: 2.6rem; color: var(--brand); margin-bottom: 6px; }
.research-card p { color: var(--muted); flex: 1; }
.research-card:target { outline: 3px solid var(--accent); outline-offset: 4px; }

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 28px;
}

.contact-info, .contact-form {
    background-color: var(--surface);
    padding: clamp(24px, 3vw, 36px);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.contact-info h3, .contact-form h3 { margin-bottom: 18px; color: var(--ink); font-size: 1.3rem; }
.contact-info h4 { margin: 24px 0 10px; font-size: 1rem; color: var(--ink); }
.contact-info p { margin: 0 0 10px; display: flex; align-items: flex-start; gap: 12px; }
.contact-info i { color: var(--brand); width: 20px; margin-top: 5px; flex: none; text-align: center; }

.contact.contact--home .contact-info {
    background: var(--ink);
    border-color: var(--ink);
    color: rgba(255, 255, 255, .86);
}
.contact--home .contact-info h3, .contact--home .contact-info h4 { color: #fff; }
.contact--home .contact-info i { color: var(--accent); }
.contact--home .contact-info a { color: var(--brand-light); }
.contact--home .contact-info a:hover { color: #fff; }

/* Business hours list (contact page) */
.hours { margin: 0; }
.hours > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, .18);
}
.hours > div:last-child { border-bottom: none; }
.hours dt { font-weight: 600; }
.hours dd { text-align: right; }

/* Form submission status (contact page) */
.form-status:empty { display: none; }
.form-status {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--paper-2);
    font-weight: 600;
}
.form-status.is-success { background: #e7f6ec; color: #136c2e; border-left: 4px solid #1f8a3d; }
.form-status.is-error { background: #fdecea; color: #a12a1c; border-left: 4px solid #b42318; }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }

/* Locations (contact page) */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 20px;
}
.location-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), border-color var(--transition);
}
.location-card h3 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.location-card h3 i { color: var(--brand); }
.location-card p { margin: 0; color: var(--muted); }
.location-card .location-links { margin-top: auto; font-weight: 700; }
.location-card--primary { background: var(--ink); border-color: var(--ink); }
.location-card--primary h3 { color: #fff; }
.location-card--primary h3 i { color: var(--accent); }
.location-card--primary p { color: rgba(255, 255, 255, .85); }
.location-card--primary a { color: var(--brand-light); }
.location-card:target {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(242, 165, 65, .45), var(--shadow);
}

.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--ink); }
.form-group label .req { color: #b42318; }
.form-group .optional { font-weight: 400; color: var(--muted); font-size: .9em; }

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #c9c3b6;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(21, 105, 199, .18);
}
.form-group input:user-invalid, .form-group textarea:user-invalid { border-color: #b42318; }
.form-group textarea { min-height: 150px; resize: vertical; }

.form-note { font-size: .88rem; color: var(--muted); margin-bottom: 18px; }

/* ---------- Events ---------- */
.no-events { max-width: 640px; margin: 0 auto; }
.no-events h3 { margin-bottom: 10px; }
.no-events p { color: var(--muted); margin-bottom: 24px; }

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
    gap: 28px;
}
.event-card {
    display: flex;
    flex-direction: column;
    background-color: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.event-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.event-img {
    height: 200px;
    background-color: var(--ink-2);
    background-size: cover;
    background-position: center;
    position: relative;
}
.event-date {
    position: absolute;
    top: 16px;
    left: 16px;
    background-color: var(--accent);
    color: var(--ink);
    padding: 8px 12px;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    min-width: 62px;
    line-height: 1.2;
}
.event-date span { display: block; font-size: 1.4rem; font-family: var(--font-display); }
.event-content { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.event-content p { flex: 1; color: var(--muted); }
.event-content .btn { align-self: flex-start; }
.event-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .88rem; }
.event-meta i { color: var(--brand); margin-right: 4px; }

/* ---------- Newsletter ---------- */
.newsletter { padding: clamp(56px, 7vw, 80px) 0; background-color: var(--ink); color: rgba(255, 255, 255, .85); text-align: center; }
.newsletter h2 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.4rem); margin-bottom: 8px; }
.newsletter-form { display: flex; justify-content: center; max-width: 580px; margin: 24px auto 0; gap: 8px; }
.newsletter-form input {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    border: 2px solid transparent;
    border-radius: 999px;
    font: inherit;
}
.newsletter-form input:focus { outline: none; border-color: var(--accent); }
.newsletter-form button {
    padding: 0 28px;
    background-color: var(--accent);
    color: var(--ink);
    border: none;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color var(--transition);
}
.newsletter-form button:hover { background: #fff; }

/* ---------- Gallery ---------- */
.gallery-section h3 { font-size: 1.35rem; margin-bottom: 18px; padding-left: 14px; border-left: 4px solid var(--accent); }
.gallery-section .no-events h3 { font-size: revert; margin-bottom: 10px; padding-left: 0; border-left: 0; } /* empty-state heading matches events/videos */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 20px;
}
.gallery-item {
    position: relative;
    display: block;
    height: 250px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--ink-2);
    box-shadow: var(--shadow-sm);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    background: linear-gradient(to top, rgba(15, 31, 51, .92), rgba(15, 31, 51, .1) 70%);
    color: #fff;
    opacity: 0;
    transition: opacity var(--transition);
}
.gallery-overlay h4 { color: #fff; font-size: 1.1rem; }
.gallery-overlay p { font-size: .92rem; color: rgba(255, 255, 255, .85); }
.gallery-item:hover .gallery-overlay,
.gallery-item:focus-visible .gallery-overlay,
.gallery-item.is-missing .gallery-overlay { opacity: 1; }
@media (hover: none) { .gallery-overlay { opacity: 1; } }

/* Graceful fallback for missing images (inserted by site.js) */
.media-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    min-height: 160px;
    background:
        radial-gradient(circle at 85% 15%, rgba(109, 182, 255, .28), transparent 50%),
        linear-gradient(135deg, var(--ink-2), var(--ink));
    color: rgba(255, 255, 255, .7);
    font-size: .85rem;
    text-align: center;
}
.media-fallback i { font-size: 2.2rem; color: rgba(255, 255, 255, .5); }
.service-card .media-fallback { height: 200px; }
.gallery-item.is-missing .media-fallback { justify-content: flex-start; padding-top: 40px; }
.gallery-item.is-missing { cursor: default; }

/* ---------- Videos ---------- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
    gap: 28px;
}
.video-card {
    background-color: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.video-link { display: block; color: #fff; }
.video-placeholder {
    position: relative;
    height: 250px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    align-items: center;
    /* Inline styles reset background-color; keep a branded base under missing thumbnails */
    background-color: var(--ink-2) !important;
}
.video-placeholder i { font-size: 4rem; color: #fff; transition: transform var(--transition); }
a.video-link[href]:hover .video-placeholder i { transform: scale(1.08); }
.video-status {
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .02em;
    background: rgba(0, 0, 0, .45);
    padding: 4px 12px;
    border-radius: 999px;
}
.video-link.is-unavailable { cursor: default; }
.video-link.is-unavailable .video-placeholder i { opacity: .45; }
.video-content { padding: 22px 24px 26px; }
.video-content h3 { margin-bottom: 8px; }
.video-content p { color: var(--muted); }

/* ---------- FAQ ---------- */
.faq-container { max-width: 820px; margin: 0 auto; }
details {
    background-color: var(--surface);
    margin-bottom: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: box-shadow var(--transition);
}
details[open] { box-shadow: var(--shadow-sm); }
summary {
    padding: 20px 22px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--ink);
}
summary::-webkit-details-marker { display: none; }
summary::after {
    content: "+";
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--paper-2);
    font-size: 1.3rem;
    line-height: 1;
    transition: transform var(--transition), background var(--transition);
}
details[open] summary::after { transform: rotate(45deg); background: var(--accent); }
summary:hover { color: var(--brand-dark); }
.faq-content { padding: 16px 22px 22px; border-top: 1px solid var(--line); }

/* ---------- Footer ---------- */
body > footer {
    background-color: var(--ink);
    color: rgba(255, 255, 255, .78);
    padding: clamp(56px, 7vw, 80px) 0 24px;
    border-top: 4px solid var(--accent);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 36px;
    margin-bottom: 40px;
}
.footer-col h3 {
    margin-bottom: 18px;
    color: #fff;
    font-size: .85rem;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.footer-col p { font-size: .98rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a, .footer-col a { color: rgba(255, 255, 255, .82); }
.footer-links a:hover, .footer-col a:hover { color: var(--accent); }
.footer-contact p { display: flex; gap: 10px; margin: 0 0 8px; font-size: .96rem; }
.footer-contact i { color: var(--accent); margin-top: 5px; width: 16px; flex: none; }

.social-links { display: flex; gap: 10px; margin-top: 20px; }
.social-links a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, .08);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    transition: background-color var(--transition), transform var(--transition);
}
.social-links a:hover { background-color: var(--brand); color: #fff; transform: translateY(-3px); text-decoration: none; }

.copyright {
    text-align: center;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: .9rem;
    color: rgba(255, 255, 255, .6);
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reveal-on-scroll: only active when JS confirms support and motion is allowed */
.js-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1199px) {
    :root { --header-h: 72px; }

    header > .container { flex-wrap: wrap; gap: 0; }
    .header-top { width: 100%; min-height: var(--header-h); }
    .mobile-toggle { display: inline-grid; place-items: center; }

    nav#mainNav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        align-items: stretch;
        gap: 0;
        background-color: var(--ink);
        border-top: 1px solid rgba(255, 255, 255, .1);
        box-shadow: 0 18px 30px rgba(0, 0, 0, .3);
        padding: 12px clamp(18px, 4vw, 32px) 24px;
        max-height: calc(100vh - var(--header-h));
        max-height: calc(100dvh - var(--header-h));
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    nav#mainNav.active { display: flex; }

    .nav-main {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 4px;
    }
    .nav-main a { font-size: 1.02rem; padding: 12px 14px; }

    .nav-locations {
        order: 0;
        margin-top: 14px;
        padding-top: 14px;
        border-top: 1px solid rgba(255, 255, 255, .14);
        font-size: .9rem;
        gap: 4px 0;
    }
    .nav-locations a { display: inline-block; padding: 6px 0; }
}

@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-media { width: min(100%, 360px); order: -1; }
    .hero-media img { aspect-ratio: 1 / 1; }
    .research-layout { grid-template-columns: 1fr; }
    .research-figure { order: 2; }
    .path-steps { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
    .path-steps::before { display: none; }
}

@media (max-width: 720px) {
    .hero-facts { grid-template-columns: 1fr; }
    .hero-facts li, .hero-facts li + li { padding: 16px 0; border-left: none; }
    .hero-facts li + li { border-top: 1px solid rgba(255, 255, 255, .12); }

    .newsletter-form { flex-direction: column; }
    .newsletter-form button { padding: 14px; }
}

@media (max-width: 560px) {
    body { font-size: 1rem; }
    .logo { font-size: 1.1rem; }
    .logo img { width: 40px; height: 40px; margin-right: 10px; }
    .path-steps { grid-template-columns: 1fr; }
    .path-steps li { display: grid; grid-template-columns: 62px 1fr; column-gap: 16px; }
    .path-steps .step-dot { grid-row: span 3; margin: 0; }
    .hero-actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .js-reveal .reveal { opacity: 1; transform: none; }
}

@media print {
    header, .mobile-toggle, .social-links, .newsletter { display: none !important; }
    body { background: #fff; }
    .js-reveal .reveal { opacity: 1 !important; transform: none !important; }
}
