/* DMBC site styles, shared by every page. */

/* Metric-matched fallback so text doesn't jump while Inter loads */
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("Helvetica"); size-adjust: 107.1%; ascent-override: 90.4%; descent-override: 22.5%; line-gap-override: 0%; }

:root {
  --navy: #0b2341;
  --navy-hover: #173a63;
  --ink: #0f1b2d;
  --muted: #5b6577;
  --soft: #7a8496;          /* large text only (3:1+) */
  --line: #e4e7ec;
  --line-strong: #d3d8e0;
  --bg: #ffffff;
  --subtle: #f6f7f9;
  --orange: #f26a21;        /* brand orange: accents only, never small text */
  --orange-ink: #c2470a;    /* AA orange for text on light backgrounds */
  --radius: 14px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 400 1rem/1.6 "Inter", "Inter Fallback", system-ui, sans-serif;
  font-optical-sizing: auto;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: white; padding: .75rem 1rem; border-radius: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

h1, h2, h3 { margin-top: 0; font-weight: 600; color: var(--ink); text-wrap: balance; }
p, li { text-wrap: pretty; }
h1 { margin-bottom: 1.25rem; font-size: clamp(2.5rem, 5vw, 4.25rem); line-height: 1.03; letter-spacing: -.042em; }
h1 span { color: var(--soft); }
h2 { margin-bottom: 1rem; font-size: clamp(1.9rem, 3.4vw, 2.85rem); line-height: 1.08; letter-spacing: -.034em; }
h3 { letter-spacing: -.012em; }

.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section-inner, .hero-inner, .footer-inner { width: min(calc(100% - 2.5rem), var(--max)); margin: 0 auto; }
.kicker, .eyebrow { margin: 0 0 1rem; color: var(--orange-ink); font-size: .9rem; font-weight: 600; letter-spacing: -.005em; }
.lead { margin: 0; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.18rem); line-height: 1.6; max-width: 60ch; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.86); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.nav { width: min(calc(100% - 2.5rem), var(--max)); min-height: 68px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: auto; }
.brand-dmbc { width: 160px; }
.nav-links { display: flex; align-items: center; gap: .25rem; }
.nav-links a { padding: .5rem .8rem; border-radius: 8px; color: var(--muted); font-size: .94rem; font-weight: 500; text-decoration: none; transition: color .15s ease, background-color .15s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a:hover { background: var(--subtle); }
.nav-links .nav-cta { margin-left: .5rem; color: white; background: var(--navy); }
.nav-links .nav-cta:hover { color: white; background: var(--navy-hover); }
.menu-button { display: none; border: 1px solid var(--line); border-radius: 8px; background: white; padding: .45rem .8rem; color: var(--ink); font-weight: 500; font-size: .94rem; cursor: pointer; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .65rem 1.1rem; border-radius: 10px; border: 1px solid transparent; background: var(--navy); color: white; font-weight: 550; font-size: .97rem; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.button:hover { background: var(--navy-hover); }
.button-primary { background: var(--navy); color: white; }
.button-secondary { background: white; color: var(--ink); border-color: var(--line-strong); }
.button-secondary:hover { background: var(--subtle); border-color: #c3c9d3; }
.button[disabled] { opacity: .6; cursor: progress; }

/* Home hero */
.hero { padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3.5rem, 7vw, 5.5rem); }
.hero .hero-inner { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
.hero-copy { margin: 0; max-width: 54ch; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.6; }
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-media { margin: 0; position: relative; border-radius: 20px; overflow: hidden; background: var(--subtle); box-shadow: 0 1px 2px rgba(15,27,45,.06), 0 24px 48px -24px rgba(15,27,45,.28); }
.hero-media img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 35%; }
.hero-media figcaption { position: absolute; left: .9rem; bottom: .9rem; right: .9rem; display: flex; }
.hero-media figcaption span { padding: .4rem .7rem; border-radius: 8px; background: rgba(255,255,255,.92); color: var(--ink); font-size: .82rem; font-weight: 500; line-height: 1.35; backdrop-filter: blur(6px); }

/* Mission */
.mission { border-top: 1px solid var(--line); }
.section-head { max-width: 780px; margin-bottom: 2.5rem; }
.section-head h2 { max-width: 20ch; }
.mission-statement { margin: 0 0 3.5rem; max-width: 40ch; color: var(--ink); font-size: clamp(1.3rem, 2.2vw, 1.75rem); font-weight: 500; line-height: 1.4; letter-spacing: -.02em; }
.mission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.mission-card { padding-top: 1.25rem; border-top: 1px solid var(--line-strong); }
.mission-card::before { content: ""; display: block; width: 28px; height: 2px; margin: -1.32rem 0 1.25rem; background: var(--orange); }
.mission-card h3 { margin: 0 0 .5rem; font-size: 1.08rem; }
.mission-card p { margin: 0; color: var(--muted); font-size: .97rem; }

/* News */
.news { background: var(--subtle); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.news-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 2.25rem; }
.news-head h2 { margin: 0; }
.follow-links { display: flex; gap: .5rem; flex-wrap: wrap; flex-shrink: 0; }
.follow-link { display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: .45rem .9rem; border: 1px solid var(--line-strong); border-radius: 999px; background: white; color: var(--ink); font-size: .9rem; font-weight: 500; text-decoration: none; transition: border-color .15s ease, background-color .15s ease; }
.follow-link svg { width: 17px; height: 17px; }
.follow-link:hover { border-color: #b9c0cb; }

.story-feature { display: grid; grid-template-columns: 1.1fr 1fr; background: white; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.story-media { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr auto; gap: 6px; padding: 6px; background: white; }
.g-item { position: relative; display: block; overflow: hidden; border-radius: 12px; background: var(--subtle); cursor: zoom-in; }
.g-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.g-item:hover img { transform: scale(1.025); }
.g-item:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.g-item[hidden] { display: none; }
.g-cover { grid-column: 1 / -1; border-radius: 14px; }
.g-cover img { aspect-ratio: auto; min-height: 100%; }
.g-badge { position: absolute; left: .75rem; bottom: .75rem; display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .65rem; border-radius: 8px; background: rgba(255,255,255,.92); color: var(--ink); font-size: .8rem; font-weight: 550; backdrop-filter: blur(6px); }
.g-badge svg { width: 15px; height: 15px; }
.g-more-label { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(11,27,46,.55); color: white; font-size: 1.35rem; font-weight: 600; transition: background-color .2s ease; }
.g-more:hover .g-more-label { background: rgba(11,27,46,.42); }

.story-body { padding: clamp(1.6rem, 3.4vw, 2.6rem); display: flex; flex-direction: column; }
.story-meta { list-style: none; margin: 0 0 .9rem; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; color: var(--muted); font-size: .86rem; font-variant-numeric: tabular-nums; }
.story-meta .tag { color: var(--orange-ink); font-weight: 600; }
.story-feature h3 { margin: 0 0 .9rem; font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.2; letter-spacing: -.026em; }
.story-feature p { margin: 0 0 1rem; color: var(--muted); }
.story-subhead { margin: .5rem 0 .4rem !important; color: var(--ink) !important; font-size: .9rem; font-weight: 600; }
.poster-list { margin: 0 0 1.25rem; padding: 0; list-style: none; counter-reset: poster; border-top: 1px solid var(--line); }
.poster-list li { counter-increment: poster; display: grid; grid-template-columns: 1.4rem 1fr; gap: .5rem; padding: .7rem 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: .94rem; line-height: 1.45; }
.poster-list li::before { content: counter(poster); color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.story-thanks { font-size: .9rem; }
.story-actions { margin-top: auto; padding-top: .75rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; }
.story-source, .story-cta { min-height: 44px; display: inline-flex; align-items: center; gap: .3rem; color: var(--ink); font-size: .92rem; font-weight: 500; text-decoration: none; }
.story-source { color: var(--muted); }
.story-source::after { content: "↗"; font-size: .85em; color: var(--soft); }
.story-source:hover, .story-cta:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .25rem; text-decoration-thickness: 1px; }

.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.story-card { display: grid; grid-template-columns: 190px 1fr; background: white; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.story-thumb { display: flex; align-items: center; justify-content: center; padding: 1.1rem; background: var(--thumb-bg, #f1ece2); }
.story-thumb .g-item { width: 100%; border-radius: 6px; background: transparent; box-shadow: 0 8px 20px -8px rgba(15,27,45,.35); }
.story-thumb .g-item img { aspect-ratio: auto; height: auto; }
.story-card-body { padding: 1.4rem 1.5rem; display: flex; flex-direction: column; }
.story-card h3 { margin: 0 0 .5rem; font-size: 1.12rem; line-height: 1.3; }
.story-card p { margin: 0 0 .5rem; color: var(--muted); font-size: .94rem; }

/* Contact */
.contact-wrap { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 7vw, 6rem); align-items: start; }
.contact-details h2 { max-width: 14ch; }
.contact-email { margin-top: 1.5rem; color: var(--muted); }
.contact-details a { color: var(--ink); font-weight: 550; text-decoration-color: var(--line-strong); text-underline-offset: .25rem; }
.contact-details a:hover { text-decoration-color: var(--ink); }
.contact-form { background: white; border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.4rem, 4vw, 2.25rem); box-shadow: 0 1px 2px rgba(15,27,45,.04), 0 20px 40px -28px rgba(15,27,45,.25); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1rem; }
label { display: block; margin-bottom: .4rem; color: var(--ink); font-size: .9rem; font-weight: 500; }
input, textarea { width: 100%; padding: .7rem .85rem; border: 1px solid var(--line-strong); border-radius: 10px; background: white; color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease; }
input:hover, textarea:hover { border-color: #bfc6d1; }
input:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11,35,65,.12); }
textarea { resize: vertical; min-height: 150px; }
.contact-form .button { width: 100%; }
.form-status { min-height: 1.5rem; margin: .85rem 0 0; font-size: .9rem; font-weight: 500; }
.form-status.success { color: #176b4d; }
.form-status.error { color: #a32d20; }
.hp-field { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }

/* Team page and 404 */
.team-hero { padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.team-hero h1 { margin-bottom: 0; }
.team-hero .hero-copy { margin-top: 1.25rem; }
.team-page { padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.group + .group { margin-top: 4rem; }
.group-head { padding-bottom: .9rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.group-head .kicker { margin: 0; color: var(--ink); font-size: 1.05rem; font-weight: 600; line-height: 1.3; }
.leadership-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.person { display: grid; grid-template-columns: 88px 1fr; gap: 1rem; align-items: start; padding: 1.1rem; background: white; border: 1px solid var(--line); border-radius: 16px; transition: border-color .15s ease; }
.person:hover { border-color: var(--line-strong); }
.portrait { aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: var(--subtle); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { margin: .1rem 0 .2rem; font-size: 1.02rem; }
.role { margin: 0; color: var(--orange-ink); font-size: .86rem; font-weight: 550; line-height: 1.4; }
.bio { margin: .45rem 0 0; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.bio span { display: block; }
.bio span + span { margin-top: .15rem; }
.person-linkedin { display: inline-flex; align-items: center; gap: .4rem; margin-top: .75rem; min-height: 32px; padding: .25rem .65rem .25rem .5rem; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: .8rem; font-weight: 500; text-decoration: none; transition: border-color .15s ease, background-color .15s ease; }
.person-linkedin svg { width: 14px; height: 14px; fill: #0a66c2; }
.person-linkedin:hover { background: var(--subtle); border-color: var(--line-strong); }
.team-cta { margin-top: 5rem; padding: clamp(1.75rem, 4vw, 2.75rem); display: flex; justify-content: space-between; align-items: center; gap: 2rem; background: var(--subtle); border: 1px solid var(--line); border-radius: 20px; }
.team-cta h2 { margin: 0; font-size: clamp(1.5rem, 2.8vw, 2.1rem); }

/* Footer */
footer { padding: 2.25rem 0; border-top: 1px solid var(--line); background: white; color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }
footer p { margin: 0; }
footer strong { color: var(--ink); font-weight: 600; }
.footer-note { margin-top: .35rem !important; max-width: 64ch; font-size: .82rem; }
.socials { display: flex; gap: .5rem; }
.social-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); transition: color .15s ease, border-color .15s ease; }
.social-icon:hover { color: var(--ink); border-color: var(--line-strong); }
.social-icon svg { width: 18px; height: 18px; fill: currentColor; }
.instagram-icon svg { fill: none; stroke: currentColor; stroke-width: 1.9; }
.instagram-icon .instagram-dot { fill: currentColor; stroke: none; }

/* Photo viewer */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8,14,24,.96); color: white; overflow: hidden; }
.lightbox::backdrop { background: rgba(8,14,24,.9); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr; }
.lightbox-bar { display: flex; align-items: center; gap: 1rem; padding: .75rem 1rem .75rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.lightbox-title { margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lightbox-count { margin: 0; color: #b4bdca; font-size: .9rem; font-variant-numeric: tabular-nums; }
.lightbox-figure { margin: 0; min-height: 0; display: grid; grid-template-rows: 1fr auto; padding: 1rem 4.5rem 1.25rem; }
.lightbox-img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.lightbox-caption { max-width: 70ch; margin: 0 auto; padding-top: .9rem; color: #d7dde6; text-align: center; line-height: 1.5; }
.lightbox-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: rgba(255,255,255,.08); color: white; cursor: pointer; transition: background-color .15s ease; }
.lightbox-btn:hover { background: rgba(255,255,255,.18); }
.lightbox-btn:focus-visible { outline: 2px solid white; outline-offset: 2px; }
.lightbox-btn svg { width: 20px; height: 20px; }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-btn[hidden] { display: none; }
body.lightbox-open { overflow: hidden; }

/* Responsive */
@media (max-width: 980px) {
  .hero .hero-inner { grid-template-columns: 1fr; }
  .story-feature, .story-grid { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
  .leadership-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .menu-button { display: inline-flex; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: .15rem; padding: .75rem 1rem 1rem; background: white; border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px -12px rgba(15,27,45,.18); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-6px); transition: opacity .18s ease, transform .18s ease, visibility .18s ease; }
  .nav-links.open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
  .nav-links a { padding: .7rem .75rem; }
  .nav-links .nav-cta { margin: .35rem 0 0; text-align: center; }
  .brand-dmbc { width: 140px; }
  .mission-grid, .field-row, .leadership-grid { grid-template-columns: 1fr; }
  .news-head { flex-direction: column; align-items: flex-start; }
  .story-card { grid-template-columns: 130px 1fr; }
  .story-thumb { padding: .6rem; }
  .story-card-body { padding: 1.1rem; }
  .team-cta, .footer-inner { flex-direction: column; align-items: flex-start; }
  .lightbox-figure { padding: .75rem .5rem 4.5rem; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 1rem; transform: none; }
}
@media (max-width: 420px) {
  .story-card { grid-template-columns: 1fr; }
  .story-thumb { padding: 1.25rem 3.5rem; }
  .hero-actions .button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .g-item:hover img { transform: none; }
}
