*,
*::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,
    rgb(39, 52, 78, 1),
    rgba(39, 52, 78, 0.8),
    rgba(39, 52, 78, 0.5),
    rgba(39, 52, 78, 0.3),
    rgba(39, 52, 78, 0)
  );

   --color-navbar: linear-gradient(
    to bottom,
    rgb(0, 0, 0, 0.8),
    rgba(0, 0, 0, 0.6),
    rgba(0, 0, 0, 0.4),
    rgba(0, 0, 0, 0.2),
    rgba(0, 0, 0, 0.1),
    rgba(0, 0, 0, 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(.16,1,.3,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;
  height: 100vh;
  
  font-family: "IBM Plex Sans", sans-serif;
  color: white;

  background-image: 
  linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,.5)),
  url("img/background.png"); 

  background-size: cover;
  background-repeat: no-repeat;
  background-color: var(--color-background);
  /* 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 clamp(10px, 2vw, 20px);
  font-size: clamp(16px, 1.2vw, 24px);

  background: var(--color-navbar);
}

.logo {
  grid-column: 1;
    width: clamp(160px, 18vw, 300px);
}

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

.menu {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 20px);
}

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

.menu-link:hover {
  text-decoration: underline;
}

.menu-link.button {
  background: hsl(142, 76%, 36%);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
}

.menu-link.button:hover {
  text-decoration: none;
}

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

.hero {
  width: 100%;
  height: 100vh;

  position: relative;

  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 */
}

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

.headline {
  font-size: 60px;
  text-align: center;
  line-height: 1.05;
  color: rgba(255, 255, 255, 1);
}

.headline1{
  color: rgba(22, 163, 74, 0.8);
}

/* ---------------- Navbar Bottom ---------------- */

.bottom-line {
  position: bottom;

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

  width: 100%;
  justify-self: end;
  font-size: 24px;

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

/* ---------------- Frontpage Formating ---------------- */

.fp-content{
  text-align: center;
  color: rgba(250, 250, 250, 1);
}

.fp-headline{
display: flex;
justify-content: center;
align-items: center;

  font-size: clamp(3.5rem, 8vw, 7.5rem); /* 56px - 120px */
padding-top: clamp(80px, 18vh, 200px);
padding-bottom: clamp(16px, 2vh, 32px);
}

.mg{ /* Mint-green */
color: rgba(62, 198, 116, 1);
}

.index-catch{
    font-size: clamp(24px, 3vw, 48px);
    letter-spacing: clamp(0.05em, 0.2vw, 0.1em);
  word-spacing: 0.15em;
  font-weight: 500;
}

.index-small{
    font-size: clamp(1rem, 1.3vw, 1.55rem); /* 16px - 25px */
    padding-top: clamp(20px, 2.5vh, 36px);
    font-weight: 300;
    line-height: 1.5;
    max-width: 700px;
    margin: 0 auto;
}

.i-s-bold{
  font-weight: 500;
}

/* ---------------- Solution Rechner ---------------- */

#startkapital,
#zins,
#einzahlung,
#monatlich {
  font-family: "IBM Plex Sans", sans-serif;
  font-style: italic;
}

.calc-button {
  background: var(--color-button-g);
  color: var(--color-headline);
  padding: 4px 7px;
  border-radius: 7px;
}

.calc-button:hover {
  background: var(--color-button-g-hover);
}

.calculation-table {
  background-color: var(--color-box);
  font-size: 14px;
  font-style: normal;
}

/* ÄNDERUNG: alte 23% Breite rausnehmen */
table {
  width: 100%;
  background-color: rgba(17, 24, 39, 1);
  padding: 7px 10px 7px 10px;
  border-radius: 7px;
}

th {
  text-align: center;
  padding: 4px 7px;
}

td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

td:first-child {
  text-align: center;
}

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

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

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

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

/* ---------------- SOLUTION GRID ---------------- */

.the-solution {
  background: var(--color-content-box);
  padding: var(--padding);
  border-radius: 10px;
}

/* ÄNDERUNG: Grid sauber auf 2 Hauptspalten */
.solution-section {
  width: var(--content-w);
  display: grid;
  grid-template-columns: 1.1fr 1.7fr;
  gap: var(--space-lg);
  align-items: start;
  opacity: 0;
  animation: var(--slide-in-slow);
}

/* ÄNDERUNG: Text bleibt wie bei dir, nur nicht als Flex-Zentrum */
.solution-text {
  font-size: 20px;
  line-height: 1.6;
  font-style: italic;
  text-align: center;
}

.solution-panel {
  background: var(--color-content-box);
  padding: var(--padding);
  border-radius: 10px;

  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
}

/* ÄNDERUNG: dein bisheriges minmax war syntaktisch falsch */
.calculator {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-xs);
  width: 100%;
}

.calculator input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(17, 24, 39, 1);
  color: var(--color-text);
}

.calculator input::placeholder {
  color: rgba(229, 231, 235, 0.65);
}

.solution-table {
  width: 100%;
  border-collapse: collapse;
  background-color: rgba(17, 24, 39, 1);
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  table-layout: fixed;
}

.solution-table th,
.solution-table td {
  padding: 10px 12px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.solution-table th {
  text-align: center;
}

.solution-table td {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.solution-note {
  font-size: 16px;
  line-height: 1.7;
  font-style: italic;
}

@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;
  }
}

/* ---------------- IT'S ENOUGHT SECTION ---------------- */

.enough-section {
  width: var(--content-w);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.enough-headline {
  font-size: 42px;
  font-weight: 600;

  background: rgba(22, 163, 74, 1);
  padding: var(--padding);
  border-radius: 10px;

  width: 100%;
  min-height: 90px; /* Höhe der Box */

  display: flex;
  align-items: center; /* vertikal mittig */
  justify-content: center; /* horizontal mittig */

  text-align: center;
  opacity: 0;
  animation: var(--slide-in-delay);
}

.enough-grid {
  width: 100%;

  display: grid;
  grid-template-columns: 1.4fr 1.4fr;
  gap: var(--space-lg);

      opacity: 0;
  animation: var(--slide-in-delay2x);
}

.enough-box {
  background: var(--color-content-box);
  padding: var(--padding);
  border-radius: 10px;

  font-size: 20px;
  line-height: 1.6;
  font-style: italic;

  display: flex;
  align-items: center; /* vertikal */
  justify-content: top; /* horizontal */
  text-align: center; /* saubere Zeilen */
}

/*------------ Pfeile entfernen beim Rechner------------*/

/* Chrome, Safari, Edge */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

@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);}
}

.mail-btn{
    display:inline-flex;
    align-items:center;
    gap:10px;
    padding:14px 26px;
    background:#2563eb;
    color:#fff;
    border-radius:12px;
    text-decoration:none;
    font-weight:600;
    transition:.3s;
}

.mail-btn:hover{
    background:#1d4ed8;
    transform:translateY(-2px);
}

