/* Kinda Critic v2: the title backdrop header (kindacritic/ui_backdrop.py).
 * Tokens only: every colour comes from tokens.css, so the band follows the
 * page surfaces in light and dark. The fade is --backdrop-fade. */

/* Full bleed: the section escapes the .wrap around the page, so the band runs
 * edge to edge while its text stays on the content column. */
.bd-header { position: relative; isolation: isolate;
             margin: 0 calc(50% - 50vw); }

/* The background layer sits behind everything in the band and is clipped to
 * it. Its surface gradient shows if an image is missing (onerror removes it). */
.bd-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden;
         background: linear-gradient(160deg, var(--surface), var(--page)); }
.bd-img { position: absolute; inset: 0; width: 100%; height: 100%;
          object-fit: cover; display: block; }
/* A cover standing in for a backdrop: scaled up so the blur does not pull
 * transparent edges in, then blurred, darkened and saturated slightly. */
.bd-blur { inset: -60px; width: calc(100% + 120px); height: calc(100% + 120px);
           filter: blur(28px) brightness(.75) saturate(1.15); }

/* Darkens the left side, where the title and overview sit, so text on the
 * backdrop passes AA. The scrim is a mix of the page colour, not black. */
.bd-scrim { position: absolute; inset: 0;
            background: linear-gradient(90deg,
              color-mix(in srgb, var(--page) 88%, transparent) 0%,
              color-mix(in srgb, var(--page) 74%, transparent) 60%,
              color-mix(in srgb, var(--page) 58%, transparent) 100%); }
/* Fades the layer into the page colour at the bottom edge of the band. */
.bd-fade { position: absolute; inset: 0; background: var(--backdrop-fade); }

.bd-inner { position: relative; max-width: var(--maxw); margin: 0 auto;
            padding: 44px var(--pad) 0;
            display: grid; grid-template-columns: 220px minmax(0, 1fr);
            gap: 32px; align-items: start; }
/* The text column carries the bottom padding, so the band's bottom edge sits
 * 40px above the poster's, which is what makes the poster overlap it. */
.bd-text { min-width: 0; padding: 4px 0 36px; }

/* Fixed box: the width and height attributes reserve the same space. The
 * poster hangs 40px past the band's bottom edge, over the content below. */
.bd-poster { position: relative; width: 220px; height: 330px; margin-bottom: -40px;
             z-index: 1; border-radius: var(--r-md); overflow: hidden;
             box-shadow: 0 18px 40px color-mix(in srgb, var(--page) 70%, transparent); }
.bd-poster-img { position: absolute; inset: 0; width: 100%; height: 100%;
                 object-fit: cover; display: block; }
.bd-ph { position: absolute; inset: 0; display: grid; place-items: center; }
.bd-ph b { font-size: 2.1em; font-weight: 800; letter-spacing: -.03em; color: var(--ink);
           text-shadow: 0 1px 12px color-mix(in srgb, var(--page) 60%, transparent); }

/* Phone: the poster stays at the top left at 112 x 168, and the title block
 * stacks under it. Nothing overlaps the band's bottom edge at this width. */
@media (max-width: 640px) {
  .bd-inner { grid-template-columns: minmax(0, 1fr); gap: 18px;
              padding: 24px var(--pad) 0; }
  .bd-text { padding: 0 0 22px; }
  .bd-poster { width: 112px; height: 168px; margin-bottom: 0; }
}
