/* --- header ---------------------------------------------------------------- */
.header {
  /* Translucent so content scrolling under it stays faintly visible, with an
     opaque fallback for browsers without backdrop-filter. */
  background: var(--color-surface);
  background: rgb(255 255 255 / 88%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  /* The brand cyan as a rule, never as text — it measures 1.9:1 on white. */
  box-shadow: inset 0 -3px 0 var(--color-highlight);
  position: sticky;
  top: 0;
  z-index: 20;
}

.headerInner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: 72px;
  padding-block: var(--space-3);
  /* Anchors the mobile menu panel, which is absolutely positioned. */
  position: relative;
}

.brand { text-decoration: none; display: block; flex-shrink: 0; }
.brand:hover .logo { opacity: 0.75; }

/* A 13.4:1 lockup — tall enough to read the descriptor, short enough for a bar. */
.logo {
  display: block;
  height: 34px;
  width: auto;
  max-width: 100%;
  transition: opacity 120ms ease;
}

/* --- institutions band ------------------------------------------------------ */
.institutions {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-7);
  text-align: center;
}

.institutionsHeading {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-subtle);
  margin-bottom: var(--space-5);
}

/*
  Contained, never cropped, and left on a light ground: these are other
  institutions' marks and are not ours to recolour.
*/
.trilogo {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  margin-inline: auto;
}

/* --- footer ------------------------------------------------------------------ */
.footer {
  background: var(--carisca-navy);
  color: #dbe4f5;
  padding-block: var(--space-7) var(--space-4);
}

.footerInner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
}

.footerBrand { display: flex; flex-direction: column; }

/*
  The mark is black on transparency, so it reverses cleanly to white and needs
  no second asset. Decorative here — the address beneath already names us.
*/
.footerLogo {
  display: block;
  height: 30px;
  width: auto;
  max-width: 100%;
  filter: brightness(0) invert(1);
  margin-bottom: var(--space-3);
}

.footerTagline {
  font-weight: 600;
  color: #fff;
  font-size: var(--text-base);
  margin-bottom: var(--space-3);
}

.footerMeta {
  font-size: var(--text-sm);
  color: #b3c3e0;
  font-style: normal;
  line-height: 1.7;
}

.footerLinks {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-base);
}
.footerLinks a { color: #dbe4f5; text-decoration: none; }
.footerLinks a:hover { color: #fff; text-decoration: underline; }

.footerHeading {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #93a9d4;
  margin-bottom: var(--space-1);
}

.footerBottom {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid rgb(255 255 255 / 12%);
  font-size: var(--text-sm);
  color: #93a9d4;
}

/* --- responsive --------------------------------------------------------------- */
@media (max-width: 900px) {
  .footerInner { grid-template-columns: 1fr 1fr; }
  .footerBrand { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  /*
    Cropped to the wordmark rather than scaled whole: the full lockup at phone
    width puts the descriptor line around five pixels tall. 4.6:1 is where
    "CARISCA" ends in the artwork.
  */
  .logo {
    height: 28px;
    width: 130px;
    object-fit: cover;
    object-position: left center;
  }
  .headerInner { min-height: 64px; gap: var(--space-3); }
}

@media (max-width: 560px) {
  .footerInner { grid-template-columns: 1fr; gap: var(--space-5); }
  .institutions { padding-block: var(--space-6); }
}
