/*
  Yamaha Promotions component
  All rules are scoped to .ypromo so nothing leaks into the main website CSS.
*/
.ypromo {
	/* ---- Brand tokens: tweak here ---- */
	--yp-violet: #4b1e78; /* Yamaha Violet (primary) */
	--yp-violet-dark: #26193a; /* Dark Violet */
	--yp-violet-bright: #7b47d2; /* Bright Violet */
	--yp-violet-light: #d6a4ea; /* Light Violet */
	--yp-gray-dark: #191d1f; /* Dark Gray */
	--yp-gray: #8c8c8c; /* Light Gray */
	--yp-surface: #ffffff;
	--yp-tint: #f7f3fb; /* very light violet wash (image placeholder) */
	--yp-border: rgba(75, 30, 120, 0.12);

	/* ---- Layout tokens ---- */
	--yp-radius: 0; /* corner radius for cards & buttons (e.g. 16px for rounded) */
	--yp-gap: 24px;
	--yp-max-width: 1200px;

	font-family: inherit;
	color: var(--yp-gray-dark);
	max-width: var(--yp-max-width);
	margin: 0 auto;
	padding: 8px 0 48px;
}
.ypromo *,
.ypromo *::before,
.ypromo *::after {
	box-sizing: border-box;
}

/* ---------- Header ---------- */
.ypromo-header {
	margin: 0 0 32px;
	max-width: 720px;
}
.ypromo-title {
	margin: 0 0 12px;
	font-size: clamp(32px, 5vw, 48px);
	line-height: 1.05;
	font-weight: 700;
	color: var(--yp-violet);
	letter-spacing: -0.01em;
}
.ypromo-intro {
	margin: 0;
	font-size: 17px;
	line-height: 1.6;
	color: #4a4f55;
}

/* ---------- Grid: 1 → 2 → 3 columns ---------- */
.ypromo-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--yp-gap);
	list-style: none;
	margin: 0;
	padding: 0;
}
@media (min-width: 640px) {
	.ypromo-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (min-width: 1024px) {
	.ypromo-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* ---------- Card ---------- */
.ypromo-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--yp-surface);
	border: 1px solid var(--yp-border);
	border-radius: var(--yp-radius);
	overflow: hidden;
	box-shadow:
		0 1px 2px rgba(38, 25, 58, 0.04),
		0 4px 16px rgba(38, 25, 58, 0.06);
	transition:
		transform 0.25s ease,
		box-shadow 0.25s ease,
		border-color 0.25s ease;
}
.ypromo-card:hover {
	transform: translateY(-4px);
	border-color: rgba(123, 71, 210, 0.35);
	box-shadow:
		0 2px 4px rgba(38, 25, 58, 0.06),
		0 16px 40px rgba(75, 30, 120, 0.16);
}

/* Image frame: always 800x500 ratio (16:10), scales with the card width */
.ypromo-media {
	position: relative;
	aspect-ratio: 800 / 500;
	background: var(--yp-tint);
	overflow: hidden;
}
/* Image fills the frame and is cropped from the centre.
   Extra specificity + !important so global site img rules (e.g. height: auto) can't break it. */
.ypromo .ypromo-media img {
	position: absolute !important;
	inset: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	object-fit: cover;
	object-position: center center;
	transition: transform 0.6s ease;
}
.ypromo .ypromo-card:hover .ypromo-media img {
	transform: scale(1.04);
}

.ypromo-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 24px 24px 28px;
}
.ypromo-partner {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--yp-gray);
}
/* Extra specificity + !important so the site's global h2 margins (48px / 16px) don't apply */
.ypromo .ypromo-card .ypromo-card-title {
	margin: 0 0 12px !important;
	font-size: 22px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--yp-violet-dark);
}
.ypromo-text {
	margin: 0 0 24px;
	font-size: 15px;
	line-height: 1.6;
	color: #4a4f55;
}

.ypromo-footer {
	margin-top: auto;
	display: flex;
	flex-direction: column; /* end date on top, button below */
	align-items: flex-start;
	gap: 16px;
	padding-top: 20px;
	border-top: 1px solid var(--yp-border);
}
.ypromo-ends {
	display: inline-flex;
	align-items: flex-start;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	line-height: 16px;
	color: var(--yp-gray);
}
.ypromo-ends svg {
	width: 16px;
	height: 16px;
	flex: none;
}

.ypromo-cta {
	display: inline-flex;
	flex: none; /* never shrink or wrap the button */
	white-space: nowrap;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	border-radius: var(--yp-radius);
	background: var(--yp-violet);
	color: #fff !important;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-decoration: none !important;
	transition: background-color 0.2s ease;
}
.ypromo-cta svg {
	width: 16px;
	height: 16px;
	transition: transform 0.2s ease;
}
.ypromo-card:hover .ypromo-cta {
	background: var(--yp-violet-bright);
}
.ypromo-card:hover .ypromo-cta svg {
	transform: translateX(3px);
}
.ypromo-cta:focus-visible {
	outline: 3px solid var(--yp-violet-light);
	outline-offset: 3px;
}
/* Makes the whole card clickable while keeping a single real link */
.ypromo-cta::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: var(--yp-radius);
}

@media (max-width: 639px) {
	.ypromo-body {
		padding: 20px 20px 24px;
	}
	.ypromo .ypromo-card .ypromo-card-title {
		font-size: 20px;
	}
	/* Full-width button on phones for an easier tap target */
	.ypromo-cta {
		align-self: stretch;
		justify-content: center;
	}
}
@media (prefers-reduced-motion: reduce) {
	.ypromo-card,
	.ypromo .ypromo-media img,
	.ypromo-cta,
	.ypromo-cta svg {
		transition: none;
	}
	.ypromo-card:hover,
	.ypromo .ypromo-card:hover .ypromo-media img {
		transform: none;
	}
}
