/*
 * Rainbow Dressings — brand layer
 *
 * theme.json owns colour, type and layout. This file covers what it cannot
 * express: the rainbow watermark, the wordmark lockup, the recipe accent
 * system, and WooCommerce's own markup.
 */

:root {
	--rd-aubergine: #392a42;
	--rd-orchid: #a66ba0;
	--rd-papaya: #ef8b62;
	--rd-gold: #e7b04b;
	--rd-ivory: #fbf5ee;
	--rd-paper: #fffaf5;
	--rd-pale: #f3e6f0;
	--rd-ink: #2c2033;
	--rd-muted: #746877;
	--rd-line: rgba(57, 42, 66, 0.15);

	/* Whole Garden No. 1 is the launch product and the sole recipe accent. */
	--rd-recipe: #597943;
	--rd-recipe-name: "Whole Garden No. 1";
}

body.recipe-original-green,
body.recipe-whole-garden-no-1 { --rd-recipe: #597943; }

/* ---------------------------------------------------------------- Wordmark */

.rd-wordmark {
	display: flex;
	flex-direction: column;
	align-items: center;
	line-height: 1;
}

.rd-wordmark strong {
	font-family: Newsreader, Georgia, serif;
	font-style: italic;
	font-weight: 300;
	font-size: clamp(2.75rem, 6vw, 4.6rem);
	letter-spacing: -0.055em;
	line-height: 0.82;
}

.rd-wordmark span {
	font-family: Manrope, Arial, sans-serif;
	font-weight: 500;
	font-size: 0.75rem;
	letter-spacing: 0.42em;
	text-transform: uppercase;
	margin-top: 1.25rem;
	padding-left: 0.42em; /* optical centring against the tracked caps */
}

.rd-micro {
	font-family: "DM Mono", monospace;
	font-weight: 500;
	font-size: 0.5625rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--rd-papaya);
}

/* --------------------------------------------------------------- Watermark */

/*
 * Atmosphere, not decoration: oversized, tonal, cropped. Sits behind content
 * and must never compete with it. Apply to any group or cover block.
 */
.rd-watermark {
	position: relative;
	isolation: isolate;
	overflow: hidden;
}

.rd-watermark::before {
	content: "";
	position: absolute;
	right: -18%;
	bottom: -34%;
	width: 118%;
	height: 118%;
	background: url("../marks/whisper-arc.svg") no-repeat center / contain;
	opacity: 0.1;
	z-index: -1;
	pointer-events: none;
}

.rd-watermark.is-light::before { opacity: 0.055; filter: brightness(0) invert(1); }
.rd-watermark.is-centred::before { right: auto; left: 50%; transform: translateX(-50%); }

/* ------------------------------------------------------------ Recipe rules */

.rd-rule {
	border: 0;
	border-top: 1px solid var(--rd-line);
	margin: 0;
}

.rd-band {
	background: var(--rd-recipe);
	color: #fff;
	font-family: "DM Mono", monospace;
	font-weight: 500;
	font-size: 0.5625rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.9rem 1.35rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

/* ----------------------------------------------------------------- Header */

/* One compact bar: lockup left, navigation right, all vertically centred. */
.rd-header {
	position: relative;
	z-index: 20;
}

.rd-header-inner {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 2rem;
	width: 100%;
	margin: 0 auto;
}

.rd-lockup {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	min-width: 0;
}

.rd-lockup-mark {
	display: block;
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	background: url("../marks/whisper-arc.svg") no-repeat center / contain;
	border-radius: 50%;
}

.rd-lockup .wp-block-site-title {
	margin: 0;
	line-height: 1;
	white-space: nowrap;
}

.rd-lockup .wp-block-site-title a {
	color: var(--rd-ink);
	text-decoration: none;
}

.rd-lockup-sub {
	margin: 0;
	white-space: nowrap;
}

.rd-header .wp-block-navigation {
	flex: 0 0 auto;
	margin: 0 0 0 auto;
}

.rd-header .wp-block-navigation-item__content {
	padding: 0.6rem 0.1rem;
}

@media (max-width: 781px) {
	.rd-header {
		padding: 0.75rem 1rem !important;
	}

	.rd-header-inner {
		gap: 1rem;
	}

	.rd-lockup {
		gap: 0.6rem !important;
	}

	.rd-lockup-mark {
		flex-basis: 38px;
		width: 38px;
		height: 38px;
	}

	.rd-lockup .wp-block-site-title {
		font-size: 1.1rem !important;
	}

	.rd-lockup-sub {
		display: none;
	}

	.rd-header .wp-block-navigation__responsive-container.is-menu-open {
		padding: 1.5rem;
	}

	.rd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
		align-items: flex-start;
		padding-top: 4.5rem;
	}

	.rd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
		align-items: flex-start;
		justify-content: flex-start !important;
		gap: 1.25rem;
		width: 100%;
	}

	.rd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
		align-items: flex-start !important;
		width: 100%;
	}

	.rd-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
		padding: 0.25rem 0;
		font-family: Newsreader, Georgia, serif;
		font-size: 1.65rem;
		font-weight: 300;
		letter-spacing: -0.02em;
		text-transform: none;
	}
}

/* -------------------------------------------------------------------- Hero */

/*
 * A single aubergine band. The jar sits inside it rather than in a separate
 * panel — the split-background version read as two unrelated sections.
 */
.rd-hero .wp-block-columns {
	margin-bottom: 0;
}

.rd-hero-jar {
	margin: 0;
}

.rd-hero-jar img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 2px;
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.32);
}

.rd-product-facts {
	gap: 0 !important;
	margin-top: 1.75rem;
	border-top: 1px solid rgba(255, 255, 255, 0.22);
	border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.rd-product-facts p {
	min-width: 8rem;
	margin: 0;
	padding: 0.85rem 1.2rem 0.85rem 0;
	color: var(--rd-ivory);
	font-family: "DM Mono", monospace;
	font-size: 0.625rem;
	line-height: 1.5;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.rd-product-facts p + p {
	padding-left: 1.2rem;
	border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.rd-product-facts span {
	color: rgba(255, 255, 255, 0.62);
	font-size: 0.5rem;
}

/* Outline button on the dark hero. */
.rd-hero .wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--rd-ivory);
	border: 1px solid rgba(255, 255, 255, 0.38);
}

.rd-hero .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.7);
	color: var(--rd-ivory);
}

/* ---------------------------------------------------------------- Spectrum */

/*
 * The rainbow lives in the ingredient list, not across separate products.
 * Each row is one colour band of the single recipe.
 */
.rd-spectrum-row {
	--rd-band: var(--rd-muted);
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem 1.75rem;
	padding: 1.15rem 0 1.15rem 1.15rem;
	border-top: 1px solid var(--rd-line);
	border-left: 3px solid var(--rd-band);
}

.rd-spectrum-row:last-of-type {
	border-bottom: 1px solid var(--rd-line);
}

.rd-spectrum-label {
	flex: 0 0 7.5rem;
	margin: 0;
	color: var(--rd-band);
	font-family: "DM Mono", monospace;
	font-size: 0.5625rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.rd-spectrum-items {
	flex: 1 1 16rem;
	margin: 0;
	font-family: Newsreader, Georgia, serif;
	font-size: 1.15rem;
	font-weight: 300;
	line-height: 1.45;
	letter-spacing: -0.015em;
	color: var(--rd-ink);
}

.rd-row-green  { --rd-band: #597943; }
.rd-row-gold   { --rd-band: #d69b2d; }
.rd-row-red    { --rd-band: #ae3f51; }
.rd-row-violet { --rd-band: #684675; }
.rd-row-earth  { --rd-band: #8a6a4f; }
.rd-row-base   { --rd-band: #a66ba0; }

.rd-row-base .rd-spectrum-items {
	font-size: 0.95rem;
	color: var(--rd-muted);
}

.rd-founder-quote {
	margin: 2.25rem 0;
	padding: 1.5rem 0 1.5rem 1.75rem;
	border-left: 3px solid var(--rd-recipe);
}

.rd-founder-quote p {
	margin: 0;
	font-family: Newsreader, Georgia, serif;
	font-size: clamp(1.35rem, 2.8vw, 2rem);
	font-style: italic;
	font-weight: 300;
	line-height: 1.35;
	letter-spacing: -0.025em;
	color: var(--rd-ink);
}

.rd-founder-quote cite {
	display: block;
	margin-top: 1rem;
	font-family: "DM Mono", monospace;
	font-size: 0.5625rem;
	font-style: normal;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--rd-orchid);
}

@media (max-width: 600px) {
	.rd-spectrum-label { flex-basis: 100%; }
	.rd-spectrum-items { font-size: 1.05rem; }
	.rd-product-facts p { min-width: 33%; padding-right: 0.65rem; }
	.rd-product-facts p + p { padding-left: 0.65rem; }
}

/* ------------------------------------------------------------- WooCommerce */

.woocommerce .woocommerce-breadcrumb,
.woocommerce-page .woocommerce-breadcrumb {
	font-family: "DM Mono", monospace;
	font-size: 0.5625rem;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--rd-muted);
}

/* Price */
.woocommerce div.product p.price,
.woocommerce div.product span.price,
.wc-block-components-product-price {
	color: var(--rd-recipe);
	font-family: Newsreader, Georgia, serif;
	font-weight: 400;
	font-size: 1.9rem;
	letter-spacing: -0.02em;
}

.woocommerce ul.products li.product .price,
.wc-block-grid__product-price {
	color: var(--rd-aubergine);
	font-family: Newsreader, Georgia, serif;
	font-size: 1.15rem;
}

.woocommerce div.product p.price del,
.wc-block-components-product-price del {
	color: var(--rd-muted);
	opacity: 0.7;
}

/* Product titles */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.wc-block-grid__product-title {
	font-family: Newsreader, Georgia, serif;
	font-weight: 300;
	font-size: 1.4rem;
	line-height: 1.05;
	letter-spacing: -0.035em;
	color: var(--rd-ink);
}

.woocommerce div.product .product_title {
	letter-spacing: -0.045em;
}

/* Buttons — match theme.json's button element styling. */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.wc-block-components-button {
	background: var(--rd-aubergine);
	color: var(--rd-ivory);
	font-family: "DM Mono", monospace;
	font-size: 0.5625rem;
	font-weight: 500;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	border: 0;
	border-radius: 0;
	padding: 1.15rem 1.9rem;
	line-height: 1;
	transition: background 0.2s ease;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.wc-block-components-button:hover {
	background: var(--rd-orchid);
	color: var(--rd-ivory);
}

.woocommerce a.button.disabled,
.woocommerce button.button:disabled,
.woocommerce button.button.disabled {
	background: var(--rd-muted);
	opacity: 0.55;
}

/* Sale flash */
.woocommerce span.onsale {
	background: var(--rd-papaya);
	color: var(--rd-aubergine);
	font-family: "DM Mono", monospace;
	font-size: 0.5rem;
	font-weight: 500;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	border-radius: 0;
	min-height: 0;
	min-width: 0;
	line-height: 1;
	padding: 0.65rem 0.85rem;
}

/* Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	background: var(--rd-pale);
	border-top-color: var(--rd-orchid);
	color: var(--rd-ink);
	font-size: 0.875rem;
}

.woocommerce-error {
	background: #f6e3e3;
	border-top-color: #ae3f51;
}

.woocommerce-message::before,
.woocommerce-info::before {
	color: var(--rd-orchid);
}

/* Quantity + form fields */
.woocommerce .quantity .qty,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	border: 1px solid var(--rd-line);
	border-radius: 0;
	background: #fff;
	padding: 0.8rem 0.7rem;
	font-family: Manrope, Arial, sans-serif;
	font-size: 0.875rem;
	color: var(--rd-ink);
}

/* Tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs::before {
	border-bottom-color: var(--rd-line);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
	background: var(--rd-ivory);
	border-color: var(--rd-line);
	border-radius: 0;
	font-family: "DM Mono", monospace;
	font-size: 0.5625rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
	background: var(--rd-aubergine);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
	color: var(--rd-ivory);
}

/* Product grid rhythm */
.woocommerce ul.products li.product {
	text-align: left;
}

.woocommerce ul.products li.product a img {
	margin-bottom: 1rem;
	background: var(--rd-ivory);
}

/* Star ratings in the brand's gold rather than WooCommerce purple. */
.woocommerce .star-rating span::before,
.woocommerce p.stars a::before {
	color: var(--rd-gold);
}

/* ------------------------------------------------------------- Small print */

.rd-legal {
	font-size: 0.75rem;
	line-height: 1.65;
	color: var(--rd-muted);
}

/*
 * Net quantity, allergen and bilingual copy must stay readable. Never let a
 * pattern shrink these below 12px.
 */
.rd-legal strong { color: var(--rd-ink); font-weight: 600; }

/* --------------------------------------------------------------- Reduced motion */

@media (prefers-reduced-motion: reduce) {
	* {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
