/* Ergebnisse → Colours by Danis — seit 20.11.2026 die ganze Referenz in einem Band (der weiße Teil mit
   Gutschein-/Reservierungskarten ist raus, Johns Ansage); Nutzen steht als kurzer Text unter dem Laptop-Video.
   Randloses Band im Creme der Instagram-Beiträge (#fdf9f1), dahinter die zwei Grafiken
   aus der Kampagne: das bunte Farbband oben rechts in der Ecke (wie Beitrag 3) und die
   goldene Welle hinter dem Fächer (wie im Laptop-Video, multipliziert). Johns Ansage 20.11.2026.
   Material: projects/colours_instagram/ · Skript: js/colours-insta.js */

.ci {
  --ci-grund: #fdf9f1;
  --ci-gold: #b48b50;
  --ci-tinte: #241811;
  --ci-leise: rgba(36, 24, 17, .72);
  position: relative;
  width: 100vw;
  margin: clamp(64px, 9vw, 120px) 0 0 calc(50% - 50vw);
  padding: clamp(64px, 8vw, 112px) 0 clamp(56px, 7vw, 96px);
  background: var(--ci-grund);
  color: var(--ci-tinte);
  overflow: hidden;
  isolation: isolate;
}

/* Farbband oben rechts in der Ecke — die Grafik ist so gezeichnet, dass das Band oben herein-
   und rechts hinausläuft. Darum bündig an die Ecke (top/right 0), nicht weiter hinausgeschoben:
   vorher stand sie bis zu 90 px über dem Rand und war am Handy zu einem Drittel abgeschnitten
   (Johns Ansage 23.11.2026: „größer, da ist ja die Hälfte abgehackt“). */
.ci::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  width: var(--ci-band);
  aspect-ratio: 1;
  background: url(../img/ergebnisse/colours-insta/band.svg) center / contain no-repeat;
  pointer-events: none;
}
.ci { --ci-band: clamp(300px, 30vw, 500px); }
/* Schmal: Die Überschrift ist dann so breit, dass das Band über dem Text läge. Darum rückt der
   Text unter das Band (Abstand oben = 90 % der Bandhöhe, so tief reicht die unterste Schlaufe). */
@media (max-width: 1100px) {
  .ci { --ci-band: clamp(190px, 30vw, 280px); padding-top: calc(var(--ci-band) * .9); }
}

.ci-kopf {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}
.ci-auge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ci-gold);
}
.ci-auge::before,
.ci-auge::after { content: ""; width: 36px; height: 1px; background: currentColor; opacity: .6; }

.ci .ci-h {
  margin: 18px 0 18px;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -.02em;
  color: var(--ci-tinte);
  text-wrap: balance;
}
.ci .ci-h { margin-bottom: 14px; }
.ci .ci-h span { display: block; }
.ci .ci-h .ci-gold { color: var(--ci-gold); }
@media (min-width: 900px) { .ci .ci-h span { white-space: nowrap; } }
.ci-kopf p {
  margin: 0 auto;
  max-width: 600px;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--ci-leise);
}

/* ---------- Fächer: 4 Karussell-Bilder + Video in der Mitte ----------
   Endlage steht in --r/--y je Karte. Vor dem Einblenden liegen alle Karten
   gestapelt hinter der Mitte (--sx) und fächern dann auf (Klasse .ci-offen, js). */
.ci-faecher {
  --ci-b: clamp(150px, 15vw, 220px);     /* Breite der Seitenkarten */
  --ci-m: clamp(230px, 24vw, 340px);     /* Breite der Mitte */
  margin-top: clamp(48px, 6vw, 80px);
  padding: 0 20px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(10px, 1.6vw, 24px);
  position: relative;
}
/* Goldene Welle hinter dem Fächer. Bild hat weißen Grund → multiply, dann bleibt nur das Gold.
   Kein z-index/isolation auf .ci-faecher, sonst mischt die Welle nicht mehr mit dem Creme von .ci. */
.ci-faecher::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: max(1150px, 100vw);
  aspect-ratio: 1800 / 1005;
  transform: translate(-50%, -44%);
  background: url(../img/ergebnisse/colours-insta/welle.webp) center / contain no-repeat;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.ci-karte {
  margin: 0;
  flex: none;
  width: var(--ci-b);
  transform: translateY(var(--y, 0)) rotate(var(--r, 0deg));
  transition: transform 1s cubic-bezier(.16, 1, .3, 1) var(--d, 0s), opacity .5s ease var(--d, 0s);
}
.ci-k1 { --r: -9deg; --y: 52px; --sx: 210%; --d: .12s; z-index: 1; }
.ci-k2 { --r: -4deg; --y: 16px; --sx: 105%; --d: .04s; z-index: 2; }
.ci-k3 { --r: 4deg;  --y: 16px; --sx: -105%; --d: .04s; z-index: 2; }
.ci-k4 { --r: 9deg;  --y: 52px; --sx: -210%; --d: .12s; z-index: 1; }
.ci-mitte { width: var(--ci-m); z-index: 3; }

.ci-js:not(.ci-offen) .ci-karte:not(.ci-mitte) {
  transform: translateX(var(--sx)) translateY(40px) rotate(0deg) scale(.9);
  opacity: 0;
}
.ci-js:not(.ci-offen) .ci-mitte { transform: translateY(24px) scale(.96); }

.ci-bild {
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  background: #efe7da;
  box-shadow: 0 0 0 1px rgba(36, 24, 17, .08), 0 24px 48px -20px rgba(36, 24, 17, .45);
  transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}
.ci-bild img, .ci-video { display: block; width: 100%; height: 100%; object-fit: cover; }
.ci-mitte .ci-bild { border-radius: 16px; box-shadow: 0 0 0 1px rgba(36, 24, 17, .1), 0 40px 80px -28px rgba(36, 24, 17, .55); }
@media (hover: hover) {
  .ci-karte:hover .ci-bild { transform: translateY(-10px) scale(1.02); }
}
.ci-bild:focus-visible { outline: 2px solid var(--ci-gold); outline-offset: 4px; }
.er-zoom.ci-bild img { transition: none; }
@media (hover: hover) { .er-zoom.ci-bild:hover img { transform: none; } }

.ci-mitte figcaption {
  display: table;
  margin: 18px auto 0;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(180, 139, 80, .5);
  background: var(--ci-grund);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ci-gold);
}

/* Nutzen von Gutscheinen und Reservierung, unter dem Bild „Tische reservieren und Gutscheine kaufen“ (rechts
   neben der Mitte). So breit wie die Karte (breiter ragt er links unter die Mitte), Stil wie der Satz links;
   die Karte ist gedreht, der Text steht gerade. */
.ci-nutzen {
  margin: 18px -6px 0;
  transform: rotate(calc(var(--r, 0deg) * -1));
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--ci-grund);
  font-size: .82rem;
  line-height: 1.45;
  text-align: center;
  color: var(--ci-leise);
}
.ci-nutzen b { font-weight: 600; color: var(--ci-tinte); }
@media (max-width: 760px) {
  .ci-nutzen { margin-top: 16px; }
}

/* Satz unter dem Zeichnungs-Video (links) */
.ci-k1 figcaption {
  margin: 18px -6px 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--ci-grund);
  transform: rotate(calc(var(--r, 0deg) * -1));   /* Karte ist gedreht, der Satz steht gerade */
  font-size: .82rem;
  line-height: 1.45;
  text-align: center;
  color: var(--ci-leise);
}

/* Tablet/Handy: Video oben, darunter die vier Bilder im 2er-Raster */
@media (max-width: 760px) {
  .ci-faecher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
  }
  .ci-karte { width: auto; align-self: start; }   /* oben bündig: die Texte unter den linken Karten machen die Reihe höher, rechts entstand sonst oben eine Lücke (John) */
  .ci-mitte { grid-column: 1 / -1; order: -1; width: min(300px, 78vw); justify-self: center; margin-bottom: 18px; }
  .ci-k1 { --r: -2deg; --y: 0px; --sx: 0; }
  .ci-k2 { --r: 2deg;  --y: 0px; --sx: 0; }
  .ci-k3 { --r: -2deg; --y: 0px; --sx: 0; }
  .ci-k4 { --r: 2deg;  --y: 0px; --sx: 0; }
  .ci-js:not(.ci-offen) .ci-karte:not(.ci-mitte) { transform: translateY(32px) scale(.96); }
}

/* ---------- Unter dem Fächer: Logo + Link zur Live-Seite ---------- */
.ci-fuss {
  margin: clamp(40px, 5vw, 64px) auto 0;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
}
.ci-logo { display: block; width: clamp(84px, 8vw, 106px); height: auto; }
.ci-live {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 18px;
  padding: 16px 22px 16px 26px;
  border-radius: 999px;
  background: #130a09;
  color: #f4ebdc;
  text-decoration: none;
  box-shadow: 0 18px 36px -18px rgba(36, 24, 17, .55);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1), box-shadow .25s ease;
}
.ci-live span { grid-column: 1; font-weight: 600; font-size: 1rem; line-height: 1.25; }
.ci-live small { grid-column: 1; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #d9b278; margin-top: 3px; }
.ci-live svg {
  grid-column: 2; grid-row: 1 / 3;
  width: 40px; height: 40px; padding: 10px;
  border-radius: 50%;
  background: #d9b278; color: #130a09;
  transition: transform .25s cubic-bezier(.16, 1, .3, 1);
}
@media (hover: hover) {
  .ci-live:hover { transform: translateY(-2px); box-shadow: 0 24px 44px -18px rgba(36, 24, 17, .6); }
  .ci-live:hover svg { transform: translate(2px, -2px); }
}
.ci-live:focus-visible { outline: 2px solid var(--ci-gold); outline-offset: 4px; }
@media (max-width: 560px) {
  .ci-fuss { flex-direction: column; gap: 18px; }
  .ci-live { padding: 14px 16px 14px 22px; }
  .ci-live span { font-size: .95rem; }
}

/* Bewegung reduziert: Karten stehen sofort in der Endlage, Video nur auf Knopfdruck */
@media (prefers-reduced-motion: reduce) {
  .ci-karte, .ci-bild { transition: none; }
  .ci-js:not(.ci-offen) .ci-karte:not(.ci-mitte),
  .ci-js:not(.ci-offen) .ci-mitte { transform: translateY(var(--y, 0)) rotate(var(--r, 0deg)); opacity: 1; }
}
