/**
 * MyInvest24 Critical CSS
 * Version: 1.0.0
 * 
 * Diese CSS-Datei enthält nur die kritischen Styles für Above-the-Fold Inhalte.
 * Sie wird inline im <head> eingebunden für schnelleres First Contentful Paint (FCP).
 * 
 * Enthält:
 * - CSS Reset (minimal)
 * - Typography (minimal)
 * - Header
 * - Hero Section
 * - Buttons
 */

/* CSS Variables - Kritisch */
:root {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --accent: #0ea5e9;
  --accent-dark: #0284c7;
  --accent-light: #38bdf8;
  --text: #0f172a;
  --text-light: #475569;
  --text-white: #ffffff;
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --border-light: #e2e8f0;
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-accent: 0 8px 24px rgba(14, 165, 233, 0.25);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container-padding: 1.25rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --transition-base: 200ms ease;
  --touch-target-min: 48px;
}

@media (min-width: 768px) {
  :root { --container-padding: 2rem; }
}

@media (min-width: 1024px) {
  :root { --container-padding: 2.5rem; }
}

/* Reset - Minimal */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  /* scroll-behavior: smooth entfernt - verursacht ruckeliges Scrolling */
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg-white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* Typography - Critical */
h1, h2, h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }

@media (min-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.875rem; }
}

@media (min-width: 1024px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* Header - Critical */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  height: 72px;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  height: 100%;
}

.header__logo {
  display: flex;
  align-items: center;
  height: 100%;
  z-index: 10;
}

.header__logo img {
  height: 40px;
  width: auto;
  max-width: 155px;
}

.header__nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 1024px) {
  .header__nav { display: flex; }
}

.header__link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 0.5rem;
  transition: all 150ms ease;
  min-height: var(--touch-target-min);
}

.header__link:hover {
  color: var(--accent);
  background: var(--bg-light);
}

.header__cta {
  display: none;
  min-height: 44px;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--text-white);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

@media (min-width: 1024px) {
  .header__cta {
    display: flex;
    align-items: center;
  }
}

.header__cta:hover {
  box-shadow: var(--shadow-accent);
  transform: translateY(-2px);
}

.header__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10;
}

@media (min-width: 1024px) {
  .header__toggle { display: none; }
}

.header__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.header__toggle span:nth-child(1) { margin-bottom: 6px; }
.header__toggle span:nth-child(3) { margin-top: 6px; }

.main-content { padding-top: 72px; }

/* Hero - Critical */
.hero {
  position: relative;
  padding: 4rem 0 3rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--text-white);
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero { padding: 5rem 0 4rem; }
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero__title {
  font-size: 1.875rem;
  color: var(--text-white);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .hero__title { font-size: 2.25rem; }
}

@media (min-width: 1024px) {
  .hero__title { font-size: 3rem; }
}

.hero__subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  max-width: 560px;
}

@media (min-width: 768px) {
  .hero__subtitle { font-size: 1.25rem; }
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .hero__actions { flex-direction: row; }
}

/* Buttons - Critical */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--touch-target-min);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  -webkit-appearance: none;
  appearance: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--text-white);
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  box-shadow: var(--shadow-accent);
  transform: translateY(-2px);
}

.btn--secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn--secondary:hover {
  background: var(--accent);
  color: var(--text-white);
}

.btn--lg {
  min-height: 56px;
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn--full { width: 100%; }

@media (min-width: 640px) {
  .btn--full-mobile { width: auto; }
}

.btn svg {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  background: var(--accent);
  color: var(--text-white);
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 0.5rem 0.5rem;
  font-weight: 600;
  z-index: 9999;
  transition: transform var(--transition-base);
}

.skip-link:focus {
  transform: translateX(-50%) translateY(0);
}

/* Loading State */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
}

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

