@font-face {
  font-family: "Barrierefrei Sans";
  src: url("fonts/BarrierefreiSans-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Barrierefrei Sans";
  src: url("fonts/BarrierefreiSans-SemiBold.woff") format("woff");
  font-weight: 600;
  font-display: swap;
}

:root {
  --autoplay: 5s;
  --apricot: #ffb085;
  --marineblau: #002e4d;
  --korall: #e7715f;
}

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  font-family: "Barrierefrei Sans", system-ui, sans-serif;
  font-size: 20px;
  color: #000;
  background: #fff;
}

.page {
  display: flex;
  gap: 32px;
  align-items: stretch;
  min-height: 100vh;
  padding: 32px;
}

.content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  max-width: 600px;
}

.logo {
  width: 244px;
  height: auto;
}

.text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

h1 {
  font-size: 40px;
  font-weight: 400;
  line-height: 46px;
  color: var(--marineblau);
}

h1 strong {
  font-weight: 600;
}

.paragraphs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.buttons {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-top: 16px;
}

.button,
.link {
  display: flex;
  align-items: center;
  font-size: 18px;
  line-height: 24px;
  color: var(--korall);
  text-decoration: none;
}

.button {
  gap: 12px;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--apricot);
  border-radius: 38px;
}

.button:hover {
  color: #fff;
  background: var(--apricot);
}

.link {
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--korall);
}

.arrow {
  transform: rotate(180deg);
}

.mockup {
  display: flex;
  flex: 0 1 563px;
  max-width: 50%;
  margin-left: auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 64px 0;
  background: var(--apricot);
  border-radius: 24px;
}

/* Screen rect measured in app-mockup.png (735x1548): x 24-709, y 23-1515 */
.phone {
  position: relative;
  width: 245px;
}

.phone .frame {
  display: block;
  width: 100%;
  height: auto;
}

/* matches the island in app-mockup.png, which the slides cover */
.island {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 2;
  width: 71px;
  height: 20px;
  background: #000;
  border-radius: 10px;
  transform: translateX(-50%);
}

/* ponytail: native scroll-snap does the sliding (touch, trackpad, keys);
   JS only syncs the dots and drives autoplay */
.screens {
  position: absolute;
  top: 1.486%;
  left: 3.265%;
  display: flex;
  width: 93.333%;
  height: 96.447%;
  overflow-x: auto;
  border-radius: 35px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}

.screens::-webkit-scrollbar {
  display: none;
}

.screens img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: center;
}

.controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.controls button:focus-visible {
  outline: 2px solid var(--marineblau);
  outline-offset: 2px;
}

.nav {
  width: 40px;
  height: 40px;
}

.nav:hover {
  background: rgb(0 46 77 / 10%);
}

.next img {
  transform: rotate(180deg);
}

.dots {
  display: flex;
}

/* 24px hit area around a 12px dot: WCAG 2.5.8 target size */
.dots button {
  width: 24px;
  height: 24px;
  transition: width 0.3s ease;
}

/* the current slide's dot stretches into a pill so the fill has room to
   travel: at 12px it crossed 1.8px per second, which reads as stepping */
.dots button.active {
  width: 68px;
}

.dots button span {
  position: relative;
  width: 12px;
  height: 12px;
  overflow: hidden;
  border: 1.5px solid var(--marineblau);
  border-radius: 6px;
  transition: width 0.3s ease;
}

.dots button.active span {
  width: 56px;
}

/* base tint marks the current slide even while the fill is paused at 0% */
.dots button.active span {
  background: rgb(0 46 77 / 20%);
}

/* the fill wipes across over one autoplay interval and freezes on hover.
   ponytail: a translated bar, not an animated clip/background-size - those
   snap to whole device pixels, which is visible on a 12px dot */
.dots button span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--marineblau);
  transform: translateX(-100%);
}

.dots button.active span::after {
  animation: fill var(--autoplay) linear forwards;
}

.mockup.paused .dots button.active span::after {
  animation-play-state: paused;
}

@keyframes fill {
  to {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .screens {
    scroll-behavior: auto;
  }

  .dots button.active span::after {
    transform: translateX(0);
    animation: none;
  }
}

@media (max-width: 900px) {
  .page {
    flex-direction: column;
    gap: 24px;
    padding: 24px;
  }

  .content {
    max-width: none;
    gap: 40px;
  }

  h1 {
    font-size: 32px;
    line-height: 38px;
  }

  body {
    font-size: 18px;
  }

  .mockup {
    flex: none;
    max-width: none;
    margin-left: 0;
    padding: 40px 24px;
  }

  .buttons {
    flex-wrap: wrap;
    gap: 16px 24px;
  }
}
