/* ============================================================
   MALERBETRIEB LINDEMANN — main.css
   Basis: CSS-Variablen, Reset, Layout, Typography, Utilities
   ============================================================ */

/* --- Lokale Schriften ---------------------------------------- */
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans_18pt-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans_18pt-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans_18pt-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* --- CSS-Variablen ----------------------------------------- */
:root {
  /* ===================================================
     FARBPALETTE — Slate & Copper (02)
     Stand: Juni 2026 / Novus Marketing
     =================================================== */

  /* Kernfarben */
  --color-primary:      #1C2B3A;  /* Deep Slate — Hintergrund, Nav, Dark-Sections */
  --color-primary-mid:  #2E4057;  /* Slate Mid — Sekundärflächen, Karten-Bg */
  --color-primary-light:#4A6080;  /* Slate Light — Hover-Flächen, Borders */

  /* Akzent — Copper */
  --color-accent:       #E07A5F;  /* Copper — CTA-Buttons, Highlights */
  --color-accent-dark:  #B85C38;  /* Copper Dark — Hover-Zustand */
  --color-accent-light: #F2956C;  /* Copper Hell — dezente Akzente */

  /* Neutrale */
  --color-bg:           #F6F4F0;  /* Warm Off-White — Seiten-Hintergrund */
  --color-bg-section:   #EDE9E2;  /* Sand — alternierende Sections */
  --color-white:        #FFFFFF;
  --color-surface:      #FDFCFA;  /* Karten auf hellem Bg */

  /* Text */
  --color-text:         #1C2B3A;  /* Deep Slate — Haupttext */
  --color-text-light:   #F2E8D0;  /* Warm White — Text auf dunklen Flächen */
  --color-muted:        #5A6A7A;  /* Gedämpfter Text auf hell */
  --color-muted-light:  #A8BCC8;  /* Gedämpfter Text auf dunkel */

  /* Borders */
  --color-border:       #DDD8D0;  /* Rahmen auf hell */
  --color-border-dark:  #3A4F64;  /* Rahmen auf dunkel */

  /* Overlay */
  --color-dark-overlay: rgba(28, 43, 58, 0.82);

  /* Legacy-Kompatibilität (werden noch in components.css genutzt) */
  --brand-blue:         #1C2B3A;
  --brand-yellow:       #E07A5F;  /* Copper übernimmt Akzent-Rolle */
  --brand-red:          #B85C38;
  --brand-dark:         #0E1C28;
  --color-secondary:    #4A6080;
  --brand-accent:       #E07A5F;
  --brand-accent-dark:  #B85C38;

  /* Leistungs-Card-Farben — einheitlich aus Palette, kein Regenbogen */
  --card-maler:         #1C2B3A;  /* Deep Slate */
  --card-tapezier:      #243548;  /* Slate Mid dunkel */
  --card-boden:         #2E4057;  /* Slate Mid */
  --card-fassade:       #B85C38;  /* Copper Dark */
  --card-spezial:       #F2E8D0;  /* Warm White */

  /* Typografie */
  --font-display: 'Poppins', system-ui, sans-serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Fluid Typography */
  --text-h1:    clamp(2.5rem, 6vw, 5rem);
  --text-h2:    clamp(2rem, 4vw, 3.5rem);
  --text-h3:    clamp(1.5rem, 3vw, 2.25rem);
  --text-h4:    clamp(1.25rem, 2vw, 1.625rem);
  --text-body:  clamp(1rem, 1.2vw, 1.125rem);
  --text-small: clamp(0.875rem, 1vw, 1rem);

  /* Abstände */
  --section-gap:  clamp(80px, 10vw, 140px);
  --container:    1400px;
  --radius:       4px;
  --radius-sm:    4px;
  --radius-md:    6px;
  --radius-lg:    8px;
  --radius-xl:    12px;

  /* Schatten — angepasst auf Slate-Töne */
  --shadow-sm:   0 1px 3px rgba(28,43,58,.08), 0 1px 2px rgba(28,43,58,.06);
  --shadow-md:   0 4px 16px rgba(28,43,58,.12);
  --shadow-lg:   0 16px 48px rgba(28,43,58,.15);
  --shadow-card: 0 8px 32px rgba(28,43,58,.10);

  /* Z-Index Skala */
  --z-base:    10;
  --z-overlay: 20;
  --z-nav:     30;
  --z-modal:   50;

  /* Easing-Kurven */
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

  /* Transitions */
  --transition-fast:   150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base:   250ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-slow:   400ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

address {
  font-style: normal;
}

/* --- Skip Navigation (Barrierefreiheit) -------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-accent);
  color: var(--color-white);
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: var(--z-modal);
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* --- Container --------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

/* --- Typography -------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--color-text);
}

h1 { font-size: var(--text-h1); font-weight: 800; }
h2 { font-size: var(--text-h2); font-weight: 700; }
h3 { font-size: var(--text-h3); font-weight: 600; }
h4 { font-size: var(--text-h4); font-weight: 600; }

p {
  line-height: 1.7;
  max-width: 65ch;
  color: var(--color-muted);
}

/* --- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .875rem 2rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast),
              background var(--transition-fast);
  text-decoration: none;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* Primär-CTA — Copper auf Slate */
.btn-primary {
  background: var(--color-accent);
  color: #ffffff;
  font-weight: 700;
}
.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(224,122,95,.35);
}

/* Ghost — für Hero auf dunklem Bg */
.btn-ghost {
  background: transparent;
  color: var(--color-text-light);
  border-color: rgba(242,232,208,.4);
}
.btn-ghost:hover {
  background: rgba(242,232,208,.1);
  border-color: var(--color-text-light);
  transform: translateY(-2px) scale(1.02);
}

/* Outline — für helle Sections */
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-text-light);
  transform: translateY(-2px) scale(1.02);
}

/* Sekundär */
.btn-secondary {
  background: var(--color-primary-mid);
  color: var(--color-text-light);
}
.btn-secondary:hover {
  background: var(--color-primary);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(28,43,58,.25);
}

/* Karriere-Button */
.btn-karriere {
  background: var(--color-primary);
  color: var(--color-text-light);
}
.btn-karriere:hover {
  background: var(--color-primary-mid);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(28,43,58,.3);
}

/* --- Section-Header ---------------------------------------- */
.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-label {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
  max-width: 60px;
}

.section-num {
  font-family: var(--font-display);
  font-size: .875rem;
  font-weight: 700;
  color: var(--color-accent);
  opacity: .5;
}

.section-header--center {
  text-align: center;
}
.section-header--center .section-label {
  justify-content: center;
}
.section-header--center p {
  margin-inline: auto;
  text-align: center;
}

/* --- Layout Utilities -------------------------------------- */
.section {
  padding: var(--section-gap) 0;
}

.section--grey {
  background: var(--color-bg-section);
}

.section--dark {
  background: var(--color-primary);
  color: var(--color-text-light);
}
.section--dark h2,
.section--dark h3 {
  color: var(--color-text-light);
}
.section--dark p {
  color: var(--color-muted-light);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
}

/* --- Trust-Badge ------------------------------------------- */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--color-muted-light);
}

.trust-badge svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-accent);
}

/* --- Focus sichtbar ---------------------------------------- */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Scroll-Margin für Anchor-Links ------------------------- */
section[id] {
  scroll-margin-top: 80px;
}

/* --- Mobile: Überschriften umbrechen (nie abschneiden) ------- */
@media (max-width: 768px) {
  h1, h2, h3, h4 {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
}

/* --- Reduced Motion: globaler Fallback ---------------------- */
@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;
  }
}

/* --- Hochkontrast-Modus: Focus immer sichtbar --------------- */
@media (forced-colors: active) {
  :focus-visible {
    outline: 3px solid ButtonText;
    outline-offset: 2px;
  }
  .form-input:focus,
  .form-select:focus,
  .form-textarea:focus {
    outline: 3px solid ButtonText;
    outline-offset: 0;
    box-shadow: none;
  }
}


/* --- Desktop-Zeilenumbruch ---------------------------------- */
.br-desktop { display: block; line-height: 0.3; }
@media (max-width: 768px) {
  .br-desktop { display: none; }
}
