/*
 * The Espace Pro presentation page.
 *
 * Follows the "Page Espace pro V2" mockup: a full-bleed photographic hero, a
 * row of promises, two card grids, a photo-and-copy benefits block, a dark
 * testimonial band, an FAQ of drawers and a closing photographic call to
 * action. The shortcode renders inside the theme's centred container, so the
 * full-bleed sections are pulled back out to the edges of the viewport.
 */

/* Display face ------------------------------------------------------------
 *
 * The mockup's own IvyPresto Display, redeclared by this plugin against a
 * relative URL. The child theme already ships the file but points at it with
 * an absolute `https://www.luminairestendance.com/...` URL, so the five other
 * shops of the network were asking a foreign origin for a font and falling
 * back to Georgia.
 *
 * Only the Thin is used. The theme's companion "300" file is not a Light at
 * all — it carries a -12° italic angle — so it would set every heading on the
 * page in italics.
 *
 * Declared twice against the same file rather than once with a `100 400`
 * range: the range syntax is fine in current browsers, but an older one that
 * rejects the descriptor drops the whole rule and the page loses the face
 * entirely. Two declarations cost one download.
 */

@font-face {
	font-family: "IvyPresto Display";
	font-display: swap;
	font-style: normal;
	font-weight: 100;
	src: url( "../fonts/ivypresto-display-100.woff2" ) format( "woff2" ),
		url( "../fonts/ivypresto-display-100.woff" ) format( "woff" );
}

@font-face {
	font-family: "IvyPresto Display";
	font-display: swap;
	font-style: normal;
	font-weight: 400;
	src: url( "../fonts/ivypresto-display-100.woff2" ) format( "woff2" ),
		url( "../fonts/ivypresto-display-100.woff" ) format( "woff" );
}

/* Screen ------------------------------------------------------------------ */

body.iep-landing-page {
	overflow-x: hidden;
}

/*
 * Hand the page its full width back.
 *
 * The theme wraps the content in `.col-full` (1170px plus padding) and then in
 * a `#primary` that shares the row with a sidebar, so `#primary` is neither
 * full width nor centred in the viewport. Full-bleed sections were being built
 * out of that box with `margin-left: calc( 50% - 50vw )`, which only lands
 * correctly when the box it escapes is centred — hence the band that sat too
 * far right and the white gutter beside it.
 *
 * Rather than compensate with ever more fragile arithmetic, the wrappers are
 * released on this page only. The sections below then need no negative margins
 * at all: the full-bleed ones are simply `width: 100%`, and the measured ones
 * re-impose the mockup's 1260px themselves.
 */
body.iep-landing-page .site-content .col-full,
body.iep-landing-page #primary.content-area,
body.iep-landing-page #main.site-main,
body.iep-landing-page .entry-content {
	float: none;
	margin-left: 0;
	margin-right: 0;
	max-width: none;
	padding-left: 0;
	padding-right: 0;
	width: 100%;
}

/* The sidebar is empty on this page and only narrows the column. */
body.iep-landing-page #secondary.widget-area {
	display: none;
}

/* The theme prints a page title and a breadcrumb bar above the content; the
   hero carries the page's identity, so both read as duplicates above it. */
body.iep-landing-page .entry-header,
body.iep-landing-page .page-header,
body.iep-landing-page .archive-header {
	display: none;
}

.iep-landing {
	--iep-ink: #121212;
	--iep-muted: rgba( 18, 18, 18, 0.66 );
	--iep-surface: #f0ede8;
	--iep-dark: #121212;
	--iep-rule: rgba( 255, 255, 255, 0.16 );
	--iep-display: "IvyPresto Display", Georgia, "Times New Roman", serif;
	--iep-body: "neue-haas-unica", "Neue Haas Unica", "Helvetica Neue", Arial, sans-serif;
	--iep-gutter: clamp( 1.25rem, 5vw, 3rem );
	color: var( --iep-ink );
	font-family: var( --iep-body );
}

/* Every section but the full-bleed ones sits on the same 1260px measure the
   mockup lays its content out on. */
.iep-landing__section {
	box-sizing: border-box;
	margin: clamp( 3rem, 7vw, 5.5rem ) auto;
	max-width: 78.75rem;
	padding: 0 var( --iep-gutter );
	width: 100%;
}

/*
 * Headings default to the body face, and the display face is opted into.
 *
 * The theme sets its own serif on every h1-h3 in the content, which was
 * leaking into the cards and the benefit blocks — copy the mockup sets in
 * Neue Haas Unica. Inverting the rule this way means a heading can only end up
 * in the display face by being named below, so nothing the theme adds later
 * can reach in again.
 */
.iep-landing h1,
.iep-landing h2,
.iep-landing h3 {
	font-family: var( --iep-body );
	font-weight: 400;
	margin: 0;
}

/*
 * The page's display headings.
 *
 * 600 is deliberate, but note that the shop only holds IvyPresto Display in
 * Thin: no face is declared at or above 600, so the browser takes the Thin and
 * emboldens it itself. That is a synthetic weight, not a drawn one. Dropping a
 * real IvyPresto Display SemiBold into `public/fonts/` and adding one
 * `@font-face` at 600 is all it would take to replace it.
 *
 * The hero title is written `h1.iep-landing__…` for the same reason the CTA
 * margins are: the `.iep-landing h1, h2, h3` reset above is (0,1,1) and a bare
 * class here is (0,1,0), so the body face was winning and the hero was
 * rendering in Neue Haas Unica. The h2 selectors below are already (0,1,1) and
 * come later in the file, so they beat the reset on source order; only the
 * hero, named by class alone, lost. Qualifying by element takes it to (0,2,1).
 */
.iep-landing h1.iep-landing__hero-title,
.iep-landing__heading h2,
.iep-landing__benefits-copy h2,
.iep-landing h2.iep-landing__reviews-title,
.iep-landing__faq-heading h2,
.iep-landing__closing-inner h2 {
	font-family: var( --iep-display );
	font-weight: 600;
}

.iep-landing p {
	margin: 0;
}

/* Buttons ----------------------------------------------------------------- */

/* The theme underlines every link inside `.entry-content` through a selector
   built from a body element and six classes, which no sensible button class
   can outrank. `!important` is the honest way to say "this is a button, not
   prose" without cargo-culting that selector into this file. */
.iep-landing a,
.iep-landing__button,
.iep-landing__button:hover,
.iep-landing__button:focus {
	text-decoration: none !important;
}

.iep-landing__button {
	background: #000;
	border: 1px solid #000;
	color: #fff;
	display: inline-block;
	font-family: var( --iep-body );
	font-size: 1.125rem;
	line-height: 1;
	padding: 0.75rem 1.25rem;
	text-align: center;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.iep-landing__button:hover,
.iep-landing__button:focus {
	background: transparent;
	color: #000;
}

/* On the two photographic sections the button sits on a dark image, where
   inverting to a transparent fill would leave black-on-photo. */
.iep-landing__hero .iep-landing__button:hover,
.iep-landing__hero .iep-landing__button:focus,
.iep-landing__closing .iep-landing__button:hover,
.iep-landing__closing .iep-landing__button:focus {
	background: #fff;
	border-color: #fff;
	color: #000;
}

/* The closing block pairs a ghost button with a solid one, so the ghost has to
   declare its own resting state after the shared rule above has set a black
   fill. Its hover is the hero/closing rule's white fill, which is already the
   inverse it needs. */
.iep-landing__button--ghost {
	background: transparent;
	border-color: #fff;
	color: #fff;
}

/* Hero -------------------------------------------------------------------- */

.iep-landing__hero {
	align-items: center;
	/* The flat colour is what shows while the photograph loads, and what a site
	   with no photograph chosen keeps. */
	background-color: #3d352c;
	background-image: var( --iep-landing-hero );
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	box-sizing: border-box;
	display: flex;
	justify-content: center;
	min-height: 40rem;
	padding: clamp( 3rem, 8vw, 5.5rem ) var( --iep-gutter );
	position: relative;
	width: 100%;
}

/* The mockup's photograph is dark enough for white type on its own; a shop
   that chooses a brighter one still needs the copy to hold. */
.iep-landing__hero::before {
	background: rgba( 0, 0, 0, 0.28 );
	content: "";
	inset: 0;
	position: absolute;
}

.iep-landing__hero-inner {
	--iep-hero-gap: 2.125rem;

	align-items: center;
	color: #fff;
	display: flex;
	flex-direction: column;
	gap: var( --iep-hero-gap );
	max-width: 66rem;
	position: relative;
	text-align: center;
	width: 100%;
}

/* The display face is set on the qualified selector above, not here: at (0,1,0)
   this block loses to the `.iep-landing h1` reset and never applied it. */
.iep-landing__hero-title {
	display: flex;
	flex-direction: column;
	font-size: clamp( 2.25rem, 5vw, 3.5rem );
	line-height: 1.18;
}

/*
 * The subtitle sits 14px under the title, against the 34px the hero gap puts
 * between every other pair. A flex `gap` is uniform and cannot be varied per
 * pair, so the difference is taken back as a negative top margin rather than by
 * zeroing the gap and re-adding margins to the three blocks below.
 *
 * Written `p.iep-landing__…` for the usual reason in this file: `.iep-landing p`
 * is (0,1,1) and would outrank a bare class.
 */
.iep-landing p.iep-landing__hero-subtitle {
	margin-top: calc( 0.875rem - var( --iep-hero-gap ) );
}

.iep-landing__hero-subtitle {
	font-size: 1rem;
	line-height: 1.375;
	max-width: 48rem;
}


/* Social proof ------------------------------------------------------------ */

.iep-landing__proof {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
	padding: 0.5rem;
}

.iep-landing__avatars {
	display: flex;
}

.iep-landing__avatar {
	background: #e7e7ea;
	border: 2px solid #fff;
	border-radius: 999px;
	display: block;
	height: 48px;
	object-fit: cover;
	width: 48px;
}

.iep-landing__avatar + .iep-landing__avatar {
	margin-left: -16px;
}

.iep-landing__rating {
	align-items: center;
	background: #e7e7ea;
	border: 2px solid #fff;
	border-radius: 100px;
	display: flex;
	filter: drop-shadow( 0 0 7px rgba( 0, 0, 0, 0.05 ) );
	gap: 2px;
	padding: 5px 12px;
}

.iep-landing__rating img {
	display: block;
}

.iep-landing__rating-value {
	color: #114e60;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: -0.2px;
	line-height: 1.6;
}

.iep-landing__audience {
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.75;
}

/* Promises ---------------------------------------------------------------- */

.iep-landing__promises {
	box-sizing: border-box;
	margin: clamp( 2.5rem, 5vw, 3.375rem ) auto;
	max-width: 78.75rem;
	padding: 0 var( --iep-gutter );
	width: 100%;
}

/* One row of four on a desktop, as the mockup has it. The four promises are
   an even set — broken across two lines they read as two pairs, which is a
   different claim. `nowrap` holds the line and the copy below is allowed to
   wrap inside its own column instead. */
.iep-landing__promise-list {
	display: flex;
	flex-wrap: nowrap;
	gap: 1.5rem 2rem;
	justify-content: space-between;
	list-style: none;
	margin: 0;
	padding: 0;
}

.iep-landing__promise {
	align-items: center;
	display: flex;
	gap: 0.75rem;
	margin: 0;
	min-width: 0;
}

.iep-landing__promise-icon {
	align-items: center;
	background: #000;
	border-radius: 60px;
	display: flex;
	flex-shrink: 0;
	justify-content: center;
	padding: 12px;
}

.iep-landing__promise-icon img {
	display: block;
	height: 22px;
	width: 22px;
}

.iep-landing__promise-copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.iep-landing__promise-copy strong {
	font-size: 1rem;
	font-weight: 400;
}

.iep-landing__promise-copy span {
	font-size: 0.875rem;
	font-weight: 300;
}

/* Section headings -------------------------------------------------------- */

.iep-landing__heading {
	margin: 0 auto clamp( 2rem, 4vw, 2.75rem );
	max-width: 42.75rem;
	text-align: center;
}

.iep-landing__heading h2 {
	font-family: var( --iep-display );
	font-size: clamp( 1.75rem, 3.2vw, 2.375rem );
	line-height: 1.3;
}

.iep-landing__heading p {
	color: var( --iep-muted );
	font-size: 1rem;
	line-height: 1.375;
	margin-top: 0.5rem;
}

/* Card grids -------------------------------------------------------------- */

/*
 * `grid-auto-rows: 1fr` is what makes every card the same height. Without it
 * each row sizes to its own tallest card, so the second row of the audience
 * grid — whose descriptions run to two lines more often — stood taller than
 * the first. The cards then stretch to fill their track and centre their own
 * contents, so equal boxes do not mean text stuck to the top.
 */
.iep-landing__cards {
	display: grid;
	gap: 1.25rem;
	grid-auto-rows: 1fr;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	list-style: none;
	margin: 0;
	padding: 0;
}

.iep-landing__card {
	background: var( --iep-surface );
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: center;
	margin: 0;
	/* 148px tall in the design, which this padding plus two lines of
	   description arrives at. */
	min-height: 9.25rem;
	padding: 1.75rem 2.75rem;
	text-align: center;
}

.iep-landing__card h3 {
	font-size: 1.25rem;
	line-height: 1.6;
}

.iep-landing__card p {
	color: #000;
	font-size: 1rem;
	line-height: 1.5;
	margin-top: 0.25rem;
}

/* The steps carry a one-line description rather than a wrapped one, so the
   design gives them a shorter box: 126px against the audience cards' 148. */
.iep-landing__cards--steps .iep-landing__card {
	min-height: 7.875rem;
	padding: 1.5rem 2.5rem;
}

/*
 * The 44px the design puts between a block and the button that closes it.
 *
 * Written as `p.iep-landing__…` on purpose: `.iep-landing p { margin: 0 }`
 * above is (0,1,1) and would otherwise outrank a plain class selector, which
 * is exactly how these buttons ended up sitting flush against the block above
 * them. Qualifying by element takes it to (0,2,1) and wins on merit rather
 * than with `!important`.
 */
.iep-landing p.iep-landing__section-cta,
.iep-landing p.iep-landing__closing-actions {
	margin-top: 2.75rem;
}

/* The hero is the exception: its button sits flush under the social proof
   rather than 44px below it. */
.iep-landing p.iep-landing__hero-cta {
	margin-top: 0;
}

.iep-landing__section-cta {
	text-align: center;
}

/* Benefits ---------------------------------------------------------------- */

.iep-landing__benefits {
	align-items: center;
	display: grid;
	gap: clamp( 2rem, 5vw, 6rem );
	grid-template-columns: minmax( 0, 540fr ) minmax( 0, 534fr );
}

.iep-landing__benefits-media {
	background-color: var( --iep-surface );
	background-image: var( --iep-landing-benefits );
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	min-height: 33.375rem;
}

.iep-landing__benefits-copy h2 {
	font-size: clamp( 1.75rem, 3.2vw, 2.375rem );
	line-height: 1.3;
	margin-bottom: 1.5rem;
}

.iep-landing__benefit + .iep-landing__benefit {
	margin-top: 1.125rem;
}

.iep-landing__benefit h3 {
	font-size: 1.125rem;
	line-height: 1.375;
}

.iep-landing__benefit p {
	color: #000;
	font-size: 0.9375rem;
	line-height: 1.467;
	margin-top: 0.5rem;
}

/* Testimonials ------------------------------------------------------------ */

/* The black band runs the full width of the page; only its contents are held
   to the mockup's measure and centred. */
.iep-landing__reviews {
	background: var( --iep-dark );
	box-sizing: border-box;
	color: #fff;
	padding: clamp( 3rem, 6vw, 5.5rem ) var( --iep-gutter );
	width: 100%;
}

/*
 * One column now, not two. The score band that used to sit beside the reviews
 * is gone: Genius Reviews prints its own rating summary above the carousel, so
 * a second one would have been the same number stated twice.
 */
.iep-landing__reviews-inner {
	margin: 0 auto;
	max-width: 78.9375rem;
}

/*
 * 38px, the same clamp every other section heading on the page carries: it
 * resolves to 2.375rem from about 1190px up and steps down below that, so this
 * title never ends up larger than the ones around it on a narrow screen.
 *
 * Written `h2.iep-landing__…` for the margin's sake: the `.iep-landing h1, h2,
 * h3 { margin: 0 }` reset near the top is (0,1,1) and a bare class here is
 * (0,1,0), so the reset was winning and the margin never applied. Qualifying by
 * element takes it to (0,2,1) — the same fix the CTA spacings needed against
 * the `.iep-landing p` reset.
 */
.iep-landing h2.iep-landing__reviews-title {
	font-size: clamp( 1.75rem, 3.2vw, 2.375rem );
	line-height: 1.3;
	margin-bottom: 1rem;
}

/*
 * Genius Reviews is styled for a light page and this band is black, so the
 * few colours it sets rather than inherits are restated here. Everything else
 * — card titles, quotes — already inherits the white above.
 *
 * Scoped inside `.iep-landing__reviews` so the same carousel on the home page
 * is untouched.
 */
.iep-landing__reviews .gr-review-card-author,
.iep-landing__reviews .gr-review-card-date,
.iep-landing__reviews .gr-carousel-count {
	color: rgba( 255, 255, 255, 0.66 );
}

.iep-landing__reviews .gr-splide-button {
	color: #fff;
}

/* FAQ --------------------------------------------------------------------- */

.iep-landing__faq {
	align-items: start;
	display: grid;
	gap: clamp( 2rem, 8vw, 9.5rem );
	grid-template-columns: minmax( 0, 468fr ) minmax( 0, 639fr );
}

.iep-landing__faq-heading h2 {
	font-family: var( --iep-display );
	font-size: clamp( 2rem, 3.2vw, 2.375rem );
	line-height: 1.3;
}

.iep-landing__faq-heading p {
	font-family: var( --iep-body );
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.4;
	margin-top: 1.25rem;
}

.iep-landing__faq-list {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.iep-landing__faq-item {
	background: var( --iep-surface );
}

.iep-landing__faq-question {
	margin: 0;
}

/* The trigger is a button so the drawer is reachable by keyboard and announced
   as expandable; every one of the theme's button styles has to be undone for it
   to read as the mockup's plain row. */
.iep-landing__faq-trigger {
	align-items: center;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: inherit;
	cursor: pointer;
	display: flex;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 500;
	gap: 1.5rem;
	justify-content: space-between;
	line-height: 1.375;
	margin: 0;
	min-height: 3.1875rem;
	padding: 0.75rem 1.25rem;
	text-align: left;
	text-transform: none;
	width: 100%;
}

.iep-landing__faq-trigger:hover,
.iep-landing__faq-trigger:focus {
	background: none;
	color: inherit;
}

.iep-landing__faq-trigger img {
	display: block;
	flex-shrink: 0;
	height: 8px;
	transition: transform 0.26s ease;
	width: 14px;
}

.iep-landing__faq-trigger[aria-expanded="true"] img {
	transform: rotate( 180deg );
}

.iep-landing__faq-answer {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.26s ease;
}

/* The padding lives on an inner element rather than the animated box: padding
   on the box itself keeps a closed drawer visibly open by its own height. */
.iep-landing__faq-answer p {
	color: var( --iep-muted );
	font-size: 0.9375rem;
	line-height: 1.6;
	padding: 0 1.25rem 1.25rem;
}

/* Closing call to action -------------------------------------------------- */

.iep-landing__closing {
	align-items: center;
	background-color: #3d352c;
	background-image: var( --iep-landing-cta );
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	box-sizing: border-box;
	display: flex;
	justify-content: center;
	margin: clamp( 3rem, 7vw, 5.5rem ) auto 0;
	max-width: 78.75rem;
	min-height: 30.875rem;
	padding: clamp( 3rem, 7vw, 5rem ) var( --iep-gutter );
	position: relative;
	width: 100%;
}

.iep-landing__closing::before {
	background: rgba( 0, 0, 0, 0.32 );
	content: "";
	inset: 0;
	position: absolute;
}

.iep-landing__closing-inner {
	color: #fff;
	max-width: 40rem;
	position: relative;
	text-align: center;
}

.iep-landing__closing-inner h2 {
	font-family: var( --iep-display );
	font-size: clamp( 1.75rem, 3.2vw, 2.375rem );
	line-height: 1.3;
}

.iep-landing__closing-inner > p {
	font-size: 1rem;
	line-height: 1.5;
	margin-top: 1rem;
}

.iep-landing__closing-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: center;
}

/* Responsive -------------------------------------------------------------- */

@media ( max-width: 64rem ) {
	.iep-landing__cards {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}

	.iep-landing__benefits,
	.iep-landing__faq {
		grid-template-columns: minmax( 0, 1fr );
	}

	.iep-landing__benefits-media {
		min-height: 22rem;
		order: -1;
	}

	/*
	 * Below the desktop measure the four promises stay on one line and the row
	 * scrolls instead of breaking: as a set of four they read as one claim, and
	 * two stacked pairs read as two. The overflow is the affordance — the
	 * fourth item is deliberately left cut off at the right edge so it is
	 * visible that the row continues.
	 *
	 * Touch and trackpad scroll this natively; `iep-landing.js` adds
	 * click-and-drag for a mouse.
	 */
	.iep-landing__promise-list {
		flex-wrap: nowrap;
		justify-content: flex-start;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.iep-landing__promise-list::-webkit-scrollbar {
		display: none;
	}

	.iep-landing__promise {
		flex: 0 0 auto;
		scroll-snap-align: start;
	}

	/* Let the row run to the edges of the screen so the cut-off item sits at
	   the viewport edge rather than inside a gutter, which is what makes it
	   read as scrollable. */
	.iep-landing__promises {
		padding-left: 0;
		padding-right: 0;
	}

	.iep-landing__promise-list {
		padding: 0 var( --iep-gutter );
	}

	.iep-landing__promise-list.is-dragging {
		cursor: grabbing;
		scroll-snap-type: none;
		user-select: none;
	}
}

@media ( max-width: 40rem ) {
	.iep-landing__cards {
		grid-template-columns: minmax( 0, 1fr );
	}

	.iep-landing__hero {
		min-height: 32rem;
	}

	.iep-landing__closing-actions .iep-landing__button {
		flex: 1 1 100%;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.iep-landing__faq-answer,
	.iep-landing__faq-trigger img,
	.iep-landing__button {
		transition: none;
	}
}

/* Registration dialog ------------------------------------------------------
 *
 * The registration form no longer has a page of its own to walk to: every call
 * to action on this page opens it here. The dialog is `position: fixed`, so it
 * escapes the theme's containers without the `calc( 50% - 50vw )` trick the
 * full-bleed sections above need.
 *
 * Styling stops at the frame. What is inside is iep-registration.css — the
 * same stylesheet the standalone page loads — so the two can never drift; the
 * only overrides here are the ones the frame forces, and they are at the
 * bottom of this block.
 *
 * Nothing the dialog needs in order to *work* is attached to `.is-open`.
 *
 * That class is added by the script at runtime, so it is never in the HTML that
 * WP Rocket's Remove Unused CSS analyses — and RUCSS drops rules for selectors
 * it cannot find, which is exactly how this block first shipped broken: the
 * panel had `opacity: 0` in its resting state and only `.is-open` turned it
 * back on. Stripped, that leaves a dialog that can never be seen.
 *
 * So the resting state — the `hidden` attribute removed, no class at all — is
 * the fully visible, correctly positioned dialog. `:not( .is-open )` then adds
 * the entrance animation on top. If RUCSS ever strips those two rules the
 * dialog stops animating and keeps working, which is the right way round.
 */

body.iep-landing-dialog-open {
	overflow: hidden;
}

/* The `hidden` attribute alone decides whether the dialog is up. */
.iep-landing__dialog[hidden] {
	display: none;
}

.iep-landing__dialog {
	position: fixed;
	inset: 0;
	z-index: 100000;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow-y: auto;
	padding: clamp( 0.75rem, 3vw, 2rem );
	font-family: var( --iep-body );
}

.iep-landing__dialog-backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 18, 18, 18, 0.6 );
	backdrop-filter: blur( 4px );
	-webkit-backdrop-filter: blur( 4px );
	cursor: pointer;
	transition: opacity 220ms ease;
}

.iep-landing__dialog-panel {
	position: relative;
	z-index: 1;
	box-sizing: border-box;
	width: min( 100%, 46rem );
	max-height: calc( 100vh - 2 * clamp( 0.75rem, 3vw, 2rem ) );
	overflow-y: auto;
	overscroll-behavior: contain;
	background: #fff;
	box-shadow: 0 24px 80px rgba( 0, 0, 0, 0.3 );
	transition: transform 220ms ease, opacity 220ms ease;
}

/* Entrance and exit, and nothing else. The script unhides the dialog, then adds
   `.is-open` on the next frame — so the panel starts from here and animates to
   its resting state, and on close it comes back here before being hidden. */
.iep-landing__dialog:not( .is-open ) .iep-landing__dialog-panel {
	opacity: 0;
	transform: translateY( 18px ) scale( 0.98 );
}

.iep-landing__dialog:not( .is-open ) .iep-landing__dialog-backdrop {
	opacity: 0;
}

.iep-landing__dialog-panel:focus {
	outline: none;
}

.iep-landing__dialog-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 2;
	display: inline-flex;
	width: 2.5rem;
	height: 2.5rem;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid rgba( 18, 18, 18, 0.2 );
	border-radius: 999px;
	background: #fff;
	box-shadow: none;
	color: var( --iep-ink );
	font-size: 1.5rem;
	font-weight: 300;
	line-height: 1;
	cursor: pointer;
}

.iep-landing__dialog-close:hover,
.iep-landing__dialog-close:focus-visible {
	border-color: var( --iep-ink );
	background: var( --iep-surface );
}

.iep-landing__dialog-body {
	padding: clamp( 2rem, 4vw, 3rem ) clamp( 1.25rem, 4vw, 3rem );
}

/* The form's own headline is sized for a panel standing beside a full-height
   photograph. In a dialog that has to fit a laptop's viewport alongside
   thirteen fields, that headline alone would take a third of the height. */
.iep-landing__dialog .iep-registration__title {
	font-size: clamp( 1.75rem, 4vw, 2.5rem );
	margin-bottom: 0.75rem;
	/* Clear of the close button, which sits over the panel's top-right. */
	padding-right: 3rem;
}

.iep-landing__dialog .iep-registration__signin {
	margin-bottom: 2rem;
}

.iep-landing__dialog .iep-notice {
	margin: 0;
}

@media ( max-width: 40rem ) {
	/* A dialog that fills the screen rather than floating in it: at this width
	   the form is taller than the viewport whatever the padding, so the frame
	   should stop pretending to be a card. */
	.iep-landing__dialog {
		padding: 0;
	}

	.iep-landing__dialog-panel {
		width: 100%;
		min-height: 100%;
		max-height: 100%;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.iep-landing__dialog-panel,
	.iep-landing__dialog-backdrop {
		transition: none;
	}

	/* No entrance to animate, so no reason to start from an invisible panel. */
	.iep-landing__dialog:not( .is-open ) .iep-landing__dialog-panel,
	.iep-landing__dialog:not( .is-open ) .iep-landing__dialog-backdrop {
		opacity: 1;
		transform: none;
	}
}
