/* ============================================================
   SAPORITALIA — BASE
   Reset, typography, and the marble/cream grounds.
   ============================================================ */

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

* { margin: 0; }

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

body {
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  /* The signature: full-bleed marbled oxblood ground. */
  background-color: var(--marble-dark);
  background-image: var(--ground-oxblood);
  background-repeat: no-repeat;
  min-height: 100vh;
}

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }

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

ul, ol { list-style: none; padding: 0; }

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

:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

/* ---- Headings ------------------------------------------- */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: 0.01em;
}

/* ---- Reusable type utilities ---------------------------- */
.display {
  font-size: var(--fs-h1);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tagline {
  font-family: var(--font-script);
  font-size: var(--fs-tagline);
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
}

.caps {
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-weight: 600;
}
.caps-sm {
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps-sm);
  font-weight: 600;
  font-size: var(--fs-small);
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
}

.script-accent {
  font-family: var(--font-script);
  font-weight: 400;
}

.center { text-align: center; }

/* Fleuron hairline divider (the one incidental glyph) */
.fleuron {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  color: var(--ink);
  margin: var(--sp-3) auto;
}
.fleuron::before,
.fleuron::after {
  content: "";
  height: 1px;
  width: min(120px, 22vw);
  background: currentColor;
  opacity: 0.55;
}
.fleuron span { font-size: 1.2rem; line-height: 1; }

/* ---- Layout helpers ------------------------------------- */
.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, var(--maxw-narrow)); margin-inline: auto; }

.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section-tight { padding-block: clamp(2rem, 4vw, 3.5rem); }

.stack > * + * { margin-top: var(--sp-3); }

/* Screen-reader only */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
