/* ---- index.css: Homepage-specific styles ---- */

/* Sticky Footer: der Footer soll immer seine natürliche Höhe behalten und
   am unteren Rand bleiben - nicht wie vorher, wo er bei kurzem Inhalt den
   restlichen Viewport ausfüllte (beides weiss, dadurch optisch nicht
   unterscheidbar). Stattdessen wächst <main> (bzw. .shop-wizard darin), der
   Footer bleibt fix in der Höhe. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}

/* ---- Startseiten-Banner (zwischen Header und Produkten) ------------------
   Zwei unabhängige Spalten: die Text-Spalte hat eine eigene, geclampte
   Breite und ändert sich nie abhängig vom Bild. Die Bild-Spalte nimmt den
   Rest des Platzes (flex: 1) und schneidet ihren Inhalt selbst zu - so
   verschiebt ein grösseres/kleineres Bild nie den Text. */
.home-banner {
  display: flex;
  align-items: stretch;
  min-height: 420px;
  background: var(--paper);
}

.home-banner-copy {
  flex: 0 0 clamp(320px, 34vw, 560px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding: clamp(32px, 5vw, 60px) clamp(24px, 6vw, 70px);
}

.home-banner-copy h1 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  font-weight: 800;
  color: var(--strong);
}

.home-banner-copy p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 48ch;
}

.home-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  background: var(--red);
  color: white;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: var(--button-radius);
  text-decoration: none;
  transition: background 0.2s ease;
}

.home-banner-cta:hover {
  background: var(--red-dark);
}

.home-banner-cta svg {
  width: 16px;
  height: 16px;
}

/* Karten.png ist transparent (fliegende Karten ohne Hintergrund) - der
   Verlauf hier scheint durch die Lücken zwischen den Karten durch, statt
   dahinter versteckt zu sein. Ohne dieses Detail fehlt das rote Glow
   unten rechts, das im Mediamatik-Entwurf sichtbar war. */
.home-banner-visual {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #efefec 0%, #f4f1ee 22%, #f2d9d6 48%, var(--red) 100%);
}

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

/* Weicher Übergang, wo das Bild auf die Text-Spalte trifft. */
.home-banner-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, var(--paper) 0%, rgba(255, 255, 255, 0) 10%);
  pointer-events: none;
}

/* Unter 900px komplett ausgeblendet statt gestapelt - das Bild verliert in
   der Breite ohnehin die meiste Wirkung, und so bleibt auf Mobile nur der
   Text mit dem CTA übrig. Ab 900px wird es wieder normal angezeigt. */
@media (max-width: 900px) {
  .home-banner {
    min-height: 0;
  }

  .home-banner-visual {
    display: none;
  }

  .home-banner-copy {
    flex: 1 1 auto;
    padding: clamp(28px, 6vw, 40px) clamp(18px, 5vw, 32px) 28px;
  }
}

.hero-section {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 77px);
  display: grid;
  align-items: start;
  padding: clamp(40px, 7vw, 90px) clamp(18px, 5vw, 70px);
  overflow: hidden;
  background: white;
  color: var(--ink);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 0;
  background: white;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 32%, rgba(255, 255, 255, 0.44) 58%, rgba(255, 255, 255, 0.06) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.12) 36%, rgba(255, 255, 255, 0) 100%);
}

.hero-media img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center center;
  filter: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin-top: clamp(34px, 7vh, 90px);
  padding-bottom: min(12vh, 90px);
}

.hero-content h1 {
  display: block;
  color: var(--strong);
  background: transparent;
  padding: 0;
  clip-path: none;
}

.hero-copy {
  margin-top: 28px;
  max-width: 700px;
  font-size: clamp(18px, 2.2vw, 24px);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-card {
  position: absolute;
  right: clamp(18px, 4vw, 56px);
  bottom: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 460px;
}

.hero-card span {
  border: 0;
  background: white;
  color: var(--ink);
  padding: 9px 13px;
  border-radius: var(--box-radius);
  font-weight: 500;
}

.eyebrow {
  color: var(--grey);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro-band,
.feature-section,
.client-band,
.example-carousel-section,
.cta-band {
  padding: clamp(56px, 8vw, 110px) clamp(18px, 5vw, 70px);
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: end;
  background: white;
}

.intro-band h2,
.feature-text h2,
.section-heading h2,
.cta-band h2 {
  position: relative;
  padding-bottom: 10px;
}

.feature-text h2 {
  margin-bottom: 0;
}

.intro-band h2::after,
.feature-text h2::after,
.section-heading h2::after {
  content: none;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 160px;
  max-width: 50%;
  height: 4px;
  background: linear-gradient(90deg, var(--red) 0 42px, var(--light-grey) 42px 100%);
}

.intro-band p:last-child {
  color: var(--muted);
  font-size: 20px;
}

.feature-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(34px, 7vw, 96px);
  align-items: center;
}

.feature-section.reverse {
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.9fr);
  background: var(--soft-grey);
}

.feature-section.reverse .feature-text {
  order: 2;
}

.feature-text p:not(.eyebrow) {
  color: var(--muted);
  font-size: 19px;
}

.check-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 26px 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 12px;
  height: 2px;
  background: var(--light-grey);
  border-radius: var(--box-radius);
}

.section-image {
  display: grid;
  place-items: center;
  min-height: 420px;
  overflow: hidden;
  background: white;
  border-radius: var(--box-radius);
}

.section-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 620px;
  object-fit: contain;
}

.client-band {
  background: var(--soft-grey);
  color: var(--ink);
  border-top: 0;
  border-bottom: 0;
  padding-top: clamp(52px, 7vw, 86px);
  padding-bottom: clamp(52px, 7vw, 86px);
}

.example-carousel-section {
  background: var(--soft-grey);
  color: var(--ink);
  overflow: hidden;
  padding: 40px 0;
}

#carousel-references-heading {
  margin: 0 auto 26px;
  color: var(--grey);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.card-carousel {
  width: calc(100% + clamp(36px, 10vw, 140px));
  margin-left: calc(clamp(18px, 5vw, 70px) * -1);
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.card-carousel.dragging {
  cursor: grabbing;
}

.card-carousel-track {
  display: flex;
  align-items: stretch;
  gap: clamp(18px, 2.6vw, 34px);
  width: max-content;
  will-change: transform;
}

.card-carousel-item {
  flex: 0 0 auto;
  width: clamp(190px, 22vw, 292px);
  margin: 0;
  text-align: center;
}

.card-carousel-item img {
  display: block;
  width: 100%;
  height: clamp(302px, 35vw, 468px);
  object-fit: contain;
  background: white;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(63, 65, 65, 0.12);
  pointer-events: none;
}

.card-carousel-item figcaption {
  margin-top: 14px;
  color: var(--strong);
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 700;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.example-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  border: 0;
  padding: 16px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  border-radius: var(--box-radius);
  transition: box-shadow 0.24s ease, transform 0.24s ease;
}

.example-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  background: var(--soft-grey);
  border-radius: var(--button-radius);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.example-card span {
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 700;
  transition: transform 0.24s ease;
  transform-origin: left center;
}

.example-card:hover {
  box-shadow: 0 18px 48px rgba(63, 65, 65, 0.16);
  transform: translateY(-3px);
}

.example-card:hover img,
.example-card:hover span {
  transform: scale(1.035);
}

.example-card:hover img {
  box-shadow: 0 12px 34px rgba(63, 65, 65, 0.16);
}

.example-lightbox {
  width: min(1040px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  background: transparent;
}

.example-lightbox::backdrop {
  background: rgba(31, 42, 55, 0.72);
}

.lightbox-content {
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  align-items: center;
  gap: 14px;
}

.example-lightbox figure {
  margin: 0;
  display: grid;
  gap: 14px;
  padding: clamp(16px, 3vw, 28px);
  background: white;
  border-radius: var(--box-radius);
  box-shadow: 0 24px 80px rgba(31, 42, 55, 0.24);
}

.example-lightbox img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: var(--soft-grey);
  border-radius: var(--button-radius);
}

.example-lightbox figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
}

.example-lightbox figcaption strong {
  color: var(--ink);
  font-size: 20px;
}

.lightbox-arrow,
.lightbox-close {
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  padding-top: 5px;
  line-height: 1;
  color: var(--ink);
  background: white;
  cursor: pointer;
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(31, 42, 55, 0.18);
}

.lightbox-arrow {
  width: 54px;
  height: 54px;
  font-size: 34px;
}

.lightbox-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  font-size: 28px;
  transform: translate(35%, -35%);
}

.cta-band {
  text-align: center;
  background: var(--soft-grey);
  color: var(--ink);
  border-top: 0;
}

.cta-band p {
  max-width: 640px;
  margin: 0 auto 26px;
  color: var(--muted);
  font-size: 20px;
}

/* ---- Legal Modals (Impressum / Datenschutz) ---- */
.legal-modal {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: var(--box-radius);
  box-shadow: 0 24px 80px rgba(31, 42, 55, 0.22);
  overflow: hidden;
}

.legal-modal::backdrop {
  background: rgba(15, 20, 30, 0.6);
  backdrop-filter: blur(4px);
}

.legal-modal-inner {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 48px);
  max-height: calc(100vh - 48px);
}

.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  background: white;
  position: sticky;
  top: 0;
  z-index: 1;
}

.legal-modal-header h2 {
  font-size: 22px;
  margin: 0;
}

.legal-modal-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  padding-top: 5px;
  border: 0;
  border-radius: 999px;
  background: var(--soft-grey);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.legal-modal-close:hover {
  background: var(--mid-grey);
}

.legal-modal-body {
  padding: 28px 32px 36px;
  overflow-y: auto;
  color: var(--ink);
  line-height: 1.7;
}

.legal-modal-body h3 {
  font-size: 16px;
  margin: 24px 0 8px;
  color: var(--strong);
}

.legal-modal-body h3:first-child {
  margin-top: 0;
}

.legal-modal-body p,
.legal-modal-body ul {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
}

.legal-modal-body ul {
  padding-left: 20px;
}

.legal-modal-body li {
  margin-bottom: 4px;
}

/* ---- Responsive: index ---- */
@media (max-width: 900px) {
  .hero-section {
    min-height: 720px;
    padding-top: clamp(40px, 7vw, 90px);
  }

  .hero-media {
    inset: 0;
    height: auto;
    padding: 0;
  }

  .hero-media::after {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.84) 52%, rgba(255, 255, 255, 0.58) 100%),
      linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.42) 100%);
  }

  .hero-content {
    margin-top: 0;
    padding-bottom: 40px;
  }

  .hero-card {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 20px;
  }

  .intro-band,
  .feature-section,
  .feature-section.reverse {
    grid-template-columns: 1fr;
  }

  .feature-section.reverse .feature-text {
    order: 0;
  }

  .section-image {
    min-height: 300px;
  }

  .example-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lightbox-content {
    grid-template-columns: 44px 1fr 44px;
    gap: 8px;
  }

  .lightbox-arrow {
    width: 44px;
    height: 44px;
    font-size: 28px;
  }
}

@media (max-width: 560px) {
  .hero-actions {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .section-image {
    min-height: 240px;
  }

  .example-grid {
    grid-template-columns: 1fr;
  }

  .lightbox-content {
    grid-template-columns: 1fr;
  }

  .lightbox-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
  }

  .lightbox-arrow[data-lightbox-prev] {
    left: 8px;
  }

  .lightbox-arrow[data-lightbox-next] {
    right: 8px;
  }

  .lightbox-close {
    top: 8px;
    right: 8px;
    transform: none;
  }
}
