/* ==========================================================================
   MANI TROCKENBAU – Stylesheet
   Struktur: Reset & Basis, Header, Hero, Trust, Kontakt, Leistungen,
   Footer, Schnellkontakt, Hinweis, Rechtsseiten,
   Responsive Breakpoints, Reduced Motion
   ========================================================================== */

/* ---------- Design-Tokens & Reset ---------- */
:root {
  --ink: #232421;
  --muted: #686963;
  --line: #d9dad4;
  --paper: #f5f5f1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font: inherit;
}

button, a, input {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid #88703f;
  outline-offset: 5px;
}

svg {
  width: 24px;
  height: 24px;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  font-size: clamp(48px, 6.9vw, 105px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -5px;
  margin-bottom: 30px;
}

h1 em {
  font-style: normal;
  color: #898b82;
}

h2 {
  font-size: clamp(34px, 4.2vw, 62px);
  line-height: 1.1;
  letter-spacing: -2.2px;
  font-weight: 500;
  margin-bottom: 28px;
}

h3 {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
}

.text-link {
  display: inline-flex;
  gap: 32px;
  align-items: center;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 8px;
  color: var(--ink);
  font-size: 14px;
}

.section {
  padding: 110px 7%;
}

/* ---------- Header / Navigation ---------- */
header {
  position: fixed;
  z-index: 20;
  top: 0;
  width: 100%;
  height: 106px;
  display: flex;
  align-items: center;
  gap: 38px;
  padding: 12px 7%;
  transition: background .25s, box-shadow .25s;
  background: #ffffffba;
}

header.scrolled {
  background: #fffffff5;
  box-shadow: 0 1px 0 var(--line);
}

.brand {
  margin-right: auto;
  line-height: 0;
}

.brand img {
  width: 115px;
  height: auto;
  mix-blend-mode: multiply;
}

header nav {
  display: flex;
  gap: 25px;
  font-size: 14px;
}

header nav a:hover {
  opacity: .5;
}

.header-cta {
  background: var(--ink);
  color: #fff;
  padding: 14px 20px;
  font-size: 14px;
}

.header-cta span {
  margin-left: 22px;
}

#menu {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: 140px 7% 0;
  background: var(--paper);
}

.hero-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 50px;
}

.hero-side {
  width: 300px;
  padding-bottom: 36px;
  color: var(--muted);
}

.hero-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 8px;
}

/* Großer Vorher/Nachher-Vergleich – zentrales visuelles Element der Startseite.
   Die Box behält das Seitenverhältnis des Originalfotos (kein Zuschnitt, keine Verzerrung),
   dadurch bleibt das komplette Gebäude auf Desktop und Mobile sichtbar. */
.comparison {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  aspect-ratio: 833 / 941;
  position: relative;
  overflow: hidden;
  background: #d6d6cf;
  isolation: isolate;
}

.compare-panel {
  position: absolute;
  inset: 0;
}

.compare-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.before {
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
}

.divider {
  position: absolute;
  left: var(--split);
  top: 0;
  height: 100%;
  border-left: 1px solid white;
  pointer-events: none;
}

.divider span {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: #fff;
  box-shadow: 0 3px 20px #0001;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  white-space: nowrap;
}

.comparison input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
  touch-action: pan-y;
}

.comparison:focus-within {
  outline: 3px solid #88703f;
  outline-offset: 3px;
}

/* ---------- Trust / USPs ---------- */
.trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 42px 7%;
  border-bottom: 1px solid var(--line);
}

.trust > div {
  position: relative;
  padding-left: 27px;
}

.trust span {
  position: absolute;
  left: 0;
  top: 4px;
  font-size: 11px;
  color: #83867d;
}

.trust h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.trust p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* ---------- Leistungen ---------- */
.services {
  background: var(--paper);
  padding-top: 70px;
  padding-bottom: 70px;
}

.services h2 {
  margin-bottom: 10px;
}

.services-rows {
  display: flex;
  flex-direction: column;
}

.service-row {
  display: flex;
  align-items: center;
  gap: 44px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.services-rows > .service-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.services-rows > .service-row:first-child {
  padding-top: 0;
}

.service-row:nth-of-type(even) {
  flex-direction: row-reverse;
}

.service-media, .service-copy {
  flex: 1 1 50%;
  min-width: 0;
}

.service-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #e6e7e0;
}

.service-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.service-media.has-image img {
  display: block;
}

.service-media-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
}

.service-media.has-image .service-media-placeholder {
  display: none;
}

.service-copy h3 {
  font-size: clamp(17px, 2.8vw, 22px);
  margin-bottom: 8px;
}

.service-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 420px;
}

.service-list li {
  padding: 6px 0;
  border-top: 1px solid var(--line);
  font-size: clamp(13px, 0.85vw + 10px, 15px);
  color: var(--muted);
}

.service-list li:first-child {
  border-top: 0;
}

.service-area {
  margin: 16px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- Kontakt ---------- */
.contact {
  background: #282a26;
  color: #fff;
}

.contact-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact h2 {
  font-size: clamp(48px, 7vw, 98px);
  letter-spacing: -4px;
}

.contact > p {
  color: #c2c4bb;
  max-width: 460px;
}

.contact .text-link {
  color: #fff;
  border-bottom-color: #fff;
  margin-top: 28px;
}

.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 38px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.contact-link span {
  overflow-wrap: anywhere;
}

.contact-buttons a {
  padding: 16px 25px;
  border: 1px solid #7c8172;
  transition: background .2s;
}

.contact-buttons a:hover {
  background: #42483a;
}

/* Öffnungszeiten im Kontakt-Bereich */
.opening-hours {
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid #454940;
}

.opening-hours h3 {
  font-size: 16px;
  margin-bottom: 18px;
}

.opening-hours dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 320px));
  gap: 8px 40px;
  margin: 0;
}

.opening-hours dl > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0;
  border-bottom: 1px solid #3a3d35;
  font-size: 14px;
}

.opening-hours dt {
  color: #d3d5cb;
}

.opening-hours dd {
  margin: 0;
  color: #fff;
  text-align: right;
}

/* ---------- Footer ---------- */
footer {
  padding: 70px 7% 20px;
  background: #fff;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 35px;
}

.footer-top img {
  width: 135px;
  height: auto;
}

.footer-top h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 22px;
}

.footer-top a {
  display: flex;
  font-size: 14px;
  margin-bottom: 10px;
}

.footer-hours {
  font-size: 13px;
  color: var(--muted);
  margin-top: 18px;
  line-height: 1.5;
}

.footer-hours strong {
  color: var(--ink);
  font-weight: 600;
}

.footer-contacts svg {
  width: 17px;
  height: 17px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 55px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Schnellkontakt (fixierte Leiste) ---------- */
.contact-rail {
  position: fixed;
  right: 0;
  top: 40%;
  z-index: 15;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 18px #0001;
}

.contact-rail a {
  height: 55px;
  width: 58px;
  justify-content: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.contact-rail span {
  position: absolute;
  right: 58px;
  background: var(--ink);
  color: #fff;
  height: 55px;
  align-items: center;
  padding: 0 20px;
  font-size: 14px;
  white-space: nowrap;
  display: none;
}

.contact-rail a:hover span, .contact-rail a:focus-visible span {
  display: flex;
}

.contact-rail a:hover {
  background: var(--paper);
}

/* ---------- Hinweis-Toast ---------- */
#notice {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: var(--ink);
  padding: 16px 24px;
  box-shadow: 0 2px 30px #0002;
  z-index: 50;
  display: none;
  font-size: 14px;
  max-width: 90%;
  width: max-content;
}

#notice.visible {
  display: block;
}

/* ---------- Rechtsseiten (Impressum / Datenschutz) ---------- */
.legal {
  padding-top: 170px;
  max-width: 1040px;
  min-height: 70vh;
}

.legal h1 {
  font-size: 64px;
  letter-spacing: -2px;
  margin-top: 40px;
}

.legal h2 {
  font-size: 25px;
  letter-spacing: -.5px;
  margin-top: 40px;
}

.legal dt {
  font-weight: 600;
  margin-top: 22px;
}

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

.legal p {
  overflow-wrap: anywhere;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (min-width: 1550px) {
  .hero, .section, .trust, footer {
    padding-left: max(7%, calc((100vw - 1400px) / 2));
    padding-right: max(7%, calc((100vw - 1400px) / 2));
  }
}

@media (max-width: 1100px) {
  header {
    gap: 22px;
    padding: 12px 5%;
  }
  header nav {
    gap: 16px;
  }
  .header-cta {
    display: none;
  }
  .hero, .section, .trust, footer {
    padding-left: 6%;
    padding-right: 6%;
  }
  .hero-side {
    width: 260px;
  }
  .service-row {
    gap: 36px;
  }
  .contact-rail a {
    width: 45px;
    height: 48px;
  }
  .contact-rail span {
    right: 45px;
    height: 48px;
  }
  .footer-top {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

@media (max-width: 700px) {
  html {
    scroll-padding-top: 85px;
  }
  header {
    height: 82px;
    padding: 9px 6%;
    background: #fffffff2;
  }
  .brand img {
    width: 91px;
  }
  #menu {
    display: block;
    border: 0;
    background: none;
    padding: 12px 0 12px 12px;
  }
  #menu span {
    display: block;
    width: 28px;
    height: 1px;
    background: var(--ink);
    margin: 7px;
  }
  header nav {
    display: none;
    position: absolute;
    top: 82px;
    left: 0;
    right: 0;
    padding: 25px 6%;
    background: #fff;
    flex-direction: column;
    font-size: 18px;
    border-bottom: 1px solid var(--line);
  }
  header nav.open {
    display: flex;
  }
  .hero {
    padding-top: 105px;
  }
  .hero-heading {
    display: block;
  }
  h1 {
    font-size: 56px;
    letter-spacing: -3px;
    line-height: 1.04;
    margin-bottom: 22px;
  }
  .hero-side {
    width: auto;
    max-width: 380px;
    padding: 0 0 24px;
  }
  .hero-side .text-link {
    font-size: 13px;
  }
  .divider span {
    width: 47px;
    height: 47px;
    font-size: 17px;
  }
  .trust {
    grid-template-columns: repeat(2, 1fr);
    padding-top: 30px;
    padding-bottom: 30px;
    gap: 26px 18px;
  }
  .trust h3 {
    font-size: 14px;
  }
  .trust p {
    font-size: 12px;
  }
  .section {
    padding-top: 65px;
    padding-bottom: 65px;
  }
  h2 {
    font-size: 38px;
    letter-spacing: -1.7px;
  }
  .services-rows {
    gap: 0;
  }
  .services {
    padding-top: 45px;
    padding-bottom: 45px;
  }
  .service-row, .service-row:nth-of-type(even) {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 24px 0;
  }
  .contact h2 {
    font-size: 56px;
    letter-spacing: -2.5px;
  }
  .contact-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .contact-buttons a {
    padding: 14px;
    font-size: 14px;
    gap: 8px;
  }
  .opening-hours dl {
    grid-template-columns: 1fr;
  }
  .opening-hours {
    margin-top: 32px;
    padding-top: 24px;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .footer-top > div:first-child {
    grid-column: 1 / -1;
  }
  .footer-top > div:last-child {
    grid-column: auto;
  }
  .footer-bottom {
    flex-wrap: wrap;
    margin-top: 35px;
  }
  footer {
    padding-top: 45px;
    padding-bottom: 90px;
  }
  .contact-rail {
    top: auto;
    bottom: 0;
    width: 100%;
    flex-direction: row;
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff;
  }
  .contact-rail a {
    width: 20%;
    height: 58px;
    flex-direction: column;
    gap: 3px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }
  .contact-rail svg {
    width: 20px;
    height: 20px;
  }
  .contact-rail span {
    display: block;
    position: static;
    background: none;
    color: inherit;
    height: auto;
    padding: 0;
    font-size: 10px;
  }
  .contact-rail a:hover span, .contact-rail a:focus-visible span {
    display: block;
  }
  #notice {
    bottom: 80px;
    font-size: 13px;
    width: 88%;
  }
  .legal {
    padding-top: 120px;
  }
  .legal h1 {
    font-size: 43px;
    letter-spacing: -1px;
  }
  .legal h2 {
    font-size: 24px;
  }
  .legal dd {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
