/* MELBA — starting site.
   Same skeleton as the other methods-research.org sites (STREAM, Lab), dressed
   in MELBA's own brand: the peach gradient from brand/README.txt, charcoal ink,
   white ground. Plain CSS, no framework, no web fonts. */

:root {
  --ground: #ffffff;
  --ink: #303138;          /* brand subtitle colour on light */
  --ink-heading: #222329;  /* brand dark background */
  --ink-muted: #5f6068;    /* 6.3:1 on white */
  --link: #b23a52;         /* gradient end, darkened to 5.8:1 on white */
  --link-hover: #222329;
  --focus: #d44962;        /* gradient end, 4.3:1: clears 3:1 for a ring */
  --rule: #e5e5e9;         /* tile stroke in the brand icon */
  --gradient: linear-gradient(
    90deg,
    #ca8050,
    #e5a06c 23%,
    #eb8060 53%,
    #e9695a 77%,
    #d44962
  );

  --measure: 38rem;
  --page: 46rem;
  --gutter: 1.25rem;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  /* Inter is the brand face; we use it where it is installed and never load it. */
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* The brand gradient as a thin band across the top of the page. */
body::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--gradient);
}

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

#title-block-header {
  display: none;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--link-hover);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.6rem 1rem;
  background: var(--ground);
  border: 1px solid var(--rule);
  z-index: 10;
}

.skip-link:focus {
  left: var(--gutter);
  top: 0.5rem;
}

/* ---- Header ---------------------------------------------------------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
  max-width: var(--page);
  margin: 0 auto;
  padding: 1.25rem var(--gutter) 1rem;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.site-header p {
  max-width: none;
  margin: 0;
}

.site-parent a {
  color: var(--ink);
  font-weight: 600;
}

.site-parent a:hover {
  color: var(--link);
}

/* ---- Hero: the logo is the page heading ------------------------------ */

.site-main {
  display: block;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter) 3rem;
}

.hero {
  margin: 1.5rem 0 1.25rem;
  max-width: 36rem;
}

/* Both logo files leave 45 of 920 units of space left of the M. Pulling the
   image left by that share lines the M up with the paragraphs below. */
.hero-logo {
  display: block;
  width: 100%;
  margin-left: -4.891%;
}

/* Below about 560 px the subtitle in the full logo gets too small to read.
   The brand guide says to fall back to the name alone, so we show the
   wordmark and set the subtitle as real text instead. */
.hero-compact {
  display: none;
}

.hero-subtitle {
  display: block;
  margin: 0.25rem 0 0;
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.005em;
}

@media (max-width: 35rem) {
  .hero-logo--full {
    display: none;
  }

  .hero-compact {
    display: block;
  }

  .hero {
    margin-top: 0.5rem;
  }
}

/* ---- Text ------------------------------------------------------------ */

h2 {
  color: var(--ink-heading);
  line-height: 1.25;
  text-wrap: balance;
  margin: 3.25rem 0 1rem;
  font-size: 1.25rem;
  letter-spacing: -0.005em;
}

/* A short stroke of the brand gradient above each section heading. */
h2::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-bottom: 1rem;
  border-radius: 2px;
  background: var(--gradient);
}

p,
li {
  max-width: var(--measure);
}

p {
  margin: 0 0 1.15rem;
}

ul,
ol {
  margin: 0 0 1.15rem;
  padding-left: 1.3rem;
}

li {
  margin-bottom: 0.5rem;
}

li::marker {
  color: var(--focus);
}

.lead {
  max-width: 40rem;
  margin: 0 0 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-heading);
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
}

.lead p {
  max-width: none;
  margin: 0;
  font-size: inherit;
}

/* ---- Footer ---------------------------------------------------------- */

.site-footer {
  max-width: var(--page);
  margin: 4rem auto 0;
  padding: 1.1rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-muted);
  font-size: 0.8125rem;
  line-height: 1.7;
}

.site-footer p {
  max-width: none;
  margin: 0;
}

.site-footer a {
  color: var(--ink-muted);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--ink-heading);
}

@media (max-width: 34rem) {
  body {
    font-size: 1rem;
  }

  .lead {
    font-size: 1.1875rem;
  }
}

/* Keeps names such as TYPE-ME from breaking at their hyphen. */
.nowrap {
  white-space: nowrap;
}
