/* ==========================================================================
   Base Styles - Sagra del Borgo Antico di Montefiore
   Global element styles, typography defaults, and utility classes.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Body
   -------------------------------------------------------------------------- */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-dark);
  background-color: var(--color-warm-white);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Headings
   Display font with proper scale and weight for rustic-elegant feel.
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-charcoal);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

/* --------------------------------------------------------------------------
   Paragraphs and body text
   -------------------------------------------------------------------------- */
p {
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Links
   Primary color with underline appearing on hover.
   -------------------------------------------------------------------------- */
a {
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

a:hover,
a:focus-visible {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Selection
   Branded selection highlight using primary terracotta.
   -------------------------------------------------------------------------- */
::selection {
  background-color: var(--color-primary);
  color: var(--color-warm-white);
}

::-moz-selection {
  background-color: var(--color-primary);
  color: var(--color-warm-white);
}

/* --------------------------------------------------------------------------
   Images
   -------------------------------------------------------------------------- */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   Container
   Centered content wrapper with responsive horizontal padding.
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

/* Wide container variant for full-bleed sections */
.container--wide {
  max-width: var(--container-wide);
}

/* Narrow container variant for focused content (articles, forms) */
.container--narrow {
  max-width: var(--container-narrow);
}

/* --------------------------------------------------------------------------
   Screen-reader only
   Visually hidden but accessible to assistive technologies.
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Text alignment utilities
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* --------------------------------------------------------------------------
   Misc base styles
   -------------------------------------------------------------------------- */
strong, b {
  font-weight: 700;
}

em, i {
  font-style: italic;
}

blockquote {
  border-left: 4px solid var(--color-primary-light);
  padding-left: var(--space-lg);
  font-style: italic;
  color: var(--color-stone);
  margin: var(--space-xl) 0;
}

hr {
  border: none;
  height: 1px;
  background-color: var(--color-stone);
  opacity: 0.2;
  margin: var(--space-2xl) 0;
}
