/* ==========================================================================
   AlamoSites - Base Styles
   ========================================================================== */

/* ========================================
   RESET
   ======================================== */

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  color: var(--color-soft-gray);
  background-color: var(--color-warm-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

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

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

ul,
ol {
  list-style: none;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  color: var(--color-deep-slate);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
}

/* Display/Hero - Playfair */
.text-hero {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

/* Section Titles - Playfair */
h1,
.text-h1 {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  letter-spacing: var(--tracking-tight);
}

h2,
.text-h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
}

/* Subheadings - Source Sans */
h3,
.text-h3 {
  font-family: var(--font-body);
  font-size: var(--text-h3);
  font-weight: var(--weight-semibold);
}

h4,
.text-h4 {
  font-family: var(--font-body);
  font-size: var(--text-h4);
  font-weight: var(--weight-semibold);
}

/* Body Text */
p {
  margin-bottom: var(--space-md);
}

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

.text-body-lg {
  font-size: var(--text-body-lg);
}

.text-small {
  font-size: var(--text-small);
}

.text-xs {
  font-size: var(--text-xs);
}

/* Links */
.link {
  color: var(--color-river-teal);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

.link:hover {
  color: var(--color-terracotta);
}

/* Section Label (eyebrow text) */
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-sage);
  margin-bottom: var(--space-md);
}

/* Lead/Subtitle text */
.text-lead {
  font-size: var(--text-body-lg);
  color: var(--color-soft-gray);
  max-width: 600px;
}

/* Playfair numbers for stats */
.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  font-weight: var(--weight-bold);
  color: var(--color-deep-slate);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

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

/* Text Colors */
.text-slate { color: var(--color-deep-slate); }
.text-teal { color: var(--color-river-teal); }
.text-terracotta { color: var(--color-terracotta); }
.text-sage { color: var(--color-sage); }
.text-muted { color: var(--color-soft-gray); }
.text-white { color: var(--color-white); }

/* Background Colors */
.bg-white { background-color: var(--color-white); }
.bg-warm-white { background-color: var(--color-warm-white); }
.bg-sandstone { background-color: var(--color-sandstone); }
.bg-slate { background-color: var(--color-deep-slate); }
.bg-charcoal { background-color: var(--color-charcoal); }

/* Spacing Utilities */
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* Display */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }

/* Flex Utilities */
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* Width */
.w-full { width: 100%; }
.max-w-narrow { max-width: var(--container-narrow); }
.max-w-container { max-width: var(--container-max); }

/* Accessibility */
.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;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-deep-slate);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  z-index: var(--z-tooltip);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-md);
}

/* Focus States */
:focus-visible {
  outline: 2px solid var(--color-terracotta);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-terracotta);
  outline-offset: 2px;
}
