/* ============================================================
   global.css: Technik-Geruest + Design-Tokens der Site.
   PROJEKT: DEGEN Jobs & Karriere

   CI-Quelle: Logo der DEGEN Unternehmensgruppe.
   Navy #0E3A67 (Wortmarke) + Signal-Orange #DD5B12 (Pfeil/Herz/Claim)
   + Sonnengelb #F2C230 als Mikro-Akzent. Gleiche Markenfamilie wie die
   Immobilien-Seite, aber waermer gestimmt: Papierweiss statt kuehlem
   Blaugrau, Orange fuehrt staerker, runder und einen Tick lebhafter.
   Charakter: einladend, direkt, menschlich. Details in ci.md.

   Nicht verhandelbar (Qualitaets-Untergrenzen, KEIN Design):
   Body-Schrift nie unter 17px, Touch-Targets min. 44px, WCAG-AA-
   Kontrast, Animationen nur mit transform + opacity.

   Fonts: self-hosted via css/fonts.css (scripts/fetch-fonts.sh),
   NIEMALS fonts.googleapis.com einbinden.
   ============================================================ */

:root {
  /* ── Palette: EINE Primaerfarbe, EIN Akzent, sonst nur Weiss und Grau ──
     Primary  = Navy der Logo-Wortmarke (dunkle Flaechen, Ueberschriften)
     Accent   = Signal-Orange des Logo-Pfeils (jede Handlung, sonst nichts)
     Die -darker-Werte sind reine Zustandsabstufungen derselben Farbe,
     keine zusaetzlichen Farben. Kein Gelb, keine getoenten Graustufen. */
  --color-brand-main:       #0E3A67;
  --color-brand-darker:     #082A4E;
  --color-accent:           #DD5B12;
  --color-accent-darker:    #B54609;

  --color-bg-card:          #FFFFFF;
  --color-bg-light:         #F5F5F5;
  --color-bg-dark:          #0E3A67;
  --color-border:           #E2E2E2;
  --color-border-strong:    #CFCFCF;
  --color-heading:          #0E3A67;
  --color-body:             #4A4A4A;
  --color-text-muted:       #6E6E6E;
  --color-off-white:        #F5F5F5;

  /* Fremd-Markenfarbe, bewusste Ausnahme: der WhatsApp-Button muss als
     WhatsApp erkennbar sein. Nur fuer diesen Button, nie fuer Text. */
  --color-whatsapp:         #25D366;
  --color-whatsapp-darker:  #128C7E;

  /* ── Auf dunklem Grund (Navy/Orange): nur Weiss-Abstufungen ── */
  --color-on-dark:          #FFFFFF;
  --color-on-dark-soft:     rgba(255, 255, 255, 0.84);
  --color-on-dark-muted:    rgba(255, 255, 255, 0.74);
  --color-on-dark-line:     rgba(255, 255, 255, 0.20);
  --color-on-dark-line-2:   rgba(255, 255, 255, 0.34);
  --color-on-dark-fill:     rgba(255, 255, 255, 0.07);
  --color-on-dark-fill-2:   rgba(255, 255, 255, 0.14);

  /* ── Typografie: Figtree, hoher Weight-Kontrast (900 vs 400) ── */
  --font-main:              'Figtree', -apple-system, 'Segoe UI', sans-serif;
  --font-weight-heading:    800;
  --letter-spacing-h1:      -0.035em;
  --letter-spacing-h2:      -0.025em;
  --font-size-body:         18px;
  --line-height-body:       1.65;
  --line-height-heading:    1.04;
  --font-size-h1:           104px;
  --font-size-h1-md:        64px;
  --font-size-h1-sm:        40px;
  --font-size-h2:           46px;
  --font-size-h2-md:        38px;
  --font-size-h2-sm:        30px;
  --font-size-h3:           28px;
  --font-size-h3-sm:        23px;
  --font-size-h4:           21px;
  --font-size-h5:           19px;
  --font-size-eyebrow:      13px;
  --font-size-small:        17px;   /* Untergrenze der Site: Labels, Chips, Formhinweise */

  /* ── Layout + Abstaende: knapp, die Seite ist bewusst kurz ── */
  --max-width:              1160px;
  --container-padding:      40px;
  --container-padding-sm:   22px;
  --section-padding:        112px 0;
  --section-padding-mobile: 64px 0;
  --header-gap-eyebrow:     14px;
  --header-gap-title:       20px;
  --header-gap-subline:     44px;

  /* ── Form + Tiefe: runde, freundliche Geometrie (Logo-Herz, Kreis-Icons) ── */
  --radius-s:               999px;   /* Buttons: Pill */
  --radius-m:               26px;    /* Cards, Bilder */
  --radius-l:               40px;    /* grosse Flaechen */
  --shadow-card:            0 1px 2px rgba(0, 0, 0, 0.05),
                            0 10px 24px -14px rgba(0, 0, 0, 0.16);
  --shadow-lift:            0 2px 4px rgba(0, 0, 0, 0.06),
                            0 18px 36px -18px rgba(0, 0, 0, 0.22);

  /* ── Motion: ruhig, mit leichtem Nachfedern beim Hover ── */
  --ease-out:               cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring:            cubic-bezier(0.34, 1.4, 0.64, 1);
  --duration-fast:          0.2s;
  --ease-reveal:            cubic-bezier(0.2, 0.65, 0.25, 1);  /* Einblenden: weicher Auslauf, die Bewegung bleibt sichtbar */
  --reveal-duration:        1s;
  --intro-step:             130ms;  /* Versatz der Hero-Elemente beim Seitenaufruf */
  --duration-hover:         0.38s;  /* Karten-Hover: Anheben, Linie, Bildzoom */
  --hover-lift:             -6px;
  --reveal-distance:        40px;
}

/* Responsive Token-Umschaltung: Komponenten unten enthalten KEINE
   eigenen Breakpoint-Werte, hier werden nur Tokens umgeschaltet. */
@media (max-width: 1024px) {
  :root {
    --font-size-h1: var(--font-size-h1-md);
    --font-size-h2: var(--font-size-h2-md);
  }
}
@media (max-width: 767px) {
  :root {
    --font-size-h1: var(--font-size-h1-sm);
    --font-size-h2: var(--font-size-h2-sm);
    --font-size-h3: var(--font-size-h3-sm);
    --container-padding: var(--container-padding-sm);
    --reveal-distance: 28px;
    --header-gap-eyebrow: 10px;
    --header-gap-title: 14px;
    --header-gap-subline: 28px;
  }
}

/* ============================================================
   Ab hier nur noch Technik: alles referenziert Tokens,
   nirgendwo stehen Design-Literale.
   ============================================================ */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Buttons und Felder erben sonst die System-Schrift des Browsers (Arial/Helvetica) */
button, input, select, textarea { font: inherit; }
/* Ueberschriften ausgeglichen umbrechen, Fliesstext ohne einzelnes Wort in der
   letzten Zeile. Browser ohne Unterstuetzung brechen wie bisher um. */
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }

/* Ankerziele: die Section beginnt direkt unter der Sticky-Nav (89px, mobil 73px) */
section[id] { scroll-margin-top: 89px; }
@media (max-width: 560px) { section[id] { scroll-margin-top: 73px; } }

/* KEIN scroll-behavior: smooth hier oder anderswo: kollidiert mit Lenis (Phase 5). */

/* Lenis (Standard-CSS der Bibliothek, Version 1.3.25). lenis-smooth haengt nur
   waehrend einer laufenden Scroll-Animation an <html>: eingebettete Inhalte
   bleiben ausserhalb davon klickbar. */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

body {
  font-family: var(--font-main);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-body);
  background: var(--color-bg-light);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  font-weight: var(--font-weight-heading);
  line-height: var(--line-height-heading);
}

h1 { font-size: var(--font-size-h1); letter-spacing: var(--letter-spacing-h1); }
h2 { font-size: var(--font-size-h2); letter-spacing: var(--letter-spacing-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }
h5 { font-size: var(--font-size-h5); }

a { color: var(--color-brand-main); text-decoration: none; }
a:hover { color: var(--color-brand-darker); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-brand-main);
  outline-offset: 2px;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Buttons: Look kommt komplett aus den Tokens (Radius, Farben, Motion).
   min-height 48px ist Touch-Target-Untergrenze, kein Design.
   Primary = Orange (das eine Signal der Seite), Secondary = Navy-Outline. */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 14px 32px;
  border-radius: var(--radius-s);
  font-family: var(--font-main);
  font-size: var(--font-size-body);
  font-weight: 700;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: none;
  transition:
    background-color var(--duration-fast) ease,
    color var(--duration-fast) ease,
    transform var(--duration-fast) var(--ease-spring),
    box-shadow var(--duration-fast) ease;
}
.btn-primary {
  background: var(--color-accent);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--color-accent-darker);
  color: #FFFFFF;
  transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: transparent;
  color: var(--color-brand-main);
  box-shadow: inset 0 0 0 2px var(--color-brand-main);
}
.btn-secondary:hover {
  background: var(--color-brand-main);
  color: #FFFFFF;
  transform: translateY(-2px);
}
.btn-secondary:active { transform: translateY(0); }
/* Auf dunklem Navy-Grund */
.on-dark .btn-secondary {
  color: #FFFFFF;
  box-shadow: inset 0 0 0 2px var(--color-on-dark-line-2);
}
.on-dark .btn-secondary:hover {
  background: #FFFFFF;
  color: var(--color-brand-main);
  box-shadow: inset 0 0 0 2px #FFFFFF;
}
.on-dark a:focus-visible, .on-dark button:focus-visible { outline-color: var(--color-on-dark); }

/* ── Section-Header: Eyebrow / Title / Subline ──
   PFLICHT: Jeder Section-Header nutzt diese 3 Klassen, damit Groessen,
   Abstaende und Alignment in JEDER Section identisch sind. Das ist ein
   Konsistenz-Mechanismus INNERHALB einer Site; wie er aussieht, steuern
   die Tokens oben. Niemals pro Section ueberschreiben. */
.section-eyebrow {
  display: block;
  font-size: var(--font-size-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  margin-bottom: var(--header-gap-eyebrow);
}
.section-title {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-heading);
  line-height: var(--line-height-heading);
  letter-spacing: var(--letter-spacing-h2);
  color: var(--color-heading);
  margin-bottom: var(--header-gap-title);
}
.section-subline {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-text-muted);
  margin-bottom: var(--header-gap-subline);
  max-width: 640px;
}

/* ── Eingangs-Animationen ──
   1. Hero-Auftakt (data-intro): reines CSS, laeuft ab dem ersten Paint und wartet
      nicht auf js/main.js. Reihenfolge per style="--i:0", "--i:1" ... am Element.
      Das Hero-Bild (LCP) bekommt bewusst KEIN data-intro.
   2. Scroll-Reveal (data-reveal / data-reveal-group): Init in js/main.js. Die Klasse
      html.js setzt ein Einzeiler im <head> jeder Seite, damit die Elemente schon beim
      ersten Paint versteckt sind; die Kinder einer Gruppe deckt die zweite Zeile im
      Selektor ab, bis main.js sie uebernimmt. Nach dem Einblenden entfernt main.js
      data-reveal, damit Hover-Effekte wieder ihre eigene Transition haben.
   Charakter (Distanz, Dauer, Kurve) kommt aus den Motion-Tokens. Ohne JS bleibt
   alles sichtbar. */
[data-intro] {
  animation: intro-in var(--reveal-duration) var(--ease-reveal) both;
  animation-delay: calc(var(--i, 0) * var(--intro-step));
}
@keyframes intro-in {
  from { opacity: 0; transform: translateY(var(--reveal-distance)); }
}
html.js [data-reveal],
html.js [data-reveal-group] > * {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition:
    opacity var(--reveal-duration) var(--ease-reveal),
    transform var(--reveal-duration) var(--ease-reveal);
}
html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
/* Screenshots deterministisch: screenshot.mjs setzt html.screenshot */
html.screenshot [data-reveal],
html.screenshot [data-reveal-group] > *,
html.screenshot [data-intro] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}
@media (prefers-reduced-motion: reduce) {
  :root { --hover-lift: 0px; }  /* Karten heben sich nicht, Farbwechsel bleiben */
  [data-intro] { animation: none; }
  html.js [data-reveal],
  html.js [data-reveal-group] > * { opacity: 1; transform: none; transition: none; }
}

/* ── Google Maps Zwei-Klick (Markup: snippets/google-maps-consent.html) ── */
.map-consent {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--color-bg-light);
}
.map-consent > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) brightness(0.85);
}
.map-consent-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  background: rgba(15, 23, 42, 0.55);
}
.map-consent-overlay p {
  color: var(--color-off-white);
  font-size: var(--font-size-body);
  max-width: 520px;
}
.map-consent-overlay a { color: #FFFFFF; text-decoration: underline; }

/* ── Zeitmarke: HEUTE vs. VISION ──
   Kernanforderung des Kunden-Briefings (Abschnitt 5): Besucher muessen auf einen
   Blick sehen, was es heute schon gibt und was Zielbild ist. Deshalb traegt jeder
   Vision-Inhalt und jeder Heute-Inhalt sichtbar seine Marke, nicht nur die Wortwahl. */
.zeitmarke {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 12px;
  border-radius: var(--radius-s);
  font-size: var(--font-size-eyebrow);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.zeitmarke::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: var(--radius-s);
  background: currentColor;
  flex: none;
}
.zeitmarke-heute {
  background: var(--color-bg-light);
  color: var(--color-accent-darker);
}
.zeitmarke-vision {
  background: var(--color-on-dark-fill-2);
  color: var(--color-on-dark);
}
/* Auf hellem Grund braucht die Vision-Marke einen eigenen Kontrast */
.zeitmarke-vision-hell {
  background: var(--color-brand-main);
  color: var(--color-on-dark);
}

/* ── Formulare (Bewerbung) ──
   Netlify Forms: reines HTML-POST, kein Fremd-Script, kein Request beim Aufruf. */
.form { display: grid; gap: 20px; }
/* Zwei Spalten, solange jede Spalte mindestens 200px hat (Desktop, Tablet).
   In schmalen Karten (z. B. Laptop 1100px, Formular neben der Karte) stapeln die
   Felder, sonst wird das Dropdown abgeschnitten. */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 20px;
}
.field { display: grid; gap: 8px; min-width: 0; }
.field > label {
  font-size: var(--font-size-small);
  font-weight: 700;
  color: var(--color-heading);
}
.field .req { color: var(--color-accent-darker); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 54px;
  padding: 14px 18px;
  font-family: var(--font-main);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-heading);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-m);
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}
.field textarea { min-height: 150px; resize: vertical; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E3A67' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 20px 20px;
  padding-right: 50px;
  cursor: pointer;
}
.field input::placeholder, .field textarea::placeholder { color: var(--color-text-muted); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--color-brand-main); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--color-accent-darker);
  box-shadow: inset 0 0 0 1px var(--color-accent-darker);
}
.field input[type="file"] { padding: 13px 18px; cursor: pointer; }
.field input[type="file"]::file-selector-button {
  margin-right: 14px;
  min-height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: var(--radius-s);
  background: var(--color-brand-main);
  color: var(--color-on-dark);
  font-family: var(--font-main);
  font-size: var(--font-size-small);
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--duration-fast) ease;
}
.field input[type="file"]:hover::file-selector-button { background: var(--color-brand-darker); }
/* Handy: Knopf ueber die volle Breite, der Dateiname darunter (sonst "Kei…ählt") */
@media (max-width: 560px) {
  .field input[type="file"] { padding: 12px 14px; }
  .field input[type="file"]::file-selector-button { display: block; width: 100%; margin: 0 0 10px; }
}
.field-consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 11px 0;
}
.field-consent input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 3px;
  accent-color: var(--color-accent-darker);
  cursor: pointer;
}
.field-consent label {
  font-size: var(--font-size-small);
  line-height: var(--line-height-body);
  color: var(--color-body);
  cursor: pointer;
}
.field-consent a { text-decoration: underline; }
.form-note { font-size: var(--font-size-small); color: var(--color-text-muted); }
/* Honeypot: fuer Menschen unsichtbar, aber nicht display:none */
.form-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 620px) {
  .form-row { grid-template-columns: minmax(0, 1fr); }
}

/* ── Lightbox fuer das Zukunftsbild ──
   Kundenwunsch: "Das Vision-Schaubild soll anklickbar bzw. vergroesserbar sein."
   Das Bild wird darin in Originalgroesse gezeigt und ist scroll-/wischbar.
   Logik: js/main.js */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  /* Deckend, sonst scheint die sticky Nav durch (z-index 50 liegt darunter,
     aber eine transparente Flaeche zeigt sie trotzdem). */
  background: var(--color-brand-darker);
}
.lightbox[hidden] { display: none; }
.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  color: var(--color-on-dark);
}
.lightbox-title { font-size: var(--font-size-small); font-weight: 700; }
.lightbox-close {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: none;
  border-radius: var(--radius-s);
  background: var(--color-on-dark-fill-2);
  color: var(--color-on-dark);
  font-family: var(--font-main);
  font-size: var(--font-size-small);
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--duration-fast) ease;
}
.lightbox-close:hover { background: var(--color-on-dark-fill); }
.lightbox-close:focus-visible { outline: 2px solid var(--color-on-dark); outline-offset: 2px; }
.lightbox-stage {
  flex: 1;
  overflow: auto;
  padding: 0 20px 20px;
  -webkit-overflow-scrolling: touch;
}
.lightbox-stage img {
  /* Groesser als der Viewport: genau das macht das Scrollen zum Zoom. */
  max-width: none;
  width: 1448px;
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius-m);
}

/* ── WhatsApp-Schaltflaeche (fest unten rechts) ── */
.wa-float {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-s);
  background: var(--color-whatsapp);
  color: var(--color-on-dark);
  box-shadow: var(--shadow-lift);
  transition: background-color var(--duration-fast) ease, transform var(--duration-fast) var(--ease-spring);
}
.wa-float svg { width: 32px; height: 32px; }
.wa-float:hover { background: var(--color-whatsapp-darker); color: var(--color-on-dark); transform: translateY(-3px); }
.wa-float:active { transform: translateY(0); }
.wa-float:focus-visible { outline-color: var(--color-brand-main); }
/* Bei offenem Menue-Panel wuerde der Button darueber schweben. */
body.nav-open .wa-float { display: none; }

@media (max-width: 767px) {
  .wa-float { right: 16px; bottom: 16px; width: 56px; height: 56px; }
  .wa-float svg { width: 30px; height: 30px; }
  .lightbox-stage { padding: 0 12px 12px; }
}
@media print {
  .wa-float { display: none; }
}
