/* TH-KARTEN1: THE example card, one look for both places (/arbeiten and the start page section "So kann Ihre Seite
   aussehen."). The markup comes from ONE template (thunten/karten/karten.py, data in karten.json); nothing here may be
   copied into a page. Everything is scoped under .karten, because both pages have their own .mehr, .raster, .unten p and
   .unten h3 rules. The phone in the corner is teile.css's .iphone (both pages link it). The card tilts (neigen.js on the
   card link itself), the big picture grows a little and the phone rises; "Anfragen" sits outside the tilting link and
   never moves (design rule knopf-steht, 14 Nov 2026). transform and opacity only. */
.karten { --k-flaeche: #1C1C1E; --k-flaeche-2: #2C2C2E; --k-leise: #8E8E93; --k-link: #0A84FF; --k-rand: rgba(255,255,255,.08);
  display: grid; grid-template-columns: 1fr; gap: 16px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 880px) { .karten { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; } }
.karten > li { position: relative; border-radius: 28px; }
.karten > li[hidden], .karten .karte[hidden] { display: none; }

.karten .karte { display: block; height: 100%; overflow: hidden; border-radius: 28px; background: var(--k-flaeche); color: #fff; text-decoration: none;
  border: 1px solid var(--k-rand); transition: transform 300ms cubic-bezier(.2,.7,.2,1), background 300ms ease-out; -webkit-tap-highlight-color: transparent; }
.karten .bild { position: relative; display: block; aspect-ratio: 16 / 11; overflow: hidden; background: #111; }
.karten .bild .gross { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transform-origin: 50% 0;
  transition: transform 700ms cubic-bezier(.2,.7,.2,1); }
.karten .bild .handy { position: absolute; z-index: 1; right: 5%; bottom: -16%; width: 22%; transition: transform 700ms cubic-bezier(.2,.7,.2,1); }
.karten .bild::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(transparent, rgba(28,28,30,.55)); pointer-events: none; }
.karten .text { padding: 20px 22px 24px; }
.karten .label { display: inline-block; margin: 0 0 10px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: 13px; line-height: 1.45; color: #AEAEB2; }
.karten .zeile { margin: 0 0 6px; font-size: 14px; line-height: 1.45; color: var(--k-leise); letter-spacing: .01em; }
.karten .titel { margin: 0 0 6px; font-size: clamp(22px, 2.4vw, 26px); font-weight: 500; line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; color: #fff; }
.karten .was { margin: 0; font-size: 17px; line-height: 1.45; color: #C7C7CC; }
.karten .ansehen { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 17px; line-height: 1.45; color: var(--k-link); }
.karten .ansehen svg { width: 14px; height: 14px; transition: transform 300ms ease-out; }

.karten > li:hover .karte.neigen, .karten > li:focus-within .karte, .karten .karte:focus-visible { background: var(--k-flaeche-2); }
.karten > li:hover .gross { transform: scale(1.035); }
.karten > li:hover .handy { transform: translateY(-8%); }
.karten > li:hover .ansehen svg { transform: translate(2px, -2px); }
.karten .karte:focus-visible { outline: 2px solid var(--k-link); outline-offset: 3px; }

/* "Anfragen" on the card's last line, beside "Ansehen", as its own link (a link cannot hold a link). It does not move. */
.karten .anfragen { position: absolute; z-index: 4; right: 14px; bottom: 15px; display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px;
  color: #fff; text-decoration: none; font-size: 15px; line-height: 1.45; -webkit-tap-highlight-color: transparent; }
.karten .anfragen span { padding: 5px 14px; border-radius: 999px; background: var(--k-link); }
.karten .anfragen:active span { opacity: .8; }
.karten .anfragen:focus-visible { outline: 2px solid var(--k-link); outline-offset: 2px; border-radius: 999px; }

@media (prefers-reduced-motion: reduce) {
  .karten .karte, .karten .bild .gross, .karten .bild .handy, .karten .ansehen svg { transition: none; }
  .karten > li:hover .gross, .karten > li:hover .handy, .karten > li:hover .ansehen svg { transform: none; }
}

/* TH-FINAL1: the rounded corners hold while a card tilts. WebKit lets a composited child (the picture, which scales on
   hover) paint over the rounded clip of a 3D transformed parent, so the top corners went square (seen on the café card).
   The card is its own stacking context with a mask, which forces WebKit to clip every layer inside to the rounded box;
   the picture frame carries the same top radius and its own mask as a second guard. */
.karten .karte { isolation: isolate; -webkit-mask-image: -webkit-radial-gradient(white, black); mask-image: radial-gradient(white, black); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.karten .bild { border-radius: 27px 27px 0 0; isolation: isolate; -webkit-mask-image: -webkit-radial-gradient(white, black); mask-image: radial-gradient(white, black); }
/* SMILEY2: the café card's film lies over its still and shows once it plays (its first frame is the still) */
.karten .bild .film { opacity: 0; transition: opacity 400ms ease, transform 500ms cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.karten .bild .film.laeuft { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .karten .bild .film { display: none; } }
