/* ============================================================
   REFERENZEN BENTO — Frontend
   Alle Klassen mit Präfix .rw-  (Liste: KLASSEN.md)
   Farben/Radien unten in :root – dort umstellen, nicht im Code.
   ============================================================ */

:root {
	--rw-white:    #FFFFFF;
	--rw-off:      #F4F4F4;
	--rw-line:     #E4E4E4;
	--rw-black:    #0A0A0A;
	--rw-black-2:  #111111;
	--rw-gray:     #8F8F8F;
	--rw-gray-2:   #B5B5B5;
	--rw-gray-d:   #666666;

	--rw-r-card:   16px;
	--rw-r-panel:  24px;
	--rw-gap:      12px;
	--rw-row:      230px;
	--rw-font:     "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
	--rw-grayscale: grayscale(1);

	--rw-ease:     cubic-bezier(.22, .9, .24, 1);
	--rw-ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Grundgerüst ---------- */
.rw-refs,
.rw-detail-wrap {
	font-family: var(--rw-font);
	font-weight: 400;
	letter-spacing: normal;
	-webkit-font-smoothing: antialiased;
}

.rw-refs {
	background: var(--rw-white);
	color: var(--rw-black);
	padding: clamp(56px, 8vw, 120px) clamp(16px, 4vw, 48px);
}

.rw-refs *,
.rw-detail-wrap * {
	box-sizing: border-box;
}

.rw-refs__inner {
	max-width: 1240px;
	margin: 0 auto;
}

/* ---------- Kopf ---------- */
.rw-eyebrow {
	font-size: 12px;
	line-height: 1.4;
	color: var(--rw-black);
	margin: 0;
}

.rw-eyebrow__label {
	display: block;
	color: var(--rw-gray-d);
}

.rw-eyebrow__label b {
	font-weight: 500;
}

.rw-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 24px;
	justify-content: space-between;
	margin: 14px 0 clamp(30px, 4vw, 52px);
}

.rw-head__title {
	margin: 0;
	padding: 0;
	font-weight: 400;
	font-size: clamp(34px, 5vw, 58px);
	line-height: 1.06;
	letter-spacing: normal;
	color: var(--rw-black);
	max-width: 16ch;
}

.rw-head__title em {
	font-style: italic;
	font-weight: 300;
}

.rw-head__text {
	margin: 0;
	color: var(--rw-gray-d);
	max-width: 30ch;
	font-size: 14px;
	line-height: 1.6;
	text-align: right;
}

/* ---------- Bento-Grid ---------- */
.rw-bento {
	display: grid;
	gap: var(--rw-gap);
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: minmax(var(--rw-row), auto);
}

.rw-card {
	position: relative;
	display: block;
	overflow: hidden;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--rw-r-card);
	background: var(--rw-black);
	text-align: left;
	font: inherit;
	color: var(--rw-white);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: transform .5s var(--rw-ease), box-shadow .5s var(--rw-ease);
	will-change: transform;
}

.rw-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 20px 44px -20px rgba(0, 0, 0, .5);
	background: var(--rw-black);
}

.rw-card:focus-visible {
	outline: 2px solid var(--rw-black);
	outline-offset: 3px;
}

.rw-card.is-open {
	opacity: 0;
	pointer-events: none;
}

/* Grössen */
.rw-card--lg   { grid-column: span 2; grid-row: span 2; }
.rw-card--wide { grid-column: span 2; grid-row: span 1; }
.rw-card--sm   { grid-column: span 1; grid-row: span 1; }

/* Medien */
.rw-card__media {
	position: absolute;
	inset: 0;
	display: block;
	overflow: hidden;
	background: var(--rw-black-2);
}

.rw-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: var(--rw-grayscale);
}

.rw-card__veil {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
	pointer-events: none;
	background: linear-gradient(to top, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .72) 34%, rgba(0, 0, 0, .18) 70%, rgba(0, 0, 0, .05) 100%);
}

.rw-card__foot {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 20px 22px 22px;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
}

.rw-card__info {
	display: block;
	min-width: 0;
}

.rw-card__kind {
	display: block;
	font-size: 11.5px;
	line-height: 1.4;
	color: var(--rw-gray-2);
	margin-bottom: 6px;
}

.rw-card__title {
	display: block;
	font-weight: 500;
	font-size: 19px;
	line-height: 1.25;
	color: var(--rw-white);
}

.rw-card--lg .rw-card__title {
	font-size: 26px;
}

.rw-card__sub {
	display: block;
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--rw-gray-2);
	margin-top: 4px;
}

.rw-card__year {
	display: block;
	font-size: 12px;
	color: var(--rw-gray-2);
	flex: none;
	padding-bottom: 3px;
}

.rw-card__go {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: 12px;
	font-size: 12.5px;
	color: var(--rw-white);
	opacity: .75;
	transition: opacity .3s, gap .3s var(--rw-ease);
}

.rw-card:hover .rw-card__go {
	opacity: 1;
	gap: 11px;
}

.rw-card__go svg {
	width: 11px;
	height: 11px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}

/* ---------- Badge ---------- */
.rw-chip {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 3;
	font-size: 10.5px;
	line-height: 1;
	padding: 6px 11px;
	border-radius: 999px;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	background: rgba(255, 255, 255, .13);
	color: var(--rw-white);
	border: 1px solid rgba(255, 255, 255, .18);
	display: flex;
	align-items: center;
	gap: 7px;
}

.rw-chip--off {
	color: var(--rw-gray-2);
	background: rgba(255, 255, 255, .06);
}

.rw-chip__dot {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--rw-white);
	flex: none;
}

.rw-chip--off .rw-chip__dot {
	background: var(--rw-gray);
}

/* ---------- Slider ---------- */
.rw-slider {
	position: absolute;
	inset: 0;
	display: block;
	overflow: hidden;
	touch-action: pan-y;
}

.rw-slider__track {
	display: flex;
	height: 100%;
	transition: transform .7s var(--rw-ease-out);
	will-change: transform;
}

.rw-slider__track img {
	flex: none;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: var(--rw-grayscale);
}

.rw-slider__dots {
	position: absolute;
	left: 22px;
	bottom: 16px;
	display: flex;
	gap: 5px;
	z-index: 3;
}

.rw-dot {
	width: 16px;
	height: 2px;
	border-radius: 2px;
	background: rgba(255, 255, 255, .35);
	transition: background .3s, width .4s var(--rw-ease);
}

.rw-dot.is-on {
	background: var(--rw-white);
	width: 24px;
}

.rw-slider__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	width: 36px;
	height: 36px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .22);
	background: rgba(0, 0, 0, .45);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: var(--rw-white);
	cursor: pointer;
	display: grid;
	place-items: center;
	opacity: 0;
	transition: opacity .3s, background .2s;
}

.rw-slider:hover .rw-slider__nav,
.rw-slider__nav:focus-visible {
	opacity: 1;
}

.rw-slider__nav:hover {
	background: var(--rw-white);
	color: var(--rw-black);
}

.rw-slider__nav--prev { left: 12px; }
.rw-slider__nav--next { right: 12px; }

.rw-slider__nav svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}

/* Auf der Karte: keine Pfeile, Punkte oben */
.rw-card .rw-slider__dots {
	bottom: auto;
	top: 16px;
	left: 16px;
}

/* ---------- Detail-Overlay ---------- */
.rw-scrim {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(10, 10, 10, .62);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	opacity: 0;
}

.rw-scrim[hidden] { display: none; }

.rw-detail-wrap {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: grid;
	place-items: center;
	padding: clamp(12px, 3vw, 40px);
	pointer-events: none;
}

.rw-detail-wrap[hidden] { display: none; }

.rw-detail {
	pointer-events: auto;
	position: relative;
	width: min(1080px, 100%);
	max-height: min(88vh, 860px);
	background: var(--rw-white);
	color: var(--rw-black);
	border-radius: var(--rw-r-panel);
	overflow: hidden;
	transform-origin: top left;
	display: grid;
	grid-template-columns: 1.1fr .9fr;
	box-shadow: 0 60px 120px -40px rgba(0, 0, 0, .6);
}

.rw-detail__media {
	position: relative;
	min-height: 340px;
	background: var(--rw-black);
	overflow: hidden;
}

.rw-detail__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: var(--rw-grayscale);
}

.rw-detail__body {
	padding: clamp(24px, 2.8vw, 40px);
	display: flex;
	flex-direction: column;
	gap: 18px;
	overflow-y: auto;
}

.rw-detail__kind {
	font-size: 12px;
	color: var(--rw-gray-d);
}

.rw-detail__head {
	margin: 0;
}

.rw-detail__title {
	margin: 0;
	padding: 0;
	font-weight: 400;
	font-size: clamp(28px, 3.4vw, 40px);
	line-height: 1.08;
	color: var(--rw-black);
}

.rw-detail__title em {
	font-style: italic;
	font-weight: 300;
}

.rw-detail__lead {
	margin: 14px 0 0;
	color: var(--rw-gray-d);
	line-height: 1.7;
	font-size: 14.5px;
}

.rw-detail__meta {
	margin: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	border-top: 1px solid var(--rw-line);
	border-bottom: 1px solid var(--rw-line);
	padding: 18px 0;
}

.rw-detail__meta dt {
	font-size: 11px;
	color: var(--rw-gray);
	margin-bottom: 4px;
}

.rw-detail__meta dd {
	margin: 0;
	font-size: 13.5px;
	color: var(--rw-black);
}

.rw-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.rw-tag {
	font-size: 11.5px;
	padding: 6px 11px;
	border: 1px solid var(--rw-line);
	border-radius: 999px;
	color: var(--rw-gray-d);
}

.rw-detail__actions {
	margin-top: auto;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
	padding-top: 6px;
}

/* ---------- Buttons ---------- */
.rw-btn {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	padding: 6px 20px 6px 6px;
	border-radius: 999px;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 400;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: transform .3s var(--rw-ease), background .25s, color .25s, border-color .25s;
}

.rw-btn:hover {
	transform: translateY(-2px);
	text-decoration: none;
}

.rw-btn__ico {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	flex: none;
	display: grid;
	place-items: center;
}

.rw-btn__ico svg {
	width: 13px;
	height: 13px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}

.rw-btn--primary {
	background: var(--rw-black);
	color: var(--rw-white);
}

.rw-btn--primary:hover,
.rw-btn--primary:focus {
	background: var(--rw-black);
	color: var(--rw-white);
}

.rw-btn--primary .rw-btn__ico {
	background: var(--rw-white);
	color: var(--rw-black);
}

.rw-btn--ghost {
	border-color: var(--rw-line);
	color: var(--rw-gray-d);
	padding: 11px 20px;
	background: transparent;
}

.rw-btn--ghost:hover {
	border-color: var(--rw-black);
	color: var(--rw-black);
	background: transparent;
}

/* ---------- Hinweis statt Button ---------- */
.rw-nolink {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 14px 16px;
	border-radius: 12px;
	background: var(--rw-off);
	border: 1px solid var(--rw-line);
	color: var(--rw-gray-d);
	font-size: 13px;
	line-height: 1.55;
}

.rw-nolink svg {
	width: 16px;
	height: 16px;
	flex: none;
	margin-top: 1px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
}

/* ---------- Schliessen ---------- */
.rw-close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 5;
	width: 38px;
	height: 38px;
	padding: 0;
	border-radius: 50%;
	border: 0;
	background: var(--rw-black);
	color: var(--rw-white);
	cursor: pointer;
	display: grid;
	place-items: center;
	transition: transform .35s var(--rw-ease);
}

.rw-close:hover {
	transform: rotate(90deg);
	background: var(--rw-black);
}

.rw-close svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.rw-bento {
		grid-template-columns: repeat(2, 1fr);
		grid-auto-rows: minmax(190px, auto);
	}
	.rw-card--lg   { grid-column: span 2; grid-row: span 1; }
	.rw-card--wide { grid-column: span 2; }
	.rw-card--sm   { grid-column: span 1; }
	.rw-head__text { text-align: left; }

	.rw-detail {
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
		max-height: 92vh;
	}
	.rw-detail__media {
		min-height: 0;
		aspect-ratio: 16 / 10;
	}
}

@media (max-width: 560px) {
	.rw-bento {
		grid-template-columns: 1fr;
		grid-auto-rows: minmax(200px, auto);
	}
	.rw-card--lg,
	.rw-card--wide,
	.rw-card--sm {
		grid-column: span 1;
		grid-row: span 1;
	}
	.rw-card__title { font-size: 18px; }
	.rw-card--lg .rw-card__title { font-size: 20px; }
	.rw-card__foot { padding: 16px 16px 18px; }
	.rw-detail { border-radius: 18px; }
	.rw-detail__meta { grid-template-columns: 1fr; }
	.rw-detail__media { aspect-ratio: 4 / 3; }
	.rw-btn { width: 100%; justify-content: flex-start; }
	.rw-btn--ghost { justify-content: center; }
}

@media (hover: none) {
	.rw-slider__nav { opacity: 1; }
	.rw-card:hover { transform: none; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
	.rw-refs *,
	.rw-detail-wrap * {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
	}
}
