/* ============================================================
   BASE — reset + element defaults
   ============================================================ */

*,*::before,*::after{ box-sizing:border-box; }
html{
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
}
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{
    animation-duration:0.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:0.001ms !important;
    scroll-behavior:auto !important;
  }
}

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-body);
  font-size:var(--step-0);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  transition:background var(--dur-med) var(--ease-in-out), color var(--dur-med) var(--ease-in-out);
  overflow-x:hidden;
}

img,svg,video{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; background:none; border:0; cursor:pointer; }
input,textarea,select{ font:inherit; color:inherit; }
ul{ margin:0; padding:0; list-style:none; }
p{ margin:0 0 1em; }
p:last-child{ margin-bottom:0; }

h1,h2,h3,h4,h5{
  font-family:var(--font-display);
  font-weight:600;
  line-height:1.08;
  letter-spacing:-0.01em;
  margin:0;
  color:var(--ink);
}
h1{ font-size:var(--step-6); }
h2{ font-size:var(--step-4); }
h3{ font-size:var(--step-2); }
h4{ font-size:var(--step-1); }

.lede{
  font-size:var(--step-1);
  color:var(--ink-soft);
  line-height:1.65;
  max-width:52ch;
}

::selection{ background:var(--accent); color:var(--accent-contrast); }

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

/* Prevent the classic CSS Grid overflow bug: grid items default to
   min-width:auto (their content's min-content size), which can force
   a track — and the whole page — wider than the viewport. */
.hero__grid > *, .split > *, .program-strip > *, .stats > *,
.people-grid > *, .gallery > *, .blog-grid > *, .form-grid > *,
.contact-layout > *, .testimonial-grid > *, .post-gallery > *,
.footer-grid > *{
  min-width:0;
}

/* container / section rhythm */
.wrap{
  width:100%;
  max-width:var(--container-w);
  margin-inline:auto;
  padding-inline:var(--container-pad);
}
.section{ padding-block:var(--section-pad); position:relative; }
.section--tight{ padding-block:calc(var(--section-pad) * 0.55); }
.section--surface{ background:var(--surface); }
.section--raised{ background:var(--bg-raised); }

/* legal-citation style eyebrow, used above every section title */
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:.55em;
  font-family:var(--font-mono);
  font-size:var(--step--1);
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--accent-strong);
  margin-bottom:var(--space-s);
}
[data-theme="dark"] .eyebrow{ color:var(--accent); }
.eyebrow::before{
  content:"§";
  font-family:var(--font-mono);
  font-weight:600;
}

.section-head{
  max-width:56ch;
  margin-bottom:var(--space-xl);
}
.section-head--split{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:space-between;
  gap:var(--space-m);
  max-width:none;
}

hr.rule{
  border:0;
  border-top:1px solid var(--line);
  margin:var(--space-xl) 0;
}

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

/* prevent flash: hide reveal targets until JS marks them ready */
.reveal{ opacity:0; }
.js-ready .reveal{ opacity:1; } /* fallback if JS never inits */
