/* ==========================================================
   Zimmermann Facility Service — zf-weiden.de
   Static rebuild — no framework, no external dependencies.
   Tokens extracted from the original Webflow design.
   ========================================================== */

/* ---------- Design tokens ---------- */
:root {
  --color-text: #09090b;
  --color-ink: #0a0b07;
  --color-white: #fff;
  --color-red: #f40000;
  --color-red-bright: #ff1b1b;
  --color-dark-hover: #18181b;
  --color-mint: #8beab1;
  --color-link-current: #0082f3;
  --hero-overlay: rgba(0, 0, 0, 0.29);

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 64px;

  --radius-sm: 4px;
  --radius-md: 8px;

  --text-xs: 14px;
  --text-sm: 16px;
  --text-md: 20px;
  --text-lg: 24px;
  --text-xl: 36px;

  --container-max: 1440px;
  --font-sans: Tahoma, Verdana, Segoe, sans-serif;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* hide scrollbars, as in the original design */
  scrollbar-width: none;
}

body::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  background-color: var(--color-white);
  color-scheme: light;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  vertical-align: middle;
}

video {
  max-width: 100%;
}

a {
  color: var(--color-ink);
  text-decoration: none;
}

::selection {
  background-color: var(--color-mint);
  color: var(--color-text);
}

h1, h2, h3, h4, p {
  margin: 0;
}

h1 { font-size: 4rem; font-weight: 500; line-height: 1.1; }
h2 { font-size: 2rem; font-weight: 500; line-height: 1.2; }
h3 { font-size: 1.75rem; font-weight: 500; line-height: 1.3; }
h4 { font-size: 1.5rem; font-weight: 500; line-height: 1.3; }

ul {
  margin: 0 0 10px;
  list-style-type: disc;
}

li {
  margin-bottom: var(--space-sm);
  padding-top: var(--space-xs);
  padding-bottom: var(--space-xs);
}

li p {
  margin: 0;
}

/* ---------- Typography helpers ---------- */
.heading-xl { font-size: var(--text-xl); font-weight: 500; line-height: 1.3; }
.heading-lg { font-size: var(--text-lg); font-weight: 500; line-height: 1.3; }
.heading-md { font-size: var(--text-md); font-weight: 400; line-height: 1.3; }
.heading-sm { font-size: var(--text-xs); font-weight: 700; line-height: 1.3; }
.body-text-md { font-size: var(--text-sm); font-weight: 400; }
.body-text-lg { font-size: var(--text-xl); font-weight: 400; line-height: 1.2; color: var(--color-ink); }
.text-align-center { text-align: center; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: var(--space-md);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.container--4 { grid-template-columns: repeat(4, 1fr); }
.container--6 { grid-template-columns: repeat(6, 1fr); }
.container--9 { grid-template-columns: repeat(9, 1fr); gap: var(--space-md); place-items: center; }
.container--12 { grid-template-columns: repeat(12, 1fr); }
.container--gap-sm { gap: var(--space-md); }

.container > * {
  min-width: 0; /* prevent grid blowout from long words/images */
}

.section {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

/* ---------- Button ---------- */
.button {
  padding: var(--space-md);
  border: 0;
  border-radius: var(--radius-md);
  background-color: var(--color-red);
  color: var(--color-white);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.4s cubic-bezier(0.645, 0.045, 0.355, 1),
    color 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.button:hover {
  background-color: var(--color-dark-hover);
  color: var(--color-red);
}

/* ---------- Header / navigation ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  width: 100%;
}

.site-header__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-white);
}

.brand {
  padding: var(--space-xs);
  border-radius: var(--radius-md);
  background-color: var(--color-white);
}

.brand__logo {
  display: block;
  min-width: 42px;
  min-height: 42px;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
}

.nav-link {
  padding: var(--space-sm);
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color 0.35s cubic-bezier(0.19, 1, 0.22, 1);
}

.nav-link:hover {
  color: var(--color-red-bright);
}

.nav-link.is-current {
  color: var(--color-link-current);
}

.menu-button {
  display: none;
  padding: 12px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-ink);
  cursor: pointer;
}

.menu-button svg {
  display: block;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  min-height: 80vh;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
  color: var(--color-white);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hero-overlay);
}

.hero__content {
  grid-column: span 3;
}

@media screen and (max-width: 479px) {
  /* keep the 4rem headline from overflowing narrow screens
     (the Webflow original clipped it): full width + hyphenate
     long words like "Gebäudeservice" */
  .hero__content {
    grid-column: 1 / -1;
  }

  .hero h1 {
    hyphens: auto;
    -webkit-hyphens: auto;
    hyphenate-limit-chars: 12 6 6;
  }
}

/* ---------- Referenzen (partner logos) ---------- */
.logos__heading {
  grid-column: 1 / -1;
}

.logo-partner {
  filter: grayscale(1);
}

/* ---------- Section grids (desktop) ---------- */
.trust__content { grid-column: 3 / 5; }

.services__intro-text { grid-column: span 2; }
.services__intro-image { grid-column: span 4; }
.services__card { grid-column: span 2; }

.area__text { grid-row: span 2; grid-column: span 5; }
.area__img-1 { grid-area: 1 / 7 / 2 / 10; }
.area__img-2 { grid-area: 1 / 10 / 3 / 13; }
.area__img-3 { grid-area: 2 / 7 / 3 / 10; }

.history__text { grid-column: 4 / 7; }
.history__image { grid-column: 1 / 4; grid-row: 1; }

/* ---------- CTA ---------- */
.cta-box {
  align-items: center;
  padding: 60px;
  border-radius: var(--radius-md);
  background-color: var(--color-mint);
}

/* ---------- Images ---------- */
.aspect-16-9 {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.aspect-4-3 {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.aspect-2-3 {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.img-fullheight {
  height: 100%;
  object-fit: cover;
}

.border-radius-default {
  border-radius: var(--radius-md);
}

/* ---------- Footer ---------- */
.footer {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.footer__mail { grid-column: span 2; }

.footer-link:hover {
  color: var(--color-red-bright);
}

/* ---------- Legal pages ---------- */
.legal__content {
  grid-column: 1 / 5;
}

.legal__content h2 {
  margin-top: var(--space-lg);
}

.legal__content h3,
.legal__content h4 {
  margin-top: var(--space-md);
}

.legal__content p {
  margin-bottom: var(--space-md);
}

.legal__content a {
  text-decoration: underline;
}

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

/* ---------- Tablet & below: collapse navigation ---------- */
@media screen and (max-width: 991px) {
  .body-text-lg { font-size: var(--text-lg); }

  .menu-button {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background-color: var(--color-white);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .site-header.is-open .nav-menu {
    display: flex;
  }

  .nav-link {
    padding: 12px var(--space-md);
  }
}

/* ---------- Mobile: stack the grids ---------- */
@media screen and (max-width: 767px) {
  .menu-button {
    background-color: #c26d6d;
  }

  .site-header.is-open .menu-button {
    background-color: var(--color-red);
    color: var(--color-white);
  }

  .trust__content,
  .services__intro-text,
  .services__intro-image,
  .services__card,
  .history__text,
  .history__image {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .area__text {
    grid-row: auto;
    grid-column: 1 / -1;
  }

  .area__img-1 { grid-area: auto / span 5; }
  .area__img-2 { grid-area: auto / span 4; }
  .area__img-3 { grid-area: auto / span 3; }

  .footer__mail { grid-column: span 4; }
  .footer__office,
  .footer__legal { grid-column: span 2; }

  .legal__content { grid-column: 1 / -1; }
}

/* ---------- Small mobile ---------- */
@media screen and (max-width: 479px) {
  .button {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .footer__office,
  .footer__legal {
    grid-column: span 4;
  }

  .footer__legal {
    order: 9999;
  }
}
