.wgs-motiv-card {
  font-family: system-ui, sans-serif;
  color: #29201f;
  background: radial-gradient(ellipse at 50% 8%, #fff6ee, #f6dacd 80%);
}

:where(.wgs-motiv-card) * { box-sizing: border-box; }
body.motiv-landing { margin: 0; }
:where(.wgs-motiv-card) [hidden] { display: none !important; }
:where(.wgs-motiv-card) .card-status { margin: 0; padding: 3rem 1rem; text-align: center; }

:where(.wgs-motiv-card) .card-scene {
  display: grid;
  place-content: center;
  gap: 1.75rem;
  min-height: 100vh;
  min-height: 100svh;
  padding: 1.5rem 0;
  overflow: clip;
}

:where(.wgs-motiv-card) .card-book {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(92vw, 53rem, 115svh);
  aspect-ratio: 8 / 5;
  font-family: Georgia, serif;
}

:where(.wgs-motiv-card) .card-cover, :where(.wgs-motiv-card) .card-note { min-width: 0; }
:where(.wgs-motiv-card) .card-cover { grid-column: 1; }
:where(.wgs-motiv-card) .card-face { width: 100%; height: 100%; }
:where(.wgs-motiv-card) .card-face--front {
  display: grid;
  place-items: center;
  border-radius: .28rem 0 0 .28rem;
  background: #242126;
  box-shadow: 0 18px 50px #643a3740;
}
:where(.wgs-motiv-card) .card-face--front img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
:where(.wgs-motiv-card) .card-face--inside { display: none; }

:where(.wgs-motiv-card) .card-note {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(.7rem, 2vw, 1.6rem);
  border-radius: 0 .28rem .28rem 0;
  padding: clamp(.8rem, 3vw, 3rem);
  background: linear-gradient(90deg, #e4dedb, #fffdfa 11%);
  box-shadow: 0 18px 50px #643a3733;
}

:where(.wgs-motiv-card) .card-note h1 { margin: 0; color: #371e23; font-size: clamp(1.15rem, 3.4vw, 3rem); line-height: 1.03; font-weight: 500; }
:where(.wgs-motiv-card) .card-note p { margin: 0; font-size: clamp(.9rem, 1.75vw, 1.2rem); line-height: 1.45; }
:where(.wgs-motiv-card) .card-note .card-signature { font-style: italic; }

:where(.wgs-motiv-card) .card-open {
  justify-self: center;
  padding: .7rem 1.05rem;
  border: 1px solid #a86e61;
  border-radius: 2rem;
  background: #fff8f2;
  color: #4b2724;
  font: 600 .875rem system-ui, sans-serif;
  cursor: pointer;
}
:where(.wgs-motiv-card) .card-open:hover { background: #fff; }
:where(.wgs-motiv-card) .card-open:focus-visible { outline: 2px solid #4b2724; outline-offset: 4px; }

.wgs-motiv-card[data-scroll-card="active"] { --open: 0; min-height: 170vh; min-height: 170svh; }
.wgs-motiv-card[data-scroll-card="active"] .card-scene { position: sticky; top: 0; }
.wgs-motiv-card[data-scroll-card="active"] .card-book {
  --closed-scale: 1;
  perspective: 1000px;
  transform: translateX(calc((1 - var(--open)) * -25%)) scale(calc(1 + (1 - var(--open)) * (var(--closed-scale) - 1)));
  transform-origin: 75% center;
}
.wgs-motiv-card[data-scroll-card="active"] .card-cover {
  position: absolute;
  z-index: 1;
  inset: 0 0 0 50%;
  transform-style: preserve-3d;
  transform-origin: left center;
  transform: rotateY(calc(-180deg * var(--open)));
}
.wgs-motiv-card[data-scroll-card="active"] .card-face { position: absolute; inset: 0; backface-visibility: hidden; }
.wgs-motiv-card[data-scroll-card="active"] .card-face--front {
  border-radius: 0 .28rem .28rem 0;
  transform: translateZ(1px);
}
.wgs-motiv-card[data-scroll-card="active"] .card-face--inside {
  display: block;
  border-radius: .28rem 0 0 .28rem;
  transform: rotateY(180deg) translateZ(1px);
  background: linear-gradient(90deg, #fffdfa 84%, #e4dedb);
  box-shadow: -8px 22px 50px #643a3733;
}

@media (max-width: 40rem) and (orientation: portrait) {
  .wgs-motiv-card[data-scroll-card="active"] .card-book { --closed-scale: 1.35; }
  :where(.wgs-motiv-card) .card-note { gap: .65rem; }
}

@media (max-height: 31rem) and (orientation: landscape) {
  :where(.wgs-motiv-card) .card-book { width: min(75vw, 118svh); }
  :where(.wgs-motiv-card) .card-note { padding: .75rem; gap: .5rem; }
  :where(.wgs-motiv-card) .card-note h1 { font-size: clamp(1.1rem, 5svh, 1.6rem); }
  :where(.wgs-motiv-card) .card-note p { font-size: clamp(.8rem, 3.7svh, 1rem); }
  :where(.wgs-motiv-card) .card-scene { gap: .9rem; }
}
