/* ==========================================================================
   RESET.CSS — Sagra San Giuseppe
   Modern CSS reset for consistent cross-browser rendering.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Box-sizing
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

/* --------------------------------------------------------------------------
   3. HTML & body defaults
   -------------------------------------------------------------------------- */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  tab-size: 4;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   4. Typography resets
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
   5. Lists
   -------------------------------------------------------------------------- */
ol, ul {
  list-style: none;
}

/* --------------------------------------------------------------------------
   6. Links
   -------------------------------------------------------------------------- */
a {
  color: inherit;
  text-decoration: none;
}

a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* --------------------------------------------------------------------------
   7. Media elements
   -------------------------------------------------------------------------- */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
  font-style: italic; /* Shows alt text nicely if image fails */
}

/* --------------------------------------------------------------------------
   8. Form elements
   -------------------------------------------------------------------------- */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

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

textarea {
  resize: vertical;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

legend {
  padding: 0;
}

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

/* --------------------------------------------------------------------------
   10. Interactive elements
   -------------------------------------------------------------------------- */
summary {
  cursor: pointer;
}

details > summary {
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

[hidden] {
  display: none !important;
}

dialog {
  padding: 0;
  border: none;
}

/* --------------------------------------------------------------------------
   11. Reduced motion preference
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
