/* ============================================================
   desha.at — main.css
   Global: Custom Properties · Reset · Base · Typography · Utils
   ============================================================ */

/* ------------------------------------------------------------
   1. CUSTOM PROPERTIES
   ------------------------------------------------------------ */
:root {
  /* Colors — DESHA Brand Guide */
  --color-primary:    #38489B;   /* Brand Blau */
  --color-secondary:  #65C58C;   /* Brand Grün/Mint */
  --color-accent:     #38489B;   /* Brand Blau */
  --color-bg:         #FAFBFC;   /* Fast Weiß mit leichtem Blau-Ton */
  --color-surface:    #E5ECEF;   /* Brand Hell-Blau-Grau */
  --color-text:       #494949;   /* Brand Charcoal */
  --color-text-muted: #7A8A9A;   /* Gedämpft, kühler Ton */
  --color-border:     rgba(56, 72, 155, 0.12); /* Hauch Brand Blau */
  --color-white:      #FFFFFF;

  /* Typography — DESHA Brand Guide */
  --font-serif: 'Lato', system-ui, -apple-system, sans-serif;
  --font-sans:  'Montserrat', system-ui, -apple-system, sans-serif;

  /* Font Sizes — fluid, clamp-basiert */
  --text-xs:   clamp(0.75rem,  1.2vw, 0.8rem);
  --text-sm:   clamp(0.875rem, 1.5vw, 0.95rem);
  --text-base: clamp(1rem,     1.8vw, 1.1rem);
  --text-lg:   clamp(1.125rem, 2vw,   1.25rem);
  --text-xl:   clamp(1.3rem,   2.5vw, 1.5rem);
  --text-2xl:  clamp(1.5rem,   3vw,   2rem);
  --text-3xl:  clamp(1.875rem, 4vw,   2.5rem);
  --text-4xl:  clamp(2.25rem,  5vw,   3.2rem);
  --text-5xl:  clamp(2.75rem,  6.5vw, 4.2rem);

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: clamp(4rem, 8vw, 8rem);
  --space-3xl: clamp(6rem, 12vw, 12rem);

  /* Layout */
  --max-width:       1200px;
  --max-width-text:  720px;
  --container-px:    clamp(1.25rem, 5vw, 3.5rem);

  /* Border Radius */
  --radius-sm:   4px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-full: 100px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(44, 34, 24, 0.06);
  --shadow-md:  0 8px 24px rgba(44, 34, 24, 0.09);
  --shadow-lg:  0 20px 48px rgba(44, 34, 24, 0.12);
  --shadow-hover: 0 24px 56px rgba(44, 34, 24, 0.14);

  /* Transitions */
  --transition-fast:   0.2s ease;
  --transition:        0.3s ease;
  --transition-slow:   0.6s ease;
}


/* ------------------------------------------------------------
   2. MODERN CSS RESET
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  hanging-punctuation: first last;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.8;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, 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;
}

ul[role="list"], ol[role="list"] {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* 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;
  }
}


/* ------------------------------------------------------------
   3. TYPOGRAPHY
   ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

h1 { font-size: var(--text-4xl); font-weight: 300; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  font-size: var(--text-base);
  line-height: 1.85;
  color: var(--color-text);
  max-width: 68ch;
}

p + p {
  margin-top: var(--space-md);
}

strong {
  font-weight: 500;
}

em {
  font-family: var(--font-serif);
  font-style: italic;
}

blockquote {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-style: italic;
  font-weight: 300;
  line-height: 1.5;
  color: var(--color-primary);
  padding-left: var(--space-lg);
  border-left: 2px solid var(--color-primary);
}

/* Kicker / Label über Überschriften */
.kicker {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  display: block;
  margin-bottom: var(--space-sm);
}

/* Lead-Text (größere Einleitung) */
.lead {
  font-size: var(--text-lg);
  font-weight: 300;
  line-height: 1.75;
  color: var(--color-text-muted);
  max-width: 60ch;
}


/* ------------------------------------------------------------
   4. LAYOUT UTILITIES
   ------------------------------------------------------------ */

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

/* Container schmal (Text-Seiten) */
.u-container--narrow {
  max-width: var(--max-width-text);
}

/* Section-Spacing */
.u-section {
  padding-block: var(--space-2xl);
}

.u-section--lg {
  padding-block: var(--space-3xl);
}

/* Hintergründe für alternierende Sektionen */
.u-bg-surface {
  background-color: var(--color-surface);
}

.u-bg-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.u-bg-primary h1,
.u-bg-primary h2,
.u-bg-primary h3,
.u-bg-primary p {
  color: var(--color-white);
}

/* Grid Utilities */
.u-grid {
  display: grid;
  gap: var(--space-lg);
}

.u-grid--2 { grid-template-columns: repeat(2, 1fr); }
.u-grid--3 { grid-template-columns: repeat(3, 1fr); }
.u-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Flex Utilities */
.u-flex { display: flex; }
.u-flex--center { align-items: center; justify-content: center; }
.u-flex--between { align-items: center; justify-content: space-between; }

/* Text alignment */
.u-text-center { text-align: center; }
.u-text-center p { margin-inline: auto; }

/* Spacer */
.u-spacer-sm  { height: var(--space-sm); }
.u-spacer-md  { height: var(--space-md); }
.u-spacer-lg  { height: var(--space-lg); }

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


/* ------------------------------------------------------------
   5. DIVIDER / DEKORATIVE TRENNELEMENTE
   ------------------------------------------------------------ */
.u-divider {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin-block: var(--space-xl);
}

/* Organische Wellen-Trennlinie */
.u-wave {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.u-wave svg {
  display: block;
  width: 100%;
  height: auto;
}


/* ------------------------------------------------------------
   6. SCROLL-ANIMATIONEN
   ------------------------------------------------------------ */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in--delay-1 { transition-delay: 0.1s; }
.fade-in--delay-2 { transition-delay: 0.2s; }
.fade-in--delay-3 { transition-delay: 0.3s; }
.fade-in--delay-4 { transition-delay: 0.4s; }


/* ------------------------------------------------------------
   7. FOCUS STYLES (Accessibility)
   ------------------------------------------------------------ */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
