/* ==========================================================================
   AERIS — Clean Luxury Bodycare
   Everything here builds on the tokens declared in theme.json.
   ========================================================================== */

:root {
	--aeris-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--aeris-dur: 0.5s;
	--aeris-hairline: 1px solid var(--wp--preset--color--hairline);
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* `overflow-x: hidden` on body makes body a scroll container, which silently
   breaks `position: sticky` on the header. `clip` prevents the same horizontal
   overflow without creating one. */
body { overflow-x: clip; }

::selection { background: var(--wp--preset--color--beige); color: var(--wp--preset--color--charcoal); }

:where(a):focus-visible,
:where(button):focus-visible,
:where(input, textarea, select):focus-visible {
	outline: 2px solid var(--wp--preset--color--rose-deep);
	outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Primitives
   -------------------------------------------------------------------------- */

.aeris-eyebrow {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--rose-deep);
	margin: 0;
}

.aeris-rule {
	display: block;
	width: 32px;
	height: 1px;
	background: var(--wp--preset--color--rose-gold);
	border: 0;
}

.aeris-rule--wide { width: 100%; }

.aeris-serif {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 300;
}

/* Buttons rendered by our own blocks (core buttons are styled via theme.json) */
.aeris-btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 20px 40px;
	border: 1px solid var(--wp--preset--color--charcoal);
	background: var(--wp--preset--color--charcoal);
	color: var(--wp--preset--color--ivory);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	line-height: 1;
	text-decoration: none;
	transition: background var(--aeris-dur) var(--aeris-ease),
		border-color var(--aeris-dur) var(--aeris-ease),
		color var(--aeris-dur) var(--aeris-ease);
}

.aeris-btn:hover,
.aeris-btn:focus-visible {
	background: var(--wp--preset--color--rose-deep);
	border-color: var(--wp--preset--color--rose-deep);
	color: var(--wp--preset--color--ivory);
}

.aeris-btn--secondary {
	background: transparent;
	color: var(--wp--preset--color--charcoal);
}

.aeris-btn--secondary:hover,
.aeris-btn--secondary:focus-visible {
	background: var(--wp--preset--color--charcoal);
	border-color: var(--wp--preset--color--charcoal);
	color: var(--wp--preset--color--ivory);
}

.aeris-btn__ext { font-size: 0.9em; letter-spacing: 0; }

/* Ghost / text link with the rose hairline — the DISCOVER PRODUCT treatment */
.aeris-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--wp--preset--color--rose-gold);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--rose-deep);
	text-decoration: none;
	transition: color var(--aeris-dur) var(--aeris-ease),
		border-color var(--aeris-dur) var(--aeris-ease);
}

.aeris-link::after {
	content: "→";
	transition: transform var(--aeris-dur) var(--aeris-ease);
}

.aeris-link:hover { color: var(--wp--preset--color--charcoal); border-color: var(--wp--preset--color--charcoal); }
.aeris-link:hover::after { transform: translateX(6px); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

/* WordPress wraps a template part in its own element, and a sticky element can
   only travel inside its parent's box — that wrapper is exactly header-height,
   so sticking has to be applied to the wrapper, not to .aeris-header. */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 90;
}

.aeris-header {
	position: relative;
	z-index: 90;
	border-bottom: var(--aeris-hairline);
}

/* The blur lives on a pseudo-element, never on .aeris-header itself:
   backdrop-filter makes an element a containing block for fixed-position
   descendants, which trapped the mobile menu overlay inside the 80px header. */
.aeris-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: color-mix(in srgb, var(--wp--preset--color--ivory) 88%, transparent);
	backdrop-filter: saturate(1.2) blur(14px);
}

.aeris-header .wp-block-navigation__responsive-container-open,
.aeris-header .wp-block-navigation__responsive-container-close { color: var(--wp--preset--color--charcoal); }

.aeris-header .wp-block-navigation-item__content {
	position: relative;
	padding-bottom: 4px;
}

.aeris-header .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 0;
	height: 1px;
	background: var(--wp--preset--color--rose-gold);
	transition: width var(--aeris-dur) var(--aeris-ease);
}

.aeris-header .wp-block-navigation-item__content:hover::after,
.aeris-header .current-menu-item .wp-block-navigation-item__content::after { width: 100%; }

.aeris-header .wp-block-site-title a { text-decoration: none; }

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

.aeris-hero { position: relative; overflow: hidden; }

.aeris-hero__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 5;
}

.aeris-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.06);
	animation: aeris-settle 2.4s var(--aeris-ease) forwards;
}

@keyframes aeris-settle { to { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
	.aeris-hero__media img { animation: none; transform: none; }
}

/* --------------------------------------------------------------------------
   Product cards
   -------------------------------------------------------------------------- */

.aeris-products .wp-block-post {
	position: relative;
}

.aeris-card__media {
	overflow: hidden;
	background: var(--wp--preset--color--beige-soft);
	margin-bottom: 24px;
	aspect-ratio: 4 / 5;
}

.aeris-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.1s var(--aeris-ease);
}

.aeris-products .wp-block-post:hover .aeris-card__media img,
.aeris-card:hover .aeris-card__media img { transform: scale(1.05); }

.aeris-products .wp-block-post-title a { text-decoration: none; }

/* --------------------------------------------------------------------------
   Product detail: specs, benefits, ingredients, how-to
   -------------------------------------------------------------------------- */

.aeris-specs { margin: 0; border-top: var(--aeris-hairline); }

.aeris-specs__row {
	display: flex;
	gap: 24px;
	padding: 18px 0;
	border-bottom: var(--aeris-hairline);
}

.aeris-specs__row dt {
	flex: 0 0 120px;
	margin: 0;
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--rose-deep);
}

.aeris-specs__row dd {
	margin: 0;
	font-size: var(--wp--preset--font-size--base);
	color: var(--wp--preset--color--warm-grey);
}

.aeris-benefits,
.aeris-ingredients,
.aeris-howto { margin: 0; padding: 0; list-style: none; }

.aeris-benefits {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 40px;
}

.aeris-benefits__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 400;
	margin: 0 0 10px;
}

.aeris-benefits__body {
	margin: 0;
	color: var(--wp--preset--color--warm-grey);
	font-size: var(--wp--preset--font-size--base);
}

.aeris-ingredients {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1px;
	background: var(--wp--preset--color--hairline);
	border: var(--aeris-hairline);
}

.aeris-ingredients__item {
	background: var(--wp--preset--color--surface);
	padding: 48px 40px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	transition: background var(--aeris-dur) var(--aeris-ease);
}

.aeris-ingredients__item:hover { background: var(--wp--preset--color--white); }

.aeris-ingredients__name {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xxl);
	font-weight: 400;
	margin: 0;
}

.aeris-ingredients__role {
	margin: 0;
	color: var(--wp--preset--color--warm-grey);
}

.aeris-howto { counter-reset: step; }

.aeris-howto__step {
	display: flex;
	gap: 28px;
	align-items: baseline;
	padding: 26px 0;
	border-bottom: var(--aeris-hairline);
}

.aeris-howto__step:first-child { border-top: var(--aeris-hairline); }

.aeris-howto__index {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xxl);
	font-weight: 300;
	color: var(--wp--preset--color--rose-gold);
	flex: 0 0 auto;
	line-height: 1;
}

.aeris-howto__text { color: var(--wp--preset--color--warm-grey); }

/* --------------------------------------------------------------------------
   Numbered "Why AERIS" list
   -------------------------------------------------------------------------- */

.aeris-index {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xxxl);
	font-weight: 300;
	color: var(--wp--preset--color--rose-gold);
	letter-spacing: 0.04em;
	line-height: 1;
	display: block;
}

/* --------------------------------------------------------------------------
   Skin journey
   -------------------------------------------------------------------------- */

.aeris-journey {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: clamp(16px, 3vw, 40px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.aeris-journey li {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xxl);
	font-weight: 300;
	color: var(--wp--preset--color--charcoal);
	display: flex;
	align-items: center;
	gap: clamp(16px, 3vw, 40px);
}

.aeris-journey li:not(:last-child)::after {
	content: "→";
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--base);
	color: var(--wp--preset--color--rose-gold);
}

/* --------------------------------------------------------------------------
   Social strip
   -------------------------------------------------------------------------- */

.aeris-social {
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.aeris-social a {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	padding-bottom: 3px;
	transition: border-color var(--aeris-dur) var(--aeris-ease);
}

.aeris-social a:hover { border-bottom-color: currentColor; }

/* Social tiles are a gallery block, so any number of images flows into the
   grid instead of stacking inside a fixed column.

   Core lays the gallery out with flex and `flex-grow: 1`, which makes a lone
   image on the last row stretch to the full width. Grid keeps every tile the
   same size no matter how many there are. */
.aeris-tiles.wp-block-gallery {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--40);
	align-items: start;
}

.aeris-tiles.wp-block-gallery .wp-block-image {
	width: auto !important;   /* core sets a percentage width for its flex layout */
	flex: initial;
	max-width: none;
}

.aeris-tiles.wp-block-gallery .wp-block-image {
	position: relative;
	overflow: hidden;
	margin: 0;
	background: var(--wp--preset--color--beige-soft);
}

.aeris-tiles.wp-block-gallery .wp-block-image img {
	width: 100%;
	height: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	display: block;
	transition: transform 1.1s var(--aeris-ease);
}

.aeris-tiles.wp-block-gallery .wp-block-image:hover img { transform: scale(1.06); }

@media (max-width: 900px) {
	.aeris-tiles.wp-block-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
	/* Two across on phones — four would be postage stamps. */
	.aeris-tiles.wp-block-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Legacy single-tile markup, kept so older content still renders. */
.aeris-tile {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1;
	background: var(--wp--preset--color--beige-soft);
}

.aeris-tile img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.1s var(--aeris-ease);
}

.aeris-tile:hover img { transform: scale(1.06); }

/* --------------------------------------------------------------------------
   FAQ accordion — native details/summary, no JS
   -------------------------------------------------------------------------- */

.aeris-faq { border-top: var(--aeris-hairline); }

.aeris-faq details { border-bottom: var(--aeris-hairline); }

.aeris-faq summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 30px 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 400;
	color: var(--wp--preset--color--charcoal);
	transition: color var(--aeris-dur) var(--aeris-ease);
}

.aeris-faq summary::-webkit-details-marker { display: none; }
.aeris-faq summary:hover { color: var(--wp--preset--color--rose-deep); }

.aeris-faq summary::after {
	content: "+";
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 300;
	color: var(--wp--preset--color--rose-deep);
	flex: 0 0 auto;
	transition: transform var(--aeris-dur) var(--aeris-ease);
}

.aeris-faq details[open] summary::after { content: "–"; }

.aeris-faq details > div {
	padding: 0 0 34px;
	max-width: 720px;
	color: var(--wp--preset--color--warm-grey);
	font-size: var(--wp--preset--font-size--lg);
}

/* --------------------------------------------------------------------------
   Editorial article body
   -------------------------------------------------------------------------- */

.aeris-article p { max-width: 68ch; }
.aeris-article h2 { margin-top: 2em; }
.aeris-article h3 { margin-top: 1.6em; }

.aeris-tip {
	border-left: 1px solid var(--wp--preset--color--rose-gold);
	padding: 8px 0 8px 32px;
	margin: 48px 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xl);
	font-style: italic;
	color: var(--wp--preset--color--charcoal);
}

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */

/* The hidden state is applied only once JS has confirmed it can reveal again —
   without this guard a JS failure would leave half the page permanently blank. */
.aeris-js .aeris-reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.9s var(--aeris-ease), transform 0.9s var(--aeris-ease);
}

.aeris-js .aeris-reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	.aeris-js .aeris-reveal { opacity: 1; transform: none; transition: none; }
}

@media print {
	.aeris-js .aeris-reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.aeris-footer a { color: var(--wp--preset--color--beige); }
.aeris-footer a:hover { color: var(--wp--preset--color--white); }
.aeris-footer .aeris-eyebrow { color: var(--wp--preset--color--rose-gold); }
.aeris-footer hr.wp-block-separator { border-color: rgba(192, 140, 125, 0.35); opacity: 1; }

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

@media (max-width: 781px) {
	.aeris-hero__media { aspect-ratio: 3 / 4; }
	.aeris-specs__row { flex-direction: column; gap: 6px; }
	.aeris-specs__row dt { flex: none; }
	.aeris-ingredients__item { padding: 36px 28px; }
	.aeris-journey li { font-size: var(--wp--preset--font-size--xl); }
}

/* --------------------------------------------------------------------------
   Contact form (Contact Form 7, restyled)
   -------------------------------------------------------------------------- */

.aeris-form { max-width: 560px; }

.aeris-form__row { display: flex; flex-direction: column; gap: 10px; margin: 0 0 28px; }

.aeris-form label {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--rose-deep);
}

.aeris-form input[type="text"],
.aeris-form input[type="email"],
.aeris-form textarea {
	width: 100%;
	padding: 16px 0;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	border-radius: 0;
	background: transparent;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 300;
	color: var(--wp--preset--color--charcoal);
	transition: border-color var(--aeris-dur) var(--aeris-ease);
}

.aeris-form input:focus,
.aeris-form textarea:focus {
	outline: none;
	border-bottom-color: var(--wp--preset--color--rose-gold);
}

.aeris-form textarea { resize: vertical; line-height: 1.7; }

.aeris-form input[type="submit"] {
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.aeris-form__actions { margin: 36px 0 0; }

.wpcf7 form .wpcf7-response-output {
	margin: 28px 0 0;
	padding: 18px 22px;
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: 0;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--charcoal);
	background: var(--wp--preset--color--surface);
}

.wpcf7 form.sent .wpcf7-response-output { border-color: var(--wp--preset--color--rose-gold); }
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output { border-color: #B4453C; }

.wpcf7-not-valid-tip {
	font-size: var(--wp--preset--font-size--xs);
	color: #B4453C;
	letter-spacing: 0.02em;
	text-transform: none;
}

.wpcf7-spinner { margin-left: 16px; }

/* --------------------------------------------------------------------------
   Fixes found in QA
   -------------------------------------------------------------------------- */

/* Core separators centre themselves; the AERIS rule is a left-aligned accent. */
hr.wp-block-separator.aeris-rule {
	margin: 0 0 4px;
	width: 32px;
	max-width: 32px;
	height: 1px;
	border: 0;
	background: var(--wp--preset--color--rose-gold);
	opacity: 1;
}

/* Header search: an icon, not a filled button. */
.aeris-header .wp-block-search__button {
	margin: 0;
	padding: 8px;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--charcoal);
	transition: color var(--aeris-dur) var(--aeris-ease);
}

.aeris-header .wp-block-search__button:hover { background: transparent; color: var(--wp--preset--color--rose-deep); }
.aeris-header .wp-block-search__button svg { width: 22px; height: 22px; fill: currentColor; }
.aeris-header .wp-block-search__inside-wrapper { border: 0; }

.aeris-header .wp-block-search__input {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	border-radius: 0;
	background: transparent;
	padding: 8px 0;
	font-size: var(--wp--preset--font-size--sm);
}

/* Keep the hero portrait from dominating tall desktop viewports. */
.aeris-hero__media { max-height: 640px; }
.aeris-hero__media .wp-block-image,
.aeris-hero__media figure { height: 100%; margin: 0; }
.aeris-hero__media img { height: 100%; object-fit: cover; }

/* Buy button inside the sticky header is a compact variant. */
.aeris-header .aeris-btn { padding: 14px 26px; font-size: var(--wp--preset--font-size--xs); }

/* Read-more link rendered by the query loop should read as the ghost CTA. */
.wp-block-read-more.aeris-link { display: inline-flex; }

/* Cover blocks default their inner text to white. The journey band sits on a
   pale texture, so it keeps the normal AERIS ink. */
.aeris-journey,
.aeris-journey li { color: var(--wp--preset--color--charcoal); }

/* --------------------------------------------------------------------------
   Mobile header
   -------------------------------------------------------------------------- */

@media (max-width: 781px) {
	.aeris-header .aeris-btn {
		padding: 12px 16px;
		letter-spacing: 0.1em;
		white-space: nowrap;
	}
	.aeris-header .aeris-btn__ext { display: none; }
	.aeris-header .wp-block-site-logo img { width: 96px; }
	.aeris-header .wp-block-group { gap: 12px; }
}

@media (max-width: 480px) {
	/* The marketplace CTA is one tap away in the menu and the footer, so the
	   small-screen header keeps only wordmark, menu and search. */
	.aeris-header .aeris-buy { display: none; }
}

/* Mobile navigation overlay */
.wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--60);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: var(--wp--preset--spacing--40);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xxl);
	font-weight: 300;
	letter-spacing: 0;
	text-transform: none;
}

/* --------------------------------------------------------------------------
   Design audit fixes
   -------------------------------------------------------------------------- */

/* The root block gap left a 32px ivory band between the last section and the
   footer on every page. Header and footer sit flush against the content. */
.wp-site-blocks > .wp-block-template-part,
.wp-site-blocks > main { margin-block-start: 0; }

/* Footer link lists: markers read as unstyled default HTML, not as a brand. */
.aeris-footer__list {
	list-style: none;
	margin: 20px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.aeris-footer__list li { margin: 0; }

.aeris-footer__list a {
	text-decoration: none;
	border-bottom: 1px solid transparent;
	padding-bottom: 2px;
	transition: border-color var(--aeris-dur) var(--aeris-ease), color var(--aeris-dur) var(--aeris-ease);
}

.aeris-footer__list a:hover { border-bottom-color: currentColor; }

/* Legal strip: copyright · social · email on one balanced line. */
.aeris-footer__legal { gap: 24px; }
.aeris-footer__legal p { margin: 0; }
.aeris-footer__legal .aeris-social { gap: 24px; }
.aeris-footer__legal .aeris-social a { color: var(--wp--preset--color--beige); }
.aeris-footer__legal .aeris-social a:hover { color: var(--wp--preset--color--white); }

@media (max-width: 781px) {
	.aeris-footer__legal { flex-direction: column; align-items: flex-start; gap: 20px; }
}

/* Sticky header gained a class on scroll but nothing used it. */
.aeris-header.is-scrolled {
	box-shadow: 0 12px 40px -32px rgba(46, 39, 36, 0.55);
	border-bottom-color: var(--wp--preset--color--hairline);
}

/* Product tiles: unequal copy lengths left the CTAs on ragged baselines. */
.aeris-products .wp-block-post {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.aeris-products .wp-block-post > .aeris-card {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.aeris-products .aeris-card > .wp-block-read-more { margin-top: auto; padding-top: 24px; }
.aeris-products .aeris-card > .wp-block-post-excerpt { margin-bottom: 8px; }

/* Hero portrait is a face-forward shot; bias the cover crop upward so the
   subject never loses her head to the max-height. */
.aeris-hero__media img { object-position: 50% 18%; }

/* Constrained-layout children carry `margin-inline: auto`. Harmless in normal
   flow, but once the card became a flex column those auto margins stopped the
   items stretching and centred them instead — which silently centred every
   product title. Pin them back to the card's left edge. */
.aeris-products .aeris-card > * {
	/* WordPress ships those auto margins with !important, so matching it is the
	   only way to win without restructuring the card markup. */
	margin-left: 0 !important;
	margin-right: 0 !important;
	max-width: 100%;
	align-self: stretch;
}

/* --------------------------------------------------------------------------
   Reviews
   The card look is attached to the STRUCTURE, not to per-block attributes, so
   a review added or duplicated in the editor is styled automatically. Nothing
   here depends on the author picking a font.
   -------------------------------------------------------------------------- */

.aeris-reviews .wp-block-column {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: var(--wp--preset--spacing--70) var(--wp--preset--spacing--60);
	background: var(--wp--preset--color--beige-soft);
}

/* Any paragraph inside a review is the quote. */
.aeris-reviews .wp-block-column p {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xl);
	font-style: italic;
	font-weight: 400;
	line-height: 1.45;
	color: var(--wp--preset--color--charcoal);
}

/* Attribution: the last heading in the card. */
.aeris-reviews .wp-block-column :is(h1, h2, h3, h4, h5, h6) {
	margin: 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--rose-deep);
}

.aeris-reviews .wp-block-column hr.wp-block-separator {
	margin: 0;
	width: 32px;
	max-width: 32px;
	height: 1px;
	border: 0;
	background: var(--wp--preset--color--rose-gold);
	opacity: 1;
}

/* Keep the quote at the top and the attribution pinned to the bottom so cards
   of unequal length still line up. */
.aeris-reviews .wp-block-column hr.wp-block-separator { margin-top: auto; }

@media (max-width: 781px) {
	.aeris-reviews .wp-block-column {
		padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
	}
}

/* ==========================================================================
   Small-screen header
   Layout: burger (left) · logo (centre) · Buy on Shopee (right).
   Search moves into the menu panel — it is a secondary action on a nine-page
   catalogue, while the marketplace CTA is the primary one and stays visible.
   ========================================================================== */

/* The search that sits in the header actions is desktop-only… */
.aeris-header__actions .wp-block-search { display: block; }
/* …and the one inside the menu is mobile-only. */
.aeris-menu-search { display: none; }

/* 600px is where the WordPress navigation block swaps to its overlay —
   the header layout must switch at exactly the same width. */
@media (max-width: 600px) {

	/* A 3-column grid keeps the logo optically centred no matter how wide the
	   burger or the CTA happen to be — flex centring drifts with them. */
	.aeris-header > .wp-block-group {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		align-items: center;
		gap: 12px;
	}

	.aeris-header .wp-block-navigation {
		/* grid-row is explicit: the logo comes first in the DOM but sits in
		   column 2, so auto-placement would push these onto a second row. */
		grid-row: 1;
		grid-column: 1;
		justify-self: start;
	}

	.aeris-header .wp-block-site-logo {
		grid-row: 1;
		grid-column: 2;
		justify-self: center;
		margin: 0;
	}

	.aeris-header__actions {
		grid-row: 1;
		grid-column: 3;
		justify-self: end;
	}

	/* Search belongs to the panel on small screens. */
	.aeris-header__actions .wp-block-search { display: none; }
	.aeris-menu-search { display: block; }

	/* Marketplace CTA stays in the bar, compact. */
	.aeris-header .aeris-buy { display: block; }

	.aeris-header .aeris-btn {
		padding: 11px 14px;
		font-size: 11px;
		letter-spacing: 0.08em;
		white-space: nowrap;
	}

	/* Burger and close icons sized for a comfortable tap target. */
	.aeris-header .wp-block-navigation__responsive-container-open,
	.aeris-header .wp-block-navigation__responsive-container-close {
		padding: 8px;
		margin: -8px;
	}
}


/* --------------------------------------------------------------------------
   Mobile menu panel — a top sheet covering 80% of the screen
   -------------------------------------------------------------------------- */

/* 600px is where the WordPress navigation block swaps to its overlay —
   the header layout must switch at exactly the same width. */
@media (max-width: 600px) {

	.wp-block-navigation__responsive-container.is-menu-open {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: auto;
		height: 80vh;
		height: 80dvh;
		display: flex;
		flex-direction: column;
		padding: clamp(20px, 6vw, 32px);
		padding-top: 88px;
		background: var(--wp--preset--color--ivory);
		border-bottom: 1px solid var(--wp--preset--color--hairline);
		box-shadow: 0 40px 80px -50px rgba(46, 39, 36, 0.5);
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation__responsive-container-content {
		display: flex;
		flex-direction: column;
		flex: 1;
		width: 100%;
	}

	.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation__container {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
		width: 100%;
	}

	.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation-item {
		width: 100%;
		border-bottom: 1px solid var(--wp--preset--color--hairline);
	}

	.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation-item__content {
		display: block;
		width: 100%;
		padding: 18px 0;
		font-family: var(--wp--preset--font-family--display);
		font-size: var(--wp--preset--font-size--xxl);
		font-weight: 300;
		letter-spacing: 0;
		text-transform: none;
		color: var(--wp--preset--color--charcoal);
	}

	/* The underline animation from the desktop bar would fight the divider. */
	.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation-item__content::after { display: none; }

	.wp-block-navigation__responsive-container-close {
		position: absolute;
		top: 26px;
		right: clamp(20px, 5vw, 32px);
		color: var(--wp--preset--color--charcoal);
	}

	/* Search sits at the foot of the panel, pushed down away from the links. */
	.aeris-menu-search {
		position: static !important;
		margin-top: auto;
		padding-top: 28px;
		width: 100%;
	}

	.aeris-menu-search .wp-block-search__inside-wrapper { position: static; }

	.aeris-menu-search .wp-block-search__inside-wrapper {
		border: 0;
		border-bottom: 1px solid var(--wp--preset--color--hairline);
		padding: 0;
	}

	.aeris-menu-search .wp-block-search__input {
		border: 0;
		background: transparent;
		padding: 12px 0;
		font-size: var(--wp--preset--font-size--base);
	}

	.aeris-menu-search .wp-block-search__button {
		background: transparent;
		border: 0;
		padding: 8px;
		color: var(--wp--preset--color--charcoal);
	}

	.aeris-menu-search .wp-block-search__button svg { width: 20px; height: 20px; fill: currentColor; }
}


/* Long label by default, short label only where space is tight. */
.aeris-btn__short { display: none; }

/* 600px is where the WordPress navigation block swaps to its overlay —
   the header layout must switch at exactly the same width. */
@media (max-width: 600px) {
	.aeris-header .aeris-btn__label { display: none; }
	.aeris-header .aeris-btn__short { display: inline; }
}

/* A single long token (#AERISCONFIDENT) cannot wrap, so it overflowed narrow
   phones — and `overflow-x: clip` would have hidden the damage rather than
   showing it. Scale it to the viewport instead of letting it be cropped. */
.aeris-hashtag {
	font-size: clamp(1.5rem, 8.2vw, 3.5rem);
	overflow-wrap: break-word;
}

/* General safety net: no heading should ever push the page sideways. */
:where(h1, h2, h3, h4, h5, h6) { overflow-wrap: break-word; }

/* ==========================================================================
   Header at medium widths (601px – desktop)
   The nav is inline here, and if it does not fit it must scroll sideways
   rather than wrap onto a second line and double the header height.
   ========================================================================== */

.aeris-header > .wp-block-group {
	flex-wrap: nowrap;
}

.aeris-header .wp-block-navigation {
	min-width: 0; /* lets the nav shrink instead of forcing the row to wrap */
}

.aeris-header .wp-block-navigation__container {
	flex-wrap: nowrap;
	max-width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;              /* Firefox */
	-ms-overflow-style: none;           /* old Edge */
	-webkit-overflow-scrolling: touch;
}

.aeris-header .wp-block-navigation__container::-webkit-scrollbar {
	display: none;                      /* the bar would sit on the hairline */
}

.aeris-header .wp-block-navigation-item {
	flex: 0 0 auto;                     /* never squash a label mid-word */
}

/* The logo and the actions keep their size while the nav absorbs the squeeze. */
.aeris-header .wp-block-site-logo,
.aeris-header__actions {
	flex: 0 0 auto;
}

/* The overlay container must not inherit the horizontal scrolling. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	flex-wrap: wrap;
	overflow: visible;
}

/* --------------------------------------------------------------------------
   Search fields: give the placeholder breathing room
   -------------------------------------------------------------------------- */

.wp-block-search__input {
	padding-left: 14px;
	padding-right: 14px;
}

.aeris-header__actions .wp-block-search__input {
	padding: 10px 14px;
}

.aeris-menu-search .wp-block-search__input {
	padding: 14px 16px;
}

.wp-block-search__input::placeholder {
	color: var(--wp--preset--color--warm-grey);
	opacity: 0.75;
	letter-spacing: 0.06em;
}

/* Medium widths: tighten the nav rhythm and shorten the CTA so the strip has
   room before it needs to scroll at all. */
@media (max-width: 1100px) {
	.aeris-header .wp-block-navigation__container { gap: 28px; }
	.aeris-header .wp-block-navigation { margin-left: 8px; }
}

@media (max-width: 900px) {
	.aeris-header .wp-block-navigation__container { gap: 22px; }
	.aeris-header .aeris-btn__label { display: none; }
	.aeris-header .aeris-btn__short { display: inline; }
	.aeris-header .aeris-btn { padding: 14px 20px; }
}

/* A soft fade on the right edge signals there is more nav to scroll to.
   Applied only while the strip actually overflows — otherwise it dims the
   last item for no reason. The class is toggled in assets/js/aeris.js. */
.aeris-header .wp-block-navigation.is-scrollable {
	position: relative;
	-webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), transparent 100%);
	mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), transparent 100%);
}

/* The nav is centre-justified. When its content is wider than the strip,
   plain `center` overflows equally on BOTH sides and the first items become
   unreachable. `safe` falls back to flex-start in exactly that case. */
.aeris-header .wp-block-navigation__container {
	justify-content: safe center;
}

/* Search wrappers inherit a white fill from core, which reads as a boxed
   field against the ivory ground. Every other input on the site is a
   bottom-hairline field; match it. */
.aeris-menu-search .wp-block-search__inside-wrapper,
.aeris-header__actions .wp-block-search__inside-wrapper {
	background: transparent;
}

/* ==========================================================================
   Reviews marquee
   A flex row squeezes every card as reviews are added (9 cards = 96px each,
   one letter per line). The row becomes a fixed-width track that loops
   continuously instead. Progressive enhancement: without JS it stays a
   normal, horizontally scrollable row.
   ========================================================================== */

.aeris-reviews .wp-block-column {
	/* Fixed card width is what stops the squeeze. border-box so the padding
	   is inside the stated width rather than adding ~96px to every card. */
	box-sizing: border-box;
	flex: 0 0 clamp(260px, 82vw, 380px);
	max-width: clamp(260px, 82vw, 380px);
}

/* No-JS / pre-enhancement fallback: scroll rather than squash. */
.aeris-reviews {
	overflow-x: auto;
	scrollbar-width: none;
}

.aeris-reviews::-webkit-scrollbar { display: none; }

/* --- enhanced ------------------------------------------------------------ */

.aeris-marquee {
	overflow: hidden;
	width: 100%;
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.aeris-marquee__track {
	display: flex;
	align-items: stretch;
	gap: var(--wp--preset--spacing--40);
	width: max-content;
	will-change: transform;
}

.aeris-marquee.is-animating .aeris-marquee__track {
	animation: aeris-marquee-rtl var(--aeris-marquee-duration, 48s) linear infinite;
}

/* Content travels left → right; the duplicated half makes the seam invisible. */
@keyframes aeris-marquee-rtl {
	from { transform: translateX(-50%); }
	to   { transform: translateX(0); }
}

/* Let people stop it to actually read a quote. */
.aeris-marquee:hover .aeris-marquee__track,
.aeris-marquee:focus-within .aeris-marquee__track {
	animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
	.aeris-marquee { overflow-x: auto; }
	.aeris-marquee.is-animating .aeris-marquee__track { animation: none; }
}

/* --------------------------------------------------------------------------
   Reviews rendered by the aeris/reviews block
   Semantic markup — a figure per review, blockquote for the words. Shares the
   marquee behaviour with the older column-based markup.
   -------------------------------------------------------------------------- */

.aeris-reviews .aeris-review {
	box-sizing: border-box;
	flex: 0 0 clamp(260px, 82vw, 380px);
	max-width: clamp(260px, 82vw, 380px);
	display: flex;
	flex-direction: column;
	gap: 24px;
	margin: 0;
	padding: var(--wp--preset--spacing--70) var(--wp--preset--spacing--60);
	background: var(--wp--preset--color--beige-soft);
}

.aeris-reviews .aeris-review__quote {
	margin: 0;
	padding: 0;
	border: 0;
}

.aeris-reviews .aeris-review__quote p {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--xl);
	font-style: italic;
	font-weight: 400;
	line-height: 1.45;
	color: var(--wp--preset--color--charcoal);
}

.aeris-reviews .aeris-review .aeris-rule { margin-top: auto; }

.aeris-reviews .aeris-review__author {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--rose-deep);
}

/* The block renders a plain flex row; the marquee JS upgrades it. */
.aeris-reviews {
	display: flex;
	gap: var(--wp--preset--spacing--40);
	align-items: stretch;
}

/* --------------------------------------------------------------------------
   Review star rating
   Small and rose-gold rather than large and yellow — the brief asked for
   editorial testimonials, not marketplace-style star blocks.
   -------------------------------------------------------------------------- */

.aeris-review__rating {
	display: flex;
	gap: 5px;
	align-items: center;
}

.aeris-star {
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
}

.aeris-star.is-filled { fill: var(--wp--preset--color--rose-gold); }

.aeris-star.is-empty {
	fill: none;
	stroke: var(--wp--preset--color--rose-gold);
	stroke-width: 1.4;
	opacity: 0.45;
}

/* --------------------------------------------------------------------------
   Brand values — Light / Clean / Soft / Confident
   Previously a 1080px JPEG upscaled to 1440x1800: soft edges, ~45KB, and the
   words were invisible to search and translation. Same design in live type.
   -------------------------------------------------------------------------- */

.aeris-values {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(120% 90% at 72% -10%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 55%),
		radial-gradient(90% 70% at 12% 110%, rgba(220, 205, 192, 0.45) 0%, rgba(220, 205, 192, 0) 60%),
		linear-gradient(160deg, var(--wp--preset--color--beige-soft) 0%, var(--wp--preset--color--ivory) 55%, var(--wp--preset--color--beige-soft) 100%);
}

/* A soft diagonal light shaft, echoing the original photograph. */
.aeris-values::before {
	content: "";
	position: absolute;
	inset: -20% -10%;
	background: linear-gradient(107deg, transparent 38%, rgba(255, 255, 255, 0.75) 47%, rgba(255, 255, 255, 0.35) 53%, transparent 62%);
	pointer-events: none;
}

.aeris-values__list {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp(20px, 3.5vw, 40px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.aeris-values__item {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(2.25rem, 7vw, 4.5rem);
	font-weight: 300;
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--rose-deep);
}

.aeris-values__divider {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	width: clamp(120px, 22vw, 190px);
	color: var(--wp--preset--color--rose-gold);
}

/* Hairlines either side of the sparkle. */
.aeris-values__divider::before,
.aeris-values__divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: currentColor;
	opacity: 0.55;
}

.aeris-values__divider svg {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	fill: currentColor;
}

/* Honeypot: hidden from people, reachable by bots that fill every field. */
.aeris-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Contact list rendered by the aeris/contact-details block. */
.aeris-contact { margin: 0; }

.aeris-contact__row { margin: 0 0 24px; }

.aeris-contact__row dt {
	margin: 0 0 4px;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--rose-deep);
}

.aeris-contact__row dd {
	margin: 0;
	font-size: var(--wp--preset--font-size--lg);
	color: var(--wp--preset--color--charcoal);
}

.aeris-contact__row dd a { text-decoration: none; border-bottom: 1px solid var(--wp--preset--color--hairline); padding-bottom: 2px; }
.aeris-contact__row dd a:hover { border-bottom-color: var(--wp--preset--color--rose-deep); }
