/*
 * Designvorlage „Morgen im Dorf“
 *
 * Wird nur geladen, wenn im Backend unter Design die Vorlage gewählt ist.
 * Alles ist auf body.cp-theme-morgen begrenzt: Ohne diese Klasse hat die
 * Datei keine Wirkung, und die Standard-Gestaltung bleibt unberührt.
 */

@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/dm-sans-400.ttf") format("truetype"); }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/dm-sans-700.ttf") format("truetype"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/fraunces-300.ttf") format("truetype"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/fraunces-500.ttf") format("truetype"); }

body.cp-theme-morgen {
	--cp-primary: #d6452f;
	--cp-primary-hover: #b83822;
	--cp-primary-contrast: #ffffff;
	--cp-primary-soft: #fbe6df;
	--cp-secondary: #14213d;
	--cp-secondary-contrast: #ffffff;
	--cp-accent: #f0a35e;
	--cp-accent-contrast: #14213d;
	--cp-text: #14213d;
	--cp-heading: #14213d;
	--cp-muted: #566380;
	--cp-bg: #f4f7fa;
	--cp-surface: #e6edf4;
	--cp-surface-alt: #dbe5ee;
	--cp-border: rgba(20, 33, 61, .14);
	--cp-focus: #d6452f;
	--cp-font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--cp-font-heading: "Fraunces", Georgia, "Times New Roman", serif;
	--cp-fw-heading: 500;
	--cp-radius-sm: 8px;
	--cp-radius-md: 18px;
	--cp-radius-lg: 28px;
	--cp-btn-radius: 999px;
	--cp-shadow-sm: 0 1px 2px rgba(20, 33, 61, .06);
	--cp-shadow-md: 0 14px 34px -22px rgba(20, 33, 61, .35);
	--cp-shadow-lg: 0 30px 60px -30px rgba(20, 33, 61, .4);
	background: var(--cp-bg);
	color: var(--cp-text);
}

/* Überschriften */

.cp-theme-morgen :is(h1, h2, h3, h4) {
	font-family: var(--cp-font-heading);
	font-weight: 500;
	letter-spacing: -.015em;
	line-height: 1.08;
}

.cp-theme-morgen .cp-eyebrow {
	letter-spacing: .2em;
	text-transform: uppercase;
	font-size: .8rem;
	color: var(--cp-primary);
}

/* Kopfbereich */

.cp-theme-morgen .cp-header {
	background: rgba(244, 247, 250, .78);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
}

.cp-theme-morgen .cp-nav__link { position: relative; }

.cp-theme-morgen .cp-nav__link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -4px;
	height: 1px;
	background: var(--cp-primary);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform .4s var(--cp-ease, ease);
}

.cp-theme-morgen .cp-nav__link:hover::after,
.cp-theme-morgen .cp-nav__link:focus-visible::after { transform: scaleX(1); transform-origin: left; }

/* Beginn der Seite: Morgenhimmel mit warmem Schimmer */

.cp-theme-morgen .cp-main > .cp-section:first-child:not(.cp-section--image) {
	background-image:
		radial-gradient(ellipse 90% 55% at 50% 118%, rgba(240, 163, 94, .45), rgba(255, 222, 180, .18) 45%, transparent 72%),
		linear-gradient(180deg, #cfe0f0 0%, #f4f7fa 70%);
}

.cp-theme-morgen .cp-hero__title {
	font-weight: 500;
	letter-spacing: -.02em;
	line-height: 1.02;
}

.cp-theme-morgen .cp-hero__span-end b {
	font-family: var(--cp-font-heading);
	font-weight: 300;
	color: var(--cp-primary);
}

.cp-theme-morgen .cp-dust {
	position: absolute;
	inset: 0;
	z-index: -1;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* Schaltflächen */

.cp-theme-morgen .cp-btn { font-weight: 700; will-change: transform; }

.cp-theme-morgen .cp-btn--outline,
.cp-theme-morgen .cp-btn--ghost { border-color: rgba(20, 33, 61, .3); }

/* Karten */

.cp-theme-morgen :is(.cp-feature, .cp-plan, .cp-post, .cp-testimonial, .cp-step) {
	position: relative;
	background: #fff;
	border: 1px solid rgba(20, 33, 61, .08);
	border-radius: var(--cp-radius-md);
	box-shadow: var(--cp-shadow-md);
	transition: box-shadow .4s var(--cp-ease, ease), transform .4s var(--cp-ease, ease);
	overflow: hidden;
}

.cp-theme-morgen :is(.cp-feature, .cp-plan, .cp-post, .cp-testimonial, .cp-step):hover { box-shadow: var(--cp-shadow-lg); }

/* Lichtschein unter dem Mauszeiger – Position setzt theme-morgen.js */
.cp-theme-morgen :is(.cp-feature, .cp-plan, .cp-post, .cp-testimonial)::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(214, 69, 47, .11), transparent 60%);
	opacity: 0;
	transition: opacity .35s;
}

.cp-theme-morgen :is(.cp-feature, .cp-plan, .cp-post, .cp-testimonial):hover::before { opacity: 1; }
.cp-theme-morgen :is(.cp-feature, .cp-plan, .cp-post, .cp-testimonial) > * { position: relative; z-index: 1; }

/* Einfache Karten ohne eigenen Innenabstand bekommen einen, damit der Text nicht am Rand klebt */
.cp-theme-morgen :is(.cp-feature, .cp-step) { padding: clamp(20px, 2.4vw, 32px); }

.cp-theme-morgen .cp-steps--row .cp-step { flex-direction: column; }

.cp-theme-morgen .cp-events .cp-event { border-radius: var(--cp-radius-md); }

.cp-theme-morgen .cp-stat__value {
	font-family: var(--cp-font-heading);
	font-weight: 300;
	color: var(--cp-primary);
	font-variant-numeric: tabular-nums;
}

/* Dunkle Abschnitte bleiben als „Nacht“-Kontrast erhalten */

.cp-theme-morgen .cp-bg-dark { --cp-section-bg: #0a0f1e; }

.cp-theme-morgen .cp-footer {
	background: #14213d;
	color: #c3cce2;
	--cp-heading: #fff;
	--cp-text: #c3cce2;
	--cp-muted: #a9b4cf;
	--cp-border: rgba(255, 255, 255, .16);
}

.cp-theme-morgen .cp-footer a { color: #f0a35e; }

/* Lesefortschritt oben (setzt theme-morgen.js) */

.cp-progress {
	position: fixed;
	z-index: 60;
	inset: 0 0 auto 0;
	height: 3px;
	background: var(--cp-primary);
	transform: scaleX(0);
	transform-origin: left;
	pointer-events: none;
}

/* Lenis */

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	.cp-theme-morgen .cp-nav__link::after,
	.cp-theme-morgen :is(.cp-feature, .cp-plan, .cp-post, .cp-testimonial, .cp-step) { transition: none; }
	.cp-dust, .cp-progress { display: none; }
}
