/* Reset + base type */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

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

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--fs-body-md);
  font-weight: 400;
  line-height: var(--lh-body);
  color: var(--on-background);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

ul,
ol {
  list-style: none;
  padding: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: inherit;
  line-height: inherit;
}

::selection {
  background: var(--surface-variant);
  color: var(--on-surface);
}

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

/* Type utilities */
.font-display {
  font-family: var(--font-display);
}

.font-body {
  font-family: var(--font-body);
}

.text-display-lg {
  font-family: var(--font-display);
  font-size: var(--fs-display-lg-mobile);
  font-weight: 600;
  line-height: var(--lh-display-lg-mobile);
  letter-spacing: var(--ls-display-mobile);
}

@media (min-width: 768px) {
  .text-display-lg {
    font-size: var(--fs-display-lg);
    line-height: var(--lh-display-lg);
    letter-spacing: var(--ls-display);
  }
}

.text-headline-md {
  font-family: var(--font-display);
  font-size: var(--fs-headline-md);
  font-weight: 500;
  line-height: var(--lh-headline-md);
}

.text-headline-sm {
  font-family: var(--font-display);
  font-size: var(--fs-headline-sm);
  font-weight: 500;
  line-height: var(--lh-headline-sm);
}

.text-body-lg {
  font-family: var(--font-body);
  font-size: var(--fs-body-lg);
  font-weight: 400;
  line-height: var(--lh-body);
}

.text-body-md {
  font-family: var(--font-body);
  font-size: var(--fs-body-md);
  font-weight: 400;
  line-height: var(--lh-body);
}

.text-label-caps {
  font-family: var(--font-body);
  font-size: var(--fs-label-caps);
  font-weight: 700;
  line-height: var(--lh-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
}

.text-on-surface {
  color: var(--on-surface);
}

.text-muted {
  color: var(--on-surface-variant);
}

.text-secondary {
  color: var(--secondary);
}

.text-secondary-italic {
  color: var(--secondary);
  font-style: italic;
  font-weight: 400;
}

/* Material Symbols baseline */
.material-symbols-outlined {
  font-family: "Material Symbols Outlined", sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  vertical-align: middle;
  user-select: none;
}

.material-symbols-outlined.fill {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* Noise overlay (home) */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  opacity: 0.015;
  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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Screen-reader only */
.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;
}
