/* Blog: the page's own layout (plan.md "Blog"). Components and tokens from design\components.css and
   design\system.css; the post cards and the call to action are the components' .post-cards and .post-cta. */

/* #top: full-bleed footage of a shop owner at work, her notebook, then her shelves (kit rotate, two calm clips of one
   shoot), the words at the lower left over the shade. Shorter than a header that sells, so the first posts show on the first screen. Under 1001 px: the words,
   then the footage. */
.blog-top { position: relative; min-height: clamp(460px, calc(76svh - var(--header-h)), 700px); background: var(--c-ink); isolation: isolate; scroll-margin-top: var(--header-h); }
.blog-top__stage { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--c-ink); }
.blog-top__slides { position: absolute; inset: 0; }
/* the kit's rotating header, as kit.md gives it */
[data-kit-scene="rotate"] [data-kit-slide] { position: absolute; inset: 0; margin: 0; visibility: hidden; overflow: hidden; }
[data-kit-scene="rotate"] [data-kit-slide][data-kit-on] { visibility: visible; z-index: 2; opacity: var(--kit-move, 1); transform: translateX(var(--kit-glide, calc((1 - var(--kit-move, 1)) * 4%))); }
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-prev])) [data-kit-slide][data-kit-on] { transform: none; opacity: 1; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { visibility: visible; z-index: 1; }
[data-kit-scene="rotate"] [data-kit-slide] video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-kit-on])) [data-kit-slide]:not([data-kit-slide] ~ [data-kit-slide]) { visibility: visible; }
[data-kit-scene="rotate"] [data-kit-slide] video { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; clip-path: inset(2px); }
[data-kit-scene="rotate"] [data-kit-slide] video[data-kit-shown] { clip-path: none; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { opacity: clamp(0, (1 - var(--kit-move, 0)) * 1000, 1); }
/* each clip's crop: the owner stays in the right half, clear of the words */
.blog-top__slide--deli video, .blog-top__slide--deli .kit-first { object-position: 62% 38%; }
.blog-top__slide--shelves video { object-position: 60% 32%; }
/* one still grade over every slide: dark toward the words at the left and under the header bar, clear on the owner */
.blog-top__stage::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .7) 30%, rgba(0, 0, 0, .22) 52%, rgba(0, 0, 0, 0) 64%), linear-gradient(180deg, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, 0) 24%, rgba(0, 0, 0, 0) 66%, rgba(0, 0, 0, .55) 100%); }
.blog-top__stop { position: absolute; z-index: 6; right: max(var(--gutter), calc((100% - var(--max-w)) / 2)); bottom: 22px; }
.blog-top__in { position: relative; z-index: 5; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; box-sizing: border-box; min-height: inherit; padding-block: clamp(40px, 7svh, 84px) clamp(36px, 6svh, 72px); pointer-events: none; }
.blog-top__in > * { pointer-events: auto; }
.blog-top__title { max-width: 620px; margin: 0; font: 800 clamp(2.3rem, 1.1rem + 2.9vw, 3.9rem)/1.04 var(--font-display); letter-spacing: -.03em; text-wrap: balance; }
.blog-top__lead { max-width: 500px; margin: clamp(12px, 1.8svh, 18px) 0 0; font-size: var(--fs-lead); line-height: 1.5; color: rgba(246, 251, 253, .9); text-wrap: pretty; }
.blog-top__cta { margin-top: clamp(18px, 2.6svh, 28px); }
@media (max-width: 1000px) {
  .blog-top { display: flex; flex-direction: column; min-height: 0; }
  .blog-top__in { order: 1; min-height: 0; padding-block: 26px 24px; }
  .blog-top__title { font-size: clamp(2rem, 1.2rem + 4vw, 2.9rem); }
  .blog-top__lead { font-size: 1.04rem; }
  .blog-top__stage { order: 2; position: relative; inset: auto; height: clamp(300px, 72vw, 520px); }
  .blog-top__stage::after { background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, 0) 26%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, .4) 100%); }
  .blog-top__slide--deli video, .blog-top__slide--deli .kit-first { object-position: 76% 38%; }
  .blog-top__slide--shelves video { object-position: 68% 32%; }
  .blog-top__stop { right: 14px; top: 14px; bottom: auto; }
}

/* #posts: the posts, newest first, two to a row (one on the phone), close under the header */
.blog-posts { padding-top: clamp(36px, 4.4vw, 56px); }
