/* Reset & base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid var(--color-border);
}

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

body {
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "salt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

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

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

button {
  cursor: pointer;
  border: 0;
}

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

ul {
  list-style: none;
}

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

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Self-hosted fonts */
@font-face {
  font-family: "Favorit";
  src: url("../fonts/FavoritStd-Light.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Favorit";
  src: url("../fonts/FavoritStd-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Favorit";
  src: url("../fonts/FavoritStd-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Favorit";
  src: url("../fonts/FavoritStd-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "ES Nein";
  src: url("../fonts/ESNein-Extrabold.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
/* IBM Plex Mono via Google Fonts could be self-hosted too; using local fallback chain in --font-mono */

/* Utility classes */
.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;
}

.text-balance {
  text-wrap: balance;
}

.font-display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  line-height: 0.92;
}
.font-headline {
  font-family: var(--font-headline);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1;
}
.font-accent {
  font-family: var(--font-headline);
  font-weight: 300;
  color: var(--color-silver);
  letter-spacing: -0.02em;
}
.font-mono {
  font-family: var(--font-mono);
}

.grain {
  position: relative;
}
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
