.flyer-hero {
  position: relative;
  min-height: clamp(500px, 66vh, 700px);
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background: var(--wine-dark);
}

.flyer-hero__media,
.flyer-hero__overlay {
  position: absolute;
  inset: 0;
}

.flyer-hero__media {
  background-image: url("assets/flyer/vorsorge-hero.jpg");
  background-repeat: no-repeat;
  background-size: 400% 100%;
  background-position: 100% 50%;
  transform: scale(1.035);
}

.flyer-hero__overlay {
  background:
    linear-gradient(90deg, rgba(47,19,29,.94) 0%, rgba(68,26,42,.82) 38%, rgba(53,24,34,.36) 72%, rgba(40,18,26,.24) 100%),
    linear-gradient(0deg, rgba(30,12,19,.28), transparent 52%);
}

.flyer-hero__content {
  position: relative;
  z-index: 1;
  padding-block: 6rem;
}

.flyer-hero h1 {
  max-width: 850px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.7rem, 8vw, 7.4rem);
  font-weight: 400;
  letter-spacing: -.05em;
  line-height: .95;
}

.flyer-hero__content > p:not(.eyebrow) {
  max-width: 640px;
  margin: 1.6rem 0 0;
  color: rgba(255,255,255,.86);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.flyer-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 2.2rem;
}

.flyer-reader {
  padding-top: 110px;
  background:
    radial-gradient(circle at 14% 18%, rgba(111,47,69,.055), transparent 30%),
    var(--paper);
}

.flyer-reader__intro {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: end;
  margin-bottom: 3.2rem;
}

.flyer-reader__intro h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5.4vw, 5rem);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1;
}

.flyer-reader__intro > p {
  margin: 0 0 .45rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.flyer-app {
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgba(111,47,69,.12);
  border-radius: 22px;
  background: #f0eae4;
  box-shadow: 0 26px 70px rgba(66,37,46,.13);
}

.flyer-app__topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding: .3rem .3rem 1.7rem;
}

.flyer-step-copy {
  max-width: 680px;
}

.flyer-step-copy span,
.flyer-dialog__header span {
  display: block;
  color: var(--wine);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.flyer-step-copy strong {
  display: block;
  margin-top: .2rem;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.7vw, 2.25rem);
  font-weight: 400;
  line-height: 1.15;
}

.flyer-step-copy p {
  margin: .35rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.flyer-app__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .55rem;
}

.flyer-tool-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .55rem .8rem;
  border: 1px solid rgba(111,47,69,.2);
  border-radius: 8px;
  color: var(--wine);
  background: rgba(255,255,255,.62);
  font-size: .8rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.flyer-tool-button:hover,
.flyer-tool-button:focus-visible {
  border-color: rgba(111,47,69,.5);
  background: #fff;
  transform: translateY(-1px);
}

.flyer-tool-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Buchansicht: Zu jeder Zeit sind höchstens zwei Seiten sichtbar. */
.flyer-stage {
  position: relative;
  width: 100%;
  margin-inline: auto;
  padding: clamp(.85rem, 2.5vw, 1.8rem);
  overflow: hidden;
  border-radius: 12px;
  outline: none;
  perspective: 1800px;
  background:
    radial-gradient(ellipse at center, rgba(255,255,255,.5), transparent 62%),
    linear-gradient(145deg, rgba(91,52,64,.16), rgba(91,52,64,.08));
  box-shadow: 0 24px 58px rgba(45,25,32,.2);
  touch-action: pan-y;
}

.flyer-stage:focus-visible {
  box-shadow: 0 0 0 4px rgba(111,47,69,.22), 0 24px 58px rgba(45,25,32,.23);
}

.flyer-book {
  position: relative;
  width: min(100%, 820px);
  margin-inline: auto;
  aspect-ratio: 5586 / 5956;
  transform-style: preserve-3d;
  isolation: isolate;
  contain: layout paint style;
}

.flyer-book::before {
  content: "";
  position: absolute;
  inset: .6% .4% -.8%;
  z-index: -2;
  border-radius: 7px;
  background: #d8cdc5;
  box-shadow: 0 22px 30px rgba(43,24,31,.24), 0 8px 12px rgba(43,24,31,.12);
}

.flyer-book::after {
  content: "";
  position: absolute;
  inset: 1.2% 1% -1.4%;
  z-index: -3;
  border-radius: 8px;
  background: rgba(57,29,38,.16);
  filter: blur(14px);
}

.flyer-book__page {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background-color: #fff;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  cursor: zoom-in;
  backface-visibility: hidden;
  transform: translateZ(0);
  transition: filter .18s ease, outline-color .18s ease;
}

.flyer-book__page--left {
  left: 0;
  border-radius: 6px 1px 1px 6px;
  box-shadow: inset -16px 0 22px -19px rgba(39,18,26,.68), inset 1px 0 rgba(255,255,255,.55);
}

.flyer-book__page--right {
  right: 0;
  border-radius: 1px 6px 6px 1px;
  box-shadow: inset 16px 0 22px -19px rgba(39,18,26,.68), inset -1px 0 rgba(61,29,40,.12);
}

.flyer-book__page[hidden] { display: none; }

.flyer-book:not(.is-turning) .flyer-book__page:hover,
.flyer-book:not(.is-turning) .flyer-book__page:focus-visible {
  z-index: 5;
  filter: brightness(1.025);
  outline: 3px solid rgba(111,47,69,.62);
  outline-offset: -3px;
}

.flyer-book__page::after {
  content: "+";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(75,31,46,.88);
  font-size: 1.2rem;
  line-height: 1;
  box-shadow: 0 5px 18px rgba(30,13,20,.25);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .18s ease, transform .18s ease;
}

.flyer-book:not(.is-turning) .flyer-book__page:hover::after,
.flyer-book:not(.is-turning) .flyer-book__page:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.flyer-book__page-number {
  position: absolute;
  bottom: 9px;
  left: 12px;
  min-width: 24px;
  min-height: 24px;
  display: grid;
  place-items: center;
  padding: .15rem .35rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(75,31,46,.82);
  font-size: .68rem;
  font-weight: 800;
}

.flyer-book__page--left .flyer-book__page-number {
  right: 12px;
  left: auto;
}

.flyer-book__gutter {
  position: absolute;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 22px;
  pointer-events: none;
  transform: translateX(-50%) translateZ(2px);
  background: linear-gradient(90deg, transparent, rgba(40,18,26,.18) 44%, rgba(255,255,255,.26) 52%, transparent);
  opacity: .8;
}

.flyer-book.is-single-right .flyer-book__gutter,
.flyer-book.is-single-left .flyer-book__gutter { opacity: .25; }

/* Die drehende Seite besteht aus Vorder- und Rückseite. Es werden nur
   GPU-freundliche Transform-Eigenschaften animiert. */
.flyer-book__turn {
  position: absolute;
  z-index: 20;
  top: 0;
  width: 50%;
  height: 100%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform;
  pointer-events: none;
}

.flyer-book__turn[hidden] { display: none; }

.flyer-book__turn-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-color: #fff;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  backface-visibility: hidden;
  transform: translateZ(.1px);
}

.flyer-book__turn-face--front {
  box-shadow: 0 8px 22px rgba(34,17,23,.18), inset -12px 0 18px -18px rgba(39,18,26,.55);
}

.flyer-book__turn-face--back {
  transform: rotateY(180deg) translateZ(.1px);
  box-shadow: 0 8px 22px rgba(34,17,23,.16), inset 12px 0 18px -18px rgba(39,18,26,.55);
}

.flyer-book__turn.is-forward,
.flyer-book__turn.is-forward .flyer-book__turn-face {
  border-radius: 1px 6px 6px 1px;
}

.flyer-book__turn.is-backward,
.flyer-book__turn.is-backward .flyer-book__turn-face {
  border-radius: 6px 1px 1px 6px;
}

.flyer-book.is-turning .flyer-book__page {
  pointer-events: none;
}

.flyer-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  margin: 1.35rem auto .6rem;
  color: #71676a;
  font-size: .82rem;
  text-align: center;
}

.flyer-hint svg {
  flex: 0 0 auto;
  width: 18px;
  fill: none;
  stroke: var(--wine);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flyer-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.2rem;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(111,47,69,.14);
}

.flyer-control {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: max-content;
  padding: .7rem 1.25rem;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: var(--wine);
  font-weight: 800;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, opacity .2s ease;
}

.flyer-control:hover,
.flyer-control:focus-visible {
  background: var(--wine-dark);
  transform: translateY(-1px);
}

.flyer-control:disabled {
  opacity: .34;
  cursor: not-allowed;
  transform: none;
}

.flyer-control svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flyer-control--back { justify-self: start; }
.flyer-control--next { justify-self: end; }

.flyer-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
}

.flyer-progress button {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 1px solid rgba(111,47,69,.38);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: width .2s ease, border-radius .2s ease, background .2s ease;
}

.flyer-progress button.is-active {
  width: 30px;
  border-radius: 10px;
  background: var(--wine);
}

.flyer-download {
  padding: 90px 0;
  color: #fff;
  background: var(--wine);
}

.flyer-download__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
}

.flyer-download h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 5vw, 4.7rem);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: 1;
}

.flyer-download p:not(.kicker) {
  max-width: 620px;
  margin: 1.2rem 0 0;
  color: rgba(255,255,255,.78);
}

.flyer-download__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .8rem;
}

.flyer-noscript {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid rgba(111,47,69,.18);
  background: #fff;
}

.flyer-dialog {
  width: min(96vw, 1040px);
  max-height: 96vh;
  padding: 1rem;
  overflow: auto;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  background: #eee7e1;
  box-shadow: 0 35px 100px rgba(30,14,20,.42);
}

.flyer-dialog::backdrop {
  background: rgba(29,15,20,.78);
  backdrop-filter: blur(5px);
}

.flyer-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.flyer-dialog__header h2 {
  margin: .1rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 400;
}

.flyer-dialog__close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(111,47,69,.18);
  border-radius: 50%;
  color: var(--wine);
  background: #fff;
  cursor: pointer;
}

.flyer-dialog__close svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.flyer-dialog__panel {
  width: min(88vw, calc(76vh * .4691));
  margin-inline: auto;
  aspect-ratio: 2793 / 5956;
  border-radius: 3px;
  background-color: #fff;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  box-shadow: 0 18px 46px rgba(35,18,24,.22);
}

.flyer-dialog__controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
}

.flyer-dialog__controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 44px;
  width: max-content;
  padding: .55rem .8rem;
  border: 1px solid rgba(111,47,69,.2);
  border-radius: 7px;
  color: var(--wine);
  background: #fff;
  font-weight: 750;
  cursor: pointer;
}

.flyer-dialog__controls button:last-child { justify-self: end; }
.flyer-dialog__controls span { color: var(--muted); font-size: .82rem; font-weight: 750; }
.flyer-dialog__controls svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.no-js .flyer-app { display: none; }

@media (max-width: 900px) {
  .flyer-reader__intro,
  .flyer-download__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .flyer-download__actions { justify-content: flex-start; }
  .flyer-app__topbar { flex-direction: column; }
  .flyer-app__actions { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .flyer-hero { min-height: 550px; }
  .flyer-hero__media { background-position: 97% 50%; }
  .flyer-hero__content { padding-block: 4.8rem; }
  .flyer-hero h1 { font-size: clamp(3.4rem, 17vw, 5rem); }
  .flyer-reader { padding-top: 78px; }
  .flyer-reader__intro { margin-bottom: 2rem; }
  .flyer-app { margin-inline: -12px; padding: 1rem; border-radius: 14px; }
  .flyer-app__topbar { gap: 1.2rem; padding-bottom: 1.2rem; }
  .flyer-app__actions { width: 100%; }
  .flyer-tool-button { flex: 1 1 auto; }
  .flyer-stage { padding: .65rem; border-radius: 9px; }
  .flyer-book { width: 100%; }
  .flyer-book__page::after { opacity: 1; transform: none; width: 27px; height: 27px; right: 7px; bottom: 7px; font-size: 1rem; }
  .flyer-book__page-number { display: none; }
  .flyer-book__gutter { width: 14px; }
  .flyer-hint { align-items: flex-start; text-align: left; }
  .flyer-controls { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .flyer-progress { grid-column: 1 / -1; grid-row: 1; }
  .flyer-control { width: 100%; padding-inline: .8rem; }
  .flyer-control--back { grid-column: 1; grid-row: 2; }
  .flyer-control--next { grid-column: 2; grid-row: 2; }
  .flyer-download { padding: 72px 0; }
  .flyer-download__actions { flex-direction: column; }
  .flyer-download__actions .button { width: 100%; }
  .flyer-dialog { width: 96vw; padding: .75rem; border-radius: 13px; }
  .flyer-dialog__controls { grid-template-columns: 1fr 1fr; }
  .flyer-dialog__controls span { grid-column: 1 / -1; grid-row: 1; text-align: center; }
  .flyer-dialog__controls button { width: 100%; font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  .flyer-stage,
  .flyer-book,
  .flyer-book__page,
  .flyer-book__turn,
  .flyer-tool-button,
  .flyer-control { transition: none !important; animation: none !important; }
}
