/* ============================= */
/* Reset & Grundlayout */
/* ============================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'IBM Plex Sans', 'Inter', sans-serif;
  color: #1E1E1E;
  background-color: #FFFFFF;
  line-height: 1.5;
}

:root{
  /* Tunebare Parameter */
  --subline-fs-min: 16;       /* in px */
  --subline-fs-max: 18;       /* in px */
  --subline-min-width: 360;   /* in px */
  --subline-max-width: 1280;  /* in px */
  /* Automatisch berechnet */
  --subline-slope: calc((var(--subline-fs-max) - var(--subline-fs-min)) / (var(--subline-max-width) - var(--subline-min-width)) * 100);
  --subline-intercept: calc(var(--subline-fs-min) - (var(--subline-slope) * var(--subline-min-width) / 100));
   /* Fluid-Type-Formel mit clamp() */
  --subline-fs: clamp(
    calc(var(--subline-fs-min) * 1px),
    calc(var(--subline-slope) * 1vw + var(--subline-intercept) * 1px),
    calc(var(--subline-fs-max) * 1px)
  );
}

.page {
  display: flex;
  flex-direction: column;
  max-width: 1280px; /* Deckelung */
  margin: 0 auto;    /* Zentrierung */  
}

/* Allgemeine Container */
.container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-bottom: 1px solid #ccc;
}

/* Medien universell skalieren */
img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

.btn {
  min-height: 42px;
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: bold;
  text-transform: uppercase;
  background-color: #FFFFFF;
  color: #000000;
  border-radius: 2.5px;
  text-decoration: none;
  border: 1px solid #000000;
  transition: transform 0.25s ease;
}

/* Hover-Effekt nur auf Geräten mit Mauszeiger */
@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: scale(1.05);
  }
}

/* Tap-/Active-Feedback nur auf Touch-Geräten */
@media (hover: none) and (pointer: coarse) {
  .btn:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
  }
}

/* Verhindert iOS-Tap-Highlight */
.btn{ -webkit-tap-highlight-color: transparent; }

/* Verhindert lila "visited"-Look bei Links als Buttons */
a.btn:visited{ color: #000; }

/* Fokus sichtbar halten für Tastatur-Nutzer */
.btn:focus{ outline: none; }
.btn:focus-visible{
  outline: 2px solid #000;
  outline-offset: 2px;
}


/* ============================= */
/* Container 1 */
/* ============================= */

.head{
  /* Scale Werte */
  --title-scale: 17.8;
  --claim-scale: 7.25; 
  --logo-to-title: 1.95;
}

.head .hero-header{
  --hero-w: clamp(240px, 30vw, 384px); /* Breite in Abhängigkeit der Displaybreite: 30% -> max 1280*0.3=384 */
  width: var(--hero-w);
  container-type: inline-size;         /* macht cqw möglich */
  margin-inline: auto;
  text-align: center;
  --gap: clamp(0.25em, calc(var(--title-scale) * 1cqw * 0.06), 0.8em);
  padding-top: clamp(2rem, 6vw, 6rem);
}

/* ===== Mikro-Feintuning für sehr schmale Containerbreiten ===== */
@container (max-width: 320px){
  .hero-header :where(.title, .claim, .logo img){ --title-scale: 17.8; --claim-scale: 7.25; } /* Fein-Tuning nicht nötig, aber als Platzhalter gelassen -> Default Werte*/
}

/* Titel */
.head .title{
  font-size: clamp(1.5rem, calc(var(--title-scale) * 1cqw), 18rem);
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;  /* einzeilig */
  margin: 0.1em 0;
  text-align: center; 
}

/* Claim - exakt mittig und auf Titelbreite skaliert */
.head .claim {
  font-size: clamp(0rem, calc(var(--claim-scale) * 1cqw), 8rem);
  font-weight: 300;
  line-height: 1.35;
  white-space: nowrap;  /* einzeilig */
  margin: var(--gap) 0 0; 
  text-align: center;
}

.head .logo img {
  width: calc(var(--logo-to-title) * (var(--title-scale) * 1cqw));
  height: auto;
  display: block;
  margin-inline: auto;
}

/* Fallback ohne Container-Einheiten (ältere Browser) */
@supports not (font-size: 1cqw){
  /* Containerbreite bleibt wie oben */
  .head .hero-header{ width: clamp(240px, 30vw, 384px); }
  /* === 1) Untere Klemme: Viewport < 800px → Container = 240px === */
  @media (max-width: 799.98px){
    /* 1cqw = 240px / 100 = 2.4px */
    .head .title{ font-size: clamp(1.5rem, 42.72px, 18rem); }   /* 17.8 * 2.4 = 42.72 */
    .head .claim{ font-size: clamp(1rem, 17.40px, 8rem); }      /* 7.25 * 2.4 = 17.40 */
    .head .logo img{ width: 83.304px; }                         /* 1.95 * 42.72 = 83.304 */
    .head .claim { margin-top: clamp(0.25em, calc(2.4px * 1.068), 0.8em); }
  }
  /* === 2) Linearbereich: 800–1280px → Container = 30vw === */
  @media (min-width: 800px) and (max-width: 1279.98px){
    /* 1cqw ≈ 0.3vw */
    .head .title{ font-size: clamp(1.5rem, 5.34vw, 18rem); }    /* 17.8 * 0.3 = 5.34 */
    .head .claim{ font-size: clamp(1rem, 2.175vw, 8rem); }      /* 7.25 * 0.3 = 2.175 */
    .head .logo img{ width: 10.413vw; }                         /* 1.95 * 5.34 = 10.413 */
    .head .claim { margin-top: clamp(0.25em, calc(0.3vw * 1.068), 0.8em); }
  }
  /* === 3) Obere Klemme: Viewport ≥ 1280px → Container = 384px === */
  @media (min-width: 1280px){
    /* 1cqw = 384px / 100 = 3.84px */
    .head .title{ font-size: clamp(1.5rem, 68.352px, 18rem); }  /* 17.8 * 3.84 = 68.352 */
    .head .claim{ font-size: clamp(1rem, 27.84px, 8rem); }      /* 7.25 * 3.84 = 27.84 */
    .head .logo img{ width: 133.286px; }                        /* 1.95 * 68.352 = 133.286 */
    .head .claim { margin-top: clamp(0.25em, calc(3.84px * 1.068), 0.8em); }
  }
  /* Optional: gap im Fallback grob nachbilden (wie dein cqw-gap) */
  .head .claim{ margin-top: 0.5em; } /* oder weglassen, wenn ok */
}

.hero-subtext{
  --cta-w: clamp(280px, 70vw, 896px); /* Breite in Abhängigkeit der Displaybreite: 70% -> max 1280*0.7=896 */
  width: var(--cta-w);
  container-type: inline-size;   /* 1cqw auf Subtext-Basis */
  text-align: center;
  --buttons-block-gap: clamp(0.75rem, calc(var(--subline-fs) * 3.0), 5rem); /*für ein ratio-Verhältnis zwischen Button und Subline sowie Button und Container 2 */
  margin-top: calc(var(--buttons-block-gap) * 0.8);
  padding-bottom: calc(var(--buttons-block-gap) * 1.75);
  --btn-gap: clamp(0.75rem, calc(var(--subline-fs) * 0.9), 2rem);
}

/* Subline füllt die Subtext-Breite voll aus */
.hero-subtext .subline{
  width: 100%;
  font-size: calc(var(--subline-fs) * 0.9);
  font-family: 'Inter', sans-serif; /* explizit Inter */
  font-weight: 300;
  line-height: 1.6;
  /* hyphens: auto; // automatischer Zeilenumbruch */
  /* -webkit-hyphens: auto;   /* Safari/iOS */
  overflow-wrap: break-word;
  word-break: normal;
  text-wrap: wrap;          /* explizit "normales" Wrapping */
}

/* Buttons füllen die Subtext-Breite voll aus */
.hero-subtext .menu-buttons{
  width: 100%;
  margin-top: var(--buttons-block-gap);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--btn-gap); /* identischer Gap horizontal/vertikal */
}

.hero-subtext .menu-buttons .btn{
  width: 100%;
  justify-content: center;
  /* Buttons ~90% der Subline-Schriftgröße */
  font-size: calc(var(--subline-fs) * 0.8);
  text-transform: none;
  padding: clamp(0.6rem, 1.2cqw, 0.9rem) clamp(0.9rem, 1.8cqw, 1.25rem);
  white-space: nowrap;
}

@container (max-width: 716.2px){
  .hero-subtext .menu-buttons{
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .hero-subtext .menu-buttons .btn{
    width: 280px;
  }
}

/* Gestapelte Buttons (äquivalent zu .hero-subtext <= 716.2px):
   716.2px Containerbreite entspricht ca. 1023.98px Viewport (716.2 / 0.7) */
@media (max-width: 1023.98px){
  .hero-subtext{
    /* im Stack-Mode kleinerer Bottom-Gap */
    padding-bottom: calc(var(--buttons-block-gap) * 0.75); /* statt 1.75 */
  }
  .hero-subtext .menu-buttons{
    margin-top: calc(var(--buttons-block-gap) * 0.65);
  }
}


/* ============================= */
/* Container 2 & 3 */
/* ============================= */

.split {
  display: flex;
  flex-direction: row;     /* Container 2 = Bild links, Text rechts */
  align-items: center;     /* vertikal zentriert */
}

.split.reverse {
  flex-direction: row-reverse; /* Container 3 = Bild rechts, Text links */
}

.split .image {
  flex: 0 0 30%;           /* Verhältnis Bild/Text tunebar */
  max-width: 30%;
  margin: 0;
  padding: 0;
}

.split .image img {
  /* Referenzwerte */
  --ref-w: 1280;       /* Deckelbreite */
  --img-max: 380;      /* Bildbreite bei 1280px+ */
  --img-min: 280;      /* Bildbreite bei ca. 360px Viewport */

  /* Slope für lineares Interpolieren */
  --img-slope: calc((var(--img-max) - var(--img-min)) / (var(--ref-w) - 360) * 100);
  --img-int:   calc(var(--img-min) - (var(--img-slope) * 360 / 100));

  width: clamp(
    calc(var(--img-min) * 1px),
    calc(var(--img-slope) * 1vw + var(--img-int) * 1px),
    calc(var(--img-max) * 1px)
  );

  height: auto;
  display: block;
  object-fit: contain; /* oder cover, wenn du die Höhe füllen willst */
  margin: 0;
  padding: 0;
}

.split .text {
  --heading-scale: 1.6;  /* Heading ~160% der Subline */
  --content-scale: 0.9;  /* Content ~90% der Subline */  
  /* für --pad-inner und --pad-outer */
  --ref-width: 1280;
  --min-width: 1023.98;
  --pad-inner-min: 48;
  --pad-inner-max: 80;
  --pad-outer-min: 77;
  --pad-outer-max: 128;
  --pad-inner: clamp(
    calc(var(--pad-inner-min) * 1px),
    calc(
      ((var(--pad-inner-max) - var(--pad-inner-min)) / (var(--ref-width) - var(--min-width))) * 100vw
      + (var(--pad-inner-min) - ((var(--pad-inner-max) - var(--pad-inner-min)) / (var(--ref-width) - var(--min-width))) * var(--min-width)) * 1px
    ),
    calc(var(--pad-inner-max) * 1px)
  );
  --pad-outer: clamp(
    calc(var(--pad-outer-min) * 1px),
    calc(
      ((var(--pad-outer-max) - var(--pad-outer-min)) / (var(--ref-width) - var(--min-width))) * 100vw
      + (var(--pad-outer-min) - ((var(--pad-outer-max) - var(--pad-outer-min)) / (var(--ref-width) - var(--min-width))) * var(--min-width)) * 1px
    ),
    calc(var(--pad-outer-max) * 1px)
  );
  flex: 0 0 70%;
  max-width: 70%;
  padding-left:  var(--pad-inner); /* innen, Richtung Bild */
  padding-right: var(--pad-outer); /* außen, Richtung Seitenrand */
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Inhalt mittig in der Spalte */
}

.split.reverse .text {
  padding-left:  var(--pad-outer); /* außen */
  padding-right: var(--pad-inner); /* innen */
}

.heading {
  font-size: calc(var(--subline-fs) * 0.9 * var(--heading-scale));
  font-weight: bold;
  line-height: 1.25;
  margin-bottom: 1rem;
  text-align: justify;
}

.content {
  font-size: calc(var(--subline-fs) * 0.9 * var(--content-scale));
  font-family: 'Inter', sans-serif; /* explizit Inter */
  font-weight: 300;
  line-height: 2.25;
}

.content strong {
  font-weight: 500;
}

/* <1024px: Stack untereinander */
@media (max-width: 1023.98px) { /* 1023.98px gekoppelt an Buttons in Container 1*/
  .split,
  .split.reverse {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 0;
    --buttons-block-gap: clamp(0.75rem, calc(var(--subline-fs) * 3.0), 5rem);
    padding-bottom: calc(var(--buttons-block-gap) * 0.75);
  }
  .split .heading {
    text-align: center;
  }  
  .split .image,
  .split .text {
    max-width: 100%;
    flex: 0 0 auto;
  }
  .split .text {
    max-width: clamp(280px, 70vw, 896px);
    margin-inline: auto;
    --buttons-block-gap: clamp(0.75rem, calc(var(--subline-fs) * 3.0), 5rem);
    padding-top: calc(var(--buttons-block-gap) * 0.75);
    padding-left: 0;
    padding-right: 0;    
    text-align: center;
  }
  .split.reverse .text {
    --buttons-block-gap: clamp(0.75rem, calc(var(--subline-fs) * 3.0), 5rem);
    padding-top: calc(var(--buttons-block-gap) * 0.75);
    padding-left: 0;
    padding-right: 0;
    text-align: center;  
  }
}

/* ============================= */
/* Container 4 */
/* ============================= */

.contact {
  /* Links/rechts bündig mit heading von Container 2 und 3 */
  --ref-width: 1280;
  --min-width: 1023.98;
  --pad-outer-min: 77;
  --pad-outer-max: 128;
  --pad-outer: clamp(
    calc(var(--pad-outer-min) * 1px),
    calc(
      ((var(--pad-outer-max) - var(--pad-outer-min)) / (var(--ref-width) - var(--min-width))) * 100vw
      + (var(--pad-outer-min) - ((var(--pad-outer-max) - var(--pad-outer-min)) / (var(--ref-width) - var(--min-width))) * var(--min-width)) * 1px
    ),
    calc(var(--pad-outer-max) * 1px)
  );
  /* Definition analog zu .hero-subtext */
  container-type: inline-size;   /* 1cqw auf Subtext-Basis */
  text-align: center;
  margin-inline: auto;
  --buttons-block-gap: clamp(0.75rem, calc(var(--subline-fs) * 3.0), 5rem); /*für ein ratio-Verhältnis zwischen Button und Subline sowie Button und Container 2 */
  margin-top: calc(var(--buttons-block-gap) * 0.8 * 0);
  padding-top: calc(var(--buttons-block-gap) * 1.75 * 0.75);
  padding-bottom: calc(var(--buttons-block-gap) * 1.75 * 0.75);
  --btn-gap: clamp(0.75rem, calc(var(--subline-fs) * 0.9), 2rem);
  /* Schriftgrößen-Skalierung analog zu .split .text */
  --heading-scale: 1.6;
  --content-scale: 0.9;  
}

.contact .heading,
.contact .content,
.contact .contact-buttons {
  margin-inline: var(--pad-outer);
  width: auto;               /* Breite nicht mehr fest */
  text-align: center;
}

.contact .heading {
  font-size: calc(var(--subline-fs) * 0.9 * var(--heading-scale));
  font-weight: bold;
  line-height: 1.25;
  margin-bottom: 1rem;
  text-align: justify;
  text-align-last: center;
}

.contact .content {
  font-size: calc(var(--subline-fs) * 0.9 * var(--content-scale));
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  line-height: 2.25;
  text-align: center;
}

@media (max-width: 1023.98px) {
  .contact {
    max-width: clamp(280px, 70vw, 896px);
    margin-inline: auto;
    --buttons-block-gap: clamp(0.75rem, calc(var(--subline-fs) * 3.0), 5rem);
    padding-top: calc(var(--buttons-block-gap) * 0.75);
    padding-bottom: calc(var(--buttons-block-gap) * 0.75);    
  }
  .contact .heading {
    text-align: center;
  }  
  .contact .heading,
  .contact .content,
  .contact .contact-buttons {
    margin-inline: auto;
  }
}

.contact-buttons {
  margin-top: calc(var(--buttons-block-gap) * 0.5);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--btn-gap);
}

.contact-buttons .btn {
  width: 100%;
  justify-content: center;
  font-size: calc(var(--subline-fs) * 0.8);
  text-transform: none;
  padding: clamp(0.6rem, 1.2cqw, 0.9rem) clamp(0.9rem, 1.8cqw, 1.25rem);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1;
}

/* Gestapelte Buttons bei <= 716.2px Containerbreite (~1024px Viewport) */
@container (max-width: 716.2px){
  .contact-buttons {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .contact-buttons .btn {
    width: 280px;
  }
}

/* Kontakt-Icons (SVG Data URI) */
/* ============================= */

a.btn[href^="mailto:"]::before,
a.btn[href^="tel:"]::before {
  content: '';
  display: inline-flex;
  width: 1em;
  height: 1em;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  align-self: center;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

a.btn[href^="mailto:"]::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='currentColor' d='M2 6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6zm2 .5v.3l8 5 8-5v-.3H4zm16 2.7-8 5-8-5V18h16V9.2z'/%3E%3C/svg%3E");
}

a.btn[href^="tel:"]::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='currentColor' d='M6.6 10.8c1.5 2.9 3.7 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1.1-.3 1.2.4 2.6.6 3.9.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.5 21 3 13.5 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.7.6 3.9.1.4 0 .8-.3 1.1l-2.2 2.2z'/%3E%3C/svg%3E");
}

/* ============================= */
/* Container 5 */
/* ============================= */

/* Container 5: Footer */
.footer {
  font-size: 0.7rem;
  padding: 1rem 0;
  text-align: center;
  color: #888888;  
}

.footer a {
  color: #888888;
  text-decoration: none;
  margin: 0 0.5rem;
}

.footer a:hover {
  text-decoration: underline;
}

/* ############################# A L T C O D E ############################# */

/* Animationen ----------------------------- */ 
.fade-up, .fade-left, .fade-right {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}

.fade-left {
  transform: translateX(-20px);
}

.fade-right {
  transform: translateX(20px);
}

.visible {
  opacity: 1;
  transform: translate(0, 0);
}

.delay {
  transition-delay: 0.125s;
}

/*--------------------------------
