/* RB Collective — Premium Custom Styles */

:root {
	--rb-gold: #c5a377;
	--rb-mocha: #3d312b;
	--rb-taupe: #6b5e54;
	--rb-off-white: #f7f4f0;
	--rb-shadow-soft: 0 18px 50px rgba(61, 49, 43, 0.08);
	--rb-shadow-card: 0 10px 30px rgba(61, 49, 43, 0.06);
	--rb-header-height: 80px;
	--rb-logo-width: 140px;
	--rb-logo-height: 48px;
	--rb-font-body: "Manrope", system-ui, -apple-system, sans-serif;
	--rb-font-heading: "Cormorant Garamond", "Times New Roman", serif;
}

html {
	scroll-behavior: smooth;
}

body {
	-webkit-font-smoothing: antialiased;
	font-family: var(--rb-font-body);
	text-rendering: optimizeLegibility;
}

/* Neutralise Extendable leftovers */
[class*="ext-preset"],
[class*="ext-animate"],
.is-style-ext-preset--group--natural-1--template {
	animation: none !important;
}

/* ─── Header shell (component styles in assets/css/header.css) ─── */

/* ─── Mega Menu ─── */
.rb-mega {
	background: #fff;
	border: 1px solid rgba(61, 49, 43, 0.08);
	box-shadow: var(--rb-shadow-soft);
	display: none;
	opacity: 0;
	padding: 1.5rem;
	pointer-events: none;
	transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
	visibility: hidden;
	z-index: 500;
}

body.rb-mega-active::before {
	background: rgba(61, 49, 43, 0.18);
	content: "";
	inset: 0;
	pointer-events: none;
	position: fixed;
	z-index: 900;
}

.rb-mega::before {
	content: "";
	height: 14px;
	left: 0;
	position: absolute;
	right: 0;
	top: -14px;
}

@media (min-width: 1024px) {
	.rb-mega {
		border-left: 0;
		border-radius: 0;
		border-right: 0;
		border-top: 0;
		box-shadow: 0 20px 48px rgba(61, 49, 43, 0.1);
		left: 50%;
		padding: 1.75rem 2rem 2rem;
		position: fixed;
		right: auto;
		top: var(--rb-mega-top, var(--rb-header-height));
		transform: translateX(-50%) translateY(-6px);
		width: min(1120px, calc(100vw - 2.5rem));
		z-index: 950;
	}

	.rb-mega::before {
		display: none;
	}

	.rb-nav__item--mega:hover .rb-mega,
	.rb-nav__item--mega.is-mega-open .rb-mega,
	.rb-nav__item--mega:focus-within .rb-mega {
		display: block;
		opacity: 1;
		pointer-events: auto;
		transform: translateX(-50%) translateY(0);
		visibility: visible;
	}
}

@media (max-width: 1023px) {
	.rb-mega {
		display: block;
		left: auto;
		opacity: 1;
		pointer-events: auto;
		position: static;
		top: auto;
		transform: none;
		visibility: visible;
		width: 100%;
	}
}

.rb-mega__intro {
	border-bottom: 1px solid rgba(61, 49, 43, 0.08);
	margin-bottom: 1.25rem;
	padding-bottom: 1rem;
}

.rb-mega__eyebrow {
	color: var(--rb-gold);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	margin: 0 0 0.5rem;
	text-transform: uppercase;
}

.rb-mega__lead {
	color: var(--rb-taupe);
	font-size: 0.95rem;
	line-height: 1.6;
	margin: 0;
	max-width: 42rem;
}

.rb-mega__grid {
	display: grid;
	gap: 0.85rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 1024px) and (max-width: 1180px) {
	.rb-mega__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.rb-mega__card {
	border: 1px solid rgba(61, 49, 43, 0.08);
	border-radius: 2px;
	color: inherit;
	display: grid;
	gap: 0;
	grid-template-columns: 88px 1fr;
	overflow: hidden;
	text-decoration: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.rb-mega__card:hover {
	border-color: rgba(197, 163, 119, 0.55);
	box-shadow: var(--rb-shadow-card);
	transform: translateY(-1px);
}

.rb-mega__card-image {
	display: block;
	height: 100%;
	min-height: 72px;
	overflow: hidden;
}

.rb-mega__card-image img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.rb-mega__card-body {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	justify-content: center;
	padding: 0.85rem 0.95rem;
}

.rb-mega__card-title {
	color: var(--rb-mocha);
	font-family: var(--wp--preset--font-family--heading, "Cormorant Garamond", serif);
	font-size: 1.05rem;
	font-weight: 500;
	line-height: 1.25;
}

.rb-mega__card-desc {
	color: var(--rb-taupe);
	font-size: 0.82rem;
	line-height: 1.45;
}

.rb-mega__footer {
	margin-top: 1rem;
	text-align: right;
}

.rb-mega__all-link {
	color: var(--rb-gold);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-decoration: none;
	text-transform: uppercase;
}

.rb-mega__all-link:hover {
	color: var(--rb-mocha);
}

/* ─── Section system ─── */
.rb-eyebrow {
	font-family: var(--rb-font-body);
	font-size: 0.75rem !important;
	font-weight: 600;
	letter-spacing: 0.14em;
	margin-bottom: 0.75rem !important;
	text-transform: uppercase;
}

.rb-section {
	padding-bottom: clamp(4.5rem, 8vw, 7.5rem) !important;
	padding-top: clamp(4.5rem, 8vw, 7.5rem) !important;
}

.rb-section__header {
	margin-bottom: 0;
	text-align: center;
}

.rb-section__header .rb-eyebrow {
	position: relative;
}

.rb-section__header .rb-eyebrow::after {
	background: var(--rb-gold);
	content: "";
	display: block;
	height: 1px;
	margin: 0.85rem auto 0;
	width: 2.75rem;
}

.rb-section--why {
	background: linear-gradient(180deg, #faf8f5 0%, var(--rb-off-white) 100%) !important;
}

.rb-prose {
	max-width: 40rem;
}

/* Pull quotes — italic Cormorant */
.rb-pullquote {
	border: 0;
	margin: 2rem 0;
	padding: 0;
	position: relative;
}

.rb-pullquote p {
	color: var(--rb-mocha);
	font-family: var(--rb-font-heading);
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-style: italic;
	font-weight: 400;
	line-height: 1.45;
	margin: 0;
}

.rb-pullquote::before {
	color: var(--rb-gold);
	content: "\201C";
	display: block;
	font-family: var(--rb-font-heading);
	font-size: 2.5rem;
	line-height: 1;
	margin-bottom: 0.35rem;
}

.rb-pullquote--inline {
	margin: 2rem 0;
}

.rb-pullquote--inline p {
	font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

/* Scroll reveal */
.rb-reveal {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.rb-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.rb-carousel__slide:nth-child(2) .rb-reveal {
	transition-delay: 0.08s;
}

.rb-carousel__slide:nth-child(3) .rb-reveal {
	transition-delay: 0.16s;
}

.rb-carousel__slide:nth-child(4) .rb-reveal {
	transition-delay: 0.08s;
}

.rb-carousel__slide:nth-child(5) .rb-reveal {
	transition-delay: 0.16s;
}

.rb-carousel__slide:nth-child(6) .rb-reveal {
	transition-delay: 0.24s;
}

.rb-founder-card {
	box-shadow: var(--rb-shadow-card);
}

/* ─── Carousels: swipe on mobile/tablet, static grid on desktop ─── */
.rb-carousel {
	position: relative;
	width: 100%;
}

.rb-carousel__viewport {
	outline: none;
}

.rb-carousel__track {
	display: grid;
	gap: 1.25rem;
}

.rb-carousel--features .rb-carousel__track {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rb-carousel--services .rb-carousel__track {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rb-carousel__slide {
	display: flex;
	min-width: 0;
}

@media (min-width: 782px) {
	.rb-carousel__track {
		align-items: stretch;
	}

	.rb-carousel__slide {
		height: auto;
	}

	.rb-service-card,
	.rb-feature-card {
		display: flex;
		flex: 1;
		flex-direction: column;
		height: 100%;
		width: 100%;
	}

	.rb-service-card__image {
		aspect-ratio: 16 / 10;
		flex-shrink: 0;
		margin: 0 !important;
		overflow: hidden;
		position: relative;
	}

	.rb-service-card__image img {
		height: 100%;
		object-fit: cover;
		width: 100%;
	}

	.rb-service-card > .wp-block-group {
		display: flex;
		flex: 1;
		flex-direction: column;
	}

	.rb-service-card > .wp-block-group p {
		flex: 1;
		margin-bottom: 0;
	}

	.rb-feature-card p {
		flex: 1;
		margin-bottom: 0;
	}
}

@media (min-width: 1024px) {
	.rb-section--services-grid,
	.rb-section--why {
		padding-left: clamp(1rem, 2vw, 1.25rem) !important;
		padding-right: clamp(1rem, 2vw, 1.25rem) !important;
	}

	.rb-section--services-grid > .alignwide,
	.rb-section--why > .alignwide,
	.rb-section--services-grid > .rb-carousel,
	.rb-section--why > .rb-carousel {
		margin-left: auto;
		margin-right: auto;
		max-width: min(1360px, calc(100vw - 2rem));
		width: 100%;
	}
}

.rb-carousel__footer {
	align-items: center;
	display: none;
	flex-direction: column;
	gap: 0.65rem;
	margin-top: 1.25rem;
}

.rb-carousel__dots {
	display: flex;
	gap: 0.45rem;
	justify-content: center;
}

.rb-carousel__dot {
	background: rgba(61, 49, 43, 0.18);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	height: 7px;
	padding: 0;
	transition: background-color 0.2s ease, transform 0.2s ease;
	width: 7px;
}

.rb-carousel__dot.is-active {
	background: var(--rb-gold);
	transform: scale(1.15);
}

.rb-carousel__hint {
	color: var(--rb-taupe);
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	margin: 0;
	text-align: center;
	text-transform: uppercase;
}

.rb-carousel.is-mobile .rb-carousel__footer {
	display: flex;
}

.rb-carousel.is-mobile {
	margin-left: -1.25rem;
	margin-right: -1.25rem;
	width: calc(100% + 2.5rem);
}

.rb-carousel.is-mobile .rb-carousel__viewport {
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.rb-carousel.is-mobile .rb-carousel__viewport::-webkit-scrollbar {
	display: none;
}

.rb-carousel.is-mobile .rb-carousel__track {
	display: flex;
	gap: 0.85rem;
	grid-template-columns: none;
	padding: 0.25rem 1.25rem 0.5rem;
}

.rb-carousel.is-mobile .rb-carousel__slide {
	flex: 0 0 86%;
	max-width: 86%;
	scroll-snap-align: start;
}

.rb-carousel.is-mobile .rb-service-card,
.rb-carousel.is-mobile .rb-feature-card {
	height: 100%;
}

/* ─── Hero ─── */
.rb-hero {
	min-height: 88vh !important;
}

.rb-hero .wp-block-cover__inner-container {
	margin: 0 auto;
	max-width: 1240px;
	width: 100%;
}

.rb-hero .wp-block-cover__image-background {
	object-fit: cover;
	object-position: center center;
}

.rb-hero .wp-block-heading {
	letter-spacing: -0.02em;
}

/* ─── Buttons ─── */
.wp-block-button__link {
	border-radius: 2px !important;
	letter-spacing: 0.08em;
	padding: 0.95rem 1.6rem !important;
	text-transform: uppercase;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, letter-spacing 0.2s ease;
}

.wp-block-button__link:hover {
	letter-spacing: 0.11em;
}

.rb-btn-outline-light .wp-block-button__link {
	background: transparent !important;
	border: 1px solid rgba(255, 255, 255, 0.75) !important;
	color: #fff !important;
}

.rb-btn-outline-light .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.1) !important;
	border-color: #fff !important;
}

/* ─── Cards ─── */
.rb-feature-card,
.rb-service-card {
	background: #fff;
	border: 1px solid rgba(61, 49, 43, 0.06);
	box-shadow: var(--rb-shadow-card);
	transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.rb-feature-card {
	position: relative;
}

.rb-feature-card::before {
	background: var(--rb-gold);
	content: "";
	height: 2px;
	left: 1.5rem;
	position: absolute;
	top: 0;
	width: 2.5rem;
}

.rb-feature-card .wp-block-heading {
	font-family: var(--rb-font-heading);
	font-size: 1.35rem;
	margin-top: 0.35rem;
}

.rb-feature-card:hover,
.rb-service-card:hover {
	border-color: rgba(197, 163, 119, 0.35);
	box-shadow: var(--rb-shadow-soft);
	transform: translateY(-3px);
}

.rb-service-card {
	overflow: hidden;
}

.rb-service-card__image {
	margin: 0 !important;
}

.rb-service-card__image img {
	border-radius: 0;
	display: block;
	width: 100%;
}

.rb-service-detail-section {
	scroll-margin-top: calc(var(--rb-header-height) + 1rem);
}

.rb-service-detail__photo img {
	border-radius: 2px;
	box-shadow: var(--rb-shadow-card);
	width: 100%;
}

@media (min-width: 782px) {
	.rb-service-detail--reverse {
		flex-direction: row-reverse;
	}
}

.rb-service-list {
	list-style: none;
	padding-left: 0;
}

.rb-service-list li {
	padding-left: 1.35rem;
	position: relative;
}

.rb-service-list li::before {
	color: var(--rb-gold);
	content: "—";
	left: 0;
	position: absolute;
}

/* ─── CTA & Footer ─── */
.rb-cta h2 {
	color: #fff;
}

.rb-footer {
	position: relative;
}

.rb-footer::before {
	background: linear-gradient(90deg, transparent, var(--rb-gold), transparent);
	content: "";
	height: 1px;
	left: 10%;
	position: absolute;
	right: 10%;
	top: 0;
}

.rb-footer a {
	color: var(--rb-off-white);
	text-decoration: none;
	transition: color 0.2s ease;
}

.rb-footer a:hover {
	color: var(--rb-gold);
}

.rb-footer .wp-block-navigation a {
	color: var(--rb-off-white);
}

.rb-footer-logo img {
	height: auto;
	max-width: 150px;
	width: auto;
}

/* ─── Forms ─── */
.rb-enquiry-form label {
	color: var(--rb-mocha);
	display: block;
	font-size: 0.8rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	margin-bottom: 0.35rem;
	text-transform: uppercase;
}

.rb-enquiry-form input,
.rb-enquiry-form textarea {
	background: var(--rb-off-white);
	border: 1px solid #e8e0d6;
	border-radius: 2px;
	font-family: inherit;
	font-size: 1rem;
	margin-bottom: 1.25rem;
	padding: 0.85rem 1rem;
	width: 100%;
}

.rb-enquiry-form input:focus,
.rb-enquiry-form textarea:focus {
	border-color: var(--rb-gold);
	outline: none;
}

.rb-enquiry-form button {
	border: none;
	cursor: pointer;
	margin-top: 0.5rem;
}

.rb-about-image img {
	border-radius: 2px;
	box-shadow: var(--rb-shadow-card);
	width: 100%;
}

/* ─── Legal pages ─── */
.rb-legal h2 {
	font-family: var(--rb-font-heading);
	font-size: 1.45rem;
	font-weight: 500;
	margin-bottom: 0.85rem;
	margin-top: 2.25rem;
}

.rb-legal h3 {
	font-family: var(--rb-font-body);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	margin-bottom: 0.65rem;
	margin-top: 1.5rem;
	text-transform: uppercase;
}

.rb-legal p,
.rb-legal li {
	color: var(--rb-taupe);
	font-size: 0.98rem;
	line-height: 1.75;
}

.rb-legal a {
	color: var(--rb-gold);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.rb-legal a:hover {
	color: var(--rb-mocha);
}

.rb-legal .rb-legal__updated {
	font-size: 0.9rem;
	margin-bottom: 1.5rem;
}

.rb-legal .wp-block-list {
	margin-bottom: 1.25rem;
	padding-left: 1.25rem;
}

.rb-legal .wp-block-list li {
	margin-bottom: 0.5rem;
}

/* ─── Responsive ─── */
@media (max-width: 1023px) {
	body.rb-nav-open {
		overflow: hidden;
	}

	.rb-mega {
		border: 0;
		box-shadow: none;
		display: block;
		max-height: 0;
		opacity: 1;
		overflow: hidden;
		padding: 0;
		pointer-events: none;
		transition: max-height 0.35s ease, padding 0.25s ease;
		visibility: visible;
	}

	.rb-nav__item--mega.is-open .rb-mega {
		max-height: 3200px;
		padding: 0.25rem 0 0.75rem;
		pointer-events: auto;
	}

	.rb-mega[hidden] {
		display: block !important;
		max-height: 0;
	}

	.rb-nav__item--mega.is-open .rb-mega[hidden] {
		max-height: 3200px;
	}

	.rb-mega__intro {
		border-bottom: 0;
		margin-bottom: 0.85rem;
		padding-bottom: 0;
	}

	.rb-mega__lead {
		font-size: 0.9rem;
		line-height: 1.55;
	}

	.rb-mega__grid {
		gap: 0.65rem;
		grid-template-columns: 1fr;
	}

	.rb-mega__card {
		border-radius: 2px;
		grid-template-columns: 80px 1fr;
		min-height: 72px;
	}

	.rb-mega__card-image {
		min-height: 72px;
	}

	.rb-mega__card-body {
		padding: 0.75rem 0.85rem;
	}

	.rb-mega__card-title {
		font-size: 1rem;
	}

	.rb-mega__card-desc {
		font-size: 0.8rem;
		line-height: 1.4;
	}

	.rb-mega__footer {
		margin-top: 0.85rem;
		text-align: center;
	}

	.rb-mega__all-link {
		display: inline-block;
		padding: 0.5rem 0;
	}
}

@media (max-width: 781px) {
	.rb-hero {
		min-height: 72vh !important;
	}

	.rb-hero .wp-block-buttons {
		align-items: stretch !important;
		flex-direction: column;
		width: 100%;
	}

	.rb-hero .wp-block-button,
	.rb-hero .wp-block-button__link {
		width: 100%;
	}

	.rb-hero .wp-block-button__link {
		display: block;
		text-align: center;
	}

	.rb-footer,
	.wp-block-group.alignfull.has-background:not(.rb-hero) {
		padding-left: 1.25rem !important;
		padding-right: 1.25rem !important;
	}

	.wp-block-group.alignfull,
	.wp-block-cover.alignfull {
		max-width: 100%;
		overflow-x: clip;
	}

	/* Allow carousels to scroll horizontally within clipped sections */
	.rb-section--why,
	.rb-section--services-grid {
		overflow-x: clip;
	}
}
