/* ==========================================================================
   Base — reset, typography, layout helpers
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* No grey/blue tap flash on mobile browsers; keyboard focus keeps its :focus-visible outline */
  -webkit-tap-highlight-color: transparent;
  scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--white);
  color: var(--black-87);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1,
h2,
h3,
p {
  margin: 0;
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 0.125rem solid var(--blue-87);
  outline-offset: 0.1875rem;
  border-radius: 0.25rem;
}

strong {
  font-weight: 600;
  color: var(--black);
}

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

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
  padding-top: var(--main-top);
  padding-bottom: var(--footer-gap);
}

.container {
  width: min(var(--content-max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.full-bleed {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
}

.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;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--blue-87);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 500;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Typography ------------------------------------------------------------ */

.t-hero {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-hero);
  color: var(--black-87);
}

.t-h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h1);
  color: var(--black-87);
}

.t-h4 {
  font-size: var(--fs-h4);
  color: var(--black-68);
}

.t-text {
  font-size: var(--fs-text);
  color: var(--black-68);
}

/* Reveal on scroll (enabled only when JS runs and motion is allowed) ---- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(2.5rem);
    transition:
      opacity var(--dur-reveal) var(--ease-out),
      transform var(--dur-reveal) var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}
