/* ==========================================================================
   Bewegte Artikel-Module: Story im Instagram-Stil und Etiketten-Check.
   ========================================================================== */

/* --- Story --------------------------------------------------------------- */
.c-story { margin: clamp(28px, 4vw, 44px) auto; max-width: 380px; }
.c-story__rahmen {
  position: relative;
  aspect-ratio: 9 / 15;
  border-radius: 22px;
  overflow: hidden;
  background: #1C4448;
  box-shadow: 0 18px 40px rgba(28, 68, 72, 0.22), 0 2px 6px rgba(28, 68, 72, 0.12);
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.c-story__balken { position: absolute; z-index: 4; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; }
.c-story__strich { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.38); overflow: hidden; }
.c-story__strich i { display: block; height: 100%; width: 0; background: #FFFFFF; }
.c-story__strich.is-fertig i { width: 100%; }

.c-story__kopf { position: absolute; z-index: 4; top: 22px; left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; color: #FFFFFF; font-size: 13px; line-height: 1.2; }
.c-story__avatar { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #FFFDF8; color: #5A6631; font-family: var(--f-display); font-weight: var(--w-bold); font-size: 10px; letter-spacing: 0.04em; box-shadow: 0 0 0 2px #E99A32; }
.c-story__name { font-weight: 700; white-space: nowrap; }
.c-story__zeit { opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-story__pause { margin-left: auto; position: relative; z-index: 5; width: 30px; height: 30px; border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer; }
.c-story__pause span { display: block; width: 10px; height: 12px; margin: 0 auto; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.c-story.is-pausiert .c-story__pause span { width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent currentColor; }

/* Kopfzeile auf hellen Folien dunkel */
.c-story[data-hell="1"] .c-story__kopf { color: #1E2A27; }
.c-story[data-hell="1"] .c-story__strich { background: rgba(30, 42, 39, 0.18); }
.c-story[data-hell="1"] .c-story__strich i { background: #1E2A27; }

.c-story__folien { position: absolute; inset: 0; }
.c-story__folie { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 72px 26px 34px; opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0s linear 0.35s; color: #FFFFFF; }
.c-story__folie.is-aktiv { opacity: 1; visibility: visible; transition: opacity 0.35s ease; }

.c-story__folie--flug { background: radial-gradient(120% 80% at 50% 30%, #FFFDF8 0%, #F3EEDF 60%, #E8DFC6 100%); color: #1E2A27; }
.c-story__folie--zahl { background: linear-gradient(160deg, #24575C 0%, #1C4448 55%, #12302F 100%); }
.c-story__folie--punkte { background: #FFF6E8; color: #1E2A27; justify-content: center; }
.c-story__folie--balken { background: linear-gradient(160deg, #6B7A3B 0%, #5A6631 60%, #46501F 100%); justify-content: center; }
.c-story__folie--schluss { background: linear-gradient(180deg, #1C4448 0%, #12302F 100%); justify-content: center; }

.c-story__text { position: relative; z-index: 2; }
.c-story__kicker { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #8A5416; }
.c-story__titel { margin: 0; font-family: var(--f-display); font-weight: var(--w-bold); font-size: clamp(30px, 8.5vw, 38px); line-height: 1.05; letter-spacing: -0.01em; }
.c-story__satz { margin: 12px 0 0; font-size: 17px; line-height: 1.45; opacity: 0.92; }
.c-story__satz--stark { font-family: var(--f-display); font-weight: var(--w-bold); font-size: 22px; opacity: 1; }
.c-story__quelle { margin: 18px 0 0; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.6; }
.c-story__riesig { margin: 0; font-family: var(--f-display); font-weight: var(--w-bold); font-size: clamp(64px, 20vw, 92px); line-height: 0.95; letter-spacing: -0.03em; }
.c-story__riesig--satz { font-size: clamp(38px, 11vw, 50px); line-height: 1.02; }

/* Folie 1: Waffeln fliegen ein */
.c-story__flug { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.c-story__waffel { position: absolute; height: auto; filter: drop-shadow(0 14px 18px rgba(80, 60, 30, 0.28)); opacity: 0; }
.c-story__waffel--1 { width: 74%; left: 13%; top: 20%; transform: translate(0, -140%) rotate(-25deg); }
.c-story__waffel--2 { width: 40%; left: 5%; top: 11%; transform: translate(-140%, 0) rotate(40deg) scaleX(-1); }
.c-story__waffel--3 { width: 38%; right: 5%; top: 40%; transform: translate(150%, 20%) rotate(-50deg); }
.c-story__folie--flug.is-aktiv .c-story__waffel { animation: c-story-flug 0.9s cubic-bezier(0.2, 0.9, 0.25, 1.15) forwards; }
.c-story__folie--flug.is-aktiv .c-story__waffel--2 { animation-delay: 0.25s; }
.c-story__folie--flug.is-aktiv .c-story__waffel--3 { animation-delay: 0.45s; }
@keyframes c-story-flug { to { opacity: 1; transform: var(--ziel, translate(0, 0) rotate(0deg)); } }
.c-story__waffel--1 { --ziel: translate(0, 0) rotate(-4deg); }
.c-story__waffel--2 { --ziel: translate(0, 0) rotate(14deg) scaleX(-1); }
.c-story__waffel--3 { --ziel: translate(0, 0) rotate(-12deg); }
.c-story__folie--flug.is-aktiv .c-story__flug { animation: c-story-schweben 4s ease-in-out 1.2s infinite alternate; }
@keyframes c-story-schweben { to { transform: translateY(-8px); } }

/* Texte gleiten nach */
.c-story__folie .c-story__text > * { opacity: 0; transform: translateY(14px); }
.c-story__folie.is-aktiv .c-story__text > * { animation: c-story-rein 0.5s ease forwards; }
.c-story__folie.is-aktiv .c-story__text > *:nth-child(2) { animation-delay: 0.12s; }
.c-story__folie.is-aktiv .c-story__text > *:nth-child(3) { animation-delay: 0.24s; }
.c-story__folie.is-aktiv .c-story__text > *:nth-child(4) { animation-delay: 0.36s; }
.c-story__folie--flug.is-aktiv .c-story__text > * { animation-delay: 0.7s; }
.c-story__folie--flug.is-aktiv .c-story__text > *:nth-child(2) { animation-delay: 0.82s; }
.c-story__folie--flug.is-aktiv .c-story__text > *:nth-child(3) { animation-delay: 0.94s; }
@keyframes c-story-rein { to { opacity: 1; transform: none; } }

/* Folie 3: 18 Punkte, 7 werden rot */
.c-story__punkte { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 0 0 26px; max-width: 280px; }
.c-story__punkt { aspect-ratio: 1; border-radius: 50%; background: #E2DCC8; transform: scale(0.6); transition: transform 0.35s ease, background-color 0.35s ease; }
.c-story__folie.is-aktiv .c-story__punkt { transform: scale(1); transition-delay: calc(var(--k) * 30ms); }
.c-story__folie.is-aktiv .c-story__punkt.is-rot { background: #C2410C; box-shadow: 0 0 0 4px rgba(194, 65, 12, 0.15); transition-delay: calc(700ms + var(--k) * 160ms); }
.c-story__folie--punkte .c-story__riesig { color: #C2410C; }

/* Folie 4: Balken */
.c-story__balkenliste { display: grid; gap: 18px; margin: 26px 0 0; }
.c-story__wertname { margin: 0 0 6px; font-size: 14px; font-weight: 700; letter-spacing: 0.04em; opacity: 0.9; }
.c-story__wertbalken { display: block; height: 22px; border-radius: 11px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.c-story__wertbalken i { display: block; height: 100%; width: 0; border-radius: 11px; background: #FFFDF8; transition: width 1s cubic-bezier(0.3, 0.8, 0.3, 1); }
.c-story__wert:nth-child(2) .c-story__wertbalken i { background: #E99A32; }
.c-story__folie.is-aktiv .c-story__wertbalken i { width: var(--w); transition-delay: calc(400ms + var(--k) * 500ms); }
.c-story__wertzahl { margin: 6px 0 0; font-family: var(--f-display); font-weight: var(--w-bold); font-size: 24px; }

/* Folie 5 */
.c-story__aktionen { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }
.c-story__knopf { position: relative; z-index: 5; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 22px; border: 0; background: #E99A32; color: #1E2A27; font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; }
.c-story .c-story__knopf, .c-story .c-story__knopf:hover { text-decoration: none; border-bottom: 0; color: #1E2A27; }
.c-story .c-story__knopf--leise, .c-story .c-story__knopf--leise:hover { color: #FFFFFF; }
.c-story__knopf--leise { background: transparent; color: #FFFFFF; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.6); }

/* Tippflaechen */
.c-story__tipp { position: absolute; z-index: 3; top: 60px; bottom: 0; border: 0; padding: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.c-story__tipp--zurueck { left: 0; width: 33%; }
.c-story__tipp--weiter { right: 0; width: 67%; }
.c-story__tipp:focus-visible { outline: 3px solid #E99A32; outline-offset: -3px; }
.c-story__folie--schluss.is-aktiv .c-story__text { z-index: 6; }

.c-story__hinweis { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--c-ink-muted); }

@media (max-width: 26rem) { .c-story__zeit { display: none; } }

/* --- Etiketten-Check ----------------------------------------------------- */
.c-etiketten { margin: clamp(24px, 3.5vw, 40px) 0; }
.c-etiketten__titel { margin: 0 0 14px; font-family: var(--f-display); font-weight: var(--w-bold); font-size: clamp(20px, 2.2vw, 24px); line-height: 1.2; color: var(--c-ink); }
.c-etiketten__liste { display: grid; gap: 14px; }
@media (min-width: 40rem) { .c-etiketten__liste { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }

.c-etikett {
  position: relative;
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid #E2DFD4;
  box-shadow: 0 6px 18px rgba(38, 48, 43, 0.07);
  opacity: 0;
  transform: translateY(46px) rotate(calc(var(--r, -3deg)));
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.2, 0.9, 0.25, 1.1);
  transition-delay: calc(var(--i) * 150ms);
}
.c-etikett:nth-child(even) { --r: 3deg; }
.c-etiketten.is-sichtbar .c-etikett { opacity: 1; transform: none; }
.c-etikett::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--farbe); }
.c-etikett--gruen { --farbe: #5A6631; --hell: #E8ECD9; }
.c-etikett--gelb { --farbe: #B7791F; --hell: #FDF0D5; }
.c-etikett--rot { --farbe: #C2410C; --hell: #FCE5DA; }

.c-etikett__name { margin: 0; font-family: var(--f-display); font-weight: var(--w-bold); font-size: 18px; color: var(--c-ink); }
.c-etikett__zutaten { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: #F6F4EC; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 13px; line-height: 1.6; color: #3B4541; }
.c-etikett__zutaten mark {
  color: inherit;
  padding: 0 2px;
  background-image: linear-gradient(transparent 55%, var(--hell) 55%);
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition: background-size 0.6s ease;
  transition-delay: calc(500ms + var(--i) * 150ms);
  font-weight: 700;
}
.c-etiketten.is-sichtbar .c-etikett__zutaten mark { background-size: 100% 100%; }
.c-etikett--gruen .c-etikett__zutaten mark { --hell: #D6DEB4; }
.c-etikett--gelb .c-etikett__zutaten mark { --hell: #F8DC9B; }
.c-etikett--rot .c-etikett__zutaten mark { --hell: #F6C3AA; }

.c-etikett__urteil { margin: 12px 0 0; }
.c-etikett__urteil span { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--hell); color: var(--farbe); font-size: 13px; font-weight: 700; letter-spacing: 0.02em; }
.c-etikett__text { margin: 8px 0 0; font-size: 15.5px; line-height: 1.55; color: var(--c-ink-soft); }
.c-etiketten__hinweis { margin: 12px 0 0; font-size: 13px; color: var(--c-ink-muted); }

/* --- Weniger Bewegung ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .c-story *, .c-etikett, .c-etikett__zutaten mark { animation: none !important; transition: none !important; }
  .c-story__waffel { opacity: 1; transform: var(--ziel); }
  .c-story__folie .c-story__text > * { opacity: 1; transform: none; }
  .c-story__punkt { transform: none; }
  .c-story__punkt.is-rot { background: #C2410C; }
  .c-story__wertbalken i { width: var(--w); }
  .c-etikett { opacity: 1; transform: none; }
  .c-etikett__zutaten mark { background-size: 100% 100%; }
}
