:root {
    --unit: calc(100vh - clamp(5vh, calc(100vw / 6), 24vh));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Glory", sans-serif;
    font-size: 1.2rem;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
}

b {
    font-size: clamp(1.2rem, 1.5vw + 1vh, 1.6rem);
}

body {
    display: flex;
    position: relative;
    justify-content: center;
    align-content: center;
    font-size: clamp(14px, calc(1vw + 1vh), 24px);
}

section {
    scroll-margin-top: clamp(5vh, calc(var(--unit)/4),24vh);
    min-height: calc(100vh - (calc(var(--unit)/6)));
}

.header-wrapper {
    display: flex;
    position: fixed;
    justify-content: center;
    align-items: center;
    height: calc((var(--unit))/ 6);
    left: 0;
    top: 0;
    width: 100vw;
    min-height: 20vh;
    max-height: 24vh;
    background-color: rgb(255, 255, 255);
    z-index: 10;
}

.head-grid {
    display: grid;
    position: relative;
    align-items: end;
    overflow: hidden;
    height: 100%;
    width: 90vw;
    grid-template-columns: 1fr auto;
    border-bottom: 0.1vh solid black;
    background-color: rgba(180, 96, 96, 0);
    z-index: 10;
}

.logo {
  display: flex;
  position: relative;
  justify-content: start;
  align-items: start;
  width: fit-content;
  font-size: clamp(1.5rem, 2vw + 1vh, 2.5rem);
  font-weight: 600;
  color: #2a3950;
  white-space: nowrap;
  font-family: "Glory", sans-serif;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.main-nav {
  display: flex;
  position: relative;
  gap: clamp(0.5rem, 0.7vw + 1vh, 1.5rem);
  row-gap: 0.1rem;
  white-space: nowrap;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.main-nav a {
  text-decoration: none;
  color: black;
  box-sizing: border-box;
  font-weight: 500;
  font-size: clamp(0.8rem, 1.3vw + 1vh, 1.5rem);
  font-family: "Glory", sans-serif;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: #336699;
}

.page-title-bar {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    color: white;
    background-color: rgb(100, 118, 135);
    font-size: clamp(1.4rem, 1.8vw + 1vh, 2rem);
}

.scroll-container {
    display: grid;
    position: absolute;
    margin-top: clamp(5vh, calc(var(--unit)/6), 24vh);
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    width: 90vw;
    z-index: 9;
}

.scroll-container-default {
    display: grid;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    width: 90vw;
    z-index: 9;
}

@media (aspect-ratio < 1/1) {
  .head-grid {
    all: unset;
    display: grid;
    position: relative;
    align-items: center;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    text-align: center;
    box-sizing: border-box;
    border-bottom: 0.1vh solid black;
    background-color: white;
    row-gap: 0.3rem;
    height: 100%;
    width: 90vw;
  }

  .logo {
  all: unset;
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  width: 100%;
  font-size: clamp(1.5rem, 2vw + 1vh, 2.5rem);
  font-weight: 600;
  color: #2a3950;
  white-space: nowrap;
  font-family: "Glory", sans-serif;
  margin-top: 3vh;
  margin-bottom: 0.5rem;
}

  .main-nav a {
    text-decoration: none;
    color: black;
    box-sizing: border-box;
    font-weight: 500;
    font-size: clamp(0.8rem, 1vw + 1vh, 1.8rem);
    font-family: "Glory", sans-serif;
    transition: color 0.2s ease;
    row-gap: 0.1rem;
    margin-bottom: 0.1rem;
  }

  .main-nav {
    justify-content: center;
    flex-wrap: wrap;
    overflow: hidden;
    max-height: 100%;           /* bleibt innerhalb des Grid-Items */
  }

  section {
    scroll-margin-top: clamp(20px, calc(var(--unit)/5),24vh);
    min-height: calc(100vh - (calc(var(--unit)/8)));
}
}