/* ==========================================================================
   Reset CSS - Sagra del Borgo Antico di Montefiore
   Modern CSS reset for consistent cross-browser rendering.
   ========================================================================== */

/* Box-sizing: border-box on everything */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margins and paddings */
html, body, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
figure, figcaption, dl, dd, ol, ul, fieldset, legend {
  margin: 0;
  padding: 0;
}

/* Document defaults: smooth scrolling, full-height body */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* Media defaults: responsive by default */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Form elements inherit fonts */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}

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

/* Links: clean slate */
a {
  color: inherit;
  text-decoration: none;
}

/* Lists: remove bullets for nav/layout lists */
ul[role="list"], ol[role="list"], nav ul, nav ol {
  list-style: none;
}

/* Typography: prevent overflow */
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  text-wrap: balance;
}

p {
  overflow-wrap: break-word;
  text-wrap: pretty;
}

/* Table: collapse borders */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Reduced motion preference */
@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;
  }
}

/* Misc */
[hidden] { display: none !important; }
fieldset { border: none; }
dialog { padding: 0; }
