/* ============================================================
   Transporte Rengshausen – Stylesheet
   Kein externes CDN, keine Webfonts: schnell, sicher, DSGVO-konform.
   ============================================================ */

/* ---------- Design-Tokens ---------- */
:root {
  color-scheme: dark;

  --bg: #0a111e;
  --bg-2: #0d1728;
  --surface: #111d31;
  --surface-2: #16243c;
  --line: rgba(148, 170, 205, 0.16);
  --text: #e9eef7;
  --muted: #a7b5cc;
  --accent: #ffa733;
  --accent-strong: #f08c00;
  --on-accent: #221302;
  --focus: #82b7ff;
  --shadow: 0 24px 60px -24px rgba(2, 8, 20, 0.8);
  --header-bg: rgba(10, 17, 30, 0.82);

  --radius: 16px;
  --radius-sm: 10px;
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f4f6fa;
  --bg-2: #eaeef6;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --line: rgba(23, 42, 74, 0.14);
  --text: #17202e;
  --muted: #4c5c74;
  --accent: #a35600;
  --accent-strong: #f08c00;
  --on-accent: #221302;
  --focus: #0b5fd0;
  --shadow: 0 24px 50px -28px rgba(23, 42, 74, 0.35);
  --header-bg: rgba(244, 246, 250, 0.85);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;

    --bg: #f4f6fa;
    --bg-2: #eaeef6;
    --surface: #ffffff;
    --surface-2: #f6f8fc;
    --line: rgba(23, 42, 74, 0.14);
    --text: #17202e;
    --muted: #4c5c74;
    --accent: #a35600;
    --accent-strong: #f08c00;
    --on-accent: #221302;
    --focus: #0b5fd0;
    --shadow: 0 24px 50px -28px rgba(23, 42, 74, 0.35);
    --header-bg: rgba(244, 246, 250, 0.85);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  max-width: 68ch;
}

ul, ol {
  padding-left: 1.2em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--accent-strong);
  color: var(--on-accent);
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

/* Nur fuer Screenreader sichtbar */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--accent-strong);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled,
.site-header.nav-open {
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-right: auto;
}

.brand__mark {
  flex: none;
  width: 42px;
  height: 42px;
  color: var(--accent-strong);
}

.brand__name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name small {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
}

.site-nav__list a {
  display: block;
  padding: 0.55rem 0.9rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
}

.site-nav__list a:hover {
  background: var(--surface-2);
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* Icon je nach Farbschema */
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }

:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: block; }
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }
.nav-open .nav-toggle .icon-menu { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn--primary {
  background: var(--accent-strong);
  color: var(--on-accent);
  box-shadow: 0 12px 30px -12px rgba(240, 140, 0, 0.55);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -12px rgba(240, 140, 0, 0.65);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

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

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: clip;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 5rem);
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(240, 140, 0, 0.14), transparent 65%),
    radial-gradient(700px 420px at -10% 110%, rgba(64, 120, 220, 0.10), transparent 60%),
    linear-gradient(var(--bg-2), var(--bg));
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 800;
  margin-bottom: 1.1rem;
}

.hero__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--muted);
  margin-bottom: 1.8rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2rem;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
}

.hero__badges li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hero__badges svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
  flex: none;
}

/* ============================================================
   Hero-Fotocollage & Galerie (echte Bilder aus dem Betrieb)
   ============================================================ */
.hero__visual {
  display: grid;
  place-items: center;
  min-width: 0;
}

.photo-stack {
  position: relative;
  width: 100%;
  max-width: 560px;
  padding: 1.4rem 0 2.4rem 2.4rem;
}

/* Warmer Lichtschein hinter der Collage */
.photo-stack::before {
  content: "";
  position: absolute;
  inset: -10% -8% 0 -4%;
  background: radial-gradient(60% 55% at 62% 38%, rgba(240, 140, 0, 0.16), transparent 70%);
  pointer-events: none;
}

.photo-stack__main {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.photo-stack__main img,
.photo-stack__card img {
  display: block;
  width: 100%;
  height: auto;
}

.photo-stack__card {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: rotate(-3deg);
}

.photo-stack__chip {
  position: absolute;
  top: 0.2rem;
  right: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.photo-stack__chip svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
  flex: none;
}

/* ---------- Galerie ---------- */
.gallery {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.4rem;
}

.gallery__item--tall {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.gallery figure {
  position: relative;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.gallery__item:not(.gallery__item--tall) figure {
  aspect-ratio: 16 / 10;
}

.gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery figure:hover img {
  transform: scale(1.04);
}

.gallery figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.4rem 1.2rem 0.9rem;
  background: linear-gradient(180deg, rgba(8, 12, 20, 0), rgba(8, 12, 20, 0.85));
  color: #f2f5fa;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Original-Logo im Footer – auf heller Tafel, damit es in beiden Schemata lesbar ist */
.footer-logo {
  margin-top: 1.1rem;
  padding: 0.7rem 0.9rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  max-width: 220px;
}

.footer-logo img {
  width: 100%;
  height: auto;
}

/* ---------- Abschnitte ---------- */
.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section--alt {
  background: var(--bg-2);
}

.section__head {
  max-width: 720px;
  margin-bottom: clamp(2rem, 5vw, 3.25rem);
}

.section__head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.section__head p {
  color: var(--muted);
  font-size: 1.08rem;
}

/* ---------- Leistungs-Karten ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.card {
  position: relative;
  padding: 1.9rem 1.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.25s ease, border-color 0.25s ease;
}

/* Lichtkegel folgt dem Zeiger */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(320px 200px at var(--mx, 50%) var(--my, 0%), rgba(240, 140, 0, 0.10), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover {
  border-color: rgba(240, 140, 0, 0.45);
}

.card:hover::after {
  opacity: 1;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 1.2rem;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(240, 140, 0, 0.18), rgba(240, 140, 0, 0.06));
  border: 1px solid rgba(240, 140, 0, 0.35);
  color: var(--accent);
}

.card__icon svg {
  width: 30px;
  height: 30px;
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}

.card > p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.card__list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.card__list li {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  color: var(--text);
  font-size: 0.97rem;
}

.card__list li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-strong);
  transform: translateY(-1px);
}

/* ---------- Ablauf ---------- */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.step {
  counter-increment: step;
  position: relative;
  padding: 1.8rem 1.6rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step::before {
  content: counter(step, decimal-leading-zero);
  display: inline-block;
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  /* var(--accent) statt --accent-strong: erfuellt den Kontrast in beiden Farbschemata */
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.step h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--muted);
  font-size: 0.98rem;
}

/* ---------- Kontakt ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  margin-bottom: 2rem;
}

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.contact-card svg {
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--accent);
  margin-top: 0.2rem;
}

.contact-card strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.contact-card span {
  font-size: 1.08rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.contact-note {
  color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 2.8rem 0 2rem;
}

.site-footer__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.site-footer__brand p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 34ch;
  margin-top: 0.6rem;
}

.site-footer nav h2 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.site-footer nav ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.site-footer nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.98rem;
}

.site-footer nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.6rem;
  align-items: center;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Rechtsseiten ---------- */
.legal {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.legal h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  margin-bottom: 0.6rem;
}

.legal__updated {
  color: var(--muted);
  margin-bottom: 2.2rem;
}

.legal h2 {
  font-size: 1.35rem;
  margin: 2.2rem 0 0.7rem;
}

.legal h3 {
  font-size: 1.1rem;
  margin: 1.6rem 0 0.5rem;
}

.legal p,
.legal li {
  color: var(--muted);
}

.legal strong {
  color: var(--text);
}

.legal ul {
  margin: 0.6rem 0 1rem;
  display: grid;
  gap: 0.35rem;
}

.legal .facts {
  margin: 1.2rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.legal .facts div {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 1fr;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid var(--line);
}

.legal .facts div:last-child {
  border-bottom: 0;
}

.legal .facts dt {
  font-weight: 700;
  color: var(--text);
}

.legal .facts dd {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* ---------- Einblend-Animationen ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.js .reveal:nth-child(2) { transition-delay: 0.08s; }
.js .reveal:nth-child(3) { transition-delay: 0.16s; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    order: -1;
  }

  .photo-stack {
    max-width: 520px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery__item--tall {
    grid-column: auto;
    grid-row: auto;
  }

  .gallery__item--tall figure {
    aspect-ratio: 4 / 5;
  }

  .cards,
  .steps,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: var(--header-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 0.8rem 4% 1.2rem;
  }

  .nav-open .site-nav {
    display: block;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }

  .site-nav__list a {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
  }

  .nav-toggle {
    display: grid;
  }
}

@media (max-width: 520px) {
  .photo-stack {
    padding: 1rem 0 1.8rem 1.2rem;
  }

  .photo-stack__chip {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .brand__name small {
    display: none;
  }
}

/* ---------- Reduzierte Bewegung (Barrierefreiheit) ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .gallery figure:hover img {
    transform: none;
  }

  .card {
    transform: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
