
/* Critical CSS for LCP optimization */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', '"Fira Sans"', '"Droid Sans"', '"Helvetica Neue"', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #111827;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
}

/* Prevent layout shift for hero section */
.hero-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom right, #dbeafe, #ffffff, #f3e8ff);
}

/* Critical typography with consistent font loading - optimized for German */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  margin: 0 0 1.2rem 0;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
  word-break: keep-all;
  hyphens: auto;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.25;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.3;
}

/* Critical button styles with proper font weight */
.btn-primary {
  background: linear-gradient(to right, #059669, #2563eb);
  color: white;
  padding: 1rem 2rem;
  border-radius: 9999px;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.btn-primary:hover {
  transform: scale(1.05);
}

/* Optimize images for CLS prevention */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Loading skeleton to prevent CLS */
.image-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 8px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Navigation optimization */
nav {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
}

/* Mobile optimization - German text considerations */
@media (max-width: 768px) {
  .hero-container {
    padding: 1rem;
    min-height: 90vh;
  }
  
  h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.15;
  }
  
  h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    line-height: 1.2;
  }
  
  /* Adjust for longer German words on mobile */
  body {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* Font loading optimization - prevent FOIT with proper fallbacks */
@font-face {
  font-family: 'Inter';
  font-display: swap;
  src: local('Inter');
}

@font-face {
  font-family: 'Playfair Display';
  font-display: swap;
  src: local('Playfair Display');
}

/* German language specific optimizations */
:lang(de) h1,
:lang(de) h2,
:lang(de) h3 {
  word-break: keep-all;
  hyphens: auto;
  letter-spacing: -0.01em;
}

:lang(de) p {
  line-height: 1.75;
  word-spacing: 0.05em;
}
