/* ==========================================================================
   Base: reset, document defaults, browser surfaces
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: dark;
  background-color: var(--charcoal);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: var(--leading-text);
  color: var(--text-on-film);
  background-color: var(--charcoal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  /* Mobile: no grey flash on tap, no long-press callout on controls */
  -webkit-tap-highlight-color: transparent;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

a,
button {
  touch-action: manipulation;
  -webkit-touch-callout: none;
}

h1,
h2,
p {
  overflow-wrap: break-word;
}

h1 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

:focus {
  outline: none;
}

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

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
