/* ================================================================= */
/* Modern CSS Reset — shared/frontend/css/reset.css                   */
/* ================================================================= */
/* Based on Josh Comeau's Modern CSS Reset + Andy Bell's improvements */
/* https://piccalil.li/blog/a-more-modern-css-reset/                  */
/* ================================================================= */

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

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans, sans-serif);
  font-size: var(--text-base, 14px);
  line-height: var(--leading-normal, 1.5);
  color: var(--color-fg, #1a1a2e);
  background: var(--color-bg, #fafafa);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Remove default margin/padding for common elements */
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
  margin: 0;
}

/* Remove list styles on ul, ol with role="list" */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Balance text wrapping on headings */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

/* Anchor elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: var(--color-accent, #4f46e5);
}

/* Make images easier to work with */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* Inherit fonts for inputs and buttons */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}

/* Remove all button default styles */
button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Reduce animation for people who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus-visible outline */
:focus-visible {
  outline: 2px solid var(--color-accent, #4f46e5);
  outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Smooth scrollbar (Firefox) */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-bg-3, #e8e8ed) transparent;
}

/* Smooth scrollbar (WebKit) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--color-bg-3, #e8e8ed);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-fg-3, #9d9db0);
}

/* Selection colour */
::selection {
  background: var(--color-accent-bg-2, rgba(79, 70, 229, 0.15));
  color: var(--color-fg, #1a1a2e);
}
