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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--light);
  background-color: var(--dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
  overflow: hidden;
}

/* fixed, blurred backdrop used on all subpages */
.background-layer::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
      to right,
      rgba(216, 36, 36, 0.12),
      rgba(10, 17, 225, 0.12)
    ),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.75)),
    url("../images/background.jpg") no-repeat top center / cover;
  background-color: var(--black);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-tight);
  letter-spacing: 0.01em;
  text-wrap: balance;
}

h1 {
  font-size: var(--font-size-h1);
}

h2 {
  font-size: var(--font-size-h2);
}

h3 {
  font-size: var(--font-size-h3);
}

p {
  text-wrap: pretty;
}

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

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

img {
  height: auto;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul {
  list-style: none;
}

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

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--xl);
  width: 100%;
  padding: var(--xl) var(--gutter) var(--xxl);
}

main.home {
  padding: 0;
  gap: 0;
}

/* layout helpers */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* consistent page heading for all subpages */
.page-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--xs);
}

.page-header p {
  color: var(--muted);
  max-width: 40rem;
}

/* small uppercase label above headings */
.kicker {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}

/* long-form text (imprint, privacy, about) */
.prose {
  color: var(--muted);
  text-align: left;
}

.prose > * + * {
  margin-top: var(--sm);
}

.prose h1,
.prose h2,
.prose h3 {
  color: var(--light);
  margin-top: var(--xl);
}

.prose h1 {
  font-size: var(--font-size-h2);
}

.prose h2 {
  font-size: 1.5rem;
}

.prose h3 {
  font-size: 1.25rem;
}

.prose > :first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose ul {
  list-style: disc;
}

.prose li + li {
  margin-top: var(--xxs);
}

.prose a {
  color: var(--light);
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--primary);
}

.prose strong {
  color: var(--light);
}

/* scroll reveal */
.animated {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.animated.move-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .animated {
    opacity: 1;
    transform: none;
  }
}

/* no js: never hide content */
.no-js .animated {
  opacity: 1;
  transform: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
