:root {
  --yellow: #F5E600;
  --black: #000000;
  --header-h: 3.5em;
  --label-size: 15px;
  --bounce-dur: 1.4s;
  --stage-h: 100vh;
  --smiley-h: 20vw;
}
*, *::before, *::after {
  box-sizing: border-box;
}

@font-face {
  font-family: "Marguerite Grotesk";
  src:
    local("MargueriteGrotesk-Medium"),
    url("../src/font/MargueriteGrotesk-Medium.woff2") format("woff2");
  font-style: normal;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  font-family: "Marguerite Grotesk", Arial, sans-serif;
  background: var(--black);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Header ---------- */
.site-nav a[aria-current="page"] {
  background: var(--yellow);
  color: var(--black);          /* sonst gelber Text auf gelbem Grund */
  padding: 0.1em 0.4em;
}

.nav-index {
  font: inherit;
  color: var(--yellow);

}
.nav-about {
  font: inherit;
  color: var(--yellow);
}

.moods-section {
  box-shadow: 0 0 70px 10px var(--yellow);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.mood{
  position: relative;
  display: block;
  flex: 0 0 100%;
}

.home-mood {
  display: block;
  height: 100vh;  
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}

.moods-titles {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  /* gap: 10em; */
  background: var(--yellow);
  padding: 0.1em 2em 0.1em 0.1em; 
}

.smiley-end {
  display: block;
  flex: 0 0 100%;           /* ganze Breite = eigene Zeile über den Texten */
  width: 100%;
  height: auto;
  padding-top: 0;
  margin-bottom: -4em;      /* gleicht den grossen gap von 5em unter dem Smiley etwas aus */
}
/* ___________________________naviagtion___________________________ */
.site-header {
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  display: block;
}
.site-nav {
  border-bottom: 1px solid var(--yellow);
  position:relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr); ;
  row-gap: 1em;
  justify-items: center;
  align-items: start;
  padding-top: 1em;
  padding-bottom: 0;
  font-size: var(--label-size);
}


.site-nav button {
  font: inherit;
  color: var(--yellow);
  background: none;
  border: none;
  padding: 0;
}

.nav-home  { grid-column: 1; grid-row: 1; } 
.nav-index { grid-column: 2; grid-row: 1; }
.nav-about { grid-column: 3; grid-row: 1; }

.logo {
  display: none;
}

.logo-shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.logo--home{
  grid-column: 1;
}
.logo--index{
  grid-column: 2;
}

.logo--about{
  grid-column: 3;
}

.logo-face {
  position: relative;
  height: 65%;
  width: auto;
  display: block;
}

.logo-text {
  font-family: inherit;
  color: var(--yellow);
}

/* ---------- Hero / bouncing smiley ---------- */

.hero {
  width: 100%;
  height: calc(var(--stage-h) - var(--header-h));
}

.bouncer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--stage-h);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.smiley {
  width: 100%;
  height: auto;
  display: block;
  --top: calc((var(--smiley-h) - var(--stage-h) / 2) / 2);
  --bottom: calc((var(--stage-h) - var(--smiley-h)) / 2);
  transform-origin: 50% 100%;      /* Verformung von der Unterkante aus, wie ein Ball auf dem Boden */
  will-change: transform;
  animation: ball var(--bounce-dur) infinite;
}
.smiley--tall {
  display: none;
}

@keyframes ball {
  0%,100% {
    transform: translateY(var(--top)) scale(1, 1);
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45);
  }
  44% {
    transform: translateY(var(--bottom)) scale(0.97, 1.08);
    animation-timing-function: ease-out;
  }
  50% {
    transform: translateY(var(--bottom)) scale(1.05, 0.7);
    animation-timing-function: ease-in;
  }
  56% {
    transform: translateY(var(--bottom)) scale(0.97, 1.08);
    animation-timing-function: cubic-bezier(0, 0.55, 0.45, 1);
  }
}

/* ---------- Projekt-Pfeile ---------- */
.project-pager {
  display: flex;
  justify-content: space-between;
  padding: 0.5em 0;
  font-size: var(--label-size);
}

.project-pager-link {
  background: var(--yellow);
  color: var(--black);
  padding: 0.1em 0.6em;
  line-height: 1.2;
}

/* ---------- titles-projects ---------- */
.index-titles {
  display: flex;
  align-items: baseline;
  gap: 10em;
  position: absolute;
  z-index: 1;
  background: var(--yellow);
  bottom: 0px;
  left: 0px;
  padding: 0.1em 2em 0.1em 0.1em; 
}

.project-info h2,
.project-info p,
.project-info time,
.project-info dl,
.project-info dd,
.index-titles h2,
.index-titles p,
.index-titles time, 
.about-text h2,
.about-text p {
  margin: 0;
  font: inherit;
  font-size: var(--label-size);           /* gleiche Schrift, Größe, Stärke und Zeilenhöhe wie .index-titles */
}

.project-info {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 3fr 3fr 1fr;   /* breite Textspalte + zwei schmale, wie in Figma */
  column-gap: 1em;
  row-gap: 0.6em;
  width:min(65em, 100%);
  /* margin-top: -1.5em;                    zieht die Titelzeile auf die Bildunterkante */
  padding: 0.3em 2em 1.5em 0.4em;
  background: var(--yellow);
  font-size: var(--label-size);
  line-height: 1.1;
}

.project-info--sticky {
  position: sticky;
  top: 0;
  z-index: 10;
}

.project-meta a {
  color: inherit;
  text-decoration: underline;
}

/* ---------- Footer ---------- */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;   /* füllt den freien Platz, schiebt den Footer nach unten */
}

footer {
  margin-top: 5em;
  display: flex;
  flex-wrap: wrap;
  background-color: var(--yellow);
  padding: 3em;
  line-height: 1.1;
  gap: 5em;
}

footer p {
  margin: 0;
}
/* ______________________about-overlay____________________ */

.about-text {
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;   /* breite Textspalte + zwei schmale, wie in Figma */
  column-gap: 1em;
  row-gap: 0.6em;
  width: 50em;
  max-width: 100%;
  padding: 0.3em 2em 1.5em 0.4em;
  background: var(--yellow);
  font-size: var(--label-size);
  line-height: 1.1;
}
.leslie {
  --jump: 15vh;                                    /* Sprunghöhe */
  --bottom: 0px;
  --top: calc(var(--jump)*-1);
  width: 30vh;
  margin: 20vh auto 0;
  padding: 0px 30px;
  /* margin-right: auto; */
  height: auto;
  display: block;
  transform-origin: 50% 100%;      /* Verformung von der Unterkante aus, wie ein Ball auf dem Boden */
  will-change: transform;
  animation: ball 1.4s infinite;
}

.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;                     /* über Footer und Sticky-Info */
  background:transparent;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);   /* abgedunkelte Seite dahinter */
  box-shadow: inset 0 0 80px 30px var(--yellow);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  overflow: hidden;
}

.about-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.about-overlay-content {
  position: absolute;
  inset: 0;
  padding-top: var(--header-h);
}

.about-overlay.is-open .about-text {
  animation: about-pop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  transform-origin: center;
}
@keyframes about-pop {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.about-close {
  position: absolute;
  top: 2em;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font: inherit;
  font-size: var(--label-size);
  line-height: 1;
  background: var(--yellow);
  padding: 0.3em 0.2em;
  border: none;
  cursor: pointer;
}

/* Seite dahinter scrollt nicht, solange das Overlay offen ist */
body.about-open {
  overflow: hidden;
}

.project-header-image {
  width: 100%;
  height: 70vh;
  display: block;
  object-fit: cover;
  object-position: center;
}
/* _________________small screens____________________________ */
@media (max-width: 800px) {
  :root {
    --stage-h: 100svh;
  }

  .smiley--wide {
    display: none;
  }

  .bouncer {
    top: var(--header-h);                               /* Bühne beginnt unter der Nav */
    height: calc(var(--stage-h) - var(--header-h));
    align-items: flex-end;                              /* Smiley an die Unterkante */
  }

  .smiley--tall {
    display: block;
    width: 95vw;
    max-height: 100%;
    animation: none;
    transform: none;
  }

  .home-mood {
    width: 100%;
    height: auto;
    max-width: none;
  }

  .project-image {
   width: 100%;
    height: auto;
    padding: 10px 0;
  }
  
  img.project-image {
    padding: 0px 10px;
  }

  .leslie {
    width: 50%;
  }

  footer {
    flex-direction: column;
    gap: 0.5em;
  }

  .smiley-end {
    flex: none;
    margin-bottom: 0;
  }
}

@media (max-width: 640px) {
  .site-nav {
    gap: 24px;
  }
  
}

@media (prefers-reduced-motion: reduce) {
  .bouncer {
    transition: none;
  }
}
/* ---------- Mittlere Screens (Tablet, kleine Laptops) ---------- */
@media (max-width: 800px) {
  .project-info {
    grid-template-columns: 1fr;   /* eine Spalte */
    width: 100%;
  }

  .project-info--sticky {
    position: relative;           /* nicht mehr sticky */
  }
  .about-text {
    grid-template-columns: 1fr;   /* eine Spalte */
    width: 85%;
  }

  /* .about-close {
    right: auto;                  /* hebt right: 5em auf */
    /* left: 50%;
    transform: translateX(-50%);  /* exakt mittig, egal wie breit der Button ist */
    /* top: 2em; */
  /* } */ 
}