/* The Blog (plan.md, Blog; src\pages\blog.mjs): its hero, its three articles' cards and its close. */

/* ---- hero: the headline centered on the paper over a wide framed photo, the articles' titles landing on it in turn,
   clear of the face (x 15-33%, y 12-42%); under 761 px they land one at a time at the photo's foot ---- */
.blog-hero__head { margin-bottom: clamp(32px, 4vw, 52px); }
.blog-hero__title { font: 800 var(--fs-h1)/1.03 var(--font-display); letter-spacing: -0.025em; color: var(--c-wordmark); text-wrap: balance; }
.blog-hero__frame { position: relative; margin: 0; height: clamp(420px, 44vw, 600px); overflow: hidden; border-radius: var(--radius-l); background: var(--c-ink); box-shadow: var(--shadow-l); }
.blog-hero__photo { position: absolute; inset: 0; }
.blog-hero__photo img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 30% 40%; }
.blog-hero__seq { position: absolute; z-index: 2; right: clamp(16px, 4%, 48px); top: 12%; display: grid; gap: 10px; width: min(400px, 40%); }
.blog-hero__card { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 18px; color: var(--c-on-ink);
  background: color-mix(in srgb, var(--c-ink) 60%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: inset 0 0 0 1px var(--c-glass-edge), var(--shadow-l); opacity: var(--kit-in, 1); transform: translateX(calc((1 - var(--kit-in, 1)) * 18px)); }
/* the hold's first item is the empty anchor in blog.mjs: at the loop's turn all three cards fade out together, as one */
.blog-hero__card b { display: block; font: 700 1.0625rem/1.25 var(--font-display); }
.blog-hero__card small { display: block; margin-top: 3px; font: 600 .875rem/1.3 var(--font-ui); color: color-mix(in srgb, var(--c-on-ink) 84%, transparent); }
.blog-hero__tile { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 11px; background: var(--g-arrow); color: var(--c-ink); }
.blog-hero__tile .mark { width: 22px; height: 22px; }
.blog-hero__stop { right: 16px; bottom: 16px; }
@media (max-width: 760px) {
  .blog-hero__frame { height: 440px; }
  .blog-hero__photo img { object-position: 22% 40%; }
  .blog-hero__seq { left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; }
  .blog-hero__card { grid-area: 1 / 1; }
  .blog-hero__card:has(~ .blog-hero__card[data-kit-on]) { opacity: 0; transition: opacity .4s var(--ease-out); } /* eases only as a card gives way, never at the loop's turn */
  .blog-hero__stop { top: 12px; right: 12px; bottom: auto; }
}

/* ---- posts: the three articles as cards on the night, each with a photo of its own ---- */
.blog-posts__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); }
.blog-post { overflow: hidden; border-radius: var(--radius-l); background: color-mix(in srgb, var(--c-on-ink) 6%, transparent); box-shadow: inset 0 0 0 1px var(--c-glass-edge), var(--shadow-l); }
.blog-posts a.blog-post__link { display: flex; flex-direction: column; height: 100%; color: var(--c-on-ink); text-decoration: none; }
.blog-post__photo { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.blog-post__photo img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; }
.blog-post__body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 24px 26px 28px; }
.blog-post__title { font: 800 var(--fs-h3)/1.15 var(--font-display); letter-spacing: -0.01em; color: var(--c-on-ink); text-wrap: balance; }
.blog-post__line { font-size: 1.0625rem; line-height: 1.5; color: color-mix(in srgb, var(--c-on-ink) 84%, transparent); text-wrap: pretty; }
.blog-post__more { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; font: 700 var(--fs-ui)/1 var(--font-ui); color: var(--c-brand-on-ink); }
.blog-post__arrow { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease-out); }
.blog-post:hover .blog-post__arrow, .blog-post:focus-within .blog-post__arrow { transform: translateX(4px); }
@media (max-width: 999px) {
  .blog-posts__grid { grid-template-columns: minmax(0, 1fr); max-width: 680px; margin-inline: auto; }
  .blog-post__photo { aspect-ratio: 16 / 9; }
}

/* ---- close: a technician welcomed at a new customer's door (faces at the left and his profile at x 62-72%, y 2-22%),
   the booking landing over the tool bag at its lower right, the words on the night beside it; under 1000 px the photo
   stands first and the booking hangs on its foot ---- */
.blog-close { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); align-items: center;
  min-height: clamp(560px, 46vw, 720px); color: var(--c-on-ink); background: var(--g-night); }
.blog-close__media { position: absolute; inset: 0 auto 0 0; z-index: -1; width: 58%; margin: 0; overflow: hidden; }
.blog-close__media img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 40% 30%; }
.blog-close__media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent 72%, color-mix(in srgb, var(--c-ink) 70%, transparent) 100%); }
.blog-close__in { grid-column: 2; display: grid; justify-items: start; max-width: 540px; padding: var(--section-y) var(--gutter); }
.blog-close__title { margin-bottom: 28px; font: 800 clamp(2.5rem, 1.5rem + 2.6vw, 4rem)/1.03 var(--font-display); letter-spacing: -0.025em; text-wrap: balance; }
.blog-close__note { margin-top: 12px; font: 600 var(--fs-small)/1.4 var(--font-ui); color: color-mix(in srgb, var(--c-on-ink) 88%, transparent); }
.blog-close__seq { position: absolute; z-index: 1; right: calc(42% + 24px); bottom: 8%; }
.blog-close__booking { min-width: 270px; opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 12px)); }
.blog-close__booking b { display: block; font: 700 1.125rem/1.2 var(--font-display); }
.blog-close__booking small { display: block; margin-top: 2px; font: 600 var(--fs-small)/1.3 var(--font-ui); color: color-mix(in srgb, var(--c-on-ink) 86%, transparent); }
.blog-close__tile { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--g-arrow); color: var(--c-ink); }
.blog-close__tile .mark { width: 24px; height: 24px; }
.blog-close__stop { left: 16px; top: 16px; }
@media (max-width: 999px) {
  .blog-close { display: block; place-items: normal; min-height: 0; padding: 0 0 72px; }
  .blog-close__media { position: relative; inset: auto; z-index: 0; width: auto; aspect-ratio: 3 / 2; }
  .blog-close__media::after { background: linear-gradient(180deg, transparent 62%, color-mix(in srgb, var(--c-ink) 60%, transparent) 100%); }
  .blog-close__seq { right: 16px; top: calc(66.67vw - 56px); bottom: auto; }
  .blog-close__booking { min-width: 0; }
  .blog-close__in { justify-items: center; max-width: 640px; margin: 0 auto; padding: 60px var(--gutter) 0; text-align: center; }
}
