/*
 * Atelia — Elementor widgets
 *
 * 01 Shared block heading
 * 02 Products
 * 03 Categories
 * 04 Lookbook
 * 05 Editorial banner
 * 06 Marquee
 * 07 Testimonials
 * 08 Newsletter
 * 09 Editor placeholders
 */

/* =========================================================================
 * 01 Shared block heading
 * ====================================================================== */

.at-el {
	--at-block-gap: clamp(1.5rem, 3vw, 2.75rem);
}

.at-blockhead {
	margin-bottom: var(--at-block-gap);
}

.at-blockhead--center {
	text-align: center;
}

.at-blockhead--center .at-eyebrow {
	justify-content: center;
}

.at-blockhead__title {
	margin: 0;
	font-size: var(--at-d-sm);
}

.at-blockhead__intro {
	max-width: 62ch;
	margin: var(--at-sp-3) 0 0;
	color: var(--at-muted);
}

.at-blockhead--center .at-blockhead__intro {
	margin-inline: auto;
}

.at-el-heading--ruled .at-blockhead::after {
	content: "";
	display: block;
	width: 46px;
	height: 1px;
	margin-top: var(--at-sp-4);
	background: var(--at-accent);
}

.at-el-heading--ruled .at-blockhead--center::after {
	margin-inline: auto;
}

/* =========================================================================
 * 02 Products
 * ====================================================================== */

.at-el-products__cta {
	margin-top: var(--at-block-gap);
	text-align: center;
}

.at-el-products--rail .at-el-products__viewport {
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x proximity;
	padding-bottom: var(--at-sp-3);
	margin-inline: calc(var(--at-gutter) * -1);
	padding-inline: var(--at-gutter);
}

.at-el-products--rail .at-products {
	display: flex;
	gap: clamp(0.75rem, 1.6vw, 1.5rem);
}

.at-el-products--rail .at-card {
	flex: 0 0 clamp(200px, calc(100% / var(--at-cols, 4) - 1rem), 320px);
	scroll-snap-align: start;
}

/* =========================================================================
 * 03 Categories
 * ====================================================================== */

.at-cats {
	--at-cols: 4;
	display: grid;
	grid-template-columns: repeat(var(--at-cols), minmax(0, 1fr));
	gap: clamp(0.75rem, 1.6vw, 1.5rem);
	list-style: none;
}

@media (max-width: 900px) {
	.at-cats {
		--at-cols: 2;
	}
}

@media (max-width: 480px) {
	.at-quotes {
		--at-cols: 1;
	}
}

.at-cat__link {
	display: block;
	position: relative;
}

.at-cat__media {
	display: block;
	overflow: hidden;
	border-radius: var(--at-radius);
	background: var(--at-canvas);
}

.at-cat__media img {
	width: 100%;
	object-fit: cover;
	transition: transform 0.8s var(--at-ease);
}

.at-cats--portrait .at-cat__media img { aspect-ratio: 3 / 4; }
.at-cats--square .at-cat__media img { aspect-ratio: 1 / 1; }
.at-cats--tall .at-cat__media img { aspect-ratio: 2 / 3; }

.at-cat__link:hover .at-cat__media img {
	transform: scale(1.04);
}

.at-cat__body {
	display: block;
	padding-top: var(--at-sp-3);
	text-align: center;
}

.at-cat__name {
	display: block;
	font-family: var(--at-font-display);
	font-size: var(--at-t-md);
	color: var(--at-ink);
	transition: color 0.2s var(--at-ease);
}

.at-cat__link:hover .at-cat__name {
	color: var(--at-accent-deep);
}

.at-cat__count {
	display: block;
	margin-top: 2px;
	font-size: var(--at-t-xs);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--at-muted);
}

/* =========================================================================
 * 04 Lookbook
 *
 * The signature element. Numbered markers sit on the photograph; opening one
 * reveals the piece without leaving the page.
 * ====================================================================== */

.at-look {
	margin: 0;
}

.at-look__media {
	position: relative;
	border-radius: var(--at-radius);
	overflow: hidden;
}

.at-look__media > img {
	width: 100%;
	object-fit: cover;
}

.at-look__spot {
	position: absolute;
	transform: translate(-50%, -50%);
	z-index: 2;
}

.at-look__dot {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 999px;
	background: rgba(var(--at-surface-rgb), 0.92);
	color: var(--at-ink);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0;
	box-shadow: 0 4px 16px -6px rgba(var(--at-ink-rgb), 0.5);
	transition: transform 0.25s var(--at-ease), background-color 0.25s var(--at-ease), color 0.25s var(--at-ease);
}

.at-look__dot::before {
	content: "";
	position: absolute;
	inset: -6px;
	border-radius: 999px;
	border: 1px solid rgba(var(--at-surface-rgb), 0.6);
	animation: at-pulse 2.6s var(--at-ease) infinite;
}

@keyframes at-pulse {
	0% { transform: scale(0.9); opacity: 0.9; }
	70% { transform: scale(1.35); opacity: 0; }
	100% { transform: scale(1.35); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.at-look__dot::before {
		animation: none;
		opacity: 0.5;
	}
}

.at-look__dot:hover,
.at-look__dot[aria-expanded="true"] {
	background: var(--at-ink);
	color: var(--at-surface);
	transform: scale(1.08);
}

.at-look__panel {
	position: absolute;
	top: calc(100% + 12px);
	left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	width: 260px;
	display: flex;
	gap: var(--at-sp-3);
	padding: var(--at-sp-3);
	background: var(--at-surface);
	border-radius: var(--at-radius-lg);
	box-shadow: 0 22px 48px -26px rgba(var(--at-ink-rgb), 0.6);
}

.at-look__panel[hidden] {
	display: none;
}

.at-look__thumb {
	flex: 0 0 68px;
}

.at-look__thumb img {
	width: 68px;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: var(--at-radius);
}

.at-look__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.at-look__name {
	font-size: var(--at-t-sm);
	color: var(--at-ink);
	line-height: 1.3;
}

.at-look__name:hover {
	color: var(--at-accent-deep);
}

.at-look__price {
	font-size: var(--at-t-xs);
	color: var(--at-muted);
}

.at-look__info .at-btn {
	margin-top: auto;
	align-self: flex-start;
}

.at-look__caption {
	margin-top: var(--at-sp-3);
	font-size: var(--at-t-xs);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--at-muted);
	text-align: center;
}

/* Keep panels inside the frame near the edges. */
.at-look__spot.is-edge-left .at-look__panel {
	left: 0;
	transform: none;
}

.at-look__spot.is-edge-right .at-look__panel {
	left: auto;
	right: 0;
	transform: none;
}

.at-look__spot.is-edge-bottom .at-look__panel {
	top: auto;
	bottom: calc(100% + 12px);
}

@media (max-width: 600px) {
	.at-look__panel {
		width: 220px;
	}
}

/* =========================================================================
 * 05 Editorial banner
 * ====================================================================== */

.at-el-editorial {
	display: grid;
	gap: 0;
	align-items: center;
}

@media (min-width: 860px) {
	.at-el-editorial {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	}

	.at-el-editorial--right .at-editorial__media {
		order: 2;
	}
}

.at-editorial__media img {
	width: 100%;
	height: 100%;
	min-height: 300px;
	object-fit: cover;
	border-radius: var(--at-radius);
}

.at-editorial__panel {
	padding: clamp(1.75rem, 4vw, 3.5rem);
	border-radius: var(--at-radius);
}

.at-el-editorial--canvas .at-editorial__panel {
	background: var(--at-canvas);
}

.at-el-editorial--surface .at-editorial__panel {
	background: var(--at-surface);
}

.at-el-editorial--deep .at-editorial__panel {
	background: var(--at-deep);
	color: rgba(255, 255, 255, 0.78);
}

.at-el-editorial--deep .at-editorial__title {
	color: #fff;
}

.at-el-editorial--deep .at-btn--primary {
	background: #fff;
	border-color: #fff;
	color: var(--at-deep);
}

.at-editorial__title {
	font-size: var(--at-d-md);
	margin-bottom: var(--at-sp-4);
}

.at-editorial__text {
	margin-bottom: var(--at-sp-5);
}

/* The overlap is what makes this read as editorial rather than a stock
   two-column block. Only applied where there is room for it. */
@media (min-width: 860px) {
	.at-el-editorial--overlap .at-editorial__panel {
		margin-left: -12%;
		position: relative;
		z-index: 2;
	}

	.at-el-editorial--overlap.at-el-editorial--right .at-editorial__panel {
		margin-left: 0;
		margin-right: -12%;
	}
}

/* =========================================================================
 * 06 Marquee
 * ====================================================================== */

.at-marquee {
	--at-marquee-duration: 40s;
	overflow: hidden;
	padding-block: var(--at-sp-4);
	border-block: 1px solid var(--at-line);
}

.at-marquee--ink {
	background: var(--at-ink);
	color: var(--at-surface);
	border-color: transparent;
}

.at-marquee--canvas {
	background: var(--at-canvas);
	color: var(--at-ink);
}

.at-marquee--accent {
	background: var(--at-accent);
	color: #fff;
	border-color: transparent;
}

.at-marquee__track {
	display: flex;
	width: max-content;
	animation: at-marquee var(--at-marquee-duration) linear infinite;
}

.at-marquee:hover .at-marquee__track {
	animation-play-state: paused;
}

.at-marquee__run {
	display: flex;
	align-items: center;
	gap: var(--at-sp-5);
	padding-right: var(--at-sp-5);
}

.at-marquee__item {
	font-family: var(--at-font-display);
	font-size: var(--at-t-lg);
	white-space: nowrap;
}

.at-marquee__sep {
	opacity: 0.45;
}

@keyframes at-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.at-marquee__track {
		animation: none;
		width: 100%;
		justify-content: center;
		flex-wrap: wrap;
	}

	.at-marquee__run:nth-child(2) {
		display: none;
	}
}

/* =========================================================================
 * 07 Testimonials
 * ====================================================================== */

.at-quotes {
	--at-cols: 3;
	display: grid;
	grid-template-columns: repeat(var(--at-cols), minmax(0, 1fr));
	gap: clamp(1rem, 2vw, 2rem);
	list-style: none;
}

@media (max-width: 860px) {
	.at-quotes {
		--at-cols: 1;
	}
}

.at-quote {
	padding: clamp(1.5rem, 3vw, 2.25rem);
	background: var(--at-canvas);
	border-radius: var(--at-radius);
	display: flex;
	flex-direction: column;
	gap: var(--at-sp-3);
}

.at-quote__stars {
	display: flex;
	gap: 2px;
	color: var(--at-accent);
}

.at-quote__stars svg {
	fill: currentColor;
}

.at-quote__text {
	margin: 0;
	font-family: var(--at-font-display);
	font-size: var(--at-t-lg);
	line-height: 1.45;
	color: var(--at-ink);
}

.at-quote__text p {
	margin: 0;
}

.at-quote__by {
	margin-top: auto;
	padding-top: var(--at-sp-3);
	border-top: 1px solid var(--at-line);
}

.at-quote__name {
	display: block;
	font-size: var(--at-t-sm);
	color: var(--at-ink);
}

.at-quote__detail {
	display: block;
	font-size: var(--at-t-xs);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--at-muted);
}

/* =========================================================================
 * 08 Newsletter
 * ====================================================================== */

.at-el-news {
	padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem);
	border-radius: var(--at-radius);
	background-size: cover;
	background-position: center;
	position: relative;
}

.at-el-news--deep {
	background-color: var(--at-deep);
	color: rgba(255, 255, 255, 0.8);
}

.at-el-news--canvas {
	background-color: var(--at-canvas);
}

.at-el-news--deep .at-blockhead__title {
	color: #fff;
}

.at-el-news--deep .at-blockhead__intro {
	color: rgba(255, 255, 255, 0.7);
}

.at-el-news--image::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: rgba(var(--at-ink-rgb), 0.5);
}

.at-news__inner {
	position: relative;
	max-width: 560px;
	margin-inline: auto;
	text-align: center;
}

.at-news__form {
	margin-top: var(--at-sp-5);
}

.at-news__form input[type="email"],
.at-news__form input[type="text"] {
	background: rgba(var(--at-surface-rgb), 0.96);
}

.at-news__note {
	margin-top: var(--at-sp-3);
	font-size: var(--at-t-xs);
	letter-spacing: 0.06em;
	opacity: 0.8;
}

/* =========================================================================
 * 09 Editor placeholders
 * ====================================================================== */

.at-el-placeholder {
	padding: var(--at-sp-5);
	border: 1px dashed var(--at-line);
	border-radius: var(--at-radius);
	font-size: var(--at-t-sm);
	color: var(--at-muted);
	text-align: center;
}
