/* ============================================================
   base.css — Globale Variablen, Reset & Typografie
   hundeurlauber.de
   ============================================================ */

/* ----------------------------------------------------------
   1. CSS Custom Properties (Design Tokens)
   ---------------------------------------------------------- */
:root {
  /* Hauptfarben */
  --color-primary:       #1a5f7a;   /* Tiefes Petrol – Hauptfarbe */
  --color-primary-dark:  #134a60;   /* Dunkleres Petrol – Hover */
  --color-primary-light: #2980a0;   /* Helles Petrol – Akzente */

  --color-accent:        #e8845c;   /* Warmes Orange – Call-to-Action */
  --color-accent-dark:   #d06840;   /* Dunkleres Orange – Hover */
  --color-accent-light:  #f5a882;   /* Helles Orange – Highlights */

  --color-sand:          #f5f0e8;   /* Warmes Sand – Hintergründe */
  --color-sand-dark:     #ece5d8;   /* Etwas dunkleres Sand */
  --color-sand-light:    #faf8f4;   /* Fast Weiß mit Wärme */

  --color-text:          #1c2b35;   /* Sehr dunkles Blau-Grau – Haupttext */
  --color-text-muted:    #5a7080;   /* Gedämpftes Blau-Grau – Nebentext */
  --color-text-light:    #8fa8b5;   /* Helles Blau-Grau – Platzhalter */

  --color-white:         #ffffff;
  --color-black:         #0d1a21;

  /* Badges / Status */
  --color-success:       #2e9e6b;
  --color-warning:       #e8b84b;
  --color-error:         #d94f4f;

  /* Hintergründe */
  --bg-page:             var(--color-sand-light);
  --bg-card:             var(--color-white);
  --bg-section-alt:      var(--color-sand);

  /* Typografie */
  --font-display:  'Playfair Display', Georgia, serif;  /* Headlines */
  --font-body:     'DM Sans', 'Segoe UI', sans-serif;   /* Fließtext */
  --font-mono:     'JetBrains Mono', monospace;

  --text-xs:    0.75rem;    /*  12px */
  --text-sm:    0.875rem;   /*  14px */
  --text-base:  1rem;       /*  16px */
  --text-md:    1.125rem;   /*  18px */
  --text-lg:    1.25rem;    /*  20px */
  --text-xl:    1.5rem;     /*  24px */
  --text-2xl:   2rem;       /*  32px */
  --text-3xl:   2.5rem;     /*  40px */
  --text-4xl:   3.25rem;    /*  52px */
  --text-5xl:   4rem;       /*  64px */

  --line-height-tight:   1.2;
  --line-height-normal:  1.6;
  --line-height-relaxed: 1.8;

  --font-weight-normal:   400;
  --font-weight-medium:   500;
  --font-weight-semibold: 600;
  --font-weight-bold:     700;

  /* Abstände */
  --space-1:   0.25rem;   /*  4px */
  --space-2:   0.5rem;    /*  8px */
  --space-3:   0.75rem;   /* 12px */
  --space-4:   1rem;      /* 16px */
  --space-5:   1.25rem;   /* 20px */
  --space-6:   1.5rem;    /* 24px */
  --space-8:   2rem;      /* 32px */
  --space-10:  2.5rem;    /* 40px */
  --space-12:  3rem;      /* 48px */
  --space-16:  4rem;      /* 64px */
  --space-20:  5rem;      /* 80px */
  --space-24:  6rem;      /* 96px */

  /* Layout */
  --container-max:    1200px;
  --container-wide:   1400px;
  --container-narrow: 800px;

  /* Border Radius */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   32px;
  --radius-full: 9999px;

  /* Schatten */
  --shadow-sm:   0 1px 3px rgba(26, 95, 122, 0.08), 0 1px 2px rgba(26, 95, 122, 0.04);
  --shadow-md:   0 4px 16px rgba(26, 95, 122, 0.10), 0 2px 6px rgba(26, 95, 122, 0.06);
  --shadow-lg:   0 12px 40px rgba(26, 95, 122, 0.14), 0 4px 12px rgba(26, 95, 122, 0.08);
  --shadow-xl:   0 24px 64px rgba(26, 95, 122, 0.18), 0 8px 24px rgba(26, 95, 122, 0.10);

  /* Übergänge */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* Z-Index Ebenen */
  --z-base:     1;
  --z-dropdown: 100;
  --z-nav:      200;
  --z-modal:    300;
  --z-toast:    400;
}

/* ----------------------------------------------------------
   2. CSS Reset (Modern Minimal Reset)
   ---------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  /* Smooth Scrolling für Anker-Links */
  scroll-behavior: smooth;
  /* Verhindert horizontales Überlaufen */
  overflow-x: hidden;
  /* Text-Größe auf iOS fixieren */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--bg-page);
  overflow-x: hidden;
  /* Subpixel Anti-Aliasing für schärfere Schriften */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Listen-Styles entfernen */
ul, ol {
  list-style: none;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

/* Bilder responsiv */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Formular-Elemente erben Schrift */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}

/* Buttons */
button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Tabellen */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Paragraphen & Überschriften */
p {
  max-width: 70ch; /* Lesbarkeit: max. ~70 Zeichen pro Zeile */
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  max-width: 100%;
}

/* ----------------------------------------------------------
   3. Google Fonts Import
   ---------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800&family=DM+Sans:wght@400;500;600;700&display=swap');

/* ----------------------------------------------------------
   4. Typografie-Klassen
   ---------------------------------------------------------- */

/* Überschriften */
.heading-xl {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.heading-lg {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl));
  font-weight: var(--font-weight-bold);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.heading-md {
  font-family: var(--font-display);
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl));
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
}

.heading-sm {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
}

/* Text-Utilities */
.text-muted   { color: var(--color-text-muted); }
.text-accent  { color: var(--color-accent); }
.text-primary { color: var(--color-primary); }
.text-white   { color: var(--color-white); }

/* ----------------------------------------------------------
   5. Layout-Utilities
   ---------------------------------------------------------- */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--wide {
  max-width: var(--container-wide);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* Flex Utilities */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }
.gap-2        { gap: var(--space-2); }
.gap-4        { gap: var(--space-4); }
.gap-6        { gap: var(--space-6); }
.gap-8        { gap: var(--space-8); }

/* Grid */
.grid { display: grid; }

/* Abstands-Utilities */
.mt-4  { margin-top: var(--space-4); }
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-8  { margin-bottom: var(--space-8); }

/* ----------------------------------------------------------
   6. Button-Styles (global wiederverwendbar)
   ---------------------------------------------------------- */

/* Basis-Button (wird in allen CSS-Dateien genutzt) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
}

/* Primär-Button (Orange/Accent) */
.btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
  box-shadow: 0 4px 16px rgba(232, 132, 92, 0.30);
}
.btn--primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 132, 92, 0.40);
}
.btn--primary:active {
  transform: translateY(0);
}

/* Sekundär-Button (Petrol) */
.btn--secondary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}
.btn--secondary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-2px);
}

/* Ghost-Button (transparent mit Rand) */
.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--ghost:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Ghost-Button auf dunklem Hintergrund */
.btn--ghost-white {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.6);
}
.btn--ghost-white:hover {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
}

/* Button Größen */
.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}
.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

/* ----------------------------------------------------------
   7. Karten / Cards (global)
   ---------------------------------------------------------- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ----------------------------------------------------------
   8. Badge / Tag Styles
   ---------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--primary {
  background: rgba(26, 95, 122, 0.12);
  color: var(--color-primary);
}

.badge--accent {
  background: rgba(232, 132, 92, 0.15);
  color: var(--color-accent-dark);
}

.badge--success {
  background: rgba(46, 158, 107, 0.12);
  color: var(--color-success);
}

/* ----------------------------------------------------------
   9. Trennlinien / Divider
   ---------------------------------------------------------- */
.divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-sand-dark),
    transparent
  );
  margin-block: var(--space-8);
  border: none;
}

/* ----------------------------------------------------------
   10. Hilfreich: Screenreader-only (Barrierefreiheit)
   ---------------------------------------------------------- */
.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;
}

/* ----------------------------------------------------------
   11. Sektions-Abstände (konsistent auf allen Seiten)
   ---------------------------------------------------------- */
.section {
  padding-block: var(--space-20);
}

.section--sm {
  padding-block: var(--space-12);
}

.section--lg {
  padding-block: var(--space-24);
}

/* Wechselnde Hintergrundfarben für Sektionen */
.section--alt {
  background-color: var(--bg-section-alt);
}

.section--dark {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* ----------------------------------------------------------
   12. Animations (global, wiederholt genutzt)
   ---------------------------------------------------------- */

/* Einblende-Animation beim Laden */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.04); }
}

/* Wiederverwendbare Animationsklassen */
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease both;
}

.animate-fade-in {
  animation: fadeIn 0.4s ease both;
}

/* Verzögerungen für gestaffeltes Einblenden */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ----------------------------------------------------------
   13. Responsive Breakpoints (als Kommentar-Referenz)
   ---------------------------------------------------------- */
/*
  Breakpoints (Mobile First):
  xs:  < 480px   → Kleine Handys
  sm:  ≥ 480px   → Große Handys
  md:  ≥ 768px   → Tablets
  lg:  ≥ 1024px  → Kleine Desktops
  xl:  ≥ 1280px  → Große Desktops
  2xl: ≥ 1440px  → Sehr große Bildschirme

  Verwendung in anderen CSS-Dateien:
  @media (min-width: 768px)  { ... }  → ab Tablet
  @media (min-width: 1024px) { ... }  → ab Desktop
*/

/* ----------------------------------------------------------
   14. Fokus-Styles (Barrierefreiheit / Accessibility)
   ---------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Fokus-Ring für Buttons */
.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* ----------------------------------------------------------
   15. Scrollbar-Styling (Webkit-Browser: Chrome, Safari)
   ---------------------------------------------------------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-sand);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary-light);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}