/* Liederbacher Metallbau – One-Pager
   Bewusst ohne externe Schriften/CDNs: keine Drittanbieter-Anfragen (DSGVO). */

:root {
  /* Farben aus dem Logo: Blau #44559c, Rot #e0004d, Grau #585858.
     Rot nur für Handlungen (Buttons), Blau für Struktur und Links. */
  --navy: #161c44;          /* dunkle Flächen, abgeleitet vom Logo-Blau */
  --navy-2: #1f2758;
  --blue: #44559c;          /* Logo-Blau */
  --blue-light: #a9b3e6;    /* Logo-Blau auf dunklem Grund */
  --gray: #585858;          /* Logo-Grau */
  --paper: #f4f5f9;
  --paper-2: #e7e9f2;
  --white: #fff;
  --ink: #1a1d2b;
  --ink-soft: #525766;
  --line: #d6d9e6;
  --accent: #e0004d;        /* Logo-Rot */
  --accent-dark: #b8003f;
  --accent-ink: #fff;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(18, 23, 58, .12);
  --wrap: 1180px;
  --header-h: 88px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.02em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue); margin-bottom: .9em;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.lead { font-size: 1.2rem; color: var(--ink-soft); }
:is(.hero, .section-dark, .contact) .eyebrow { color: var(--blue-light); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: .85em 1.4em;
  font: inherit; font-weight: 700; text-decoration: none;
  color: var(--accent-ink); background: var(--accent);
  border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(224, 0, 77, .35);
  transition: background .2s, transform .2s, box-shadow .2s;
}
.btn:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(224, 0, 77, .45); }
.btn svg { width: 1.3em; height: 1.3em; flex: none; }
.btn-small { padding: .55em 1.1em; font-size: .95rem; box-shadow: none; }
.btn-xl { font-size: 1.25rem; padding: 1.05em 2em; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--ink); box-shadow: none; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); box-shadow: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--white);
  color: var(--ink);
  border-bottom: 3px solid var(--blue);
  box-shadow: 0 2px 14px rgba(18, 23, 58, .08);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 64px; width: auto; }
@media (max-width: 860px) { :root { --header-h: 72px; } .brand img { height: 50px; } }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 6px; }
.main-nav a:not(.btn) { display: block; padding: .5em .8em; text-decoration: none; font-weight: 600; font-size: .98rem; color: var(--ink); border-radius: var(--radius-sm); }
.main-nav a:not(.btn):hover { color: var(--blue); background: var(--paper); }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px;
    background: transparent; border: 0; color: inherit; cursor: pointer;
  }
  .bars, .bars::before, .bars::after { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
  .bars { position: relative; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -7px; } .bars::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }

  .main-nav ul {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 20px; background: var(--white);
    border-bottom: 3px solid var(--blue); box-shadow: 0 12px 24px rgba(18, 23, 58, .12);
    display: none;
  }
  .main-nav ul.is-open { display: flex; }
  .main-nav a:not(.btn) { padding: .9em .4em; border-bottom: 1px solid var(--line); border-radius: 0; }
  .main-nav li:last-child { margin-top: 14px; }
  .main-nav .btn-small { width: 100%; padding: .9em; font-size: 1.05rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: min(88vh, 820px);
  display: flex; align-items: flex-end;
  color: var(--white);
  background: var(--navy);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%; z-index: -2; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(18, 23, 58, .92) 0%, rgba(18, 23, 58, .72) 45%, rgba(18, 23, 58, .25) 100%),
    linear-gradient(0deg, rgba(18, 23, 58, .7) 0%, transparent 50%);
}
.hero-content { padding: 120px 0 90px; max-width: 760px; margin-left: max(16px, calc((100% - var(--wrap)) / 2)); }
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 4.8rem); font-weight: 850; letter-spacing: -.035em; margin-bottom: .35em; }
.hero .lead { color: rgba(255, 255, 255, .85); max-width: 40em; margin-bottom: 2em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.hero .btn-xl { font-size: clamp(1.15rem, 2vw, 1.4rem); padding: 1.1em 2.2em; }
.hero-phone { display: flex; flex-direction: column; text-decoration: none; line-height: 1.25; }
.hero-phone span { font-size: .85rem; opacity: .7; }
.hero-phone strong { font-size: 1.5rem; letter-spacing: .01em; }
.hero-phone:hover strong { color: var(--blue-light); }

/* ---------- Fakten ---------- */
.facts { background: var(--navy-2); color: var(--paper); }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts-grid div { padding: 28px 20px; border-left: 1px solid rgba(255, 255, 255, .08); display: flex; flex-direction: column; gap: 4px; }
.facts-grid div:first-child { border-left: 0; padding-left: 0; }
.facts-grid strong { font-size: 1.7rem; font-weight: 800; color: var(--white); letter-spacing: -.02em; }
.facts-grid span { font-size: .95rem; opacity: .8; }
@media (max-width: 760px) {
  .facts-grid { grid-template-columns: 1fr 1fr; }
  .facts-grid div { padding: 20px 14px; }
  .facts-grid div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .facts-grid div:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .08); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-dark { background: var(--navy); color: var(--paper); }
.section-dark .lead, .section-dark .section-head p:not(.eyebrow) { color: rgba(244, 245, 249, .72); }
.section-muted { background: var(--paper-2); }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head p:not(.eyebrow) { color: var(--ink-soft); font-size: 1.1rem; }

/* ---------- Leistungen ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1000px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .services { grid-template-columns: 1fr; } }

.service {
  display: flex; flex-direction: column;
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .25s, box-shadow .25s;
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; }
.service-body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.service-body p { color: var(--ink-soft); flex: 1; }
.more { font-weight: 700; text-decoration: none; color: var(--blue); align-self: flex-start; }
.more::after { content: " →"; transition: margin .2s; }
.more:hover::after { margin-left: 4px; }

.service-cta { background: var(--navy-2); color: var(--paper); border-color: var(--navy-2); justify-content: flex-end; min-height: 280px;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 2px, transparent 2px 14px); }
.service-cta .service-body { justify-content: flex-end; }
.service-cta h3 { font-size: 1.6rem; }
.service-cta p { color: rgba(244, 245, 249, .75); flex: 0; margin-bottom: 1.4em; }
.service-cta .btn { align-self: flex-start; }

/* ---------- Referenzen ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.chip {
  font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
  padding: .55em 1.1em; border-radius: 999px;
  color: var(--paper); background: transparent; border: 1px solid rgba(255, 255, 255, .22);
  transition: background .2s, border-color .2s, color .2s;
}
.chip:hover { border-color: var(--paper); }
.chip.is-active { background: var(--white); border-color: var(--white); color: var(--navy); }

.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.gallery li[hidden] { display: none; }
.gallery a { display: block; position: relative; overflow: hidden; border-radius: var(--radius-sm); aspect-ratio: 4 / 3; background: var(--navy-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s, opacity .3s; }
.gallery a:hover img { transform: scale(1.06); }
.gallery a::after {
  content: attr(data-caption); position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 14px 12px; font-size: .9rem; font-weight: 600; color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, .75), transparent);
  opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s;
}
.gallery a:hover::after, .gallery a:focus-visible::after { opacity: 1; transform: none; }
@media (hover: none) { .gallery a::after { opacity: 1; transform: none; } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr 1fr; gap: 8px; } .gallery a::after { font-size: .78rem; padding: 20px 8px 8px; } }

/* ---------- Über uns ---------- */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-text p:not(.eyebrow) { color: var(--ink-soft); font-size: 1.1rem; }
.about-img { margin: 0; position: relative; }
.about-img img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.about-img::before { content: ""; position: absolute; inset: 24px -18px -18px 24px; border: 2px solid var(--blue); border-radius: var(--radius); z-index: -1; }
.about-img { isolation: isolate; }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .about-img img { aspect-ratio: 16 / 10; }
  .about-img::before { display: none; }
}

.promise { list-style: none; padding: 0; margin: 1.5em 0 0; display: grid; gap: 10px; }
.promise li { display: flex; align-items: center; gap: 12px; font-size: 1.1rem; }
.promise li::before {
  content: ""; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.steps { list-style: none; padding: 0; margin: clamp(56px, 8vw, 96px) 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; }
.steps li { padding: 28px 24px 8px 0; border-top: 2px solid var(--line); position: relative; }
.steps li::before { content: ""; position: absolute; top: -2px; left: 0; width: 48px; height: 2px; background: var(--blue); }
.steps span { display: block; font-size: .85rem; font-weight: 800; color: var(--blue); letter-spacing: .1em; margin-bottom: 10px; }
.steps p { color: var(--ink-soft); font-size: .98rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; gap: 0 24px; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Kontakt ---------- */
.contact { background: var(--navy-2); color: var(--paper); position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; right: -200px; top: -200px; width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(68, 85, 156, .45), transparent 65%);
  pointer-events: none;
}
.contact .lead { color: rgba(244, 245, 249, .75); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; position: relative; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info .btn-xl { margin: 12px 0 36px; font-size: clamp(1.2rem, 2.4vw, 1.5rem); padding: 1.1em 1.5em; }

.contact-list { margin: 0; display: grid; gap: 18px; }
.contact-list div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.contact-list div:last-child { border-bottom: 0; }
.contact-list dt { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; opacity: .55; padding-top: .25em; }
.contact-list dd { margin: 0; font-size: 1.08rem; word-break: break-word; }
.contact-list a { text-decoration: none; border-bottom: 1px solid var(--blue-light); }
.contact-list a:hover { color: var(--blue-light); }

.contact-form {
  background: var(--paper); color: var(--ink);
  padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  display: grid; gap: 16px;
}
.contact-form h3 { font-size: 1.5rem; margin: 0; }
.form-note { color: var(--ink-soft); font-size: .95rem; margin: -6px 0 4px; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.opt { font-weight: 400; color: var(--ink-soft); }
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit; font-weight: 400; color: var(--ink);
  width: 100%; padding: .75em .9em;
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form :is(input, select, textarea):focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(68, 85, 156, .25); }
.contact-form .is-invalid { border-color: #c62828; }
.form-error { color: #c62828; font-weight: 600; margin: 0; }
.contact-form .btn { margin-top: 6px; }

/* ---------- Anfahrt ---------- */
.routes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .routes { grid-template-columns: 1fr; } }
.route { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.route p { color: var(--ink-soft); margin: 0; }
.route-map { background: var(--navy); color: var(--paper); border-color: var(--navy); display: flex; flex-direction: column; }
.route-map p { color: rgba(244, 245, 249, .7); margin-bottom: 1.4em; }
.route-map .btn-ghost { color: var(--paper); border-color: var(--paper); align-self: flex-start; margin-top: auto; }
.route-map .btn-ghost:hover { background: var(--paper); color: var(--navy); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(244, 245, 249, .65); font-size: .92rem; padding: 28px 0 100px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer-inner p { margin: 0; }
.footer-inner strong { color: var(--paper); }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--blue-light); }

/* ---------- Schwebender Kontakt-Button ---------- */
.fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: inline-flex; align-items: center; gap: .5em;
  padding: 1em 1.4em; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 1.05rem; text-decoration: none;
  box-shadow: 0 10px 28px rgba(224, 0, 77, .45), 0 2px 6px rgba(0, 0, 0, .2);
  transition: transform .25s, opacity .25s, background .2s;
}
.fab svg { width: 1.3em; height: 1.3em; }
.fab:hover { background: var(--accent-dark); transform: translateY(-2px); }
.fab.is-hidden { opacity: 0; transform: translateY(20px); pointer-events: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(18, 23, 58, .94); color: #fff;
  display: none; align-items: center; justify-content: center;
}
.lightbox[open] { display: flex; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; max-width: min(92vw, 1400px); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lightbox img { max-height: 82vh; width: auto; border-radius: var(--radius-sm); }
.lightbox figcaption { font-weight: 600; opacity: .85; text-align: center; }
.lightbox button {
  position: absolute; background: rgba(255, 255, 255, .1); color: #fff; border: 0; cursor: pointer;
  width: 52px; height: 52px; border-radius: 50%; font-size: 2rem; line-height: 1; display: grid; place-items: center;
}
.lightbox button:hover { background: var(--accent); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; translate: 0 -50%; }
.lb-next { right: 18px; top: 50%; translate: 0 -50%; }
@media (max-width: 640px) { .lb-prev, .lb-next { top: auto; bottom: 18px; translate: none; } }

/* ---------- Rechtliche Unterseiten ---------- */
.legal { padding: clamp(48px, 7vw, 96px) 0; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: .8em; }
.legal h2 { font-size: 1.3rem; margin-top: 2em; }
.legal p, .legal li { color: var(--ink-soft); }
.back { display: inline-block; margin-bottom: 28px; font-weight: 700; text-decoration: none; color: var(--blue); }

/* ---------- Feinschliff Smartphone ---------- */
@media (max-width: 640px) {
  .hero::after { background: linear-gradient(0deg, rgba(18, 23, 58, .94) 0%, rgba(18, 23, 58, .78) 55%, rgba(18, 23, 58, .45) 100%); }
  .hero-content { padding: 72px 0 56px; }
  .hero .btn-xl { width: 100%; }
  .contact-form .btn-xl { font-size: 1.1rem; padding: 1em 1.2em; }
}
:is(.hero, .facts, .section-dark, .contact, .site-footer, .service-cta, .route-map) :focus-visible { outline-color: var(--blue-light); }
