/* Local Fonts */
@font-face {
  font-family: 'Urbanist';
  src: url('media/fonts/Urbanist-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Urbanist';
  src: url('media/fonts/Urbanist-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* Design Tokens */
:root {
  --color-white: #FFFFFF;
  --color-light-grey: #EBEBEB;
  --color-dark-green: #283C13;
  --color-light-green: #C1E34D;
  --color-text: rgba(0, 0, 0, 0.75);
  --font-family: 'Urbanist', sans-serif;
  --transition-panel: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-badge: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  --carousel-speed: 32s;
  --hero-speed: 38.4s; /* carousel-speed × 1.2 */
  
  /* Font Size System — 3 tiers */
  --font-display: clamp(3rem, 12vw, 15rem); /* hero carousel only */
  --font-heading: 1.3rem;                   /* headings, labels, nav items */
  --font-body: 0.9rem;                      /* body text, details, links */
  --partner-logo-height: clamp(50px, 5.5vw, 80px);
  --partner-logo-width: clamp(90px, 10vw, 140px);
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 99999;
  background: var(--color-light-green);
  color: var(--color-dark-green);
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: var(--font-body);
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  transition: top 0.1s;
}

.skip-link:focus {
  top: 0;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  overflow-x: hidden;
  background: var(--color-dark-green);
  letter-spacing: 0.02em;
}

/* Hero Section */
.hero {
  position: sticky;
  top: 0;
  z-index: 0; /* Stays behind services section which paints on top */
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-dark-green);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-marquee {
  position: absolute;
  bottom: 17vh;
  left: 0;
  width: 100%;
  z-index: 2;
  pointer-events: none;
}

@media (max-width: 768px) {
  .hero-marquee {
    bottom: 32vh;
  }
}

.hero-logo {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(165px, 18.7vw, 270px);
  height: auto;
  z-index: 9999;
  filter: drop-shadow(0 0 9.612px rgba(0, 0, 0, 0.25));
}

/* Language Switch */
.lang-switch {
  position: fixed;
  top: 1.1rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  filter: drop-shadow(0 0 9.612px rgba(0, 0, 0, 0.25));
}

.lang-switch-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
  padding: 0.2rem 0.1rem;
  transition: color 0.25s;
}

.lang-switch-btn.active {
  color: var(--color-white);
}

.lang-switch-btn:hover {
  color: rgba(255, 255, 255, 0.7);
}

.lang-switch-btn.active:hover {
  color: var(--color-light-green);
}

.lang-switch__divider {
  color: rgba(255, 255, 255, 0.3);
  font-family: var(--font-family);
  font-size: var(--font-body);
  font-weight: 400;
  user-select: none;
  line-height: 1;
}

@media (max-width: 768px) {
  .lang-switch {
    top: 0.75rem;
    right: 1rem;
  }
}

.hero-text-wrapper {
  display: flex;
  animation: slide-seamless var(--hero-speed) linear infinite;
  will-change: transform;
}

.hero-text {
  font-size: 10vw; /* set dynamically by fitHeroText() */
  font-weight: 600;
  color: var(--color-white);
  opacity: 0.55;
  white-space: nowrap;
  line-height: 1.1;
  flex-shrink: 0;
  padding-right: 200rem; /* space between repetitions */
}

@keyframes slide-seamless {
  from { transform: translateX(var(--marquee-start, 100vw)); }
  to   { transform: translateX(var(--marquee-end, 0px)); }
}

@keyframes slide {
  from {
    transform: translate(20%, 20vh);
  }
  to {
    transform: translate(-100%, 20vh);
  }
}

.call-badge {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: clamp(100px, 9vw, 115px);
  height: clamp(100px, 9vw, 115px);
  cursor: pointer;
  z-index: 9998;
  background: none;
  border: none;
  padding: 0;
  transition: transform var(--transition-badge);
  filter: drop-shadow(0 0 9.612px rgba(0, 0, 0, 0.25));
}

.call-badge.is-active {
  transform: rotate(120deg);
}

.call-badge-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.call-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46%;
  height: 46%;
  z-index: 2;
}

.call-text-circle {
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  animation: rotate 14.4s linear infinite -7.2s;
  animation-play-state: paused;
}

@media (hover: hover) {
  .call-badge:hover .call-text-circle {
    animation-play-state: running;
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}

/* Contact Panel */
.contact-toggle-wrapper {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 9998;
}

.contact-panel {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 510px;

  background: var(--color-dark-green);
  border-radius: 16px;
  padding: 1.8rem 2rem 2rem;
  transform: scale(0);
  transform-origin: bottom right;
  transition: transform var(--transition-panel);
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  overflow: visible;
  height: auto;
}

.contact-panel.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

.contact-panel__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--color-light-green);
  font-size: 2.5rem;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: transform 0.2s;
  z-index: 10;
}

.contact-panel__close:hover {
  transform: scale(1.1);
}

.contact-panel__cards {
  display: flex;
  gap: 2rem;
  padding-top: 0;
}

.contact-panel__tagline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--color-light-green);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  padding-bottom: 1.25rem;
  margin-bottom: 0.5rem;
}

.contact-panel__tagline-hours {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(159, 241, 77, 0.6);
}

.contact-panel__address {
  font-style: normal;
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--font-body);
  text-align: center;
  padding-top: 1rem;
  padding-bottom: 0;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-panel__address a {
  color: var(--color-light-green);
  text-decoration: none;
}

.contact-panel__address a:hover {
  text-decoration: underline;
}

.contact-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 0 1rem 1rem;
}

.contact-card__portrait {
  width: 150px;
  height: 150px;
  position: relative;
  flex-shrink: 0;
}

.contact-card__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-card__portrait--mask-a {
  clip-path: url(#mask-a);
}

.contact-card__portrait--mask-b {
  clip-path: url(#mask-b);
}

.contact-card__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.contact-card__name {
  color: var(--color-light-green);
  font-size: var(--font-heading);
  font-weight: 600;
  margin: 0;
  line-height: 0.8;
}

.contact-card__role {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--font-body);
  margin: 0;
  margin-bottom: 0.5rem;
}

.contact-card__details {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.contact-card__details li {
  font-size: var(--font-body);
}

.contact-card__details a {
  color: var(--color-white);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-card__details a:hover {
  color: var(--color-light-green);
}

/* Section Label */
.section-label {
  position: absolute;
  bottom: 100%;
  left: 0;
  display: inline-block;
  background-color: var(--color-light-green);
  color: var(--color-dark-green);
  padding: 0.3rem 0.8rem;
  border-radius: 0;
  font-weight: 600;
  font-size: var(--font-body);
  margin: 0;
  line-height: 1.4;
  cursor: pointer;
  transition: opacity 0.2s;
}

.section-label:hover {
  opacity: 0.85;
}

/* Hero + Services wrapper — constrains the hero's sticky scope */
.hero-services-wrapper {
  position: relative;
}

/* Services Section - Scroll-Pinned Layout */
.services-scroll {
  position: relative;
  /* Height is set dynamically by JS based on panel content */
}

.services-sticky {
  position: sticky;
  top: 7rem;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2rem 4rem;
  padding-top: 3rem;
  color: var(--color-white);
  background-color: var(--color-dark-green);
}

/* Navigation Bar */
.services-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 2vw, 2rem);
  padding: 2rem 0 0.5rem;
  margin-bottom: 0.5rem;
}

.services-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: transform 0.2s;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
}

.services-nav-item:hover {
  transform: scale(1.05);
}

.services-nav-icon {
  width: clamp(40px, 5vw, 70px);
  height: clamp(40px, 5vw, 70px);
  opacity: 0.2;  /* baseline; JS drives this per-frame */
  object-fit: contain;
}

.services-nav-item.active .services-nav-icon {
  opacity: 1;    /* CSS fallback when JS hasn't run */
}

.services-nav-label {
  font-size: var(--font-heading);
  font-weight: 600;
  text-align: center;
  /* Full green colour — dimming is handled by JS opacity (same value as icon) */
  color: var(--color-light-green);
  opacity: 0.2;  /* baseline; JS drives this per-frame */
}

.services-nav-arrow {
  width: clamp(24px, 3.2vw, 40px);
  height: auto;
  flex-shrink: 0;
  visibility: hidden;
}

/* Content Panels */
.services-panels {
  position: relative;
  flex: 1;
  /* No overflow:hidden — panels extend to their natural height, mask handles clipping */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  /* Fade band sits just beneath the nav titles so content cleanly fades out below them */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 2.5rem, black 100%);
  mask-image: linear-gradient(to bottom, transparent 0, black 2.5rem, black 100%);
}

.services-panel {
  position: absolute;
  top: -80px;
  left: 0;
  right: 0;
  opacity: 1;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 2rem 2rem 1rem;
  will-change: transform, opacity;
}

.services-panel.active {
  pointer-events: auto;
}

/* Element-level opacity is driven by JS scroll; start hidden so pre-JS flash is invisible */
.services-panel-title,
.services-panel-content > *:not(.services-panel-title) {
  opacity: 0;
}

.services-panel-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.services-panel-title {
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  font-weight: 700;
  color: var(--color-white);
  padding-top: 4.5rem;
  margin-bottom: 2rem;
  text-align: left;
  max-width: 620px;
}

.services-panel-text {
  font-size: var(--font-body);
  line-height: 1.6;
  color: var(--color-white);
  text-align: left;
  margin-bottom: 2rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  max-width: 620px;
}

/* Verpackung Categories */
.verpackung-categories {
  margin: 1.5rem 0 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem 2rem;
  align-items: start;
}

.verpackung-category {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.verpackung-category-title {
  font-size: var(--font-body);
  font-weight: 600;
  color: var(--color-white);
  margin: 0;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.verpackung-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.verpackung-tag {
  display: inline-block;
  background-color: var(--color-light-green);
  color: var(--color-dark-green);
  padding: 0.4rem 0.9rem;
  border-radius: 0;
  font-size: var(--font-body);
  font-family: var(--font-family);
  font-weight: 500;
  border: none;
  transition: opacity 0.2s ease;
  letter-spacing: 0.02em;
  cursor: pointer;
  filter: drop-shadow(0 0 9.612px rgba(0, 0, 0, 0.25));
}

.verpackung-tag:hover {
  opacity: 0.85;
}

/* When any tag is active, grey out all tags */
.verpackung-categories:has(.verpackung-tag.active) .verpackung-tag {
  opacity: 0.3;
}

/* But keep the active one fully visible */
.verpackung-categories:has(.verpackung-tag.active) .verpackung-tag.active {
  opacity: 1;
}

.verpackung-categories:has(.verpackung-tag.active) .verpackung-tag.active:hover {
  opacity: 1;
}

/* Verpackung Detail Text */
.verpackung-detail {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.verpackung-detail.active {
  display: block;
}

.verpackung-detail__text {
  font-size: var(--font-body);
  line-height: 1.6;
  color: var(--color-white);
  font-weight: 400;
}

/* Shared Carousel Components */
.logo-carousel {
  width: 100%;
  overflow: hidden;
  margin: 0.75rem 0 0 0;
}

/* References + Certificates carousels: JS-driven seamless scroll with manual control */
.references .logo-carousel,
.certificates .certificates-carousel {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  overscroll-behavior-x: contain;
  scroll-behavior: auto;
  touch-action: pan-x;
  /* Vertical breathing room so hover-scaled items aren't clipped at top/bottom */
  padding: clamp(8px, 1.5vh, 18px) 0;
}

.references .logo-carousel::-webkit-scrollbar,
.certificates .certificates-carousel::-webkit-scrollbar {
  display: none;
}

.references .logo-carousel.is-dragging,
.certificates .certificates-carousel.is-dragging {
  cursor: grabbing;
}

.references .logo-carousel-track,
.certificates .certificates-track {
  animation: none !important;
  will-change: auto;
}

.logo-carousel-track {
  display: flex;
  align-items: center;
  min-height: var(--partner-logo-height);
  animation: carousel-slide var(--carousel-speed) linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}

.logo-carousel-track.paused {
  animation-play-state: paused;
}

@keyframes carousel-slide {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.logo-item {
  flex-shrink: 0;
  transition: transform 0.2s;
}

.logo-item:hover {
  transform: scale(1.1);
}

/* Certificates Section */
.certificates {
  position: relative;
  z-index: 3;
  background-color: #FAFFE7;
  min-height: 20vh;
  padding: 0 0 0.75rem 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  overflow: visible;
}

.certificates-carousel {
  width: 100%;
  overflow: hidden;
  margin: 0.75rem 0 0 0;
}

.certificates-track {
  display: flex;
  align-items: center;
  min-height: var(--partner-logo-height);
  animation: carousel-slide 21.33s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}

.certificates-track.paused {
  animation-play-state: paused;
}

.certificates .certificate-seal {
  height: var(--partner-logo-height);
  width: var(--partner-logo-width);
  min-height: var(--partner-logo-height);
  min-width: var(--partner-logo-width);
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s;
}

.certificates .certificate-seal:hover {
  transform: scale(1.1);
}

/* About Section */
.about {
  position: relative;
  z-index: 4;
  background-color: var(--color-dark-green);
  color: var(--color-white);
  padding: 0 0 0 max(1rem, calc((100vw - 1200px) / 2)); /* Aligns text with centered 1200px container, like services */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.about-content {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  margin: 0;
  min-height: 80vh;
}

.about-text {
  flex: 1;
  padding: 6rem 2rem 6rem 0; /* No left padding so description hugs section's left edge */
  display: flex;
  align-items: center; /* Vertically center */
  justify-content: flex-start; /* Left-align with section edge */
}

.about-description {
  font-size: var(--font-body);
  line-height: 1.6;
  font-weight: 500; /* Urbanist Medium per Figma */
  letter-spacing: 0.02em;
  max-width: 390px;
}

.about-image-wrapper {
  flex: 1;
  position: relative;
  min-height: 400px;
  max-width: 70vw; /* Limit width to 70vw */
  overflow: hidden; /* Crop if image exceeds */
}

.about-image {
  position: absolute;
  left: 0; /* Align to left so right side gets cropped if needed */
  bottom: 0;
  width: auto; /* Flexible width maintains aspect ratio */
  height: 88%; /* Fixed height */
}

/* References Section */
.references {
  position: relative;
  z-index: 5;
  background-color: #FAFFE7;
  color: var(--color-text);
  min-height: 20vh;
  padding: 0 0 0.75rem 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  overflow: visible;
}

.references .reference-logo {
  height: var(--partner-logo-height);
  width: var(--partner-logo-width);
  min-height: var(--partner-logo-height);
  min-width: var(--partner-logo-width);
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
}

.logo-set,
.certificate-set {
  display: flex;
  align-items: center;
  min-height: inherit;
  gap: 2.4rem;
  padding-right: 2.4rem;
  flex-shrink: 0;
}

@media (min-width: 769px) {
  .logo-set,
  .certificate-set {
    gap: 4.5rem;
    padding-right: 4.5rem;
  }
}

.certificates > .section-label,
.references > .section-label {
  position: absolute;
  top: auto;
  bottom: 100%;
  left: 0;
  z-index: 10;
}

.about > .section-label {
  position: absolute;
  bottom: 100%;
  left: 0;
  z-index: 10;
}

/* CTA Section */
.cta {
  position: relative;
  z-index: 1;
  background-color: var(--color-dark-green);
  color: var(--color-white);
  padding: 6rem 10rem 6rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  overflow: hidden;
}

.cta-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.cta-headline {
  font-size: clamp(1.8rem, 4vw, 3.75rem);
  font-weight: 600;
  color: #E0DDDD;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.cta-button {
  background-color: var(--color-light-green);
  color: var(--color-text);
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 0;
  font-size: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s;
  filter: drop-shadow(0 0 9.612px rgba(0, 0, 0, 0.25));
}

.cta-button:hover {
  transform: scale(1.02);
}

.cta-portrait-wrapper {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  z-index: 1;
}

.cta-portrait {
  width: clamp(280px, 32vw, 550px);
  height: auto;
  aspect-ratio: 1296 / 1421; /* Matches CTAMASK.svg proportions */
  object-fit: cover;
  -webkit-mask-image: url('media/icons/ctamask.svg');
  mask-image: url('media/icons/ctamask.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/* Footer */
.footer {
  background-color: var(--color-dark-green);
  padding: 2rem 4rem 1.5rem 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.footer-column h3 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-light-green);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.footer-column p {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.2rem;
  line-height: 1.4;
  font-weight: 400;
}

.footer-column a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-column a:hover {
  color: var(--color-light-green);
}


/* Impressum inline panel */
#impressum-toggle {
  transition: color 0.2s;
}

#impressum-toggle[aria-expanded="true"],
#datenschutz-toggle[aria-expanded="true"] {
  color: var(--color-light-green);
}

.footer-impressum {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.38s ease, opacity 0.35s ease;
}

.footer-impressum.is-open {
  max-height: 5000px;
  opacity: 1;
}

.footer-impressum__inner {
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.footer-impressum__inner h3 {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-light-green);
  margin-top: 0.8rem;
  margin-bottom: 0.3rem;
  letter-spacing: 0.01em;
}

.footer-impressum__inner h4 {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.5rem;
  margin-bottom: 0.15rem;
}

.footer-impressum__inner p {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.2rem;
  line-height: 1.4;
  font-weight: 400;
}

.footer-impressum__inner a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-impressum__inner a:hover {
  color: var(--color-light-green);
}

.footer-impressum__inner br {
  display: block;
  content: '';
  margin-top: 0.4rem;
}

/* Certificate Modal */
.certificate-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.certificate-modal.is-open {
  display: flex;
  opacity: 1;
}

.certificate-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.certificate-modal__content {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.certificate-modal__image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 0 215px rgba(0, 0, 0, 0.6);
  background: white;
}

.certificate-modal__close {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--color-light-green);
  border: none;
  color: var(--color-dark-green);
  padding: 0.3rem 0.8rem;
  border-radius: 0;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.4;
  transition: opacity 0.2s;
  z-index: 10;
  filter: drop-shadow(0 0 9.612px rgba(0, 0, 0, 0.25));
}

.certificate-modal__close:hover {
  opacity: 0.9;
}

.certificate-modal__download {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--color-light-green);
  border: none;
  color: var(--color-dark-green);
  padding: 0.3rem 0.8rem;
  border-radius: 0;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1.4;
  transition: opacity 0.2s;
  z-index: 10;
  transform: translateX(-100%);
  filter: drop-shadow(0 0 9.612px rgba(0, 0, 0, 0.25));
}

.certificate-modal__download:hover {
  opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 1400px) {
  .cta {
    flex-direction: column;
  }

  .cta-content {
    margin-left: 0;
  }

  .cta-headline {
    max-width: none;
  }
}

@media (max-width: 1024px) {
  .services-sticky {
    padding: 2rem;
    padding-top: 2rem;
    top: 4rem;
  }

  .services-nav {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .services-nav-arrow {
    display: none;
  }

  .services-panel-content {
    padding: 1rem;
  }

  .verpackung-list {
    column-gap: 1.5rem;
  }

  .about {
    padding: 0 2rem 6rem 2rem; /* Restore symmetric padding for stacked layout */
  }

  .about-content {
    flex-direction: column;
    margin-top: 0;
  }

  .about-text {
    padding: 0 0 2rem 2rem; /* Match services panel text left offset (services-sticky 2rem + panel 1rem + content 1rem ≈ 4rem total, so 2rem here on top of .about's 2rem) */
  }

  .about-image-wrapper {
    position: relative;
    min-height: 300px;
  }

  .about-image {
    position: relative;
    width: auto;
    height: auto;
    max-width: 100%; /* Prevent overflow on small screens */
  }

  .call-badge {
    bottom: 2rem;
    right: 2rem;
  }


  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .about > .section-label {
    left: 0;
  }

  .certificates > .section-label,
  .references > .section-label {
    left: 0;
  }
}

@media (max-width: 768px) {
  .services-sticky {
    padding: 0.75rem;
    padding-top: 2.5rem;
    top: 5rem;
    height: 100vh;
  }

  .services-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 1.5rem 1rem;
    margin-bottom: 1rem;
    gap: 1.5rem;
    scrollbar-width: none;
  }

  .services-nav::-webkit-scrollbar {
    display: none;
  }

  .services-nav-item {
    scroll-snap-align: center;
    flex-shrink: 0;
  }

  .services-nav-icon {
    width: 56px;
    height: 56px;
  }

  .services-nav-label {
    font-size: 0.8rem;
  }

  .verpackung-list {
    columns: 1;
  }

  .certificates,
  .about,
  .references,
  .cta {
    padding: 4rem 1.25rem;
  }

  .cta {
    display: block;
    min-height: 560px;
    padding: 0;
  }

  .cta-content {
    position: absolute;
    z-index: 3;
    top: 17.4rem;
    left: 1rem;
    width: min(100vw, 516px);
    padding-top: 0;
    margin-left: 0;
    align-items: flex-start;
    transform: none;
  }

  .cta-headline {
    max-width: 15.6ch;
    font-size: clamp(1.55rem, 7.4vw, 2.35rem);
    line-height: 1.12;
    margin-bottom: 1.05rem;
  }

  .cta-button {
    min-width: min(44vw, 225px);
    padding: 0.55rem 1rem;
    font-size: clamp(0.95rem, 3.8vw, 1.2rem);
    text-align: center;
    align-self: flex-start;
  }

  .cta-portrait-wrapper {
    position: absolute;
    z-index: 1;
    width: min(82vw, 336px);
    right: -2.75rem;
    top: 5.8rem;
    bottom: auto;
    transform: none;
  }

  .cta-portrait {
    width: 100%;
  }

  .about {
    padding-top: 6rem; /* Reduce gap above body text on mobile */
    padding-left: 0.75rem; /* Match .services-sticky horizontal padding so body text aligns */
  }

  .about-text {
    padding: 0 0 2rem 2rem; /* services panel + content inner padding totals 2rem on top of .about's 0.75rem */
  }

  .certificates,
  .references {
    padding-top: 0;
    padding-bottom: 1.2rem;
    padding-left: 0;
    padding-right: 0;
  }

  .certificates > .section-label,
  .references > .section-label {
    left: 0;
  }

  .about > .section-label {
    left: 0;
  }

  .certificates .certificate-seal,
  .references .reference-logo {
    height: 69.6px;
    width: 156px;
    min-height: 69.6px;
    min-width: 156px;
  }

  .logo-carousel-track,
  .certificates-track {
    min-height: 69.6px;
  }

  .footer {
    padding: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .call-badge {
    bottom: 0.5rem;
    bottom: max(-0.5rem, calc(0.5rem - (100dvh - 100svh)));
    right: 0.5rem;
    width: 100px;
    height: 100px;
    transition: transform var(--transition-badge), bottom 0.2s ease-out;
  }

  .contact-toggle-wrapper {
    bottom: 0.5rem;
    bottom: max(-0.5rem, calc(0.5rem - (100dvh - 100svh)));
    right: 0.5rem;
    transition: bottom 0.2s ease-out;
  }

}

@media (max-width: 550px) {
  .contact-panel {
    width: calc(100vw - 2rem);
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .contact-panel__cards {
    flex-direction: column;
  }

  .contact-card {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
  }

  .contact-card__portrait {
    width: 100px;
    height: 100px;
  }

  .contact-card__info {
    align-items: flex-start;
    text-align: left;
    flex: 1;
  }

  .contact-card__name {
    font-size: 1.1rem;
  }

  .contact-card__role,
  .contact-card__details li {
    font-size: 0.85rem;
  }

  .contact-panel__address {
    font-size: 0.8rem;
    text-align: left;
  }

  .contact-panel__address .addr-sep {
    display: none;
  }

  .contact-panel__address .addr-part {
    display: block;
  }

  .contact-panel__address a br {
    display: none;
  }

  .contact-panel__address a .addr-part:nth-of-type(1),
  .contact-panel__address a .addr-part:nth-of-type(2) {
    display: inline;
    white-space: nowrap;
  }

  .contact-panel__close {
    display: none;
  }

  .contact-panel {
    padding: 1rem 1.5rem 1.25rem;
  }
}

/* ============================================================
   Bandwidth Tiers
   data-bandwidth is set synchronously in <head> so these rules
   apply before the first paint.
   ============================================================ */

/* --- Medium tier (3G): static full-quality image, no video --- */
[data-bandwidth="medium"] .hero {
  background-image: url(media/hero-bg.jpg);
  background-size: cover;
  background-position: center;
}

[data-bandwidth="medium"] #hero-video {
  display: none;
}

/* --- Slow tier (2G): lightweight image, no video, paused carousels --- */
[data-bandwidth="slow"] .hero {
  background-image: url(media/hero-bg-superlow.jpg);
  background-size: cover;
  background-position: center;
}

[data-bandwidth="slow"] #hero-video {
  display: none;
}

/* Pause CSS carousels to save CPU */
[data-bandwidth="slow"] .certificates-track,
[data-bandwidth="slow"] .logo-carousel-track {
  animation-play-state: paused;
}

/* ============================================================
   Reduced Motion
   Respects OS/browser "reduce motion" setting.
   Pauses all decorative animations; keeps functional
   transitions near-instant so state changes are still clear.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  /* Pause all infinite animations */
  .hero-text-wrapper,
  .call-text-circle,
  .certificates-track,
  .logo-carousel-track {
    animation-play-state: paused;
  }

  /* Shorten transitions to near-instant */
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
