/**
 * The banner band on a page that has no Bricks tree.
 *
 * About, Fabric & Craft, Contact and the legal pages are still plain
 * post_content inside the theme's 1100px article. This is the same band the
 * Teams page carries (assets/teams-page.css), rebuilt for markup that
 * includes/hero.php prints rather than markup Bricks renders: copy on the left
 * on the page's own background, the photograph holding the right-hand 58% at
 * full brightness, and a mask rather than an edge where the two meet.
 *
 * THE PHOTOGRAPH IS NOT IN HERE. includes/hero.php puts three custom properties
 * on :root and stops there: --mimi-hero is the image, --mimi-hero-on is a 0/1
 * switch, --mimi-hero-focus is how far down it to sit. Which photograph goes on
 * which page belongs to tools/wire-heroes.php. The archive band
 * (assets/shop.css) and the Teams band read exactly the same three.
 *
 * WHY THE PHOTOGRAPH IS A PANEL AND NOT THE BAND'S BACKGROUND. The archive band
 * lays its picture across the full width and drops the type onto it behind a
 * scrim. That works there because the archive banners put their subject right
 * of centre and the scrim falls on empty mountain. The page banners are
 * interiors and portraits with the subject near the middle of the frame, and a
 * scrim heavy enough to carry a title would be laid straight over a garment.
 *
 * THE SUBJECT HAS TO BE CENTRE OR RIGHT OF CENTRE, which is a constraint on
 * tools/wire-heroes.php and not a thing this sheet can fix. The panel's left
 * quarter dissolves into the page, so a banner with its subject on the left
 * arrives half faded out, which looks like a rendering fault rather than a
 * choice.
 *
 * Bare rem is unsafe in this theme: html is font-size 10px, so 1rem renders at
 * 62.5% of intent. Everything below is px or a clamp() in px.
 *
 * @package mimi-core
 */

/* --mimi-hero-on IS LOAD-BEARING. The band carries the page's h1, and
   includes/hero.php takes the article's own h1 off whenever it has printed one,
   so a band that collapsed to nothing would take the page's heading with it.
   It cannot: the band only renders at all once a photograph is wired, and the
   switch is set in the same breath. The zero fallback is here for the moment
   between the stylesheet loading and the inline properties being read, and for
   anybody who copies this rule somewhere else. */
.mimi-pagehero {
	align-items: flex-start;
	display: flex;
	/* A plain section is a flex ROW unless it is told otherwise, which is the
	   opposite of a Bricks section. Both axes are stated so this sheet does not
	   depend on knowing which kind of element it landed on. */
	flex-direction: column;
	justify-content: center;
	/* Shorter than the Teams band, which is 680px because it carries an
	   eyebrow, a heading, a lede, a proof line and two buttons. There is a
	   title here and usually nothing else. */
	min-height: calc(var(--mimi-hero-on, 0) * clamp(340px, 28vw, 520px));
	overflow: hidden;
	padding: 84px var(--gutter, max(40px, calc((100% - 1440px) / 2))) 60px;
	position: relative;
}

.mimi-pagehero__inner {
	max-width: min(660px, 100%);
	position: relative;
	/* An absolutely positioned pseudo-element paints above its own element's
	   in-flow children, so without a stacking context of its own the title
	   would sit under the photograph. */
	z-index: 1;
}

/* WIDTH IS A FRACTION OF THE BAND, NOT THE IMAGE'S OWN RATIO. Writing
   `aspect-ratio` here would scale the panel to the picture and leave no crop at
   all, which is prettier until the day somebody wires a 16:9 banner to a page
   that had a 3:2 one and the panel changes width on its own. */
.mimi-pagehero::after {
	background-image: var(--mimi-hero, none);
	background-position: 50% var(--mimi-hero-focus, 45%);
	background-repeat: no-repeat;
	background-size: cover;
	bottom: 0;
	content: "";
	/* The mask, and not a gradient painted over the top. A dark gradient would
	   be the page's near-black laid over the photograph, which reads as a veil
	   however carefully it is tuned. A mask takes the panel's own alpha down
	   instead, so the picture dissolves into the page rather than being covered
	   up by it. */
	-webkit-mask-image: linear-gradient(to right, transparent 0%, #000 26%);
	mask-image: linear-gradient(to right, transparent 0%, #000 26%);
	opacity: var(--mimi-hero-on, 0);
	pointer-events: none;
	position: absolute;
	right: 0;
	top: 0;
	width: clamp(420px, 58%, 1180px);
}

.mimi-pagehero__title {
	font-size: clamp(32px, 4vw, 56px);
	line-height: 1.06;
	margin: 0;
}

/* Almost always absent: it is the page's own excerpt, and nobody has written
   one. The rule is here so that the day somebody does, it lands somewhere
   designed rather than at the body default. */
.mimi-pagehero__lede {
	font-size: clamp(17px, 1.42vw, 21.5px);
	line-height: 1.55;
	margin: 16px 0 0;
	max-width: 560px;
	opacity: .88;
}

/* ====================================================== the quiet band ==== */

/*
 * NO PHOTOGRAPH, A SHORTER BAND, AND THE WORDS DOING THE WORK.
 *
 * Chosen off prototypes/page-heroes.html on 14 Oct 2026 against five other
 * shapes, and the reason it wins is not that it is prettier: it is the only
 * one that is right on a page with its own photograph AND on the seven pages
 * sharing one spa picture, without being tuned per page.
 *
 * 420px rather than 518. Below a band is the page, and her first clause moves
 * from the second screen to the first.
 */
.mimi-pagehero--quiet {
	justify-content: flex-end;
	min-height: 420px;
	padding: 100px var(--gutter, max(40px, calc((100% - 1440px) / 2))) 44px;
}

/*
 * AND IT IS 360 WHERE SHE DID NOT WRITE AN OPENING LINE.
 *
 * Only three of the twelve pages open with a line the band can take. On the
 * other nine the band was holding an eyebrow, a title and a rule, about 110px
 * of content, inside 420: 266px of nothing above a policy title against About's
 * 210. The number was consistent and the page was not, which is the wrong one
 * of the two to hold fixed.
 */
.mimi-pagehero--quiet:not(:has(.mimi-pagehero__lede)) { min-height: 360px; }

/* The photograph is not hidden, it is not drawn. --mimi-hero-on stays 1 so
   nothing else that reads it changes behaviour. */
.mimi-pagehero--quiet::after { content: none; }

.mimi-pagehero--quiet .mimi-pagehero__inner { max-width: 100%; }

.mimi-pagehero__eyebrow {
	color: var(--copper, #BB8335);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1.6px;
	margin: 0 0 12px;
	text-transform: uppercase;
}

/*
 * TWO STEPS, SET BY PHP. 66px is right for "About Mimi & Co." and absurd for
 * "Returns, Exchanges and Refunds"; 46px is right for the second and timid for
 * the first. hero.php measures the title and writes data-len onto it.
 */
.mimi-pagehero--quiet .mimi-pagehero__title {
	font-size: clamp(34px, 4.6vw, 66px);
	max-width: 20ch;
}

.mimi-pagehero--quiet .mimi-pagehero__title[data-len="long"] {
	font-size: clamp(30px, 3.2vw, 46px);
	max-width: 24ch;
}

/* Her own line, in the display face, because on a quiet band it is the only
   thing under the title and 15px of body copy there is a caption. */
.mimi-pagehero--quiet .mimi-pagehero__lede {
	color: rgba(246, 243, 239, .82);
	font-family: var(--font-display, Georgia, serif);
	font-size: var(--text-l);
	line-height: 1.35;
	margin: 20px 0 0;
	max-width: 600px;
	opacity: 1;
}

/* The one piece of furniture that says the band has ended, in place of the
   photograph's edge, which used to say it. */
.mimi-pagehero__rule {
	background: linear-gradient(to right, var(--copper, #BB8335) 0%, rgba(187, 131, 53, .12) 46%, transparent 100%);
	height: 1px;
	margin-top: 36px;
	width: 100%;
}

@media (max-width: 1100px) {
	/* The narrow rule above reserves band height as padding-top for a
	   photograph this band does not have. */
	.mimi-pagehero--quiet {
		min-height: 0;
		padding: 56px var(--gutter, max(40px, calc((100% - 1440px) / 2))) 36px;
	}

	.mimi-pagehero--quiet .mimi-pagehero__rule { margin-top: 28px; }
}

/* THE CONTENT COLUMN MOVES ONTO THE MASTHEAD'S RAIL, which is the one change
   this sheet makes to a page outside its own band.

   This rule used to read `margin-inline: 40px auto`, to drag the column out of
   the theme's centred 1100 and hang it from the band's own left edge at 40. It
   lined the page up with the band and left both of them lined up with nothing
   else: Collections sits at 198 on an 1850px window and Sign in ends at 1638,
   so a page starting at 40 began 158px outside the navigation above it and ran
   157px past its right edge.

   --gutter is the site's own rail, max(40px, (100% - 1440px) / 2), and it is
   what .mc-masthead, the footer, the homepage, the shop and the account screens
   already use. The static pages were the only ones not on it. WIDTH AND
   MAX-WIDTH BOTH HAVE TO GO: Bricks gives each of these articles a fixed width
   from its own page setting (1755 here, 1080 on the enquiry forms, 720 on Care)
   and without width:100% the narrow ones stay narrow inside a rail they now
   have room to fill.

   Scoped to the adjacent sibling, so a page with no band keeps the centred
   column it has always had. */
.mimi-pagehero + #brx-content.wordpress {
	margin-inline: 0;
	max-width: none;
	padding-inline: var(--gutter, max(40px, calc((100% - 1440px) / 2)));
	padding-top: 48px;
	width: 100%;
}

/* THE BAND TURNS BEFORE THE PAGE DOES. Side by side, the panel is 58% of the
   band and the title has the rest; below about 1100 that leaves the title
   around 400px and the two start fighting. So the photograph goes over the
   title here, full width, and the band becomes a header rather than a split.

   The height is reserved as PADDING on the section and the panel is drawn into
   it, because a pseudo-element is out of flow and cannot push the title down.
   Both halves multiply by the same switch.

   Bottom-to-top mask this time: the photograph is above the title rather than
   beside it, so the edge that has to dissolve is the bottom one. */
@media (max-width: 1100px) {
	.mimi-pagehero {
		--mph-band: clamp(200px, 50vw, 380px);

		justify-content: flex-start;
		min-height: 0;
		padding-top: calc(var(--mimi-hero-on, 0) * var(--mph-band) + 56px);
	}

	.mimi-pagehero::after {
		bottom: auto;
		height: calc(var(--mimi-hero-on, 0) * var(--mph-band) + 24px);
		-webkit-mask-image: linear-gradient(to top, transparent 0%, #000 30%);
		mask-image: linear-gradient(to top, transparent 0%, #000 30%);
		width: 100%;
	}

	.mimi-pagehero__inner {
		max-width: none;
	}
}
