/* sebibuch.de – ein Stylesheet für alle Seiten */

/* Schriften: Barlow und Poly (SIL Open Font License, siehe fonts/), nur Latin-Zeichensatz */
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/barlow-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/barlow-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poly";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/poly-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --teal: #345a64;
  --text: #444;
  --heading: #4a4a4a;
  /* Das Original nutzte #a3a3a3; dunkler, damit Fließtext auf Weiß gut lesbar ist (WCAG AA). */
  --text-light: #707070;
  --heading-light: #8a8a8a;
  --footer-bg: #f5f5f5;
  --gutter: 50px;
  --serif: "Poly", Helvetica, Arial, sans-serif;
  --sans: "Barlow", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--footer-bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 400 18px/1.65 var(--sans);
}

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

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.container {
  max-width: 1310px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Kopfzeile */
.site-header {
  background: var(--teal);
  color: #fff;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 140px;
}

.logo img {
  width: 175px;
  height: 100px;
}

.main-nav ul {
  display: flex;
  margin: 0 -13px 0 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  display: block;
  padding: 0 13px;
  font-weight: 600;
  line-height: 140px;
  text-decoration: none;
}

/* Burger-Symbol, nur auf dem Handy sichtbar */
.burger {
  display: none;
  position: relative;
  width: 35px;
  height: 80px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
}

.burger span,
.burger span::before,
.burger span::after {
  position: absolute;
  left: 0;
  width: 35px;
  height: 3px;
  border-radius: 3px;
  background: currentColor;
}

.burger span {
  top: 50%;
  margin-top: -2px;
}

.burger span::before,
.burger span::after {
  content: "";
}

.burger span::before {
  top: -10px;
}

.burger span::after {
  top: 10px;
}

.burger-close span {
  transform: rotate(-135deg);
}

.burger-close span::before {
  opacity: 0;
}

.burger-close span::after {
  top: 0;
  transform: rotate(-90deg);
}

/* Handy-Menü: Leiste von rechts, als Popover ohne JavaScript */
.mobile-menu {
  inset: 0 0 0 auto;
  width: min(350px, 100%);
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--teal);
  color: #fff;
  transition: translate 0.5s cubic-bezier(0.75, 0, 0.25, 1), display 0.5s allow-discrete, overlay 0.5s allow-discrete;
}

.mobile-menu:popover-open {
  display: flex;
  align-items: center;
}

@starting-style {
  .mobile-menu:popover-open {
    translate: 100% 0;
  }
}

.mobile-menu:not(:popover-open) {
  translate: 100% 0;
}

.mobile-menu::backdrop {
  background: rgb(0 0 0 / 0.3);
}

.mobile-menu ul {
  width: 100%;
  margin: 0;
  padding: 80px 0;
  list-style: none;
}

.mobile-menu li a {
  display: block;
  padding: 15px 50px;
  font: 18px/1.3 var(--serif);
  text-decoration: none;
}

.mobile-menu .burger {
  display: block;
  position: absolute;
  top: 0;
  right: 7.5vw;
}

/* Begrüßung */
.hero {
  background: url("img/hintergrund.webp") center / cover, linear-gradient(to right bottom, #ede553, #3a8fbc);
  color: #fff;
  /* Schräge Unterkante, 5 Grad wie im Original */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8.75vw), 0 100%);
}

.hero .container {
  display: grid;
  grid-template-columns: 34% 56%;
  column-gap: 10%;
  align-items: center;
  min-height: 675px;
}

.hero h1 {
  margin: 0;
  font: 400 53px/1.1 var(--serif);
}

.hero p {
  margin: 0.85em 0;
  font-size: 23px;
}

.hero .portrait {
  width: 100%;
}

.pop-up {
  animation: pop-up 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes pop-up {
  from {
    opacity: 0.1;
    transform: scale(0.7);
  }
}

/* Malbücher */
.books {
  padding: 130px 0;
  color: var(--heading);
  text-align: center;
}

.books h2 {
  margin: 0;
  font: 400 53px/1.1 var(--serif);
}

.books .intro {
  margin: 0.85em 0;
  padding-bottom: 40px;
  font-size: 23px;
}

/* 2 × 2, mittig; zwei Cover in der bisherigen Größe (346 px) plus Abstand */
.book-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px 70px;
  align-items: start;
  max-width: 762px;
  margin: 0 auto;
  /* Innenabstand statt Außenabstand, damit er nicht mit dem Abstand des Einleitungstexts verschmilzt */
  padding: 50px 0 0;
  list-style: none;
}

.book-list img {
  width: 100%;
  margin-bottom: 10px;
  border-radius: 3px;
}

.button {
  display: inline-block;
  margin: 3px 0;
  padding: 15px 30px 13px;
  border-bottom: 1px solid #123842;
  border-radius: 3px;
  background: var(--teal);
  color: #fff;
  font-size: 13px;
  line-height: 1.2;
  text-decoration: none;
  transition: opacity 0.4s ease-in-out;
}

.button:hover {
  opacity: 0.9;
}

/* Textseiten: Impressum, Datenschutzerklärung */
.page {
  padding: 50px 0;
  color: var(--text-light);
}

.page h1 {
  margin: 0;
  padding-bottom: 10px;
  color: var(--heading-light);
  font: 400 53px/1.1 var(--serif);
  letter-spacing: 1px;
}

.page p {
  margin: 0.85em 0;
}

.page strong {
  color: var(--teal);
}

.page h2,
.page h3 {
  margin: 27px 0 4px;
  padding-top: 20px;
  color: var(--heading);
  font-size: 18px;
  line-height: 1.1;
}

.page h3 {
  margin-top: 0;
  padding-top: 0;
}

.page ul {
  margin: 0 0 20px 7px;
  padding: 0;
  list-style: none;
}

.page li {
  margin-left: 18px;
  padding-top: 3px;
}

/* Gegen Spam-Sammler: Füllzeichen in der E-Mail-Adresse, für Menschen unsichtbar */
.nospam {
  display: none;
}

/* Fußzeile */
.site-footer {
  background: var(--footer-bg);
  color: #6b6b6b;
  font-size: 11px;
}

.site-footer .container {
  display: flex;
  justify-content: flex-end;
  padding-top: 15px;
  padding-bottom: 15px;
}

.site-footer ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 20px;
}

.site-footer li {
  padding: 0 10px;
}

.site-footer li:last-child {
  padding-right: 0;
}

.site-footer li + li {
  border-left: 1px solid #fff;
}

.site-footer a {
  color: var(--text-light);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Handy */
@media (max-width: 767px) {
  .container {
    width: 85%;
    padding: 0;
  }

  body {
    font-size: 14px;
  }

  .site-header .container {
    height: 80px;
  }

  .logo img {
    width: 105px;
    height: 60px;
  }

  .main-nav {
    display: none;
  }

  .burger {
    display: block;
  }

  .hero .container {
    grid-template-columns: 1fr;
    row-gap: 20px;
    min-height: 0;
    padding: 50px 0 20px;
  }

  .hero .portrait {
    width: 75%;
    margin: 0 auto;
  }

  .hero h1,
  .books h2 {
    font-size: 42.4px;
  }

  /* Das Theme hängt am Handy unter gestapelte Spalten 20 px an; so bleibt der Abstand zum Fuß gleich */
  .books {
    padding-bottom: 150px;
  }

  .page {
    padding-bottom: 70px;
  }

  .book-list {
    grid-template-columns: 1fr;
    row-gap: 20px;
    padding-top: 20px;
  }

  .site-footer .container {
    justify-content: flex-start;
  }

  .site-footer li:first-child {
    padding-left: 0;
  }
}

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

  .pop-up {
    animation: none;
  }

  .mobile-menu {
    transition: none;
  }
}
