/* A photo inside its frame (a bubble, an iPad tile, the studio's preview), placed the way it was
   set in the studio: --x / --y pick the point of the photo kept in view, --zoom enlarges around it.
   The frame itself (shape, size, overflow: hidden) comes from where it's used. */
.framed {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--x, 50%) var(--y, 50%);
  transform: scale(var(--zoom, 1));
  transform-origin: var(--x, 50%) var(--y, 50%);
  user-select: none;
  -webkit-user-drag: none;
}
.framed.no-photo {
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.7), transparent 50%),
    linear-gradient(160deg, var(--color-petal-light), var(--color-face-light));
}

/* ---------- colour cards (a post without a photo) ---------- */
.framed.cover {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.6em;
  padding: 12%;
  overflow: hidden;
  isolation: isolate;
  transform: none;
  color: #fff;
  container-type: inline-size;
  background: var(--cover);
  text-align: center;
}
/* soft light and the same paper grain as the rest of the site */
.framed.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.45), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cover-marks { display: flex; gap: 12cqi; }
/* the logo as a glossy sticker: white, inked shadow below */
.cover-mark {
  display: grid;
  place-items: center;
  width: 34cqi;
  aspect-ratio: 1;
  border-radius: 28%;
  color: var(--cover-ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1.6cqi 0 rgba(36, 31, 38, 0.18), 0 4cqi 10cqi -4cqi rgba(36, 31, 38, 0.35);
}
.cover-marks:has(> :nth-child(2)) .cover-mark { width: 26cqi; }
.cover-mark svg { width: 62%; }
.cover-mark.sparkle { border-radius: 50%; color: var(--color-face); }
.cover-mark.sparkle svg { width: 56%; filter: drop-shadow(0 0 0.6px var(--color-ink)); }
.cover-caption {
  max-width: 100%;
  padding: 0 0.12em; /* the hand-lettering leans past its box: room so the last letter isn't clipped */
  font: 700 11cqi/1.05 var(--font-hand);
  color: #fff;
  text-shadow: 0 0.5cqi 0 rgba(36, 31, 38, 0.25);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* the palettes */
.cover-insta    { --cover: linear-gradient(155deg, #f6b1c0 0%, #e88aa0 45%, #f2c66b 100%); --cover-ink: #c55a7c; }
.cover-tube     { --cover: linear-gradient(155deg, #f39a8a 0%, #e0605a 55%, #c43d4b 100%); --cover-ink: #d0463f; }
.cover-petal    { --cover: linear-gradient(160deg, var(--color-petal-light), var(--color-petal-shade)); --cover-ink: var(--color-petal-shade); }
.cover-sunny    { --cover: linear-gradient(160deg, var(--color-face-highlight), var(--color-face) 60%, var(--color-face-shade)); --cover-ink: #b9812a; }
.cover-leaf     { --cover: linear-gradient(160deg, var(--color-leaf-light), var(--color-leaf-shade)); --cover-ink: var(--color-leaf-shade); }
.cover-lavender { --cover: linear-gradient(160deg, #d9c6f2, #9d83d6); --cover-ink: #7a5fc0; }
.cover-night    { --cover: radial-gradient(circle at 70% 20%, #4b3a7a, transparent 60%), linear-gradient(160deg, #2d2440, #171320); --cover-ink: #2d2440; }
