/* =====================================================================
   Krieger Transport – Stylesheet

   Gestaltung nach dem Briefbogen: Poppins, Papierweiß, Grautöne aus
   dem Logo, graue Randleiste links, Wappen als Wasserzeichen.

   Farbregel 60 / 30 / 10
     60 %  Weiß und Hellgrau     (Inhaltsflächen)
     30 %  Grautöne aus dem Logo (Hero, Anfrage-Band, Schrift, Linien)
     10 %  Gelb                  (Buttons, Symbolfelder, Markierungen)
   ===================================================================== */

/* ---------- Schrift (lokal, keine Verbindung zu Google) ---------- */
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* Layout: klassische Firmenseite, linksbündig in einer 1200-px-Spalte,
   ruhiger Wechsel aus weißen, hellgrauen und dunkelgrauen Bändern. */
:root {
  /* 60 % */
  --white: #ffffff;
  --paper: #f4f4f4;

  /* 30 % – Grautöne aus Logo und Briefbogen */
  --grey-dark: #404040;   /* Randleiste unten, dunkle Flächen */
  --grey-logo: #515151;   /* Wappen, dunkle Hälfte */
  --grey-light: #999999;  /* Wappen, helle Hälfte */
  --grey-bar: #a6a6a6;    /* Randleiste oben */
  --grey-line: #dedede;
  --black: #000000;       /* Schriftzug im Logo */
  --text: #404040;
  --text-soft: #6f6f6f;
  --on-dark: #ffffff;
  --on-dark-soft: #d4d4d4;

  /* 10 % */
  --yellow: #f2b705;
  --yellow-hover: #ffc929;

  --font: "Poppins", "Helvetica Neue", Arial, sans-serif;

  /* Schriftgrößen, Verhältnis 1,25 */
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-md: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  --fs-lg: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
  --fs-xl: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
  --fs-hero: clamp(2.25rem, 1.45rem + 3.3vw, 3.75rem);

  --radius: 2px;
  --wrap: 1264px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --header-h: 84px;
  --rail: 6px;

  color-scheme: light;
}

@media (min-width: 700px) {
  :root {
    --gutter-l: max(40px, env(safe-area-inset-left, 0px));
    --gutter-r: max(32px, env(safe-area-inset-right, 0px));
    --rail: 10px;
  }
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font: 400 var(--fs-base) / 1.7 var(--font);
  -webkit-font-smoothing: antialiased;
}

/* Fläche hinter der Statusleiste von Smartphones */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--white);
}

/* Graue Randleiste wie auf dem Briefbogen */
.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 70;
  width: calc(var(--rail) + env(safe-area-inset-left, 0px));
  background: linear-gradient(180deg, var(--grey-bar) 0 86%, var(--white) 86% 86.8%, var(--grey-dark) 86.8% 100%);
  pointer-events: none;
}

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

h1, h2, h3 {
  margin: 0;
  color: var(--black);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-md); font-weight: 600; line-height: 1.35; letter-spacing: 0; }

p { margin: 0; max-width: 62ch; }
ul, dl, dd { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
strong { font-weight: 600; }

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute;
  left: var(--gutter-l);
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--yellow);
  color: var(--black);
  font-weight: 600;
}
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + 8px); }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-box {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
  background: var(--yellow);
  color: var(--black);
}
.icon-box .icon { width: 28px; height: 28px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

.section { padding-block: clamp(4.5rem, 3rem + 5vw, 8rem); }
.section--paper { background: var(--paper); }
.section--dark { background: var(--grey-dark); color: var(--on-dark-soft); }
.section--dark h2, .section--dark h3 { color: var(--on-dark); }

.section-head {
  display: grid;
  gap: 1rem;
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}

.lead {
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--text);
}
.section--dark .lead { color: var(--on-dark); }

.muted { color: var(--text-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 50px;
  padding: 0.8em 1.5em;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: 600 0.975rem / 1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn--accent { background: var(--yellow); color: var(--black); }
.btn--accent:hover { background: var(--yellow-hover); }

.btn--dark { background: var(--grey-dark); color: var(--on-dark); }
.btn--dark:hover { background: var(--black); }

.btn--outline { border-color: var(--grey-dark); color: var(--black); }
.btn--outline:hover { background: var(--grey-dark); color: var(--on-dark); }

.btn--outline-light { border-color: rgba(255, 255, 255, 0.55); color: var(--on-dark); }
.btn--outline-light:hover { border-color: var(--on-dark); background: rgba(255, 255, 255, 0.08); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Kopfzeile ---------- */
.topbar {
  background: var(--grey-dark);
  color: var(--on-dark-soft);
  font-size: var(--fs-sm);
}

.topbar .wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 2rem;
  min-height: 40px;
}

.topbar a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--on-dark);
  text-decoration: none;
}
.topbar a:hover { text-decoration: underline; }
.topbar .icon { color: var(--yellow); }

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--grey-line);
  transition: box-shadow 0.2s;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(0, 0, 0, 0.35); }

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  min-height: var(--header-h);
}

.logo { margin-right: auto; flex: none; }
.logo img { width: auto; height: 52px; }

.nav { display: flex; gap: 2rem; }

.nav a {
  position: relative;
  padding-block: 0.5rem;
  color: var(--black);
  font-size: 0.975rem;
  font-weight: 500;
  text-decoration: none;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s;
}
.nav a:hover::after { transform: scaleX(1); }

.menu-btn {
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--grey-dark);
  border-radius: var(--radius);
  background: transparent;
  color: var(--black);
  font: 600 0.95rem / 1 var(--font);
  cursor: pointer;
}

.menu-bars {
  position: relative;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.menu-bars::before, .menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
}
.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }

@media (max-width: 999px) {
  :root { --header-h: 72px; }
  .topbar, .header-cta { display: none; }
  .logo img { height: 42px; }
  .menu-btn { display: inline-flex; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--gutter-r) 1.5rem var(--gutter-l);
    background: var(--white);
    border-bottom: 1px solid var(--grey-line);
    box-shadow: 0 16px 24px -16px rgba(0, 0, 0, 0.25);
  }
  .nav:not(.is-open) { display: none; }

  .nav a {
    padding-block: 0.9rem;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--grey-line);
  }
  .nav a::after { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--grey-dark);
  color: var(--on-dark-soft);
}

/* Wappen als Wasserzeichen, wie unten rechts auf dem Briefbogen */
.hero::after {
  content: "";
  position: absolute;
  right: -3%;
  bottom: -16%;
  width: min(40vw, 540px);
  aspect-ratio: 1;
  background: url("../img/wappen-dunkel.png") center / contain no-repeat;
  opacity: 0.7;
  pointer-events: none;
}

@media (max-width: 799px) {
  .hero::after { width: 78vw; right: -18%; bottom: -6%; opacity: 0.35; }
}

.hero .wrap {
  position: relative;
  z-index: 1;
  padding-block: clamp(4.5rem, 3rem + 6vw, 8.5rem) clamp(8rem, 6rem + 6vw, 11rem);
}

.hero-mark {
  width: 56px;
  height: 5px;
  margin-bottom: 2rem;
  background: var(--yellow);
}

.hero h1 {
  max-width: 20ch;
  hyphens: manual;
  color: var(--on-dark);
  font-size: var(--fs-hero);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.hero-lead {
  max-width: 48ch;
  margin-top: 1.5rem;
  font-size: var(--fs-md);
  line-height: 1.6;
}

.hero .btn-row { margin-top: 2.5rem; }

.hero-phone {
  margin-top: 1.5rem;
  font-size: var(--fs-sm);
}
.hero-phone a { color: var(--on-dark); font-weight: 600; white-space: nowrap; }

/* ---------- Hero-Auftakt ---------- */
/* Einmal beim Laden: Balken zieht auf, die Wörter werden wie ein Container von oben abgesetzt.
   Nur mit der Klasse .motion (gesetzt im <head>, wenn keine reduzierte Bewegung gewünscht ist). */
@keyframes mark-in { from { transform: scaleX(0); } }
@keyframes word-in { from { transform: translateY(-110%); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes reveal { to { opacity: 1; } }

.hero h1 .word {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
  vertical-align: top;
}
.hero h1 .word > span { display: inline-block; }

.motion .hero-mark {
  transform-origin: left;
  animation: mark-in 0.5s cubic-bezier(0.3, 0, 0.2, 1) 0.1s both;
}
/* Fallback: Falls main.js nicht läuft, erscheint die Überschrift trotzdem. */
.motion .hero h1:not(.is-split) { opacity: 0; animation: reveal 0s 1.5s forwards; }
.motion .hero h1 .word > span {
  animation: word-in 0.7s cubic-bezier(0.2, 0.75, 0.25, 1.03) both;
  animation-delay: calc(0.35s + var(--i, 0) * 0.09s);
}
.motion .hero-lead,
.motion .hero .btn-row,
.motion .hero-phone { animation: fade-in 0.5s ease-out both; }
.motion .hero-lead { animation-delay: 0.8s; }
.motion .hero .btn-row { animation-delay: 0.9s; }
.motion .hero-phone { animation-delay: 1s; }

/* ---------- Stärken (überlappen den Hero) ---------- */
.usp {
  position: relative;
  z-index: 2;
  margin-top: calc(-1 * clamp(4.5rem, 3.5rem + 3vw, 6rem));
}

.usp-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--white);
  box-shadow: 0 28px 56px -28px rgba(0, 0, 0, 0.35);
}

.usp-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem 1.25rem;
  align-content: start;
  padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
}
.usp-list li + li { border-left: 1px solid var(--grey-line); }
.usp-list .icon-box { grid-row: span 2; }
.usp-list h3 { font-size: var(--fs-base); }
.usp-list p { font-size: 0.95rem; color: var(--text-soft); }

/* ---------- Über uns ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 1rem + 5vw, 6rem);
  align-items: center;
}

.about--no-photo {
  grid-template-columns: minmax(0, 1fr);
  max-width: 46rem;
}

.about-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.about-text { display: grid; gap: 1.25rem; }

.signature {
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--grey-line);
  line-height: 1.5;
}
.signature strong { display: block; color: var(--black); font-weight: 500; }
.signature span { color: var(--text-soft); font-size: 0.95rem; }

/* ---------- Leistungen ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.service {
  display: grid;
  gap: 1.25rem;
  align-content: start;
  padding: clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem);
  background: var(--white);
}

.service h3 { margin-top: 0.5rem; }
.service p { color: var(--text-soft); }

.service-note {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  color: var(--text);
}
.service-note .icon { color: var(--grey-logo); }

/* ---------- Angebot anfragen ---------- */
.request {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 1rem + 5vw, 6rem);
  align-items: center;
}

.request-text { display: grid; gap: 1.25rem; }
.request-text .btn-row { margin-top: 1rem; }

.checklist-card {
  padding: clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem);
  background: var(--white);
  color: var(--text);
}

.checklist-card h3 { margin-bottom: 1.25rem; color: var(--black); }

.checklist li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.15rem 1rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--grey-line);
}
.checklist li:last-child { border-bottom: 0; }

.checklist li::before {
  content: "";
  grid-row: span 2;
  width: 18px;
  height: 18px;
  margin-top: 0.3rem;
  border: 2px solid var(--grey-dark);
}

.checklist span { color: var(--black); font-weight: 500; }
.checklist small { color: var(--text-soft); font-size: var(--fs-sm); }

.checklist-card .btn { margin-top: 1.5rem; }
.checklist-hint { margin-top: 0.75rem; font-size: var(--fs-sm); color: var(--text-soft); }

/* ---------- Karriere ---------- */
.career-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.career-col {
  padding: clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem);
  background: var(--white);
}

.career-col h3 {
  padding-bottom: 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--grey-line);
}

.tick-list li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.6rem;
}
.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 0.6rem;
  height: 0.6rem;
  background: var(--yellow);
}
.tick-list small { color: var(--text-soft); font-size: 0.95em; }

.apply {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 3rem;
  align-items: center;
  margin-top: 1.5rem;
  padding: clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem);
  background: var(--grey-dark);
  color: var(--on-dark-soft);
}
.apply h3 { margin-bottom: 0.35rem; color: var(--on-dark); }

/* ---------- Kontakt ---------- */
.contact-section {
  position: relative;
  overflow: hidden;
}

.contact-section::after {
  content: "";
  position: absolute;
  right: -6%;
  bottom: -38%;
  width: min(60vw, 640px);
  aspect-ratio: 1;
  background: url("../img/wappen-hell.png") center / contain no-repeat;
  pointer-events: none;
}

.contact-section .wrap { position: relative; z-index: 1; }

.contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem clamp(2rem, 1rem + 4vw, 5rem);
  max-width: 52rem;
}

/* Angaben wie im Briefkopf: fette Überschrift, Bezeichnung und Wert in Spalten */
.info-block h3 {
  margin-bottom: 0.5rem;
  font-size: var(--fs-base);
  font-weight: 700;
}

.info-block p { color: var(--black); }

.info-block dl {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.15rem 1rem;
}
.info-block dt { color: var(--text-soft); }
.info-block dd { color: var(--black); overflow-wrap: anywhere; }
.info-block dd a { text-decoration: none; }
.info-block dd a:hover { text-decoration: underline; }

.contact-section .btn-row { margin-top: 2.5rem; }

/* ---------- Footer im Stil der Briefbogen-Fußzeile ---------- */
.site-footer {
  border-top: 1px solid var(--grey-line);
  background: var(--white);
  color: var(--text);
  font-size: var(--fs-sm);
  line-height: 1.65;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding-block: 3.5rem 2.5rem;
}

.footer-grid .logo img { height: 44px; }
.footer-grid h3 { margin-bottom: 0.35rem; font-size: var(--fs-sm); font-weight: 700; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid var(--grey-line);
  color: var(--text-soft);
}
.footer-bottom .wrap { padding-block: 1.25rem; }

/* ---------- Mobile Aktionsleiste ---------- */
.action-bar { display: none; }

@media (max-width: 999px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }

  .action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem var(--gutter-r) calc(0.5rem + env(safe-area-inset-bottom, 0px)) var(--gutter-l);
    background: var(--grey-dark);
  }
}

/* ---------- Rechtstexte ---------- */
.legal { max-width: 46rem; }
.legal h1 { font-size: var(--fs-xl); margin-bottom: 2rem; }
.legal h2 { font-size: var(--fs-lg); margin: 2.5rem 0 0.75rem; }
.legal h3 { font-size: var(--fs-base); margin: 1.5rem 0 0.5rem; }
.legal p, .legal ul { margin-bottom: 1rem; }
.legal ul { list-style: disc; padding-left: 1.25rem; }
.legal .todo { background: color-mix(in oklab, var(--yellow) 40%, transparent); padding: 0 0.25em; }

/* ---------- Umbrüche ---------- */
@media (max-width: 999px) {
  .about, .request { grid-template-columns: minmax(0, 1fr); }
  .about-photo { aspect-ratio: 4 / 3; }
  .services { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 799px) {
  .usp-list { grid-template-columns: minmax(0, 1fr); }
  .usp-list li + li { border-left: 0; border-top: 1px solid var(--grey-line); }
  .career-grid, .contact { grid-template-columns: minmax(0, 1fr); }
  .apply { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 559px) {
  .hero .btn-row .btn { flex: 1 1 100%; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}
