/* ==========================================================================
   Galleria De Rings: Create Your Own Masterpiece (Exact Reference Card & Real Spinning Badge)
   ========================================================================== */

/* Figtree (SIL Open Font License, see fonts/OFL-Figtree.txt): used only for
   the spinning badge's text. Self-hosted, variable weight. */
@font-face {
	font-family: "Figtree";
	font-style: normal;
	font-weight: 400 900;
	font-display: swap;
	src: url("../fonts/figtree-latin-wght-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   Layout: a 50 / 50 grid of two separate columns: the banner (its own
   rounded box) on the left, the text on white on the right. On tablets and
   phones the banner goes on top and the text below it.
   -------------------------------------------------------------------------- */
.masterpiece-section--fullwidth {
	--mp-navy: #0b132a;
	--mp-navy-hover: #1c2847;
	--mp-text: #5c6070;
	--mp-muted: #6b6f7d;
	--mp-border: #e6e8ef;

	position: relative;
	width: 100%;
	padding: clamp(36px, 4vw, 64px) clamp(16px, 4vw, 64px);
	box-sizing: border-box;
	background-color: #ffffff;
}

/* Plain white section: no panel, tint or shadow. The banner and the text
   sit in a centred, width-capped container on the white page. */
.masterpiece-fullwidth-wrap {
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	box-sizing: border-box;
}

/* Two columns: the banner on the left, the text on the right (the text
   column a little wider so the heading fits on one line). */
.masterpiece-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(32px, 5vw, 48px);
	align-items: center;
	color: var(--mp-navy);
}

@media (min-width: 992px) {
	.masterpiece-grid {
		grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
		/* Wide enough for the half of the badge that sits past the banner. */
		gap: clamp(64px, 5.5vw, 96px);
	}
}

/* Left: the banner. */
.masterpiece-visual-col {
	display: flex;
	width: 100%;
}

/* Square, the banner's own shape (1254 × 1254), so nothing is cropped. */
.masterpiece-card-container {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
}

/* The banner is its own rounded box. */
.masterpiece-ref-card {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: 16px;
	background: #e9e1d4; /* warm cream, close to the photo, shown only while it loads */
	cursor: default;
}

.masterpiece-ref-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	pointer-events: none;
	transform: none !important;
}

/* --------------------------------------------------------------------------
   Real Spinning Badge (Non-clickable, no hover effect, smooth rotation)
   -------------------------------------------------------------------------- */
/* Centred on the banner's right edge: half on the banner, half on the
   tinted panel, where its white disc reads as a seal. */
.masterpiece-spinning-badge {
	position: absolute;
	top: 18%;
	left: 100%;
	width: clamp(84px, 19%, 110px);
	aspect-ratio: 1 / 1;
	transform: translate(-50%, -50%);
	z-index: 10;
	pointer-events: none; /* Completely non-clickable */
	cursor: default;
	user-select: none;
}

/* Tablets and phones: the banner is full width, so the badge sits inside
   its top-right corner. */
@media (max-width: 991px) {
	.masterpiece-spinning-badge {
		top: 16px;
		right: 16px;
		left: auto;
		transform: none;
	}
}

.masterpiece-badge-disc {
	position: relative;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	/* Plain white seal, no shadow. */
	background: #ffffff;
	box-shadow: none;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.masterpiece-badge-rotator {
	width: 100%;
	height: 100%;
	position: absolute;
	inset: 0;
	animation: mpBadgeRotate 16s linear infinite;
	transform-origin: center center;
	pointer-events: none;
}

@keyframes mpBadgeRotate {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

.masterpiece-badge-svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* Spacing comes from textLength in the template (the text fills the whole
   circle evenly), so no letter-spacing here. */
.masterpiece-badge-text {
	font-family: "Figtree", var(--g-font-body, "Source Sans 3", sans-serif);
	font-size: 16px; /* in the badge's 200-unit drawing; must stay short of the circle (≈465 units) */
	font-weight: 600;
	letter-spacing: 0;
	fill: #000000;
	text-transform: uppercase;
	white-space: pre; /* keep the closing " - " so the loop joins evenly */
}

.masterpiece-badge-center {
	width: 42%;
	height: 42%;
	border-radius: 50%;
	background: #0B132A;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 2;
	box-shadow: 0 2px 8px rgba(11, 19, 42, 0.35);
}

.masterpiece-emblem-svg {
	width: 66%;
	height: 66%;
	display: block;
}

/* --------------------------------------------------------------------------
   Right (white): left-aligned text. Eyebrow, serif heading, description,
   a 2 × 2 grid of four points with small navy line icons in soft circles,
   and one navy pill button. Navy, white and greys only.
   -------------------------------------------------------------------------- */
.masterpiece-content-col {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.masterpiece-content-block {
	max-width: 620px;
}

/* Eyebrow as a small pill label with a navy dot. */
.masterpiece-eyebrow-text {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 20px;
	padding: 7px 16px;
	border: 1px solid rgba(11, 19, 42, 0.12);
	border-radius: 999px;
	background: #ffffff;
	color: var(--mp-navy);
	font-family: var(--g-font-body, "Source Sans 3", sans-serif);
	font-size: .7rem;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
}

.masterpiece-eyebrow-dot {
	flex: none;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--mp-navy);
	box-shadow: 0 0 0 3px rgba(11, 19, 42, 0.1);
}

.masterpiece-heading {
	margin: 0 0 18px;
	color: var(--mp-navy);
	font-family: var(--g-font-heading, "EB Garamond", serif);
	font-size: clamp(2.2rem, 3.1vw, 3.1rem);
	font-weight: 400;
	line-height: 1.05;
	white-space: nowrap; /* "Create Your Own Masterpiece" on one line */
	letter-spacing: -.01em;
}

.masterpiece-heading em {
	color: var(--mp-navy);
	font-style: italic;
}

.masterpiece-lead-text {
	margin: 0 0 28px;
	color: var(--mp-text);
	font-family: var(--g-font-body, "Source Sans 3", sans-serif);
	max-width: 58ch; /* shorter lines read more easily */
	font-size: .98rem;
	line-height: 1.7;
}

/* Four points: two columns, icon in a soft circle, title and a short line. */
.masterpiece-points {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px 24px;
	margin: 0 0 34px;
	padding: 24px 0 0;
	border-top: 1px solid rgba(11, 19, 42, 0.1);
	list-style: none;
}

.masterpiece-point {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.masterpiece-point__icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--mp-navy);
	box-shadow: 0 8px 16px -10px rgba(11, 19, 42, 0.6);
	color: #ffffff;
}

.masterpiece-point__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.masterpiece-point__title {
	color: var(--mp-navy);
	font-family: var(--g-font-body, "Source Sans 3", sans-serif);
	font-size: .92rem;
	font-weight: 600;
	line-height: 1.3;
}

.masterpiece-point__text {
	color: var(--mp-muted);
	font-family: var(--g-font-body, "Source Sans 3", sans-serif);
	font-size: .82rem;
	line-height: 1.35;
}

/* Main button + a quieter WhatsApp link beside it. */
.masterpiece-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 28px;
}

.masterpiece-chat {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	color: var(--mp-navy);
	font-family: var(--g-font-body, "Source Sans 3", sans-serif);
	font-size: .92rem;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgba(11, 19, 42, 0.25);
	text-decoration-thickness: 1px;
	text-underline-offset: 5px;
	transition: text-decoration-color .2s ease, color .2s ease;
}

.masterpiece-chat .icon {
	width: 20px;
	height: 20px;
}

.masterpiece-chat:hover {
	color: var(--mp-navy-hover);
	text-decoration-color: currentColor;
}

.masterpiece-chat:focus-visible {
	outline: 2px solid var(--mp-navy);
	outline-offset: 4px;
	border-radius: 4px;
}

/* The button: navy pill, white text, a white circle holding a navy arrow.
   Hover: a shade lighter, the circle grows a little, the arrow turns up-right. */
.masterpiece-cta {
	display: inline-flex;
	align-items: center;
	gap: 18px;
	min-height: 58px;
	padding: 7px 7px 7px 30px;
	border-radius: 999px;
	background: var(--mp-navy);
	color: #ffffff;
	font-family: var(--g-font-body, "Source Sans 3", sans-serif);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: .01em;
	text-decoration: none;
	box-shadow: 0 12px 28px -14px rgba(11, 19, 42, .55);
	transition: background-color .3s ease, box-shadow .3s ease, transform .3s ease;
}

.masterpiece-cta__icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #ffffff;
	color: var(--mp-navy);
	transition: transform .3s ease;
}

.masterpiece-cta__arrow {
	transition: transform .3s ease;
}

.masterpiece-cta:hover,
.masterpiece-cta:focus-visible {
	background: var(--mp-navy-hover);
	color: #ffffff;
	box-shadow: 0 16px 32px -14px rgba(11, 19, 42, .6);
	transform: translateY(-1px);
}

.masterpiece-cta:hover .masterpiece-cta__icon {
	transform: scale(1.06);
}

.masterpiece-cta:hover .masterpiece-cta__arrow {
	transform: rotate(-45deg);
}

.masterpiece-cta:focus-visible {
	outline: 2px solid var(--mp-navy);
	outline-offset: 4px;
}

@media (max-width: 640px) {
	.masterpiece-section--fullwidth {
		padding: 32px 14px;
	}

	.masterpiece-ref-card {
		border-radius: 12px;
	}



	/* Keep the eyebrow on one line on narrow phones. */
	.masterpiece-eyebrow-text {
		gap: 8px;
		padding: 6px 12px;
		font-size: .62rem;
		letter-spacing: .12em;
	}

	.masterpiece-actions {
		justify-content: center;
	}

	/* "Create Your Own Masterpiece" on one line: the text is about 11.15em
	   wide, so the size follows the screen width (minus the side padding),
	   never larger than the usual size. */
	.masterpiece-heading {
		font-size: min(2.4rem, calc((100vw - 56px) / 11.4));
		white-space: nowrap;
	}

	.masterpiece-points {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px 14px;
		margin: 0 0 28px;
		padding: 20px 0 0;
	}

	.masterpiece-point {
		gap: 8px;
	}

	.masterpiece-point__icon {
		width: 34px;
		height: 34px;
	}

	.masterpiece-point__icon svg {
		width: 17px;
		height: 17px;
	}

	.masterpiece-point__title {
		font-size: .8rem;
	}

	.masterpiece-point__text {
		font-size: .72rem;
	}

	.masterpiece-cta {
		justify-content: space-between;
		width: 100%;
		padding: 6px 6px 6px 20px;
		font-size: .92rem;
	}

	.masterpiece-cta__icon {
		width: 40px;
		height: 40px;
	}
}

@media (max-width: 400px) {
	.masterpiece-section--fullwidth {
		padding: 24px 10px;
	}

	.masterpiece-points {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px 10px;
	}

	.masterpiece-point__title {
		font-size: .76rem;
	}

	.masterpiece-point__text {
		font-size: .68rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.masterpiece-cta,
	.masterpiece-cta__icon,
	.masterpiece-cta__arrow,
	.masterpiece-chat {
		transition: none;
	}
}
