/* ==========================================================================
   MODERN CSS RESET & BASE STYLES
   ========================================================================== */

/* 1. Use a more-intuitive box-sizing model. */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 2. Prevent adjustments of font size after orientation changes in iOS. */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  width: 100%;
}

/* 3. Remove default margins. */
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
  margin: 0;
}

/* 4. Remove list styles on ul, ol elements that have a list role. */
ul, ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

/* 5. Set core root defaults. */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  background: var(--bg-canvas-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 6. A elements that don't have a class get default styles. */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* 7. Make images easier to work with. */
img, picture, svg, video, canvas {
  max-width: 100%;
  display: block;
  height: auto;
}

/* 8. Inherit fonts for inputs and buttons. */
input, button, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}

/* 9. Set cursor pointer for interactive controls. */
button, select, summary, [role="button"] {
  cursor: pointer;
}

button:disabled, input:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* 10. Remove wild animations for people who prefer not to see them. */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
   scroll-behavior: auto;
  }
  
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 11. Focus-visible system: Guarantee top-tier keyboard accessibility */
:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

/* If parent elements have rounded corners, match outline-offset */
a:focus-visible, button:focus-visible, input:focus-visible {
  border-radius: inherit;
}
