/* ==========================================================================
   Base: reset, typography, links, focus, helpers
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--slate);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }

/* Headings ------------------------------------------------------------- */
h1, h2, h3, h4 {
  margin: 0;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 900;
  line-height: var(--lh-tight);
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 900;
  line-height: var(--lh-head);
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--fs-h3);
  color: var(--blue-deep);
  line-height: 1.2;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.45;
  max-width: 62ch;
}

/* Links -------------------------------------------------------------- */
a {
  color: var(--blue);
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  transition: text-decoration-color .15s var(--ease), color .15s var(--ease);
}
a:hover { text-decoration-color: currentColor; }

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

/* Lists -------------------------------------------------------------- */
ul, ol { margin: 0; padding: 0; }
.plain-list { list-style: none; }

address { font-style: normal; }

/* Helpers ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 2000;
  padding: .6rem 1rem;
  background: var(--green);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* Sections ------------------------------------------------------------ */
.section { padding-block: var(--section-y); }
.section--stock { background: var(--stock); }

/* Blue section: white headings, light body copy (zmrman.com's services section) */
.section--blue {
  background: var(--blue);
  color: var(--slate-light);
}
.section--blue h2, .section--blue h3 { color: var(--paper); }
.section--blue a:not(.btn) { color: var(--paper); }   /* buttons keep their own colors */

/* Green band: dark ink text (zmrman.com's "Get a quote" band) */
.section--green {
  background: var(--green);
  color: var(--ink);
}
.section--green h2, .section--green h3 { color: var(--ink); }
.section--green a:not(.btn) { color: var(--ink); }    /* buttons keep their own colors */

.section__head { max-width: 70ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__head .lead { margin-top: 1rem; }
