/* =========================================================
   Mario Service GmbH — Design System
   Farbschema aus Logo: Signalrot #E8213A auf Anthrazit/Weiß
   ========================================================= */

:root {
  --red: #B91530;          /* barrierefrei nutzbares Rot (Text/Buttons) */
  --red-bright: #E8213A;   /* Logo-Rot für Akzente/Glow */
  --red-dark: #7E0E22;
  --ink: #14171A;
  --ink-soft: #23262B;
  --white: #FFFFFF;
  --grey-50: #F7F7F8;
  --grey-100: #EDEEEF;
  --grey-200: #DDDFE1;
  --grey-400: #8A8D91;
  --grey-600: #6B6E73;

  --font-head: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(20, 23, 26, 0.12);
  --shadow-lg: 0 20px 50px rgba(20, 23, 26, 0.18);

  --container-w: 1200px;
  --gap: 1.5rem;

  --dur: 0.5s;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@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;
    scroll-behavior: auto !important;
  }
}
html {
  overflow-x: hidden;
}
body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.4rem); }
h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

/* ---------- Barrierefreiheit (BFSG) ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 0.8em 1.4em;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}
:focus-visible {
  outline: 3px solid var(--red-bright);
  outline-offset: 2px;
}
a, button { min-height: 44px; display: inline-flex; align-items: center; }
.icon { width: 1.15em; height: 1.15em; fill: currentColor; flex-shrink: 0; }
.icon--brand { width: 1.4em; height: 1.4em; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.section { padding: clamp(3rem, 6vw, 6rem) 0; }
.section--alt { background: var(--grey-50); }
.section-intro { max-width: 60ch; color: var(--grey-600); }
.text-center { text-align: center; }

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: repeat(2, 1fr); }
.grid--align-center { align-items: center; }
.grid--align-start { align-items: start; }
.grid + .text-center { margin-top: 2.5rem; }

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

/* ---------- Stat-Kacheln ---------- */
.section--stats h2 { margin-bottom: 2rem; }
.stat-tile {
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius);
  padding: 2rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.stat-value {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--red);
  line-height: 1;
  margin: 0 0 0.5rem;
  font-variant-numeric: proportional-nums;
}
.stat-label { color: var(--grey-600); font-size: 0.95rem; margin: 0; }

/* ---------- Buttons (3D-Pressed) ---------- */
.btn {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.9em 1.6em;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  gap: 0.5em;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.2s;
  transform: translateY(0);
}
.btn--primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 5px 0 var(--red-dark), 0 8px 16px rgba(185, 21, 48, 0.35);
}
.btn--primary:hover { background: var(--red-bright); color: var(--white); transform: translateY(-2px); box-shadow: 0 7px 0 var(--red-dark), 0 12px 20px rgba(185, 21, 48, 0.4); }
.btn--primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--red-dark), 0 4px 8px rgba(185, 21, 48, 0.3); }

.btn--outline {
  background: var(--white);
  color: var(--ink);
  border: 2px solid var(--grey-200);
  box-shadow: 0 4px 0 var(--grey-200);
}
.btn--outline:hover { color: var(--red); border-color: var(--red); transform: translateY(-2px); }
.btn--outline:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--grey-200); }

.btn--nav {
  background: var(--red);
  color: var(--white);
  padding: 0.55em 1.2em;
  font-size: 0.9rem;
  box-shadow: 0 3px 0 var(--red-dark);
}
.btn--nav:hover { background: var(--red-bright); color: var(--white); }
.btn--nav:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--red-dark); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--grey-100);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}
.logo { display: inline-flex; align-items: center; gap: 0.6rem; }
.logo-mark { display: block; border-radius: 7px; flex-shrink: 0; }
.logo-text { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--ink); letter-spacing: -0.01em; }
.footer-logo .logo-text { color: var(--white); }
.footer-logo { margin-bottom: 0.6rem; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5em;
  cursor: pointer;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-list {
  position: fixed;
  top: 72px;
  right: 0;
  bottom: 0;
  width: min(100%, 360px);
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.3s var(--ease);
  overflow-y: auto;
}
.nav-list.is-open { transform: translateX(0); }
.nav-list li { width: 100%; }
.nav-list a:not(.btn) {
  display: flex;
  width: 100%;
  padding: 0.9em 0;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--grey-100);
}
.nav-list a[aria-current="page"] { color: var(--red); }
.nav-list .btn--nav { margin-top: 1rem; justify-content: center; }

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .nav-list {
    position: static;
    flex-direction: row;
    align-items: center;
    transform: none;
    padding: 0;
    gap: 2rem;
    background: transparent;
    width: auto;
    box-shadow: none;
  }
  .nav-list a:not(.btn) { border-bottom: none; padding: 0.4em 0; }
  .nav-list .btn--nav { margin-top: 0; }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(5rem, 14vw, 10rem) 0 clamp(4rem, 9vw, 7rem);
  background:
    linear-gradient(100deg, rgba(20, 23, 26, 0.88) 0%, rgba(20, 23, 26, 0.72) 45%, rgba(20, 23, 26, 0.4) 100%),
    url('../Bilder/hero-loft.jpg') center / cover no-repeat;
  color: var(--white);
}
.hero-inner { max-width: 780px; }
.hero h1 { color: var(--white); }
.lead { font-size: 1.15rem; color: var(--grey-600); max-width: 60ch; }
.hero .lead { color: rgba(255, 255, 255, 0.82); }

.page-hero {
  padding: clamp(3rem, 7vw, 5rem) 0 2.5rem;
  background: linear-gradient(180deg, var(--grey-50), var(--white));
}

/* ---------- Cards & 3D-Tilt ---------- */
.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card img { margin: -1.6rem -1.6rem 1.2rem; width: calc(100% + 3.2rem); max-width: calc(100% + 3.2rem); border-radius: var(--radius) var(--radius) 0 0; aspect-ratio: 3/2; object-fit: cover; }
.card h3 { margin-bottom: 0.4rem; }
.card p { margin-bottom: 0; color: var(--grey-600); }

.tilt-card:hover {
  box-shadow: var(--shadow-lg);
}
@media (prefers-reduced-motion: reduce) {
  .tilt-card { transform: none !important; }
}

.portrait { border-radius: var(--radius); box-shadow: var(--shadow-lg); }

/* ---------- Leistungen: rot versetzte Karten ---------- */
.leistung-card {
  position: relative;
  align-self: start;
}
.leistung-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--red);
  border-radius: var(--radius);
  z-index: 0;
  transform: translate(10px, 10px);
  transition: transform 0.35s var(--ease);
}
.leistung-card:hover::before {
  transform: translate(14px, 14px);
}
.leistung-card > .card {
  position: relative;
  z-index: 1;
}
.leistung-card:hover > .card {
  box-shadow: var(--shadow-lg);
}
.leistung-num {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--red);
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}
@media (min-width: 1024px) {
  .grid--leistungen > .leistung-card:nth-child(2) { margin-top: 1.5rem; }
  .grid--leistungen > .leistung-card:nth-child(5) { margin-top: 1.5rem; }
}
@media (max-width: 640px) {
  .leistung-card::before { transform: translate(6px, 6px); }
  .leistung-card:hover::before { transform: translate(6px, 6px); }
}

/* ---------- Über uns / Kontakt Listen ---------- */
.contact-list { display: flex; flex-direction: column; gap: 0.9rem; margin: 1.2rem 0; }
.contact-list li { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); }
.hint { color: var(--grey-600); font-size: 0.92rem; }

/* ---------- Formular ---------- */
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: flex; flex-direction: column; gap: 0.4rem; }
.form-row label { font-weight: 600; font-size: 0.92rem; }
.form-row input, .form-row textarea {
  font: inherit;
  padding: 0.8em 1em;
  border: 2px solid var(--grey-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.2s;
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--red); }
.form-row--checkbox { flex-direction: row; align-items: flex-start; gap: 0.6rem; }
.form-row--checkbox input { width: 20px; height: 20px; flex-shrink: 0; margin-top: 0.2em; }
.hnypot { position: absolute; left: -9999px; }

/* ---------- CTA ---------- */
.cta-section {
  background: linear-gradient(135deg, var(--ink), var(--ink-soft));
  color: var(--white);
  border-radius: var(--radius);
  margin: 0 auto clamp(2rem, 5vw, 4rem);
  max-width: calc(var(--container-w) + 2.5rem);
}
.cta-section h2, .cta-section p { color: var(--white); }
.cta-section .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--grey-200);
  padding: 3rem 0 1.5rem;
}
.footer-inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
.footer-brand p { color: var(--grey-400); margin: 0; }
.footer-nav, .footer-social { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-nav a, .footer-social a { color: var(--grey-200); }
.footer-nav a:hover, .footer-social a:hover { color: var(--red-bright); }
.copyright { grid-column: 1 / -1; color: var(--grey-400); font-size: 0.85rem; border-top: 1px solid #2A2D32; padding-top: 1.2rem; margin: 0; }

@media (min-width: 1024px) {
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; align-items: start; }
}

/* ---------- Anruf-Button (fixed, pulsierend) ---------- */
.call-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 600;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(185, 21, 48, 0.45);
  min-height: unset;
}
.call-fab .icon { width: 26px; height: 26px; }
.call-fab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--red-bright);
  animation: call-pulse 2.2s ease-out infinite;
  z-index: -1;
}
@keyframes call-pulse {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .call-fab::before { animation: none; }
}
@media (max-width: 640px) {
  .call-fab { width: 54px; height: 54px; }
}

/* ---------- Datenschutz-Banner ---------- */
.privacy-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
  visibility: hidden;
}
.privacy-overlay.show { visibility: visible; pointer-events: auto; }
.privacy-overlay[hidden] { visibility: hidden; }
.privacy-box {
  position: relative;
  width: 100%;
  background: var(--ink-soft);
  color: rgba(255, 255, 255, 0.9);
  padding: 1.75rem 1.5rem 2rem;
  transform: translateY(100%);
  transition: transform 0.5s ease;
  box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.4);
  border-top: 3px solid var(--red-bright);
  box-sizing: border-box;
}
.privacy-overlay.show .privacy-box { transform: translateY(0); }
.privacy-box-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; gap: 2rem; align-items: center; flex-wrap: wrap;
}
.privacy-box__text { flex: 1; min-width: 280px; }
.privacy-box h2 { margin: 0 0 0.6rem; font-size: 1.05rem; color: #fff; }
.privacy-box__list { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; margin: 0 0 0.7rem; padding: 0; font-size: 0.85rem; line-height: 1.55; color: rgba(255,255,255,0.85); }
.privacy-box__list strong { color: var(--red-bright); }
.privacy-box p { font-size: 0.95rem; color: var(--grey-600); }
.privacy-box__text > a { color: rgba(255, 255, 255, 0.75); font-size: 0.82rem; text-decoration: underline; }
.privacy-box__text > a:hover { color: #fff; }
.privacy-box__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; flex-shrink: 0; max-width: 100%; }
.privacy-box .btn { flex: 0 0 auto; white-space: nowrap; width: auto; margin-top: 0; }
.privacy-box__outline {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; white-space: nowrap;
  padding: 0.85rem 1.5rem; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
  color: rgba(255, 255, 255, 0.85); border: 1px solid rgba(255, 255, 255, 0.35);
}
.privacy-box__outline:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.6); color: #fff; }
@media (max-width: 640px) {
  .privacy-box__actions { flex-direction: column; align-items: stretch; }
}

/* ---------- Legal Pages ---------- */
.legal-text h2 { font-size: 1.15rem; margin-top: 2rem; }
.legal-text p, .legal-text ul { color: var(--grey-600); }
.legal-text ul { list-style: disc; padding-left: 1.4em; }
.legal-text ul li { margin-bottom: 0.4em; }

/* ---------- Scroll-Reveal ---------- */
.reveal-up, .reveal-left, .reveal-right {
  opacity: 0;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.reveal-up { transform: translateY(28px); }
.reveal-left { transform: translateX(-32px); }
.reveal-right { transform: translateX(32px); }
.reveal-up.is-visible, .reveal-left.is-visible, .reveal-right.is-visible {
  opacity: 1;
  transform: none;
}
@media (max-width: 1023px) {
  .reveal-up { transform: translateY(14px); }
  .reveal-left, .reveal-right { transform: translateY(14px); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-up, .reveal-left, .reveal-right { opacity: 1; transform: none; transition: none; }
}
