/* ═══════════════════════════════════════════════════════════════════
   Ashford & Grey - Typography System
   ═══════════════════════════════════════════════════════════════════

   Purpose: Typographic hierarchy and text styling.
   Uses system serif fonts for editorial luxury, system sans for functional UI.

   ═══════════════════════════════════════════════════════════════════ */

/* ═══ Font Family Definitions ═══ */
:root {
  --font-editorial: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

/* ═══ Base Typography ═══ */
body {
  font-family: var(--font-ui);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══ Editorial Headings (Luxury/Brand) ═══ */
.heading-editorial {
  font-family: var(--font-editorial);
  font-weight: var(--font-weight-light);
  letter-spacing: var(--letter-spacing-wide);
  line-height: var(--line-height-tight);
}

h1,
.h1 {
  font-family: var(--font-editorial);
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-light);
  letter-spacing: var(--letter-spacing-wide);
  line-height: var(--line-height-tight);
}

h2,
.h2 {
  font-family: var(--font-editorial);
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-light);
  letter-spacing: var(--letter-spacing-wide);
  line-height: var(--line-height-tight);
}

h3,
.h3 {
  font-family: var(--font-editorial);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-normal);
  letter-spacing: var(--letter-spacing-wide);
  line-height: var(--line-height-tight);
}

/* ═══ Functional Headings (UI/Navigation) ═══ */
.heading-ui {
  font-family: var(--font-ui);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-normal);
}

h4,
.h4 {
  font-family: var(--font-ui);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-normal);
}

h5,
.h5 {
  font-family: var(--font-ui);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-normal);
}

h6,
.h6 {
  font-family: var(--font-ui);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
}

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

.text-lg {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
}

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

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

/* ═══ Text Modifiers ═══ */
.text-muted {
  color: var(--text-muted);
}

.text-subtle {
  color: var(--text-subtle);
}

.text-on-navy {
  color: var(--text-on-navy);
}

.text-center {
  text-align: center;
}

.uppercase {
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
}

/* ═══ Links ═══ */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

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

/* ═══ Responsive Typography ═══ */
@media (max-width: 768px) {
  h1, .h1 {
    font-size: var(--font-size-4xl);
  }

  h2, .h2 {
    font-size: var(--font-size-3xl);
  }

  h3, .h3 {
    font-size: var(--font-size-2xl);
  }
}

@media (max-width: 480px) {
  h1, .h1 {
    font-size: var(--font-size-3xl);
  }

  h2, .h2 {
    font-size: var(--font-size-2xl);
  }

  h3, .h3 {
    font-size: var(--font-size-xl);
  }
}
