/**
 * OYROPA Typography System
 * Konsistente, responsive Typografie für alle Überschriften und Texte
 * Version 1.0
 */

/* ================================ */
/* SCHRIFTARTEN LADEN              */
/* ================================ */

/* Inter Font von Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Poppins für Überschriften */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

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

/* Body Text */
body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--gray-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================================ */
/* HEADING SYSTEM                  */
/* ================================ */

/* Alle Überschriften */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--oyropa-navy);
  margin: 0 0 var(--space-4) 0;
  scroll-margin-top: var(--space-20);
}

/* H1 - Hauptüberschrift */
h1 {
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-6);
}

/* H2 - Sektionsüberschrift */
h2 {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-5);
}

/* H3 - Unterbereichsüberschrift */
h3 {
  font-size: var(--text-3xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
}

/* H4 - Kartenüberschrift */
h4 {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-3);
}

/* H5 - Kleine Überschrift */
h5 {
  font-size: var(--text-xl);
  font-weight: var(--font-medium);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-3);
}

/* H6 - Kleinste Überschrift */
h6 {
  font-size: var(--text-lg);
  font-weight: var(--font-medium);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ================================ */
/* PARAGRAPH & TEXT SYSTEM         */
/* ================================ */

/* Standard Paragraph */
p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
  max-width: 68ch; /* Optimale Lesbarkeit */
}

/* Lead Paragraph */
.lead {
  font-size: var(--text-xl);
  font-weight: var(--font-normal);
  line-height: var(--leading-relaxed);
  color: var(--gray-700);
  margin-bottom: var(--space-6);
}

/* Small Text */
.text-small, small {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--gray-600);
}

/* Extra Small Text */
.text-xs {
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  color: var(--gray-500);
}

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

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

/* Text Colors */
.text-navy { color: var(--oyropa-navy); }
.text-gold { color: var(--oyropa-gold); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }
.text-muted { color: var(--gray-600); }

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

/* Text Transform */
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

/* Letter Spacing */
.tracking-tight { letter-spacing: -0.025em; }
.tracking-normal { letter-spacing: 0; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }

/* ================================ */
/* LINK SYSTEM                     */
/* ================================ */

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

a:hover {
  color: var(--oyropa-navy-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--oyropa-gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Link Varianten */
.link-gold {
  color: var(--oyropa-gold);
}

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

.link-subtle {
  color: var(--gray-600);
  text-decoration: underline;
  text-decoration-color: var(--gray-300);
}

.link-subtle:hover {
  color: var(--gray-900);
  text-decoration-color: var(--gray-600);
}

/* ================================ */
/* LIST SYSTEM                     */
/* ================================ */

/* Unordered Lists */
ul {
  margin: 0 0 var(--space-4) 0;
  padding-left: var(--space-6);
}

ul li {
  margin-bottom: var(--space-2);
  line-height: var(--leading-relaxed);
}

/* Ordered Lists */
ol {
  margin: 0 0 var(--space-4) 0;
  padding-left: var(--space-6);
}

ol li {
  margin-bottom: var(--space-2);
  line-height: var(--leading-relaxed);
}

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

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

/* ================================ */
/* QUOTE SYSTEM                    */
/* ================================ */

/* Blockquote */
blockquote {
  margin: var(--space-8) 0;
  padding: var(--space-6);
  border-left: 4px solid var(--oyropa-gold);
  background-color: var(--gray-50);
  border-radius: var(--radius-lg);
  font-style: italic;
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

blockquote p {
  margin-bottom: 0;
}

blockquote cite {
  display: block;
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  font-style: normal;
  color: var(--gray-600);
}

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

/* ================================ */
/* CODE SYSTEM                     */
/* ================================ */

/* Inline Code */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background-color: var(--gray-100);
  color: var(--gray-800);
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius-sm);
}

/* Code Blocks */
pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background-color: var(--gray-900);
  color: var(--gray-100);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: var(--space-6) 0;
}

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

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

/* Mobile Optimierungen */
@media (max-width: 48rem) {
  h1 {
    font-size: var(--text-4xl);
    line-height: var(--leading-tight);
  }

  h2 {
    font-size: var(--text-3xl);
    line-height: var(--leading-tight);
  }

  h3 {
    font-size: var(--text-2xl);
    line-height: var(--leading-normal);
  }

  p {
    max-width: none; /* Volle Breite auf Mobile */
  }

  /* Verbesserte Touch-Targets für Links */
  a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* Tablet Optimierungen */
@media (min-width: 48rem) and (max-width: 64rem) {
  h1 {
    font-size: var(--text-4xl);
  }

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

/* ================================ */
/* SPECIAL TYPOGRAPHY CLASSES      */
/* ================================ */

/* Hero Title */
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--oyropa-navy);
  margin-bottom: var(--space-6);
  text-align: center;
}

/* Feature Title */
.feature-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  color: var(--oyropa-navy);
  margin-bottom: var(--space-3);
  text-align: center;
}

/* Card Title */
.card-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--oyropa-navy);
  margin-bottom: var(--space-2);
}

/* Section Title */
.section-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--oyropa-navy);
  text-align: center;
  margin-bottom: var(--space-8);
}

/* Subtitle */
.subtitle {
  font-size: var(--text-lg);
  color: var(--gray-600);
  text-align: center;
  margin-bottom: var(--space-6);
}

/* Badge Text */
.badge-text {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ================================ */
/* ACCESSIBILITY ENHANCEMENTS      */
/* ================================ */

/* Screen Reader Friendly Headings */
.sr-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Styles für Typografie-Elemente */
h1:focus,
h2:focus,
h3:focus,
h4:focus,
h5:focus,
h6:focus {
  outline: 2px solid var(--oyropa-gold);
  outline-offset: 2px;
}

/* ================================ */
/* PRINT OPTIMIERUNG               */
/* ================================ */

@media print {
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
  }

  p {
    orphans: 3;
    widows: 3;
  }

  blockquote {
    page-break-inside: avoid;
  }
}