/* ==========================================================================
   Stiehler GmbH & Co. KG – Stylesheet
   ========================================================================== */

/* --- Design-Tokens ------------------------------------------------------ */
:root {
  --c-dark:        #1c1c1c;
  --c-dark-soft:   #3a3a3a;
  --c-grey:        #58595b;
  --c-brand:       #9c9e9f;
  --c-text:        #333333;
  --c-muted:       #6a6a6a;
  --c-line:        #d5d5d5;
  --c-line-soft:   #c9c9c9;
  --c-white:       #ffffff;
  --c-offwhite:    #f2f2f2;

  --wrap:          1200px;
  --wrap-wide:     1600px;
  --gutter:        clamp(1rem, 4vw, 1.5rem);

  --track:         0.18em;
  --shadow-text:   0 1px 3px rgba(0, 0, 0, 0.65);

  --font: Avenir, "Avenir Next", "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  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;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--c-white);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img, video, iframe { max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.25; overflow-wrap: break-word; }
p { margin: 0; text-wrap: pretty; overflow-wrap: break-word; }

a { color: inherit; }

input, textarea, button, select { font: inherit; color: inherit; }

/* Sichtbarer Fokus für Tastaturbedienung */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* --- Hilfsklassen ------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--wide { max-width: var(--wrap-wide); }

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  background: var(--c-white);
  color: var(--c-dark);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

/* --- Kopfbereich -------------------------------------------------------- */
.site-header {
  position: relative;
  background: var(--c-dark) url("../img/ui/lochblech.jpg") center / cover no-repeat;
  color: var(--c-white);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-block: clamp(18px, 3vw, 32px) clamp(14px, 2vw, 20px);
}

.brand {
  grid-column: 2;
  justify-self: center;
  display: block;
  line-height: 0;
}
.brand img {
  width: clamp(190px, 26vw, 274px);
  height: auto;
  display: block;
}

.iso-badge {
  grid-column: 3;
  justify-self: end;
  display: block;
  line-height: 0;
}
.iso-badge img {
  width: 123px;
  height: 120px;
  object-fit: contain;
  display: block;
}

/* Navigation */
.site-nav {
  padding-bottom: clamp(16px, 2.5vw, 28px);
}
.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4.5vw, 68px);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: var(--track);
  text-transform: uppercase;
}
.site-nav__list a {
  display: inline-block;
  padding: 6px 0;
  color: var(--c-white);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.site-nav__list a:hover { border-bottom-color: var(--c-white); }
.site-nav__list a[aria-current="page"] { border-bottom-color: var(--c-white); }

/* Mobile-Umschalter */
.nav-toggle {
  grid-column: 1;
  justify-self: start;
  display: none;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--c-white);
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav-toggle__bars {
  display: block;
  position: relative;
  width: 18px; height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px; height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top: 6px; }

@media (max-width: 860px) {
  .site-header__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
  }
  .brand { grid-column: 2; justify-self: start; }
  .brand img { width: clamp(150px, 38vw, 220px); }
  .iso-badge { grid-column: 3; }
  .iso-badge img { width: clamp(52px, 13vw, 72px); }
  .nav-toggle { display: inline-flex; padding: 9px 11px; }

  .site-nav { display: none; }
  .site-nav.is-open { display: block; }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    text-align: center;
  }
  .site-nav__list li + li { border-top: 1px solid rgba(255, 255, 255, 0.18); }
  .site-nav__list a {
    display: block;
    padding: 15px 0;
    border-bottom: 0;
  }
  .site-nav__list a[aria-current="page"] { background: rgba(255, 255, 255, 0.1); }
}

/* Sehr schmale Geräte: Beschriftung des Menü-Knopfes einsparen */
@media (max-width: 480px) {
  .nav-toggle { font-size: 0; gap: 0; padding: 11px 12px; }
  .nav-toggle__bars { width: 20px; }
  .nav-toggle__bars::before, .nav-toggle__bars::after { width: 20px; }
}

/* --- Inhaltsbereich ----------------------------------------------------- */
.site-main { flex: 1 0 auto; }

.section { padding-block: clamp(40px, 6vw, 64px) clamp(56px, 9vw, 96px); }

.section-title {
  margin-bottom: clamp(20px, 3vw, 28px);
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-grey);
}
.section-title--spaced { margin-bottom: clamp(28px, 4vw, 40px); }

.prose {
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: var(--c-text);
}
.prose a { color: var(--c-dark); }

/* --- Startseite: Bühne -------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 871px;
  background: var(--c-dark);
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(16, 16, 16, 0.6);
  pointer-events: none;
}
.hero__content {
  position: relative;
  padding-block: clamp(56px, 8vw, 80px);
  color: var(--c-white);
}
.hero__title {
  max-width: 20ch;
  margin-inline: auto;
  margin-bottom: clamp(12px, 2vw, 18px);
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  text-shadow: var(--shadow-text);
}
.hero__lead {
  max-width: 62ch;
  margin-inline: auto;
  margin-bottom: clamp(40px, 6vw, 64px);
  font-size: clamp(15px, 1.6vw, 17px);
  text-align: center;
  color: var(--c-offwhite);
  text-shadow: var(--shadow-text);
}

.hero__features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(32px, 5vw, 64px);
}
@media (max-width: 800px) {
  .hero__features { grid-template-columns: 1fr; }
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.feature img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}
.feature h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: var(--track);
  text-transform: uppercase;
  color: var(--c-white);
  text-shadow: var(--shadow-text);
}
.feature p {
  line-height: 1.7;
  color: var(--c-offwhite);
  text-shadow: var(--shadow-text);
}

/* --- Über uns ----------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
}

.about-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
.about-aside__cert { display: block; line-height: 0; }
.about-aside__cert img {
  width: 200px;
  height: 283px;
  object-fit: cover;
}
.about-aside__badge { width: 252px; }
.about-aside figcaption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--c-muted);
  text-align: center;
}

/* --- Chronik / Zeitleiste ----------------------------------------------- */
.timeline {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 24px;
  scrollbar-width: thin;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}
.timeline__item {
  flex: 0 0 min(340px, 82vw);
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  padding-right: 32px;
}
.timeline__year {
  display: flex;
  align-items: flex-end;
  min-height: 118px;
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--c-grey);
}
.timeline__rule {
  display: flex;
  align-items: center;
  margin-block: 20px;
}
.timeline__dot {
  flex: 0 0 auto;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--c-grey);
}
.timeline__line {
  flex: 1 1 auto;
  height: 1px;
  background: var(--c-line-soft);
}
.timeline__text {
  min-height: 224px;
  color: var(--c-text);
}
.timeline__figures {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 20px;
}
.timeline__figures img { width: 100%; display: block; }

@media (max-width: 700px) {
  .timeline__text  { min-height: 0; margin-bottom: 4px; }
  .timeline__year  { min-height: 0; }
}

/* Zoombare Bilder */
.zoomable {
  cursor: zoom-in;
  background: none;
  border: 0;
  padding: 0;
  display: block;
  width: 100%;
  line-height: 0;
}
.zoomable img { display: block; width: 100%; }

/* Schieberegler-Steuerung */
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding-top: 8px;
}
.slider-counter {
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--c-grey);
  font-variant-numeric: tabular-nums;
}
.slider-btn {
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--c-grey);
  color: var(--c-grey);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.slider-btn:hover:not(:disabled) { background: var(--c-grey); color: var(--c-white); }
.slider-btn:disabled { opacity: 0.35; cursor: default; }


/* --- Leistungen --------------------------------------------------------- */
.services {
  position: relative;
  overflow: hidden;
}
.services__bg {
  position: absolute;
  top: 0;
  height: 100%;
  object-fit: cover;
  display: block;
}
.services__bg--left  { left: 0;  width: 30%; }
.services__bg--right { right: 0; width: 34%; }

.services__inner {
  position: relative;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 180px;
  gap: 64px;
  padding-block: 64px 96px;
}
.services__card {
  grid-column: 2;
  background: var(--c-white);
  padding: 48px 44px;
  height: 712px;
}

@media (max-width: 1100px) {
  .services__inner {
    grid-template-columns: 90px minmax(0, 1fr) 90px;
    gap: 24px;
  }
}

/* Unterhalb der Vorlagenbreite: feste Höhe aufheben, sonst bricht der Text aus */
@media (max-width: 900px) {
  .services__bg--left  { width: 50%; }
  .services__bg--right { width: 50%; }
  .services__inner {
    grid-template-columns: 1fr;
    gap: 0;
    padding-block: 40px 56px;
  }
  .services__card {
    grid-column: 1;
    height: auto;
    padding: 28px 24px;
  }
}

/* --- Referenzen --------------------------------------------------------- */
.gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}
.gallery__item {
  flex: 0 0 min(780px, 88vw);
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-white);
}
.gallery__item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Produktaufnahmen standen im Original auf fester Höhe und mittig */
.gallery__item--fest { align-self: center; }
.gallery__item--fest img { height: 510px; }

/* --- Kontakt ------------------------------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.page-title {
  margin-bottom: clamp(22px, 3vw, 32px);
  font-size: clamp(28px, 5vw, 45px);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-grey);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-details a { color: var(--c-dark); }

.form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 40px;
}
.form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #9a9a9a;
  color: var(--c-dark);
  font-size: 15px;
  padding: 8px 0;
  outline: none;
  border-radius: 0;
}
.form input:focus, .form textarea:focus { border-bottom-color: var(--c-dark); }
.form textarea { resize: vertical; min-height: 120px; }

.form label.form__consent {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.6;
  color: var(--c-text);
  cursor: pointer;
}
.form label.form__consent input {
  margin-top: 4px;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--c-grey);
}

/* Honigtopf – für Menschen unsichtbar, für Bots ein Köder */
.form__hp {
  position: absolute !important;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.btn {
  align-self: flex-start;
  display: inline-block;
  background: transparent;
  border: 1px solid var(--c-grey);
  color: var(--c-dark);
  font-size: 13px;
  letter-spacing: var(--track);
  text-transform: uppercase;
  padding: 14px 40px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--c-grey); color: var(--c-white); }

.notice {
  padding: 16px 20px;
  margin-bottom: 28px;
  border-left: 4px solid var(--c-grey);
  background: #f4f4f4;
  font-size: 14px;
  line-height: 1.7;
}
.notice--ok    { border-left-color: #2f7d4f; }
.notice--error { border-left-color: #a8342a; }

/* Karte mit Zwei-Klick-Schutz */
.map { margin-top: 4px; }
.map__consent {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  min-height: 420px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--c-line);
  background: #ededed;
}
.map__consent p { font-size: 14px; max-width: 46ch; }
.map iframe {
  width: 100%;
  height: 420px;
  border: 1px solid var(--c-line);
  display: block;
}

/* --- Lichtkasten -------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 5vw, 48px);
  background: rgba(0, 0, 0, 0.92);
}
.lightbox[hidden] { display: none; }
.lightbox__img {
  width: min(55vw, 840px);
  height: auto;
  max-height: 55vh;
  object-fit: contain;
  display: block;
}
.lightbox__btn {
  position: absolute;
  background: transparent;
  border: 1px solid var(--c-white);
  color: var(--c-white);
  cursor: pointer;
  line-height: 1;
  transition: background 0.18s ease, color 0.18s ease;
}
.lightbox__btn:hover { background: var(--c-white); color: var(--c-dark); }
.lightbox__btn--prev,
.lightbox__btn--next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  font-size: 20px;
}
.lightbox__btn--prev  { left: clamp(8px, 2vw, 24px); }
.lightbox__btn--next  { right: clamp(8px, 2vw, 24px); }
.lightbox__btn--close {
  top: clamp(8px, 2vw, 24px);
  right: clamp(8px, 2vw, 24px);
  width: 40px; height: 40px;
  font-size: 16px;
}
.lightbox__counter {
  position: absolute;
  bottom: 28px;
  left: 0; right: 0;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: #cfcfcf;
}

/* --- Fußbereich --------------------------------------------------------- */
.site-footer {
  flex: 0 0 auto;
  background: var(--c-dark-soft) url("../img/ui/lochblech.jpg") center / cover no-repeat;
  color: var(--c-white);
}
.site-footer a { color: #cfcfcf; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 4vw, 48px);
  padding-block: clamp(32px, 5vw, 48px) 32px;
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-block h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: var(--track);
  text-transform: uppercase;
}
.footer-block svg { flex: 0 0 auto; }
.footer-block p { font-size: 17px; color: #cfcfcf; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: clamp(32px, 5vw, 48px);
  font-size: 13px;
  color: #9c9c9c;
}
.footer-bottom nav {
  display: flex;
  gap: 10px;
}
.footer-bottom nav a {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  white-space: nowrap;
}
.footer-bottom nav a:hover { text-decoration: underline; }

/* --- Rechtstexte / einfache Inhaltsseiten ------------------------------- */
.legal { max-width: 75ch; }
.legal h2 {
  margin-top: 44px;
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-grey);
}
.legal h3 {
  margin-top: 28px;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--c-grey);
}
.legal h4 {
  margin-top: 20px;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
}
.legal a { color: var(--c-dark); }
/* Rechtstexte enthalten sehr lange Rechtsverweise und URLs */
.legal p, .legal li { overflow-wrap: anywhere; }
.legal p, .legal ul { margin-bottom: 14px; }
.legal ul { padding-left: 20px; }
.legal .todo {
  background: #fff4d6;
  border-left: 4px solid #d8a300;
  padding: 14px 18px;
  font-size: 14px;
}

/* --- Druck -------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .slider-controls, .nav-toggle, .lightbox { display: none !important; }
  body { color: #000; }
  .hero { min-height: 0; }
}
