/* ==========================================================================
   MCOGL — Reset + typographic base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--mc-white);
  color: var(--mc-body);
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  font-variation-settings: 'wdth' var(--wd-normal), 'wght' 400;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
svg { fill: currentColor; }

h1, h2, h3, h4, h5, h6 { margin: 0; text-wrap: balance; color: var(--mc-ink-900); }

h1, .mc-h1 {
  font-size: var(--fs-h1);
  font-variation-settings: 'wdth' var(--wd-expanded), 'wght' 700;
  line-height: 1.06;
  letter-spacing: -0.022em;
}
h2, .mc-h2 {
  font-size: var(--fs-h2);
  font-variation-settings: 'wdth' 106, 'wght' 700;
  line-height: 1.14;
  letter-spacing: -0.018em;
}
h3, .mc-h3 {
  font-size: var(--fs-h3);
  font-variation-settings: 'wdth' var(--wd-normal), 'wght' 600;
  line-height: 1.3;
  letter-spacing: -0.006em;
}

p { margin: 0 0 var(--space-4); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--mc-blue-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--mc-blue-700); }

ul, ol { margin: 0 0 var(--space-4); padding-left: 1.15em; }
li { margin-bottom: var(--space-2); }
li::marker { color: var(--mc-blue-600); }

strong, b { font-variation-settings: 'wdth' var(--wd-normal), 'wght' 600; }

hr { border: 0; border-top: 1px solid var(--mc-rule); margin: var(--space-7) 0; }

/* ---- Focus: visible, branded, never removed ------------------------------ */
:focus-visible {
  outline: 2px solid var(--mc-blue-600);
  outline-offset: 3px;
  border-radius: 2px;
}
.mc-dark :focus-visible { outline-color: var(--mc-blue-300); }

::selection { background: var(--mc-blue-600); color: #fff; }

/* ---- Skip link ----------------------------------------------------------- */
.mc-skip {
  position: absolute; left: var(--space-4); top: -100px;
  z-index: var(--z-skip);
  background: var(--mc-ink-900); color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  font-size: var(--fs-small);
  font-variation-settings: 'wght' 600;
  transition: top var(--dur-fast) var(--ease);
}
.mc-skip:focus { top: var(--space-4); color: #fff; }

/* ---- Utility type -------------------------------------------------------- */
.mc-lede {
  font-size: var(--fs-lede);
  line-height: 1.56;
  color: var(--mc-slate);
  max-width: 60ch;
}
.mc-mono {
  font-family: var(--ff-mono);
  font-size: var(--fs-mono);
  letter-spacing: .01em;
  font-feature-settings: 'tnum' 1;
}
.mc-quote {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: var(--fs-quote);
  line-height: 1.44;
  letter-spacing: -0.004em;
  max-width: 26ch;
}

/* ---- Dark context -------------------------------------------------------- */
.mc-dark { background: var(--mc-ink-900); color: var(--mc-on-dark-2); }
.mc-dark h1, .mc-dark h2, .mc-dark h3 { color: #fff; }
.mc-dark a { color: var(--mc-blue-300); }
.mc-dark .mc-lede { color: var(--mc-on-dark-2); }
.mc-dark ::selection { background: var(--mc-red-500); }

/* ---- Screen-reader only -------------------------------------------------- */
.screen-reader-text {
  border: 0; clip-path: inset(50%); height: 1px; width: 1px;
  margin: -1px; overflow: hidden; padding: 0; position: absolute;
  white-space: nowrap;
}

/* ---- Reduced motion: collapse everything --------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
