/* ==========================================================================
   zejneba.com — Base styles (reset + defaults shared by every page)
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  /* Smooth corners everywhere; circles and pills opt out with corner-shape: round */
  corner-shape: var(--corner-shape);
}

html {
  -webkit-text-size-adjust: 100%;
  /* Always keep room for the scrollbar, so the page doesn't jump sideways
     when scrolling is turned back on after the intro */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--base-white);
  color: var(--base-black);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* After a reload the page stays where it was, hidden until the browser has
   scrolled back there, then fades in (classes set by the inline script in each
   page's <head>). The sections in view then rise in one by one (css/reveal.css).
   Opacity only: a transform or filter on body would break the fixed nav. */
html.page-enter body {
  opacity: 0;
}

html.page-enter.page-entered body {
  opacity: 1;
  transition: opacity 0.7s cubic-bezier(0.33, 0, 0.2, 1);
}

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

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

button {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5, h6, p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--brand-moss);
  outline-offset: 3px;
}

/* Visually hidden, still read by screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Mobile grid overlay, shown with ?grid in the URL (js/components.js).
   Columns and margins come from the grid tokens in tokens.css. */
html.show-grid body::after {
  content: "";
  position: fixed;
  inset: 0 var(--grid-margin);
  z-index: 9999;
  background: repeating-linear-gradient(
    to right,
    rgba(255, 90, 31, 0.1) 0,
    rgba(255, 90, 31, 0.1) calc((100% - 3 * var(--grid-gutter)) / 4),
    transparent calc((100% - 3 * var(--grid-gutter)) / 4),
    transparent calc((100% - 3 * var(--grid-gutter)) / 4 + var(--grid-gutter))
  );
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
