/* ==========================================================================
   Ulemavu Research Institute — Core Styles
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-slate);
  background: var(--color-white);
}

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

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-link-hover); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-ink);
  line-height: 1.15;
  margin: 0 0 var(--space-sm);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { max-width: var(--measure); margin: 0 0 var(--space-sm); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ---- Focus visibility (never remove this) ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -60px;
  background: var(--color-ink);
  color: var(--color-white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--transition);
}
.skip-link:focus { top: var(--space-sm); }

/* ---- Eyebrow label ---- */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-amber-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: var(--space-xs);
}

/* ---- Signature motif: braille-cell dot cluster ---- */
.dot-cluster {
  display: inline-grid;
  grid-template-columns: repeat(2, 6px);
  grid-auto-rows: 6px;
  gap: 4px;
  flex: none;
}
.dot-cluster span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.dot-cluster.pattern-full span { opacity: 1; }
/* a partially-filled cell used decoratively (2x3 grid, 6 dots) */
.dot-cluster.six { grid-template-rows: repeat(3, 6px); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--color-amber-dark);
  color: var(--color-white);
}
.btn-primary:hover { background: #A11119; color: var(--color-white); }

.btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.55);
  color: var(--color-white);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); color: var(--color-white); }

.btn-outline {
  background: transparent;
  border-color: var(--color-ink);
  color: var(--color-ink);
}
.btn-outline:hover { background: var(--color-ink); color: var(--color-white); }

/* ---- Top utility bar ---- */
.utility-bar {
  background: var(--color-teal);
  color: var(--color-ink);
  font-size: 0.875rem;
}
.utility-contact li i { color: var(--color-ink); }
.utility-bar .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}
.utility-contact {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
}
.utility-contact li { display: flex; align-items: center; gap: 0.5rem; }
.utility-contact a { color: inherit; }
.utility-contact a:hover { text-decoration: underline; }

.utility-social {
  list-style: none;
  display: flex;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
}
.utility-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(11,12,17,0.12);
  color: var(--color-ink);
}
.utility-social a:hover { background: var(--color-ink); color: var(--color-white); }

/* ---- Primary navigation ---- */
.site-header { position: sticky; top: 0; z-index: 100; }

.main-nav {
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}
.main-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand img { height: 48px; width: auto; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--color-ink);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  display: block;
  width: 20px; height: 2px;
  background: var(--color-ink);
  position: relative;
  transition: transform var(--transition);
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--color-ink);
  font-weight: 600;
  padding: 0.5rem 0.25rem;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-amber-dark);
  border-bottom-color: var(--color-amber);
  text-decoration: none;
}

.nav-a11y-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-sand);
  border: 2px solid var(--color-border);
  color: var(--color-ink);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  min-height: 44px;
}
.nav-a11y-btn:hover { background: var(--color-amber); border-color: var(--color-amber); }

/* ---- Hero slider ---- */
.hero {
  position: relative;
  background: var(--color-ink);
  color: var(--color-white);
  overflow: hidden;
}
.hero-slides {
  position: relative;
  min-height: 620px;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease;
  display: flex;
  align-items: center;
  padding-bottom: 140px; /* keeps headline text clear of the overlay actions bar below */
}
.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,12,17,0.82) 0%, rgba(11,12,17,0.55) 45%, rgba(11,12,17,0.92) 100%);
}
.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  position: relative;
}
.hero-slide .container {
  position: relative;
  z-index: 2;
  max-width: 780px;
}
.hero-slide h1 { color: var(--color-white); margin-bottom: var(--space-sm); }
.hero-slide .eyebrow { color: var(--color-amber-light); }
.hero-slide p.lede {
  color: rgba(255,255,255,0.9);
  font-size: 1.2rem;
  max-width: 60ch;
}

.hero-arrow {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  background: rgba(11,12,17,0.4);
  color: var(--color-white);
  font-size: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.hero-arrow:hover { background: var(--color-amber-dark); border-color: var(--color-amber-dark); }
.hero-arrow-prev { left: var(--space-md); }
.hero-arrow-next { right: var(--space-md); }
@media (max-width: 640px) {
  .hero-arrow { display: none; }
}

/* Overlay bar: pagination + CTAs sit directly on top of the slide image, bottom-pinned */
.hero-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 4;
  padding: var(--space-md) 0 var(--space-lg);
}
.hero-pagination {
  display: flex;
  gap: 0.6rem;
  margin-bottom: var(--space-sm);
}
.hero-pagination button {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.hero-pagination button[aria-selected="true"] { background: var(--color-amber); border-color: var(--color-amber); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}
.hero-dots {
  color: var(--color-amber);
  opacity: 0.8;
  transform: scale(1.6);
  margin-right: var(--space-sm);
}
.hero-dots span { background: var(--color-amber); }
@media (max-width: 640px) {
  .hero-dots { display: none; }
}

/* ---- Sections ---- */
.section { padding: var(--space-2xl) 0; }
.section-alt { background: var(--color-sand); }
.section-head { max-width: 62ch; margin-bottom: var(--space-lg); }

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-lg);
  align-items: center;
}

/* ---- Feature / work cards ---- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.work-card {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.work-card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.work-card:hover { text-decoration: none; }
.work-card-body { padding: var(--space-md); }
.work-card-body h3 { margin-bottom: 0.35rem; }
.work-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--color-amber-dark);
}

/* ---- Testimonial ---- */
.testimonial-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-lg);
  max-width: 720px;
}
.testimonial-card img {
  width: 88px; height: 88px;
  border-radius: 50%;
  object-fit: cover;
}
.testimonial-card blockquote {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-ink);
  quotes: none;
}
.testimonial-card cite {
  font-style: normal;
  font-weight: 700;
  color: var(--color-ink);
  display: block;
}
.testimonial-card .role {
  color: var(--color-slate-mute);
  font-size: 0.9rem;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--color-ink);
  color: rgba(255,255,255,0.82);
  padding: var(--space-xl) 0 var(--space-md);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.footer-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: var(--space-sm); }
.footer-brand img { height: 40px; }
.footer-brand span {
  font-family: var(--font-display);
  color: var(--color-white);
  font-size: 1.1rem;
}
.site-footer h4 {
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}
.site-footer p { color: rgba(255,255,255,0.75); max-width: 42ch; }
.footer-links, .footer-contact {
  list-style: none;
  margin: 0; padding: 0;
}
.footer-links li, .footer-contact li { margin-bottom: 0.6rem; }
.footer-links a, .footer-contact a { color: rgba(255,255,255,0.82); }
.footer-links a:hover, .footer-contact a:hover { color: var(--color-amber); }
.footer-contact li { display: flex; gap: 0.6rem; align-items: flex-start; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
}
.footer-social { list-style: none; display: flex; gap: 0.6rem; margin: 0; padding: 0; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: var(--color-white);
}
.footer-social a:hover { background: var(--color-amber); color: var(--color-ink); }

/* ---- Interior page header band ---- */
.page-header {
  background: linear-gradient(150deg, var(--color-ink) 0%, var(--color-ink-80) 100%);
  color: var(--color-white);
  padding: var(--space-xl) 0 var(--space-lg);
}
.page-header .eyebrow { color: var(--color-amber-light); }
.page-header h1 { color: var(--color-white); margin-bottom: var(--space-xs); }
.page-header p { color: rgba(255,255,255,0.85); font-size: 1.1rem; max-width: 60ch; }

/* ---- Checklist (goals, features) ---- */
.checklist {
  list-style: none;
  margin: var(--space-sm) 0 0;
  padding: 0;
}
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  max-width: var(--measure);
}
.checklist li .check-icon {
  flex: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--color-amber);
  color: var(--color-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-top: 0.15rem;
}

/* ---- Team / board grid ---- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}
.team-card {
  text-align: center;
  padding-bottom: var(--space-md);
}
.team-card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}
.team-card h3 { font-size: 1.15rem; margin: var(--space-sm) 0 0.15rem; }
.team-card .role { color: var(--color-slate-mute); font-size: 0.9rem; margin-bottom: 0.6rem; }
.team-social {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 0; padding: 0;
}
.team-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--color-sand);
  color: var(--color-ink);
}
.team-social a:hover { background: var(--color-amber); color: var(--color-white); }

/* ---- Icon / value cards (vision, mission, etc.) ---- */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
}
.icon-card {
  padding: var(--space-md);
  display: flex;
  gap: var(--space-sm);
}
.icon-card .icon-badge {
  flex: none;
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: var(--color-sand);
  color: var(--color-amber);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}
.icon-card h3 { font-size: 1.1rem; letter-spacing: 0.04em; margin-bottom: 0.35rem; }
.icon-card p { margin: 0; }

/* ---- Alternating image/text service rows ---- */
.service-row { padding: var(--space-lg) 0; scroll-margin-top: 110px; }
.service-row:not(:last-child) { border-bottom: 1px solid var(--color-border); }
.service-row .grid-2 { align-items: start; }
.service-row .grid-2.reverse > *:first-child { order: 2; }
.service-row .grid-2.reverse > *:last-child { order: 1; }
.service-row img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.service-row h3 { margin-bottom: var(--space-xs); }
.service-row h4 { font-size: 1.05rem; margin: var(--space-sm) 0 0.35rem; }

@media (max-width: 900px) {
  .service-row .grid-2.reverse > *:first-child,
  .service-row .grid-2.reverse > *:last-child { order: initial; }
}

/* ---- In-page quick nav (jump links) ---- */
.quick-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
}
.quick-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: var(--color-sand);
  color: var(--color-ink);
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid transparent;
}
.quick-nav a:hover {
  background: var(--color-white);
  border-color: var(--color-amber);
  color: var(--color-amber);
  text-decoration: none;
}

/* ---- Resource / publication cards ---- */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
}
.resource-card { display: flex; flex-direction: column; }
.resource-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.resource-card-body { padding: var(--space-md); display: flex; flex-direction: column; flex: 1; }
.resource-date {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-slate-mute);
  margin-bottom: 0.5rem;
}
.resource-card h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.resource-card p { flex: 1; }
.resource-card .btn { align-self: flex-start; margin-top: var(--space-sm); }

/* ---- Contact page ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}
.contact-form { padding: var(--space-lg); }
.form-group { margin-bottom: var(--space-md); }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--color-ink);
}
.required-mark { color: var(--color-amber-dark); }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.form-group input,
.form-group textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--color-slate);
  background: var(--color-white);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-group input:focus,
.form-group textarea:focus { border-color: var(--color-teal-dark); }
.form-group.has-error input,
.form-group.has-error textarea { border-color: var(--color-amber); }
.field-error {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-amber-dark);
  font-size: 0.875rem;
  margin-top: 0.4rem;
  font-weight: 600;
}

.form-status {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
  font-weight: 600;
}
.form-status.success { background: #E5F5EC; color: #146C3A; border: 2px solid #146C3A; }
.form-status.error { background: #FDEBEC; color: #A3121A; border: 2px solid #A3121A; }

.map-frame {
  width: 100%;
  aspect-ratio: 4/3;
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.contact-details {
  list-style: none;
  margin: var(--space-md) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-sm);
}
.contact-details li {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  padding: var(--space-sm);
  background: var(--color-sand);
  border-radius: var(--radius-md);
}
.contact-details .icon-badge {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-amber);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.contact-details p { margin: 0; font-weight: 700; color: var(--color-ink); font-size: 0.9rem; }
.contact-details span, .contact-details a { color: var(--color-slate); }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---- Breadcrumb (interior pages) ---- */
.breadcrumb {
  margin-bottom: var(--space-sm);
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
}
.breadcrumb a { color: rgba(255,255,255,0.75); }
.breadcrumb a:hover { color: var(--color-white); }
.breadcrumb li[aria-current="page"] { color: var(--color-white); font-weight: 600; }
.breadcrumb .sep { color: rgba(255,255,255,0.45); }

/* ---- Trust / accessibility badges (footer) ---- */
.trust-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: var(--space-sm) 0 0;
  padding: 0;
}
.trust-badges li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
}
.trust-badges li i { color: var(--color-amber-light); }

/* ---- Testimonials scroller ---- */
.testimonials-scroller {
  position: relative;
}
.testimonials-track {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--space-md);
  padding-bottom: var(--space-sm);
  -webkit-overflow-scrolling: touch;
}
.testimonials-track .testimonial-card {
  scroll-snap-align: start;
  flex: 0 0 min(560px, 88%);
}
.testimonials-nav {
  display: flex;
  gap: 0.6rem;
  margin-top: var(--space-sm);
}
.testimonials-nav button {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.testimonials-nav button:hover { border-color: var(--color-amber-dark); color: var(--color-amber-dark); }

.clearfix::after { content: ""; display: table; clear: both; }
