/* Fonts loaded via <link> in index.astro — faster than @import */

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

  html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    hanging-punctuation: first last;
  }

  body {
    min-height: 100dvh;
  }

  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;
  }

  /* Honour reduced-motion at the reset layer so it wins over all component transitions */
  @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;
      scroll-behavior: auto !important;
    }
  }
}

@layer base {
  body {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: var(--text-md);
    font-optical-sizing: auto;
    line-height: 1.7;
    color: var(--color-text-primary);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  h1,
  h2,
  h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--color-text-primary);
  }

  h1 { font-size: var(--text-xl); }
  h2 { font-size: var(--text-lg); }
  h3 { font-size: var(--text-md); }

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

  a:hover {
    text-decoration: underline;
  }

  code,
  kbd,
  samp {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.875em;
  }

  .container {
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--padding-inline);
  }

  .section-label {
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-8);
  }
}
