/* CRUDO Projektseite: helle Kacheln für Grafiken im normalen Galerie-Raster (in beiden Themes hell, die Grafiken sind schwarz) */
.project-gallery__item.crudo-tile { background: #f2f2f2; }
.project-gallery__item.crudo-tile--gfx img { object-fit: contain; inset: 8%; width: 84%; height: 84%; }
.project-gallery__item.crudo-tile--okt img { object-fit: contain; inset: 0 20%; width: 60%; height: 100%; }
.project-gallery__item.crudo-tile--wm .crudo-wm { position: absolute; inset: 0; }

/* Wortmarke mit Raster: Endzustand ist der Normalzustand, .is-run spielt den Aufbau */
.crudo-wm { display: block; width: 100%; height: 100%; }
.crudo-wm__lines path { stroke-width: 1.1; stroke-dasharray: 2 4; }
.crudo-wm__points circle { transform-box: fill-box; transform-origin: center; }
.is-run .crudo-wm__shape { animation: crudo-wm-shape 1.08s cubic-bezier(0.33, 1, 0.68, 1) 3s both; }
.is-run .crudo-wm__lines path { animation: crudo-wm-line 1.5s cubic-bezier(0.33, 1, 0.68, 1) var(--d) both; }
.is-run .crudo-wm__points circle { animation: crudo-wm-point 0.36s cubic-bezier(0.34, 1.56, 0.64, 1) var(--d) both; }
@keyframes crudo-wm-shape { from { opacity: 0; } to { opacity: 1; } }
@keyframes crudo-wm-line { from { stroke-dasharray: 0 4; stroke-dashoffset: -1; } to { stroke-dasharray: 2 4; stroke-dashoffset: 0; } }
@keyframes crudo-wm-point { from { transform: scale(0); } to { transform: scale(1); } }

@media (max-width: 809px) {
  .project-gallery__item.crudo-tile--wm { aspect-ratio: 1 / 1; height: auto; }
  .project-gallery__item.crudo-tile--okt { aspect-ratio: 4 / 3; height: auto; }
  .project-gallery__item.crudo-tile--okt img { inset: 0 8%; width: 84%; }
  .crudo-wm__lines path { stroke-width: 2.4; }
  .crudo-wm__points circle { r: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .is-run .crudo-wm__shape, .is-run .crudo-wm__lines path, .is-run .crudo-wm__points circle { animation: none; }
}

/* Speise- und Weinkarten: weiße Seite liegt auf der hellen Kachel */
.project-gallery__item.crudo-tile--karte img {
  object-fit: contain;
  inset: 7% 0;
  width: 100%;
  height: 86%;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}

/* Karten mit Scroll-Animation: Fächer (menu-fan) und Weinkarten-Hefte im CRUDO-Look */
.crudo-backdrop { background: #f2f2f2; }
.menu-fan .menu-fan__card { background: #fff; }

/* ---------- Weinkarten: Heft (Desktop) und drehendes Blatt (Telefon), wie auf crudomuc.de ---------- */
.crudo-book { position: relative; background: #f2f2f2; overflow-x: clip; }
.cbook { position: relative; }
.cbook__stage {
  --top: 96px;
  --bottom: max(2rem, 8vh);
  --ph: min(var(--stage-h, 100vh) - var(--top) - var(--bottom), 44vw * 1697 / 1200, 62rem);
  position: sticky; top: 0; height: var(--stage-h, 100vh);
  display: flex; align-items: center; justify-content: center; padding: var(--top) 0 var(--bottom);
  perspective: 3200px;
  perspective-origin: 50% calc(var(--top) + (var(--stage-h, 100vh) - var(--top) - var(--bottom)) / 2);
}
.cbook__slot { position: relative; height: var(--ph); aspect-ratio: 1200 / 1697; transform-style: preserve-3d; }
.cbook__book, .cbook__leaf, .cbook__face { position: absolute; inset: 0; transform-style: preserve-3d; }
.cbook__book { will-change: transform; }
.cbook__leaf { transform-origin: left center; will-change: transform; }
.cbook__face { overflow: hidden; background: #fff; backface-visibility: hidden; -webkit-backface-visibility: hidden; transform-style: flat; isolation: isolate; }
.cbook__face--back { transform: rotateY(180deg); }
.cbook__face img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
/* Ungestrichenes Papier: Die Farbe zieht ins Papier, Schwarz wird etwas weicher */
.cbook__face img.cbook__ink { filter: contrast(.86) brightness(1.075); mix-blend-mode: multiply; }
.cbook__face::before { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; background-size: 100% 100%, 100% 100%; }
.cbook__shade { position: absolute; inset: 0; pointer-events: none; opacity: 0; will-change: opacity; }
/* Falz: dunkle Kante an der Bindung, dann ein langer, kaum sichtbarer Auslauf */
.cbook__face--front::before {
  background-image: linear-gradient(to right,
    rgb(0 0 0 / .30) 0%, rgb(0 0 0 / .17) .6%, rgb(0 0 0 / .09) 1.8%, rgb(0 0 0 / .05) 4%,
    rgb(0 0 0 / .025) 8%, rgb(0 0 0 / .01) 14%, rgb(0 0 0 / 0) 22%), url("../assets/images/projects/crudo-paper-a.webp");
}
.cbook__face--back::before {
  background-image: linear-gradient(to left,
    rgb(0 0 0 / .30) 0%, rgb(0 0 0 / .17) .6%, rgb(0 0 0 / .09) 1.8%, rgb(0 0 0 / .05) 4%,
    rgb(0 0 0 / .025) 8%, rgb(0 0 0 / .01) 14%, rgb(0 0 0 / 0) 22%), url("../assets/images/projects/crudo-paper-b.webp");
}
/* Titel und Rückseite liegen außen: dort nur der leichte Knick am Rücken */
.cbook__leaf:first-child .cbook__face--front::before {
  background-image: linear-gradient(to right, rgb(0 0 0 / .08), rgb(0 0 0 / .02) 1.5%, rgb(0 0 0 / 0) 4%), url("../assets/images/projects/crudo-paper-a.webp");
}
.cbook__leaf:last-child .cbook__face--back::before {
  background-image: linear-gradient(to left, rgb(0 0 0 / .08), rgb(0 0 0 / .02) 1.5%, rgb(0 0 0 / 0) 4%), url("../assets/images/projects/crudo-paper-b.webp");
}
.cbook__face--front .cbook__shade { background: linear-gradient(to right, rgb(0 0 0 / .9), rgb(0 0 0 / .35) 35%, rgb(0 0 0 / .1) 100%); }
.cbook__face--back .cbook__shade { background: linear-gradient(to left, rgb(0 0 0 / .9), rgb(0 0 0 / .35) 35%, rgb(0 0 0 / .1) 100%); }
/* Telefon: ein Blatt, dreht sich um die eigene Mitte, ohne Falz */
.cbook--deck .cbook__stage {
  --top: 104px;
  --bottom: 2.5rem;
  --ph: min(88vw * 1697 / 1200, var(--stage-h, 100svh) - var(--top) - var(--bottom));
  perspective: 2200px;
}
.cbook--deck .cbook__leaf { transform-origin: center; }
.cbook--deck .cbook__leaf .cbook__face--front::before { background-image: url("../assets/images/projects/crudo-paper-a.webp"); background-size: 100% 100%; }
.cbook--deck .cbook__leaf .cbook__face--back::before { background-image: url("../assets/images/projects/crudo-paper-b.webp"); background-size: 100% 100%; }
.cbook--deck .cbook__shade { background: #000; }
/* Ohne Bewegung: einfache Seitenfolge */
.cbook-static { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 48px 16px; }
.cbook-static img { width: min(100%, 420px); height: auto; background: #fff; }
/* Auf der hellen Fläche braucht das Papier eine Kante: feiner Schatten je Blatt */
.cbook__leaf { box-shadow: 0 0 0 1px rgb(0 0 0 / .06); }

/* Website im Gerät: MacBook Pro und iPhone, in CSS gezeichnet. --w ist die Breite des Geräts. */
.project-gallery__item.crudo-device { container-type: size; display: grid; place-items: center; }
.crudo-mac { --w: min(70cqw, 104cqh); width: var(--w); position: relative; }
.crudo-mac__lid { background: #0b0b0c; border-radius: calc(var(--w) * .021) calc(var(--w) * .021) calc(var(--w) * .006) calc(var(--w) * .006); padding: calc(var(--w) * .011) calc(var(--w) * .011) calc(var(--w) * .013); box-shadow: 0 0 0 calc(var(--w) * .0016) #3b3b3f, 0 calc(var(--w) * .03) calc(var(--w) * .06) rgb(0 0 0 / .14); }
.crudo-mac__screen { position: relative; aspect-ratio: 3456 / 2234; background: #000; border-radius: calc(var(--w) * .011) calc(var(--w) * .011) 0 0; overflow: hidden; }
.crudo-mac__screen::before { content: ""; position: absolute; top: calc(var(--w) * .0085); left: 50%; width: calc(var(--w) * .006); aspect-ratio: 1; border-radius: 50%; background: #1b1d24; translate: -50% 0; }
.project-gallery__item .crudo-mac__screen video { inset: auto 0 0 0; height: auto; aspect-ratio: 16 / 10; }
.crudo-mac__base { position: relative; left: -7.5%; width: 115%; height: calc(var(--w) * .017); background: linear-gradient(#55565b, #2c2c30 55%, #1a1a1d); border-radius: calc(var(--w) * .003) calc(var(--w) * .003) calc(var(--w) * .02) calc(var(--w) * .02); }
.crudo-mac__base::before { content: ""; position: absolute; top: 0; left: 50%; width: 14%; height: 42%; translate: -50% 0; background: #18181a; border-radius: 0 0 calc(var(--w) * .01) calc(var(--w) * .01); }
.crudo-phone { --w: min(46cqw, calc(86cqh * 402 / 874)); width: var(--w); padding: calc(var(--w) * .03); background: #0b0b0c; border-radius: calc(var(--w) * .165); box-shadow: 0 0 0 calc(var(--w) * .009) #8a8a8e, 0 0 0 calc(var(--w) * .012) #5d5d61, 0 calc(var(--w) * .08) calc(var(--w) * .16) rgb(0 0 0 / .14); }
.crudo-phone__screen { position: relative; aspect-ratio: 402 / 874; background: #525f44; border-radius: calc(var(--w) * .135); overflow: hidden; }
.crudo-phone__screen::after { content: ""; position: absolute; top: 1.1%; left: 50%; width: 29%; height: 3.7%; translate: -50% 0; background: #000; border-radius: 99px; }

/* Social: Reels „On the Plate“ im Hochformat 9:16 */
.project-gallery__item.crudo-reel { aspect-ratio: 9 / 16; }
@media (max-width: 809px) {
  .project-gallery__row.crudo-reels { display: grid; grid-template-columns: 1fr 1fr; }
}

/* Kleidung: Schürze in der Mitte, Jacke und T-Shirt schieben sich beim Scrollen links und rechts dahinter hervor (js/crudo-kleid.js, Timing wie menu-fan).
   Ohne JS oder bei reduzierter Bewegung steht der Endzustand: alle drei nebeneinander. */
.project-gallery__item.crudo-kleid { display: flex; align-items: center; justify-content: center; gap: 2%; padding: 0 4%; }
.project-gallery__item.crudo-kleid img.crudo-kleid__item {
  position: static; inset: auto; display: block; width: auto; height: auto;
  max-height: 70%; max-width: 34%; min-width: 0; object-fit: contain; flex: 0 1 auto;
  user-select: none; -webkit-user-drag: none; pointer-events: none;
}
.crudo-kleid__item--links { order: 1; }
.crudo-kleid__item--mitte { order: 2; z-index: 2; }
.crudo-kleid__item--rechts { order: 3; }
.project-gallery__item.crudo-kleid.is-fan { display: block; padding: 0; }
.project-gallery__item.crudo-kleid.is-fan img.crudo-kleid__item {
  position: absolute; left: 50%; top: 50%; max-width: none; max-height: none; will-change: transform;
}
.crudo-kleid.is-fan .crudo-kleid__item--links, .crudo-kleid.is-fan .crudo-kleid__item--rechts { z-index: 1; }
@media (max-width: 809px) {
  .project-gallery__item.crudo-kleid { aspect-ratio: 4 / 3; height: auto; }
}

/* Weinkarte als Kachel im Raster (data-book-inline): Bühne so hoch wie die Kachel, nicht mehr sticky */
.crudo-book.crudo-book--inline { overflow: hidden; }
/* Genug Luft oben und unten: Das umschlagende Blatt wird in der Perspektive größer und darf nicht an der Pille abgeschnitten werden */
.crudo-book--inline .cbook__stage { position: relative; top: auto; --top: 80px; --bottom: 80px; }
.crudo-book--inline .cbook--deck .cbook__stage { --top: 48px; --bottom: 48px; }
.crudo-book--inline:has(.cbook-static) { height: auto; aspect-ratio: auto; }

/* Home-Feed: CRUDO-Pillen sehen dort aus wie auf der Projektseite (Klassen kommen aus js/home-feed.js) */
.home-feed__item.crudo-tile--okt img { inset: 0 20%; width: 60%; height: 100%; object-fit: contain; }
.home-feed__item.crudo-device { container-type: size; display: grid; place-items: center; }
.home-feed__item.crudo-device .crudo-phone__screen video,
.home-feed__item.crudo-device .crudo-mac__screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-feed__item.crudo-device .crudo-mac__screen video { inset: auto 0 0 0; height: auto; aspect-ratio: 16 / 10; }
/* Im Gerät nicht in den Bildschirm hineinzoomen, stattdessen das ganze Gerät leicht vergrößern */
.home-feed__item--clone video { transform: none !important; }
.home-feed__item.crudo-device > * { transition: transform var(--ww-motion, 0.6s ease); }
@media (hover: hover) {
  a.home-feed__item.crudo-device:hover > * { transform: scale(1.06); }
}
