/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
  /* Primary Colors */
  --color-primary: #ABBBA8;      /* Salbei - Primary actions, links */
  --color-secondary: #9A9086;    /* Taupe - Background sections */
  --color-accent: #E1AFA2;       /* Lachs - Highlights, CTAs */
  
  /* Neutral Colors */
  --color-text-primary: #2C2C2C;
  --color-text-secondary: #666666;
  --color-background: #FFFFFF;
  --color-background-alt: #F8F8F8;
  --color-background-section: #FAFAFA;
  
  /* Semantic Colors */
  --color-success: #4CAF50;
  --color-warning: #FF9800;
  --color-error: #F44336;
  --color-info: #2196F3;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-secondary: 'Playfair Display', Georgia, serif;
  
  /* Type Scale */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  --text-5xl: 3rem;      /* 48px */
  
  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;
  
  /* Spacing Scale */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  --space-4xl: 6rem;     /* 96px */
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ==========================================================================
   Reset and Base Styles
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-background);
  -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;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-secondary);
  font-weight: 600;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-md);
}

h1 {
  font-size: var(--text-5xl);
  font-weight: 700;
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  margin-bottom: var(--space-md);
  line-height: var(--leading-relaxed);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: color-mix(in srgb, var(--color-primary) 80%, black);
  outline: none;
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid-cols-1 { grid-template-columns: 1fr; }
.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); }

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* ==========================================================================
   Section Styles
   ========================================================================== */

section {
  padding: var(--space-4xl) 0;
}

.section__title {
  text-align: center;
  margin-bottom: var(--space-3xl);
  color: var(--color-text-primary);
  font-family: 'Bilbo Swash Caps', cursive;
  font-size: 3.5rem;
  font-weight: 400;
}

.section__subtitle {
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  text-align: center;
  margin-bottom: var(--space-2xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  line-height: 1;
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--color-primary);
  color: white;
}

.btn--primary:hover,
.btn--primary:focus {
  background-color: color-mix(in srgb, var(--color-primary) 85%, black);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn--secondary {
  background-color: var(--color-secondary);
  color: white;
}

.btn--secondary:hover,
.btn--secondary:focus {
  background-color: color-mix(in srgb, var(--color-secondary) 85%, black);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn--accent {
  background-color: var(--color-accent);
  color: white;
}

.btn--accent:hover,
.btn--accent:focus {
  background-color: color-mix(in srgb, var(--color-accent) 85%, black);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn--outline {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn--outline:hover,
.btn--outline:focus {
  background-color: var(--color-primary);
  color: white;
}

/* ==========================================================================
   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;
}

/* Focus styles */
*:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  a,
  a:visited {
    text-decoration: underline;
  }
  
  img {
    page-break-inside: avoid;
  }
  
  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }
  
  h2,
  h3 {
    page-break-after: avoid;
  }
}


/* ==========================================================================
   Page Templates (Impressum, Datenschutz)
   ========================================================================== */

.page-content {
  padding-top: 180px;
  padding-bottom: var(--space-3xl);
  min-height: 80vh;
}

.page__article {
  max-width: 800px;
  margin: 0 auto;
}

.page__title {
  font-family: 'Bilbo Swash Caps', cursive;
  font-size: 3rem;
  font-weight: 400;
  color: var(--color-primary);
  margin-bottom: var(--space-xl);
}

.page__content h2 {
  font-size: var(--text-2xl);
  color: var(--color-text-primary);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  font-weight: 600;
}

.page__content h3 {
  font-size: var(--text-xl);
  color: var(--color-text-primary);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.page__content h4 {
  font-size: var(--text-lg);
  color: var(--color-text-primary);
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.page__content p {
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.page__content ul {
  color: var(--color-text-secondary);
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.page__content ul li {
  margin-bottom: var(--space-xs);
  line-height: 1.6;
}

.page__content a {
  color: var(--color-primary);
  text-decoration: underline;
}

.page__content a:hover {
  color: var(--color-primary-dark);
}
