/**
 * @file
 * Typography styles for Invertir Pro theme.
 *
 * Uses Playfair Display for display/headings and DM Sans for body text.
 */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400;1,9..40,500&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

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

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

/* ========================================
 * HEADINGS
 * ======================================== */

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-display);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-heading);
  margin-bottom: var(--space-md);
}

h1, .h1 {
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-tight);
}

h2, .h2 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-semibold);
}

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

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

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

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

/* Display headings - extra large */
.display-1 {
  font-size: var(--font-size-6xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-tight);
  line-height: 1;
}

.display-2 {
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-tight);
}

/* ========================================
 * BODY TEXT
 * ======================================== */

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

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

.lead {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
}

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

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

/* ========================================
 * LINKS
 * ======================================== */

a {
  color: var(--color-text-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

a:hover {
  color: var(--color-peach-dark);
  text-decoration-color: var(--color-peach);
}

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

/* Links without underline */
.link-clean {
  text-decoration: none;
}

.link-clean:hover {
  text-decoration: underline;
}

/* ========================================
 * LISTS
 * ======================================== */

ul, ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

li {
  margin-bottom: var(--space-xs);
}

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

/* Unstyled list */
.list-unstyled {
  list-style: none;
  padding-left: 0;
}

.list-unstyled li {
  margin-bottom: 0;
}

/* Inline list */
.list-inline {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.list-inline li {
  margin-bottom: 0;
}

/* ========================================
 * BLOCKQUOTES
 * ======================================== */

blockquote {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-style: italic;
  color: var(--color-text-secondary);
  border-left: 4px solid var(--color-peach);
  padding-left: var(--space-lg);
  margin: var(--space-xl) 0;
}

blockquote cite {
  display: block;
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-style: normal;
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
}

blockquote cite::before {
  content: '— ';
}

/* ========================================
 * CODE & PRE
 * ======================================== */

code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
}

code {
  background-color: var(--color-bg-gray);
  padding: var(--space-3xs) var(--space-2xs);
  border-radius: var(--radius-sm);
}

pre {
  background-color: var(--color-bg-gray);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: var(--space-md);
}

pre code {
  background: none;
  padding: 0;
}

/* ========================================
 * HORIZONTAL RULES
 * ======================================== */

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-xl) 0;
}

.hr-thick {
  border-top-width: 2px;
}

.hr-peach {
  border-top-color: var(--color-peach);
}

/* ========================================
 * TEXT UTILITIES
 * ======================================== */

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

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

.text-lowercase { text-transform: lowercase; }
.text-capitalize { text-transform: capitalize; }

.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-peach { color: var(--color-peach-dark); }
.text-white { color: var(--color-white); }

.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }

.font-light { font-weight: var(--font-weight-light); }
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

/* ========================================
 * TAGLINE/LABEL STYLES
 * ======================================== */

.tagline {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-widest);
  color: var(--color-text-muted);
}

.label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
}

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

.price {
  font-family: var(--font-body);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

.price-large {
  font-size: var(--font-size-3xl);
}

.price-currency {
  font-size: 0.75em;
  font-weight: var(--font-weight-medium);
}
