/* ============================================================================
   THE BLACK RELIQUARY - BASE
   Reset, document defaults, screen visibility, reduced motion.
   ============================================================================ */

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

html, body {
  height: 100%;
}

body {
  position: relative;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: var(--lh-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  cursor: default;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

input[type="range"] { cursor: pointer; }

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

:focus-visible {
  outline: 1px solid var(--c-accent-bright);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

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

/* ---- Screen visibility ----------------------------------------------- */
.screen {
  position: fixed;
  inset: 0;
  display: none;
  z-index: var(--z-scene);
  overflow: hidden;
}

.screen.is-active {
  display: flex;
}

/* ---- Reduced motion: neutralize animation + transition durations ----- */
body.reduced-motion *,
body.reduced-motion *::before,
body.reduced-motion *::after {
  animation-duration: 1ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 1ms !important;
  scroll-behavior: auto !important;
}
