/* The house video (Ben 18-11, and on every landing page 19-11): a poster with a play button, the player only after a click, a plain
   "Watch on YouTube" link under it. The one set of rules for the figure; the About page and the landing pages (scripts/house-video.mjs)
   load this file. The home page sets the same figure in its evening room (home.css). No text is laid over the poster, so there is
   no shadow or band to put behind letters; the frame carries the room's soft media shadow only. Colours are the room's own variables,
   so the light and the dark preference both read well, and every side is a logical one. */
.about-video { width: 100%; margin: 0; display: grid; gap: 12px; justify-items: center; }
.about-video--long { max-width: 100%; }
.about-video__frame {
  position: relative; width: 100%; overflow: hidden; border-radius: var(--r-nest, 14px);
  background: linear-gradient(165deg, #141d3d 0%, #263156 58%, #7c4f16 132%);
  box-shadow: var(--media-shadow, 0 18px 40px -24px rgba(11, 35, 64, .25));
}
.about-video__poster { position: absolute; inset: 0; display: grid; place-items: center; text-decoration: none; }
.about-video__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about-video__icon { position: relative; width: 64px; height: 64px; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .35)); transition: transform .15s ease; }
.about-video__icon circle { fill: rgba(255, 252, 245, .94); }
.about-video__icon path { fill: #141d3d; }
.about-video__poster:hover .about-video__icon { transform: scale(1.06); }
.about-video__poster:focus-visible { outline: 3px solid var(--focus-ring, #141d3d); outline-offset: -3px; }
.about-video__player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.about-video figcaption { text-align: center; font: 500 15px/1.4 var(--font-ui, inherit); }
.about-video figcaption a { color: var(--accent-text); }

/* On a landing page the block is a quiet section of its own: centred, at most 860 px wide, inside the page's side gutters, with room above and below. */
.house-video {
  box-sizing: border-box; display: block; width: min(860px, calc(100% - 2 * var(--side-gutter, 24px))); max-width: 100%;
  margin-inline: auto; padding: 0;
}
/* Its air above and below is its own. The site's spacing rules for sibling sections (".skin main > section + section", ".skin main > section:last-child") would
   otherwise set it to 0 on pages that do not define --section-space, and the block would touch the card above it or the footer below it. Only the block's own
   vertical margin is forced; the elements on either side keep exactly the spacing they had (checked on every page at 1440, 1576 and 390). */
.house-video { margin-block: clamp(40px, 5vw, 72px) !important; }
.house-video .about-videos { display: grid; gap: 0; margin: 0; justify-items: center; }
/* Inside a reading column (the answer pages and the series pages) it takes the column's width, like the About page. */
.reading-copy > .house-video { width: min(100%, var(--text-max, 860px)); margin-inline: auto; }
/* On an essay the Nativity video stands inside the text column, after the first paragraph: the column's width. */
.essay .house-video--topic { width: 100%; }
/* In the shop's grid it is one full-width row between two departments: the cards above and below keep their columns. */
.house-video--in-grid { grid-column: 1 / -1; justify-self: center; width: min(860px, 100%); }
.house-video.house-video--in-grid { margin-block: clamp(20px, 3vw, 28px) !important; }
/* The Letter sets its page on a phone as an ordered column (shell.css, .letter-page main): the block takes the place after the last of them, so the form stays where it is. */
.letter-page main > .house-video { order: 9; }

/* On a phone the play button (64 px on a 342 px wide poster) would sit on the lettering of a poster whose title stands at the bottom (the house video's). There it is smaller,
   and a poster with its title at the bottom (about-video--title-bottom) gets the button higher: its lower edge stays above the title, which starts a little over half way
   down. The poster is a fixed 16:9, so a percentage of the width is a fixed share of the height (6.75% of the width = 12% of the height). A poster with its title at the top
   keeps the button in the middle, below the title. */
@media (max-width: 600px) {
  .about-video__icon { width: 44px; height: 44px; }
  .about-video--title-bottom .about-video__poster { place-items: start center; }
  .about-video--title-bottom .about-video__icon { margin-top: 6.75%; }
}
