/* ==========================================================================
   Ambiance pages of an aspect (page-aspect.php): the original banner with a light sweeping the
   title according to the finish, the original format filter as chips, the ambiance photos
   grouped by format in an editorial mosaic. Each photo opens the original product popup.
   ========================================================================== */

.as {
	--as-ink: #0b0b0b;
	--as-graphite: #151514;
	--as-porcelain: #f4f2ee;
	--as-line: #e3dfd6;
	--as-text: #55524c;
	--as-muted: #8b877f;
	--as-gold: #c99a3f;
	--as-gold-soft: #e3c27a;
	--as-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--as-head: "Red Hat Display", var(--o-heading, sans-serif);
	--as-shine: 0.55; /* strength of the light on the finish */
	font-family: var(--o-body, Arial, sans-serif);
	color: var(--as-text);
	background: var(--as-porcelain);
}
.as--poli {
	--as-shine: 0.85;
}
.as--brillant {
	--as-shine: 0.65;
}
.as--satine {
	--as-shine: 0.32;
}
.as--mat-2 {
	--as-shine: 0;
}
.as-wrap {
	width: min(1240px, 100% - 40px);
	margin-inline: auto;
}
.as svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.as a:focus-visible,
.as button:focus-visible {
	outline: 2px solid var(--as-gold);
	outline-offset: 3px;
}

/* ------------------------------------------------------------ 1. Banner */
.as-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: min(88svh, 820px);
	padding-top: var(--header-h);
	overflow: hidden;
	color: #fff;
	background: var(--as-ink);
	isolation: isolate;
}
.as-hero__media {
	position: absolute;
	inset: 0;
	z-index: -2;
	background: var(--as-photo) 50% 55% / cover no-repeat;
	transform: scale(1.08);
	animation: as-settle 2.4s var(--as-ease) forwards;
}
.as-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.15) 70%, rgba(0, 0, 0, 0.55) 100%);
}
@keyframes as-settle {
	to {
		transform: scale(1);
	}
}
.as-hero__inner {
	padding-bottom: clamp(28px, 5vh, 48px);
}
.as-crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 14px;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.6);
}
.as-crumbs a {
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
}
.as-crumbs a:hover {
	color: var(--as-gold-soft);
}
.as-hero__title {
	margin: 0;
	font-family: var(--as-head);
	font-size: clamp(4.2rem, 1.5rem + 13vw, 13rem);
	font-weight: 700;
	line-height: 0.82;
	letter-spacing: -0.045em;
	color: #fff;
}
.as-hero__title span {
	display: inline-block;
	text-shadow: 0 6px 30px rgba(0, 0, 0, 0.35);
}
/* The finish catches the light: a band of light crosses the banner photo (none on Mat). */
.as-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(105deg, transparent 40%, rgba(255, 246, 225, var(--as-shine)) 50%, transparent 60%) -160% 0 / 250% 100% no-repeat;
	mix-blend-mode: soft-light;
	animation: as-sweep 7s 0.8s var(--as-ease) infinite;
}
@keyframes as-sweep {
	0% {
		background-position: -160% 0;
	}
	50%,
	100% {
		background-position: 260% 0;
	}
}
.as-hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 28px;
	margin: 22px 0 0;
	font-size: 15px;
	color: rgba(255, 255, 255, 0.75);
}
.as-hero__meta b {
	font-family: var(--as-head);
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--as-gold-soft);
	font-variant-numeric: tabular-nums;
}

.as-switch {
	border-top: 1px solid rgba(255, 255, 255, 0.16);
	background: rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(8px);
}
.as-switch ul {
	display: flex;
	gap: 4px;
	margin-block: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
}
.as-switch a {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 58px;
	padding: 0 18px;
	font-family: var(--as-head);
	font-size: 16px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.25s;
}
.as-switch a::after {
	content: "";
	position: absolute;
	inset: auto 18px 0;
	height: 2px;
	background: var(--as-gold);
	transform: scaleX(0);
	transition: transform 0.4s var(--as-ease);
}
.as-switch a:hover {
	color: #fff;
}
.as-switch a[aria-current] {
	color: #fff;
}
.as-switch a[aria-current]::after,
.as-switch a:hover::after {
	transform: none;
}

/* ------------------------------------------------------------ 2. Filter */
.as-filter {
	position: sticky;
	top: var(--mh-compact, 60px);
	z-index: 20;
	border-bottom: 1px solid var(--as-line);
	background: rgba(244, 242, 238, 0.92);
	backdrop-filter: blur(10px);
}
.as-filter .as-wrap {
	display: flex;
	align-items: center;
	gap: 18px;
	min-height: 72px;
}
.as-filter__label {
	margin: 0;
	font-family: var(--as-head);
	font-size: 15px;
	font-weight: 700;
	color: var(--as-ink);
}
.as-filter__chips {
	display: flex;
	gap: 8px;
	padding: 10px 2px;
	overflow-x: auto;
	scrollbar-width: none;
}
.as-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 0 16px;
	border: 1px solid var(--as-line);
	border-radius: 999px;
	background: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--as-ink);
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.as-chip span {
	font-size: 12px;
	font-weight: 500;
	color: var(--as-muted);
	font-variant-numeric: tabular-nums;
}
.as-chip:hover {
	border-color: var(--as-ink);
}
.as-chip.is-on {
	border-color: var(--as-ink);
	background: var(--as-ink);
	color: #fff;
}
.as-chip.is-on span {
	color: var(--as-gold-soft);
}
.as-chip:disabled {
	opacity: 0.4;
	cursor: default;
}

/* ------------------------------------------------------------ 3. Ambiances */
.as-body {
	padding: clamp(36px, 5vw, 72px) 0 clamp(56px, 8vw, 110px);
}
.as-group + .as-group {
	margin-top: clamp(48px, 6vw, 88px);
}
.as-group[hidden] {
	display: none;
}
.as-group__head {
	display: flex;
	align-items: flex-end;
	gap: 16px;
	margin-bottom: 22px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--as-line);
}
.as-group__glyph {
	flex: none;
	width: calc(var(--w) * 0.42px);
	height: calc(var(--h) * 0.42px);
	border: 1.5px solid var(--as-gold);
	background: rgba(201, 154, 63, 0.08);
}
.as-group__title {
	margin: 0;
	font-family: var(--as-head);
	font-size: clamp(1.8rem, 1.2rem + 2vw, 2.8rem);
	font-weight: 700;
	line-height: 0.95;
	letter-spacing: -0.02em;
	color: var(--as-ink);
}
.as-group__count {
	margin: 0 0 3px auto;
	font-size: 14px;
	color: var(--as-muted);
}

/* Mosaic: one wide + one narrow, then three equal; orphans fill the row. */
.as-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	grid-auto-rows: clamp(240px, 26vw, 360px);
	gap: clamp(12px, 1.4vw, 20px);
	margin: 0;
	padding: 0;
	list-style: none;
}
@media (min-width: 1024px) {
	.as-item {
		grid-column: span 4;
	}
	.as-item:nth-child(5n + 1) {
		grid-column: span 8;
	}
	.as-item:nth-child(5n + 1):last-child,
	.as-item:nth-child(5n + 3):last-child {
		grid-column: span 12;
	}
	.as-item:nth-child(5n + 3):nth-last-child(2),
	.as-item:nth-child(5n + 4):last-child {
		grid-column: span 6;
	}
}

.as-card {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 6px;
	background: var(--as-graphite);
	font: inherit;
	color: #fff;
	text-align: left;
	cursor: pointer;
	isolation: isolate;
}
.as-card.is-static {
	cursor: default;
}
.as-card__media {
	position: absolute;
	inset: 0;
	z-index: -2;
}
.as-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.4s var(--as-ease);
}
.as-card::after {
	content: "";
	position: absolute;
	inset: 40% 0 0;
	z-index: -1;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
	transition: opacity 0.4s;
}
/* A band of light crosses the photo on hover, as on a real finish. */
.as-card__shine {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, calc(var(--as-shine) * 0.45)) 50%, transparent 65%) -120% 0 / 250% 100% no-repeat;
	mix-blend-mode: soft-light;
	pointer-events: none;
}
.as-card__text {
	position: absolute;
	inset: auto 20px 18px;
	display: grid;
	gap: 4px;
	transition: transform 0.5s var(--as-ease);
}
.as-card__name {
	font-family: var(--as-head);
	font-size: clamp(1.25rem, 1rem + 0.8vw, 1.75rem);
	font-weight: 700;
	line-height: 1.05;
}
.as-card__fmt {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.75);
}
.as-card__cta {
	position: absolute;
	right: 18px;
	bottom: 18px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 16px;
	border-radius: 999px;
	background: #fff;
	font-size: 14px;
	font-weight: 600;
	color: var(--as-ink);
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.35s, transform 0.45s var(--as-ease), background-color 0.25s;
}
.as-card:focus-visible .as-card__cta {
	opacity: 1;
	transform: none;
}
@media (hover: hover) and (pointer: fine) {
	.as-card:not(.is-static):hover .as-card__media img {
		transform: scale(1.05);
	}
	.as-card:not(.is-static):hover .as-card__shine {
		background-position: 220% 0;
		transition: background-position 1.3s var(--as-ease);
	}
	.as-card:not(.is-static):hover .as-card__cta {
		opacity: 1;
		transform: none;
	}
	.as-card__cta:hover,
	.as-card:hover .as-card__cta {
		background: var(--as-gold-soft);
	}
}
/* Touch screens: the action stays visible. */
@media (hover: none), (pointer: coarse) {
	.as-card__cta {
		opacity: 1;
		transform: none;
		min-height: 40px;
		padding: 0 14px;
		font-size: 13px;
	}
	.as-card__text {
		right: 150px;
	}
}

/* Entrance of each group, once. */
.as-js .as-item {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.8s var(--as-ease), transform 0.9s var(--as-ease);
	transition-delay: calc(var(--i) % 5 * 70ms);
}
.as-js .as-item.is-in {
	opacity: 1;
	transform: none;
}

/* ------------------------------------------------------------ Other aspects */
.as-more {
	padding: clamp(56px, 7vw, 96px) 0;
	background: var(--as-ink);
	color: #fff;
}
.as-more__title {
	margin: 0 0 28px;
	font-family: var(--as-head);
	font-size: clamp(1.8rem, 1.2rem + 2vw, 2.8rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #fff;
}
.as-more__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(12px, 1.6vw, 22px);
	margin: 0;
	padding: 0;
	list-style: none;
}
.as-more__link {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: clamp(220px, 24vw, 320px);
	padding: 22px;
	overflow: hidden;
	border-radius: 6px;
	color: #fff;
	text-decoration: none;
	isolation: isolate;
}
.as-more__media {
	position: absolute;
	inset: 0;
	z-index: -1;
}
.as-more__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: brightness(0.62);
	transition: transform 1.2s var(--as-ease), filter 0.5s;
}
.as-more__name {
	font-family: var(--as-head);
	font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem);
	font-weight: 700;
	line-height: 1;
}
.as-more__count {
	margin-top: 6px;
	font-size: 14px;
	color: var(--as-gold-soft);
}
.as-more__link:hover .as-more__media img {
	transform: scale(1.05);
	filter: brightness(0.75);
}

/* ------------------------------------------------------------ Popup frame (local copy of the original popups) */
.mc-epop {
	position: fixed;
	inset: 0;
	z-index: 100000;
	width: 100%;
	height: 100%;
	border: 0;
	background: transparent;
	color-scheme: light;
}

/* ------------------------------------------------------------ Responsive */
@media (max-width: 1023px) {
	/* Below 1024 px the compact header keeps its utility bar (none on phones). */
	.as-filter {
		top: calc(var(--mh-utility, 40px) + var(--mh-compact, 60px));
	}
}
@media (min-width: 768px) and (max-width: 1023px) {
	.as-grid {
		grid-template-columns: repeat(6, minmax(0, 1fr));
		grid-auto-rows: clamp(220px, 34vw, 320px);
	}
	.as-item {
		grid-column: span 3;
	}
	.as-item:nth-child(3n + 1) {
		grid-column: span 6;
	}
	.as-item:nth-child(3n + 2):last-child {
		grid-column: span 6;
	}
}
@media (max-width: 767px) {
	.as-wrap {
		width: calc(100% - 32px);
	}
	.as-hero {
		min-height: 78svh;
	}
	.as-filter .as-wrap {
		min-height: 64px;
	}
	.as-filter__label {
		display: none;
	}
	.as-grid {
		grid-template-columns: minmax(0, 1fr);
		grid-auto-rows: auto;
	}
	.as-card {
		aspect-ratio: 4 / 3;
	}
	.as-item:nth-child(3n + 1) .as-card {
		aspect-ratio: 4 / 3.6;
	}
	.as-more__list {
		grid-template-columns: minmax(0, 1fr);
	}
	.as-more__link {
		min-height: 180px;
	}
	.as-group__glyph {
		width: calc(var(--w) * 0.32px);
		height: calc(var(--h) * 0.32px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.as *,
	.as *::before,
	.as *::after {
		animation: none !important;
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
	}
	.as-hero__media {
		transform: none;
	}
}
