/*
 * Geräteübergreifende Darstellung
 * Dynamische Schriftgrössen und Bildpositionen werden in /css/site-settings.css ergänzt.
 */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 100%;
}

body {
  min-width: 320px;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
.brand {
  overflow-wrap: anywhere;
  hyphens: auto;
}

.hero {
  height: calc(100vh - 76px);
  max-height: 920px;
}

@supports (height: 100svh) {
  .hero {
    height: calc(100svh - 76px);
  }
}

.hero > .image-hero {
  inset: 0;
  object-fit: cover;
  object-position: 50% 50%;
}

.section-media {
  width: 100%;
  height: clamp(320px, 42vw, 620px);
  overflow: hidden;
  border-radius: 3px;
  background: var(--cream);
  box-shadow: 0 24px 65px rgba(23, 37, 31, .12);
}

.section-media > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 50%;
}

.image-section.image-left > .section-media {
  order: -1;
}

.image-display-controls {
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  background: var(--paper);
}

.image-display-controls small {
  display: block;
  margin: -.9rem 0 1rem;
  color: #5e685f;
}

.image-editor .image-editor-preview {
  object-fit: contain;
  object-position: center;
  background: var(--cream);
}

.typography-controls input {
  max-width: 12rem;
}

@media (max-width: 1000px) {
  .side-menu {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .side-menu a {
    min-height: 44px;
    align-items: center;
  }
}

@media (max-width: 800px) {
  .hero {
    height: calc(100vh - 108px);
    min-height: 520px;
    max-height: 780px;
  }

  @supports (height: 100svh) {
    .hero {
      height: calc(100svh - 108px);
    }
  }

  .hero-content {
    width: 100%;
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }

  .section-media {
    height: min(82vw, 520px);
    min-height: 280px;
  }

  .image-section.image-left > .section-media {
    order: 0;
  }

  .nav {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: clamp(2.55rem, 13vw, 4.2rem);
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .nav {
    align-items: center;
  }

  .nav nav {
    justify-content: flex-end;
  }

  .brand {
    max-width: 52%;
    line-height: 1.2;
  }

  .brand span {
    display: none;
  }

  .section-media {
    height: min(92vw, 470px);
    min-height: 250px;
  }

  .card-form,
  .location-card {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
