/* MB&Co. — mbarton.co.uk
   Faithful rebuild of the Gamma original: Crimson Text on a pale lavender ground,
   white translucent card, bold underlined links. Measure tightened for readability. */

:root {
  --bg: #ECECF3;
  --ink: #3C3939;
  --ink-strong: #1B1B27;
  --rule: rgba(27, 27, 39, 0.12);
  --serif: "Crimson Text", Georgia, "Times New Roman", serif;
  --measure: 65rem;
  --navy: #19232F;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem; top: 1rem;
  z-index: 10;
  background: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
}

.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;
}

.page {
  padding: clamp(1rem, 4vw, 3rem) clamp(1rem, 4vw, 2rem);
}

.card {
  max-width: 80rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 4rem);
}

/* ---------- hero ---------- */

.hero { text-align: center; }

.hero-img {
  display: block;
  width: 100%;
  max-width: 23.9375rem;   /* 383px, as Gamma */
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
}

.hero-name {
  font-size: clamp(1.40625rem, 2.109375vw, 1.6875rem);   /* 22.5px → 27px */
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink-strong);
  text-decoration: underline;
  text-underline-offset: 4px;
  margin: 1.75rem 0 0;
}

.hero-tagline {
  max-width: var(--measure);
  margin: 2.5rem auto 0;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.40625rem, 2.109375vw, 1.6875rem);   /* 22.5px → 27px */
  line-height: 1.25;
  color: var(--ink-strong);
  text-align: left;
}

/* ---------- sections ---------- */

.section {
  max-width: var(--measure);
  margin: 0 auto;
  padding-top: clamp(2.75rem, 6vw, 4rem);
}

.section-title {
  font-size: clamp(1.2375rem, 1.7578125vw, 1.40625rem);  /* 19.8px → 22.5px */
  font-style: italic;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink-strong);
  margin: 0 0 1.25rem;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li + li { margin-top: 0.85rem; }

.credit {
  color: var(--ink);
  opacity: 0.72;
  white-space: nowrap;
}
.credit a { font-weight: 400; }

.note { margin: 1.5rem 0 0; }

/* ---------- links ---------- */

a {
  color: var(--ink-strong);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity 0.15s ease;
}
a:hover { opacity: 0.62; }
a:focus-visible {
  outline: 2px solid var(--ink-strong);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- newsletter signup ---------- */

.signup { margin-top: 1.5rem; }

.signup-body {
  margin: 0;
  font-size: 1rem;
}




.signup-count strong { font-weight: 700; }

.signup-embed {
  margin-top: 1.25rem;
}

/* Beehiiv's loader injects a wrapper with `height: 0; overflow: hidden` and
   relies on a postMessage from the iframe to set the real height. The iframe
   only ever posts `beehiiv:child-loaded` and never reports a height, so the
   form renders invisible. Override the wrapper and pin the iframe instead.

   NOTE: 56px suits the current slim, header-less form (measured at 50px, with
   slack for the success message). Re-measure and update this if the form is
   redesigned in Beehiiv — Grow -> Subscribe Forms — or it will clip or leave
   a gap. */
.signup-embed > div > div {
  height: auto !important;
  overflow: visible !important;
}

.signup-embed iframe {
  display: block;
  width: 100%;
  height: 56px !important;
  border: 0;
}

.signup-privacy {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;        /* 14.4px, as Gamma */
  font-style: italic;
  line-height: 1.6;
}

/* ---------- footer ---------- */

.footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding-top: clamp(3rem, 7vw, 4.5rem);
  font-size: 1rem;
}
.footer p { margin: 0; }

.footer-legal {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
