/* Blog (plan.md): the header (a framed photo between the headline's card over its top and the three posts' cards
   landing over its foot), the posts, and the close band (design\components.css, "the Blog's posts"). Places and sizes. */

/* ---- hero ---- */
.bhead { padding-block: clamp(28px, 3vw, 48px) clamp(48px, 5vw, 80px); }
.bhead__in { display: grid; }
.bhead__card { position: relative; z-index: 2; justify-self: start; display: grid; gap: var(--space-3); width: min(620px, 56%); margin-left: clamp(20px, 3vw, 44px); padding: clamp(24px, 3vw, 36px) clamp(24px, 3vw, 40px); border-radius: var(--radius-l); background: var(--c-paper); box-shadow: inset 0 0 0 1px var(--c-line), var(--shadow-l); }
.bhead h1 { font-size: clamp(2.1rem, 1.4rem + 2.2vw, 3.4rem); line-height: 1.08; }
.bhead__lead { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem); line-height: 1.5; color: var(--c-ink-soft); }
.bhead__stage { position: relative; margin-top: calc(-1 * clamp(72px, 7vw, 100px)); }
.bhead__media { height: clamp(420px, 42vw, 580px); border-radius: var(--radius-l); overflow: hidden; background: var(--c-paper-alt); }
.bhead__media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.bhead__foot { position: relative; z-index: 2; margin: -48px clamp(16px, 2.6vw, 36px) 0; }
.bhead__stop { top: -56px; right: 0; }
.bhead__posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.bhead__posts li { display: grid; }
/* the kit's hold: the newest is its first item, on through the turn; the next two fade in, and at the loop's end fade
   out as one (only a fade: a slide would be taken back the way it came) */
.bhead__posts li[data-kit-at] { opacity: var(--kit-in, 1); }
.bhead__posts li:focus-within { opacity: 1; transform: none; }
.bpill { display: grid; align-content: start; gap: 6px; padding: 16px 18px 17px; border-radius: var(--radius-m); background: var(--c-paper); color: var(--c-ink); text-decoration: none; box-shadow: inset 0 0 0 1px var(--c-line), var(--shadow-l); }
.bpill__date { font-size: 0.8125rem; line-height: 1.3; color: var(--c-ink-soft); }
.bpill__title { font: 600 1rem/1.35 var(--font-ui); }
.bpill__go { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font: 600 0.875rem/1.2 var(--font-ui); color: var(--c-brand-text); }
.bpill:hover .bpill__title { text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---- the posts, newest first ---- */
.bposts__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); margin: 0; padding: 0; list-style: none; }
.bcard { position: relative; display: grid; grid-template-rows: auto 1fr; border-radius: var(--radius-l); background: var(--c-paper); overflow: hidden; box-shadow: inset 0 0 0 1px var(--c-line), var(--shadow-m); transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
.bcard:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--c-line), var(--shadow-l); }
.bcard__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-paper-alt); }
.bcard__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bcard__words { display: grid; align-content: start; gap: 10px; padding: 20px 22px 24px; }
.bcard__date { font-size: 0.875rem; color: var(--c-ink-soft); }
.bcard h3 { font-size: clamp(1.15rem, 1.05rem + 0.35vw, 1.35rem); line-height: 1.3; }
.bcard h3 a { color: var(--c-ink); text-decoration: none; }
.bcard h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.bcard:hover h3 a { text-decoration: underline; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.bcard__open { color: var(--c-ink-soft); }
.bcard__go { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font: 600 0.9375rem/1.2 var(--font-ui); color: var(--c-brand-text); }

/* ---- the tablet and the phone ---- */
@media (max-width: 1000px) {
  .bposts__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .bhead__card { order: 2; width: auto; margin: 24px 0 0; padding: 0; background: none; box-shadow: none; }
  .bhead__stage { order: 1; margin-top: 0; }
  .bhead__media { height: auto; aspect-ratio: 4 / 3; }
  .bhead__media img { object-position: 36% 62%; }
  .bhead__foot { order: 3; margin: 72px 0 0; }
  .bhead__stop { top: -52px; }
  .bhead__posts { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .bposts__list { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .bcard, .bcard:hover { transform: none; transition: none; }
}
