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

:root {
  --space-2xs: 6px;
  --space-xs: 10px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 56px;
  --space-xxl: 80px;

  --content-w: min(1200px, 92vw);

  --color-background: rgba(11, 15, 20, 1);
  --color-background-test: rgba(11, 15, 20, 0.85);
  --color-content-box: linear-gradient(
    to bottom,
    rgba(17, 24, 39, 1),
    rgba(17, 24, 39, 0.8),
    rgba(17, 24, 39, 0.5),
    rgba(17, 24, 39, 0.3),
    rgba(11, 15, 20, 0)
  );
  --color-content-box-reversed: linear-gradient(
    to top,
    rgba(17, 24, 39, 1),
    rgba(17, 24, 39, 0.8),
    rgba(17, 24, 39, 0.5),
    rgba(17, 24, 39, 0.3),
    rgba(11, 15, 20, 0)
  );
  --color-headline: rgba(255, 255, 255, 1);
  --color-text: rgba(229, 231, 235, 1);
  --color-box: hsl(215, 28%, 17%);

  --color-button-g: hsl(142, 76%, 36%);
  --color-button-g-hover: hsl(142, 76%, 45%);
  --color-button-r: hsl(0, 72%, 51%);
  --color-button-r-hover: hsl(0, 72%, 60%);

  --padding: 10px 10px 10px 10px;

  --slide-in-slow: slideInSoft 3s cubic-bezier(0.22, 1, 0.36, 1) forwards; 
  /* forwards bezieht sich auf die slide in animation von opacity 0 zu 1 - bei backwards faded es in und wechselt dann von opacity 1 zu 0 */
  --slide-in-delay: slideInSoft 5s cubic-bezier(0.22, 1, 0.36, 1) 0.75s forwards;
  --slide-in-delay2x: slideInSoft 7s cubic-bezier(0.22, 1, 0.36, 1) 1.5s forwards;
/* Cubic-bezier ist dazu da um eine "einflieg" animation angenehmer und smoother zu machen bzw. sie soll sie premium anfühlen wird in modernen UI's verwendet wie APPLE o.ä. */
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  background-image: url("img/background.png"); 
  background-size: cover;
  background-repeat: no-repeat;
  background-color: var(--color-background);
  color: white;
  /* background-position: center; */
}

/* Reset typographic defaults -> kontrollierbares spacing */
h1,
h2,
h3,
p,
ul {
  margin: 0;
}
ul {
  padding: 0;
  list-style: none;
}

/* ---------------- NAVBAR ---------------- */

.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 9999; /* packt die navbar über alles drüber */

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  padding: 12px 20px;
  font-size: 24px;

  background: linear-gradient(
    to bottom,
    rgba(11, 15, 20, 1),
    rgba(11, 15, 20, 0)
  );
}

.new-link{
    letter-spacing:.8px;
    color:#fff;
    background:rgba(22, 163, 74, 1);
    padding:4px 8px;
    border-radius: 999px;
    animation:pulse 2.5s infinite;
}

.logo {
  grid-column: 1;
  width: 300px;
}

.menu {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 20px;
}

.menu-link {
  color: white;
  text-decoration: none;
}

/* .menu-link:hover {
  font-size: 25px;
} */

/* ---------------- HERO ---------------- */

.hero {
  position: relative;
  height: auto; /* -- Höhe der Webseite*/
  min-height: auto;
  padding-top: var(--space-xl);

  display: flex;
  flex-direction: column;
  align-items: center;

  padding-top: 80px; /* Platz für fixed navbar */
  padding-bottom: 24px; /* unten etwas Luft */
  gap: var(--space-xs); /* EINHEITLICHER Abstand zwischen Blöcken */
}

/* .page-content{
  opacity: 0;
  animation: var(--slide-in-slow);
} */

/* ---------------- HEADLINE ---------------- */

.headline {
  font-size: 60px;
  text-align: center;
  line-height: 1.05;
  color: rgb(220, 38, 38, 0.8);
}

/* ---------------- TOP GRID ---------------- */

.the-problem {
  background: var(--color-content-box);
  padding: var(--padding);
  border-radius: 10px;
  opacity: 0;
  animation: var(--slide-in-slow);
}

.description-section {
  width: var(--content-w);
  display: grid;
  grid-template-columns: 1.4fr;
  gap: var(--space-xs);
  align-items: start;
}

.description-text {
  font-size: 20px;
  line-height: 2;
  font-style: italic;
  text-align: center;
}

.chart {
  padding: 0; /* clean: kein card look */
  background: transparent;
  border-radius: 0;
  background-color: var(--color-content-box);
  gap:var(--space-xs);
  opacity: 0;
  animation: var(--slide-in-delay);
}

.chart canvas {
  width: 100% !important;
  height: 350px !important;
  display: block;
  background: rgba(17, 24, 39, 1);
  border-radius: 10px;
}

/* ---------------- BOTTOM (clean, no boxes) ---------------- */
.bottom-links {
  background: var(--color-content-box);
  padding: var(--padding);
  border-radius: 10px;
    opacity: 0;
  animation: var(--slide-in-delay2x);
}

.bottom-section {
  width: var(--content-w);
  display: grid;
  grid-template-columns: 1.4fr;
  gap: var(--space-xs);
  align-items: start;
  background-color: var(--color-content-box);
}

.bottom-title {
  font-size: 32px;
  font-weight: 600;
  text-align: center;
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs); /* Links gleichmäßig untereinander */
  font-style: italic;
  text-align: center;
}

.link-list a {
  color: #7dd3fc; /* gedämpftes Blau */
  text-decoration: none;
  transition:
    color 0.15s ease,
    text-decoration-color 0.15s ease;
}

.link-list a:hover {
  color: #bae6fd;
  text-decoration: underline;
  text-decoration-color: rgba(186, 230, 253, 0.6);
  text-underline-offset: 3px;
}

.bottom-text {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
  text-align: center;
  line-height: 1.3;
  background: var(--color-content-box);
  padding: var(--padding);
  border-radius: 10px;
    opacity: 0;
  animation: var(--slide-in-delay);
}

.bottom-text2 {
  font-size: 12px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
  line-height: 1.3;
}

/* ---------------- SOLUTION BUTTON ---------------- */

.sol-link{
  opacity: 1;
  color: white;
  text-decoration: none;
}

.sol-link.visible{
  opacity: 1;
}

/* .sol-link:hover {
  text-decoration: underline;
} */

/* ---------------- RESPONSIVE ---------------- */

@media (max-width: 900px) {
  .headline {
    font-size: 44px;
  }

  .description-section,
  .bottom-section {
    grid-template-columns: 1fr;
  }

  .chart canvas {
    height: 220px !important;
  }
}

@media (max-width: 900px) {
    /* ÄNDERUNG: solution-section untereinander, calculator Inputs auch untereinander */
  .solution-section {
    grid-template-columns: 1fr;
  }

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

  .solution-table {
    display: block;
    overflow-x: auto;
  }
}

@keyframes slideInSoft {
    from {
        opacity: 0;
        transform: translateY(300px) scale(0.7);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}/* TranslateX bedeutet es wird auf der X-Achse von links (-120X) nach rechts (0X) geschoben */

@keyframes pulse{
    0%{box-shadow:0 0 0 0 rgba(22, 163, 74, 1);}
    70%{box-shadow:0 0 0 10px rgba(255,107,0,0);}
    100%{box-shadow:0 0 0 0 rgba(255,107,0,0);}
}