@layer reset, base, components;

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

  *:not(dialog) {
    margin: 0;
  }

  @media (prefers-reduced-motion: no-preference) {
    html {
      interpolate-size: allow-keywords;
    }
  }

  body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }

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

  input,
  button,
  textarea,
  select {
    font: inherit;
  }

  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    overflow-wrap: break-word;
  }

  p {
    text-wrap: pretty;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    text-wrap: balance;
  }
}

@layer base {
  :root {
    --color-text: #1a1a1a;
    --color-text-subtle: #555;
    --color-text-inverse: #fff;
    --color-background: #fff;
    --font-sans: system-ui, sans-serif;
    --space-16: 1rem;
    --space-24: 1.5rem;
  }

  body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    isolation: isolate;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-background);
  }

  small {
    color: var(--color-text-subtle);
  }
}

@layer components {
  body > video {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: var(--viewport-height, 100dvh);
    object-fit: cover;
    pointer-events: none;
  }

  footer {
    --text-shadow-video: 0 1px 3px rgb(0 0 0 / 60%);

    position: relative;
    margin-top: auto;
    color: var(--color-text-inverse);
    text-shadow: var(--text-shadow-video);
    padding: var(--space-16) var(--space-24);

    small {
      color: inherit;
    }
  }
}
