/*
 * Manqube design system
 * -----------------------
 * Palette, typography, spacing, and buttons per the brief's visual
 * design section. Colour choices below are as specified there, with
 * one adjustment: I checked every text/background pairing against WCAG
 * AA contrast requirements (the brief asks for accessibility, section
 * 41) and found that the warm-grey metadata colour fails AA when placed
 * on the light-stone background (4.26:1, needs 4.5:1) even though it
 * passes fine on the ivory background (4.75:1). So: warm-grey is used
 * for secondary text on ivory only. On light-stone panels, a separate,
 * verified colour (--manqube-label-on-light) is used instead. Same
 * caution applies to the brass accent, which only passes contrast at
 * large text sizes — never used below 24px here.
 */

:root {
	--manqube-ivory: #F5F2EC;
	--manqube-charcoal: #1C1C1A;
	--manqube-warm-grey: #6F6B63;       /* Ivory background only — 4.75:1 */
	--manqube-label-on-light: #524E46;  /* Light-stone background only — 6.65:1 */
	--manqube-soft-stone: #D9D4CA;      /* Decorative dividers/borders only, not for meaning */
	--manqube-light-stone: #EAE6DE;
	--manqube-brass: #9A8060;           /* Large text / icons / decorative only — 3.34:1 on ivory */

	--manqube-font-display: 'Cormorant Garamond', 'DM Serif Display', Georgia, serif;
	--manqube-font-body: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

	--manqube-space-1: 0.5rem;
	--manqube-space-2: 1rem;
	--manqube-space-3: 1.5rem;
	--manqube-space-4: 2.5rem;
	--manqube-space-5: 4rem;
	--manqube-space-6: 6rem;
}

/* ---------------------------------------------------------------------
   Base
--------------------------------------------------------------------- */

.manqube-puzzle-page {
	background-color: var(--manqube-ivory);
	color: var(--manqube-charcoal);
}

.manqube-puzzle-page,
.manqube-single-puzzle {
	font-family: var(--manqube-font-body);
	font-size: 18px;
	line-height: 1.65;
}

.manqube-single-puzzle h1,
.manqube-single-puzzle h2,
.manqube-single-puzzle h3 {
	font-family: var(--manqube-font-display);
	font-weight: 500;
	color: var(--manqube-charcoal);
	line-height: 1.15;
}

.manqube-single-puzzle a {
	color: inherit;
}

.manqube-single-puzzle img {
	max-width: 100%;
	height: auto;
}

/* ---------------------------------------------------------------------
   Layout
--------------------------------------------------------------------- */

.manqube-single-puzzle {
	max-width: 1200px;
	margin: 0 auto;
	padding: var(--manqube-space-5) var(--manqube-space-3) var(--manqube-space-6);
}

.manqube-puzzle-hero {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: var(--manqube-space-4);
	align-items: start;
	margin-bottom: var(--manqube-space-5);
}

@media (max-width: 800px) {
	.manqube-puzzle-hero {
		grid-template-columns: 1fr;
		gap: var(--manqube-space-3);
	}
}

.manqube-puzzle-hero__image img {
	width: 100%;
	display: block;
	border-radius: 2px;
	background-color: var(--manqube-light-stone);
}

/* ---------------------------------------------------------------------
   Typography details
--------------------------------------------------------------------- */

.manqube-eyebrow {
	font-family: var(--manqube-font-body);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--manqube-warm-grey); /* on ivory: passes AA */
	margin: 0 0 var(--manqube-space-1);
}

.manqube-puzzle-title {
	font-size: clamp(2.25rem, 5vw, 4rem);
	margin: 0 0 var(--manqube-space-3);
}

/* ---------------------------------------------------------------------
   Key facts list (hero sidebar)
--------------------------------------------------------------------- */

.manqube-key-facts {
	list-style: none;
	margin: var(--manqube-space-3) 0;
	padding: var(--manqube-space-3) 0;
	border-top: 1px solid var(--manqube-soft-stone);
	border-bottom: 1px solid var(--manqube-soft-stone);
}

.manqube-key-facts li {
	display: flex;
	justify-content: space-between;
	gap: var(--manqube-space-2);
	padding: 0.5rem 0;
	font-size: 15px;
}

.manqube-key-facts__label {
	color: var(--manqube-warm-grey); /* these lists sit on the ivory page background */
	font-weight: 500;
}

.manqube-key-facts__value {
	color: var(--manqube-charcoal);
	text-align: right;
}

/* ---------------------------------------------------------------------
   Buttons — understated, per the brief's button style section
--------------------------------------------------------------------- */

.manqube-puzzle-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--manqube-space-2);
	margin-top: var(--manqube-space-3);
}

.manqube-btn,
.manqube-buy-now {
	display: inline-block;
	font-family: var(--manqube-font-body);
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.02em;
	padding: 0.85em 1.75em;
	border-radius: 2px;
	text-decoration: none;
	text-align: center;
	line-height: 1;
	transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.manqube-buy-now--active {
	background-color: var(--manqube-charcoal);
	color: var(--manqube-ivory);
	border: 1px solid var(--manqube-charcoal);
	cursor: pointer;
}
.manqube-buy-now--active:hover {
	opacity: 0.85;
}

.manqube-buy-now--disabled {
	background-color: transparent;
	color: var(--manqube-warm-grey);
	border: 1px solid var(--manqube-soft-stone);
	cursor: not-allowed;
}

.manqube-btn--outline {
	background-color: transparent;
	color: var(--manqube-charcoal);
	border: 1px solid var(--manqube-charcoal);
}
.manqube-btn--outline:hover {
	background-color: var(--manqube-charcoal);
	color: var(--manqube-ivory);
}

/* ---------------------------------------------------------------------
   Description
--------------------------------------------------------------------- */

.manqube-puzzle-description {
	font-size: 18px;
	line-height: 1.75;
	max-width: 68ch;
	margin-bottom: var(--manqube-space-5);
}

/* ---------------------------------------------------------------------
   Panels on light-stone background (Making, etc.)
   Uses --manqube-label-on-light, not --manqube-warm-grey — see note
   at the top of this file.
--------------------------------------------------------------------- */

.manqube-puzzle-panel {
	background-color: var(--manqube-light-stone);
	padding: var(--manqube-space-3);
	margin-bottom: var(--manqube-space-4);
	border-radius: 2px;
}

.manqube-puzzle-panel h2 {
	font-size: 24px;
	margin: 0 0 var(--manqube-space-2);
}

.manqube-detail-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.manqube-detail-list li {
	display: flex;
	justify-content: space-between;
	gap: var(--manqube-space-2);
	padding: 0.4rem 0;
	font-size: 15px;
}

.manqube-detail-list .manqube-key-facts__label {
	color: var(--manqube-label-on-light);
	font-weight: 500;
}

.manqube-detail-list .manqube-key-facts__value {
	color: var(--manqube-charcoal);
	text-align: right;
}

/* ---------------------------------------------------------------------
   Gallery
--------------------------------------------------------------------- */

.manqube-puzzle-gallery {
	margin-bottom: var(--manqube-space-5);
}

.manqube-puzzle-gallery h2 {
	font-size: 24px;
	margin: 0 0 var(--manqube-space-2);
}

.manqube-puzzle-gallery__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: var(--manqube-space-2);
}

.manqube-puzzle-gallery__item img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
	border-radius: 2px;
}

/* ---------------------------------------------------------------------
   Video
--------------------------------------------------------------------- */

.manqube-puzzle-video {
	margin-bottom: var(--manqube-space-5);
}

.manqube-puzzle-video h2 {
	font-size: 24px;
	margin: 0 0 var(--manqube-space-2);
}

.manqube-video-embed {
	max-width: 800px;
}

.manqube-video-embed iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
}

/* ---------------------------------------------------------------------
   Accessibility — visible focus states (section 41 of the brief)
--------------------------------------------------------------------- */

.manqube-single-puzzle a:focus-visible,
.manqube-btn:focus-visible,
.manqube-buy-now:focus-visible {
	outline: 3px solid var(--manqube-charcoal);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------------
   Reduced motion — respect the visitor's OS setting (section 40 asks
   for animation to be used sparingly; this makes sure it's removed
   entirely for anyone who's asked their system to minimise motion)
--------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.manqube-btn,
	.manqube-buy-now {
		transition: none;
	}
}
