/* OxCAIRES custom styles on top of Pico.css */

:root {
  --brand: #002147; /* Oxford Blue */
  --brand-accent: #002147; /* unified Oxford Blue */
}

body {
  background: none;
}

/* Use a composited fixed pseudo-element for the background to reduce repaint on scroll */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(180deg, rgba(248, 251, 255, 0.4), rgba(255, 255, 255, 0.55)), url('../img/Whisk_2c86d9f2a5.jpeg');
  background-size: 100% 100%, cover;
  background-position: center top, center center;
  background-repeat: no-repeat, no-repeat;
  will-change: transform;
  transform: translateZ(0);
}

/* Force light theme and improve base text contrast */
html { color-scheme: light; }
p, li, dd, dt { color: #111; }
small { color: #333; }

.site-header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

/* Brand sizing: slightly larger logo and wordmark */
.brand img { width: 36px; height: 36px; object-fit: contain; }
.brand span { font-size: 1.2rem; line-height: 1; }

@media (min-width: 768px) {
  .brand img { width: 40px; height: 40px; }
  .brand span { font-size: 1.28rem; }
}

/* Hide header brand logo on homepage to avoid duplicate with hero logo */
body.home .site-header .brand img { display: none; }

.menu {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
  margin: 0;
}

.menu a { color: var(--brand); }

/* Global link colour in content */
a { color: var(--brand); }
a:hover { color: var(--brand); opacity: 0.9; }

.menu a[aria-current="page"] {
  color: var(--brand);
  font-weight: 600;
}

.nav-toggle {
  display: none;
}

/* Mobile navigation */
@media (max-width: 768px) {
  .site-header .nav { position: relative; }
  .nav-toggle { display: inline-flex; }
  .menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 1000;
    max-height: 60vh;
    overflow-y: auto;
  }
  .menu li { margin: 0; }
  .menu a { display: block; padding: 0.6rem 0.75rem; border-radius: 0.375rem; }
  .menu a:hover, .menu a:focus { background: rgba(0,0,0,0.04); }
  .menu[data-open="true"] { display: flex; }
}

.hero {
  padding: 3rem 0 2rem 0;
}

.hero .lead {
  font-size: 1.25rem;
  max-width: 60ch;
}

.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Hero brand composition */
.hero-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
}
.hero-logo {
  width: 180px;
  height: 180px;
  object-fit: contain;
  transform: translateY(-6px);
}
@media (min-width: 768px) {
  .hero-logo { width: 260px; height: 260px; transform: translateY(-10px); }
}

/* (removed trifecta styles) */

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 2rem;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
}
.social-links a:hover {
  background: rgba(0, 33, 71, 0.04);
  border-color: rgba(0, 33, 71, 0.16);
}
.social-links .social-icon {
  display: block;
  width: 22px;
  height: 22px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 999;
}

/* People cards */
.person figure {
  display: grid;
  gap: 0.5rem;
}

.person img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 0.5rem;
}

/* Fine-tune headroom for specific images */
.person img.align-top {
  object-position: center top;
}

.person h3 {
  margin-bottom: 0.25rem;
}

/* Members section */
.filters {
  margin: 0.5rem 0 1rem 0;
}
.filters .search-row {
  margin-bottom: 0.5rem;
}
.filters .grid {
  align-items: end;
}
/* Make search full-width across grid row */
.filters #filter-search {
  width: 100%;
}

.chips-group {
  border: none;
  padding: 0;
  margin: 0;
}
.chips-group legend {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chip {
  appearance: none;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  color: #002147;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.9rem;
  line-height: 1.2;
  cursor: pointer;
}
.chip[aria-pressed="true"] {
  background: rgba(0, 33, 71, 0.08);
  border-color: rgba(0, 33, 71, 0.25);
  color: #002147;
}

.members {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.member figure {
  display: grid;
  gap: 0.5rem;
}
.member img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0.5rem;
  transition: opacity 220ms ease, filter 220ms ease;
}
.member h3 {
  margin-bottom: 0.25rem;
}

/* Expandable member details */
.member {
  position: relative;
  padding: 0.5rem;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 180ms ease, transform 180ms ease;
  overflow: hidden;
}
.member:hover, .member:focus-within, .member.expanded {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.member .details {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.96) 24%, #ffffff 60%);
  padding: 0.5rem 0.75rem 0.75rem 0.75rem;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}
.member.expanded .details, .member:hover .details, .member:focus-within .details {
  transform: translateY(0%);
  opacity: 1;
}
.member .details p {
  margin: 0.25rem 0 0.25rem 0;
}

/* Fade avatar on hover/expand for focus on details */
.member:hover img, .member:focus-within img, .member.expanded img {
  opacity: 0.55;
  filter: saturate(0.9);
}


