/**
 * Raymi-Peru Page Builder — Frontend Styles
 * Renders builder sections with the theme's design system.
 */

/* ── Base ── */
.rb-main {
	overflow-x: hidden;
}
.rb-section {
	padding: clamp(3rem, 6vw, 5rem) 0;
}
.rb-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 clamp(1rem, 3vw, 2rem);
}
.rb-container--narrow {
	max-width: 720px;
}
.rb-section__title {
	font-family: 'Fraunces', Georgia, serif;
	font-weight: 900;
	font-size: clamp(1.75rem, 1.4rem + 1.75vw, 2.5rem);
	line-height: 1.15;
	color: var(--wp--preset--color--terra-deep);
	margin: 0 0 0.6em;
}
.rb-section__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.rb-section__link {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.85rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--terra);
	text-decoration: none;
}
.rb-section__link:hover {
	color: var(--wp--preset--color--terra-dark);
}
.rb-prose {
	font-family: 'Fraunces', Georgia, serif;
	font-size: clamp(1rem, 0.925rem + 0.375vw, 1.125rem);
	line-height: 1.8;
	color: var(--wp--preset--color--ink);
}
.rb-empty {
	text-align: center;
	color: var(--wp--preset--color--terra-dark);
	font-family: 'Fraunces', Georgia, serif;
	padding: 2rem;
}

/* ── Separator ── */
.rb-separator {
	height: 3px;
	width: 80px;
	border: none;
	margin: 0 0 1.5em;
}
.rb-separator--gold {
	background: var(--wp--preset--color--gold);
}

/* ── Grid ── */
.rb-grid {
	display: grid;
	gap: clamp(1rem, 2vw, 1.5rem);
}
.rb-grid--1 { grid-template-columns: 1fr; }
.rb-grid--2 { grid-template-columns: repeat(2, 1fr); }
.rb-grid--3 { grid-template-columns: repeat(3, 1fr); }
.rb-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) {
	.rb-grid--2, .rb-grid--3, .rb-grid--4 {
		grid-template-columns: 1fr;
	}
}
@media (min-width: 769px) and (max-width: 1024px) {
	.rb-grid--3 { grid-template-columns: repeat(2, 1fr); }
	.rb-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Card ── */
.rb-card {
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--gold-pale);
	background: #fff;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.rb-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(26,14,6,0.08);
}
.rb-card__image {
	display: block;
	overflow: hidden;
}
.rb-card__image img {
	width: 100%;
	height: auto;
	aspect-ratio: 16/9;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.rb-card:hover .rb-card__image img {
	transform: scale(1.04);
}
.rb-card__body {
	padding: clamp(0.75rem, 2vw, 1.25rem);
}
.rb-card__meta {
	display: block;
	font-family: 'DM Sans', sans-serif;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold-text, #8a5a00); /* 5,93:1 auf white (gold: 3,07 – AA-Fehler) */
	margin-bottom: 0.4em;
}
.rb-card__title {
	font-family: 'Fraunces', Georgia, serif;
	font-size: clamp(1.1rem, 0.9rem + 0.5vw, 1.35rem);
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 0.4em;
}
.rb-card__title a {
	color: var(--wp--preset--color--terra-deep);
	text-decoration: none;
}
.rb-card__title a:hover {
	color: var(--wp--preset--color--terra);
}
.rb-card__excerpt {
	font-family: 'Fraunces', Georgia, serif;
	font-size: 0.9rem;
	line-height: 1.6;
	color: var(--wp--preset--color--ink);
	margin: 0;
}

/* ── Hero ── */
.rb-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 0;
}
.rb-hero__overlay {
	position: absolute;
	inset: 0;
	background: rgba(61, 14, 14, 0.55);
	z-index: 1;
}
.rb-hero__inner {
	position: relative;
	z-index: 2;
	padding: clamp(4rem, 10vw, 8rem) clamp(1rem, 4vw, 2rem);
}
.rb-hero__kicker {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.85rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold-light); /* 7,93:1 auf terra-deep */
	margin: 0 0 1rem;
}
.rb-hero__title {
	font-family: 'Fraunces', Georgia, serif;
	font-weight: 900;
	font-size: clamp(2.5rem, 1.8rem + 3.5vw, 4rem);
	line-height: 1.1;
	margin: 0 0 1rem;
	color: inherit; /* Hero-Textfarbe gilt auch für h1 (theme.json färbt h1 sonst dunkelrot) */
	text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
}
.rb-hero__actions {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

/* ── Buttons ── */
.rb-btn {
	display: inline-block;
	font-family: 'DM Sans', sans-serif;
	font-weight: 700;
	font-size: 0.85rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 0.75em 1.75em;
	border-radius: 4px;
	transition: all 0.2s ease;
}
.rb-btn--gold {
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--terra-deep);
}
.rb-btn--gold:hover {
	background: var(--wp--preset--color--gold-light);
	transform: translateY(-1px);
}
.rb-btn--outline {
	background: transparent;
	color: var(--wp--preset--color--cream);
	border: 2px solid var(--wp--preset--color--cream);
}
.rb-btn--outline:hover {
	background: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--terra-deep);
}

/* ── About ── */
.rb-about__wrap {
	display: flex;
	gap: clamp(2rem, 4vw, 4rem);
	align-items: center;
}
.rb-about--img-none .rb-about__wrap {
	justify-content: center;
}
.rb-about--img-left .rb-about__wrap {
	flex-direction: row-reverse;
}
.rb-about__text {
	flex: 1;
}
.rb-about__media {
	flex: 0 0 40%;
}
.rb-about__image, .rb-about__media img {
	width: 100%;
	height: auto;
	border-radius: 8px;
}
@media (max-width: 768px) {
	.rb-about__wrap {
		flex-direction: column !important;
	}
	.rb-about__media {
		flex: none;
		width: 100%;
	}
}

/* ── Team / Members ── */
.rb-member {
	text-align: center;
	padding: clamp(1rem, 2vw, 1.5rem);
	background: #fff;
	border-radius: 8px;
}
.rb-member__photo {
	width: 100%;
	aspect-ratio: 3/4;
	object-fit: cover;
	border-radius: 6px;
	margin-bottom: 1rem;
}
.rb-member__name {
	font-family: 'Fraunces', Georgia, serif;
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 0.25em;
	color: var(--wp--preset--color--terra-deep);
}
.rb-member__role {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.8rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold-text, #8a5a00); /* 5,93 white / 5,42 cream (gold: 3,07 / 2,81) */
	margin: 0;
}

/* ── Gallery ── */
.rb-gallery__item {
	display: block;
	position: relative;
	border-radius: 8px;
	overflow: hidden;
}
.rb-gallery__item img {
	width: 100%;
	aspect-ratio: 4/3;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.rb-gallery__item:hover img {
	transform: scale(1.04);
}
.rb-gallery__label {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 2rem 1rem 1rem;
	background: linear-gradient(transparent, rgba(0,0,0,0.7));
	color: #fff;
	font-family: 'DM Sans', sans-serif;
	font-size: 0.85rem;
	font-weight: 500;
}

/* ── CTA ── */
.rb-cta {
	text-align: center;
}
.rb-cta__title {
	font-family: 'Fraunces', Georgia, serif;
	font-weight: 900;
	font-size: clamp(1.75rem, 1.4rem + 1.75vw, 2.5rem);
	margin: 0 0 0.5em;
	color: inherit;
}
.rb-cta__text {
	font-family: 'Fraunces', Georgia, serif;
	font-size: 1.1rem;
	line-height: 1.6;
	max-width: 600px;
	margin: 0 auto 1.5em;
	opacity: 0.9;
}

/* ── Dividers ── */
.rb-divider hr {
	border: none;
	margin: 0 auto;
}
.rb-divider--gold hr {
	height: 3px;
	width: 80px;
	background: var(--wp--preset--color--gold);
}
.rb-divider--full hr {
	height: 1px;
	width: 100%;
	max-width: 1200px;
	background: var(--wp--preset--color--gold-pale);
}
.rb-divider--dots hr {
	height: auto;
	width: auto;
	background: none;
	border-bottom: none;
	text-align: center;
}
.rb-divider--dots hr::after {
	content: '• • •';
	color: var(--wp--preset--color--gold);
	letter-spacing: 0.5em;
	font-size: 1.2rem;
}
.rb-divider--spacing-small { padding: 1rem 0; }
.rb-divider--spacing-normal { padding: 2rem 0; }
.rb-divider--spacing-large { padding: 4rem 0; }

/* ── Chronik (Mini-Zeitleiste; Basis-Stile in assets/css/custom.css) ── */
.rb-chronik__list {
	margin-top: 0.5rem;
}
.rb-chronik .rp-entry__title {
	font-size: clamp(1.1rem, 0.9rem + 0.5vw, 1.35rem);
}

/* ── Lebendige Traditionen: Editionen ── */
.rb-editions__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.rb-edition {
	display: flex;
	flex-direction: column;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--gold-pale);
	background: #fff;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.rb-edition:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(26,14,6,0.08);
}
.rb-edition__band {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 1rem;
	padding: clamp(1rem, 2vw, 1.5rem);
	background: var(--wp--preset--color--terra-deep);
	color: var(--wp--preset--color--gold-light); /* 7,93:1 */
	--rp-focus: var(--wp--preset--color--gold-light);
}
.rb-edition__year {
	font-family: 'Fraunces', Georgia, serif;
	font-size: clamp(2.5rem, 2rem + 2vw, 3.5rem);
	font-weight: 900;
	line-height: 1;
	font-variant-numeric: lining-nums;
}
.rb-edition__label {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold-pale); /* 13,10:1 */
	text-align: right;
	line-height: 1.4;
	margin-left: auto;
}
.rb-edition__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16/9;
	object-fit: cover;
}

/* ── Zitat: Objekt + Stimme ── */
.rb-voice__grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: center;
}
.rb-voice__grid--text {
	grid-template-columns: minmax(0, 1fr);
	max-width: 720px;
	margin: 0 auto;
}
.rb-voice__object {
	margin: 0;
	background: #fff;
	border: 1px solid var(--wp--preset--color--gold-pale);
	border-radius: 4px;
	padding: 1rem;
}
.rb-voice__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
}
.rb-voice__object figcaption {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.8rem;
	line-height: 1.45;
	color: var(--wp--preset--color--stone, #5e5348); /* 7,48:1 auf white */
	margin-top: 0.75rem;
}
.rb-voice__voice {
	margin: 0;
}
.rb-voice__quote {
	margin: 0;
	border-left: 4px solid var(--wp--preset--color--gold);
	padding-left: clamp(1rem, 3vw, 1.5rem);
}
.rb-voice__quote p {
	font-family: 'Fraunces', Georgia, serif;
	font-style: italic;
	font-weight: 300;
	font-size: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
	line-height: 1.5;
	color: var(--wp--preset--color--terra-deep);
	margin: 0 0 0.6em;
}
.rb-voice__cite {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.875rem;
	color: var(--wp--preset--color--ink);
	padding-left: calc(4px + clamp(1rem, 3vw, 1.5rem));
}
.rb-voice__name {
	font-weight: 700;
}
.rb-voice__name + .rb-voice__source::before {
	content: " · ";
}
.rb-voice__source {
	color: var(--wp--preset--color--stone, #5e5348); /* 6,85:1 auf cream */
}
.rb-voice__translation {
	margin-top: 1rem;
	padding-left: calc(4px + clamp(1rem, 3vw, 1.5rem));
	font-family: 'Fraunces', Georgia, serif;
}
.rb-voice__translation summary {
	cursor: pointer;
	font-family: 'DM Sans', sans-serif;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--wp--preset--color--terra); /* 5,64:1 */
}
@media (max-width: 768px) {
	.rb-voice__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ── Reduced motion (WCAG 2.3.3, brand/README §6) ── */
@media (prefers-reduced-motion: reduce) {
	.rb-card, .rb-card__image img, .rb-gallery__item img, .rb-btn, .rb-edition {
		transition: none !important;
	}
	.rb-card:hover, .rb-btn--gold:hover, .rb-edition:hover,
	.rb-card:hover .rb-card__image img, .rb-gallery__item:hover img {
		transform: none !important;
	}
}

/* ── Print ── */
@media print {
	.rb-hero { min-height: auto !important; }
	.rb-hero__overlay { display: none; }
}
