/*
 * The site's own additions, loaded last so they win over the theme stylesheets.
 *
 * Hand-written source, not extracted from the mirror. prepare-assets copies it
 * into public/css/, which the extractor rebuilds from scratch, so it cannot live
 * there directly.
 */

/*
 * The theme's images carried no width/height attributes, so `width: 100%` let
 * the browser derive the height from the intrinsic aspect ratio. next/image
 * always emits both attributes - needed to reserve the box and avoid layout
 * shift - which pins the height and stretched every card image.
 *
 * Restoring `height: auto` gives back the original behaviour. The selector is
 * deliberately bare so any theme rule setting an explicit height still wins -
 * `.met_recent_work_preview > a img { height: 234px }`, for one.
 */
img {
  height: auto;
}

/*
 * Keep the parallax background inside its own band.
 *
 * custom.css gives `.met_parallax_line` a `min-height` of 255px but makes the
 * `.met_parallax` layer inside it a fixed `height: 355px; position: absolute`.
 * Wherever that band's content is short enough for it to collapse to the
 * minimum - the about page, for one - the background overflows 100px past the
 * bottom and paints over the top of the footer, which on those pages means the
 * "Sally's Diet Rite" logo from parallax/3.jpg landing across the footer
 * headings.
 *
 * Clipping is the conservative fix: the band keeps its measured height, so no
 * geometry moves, and the only thing that changes is that the background stops
 * bleeding out of it. `.met_parallax_content` is `height: 100%` of the line and
 * so is unaffected.
 */
.met_parallax_line {
  overflow: hidden;
}

/*
 * The parallax backgrounds. Every page declared these in an inline <style> block
 * in its <head>; they are page-independent, so they live here instead.
 */
.met_parallax_item_1 {
  background: url('/photos/parallax/1.jpg') repeat 50% -3px fixed transparent;
}

.met_parallax_item_2 {
  height: 500px;
  background: url('/photos/parallax/2.jpg') repeat 50% -3px fixed transparent;
}

.met_parallax_item_3 {
  background: url('/photos/parallax/3.jpg') repeat 50% -3px fixed transparent;
}

.met_parallax_line_2 {
  height: 500px;
}

.touch .met_parallax_item_1,
.touch .met_parallax_item_2,
.touch .met_parallax_item_3 {
  background-attachment: scroll !important;
}
