/* ============================================================
   BASE — reset, element defaults, and layout helpers.
   Rarely needs editing.
   ============================================================ */

*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}

/* Respect the visitor's OS "reduce motion" setting */
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  *{
    animation-duration:0.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:0.001ms !important;
  }
}

body{
  font-family:var(--font-body);
  background:var(--paper);
  color:var(--ink);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

h1,h2,h3,h4{
  font-family:var(--font-display);
  letter-spacing:-0.02em;
  line-height:1.1;
}

a{color:inherit;text-decoration:none;}
ul{list-style:none;}
img{max-width:100%;display:block;}
button{font-family:inherit;cursor:pointer;border:none;background:none;}

/* Keyboard focus ring — keep this, it is an accessibility requirement */
:focus-visible{
  outline:2px solid var(--signal);
  outline-offset:3px;
}

/* ---------- Layout helpers ---------- */

section{
  position:relative;
  padding:var(--section-y) 0;
  /* The header is fixed and ~70px tall. Without this, jumping to a
     section hides its heading behind the header. */
  scroll-margin-top:90px;
}

/* Centred content column, used inside every section */
.wrap{
  max-width:var(--maxw);
  margin:0 auto;
  padding:0 var(--gutter);
}

/* ---------- Utilities ---------- */

.mono{
  font-family:var(--font-mono);
  letter-spacing:0.02em;
}

/* Alternating section background */
.bg-paper-dim{background:var(--paper-dim);}

/* Section that sits flush against its neighbours (the process strip) */
.section-flush{padding-top:0;padding-bottom:0;}

/* Screen-reader-only / visually hidden (used by the icon sprite) */
.visually-hidden{
  position:absolute;
  width:1px;height:1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  clip-path:inset(50%);
  white-space:nowrap;
}
