/* ============================================================
   morgan-home — base.css (PAGE-SCAFFOLD owns this file; sections never touch it)
   ============================================================ */
/* Inter, variable weight, latin subset, self-hosted (OFL: assets/fonts/OFL.txt). */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-wght.woff2') format('woff2');
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: clip;             /* clip, not hidden — hidden breaks position: sticky */
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--color-bg);
}

/* Drawer scroll lock (brief-page §7). html carries overflow-x: clip, which stops body
   overflow from propagating to the viewport — so the lock must sit on html itself. */
html:has(body.is-menu-open),
html:has(dialog[open]) { overflow: hidden; }

body {
  overflow-x: clip;
  min-width: 320px;
  /* PAGE CAP (FD-W): every section stops at 1920 and is centred. */
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

ul, ol { list-style: none; }

a {
  color: inherit;
  text-decoration: none;
}

img, video, svg, picture {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  text-align: inherit;
}

input, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
  text-transform: inherit;
  letter-spacing: inherit;
}

table { border-collapse: collapse; border-spacing: 0; }

*:focus { outline: none; }
*:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* CONTAINER — defined ONLY HERE. Gutter = padding-inline (never a padding shorthand),
   so sections may set padding-block freely. brief-page §1. */
.container {
  width: 100%;
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
  padding-inline: var(--gutter);
}

/* Wide variant: testimonials / instagram / footer — desktop gutter 64 (brief-page §1). */
.container--wide { padding-inline: var(--gutter-wide); }

/* Bleed override — section supplies its own inner paddings via .<slug>__content. */
.container--bleed { padding-inline: 0; }

/* Visually hidden (accessible labels) */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
