/* ==========================================================================
   Base — Berashith Ministry
   Reset, document defaults, global typography
   ========================================================================== */

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Ensure [hidden] is respected even when CSS sets display on the element */
[hidden] { display: none !important; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--leading-base);
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Media ---------------------------------------------------------------- */
img, video, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Links ---------------------------------------------------------------- */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ease-fast);
}

/* --- Lists ---------------------------------------------------------------- */
ul, ol {
  list-style: none;
}

/* --- Forms / Buttons ------------------------------------------------------ */
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  line-height: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* --- Typography ----------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  line-height: var(--leading-tight);
  font-weight: 700;
  color: inherit;
}

p {
  margin-bottom: var(--sp-4);
  text-align: justify;
}

p:last-child {
  margin-bottom: 0;
}

blockquote {
  font-style: italic;
  line-height: var(--leading-loose);
}

strong, b {
  font-weight: 700;
}

em, i {
  font-style: italic;
}

sup {
  vertical-align: super;
  font-size: 0.65em;
}

/* --- Accessibility -------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
