/* Body */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  src: url("/fonts/Inter.woff2") format("woff2");
  font-weight: 100 900;
}

@font-face {
  font-family: "Inter Variable";
  font-style: italic;
  font-display: swap;
  src: url("/fonts/Inter-Italic.woff2") format("woff2");
  font-weight: 100 900;
}

/* Heading */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-display: swap;
  src: url("/fonts/SpaceGrotesk.woff2") format("woff2");
  font-weight: 300 700;
}

:root {
  /* Fonts */
  --body: "Inter Variable", sans-serif;
  --heading: "Space Grotesk", sans-serif;

  /* Widths */
  --width-content: 60rem;
  --width-text: 40ch;

  /* Text */
  --text: rgb(250 250 250);
  --text-2: rgb(215 200 220);

  /* UI */
  --background: rgb(55 0 80);
}

/* Reset */

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

* {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

/* Typography */

h1,
h2,
h3 {
  font-family: var(--heading);
  font-weight: 500;
  text-wrap: balance;
  overflow-wrap: break-word;
}

h1 {
  font-size: 1.5rem;
  line-height: 1.25em;
}

h2 {
  font-size: 1.375;
  line-height: 1.25em;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.438;
}

p {
  overflow-wrap: break-word;
  word-break: break-word;
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--text-2);
}

strong {
  font-weight: 600;
}

hr {
  all: unset;
  display: block;
  inline-size: 100%;
  block-size: 1px;
  background-color: var(--text-2);
}

/* Page elements */

html {
  block-size: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

body {
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  background-color: var(--background);
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-block-size: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

.header-inner {
  margin-inline: auto;
  padding-inline: 2rem;
  max-inline-size: var(--width-content);
}

header a {
  display: inline-block;

  svg {
    block-size: 42px;
  }
}

main {
  padding: 2rem;
  margin-inline: auto;
  inline-size: 100%;
  max-inline-size: var(--width-content);

  > * {
    max-inline-size: var(--width-text);
  }

  & > * + * {
    margin-block-start: 1.5em;
  }
}

main h1 {
  margin-block-end: 2rem;
}

main a {
  font-weight: 600;
  text-decoration: underline;
}

/* Footer */

footer {
  color: var(--text-2);
  margin-inline: auto;
  max-inline-size: var(--width-content);
  inline-size: 100%;
  font-size: 0.875rem;
  padding-inline: 2rem;
}

footer a {
  text-decoration: underline;
  font-weight: 600;
  color: inherit;

  &:is(:hover, :focus-visible) {
    color: var(--text);
  }
}