/* CSS Reset + Base Styles */

@layer reset, base, components, layout, utilities;

@layer reset {
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: var(--weight-normal);
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--surface-1);
    min-height: 100vh;
    min-height: 100dvh;
  }

  img, video, svg {
    display: block;
    max-width: 100%;
  }

  a {
    color: var(--color-primary);
    text-decoration: none;
  }
  a:hover {
    text-decoration: underline;
  }

  ul, ol {
    list-style: none;
  }

  input, textarea, select, button {
    font: inherit;
    color: inherit;
  }

  button {
    cursor: pointer;
    border: none;
    background: none;
  }

  /* Skip link */
  .skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    padding: var(--space-2) var(--space-4);
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-sm);
    z-index: 9999;
    font-weight: var(--weight-semibold);
  }
  .skip-link:focus {
    top: var(--space-4);
  }
}

@layer base {
  h1, h2, h3, h4 {
    font-weight: var(--weight-bold);
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text-primary);
  }

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); font-weight: var(--weight-semibold); }
  h4 { font-size: var(--text-lg); font-weight: var(--weight-semibold); }

  p {
    color: var(--text-secondary);
  }

  code, pre {
    font-family: var(--font-mono);
  }

  /* Focus visible */
  :focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
  }

  /* Reduced motion */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
}
