/* Base Styles - Reset, Typography, Utilities */

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

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  background-color: var(--color-background);
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--color-text);
  letter-spacing: var(--tracking-tight);
}

h1 {
  font-size: var(--text-4xl);
}

h2 {
  font-size: var(--text-3xl);
  font-weight: var(--font-semibold);
}

h3 {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
}

h4 {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
}

h5 {
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
}

h6 {
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

@media (min-width: 768px) {
  h1 {
    font-size: var(--text-5xl);
  }

  h2 {
    font-size: var(--text-4xl);
  }

  h3 {
    font-size: var(--text-3xl);
  }
}

@media (min-width: 1024px) {
  h1 {
    font-size: var(--text-6xl);
  }
}

p {
  margin-bottom: var(--space-md);
}

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

/* Links */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-dark);
}

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

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

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

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

/* Selection */
::selection {
  background-color: var(--color-sage-muted);
  color: var(--color-charcoal);
}

/* =================== DECORATIVE ELEMENTS =================== */

/* Elegant divider line */
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-border-dark),
    transparent
  );
}

/* Accent line (gold) */
.accent-line {
  width: 60px;
  height: 2px;
  background-color: var(--color-gold);
  margin: var(--space-md) 0;
}

.accent-line-center {
  margin-left: auto;
  margin-right: auto;
}

/* Decorative corner flourish */
.flourish {
  position: relative;
}

.flourish::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  width: 24px;
  height: 24px;
  border-top: 2px solid var(--color-sage);
  border-left: 2px solid var(--color-sage);
}

.flourish::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-bottom: 2px solid var(--color-sage);
  border-right: 2px solid var(--color-sage);
}

/* =================== LAYOUT =================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.container-narrow {
  max-width: var(--container-narrow);
}

/* Section Spacing */
.section {
  padding: var(--space-3xl) 0;
}

@media (min-width: 768px) {
  .section {
    padding: var(--space-4xl) 0;
  }
}

@media (min-width: 1024px) {
  .section {
    padding: var(--space-5xl) 0;
  }
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
  .section-header {
    margin-bottom: var(--space-3xl);
  }
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-family: var(--font-accent);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
}

@media (min-width: 768px) {
  .section-subtitle {
    font-size: var(--text-xl);
    max-width: 700px;
  }
}

@media (min-width: 1024px) {
  .section-subtitle {
    max-width: 800px;
  }
}

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

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

/* Text Colors */
.text-muted { color: var(--color-text-muted); }
.text-light { color: var(--color-text-light); }
.text-white { color: var(--color-white); }
.text-gold { color: var(--color-gold); }
.text-sage { color: var(--color-sage); }

/* Font Styles */
.font-heading { font-family: var(--font-heading); }
.font-accent { font-family: var(--font-accent); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; letter-spacing: var(--tracking-wider); }

/* Background Colors */
.bg-white { background-color: var(--color-white); }
.bg-cream { background-color: var(--color-cream); }
.bg-linen { background-color: var(--color-linen); }
.bg-sage { background-color: var(--color-sage); }
.bg-sage-subtle { background-color: var(--color-sage-subtle); }
.bg-iron-ore { background-color: var(--color-iron-ore); }

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

/* Grid */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

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

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

.hidden { display: none !important; }

@media (max-width: 767px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 768px) {
  .hide-tablet-up { display: none !important; }
}

@media (min-width: 1024px) {
  .hide-desktop { display: none !important; }
}
