/* =========================================================
   DIMORA BAGNI — Base Reset & Typography
   ========================================================= */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-dark);
  background: var(--color-crema);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ---- Headings ------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-dark);
  letter-spacing: 0.02em;
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { max-width: 70ch; }

/* ---- Layout helpers ------------------------------------ */
.container {
  width: min(var(--container-max), 100%);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.section {
  padding-block: var(--space-xl);
}

.section--dark {
  background: var(--color-dark);
  color: var(--color-crema);
}

.section--siena {
  background: var(--color-siena);
  color: var(--color-crema);
}

.section--light {
  background: var(--color-light);
}

/* ---- Section title with gold underline decorative line */
.section-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
  position: relative;
  display: block;
  width: fit-content;   /* shrink block to text width */
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--color-oro);
  margin-top: 0.5rem;
  /* no margin-inline:auto — line always starts at left edge of text */
}

/* Centred variant: auto margins centre the fit-content block on the page.
   The ::after line inherits left-alignment, so it sits under the first letter. */
.section-title--center {
  margin-inline: auto;
  text-align: center;   /* keeps multi-line text centred within the block */
}

/* ---- Utility ------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.text-center { text-align: center; }
.text-gold   { color: var(--color-oro); }
.text-siena  { color: var(--color-siena); }
.text-mid    { color: var(--color-mid); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }

/* ---- Selection brand colour --------------------------- */
::selection {
  background: var(--color-oro);
  color: var(--color-crema);
}

/* ---- Custom scrollbar (Chrome / Edge / Safari) --------- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--color-crema); }
::-webkit-scrollbar-thumb {
  background: rgba(184, 151, 58, 0.35);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--color-oro); }

/* Firefox */
* { scrollbar-width: thin; scrollbar-color: rgba(184, 151, 58, 0.35) var(--color-crema); }

/* ---- Mobile overrides (≤ 600px) ----------------------- */
@media (max-width: 600px) {
  /* Fix 7: reduce section padding so short-content sections feel less cavernous */
  .section {
    padding-block: var(--space-lg);
  }
}
