/* BSRHI website styles
   Brand: black + periwinkle from the BSRHI logo, with a deep navy for text. */

:root {
  --navy: #15233f;          /* headings, footer text */
  --ink: #2a3550;           /* body text */
  --muted: #5a6680;         /* secondary text (4.5:1+ on white) */
  --blue: #2f4f9e;          /* links, buttons (7:1 on white) */
  --blue-dark: #233c7a;
  --peri: #8fa9dc;          /* logo periwinkle: decoration only */
  --peri-soft: #c9d6f0;
  --mist: #eef2fa;          /* tinted sections */
  --line: #d6deee;
  --white: #ffffff;

  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
  --section: clamp(56px, 8vw, 104px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font);
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .5em; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
address { font-style: normal; margin-bottom: 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.tint { background: var(--mist); }
.h-light { font-weight: 300; font-size: clamp(2rem, 3.6vw, 2.75rem); letter-spacing: -.01em; }
.lead { font-size: 1.2rem; color: var(--navy); }
.narrow { max-width: 62ch; }

[id] { scroll-margin-top: 96px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.brand img { width: 200px; height: auto; }
.site-nav ul { list-style: none; display: flex; gap: clamp(16px, 2.4vw, 36px); margin: 0; padding: 0; }
.site-nav a { color: var(--blue); text-decoration: none; font-size: 1.08rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-color: var(--peri); }
.site-nav a[aria-current="page"] { color: var(--navy); font-weight: 600; border-color: var(--blue); }
.menu-btn { display: none; }

@media (max-width: 900px) {
  .header-inner { min-height: 68px; }
  .brand img { width: 150px; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
    background: none; border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--navy); font: 600 1rem var(--font); cursor: pointer;
  }
  .menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
  .menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
  .menu-bars::before { top: -6px; } .menu-bars::after { top: 6px; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(21, 35, 63, .08); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .site-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-color: var(--line); }
}

/* ---------- hero (signature: translucent diagonal shapes in brand blues) ---------- */
.hero, .page-hero { position: relative; overflow: hidden; background: var(--navy); color: #fff; isolation: isolate; }
.hero { min-height: clamp(520px, 78vh, 760px); display: flex; align-items: center; }
.page-hero { min-height: clamp(300px, 40vh, 420px); display: flex; align-items: flex-end; }
.hero-img, .page-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.shapes { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.shapes::before, .shapes::after { content: ""; position: absolute; inset: 0; }
.shapes::before {
  background: rgba(21, 35, 63, .78);
  clip-path: polygon(0 0, 52% 0, 30% 100%, 0 100%);
}
.shapes::after {
  background: linear-gradient(160deg, rgba(143, 169, 220, .55), rgba(47, 79, 158, .45));
  clip-path: polygon(30% 100%, 52% 0, 66% 0, 44% 100%);
  mix-blend-mode: multiply;
}
@media (min-width: 761px) {
  .hero-img { left: 42%; width: 58%; object-position: 6% 40%; }
  .hero .shapes::before { background: var(--navy); clip-path: polygon(0 0, 50% 0, 34% 100%, 0 100%); }
  .hero .shapes::after { clip-path: polygon(34% 100%, 50% 0, 62% 0, 46% 100%); }
  .hero-text > * { max-width: 500px; }
}
.hero-text { position: relative; width: 100%; padding-top: 48px; padding-bottom: 64px; }
.hero-text > * { max-width: 560px; }
.hero-kicker { font-weight: 700; font-size: 1.1rem; letter-spacing: .04em; color: #fff; margin-bottom: 12px; max-width: 21em !important; }
.hero-text, .page-hero-text { text-shadow: 0 1px 12px rgba(10, 18, 36, .55); }
.hero h1 { color: #fff; font-weight: 300; font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.12; margin-bottom: 32px; }
.page-hero-text { position: relative; width: 100%; padding-top: 40px; padding-bottom: 48px; }
.page-hero h1 { color: #fff; font-weight: 300; font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 8px; }
.page-hero p { max-width: 480px; font-size: 1.15rem; color: #e6ecf8; margin: 0; }
.page-hero .shapes::before { clip-path: polygon(0 0, 48% 0, 34% 100%, 0 100%); }
.page-hero .shapes::after { clip-path: polygon(34% 100%, 48% 0, 58% 0, 44% 100%); }

@media (max-width: 760px) {
  .shapes::before, .page-hero .shapes::before { clip-path: none; background: linear-gradient(180deg, rgba(21, 35, 63, .35) 0%, rgba(21, 35, 63, .88) 70%); }
  .shapes::after, .page-hero .shapes::after { clip-path: polygon(0 0, 38% 0, 0 46%); }
  .hero { align-items: flex-end; min-height: 560px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero .shapes::after { animation: slide-in 1.1s .1s cubic-bezier(.2, .7, .2, 1) backwards; }
  @keyframes slide-in { from { transform: translateX(-18%); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 26px;
  background: var(--blue); color: #fff; border: 0; border-radius: var(--radius);
  font: 600 1.05rem var(--font); text-decoration: none; cursor: pointer;
  transition: background-color .2s;
}
.btn:hover { background: var(--blue-dark); color: #fff; }
.btn svg { width: 20px; height: 20px; }
.btn-light { background: #fff; color: var(--blue); }
.btn-light:hover { background: var(--mist); color: var(--blue-dark); }
.more { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; }
.more svg { width: 16px; height: 16px; transition: transform .2s; }
.more:hover svg { transform: translateX(3px); }

/* ---------- impact band ---------- */
.band { background: linear-gradient(100deg, var(--blue-dark) 0%, var(--blue) 55%, #5b7cc6 100%); color: #fff; padding: clamp(48px, 6vw, 72px) 0; }
.band h2 { color: #fff; font-weight: 300; font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 28px; }
.band h2:has(+ .band-lead) { margin-bottom: 12px; }
.band-lead { max-width: 62ch; font-size: 1.15rem; color: #e6ecf8; margin: 0 0 28px; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stats li { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); border-radius: var(--radius); padding: 22px 20px; }
.stats strong { display: block; font-size: clamp(2.2rem, 3.6vw, 2.9rem); font-weight: 300; line-height: 1; margin-bottom: 10px; }
.stats span { color: #e3eafa; font-size: .98rem; }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }

/* ---------- layout pieces ---------- */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split p { max-width: 62ch; }
.framed { margin: 0; position: relative; }
.framed img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { margin: 0; }

/* research area tiles */
.areas { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.area { grid-column: span 3; background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; }
.area:nth-child(1), .area:nth-child(2) { grid-column: span 6; }
.area img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.area-text { padding: 20px 22px 24px; border-top: 4px solid var(--peri); }
.area-text p { margin: 0; color: var(--muted); }
.tint .area { border-color: transparent; }
@media (max-width: 900px) { .areas { grid-template-columns: 1fr 1fr; } .area, .area:nth-child(1), .area:nth-child(2) { grid-column: span 1; } }
@media (max-width: 560px) { .areas { grid-template-columns: 1fr; } }

/* activities */
.activities { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.activities li { background: var(--white); border-radius: var(--radius); padding: 26px 24px; border-top: 4px solid var(--blue); }
.activities p { margin: 0; color: var(--muted); }
@media (max-width: 960px) { .activities { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .activities { grid-template-columns: 1fr; } }

/* dated / labelled lists (publications, studies, news) */
[hidden] { display: none !important; }
.entry-body h3 a { color: inherit; text-decoration: none; }
.entry-body h3 a:hover { color: var(--blue); text-decoration: underline; }
.entries { list-style: none; margin: 0; padding: 0; }
.entry { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding: 28px 0; }
.entry + .entry { border-top: 1px solid var(--line); }
.entry-meta { align-self: start; display: flex; align-items: center; gap: 12px; margin: 4px 0 0; font-weight: 700; color: var(--navy); font-size: .95rem; }
.tick { flex: none; width: 34px; height: 10px; background: var(--navy); }
.study-meta { flex-direction: column; align-items: flex-start; gap: 16px; }
.study-meta p { display: flex; align-items: center; gap: 12px; margin: 0; }
.study-logo { width: 160px; height: auto; border-radius: 8px; background: var(--white); }
.study-logo[src$="maduo.png"] { width: 210px; }
.entry-body { border-left: 1px solid var(--line); padding-left: 40px; }
.entry-body h3 { font-size: 1.3rem; }
.entry-body p { margin-bottom: .6em; max-width: 75ch; }
.list-h { font-size: 1.25rem; color: var(--blue); font-weight: 700; margin: 36px 0 4px; }
.list-note { color: var(--muted); margin: 0 0 4px; }
.entry-body .full-title { color: var(--navy); font-style: italic; margin-bottom: .5em; }
@media (max-width: 760px) {
  .entry { grid-template-columns: 1fr; gap: 10px; }
  .study-logo { width: 120px; }
  .study-logo[src$="maduo.png"] { width: 170px; }
  .entry-body { border-left: 0; padding-left: 0; }
}

/* publication filters */
.filters { display: flex; flex-wrap: wrap; gap: 16px; margin: 24px 0 8px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.filters .field { margin-bottom: 0; }
.field.grow { flex: 1 1 280px; max-width: 520px; }
label { font-weight: 600; color: var(--navy); font-size: .98rem; }
.opt { font-weight: 400; color: var(--muted); }
input, select, textarea {
  font: 400 1rem var(--font); color: var(--ink); background: var(--white);
  border: 1px solid #aab5cc; border-radius: var(--radius); padding: 12px 14px; min-height: 48px; width: 100%;
}
select { min-width: 160px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.result-count { color: var(--muted); font-size: .95rem; margin: 12px 0 0; min-height: 1.5em; }

/* news */
.news-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { background: var(--white); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); }
.news-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.news-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card time { color: var(--muted); font-weight: 600; font-size: .92rem; }
.news-card h3 { margin: 0; }
.news-card p { margin: 0; color: var(--muted); }
.news-list-full { grid-template-columns: 1fr; gap: 0; }
.news-list-full .news-card { flex-direction: row; border: 0; border-radius: 0; padding: 28px 0; gap: 32px; }
.news-list-full .news-card + .news-card { border-top: 1px solid var(--line); }
.news-list-full .news-card img { width: 320px; flex: none; border-radius: var(--radius); }
.news-list-full .news-card .body { padding: 0; }
.news-empty { grid-column: 1 / -1; background: var(--white); border: 1px dashed #aab5cc; border-radius: var(--radius); padding: 32px; }
.news-empty p { margin: 0 0 12px; max-width: 60ch; }
.tint .news-empty { border-color: #aab5cc; }
@media (max-width: 900px) { .news-list { grid-template-columns: 1fr; } .news-list-full .news-card { flex-direction: column; } .news-list-full .news-card img { width: 100%; } }
.social-row { margin: 8px 0 24px; display: flex; flex-wrap: wrap; gap: 12px; }
.linkedin-feed { margin-top: 16px; min-height: 120px; }

/* partner logos */
.logos { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.logos li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); height: 120px; display: flex; align-items: center; justify-content: center; padding: 16px 20px; }
.logos img { max-height: 80px; max-width: 100%; object-fit: contain; }
@media (max-width: 560px) { .logos { grid-template-columns: repeat(2, 1fr); gap: 12px; } .logos li { height: 96px; padding: 12px; } }

/* on-page sub navigation */
.subnav { border-bottom: 1px solid var(--line); background: var(--white); }
.subnav .wrap { display: flex; gap: 28px; overflow-x: auto; }
.subnav a { padding: 16px 0; font-weight: 600; text-decoration: none; white-space: nowrap; }

/* team */
.team-group + .team-group { margin-top: clamp(48px, 6vw, 72px); }
.group-h { font-size: 1.05rem; font-weight: 700; color: var(--blue); padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 32px 24px; }
.people-lead { grid-template-columns: repeat(auto-fill, minmax(260px, 320px)); }
.person-photo { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--mist); margin-bottom: 14px; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.no-photo { width: 100%; height: 100%; background: var(--mist); }
.person h3 { font-size: 1.12rem; margin: 0 0 2px; }
.person p { margin: 0; color: var(--muted); }
.people-lead h3 { font-size: 1.35rem; }
@media (max-width: 560px) { .people, .people-lead { grid-template-columns: 1fr 1fr; gap: 24px 16px; } .person h3, .people-lead h3 { font-size: 1.02rem; } .person p { font-size: .92rem; } }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.contact-form { max-width: 620px; }
.contact-form textarea { resize: vertical; }
.contact-info { background: var(--mist); border-radius: var(--radius); padding: 32px; }
.contact-info .h-light { font-size: 1.8rem; }
.contact-info .h-light + address { font-size: 1.08rem; }
.contact-info .socials { margin-bottom: 8px; }
.hp { position: absolute; left: -9999px; }
.form-status { margin-top: 16px; font-weight: 600; min-height: 1.5em; }
.form-status.ok { color: #1d6b3a; }
.form-status.err { color: #a12525; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* socials */
.socials { display: flex; gap: 10px; }
.social { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--blue); color: #fff; }
.social:hover { background: var(--blue-dark); color: #fff; }
.social-soon, .social-soon:hover { background: var(--blue); cursor: default; }
.social svg { width: 22px; height: 22px; }

/* ---------- footer ---------- */
.site-footer { background: var(--mist); border-top: 4px solid var(--peri); padding-top: clamp(48px, 6vw, 72px); color: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1fr; gap: 40px; }
.footer-brand img { width: 190px; height: auto; margin-bottom: 16px; mix-blend-mode: multiply; }
.footer-brand p { max-width: 34ch; color: var(--muted); }
.footer-h { font-size: 1rem; font-weight: 700; margin-bottom: 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-base { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 20px; padding-bottom: 28px; color: var(--muted); font-size: .92rem; }
.footer-base p { margin: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
