/* ===========================================================================
   United Academics Foundation
  
   Contents
     1. Tokens
     2. Reset & base
     3. Layout helpers
     4. Header & navigation
     5. Buttons
     6. Hero
     7. Sections & cards
     8. Pull quote
     9. Prose & data lists
    10. Footer
    11. Print
   =========================================================================== */

/* --- 1. Tokens ---------------------------------------------------------- */

:root {
  /* Palette */
  --paper: #fcfbf8;
  --paper-deep: #f4f1ea;
  --ink: #16202b;
  --ink-soft: #52606d;
  --brand: #1f4e6b;
  --brand-deep: #12313f;
  --rule: #e4e0d8;

  /* Type */
  --font-sans: ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino,
    ui-serif, serif;

  /* Fluid type scale */
  --size-display: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem);
  --size-h1: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --size-h2: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --size-h3: 1.25rem;
  --size-lead: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);

  /* Space */
  --gutter: clamp(1.25rem, 0.5rem + 3vw, 2.5rem);
  --section-y: clamp(3.5rem, 2rem + 6vw, 6.5rem);

  /* Measure */
  --measure: 68ch;
  --shell: 72rem;
}

/* --- 2. Reset & base ---------------------------------------------------- */

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

body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
  color: var(--brand-deep);
}

h1 {
  font-size: var(--size-h1);
}
h2 {
  font-size: var(--size-h2);
}
h3 {
  font-size: var(--size-h3);
  letter-spacing: -0.005em;
}

h4 {
  font-size: 1.0625rem;
  letter-spacing: 0;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand-deep);
}

img,
svg {
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- 3. Layout helpers -------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.measure {
  max-width: var(--measure);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--brand-deep);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
  color: #fff;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.lead {
  font-size: var(--size-lead);
  line-height: 1.6;
  color: var(--ink-soft);
}

/* --- 4. Header & navigation --------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.125rem;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-decoration: none;
  color: inherit;
}

.brand__name {
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--brand-deep);
}

.brand__sub {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Header lockup carries the mission line instead of the legal form. */
.brand__tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.875rem;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  padding: 0;
}

.nav__link {
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--ink-soft);
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}

.nav__link:hover {
  color: var(--brand-deep);
}

.nav__link[aria-current="page"] {
  color: var(--brand-deep);
  font-weight: 600;
  border-bottom-color: var(--brand);
}

/* Mobile disclosure menu — <details>, so the site needs no JavaScript. */
.nav-toggle {
  position: relative;
}

.nav-toggle__summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--brand-deep);
  background: var(--paper);
}

.nav-toggle__summary::-webkit-details-marker {
  display: none;
}

.nav-toggle[open] .nav-toggle__summary {
  background: var(--paper-deep);
}

.nav-toggle__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.625rem);
  min-width: 14rem;
  padding: 0.5rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  box-shadow: 0 14px 34px rgb(18 49 63 / 0.12);
}

.nav-toggle__panel ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.nav-toggle__panel a {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9375rem;
}

.nav-toggle__panel a:hover {
  background: var(--paper-deep);
  color: var(--brand-deep);
}

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

@media (max-width: 47.99em) {
  .nav--desktop {
    display: none;
  }
}

@media (min-width: 48em) {
  .nav-toggle {
    display: none;
  }
}

/* --- 5. Buttons --------------------------------------------------------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

/* Buttons closing a passage of body copy need more air than a paragraph. */
.prose .actions {
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease;
}

.btn--primary {
  background: var(--brand-deep);
  color: #fff;
}

.btn--primary:hover {
  background: var(--brand);
  color: #fff;
}

.btn--ghost {
  border-color: var(--rule);
  color: var(--brand-deep);
}

.btn--ghost:hover {
  border-color: var(--brand);
  background: var(--paper-deep);
}

/* --- 6. Hero ------------------------------------------------------------ */

.hero {
  padding-block: clamp(3.5rem, 2rem + 7vw, 7rem);
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, var(--paper-deep), var(--paper));
}

.hero__title {
  font-size: var(--size-display);
  margin-block: 0.75rem 1.25rem;
  max-width: 18ch;
}

.hero__lead {
  max-width: 58ch;
  margin-bottom: 2rem;
}

/* Compact hero for interior pages. */
.hero--page {
  padding-block: clamp(2.75rem, 1.75rem + 4vw, 4.5rem);
}

.hero--page .hero__title {
  font-size: var(--size-h1);
  max-width: 22ch;
  margin-bottom: 1rem;
}

/* --- 7. Sections & cards ------------------------------------------------ */

.section {
  padding-block: var(--section-y);
}

.section--tint {
  background: var(--paper-deep);
  border-block: 1px solid var(--rule);
}

.section__head {
  max-width: var(--measure);
  margin-bottom: clamp(2rem, 1rem + 2.5vw, 3rem);
}

.section__head h2 {
  margin-block: 0.625rem 0.875rem;
}

/* No trailing gap when the head is all a section carries. */
.section__head:last-child {
  margin-bottom: 0;
}

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.75rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 0.875rem;
}

.section--tint .card {
  background: var(--paper);
}

.card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card__index {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  color: var(--brand);
  letter-spacing: 0.08em;
}

/* Status marker for work that is announced but not yet live. */
.badge {
  display: inline-block;
  padding: 0.1875rem 0.625rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper-deep);
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  vertical-align: middle;
}

.section--tint .badge {
  background: var(--paper);
}

.card p {
  color: var(--ink-soft);
  font-size: 0.9875rem;
}

.card__link {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.card__link::after {
  content: " \2192";
}

.card__link:hover {
  text-decoration: underline;
}

/* --- 8. Pull quote ------------------------------------------------------ */

.pullquote {
  max-width: 48ch;
  margin-inline: auto;
  text-align: center;
}

.pullquote__mark {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  line-height: 0.7;
  color: var(--brand);
  margin-bottom: 1rem;
}

.pullquote blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--brand-deep);
  text-wrap: balance;
}

.pullquote figcaption {
  margin-top: 1.75rem;
  color: var(--ink-soft);
}

.pullquote figcaption::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 1px;
  margin: 0 auto 1.125rem;
  background: currentColor;
  opacity: 0.45;
}

.pullquote__name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--brand-deep);
}

.pullquote__role {
  display: block;
  margin-top: 0.1875rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Dark section reserved for the founder's quote. */
.section--quote {
  background: var(--brand-deep);
}

.section--quote .pullquote__mark {
  color: rgb(255 255 255 / 0.3);
}

.section--quote blockquote {
  color: #fff;
}

.section--quote figcaption {
  color: #93a7b4;
}

.section--quote .pullquote__name {
  color: #eef3f6;
}

/* --- 9. Prose & data lists ---------------------------------------------- */

.prose {
  max-width: var(--measure);
}

.prose > * + * {
  margin-top: 1.125rem;
}

.prose > h2 {
  margin-top: 2.75rem;
}

.prose > h3 {
  margin-top: 2rem;
}

/* Prose defaults apply to plain lists only. A list that carries a class is a
   component with its own layout (.people, .facts) and opts out. */
.prose ul:not([class]),
.prose ol:not([class]) {
  padding-left: 1.25rem;
}

.prose ul:not([class]) li + li,
.prose ol:not([class]) li + li {
  margin-top: 0.5rem;
}

.prose ul:not([class]) li::marker,
.prose ol:not([class]) li::marker {
  color: var(--brand);
}

/* Definition list used for registration details and contact facts. */
.facts {
  display: grid;
  gap: 0.25rem 1.5rem;
  grid-template-columns: minmax(9rem, max-content) 1fr;
  align-items: baseline;
}

.facts dt {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-block: 0.5rem;
}

.facts dd {
  margin: 0;
  padding-block: 0.5rem;
}

.facts dt + dd {
  border-bottom: 1px solid var(--rule);
}

.facts dt {
  border-bottom: 1px solid var(--rule);
}

.facts dd:last-of-type,
.facts dt:last-of-type {
  border-bottom: 0;
}

@media (max-width: 34em) {
  .facts {
    grid-template-columns: 1fr;
  }

  .facts dt {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .facts dd {
    padding-top: 0.125rem;
  }
}

.people {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  list-style: none;
  padding: 0;
  margin-top: 1.75rem;
}

.people li {
  padding: 1.25rem 1.375rem;
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  background: var(--paper);
}

.person__name {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--brand-deep);
  display: block;
}

.person__role {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Financial statements. */
.report-meta {
  font-size: 0.875rem;
  color: var(--ink-soft);
  font-style: italic;
}

.ledger {
  width: 100%;
  max-width: 34rem;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-variant-numeric: tabular-nums;
}

.ledger caption {
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 0.75rem;
}

.ledger th,
.ledger td {
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--rule);
  font-weight: 400;
  text-align: left;
}

.ledger td {
  text-align: right;
  white-space: nowrap;
  padding-left: 1.5rem;
}

.ledger__total th,
.ledger__total td {
  font-weight: 600;
  color: var(--brand-deep);
  border-bottom-width: 2px;
  border-bottom-color: var(--brand);
}

.ledger__note {
  margin-top: 0.875rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

/* Editorial note for content that still has to be supplied. */
/* A single figure set large on the dark band. Used on /support -- it is our
   own statement, not a quotation, so it deliberately avoids blockquote. */
.statement {
  max-width: 40ch;
  margin-inline: auto;
  text-align: center;
}

.statement__figure {
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 2rem + 3vw, 4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
}

.statement__caption {
  margin-top: 1rem;
  font-size: var(--size-lead);
  line-height: 1.5;
  color: #a8b8c3;
}

.notice {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px dashed var(--brand);
  border-radius: 0.75rem;
  background: var(--paper-deep);
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.notice strong {
  color: var(--brand-deep);
}

/* --- 10. Footer --------------------------------------------------------- */

.site-footer {
  background: var(--brand-deep);
  color: #d7dee4;
  padding-block: clamp(3rem, 2rem + 3vw, 4.5rem) 2rem;
  font-size: 0.9375rem;
}

.site-footer a {
  color: #eef3f6;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.site-footer h2 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #93a7b4;
  margin-bottom: 0.875rem;
}

.footer__grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.footer__brand .brand__name {
  color: #fff;
}

.footer__brand .brand__sub {
  color: #93a7b4;
}

.footer__tagline {
  margin-top: 0.875rem;
  max-width: 30ch;
  color: #a8b8c3;
}

.footer__list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__facts {
  display: grid;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.footer__facts span {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93a7b4;
}

.footer__bottom {
  margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 0.14);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: #93a7b4;
}

.footer__bottom ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  padding: 0;
}

/* --- 11. Print ---------------------------------------------------------- */

@media print {
  .site-header,
  .site-footer,
  .actions {
    display: none;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }
}
