* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	--color-bg: #EDE6E3;
	--color-text: #201E1C;
	--color-white: #ffffff;
	--color-accent: #ff9777;
	--color-accent-dark: #fd8764;
	--color-dimmer: rgba(0, 0, 0, 0.4);

	--font-body: 'Arimo', sans-serif;
	--font-script: 'Sophillia', cursive;
	--font-handwriting: 'Amsterdam', cursive;
}

body {
	font-family: var(--font-body);
	background-color: var(--color-bg);
	font-size: 16px;
	color: var(--color-text);
}

::selection {
  	color: var(--color-white);
 	background-color: var(--color-accent);
}

.scroll-indicator {
	position: fixed;
	bottom: 35px;
	left: 0;
	right: 0;
	display: flex;
	cursor: pointer;
	flex-direction: column;
	align-items: center;
	z-index: 21;
	opacity: 0;
	gap: 5px;

	&.visible {
		animation: fadeIn .75s ease forwards;
	}

	#scroll-lottie {
		width: 70px;
		height: 70px;
		opacity: 0;
		transition: opacity 0.6s ease;
	}

	&.is-mouse #scroll-lottie {
		width: 40px;
		height: 40px;
	}

	&.lottie-visible #scroll-lottie {
		opacity: 1;
	}

	.scroll-label {
		font-size: 10px;
		text-transform: uppercase;
		letter-spacing: 2px;
		color: var(--color-text);
	}
}

@keyframes fadeIn {
	from { opacity: 0; bottom: 15px; }
	to { opacity: 1; bottom: 35px; }
}

.overlay {
	position: fixed;
	inset: 0;
	z-index: 20;
	width: 100%;
	height: 100%;
	transition: opacity 0.4s ease-out;
}

.overlay-backdrop {
	position: fixed;
	inset: 0;
	z-index: 19;
	backdrop-filter: blur(20px);
	background: rgba(0, 0, 0, 0.5);
	pointer-events: none;
}

.animation-group {
	transform: scale(0.1238);
	clip-path: inset(50% 0 50% 0);
	will-change: transform, clip-path;
}

.animation-path {
	fill: black;
	stroke: black;
	stroke-width: 0;
	stroke-linejoin: round;
	stroke-linecap: round;
	will-change: stroke-width;
}


.header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 40px;
	will-change: padding;
	z-index: 10;

	@media(max-width: 900px) {
		padding: 18px 20px;
	}

	@media(max-width: 700px) {
		transition: padding 0.3s ease;
	}

	& svg {
		height: 45px;
		width: auto;
		will-change: height;

		@media(max-width: 900px) {
			height: 40px;
		}

		@media(max-width: 700px) {
			height: 36px;

			path {
				fill: var(--color-white) !important;
				transition: fill 0.3s ease;
			}
		}
	}

	.nav {
		color: var(--color-white);
		display: flex;
		align-items: center;
		gap: 15px;
		text-transform: uppercase;
		cursor: pointer;
		user-select: none;
		width: 24px;
		transition: color 0.3s ease;

		.hamburger {
			display: flex;
			flex-direction: column;
			gap: 10px;
			cursor: pointer;
			transition: gap .3s ease;

			.stripe {
				background-color: var(--color-white);
				height: 2px;

				&:nth-child(1) {
					width: 24px;
					transform-origin: bottom left;
					transition-delay: 0s;
					transition: background-color 0.3s ease 0s, width .5s cubic-bezier(.87,-0.01,.48,.98) .6s, transform .5s cubic-bezier(.87,-0.01,.48,.98) 0s;
				}

				&:nth-child(2) {
					width: 19px;
					transition: background-color 0.3s ease 0s, width .5s cubic-bezier(.87,-0.01,.48,.98) .6s, transform .5s cubic-bezier(.87,-0.01,.48,.98) 0s;
				}

				&:nth-child(3) {
					width: 7px;
					transform-origin: top left;
					transition: background-color 0.3s ease 0s, width .5s cubic-bezier(.87,-0.01,.48,.98) .6s, transform .5s cubic-bezier(.87,-0.01,.48,.98) 0s;
				}
			}
		}
	}

	&.header--dark {
		.nav {
			color: var(--color-text);

			.hamburger .stripe {
				background-color: var(--color-text);
			}
		}

		@media (max-width: 700px) {
			padding: 14px 12px;

			svg path {
				fill: var(--color-text) !important;
			}
		}
	}

	&.menu-active {
		z-index: 25;

		.nav {
			color: var(--color-text) !important;

			.hamburger {
				.stripe {
					background-color: var(--color-text) !important;

					&:nth-child(1) {
						width: 32px;
  						transform: rotate(45deg);
						transition: background-color 0.3s ease 0s, width .5s cubic-bezier(.87,-0.01,.48,.98) 0s, transform .5s cubic-bezier(.87,-0.01,.48,.98) .6s;
					}

					&:nth-child(2) {
						width: 0;
						transition: background-color 0.3s ease 0s, width .5s cubic-bezier(.87,-0.01,.48,.98) 0s, transform .5s cubic-bezier(.87,-0.01,.48,.98) 0s;
					}

					&:nth-child(3) {
						width: 32px;
    					transform: rotate(-45deg);
						transition: background-color 0.3s ease 0s, width .5s cubic-bezier(.87,-0.01,.48,.98) 0s, transform .5s cubic-bezier(.87,-0.01,.48,.98) .6s;
					}
				}
			}
		}

		svg path {
			fill: var(--color-text) !important;
		}
	}

	&.rsvp-active {
		z-index: 25;

		.nav {
			opacity: 0;
			pointer-events: none;
		}

		svg path {
			fill: var(--color-text) !important;
		}
	}
}

.menu-overlay {
	position: fixed;
	inset: 0;
	z-index: 22;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;

	.menu-content {
		display: flex;
		align-items: center;

		.menu-items {
			list-style: none;
			padding: 0;
			margin: 0;
			display: flex;
			flex-direction: column;
			align-items: center;
			gap: 85px;
			max-height: 70vh;
			width: calc(100vw - 50px - 50px);
			overflow: hidden;

			@media(max-width: 700px) {
				max-height: 62vh;
				gap: 40px;
				width: calc(100vw - 10px - 10px);
			}

			.menu-item {
				opacity: 0;
				transform: translateY(20px);
				transition: opacity 0.4s ease, transform 0.4s ease;
				text-align: center;

				a {
					color: var(--color-text);
					text-decoration: none;
					font-family: var(--font-handwriting);
					font-size: 50px;
					transition: color 0.1s ease;
					line-height: 2.2em;
					text-align: center;

					@media(max-width: 700px) {
						font-size: 38px;
					}

					&:hover {
						color: var(--color-accent);
					}
				}
			}
		}
	}

	&.active {
		pointer-events: all;

		.menu-content {

			.menu-items {
				overflow-y: auto;

				.menu-item {
					opacity: 1; 
					transform: translateY(0);

					&:nth-child(1) {
						transition-delay: 0.05s;
					}

					&:nth-child(2) {
						transition-delay: 0.12s;
					}

					&:nth-child(3) {
						transition-delay: 0.19s;
					}

					&:nth-child(4) {
						transition-delay: 0.26s;
					}

					&:nth-child(5) {
						transition-delay: 0.33s;
					}

					&:nth-child(6) {
						transition-delay: 0.40s;
					}

					&:nth-child(7) {
						transition-delay: 0.46s;
					}
				}
			}			
		}
	}
}

.hero {
	display: grid;
	grid-template-columns: 1fr 200px 900px 1fr;
	grid-template-rows: 75vh auto 90px 35px;

	@media(max-width: 1320px) {
		grid-template-columns: 50px calc(30% - 50px) calc(70% - 50px) 50px;
	}

	@media(max-width: 1000px) {
		grid-template-columns: 50px calc(40% - 50px) calc(60% - 50px) 50px;
	}

	@media(max-width: 900px) {
		grid-template-rows: 52vh auto 90px 35px;
	}

	@media(max-width: 830px) {
		grid-template-columns: 30px calc(40% - 30px) calc(60% - 30px) 30px;
	}

	@media(max-width: 700px) {
		grid-template-columns: 20px 1fr 20px;
		grid-template-rows: calc(60vh - 140px) 35vh 140px max-content 150px;
	}

	.background-video {
		grid-area: 1 / 1 / 4 / 3;
		overflow: hidden;
		width: 100%;
		height: 100%;
		object-fit: cover;
		z-index: 0;
		background-color: var(--color-text);

		@media(max-width: 700px) {
			grid-area: 1 / 1 / 4 / 4;
		}
	}

	.video-overlay {
		grid-area: 1 / 1 / 4 / 3;
		background-color: var(--color-dimmer);
		z-index: 1;

		@media(max-width: 700px) {
			grid-area: 1 / 1 / 4 / 4;
		}
	}

	.headline-area {
		grid-area: 1 / 3 / 2 / 4;
		background-image: url('../img/logo-white.svg');
		background-repeat: no-repeat;
		background-size: 949px auto;
		background-position: -664px -287px;
		display: flex;
		align-items: flex-end;

		@media(max-width: 700px) {
			grid-area: 1 / 2 / 3 / 3;
			z-index: 6;
			background-image: none;
			color: var(--color-white);
			display: flex;
			justify-content: center;
		}

		.couple-names {
			padding-left: 64px;
			padding-bottom: 52px;

			@media(max-width: 1000px) {
				padding-left: 50px;
				padding-bottom: 30px;
			}

			@media(max-width: 830px) {
				padding-left: 24px;
				padding-bottom: 15px;
			}

			@media(max-width: 700px) {
				padding-left: 0;
				padding-bottom: 25px;
			}

			.janine, .michi {
				font-size: 137px;
				font-family: var(--font-script);

				@media(max-width: 1280px) {
					font-size: 120px;
				}

				@media(max-width: 1000px) {
					font-size: 90px;
				}

				@media(max-width: 830px) {
					font-size: 82px;
				}

				@media(max-width: 700px) {
					font-size: 76px;
				}
			}

			.name-row {
				display: flex;
				align-items: baseline;
				gap: 35px;
				margin-top: -45px;

				@media(max-width: 1000px) {
					margin-top: -30px;
					gap: 30px;
				}

				@media(max-width: 830px) {
					gap: 25px;
				}

				@media(max-width: 700px) {
					margin-top: -10px;
				}

				.und {
					font-size: 32px;
					font-family: var(--font-handwriting);
					padding-left: 90px;

					@media(max-width: 1280px) {
						font-size: 26px;
					}

					@media(max-width: 1000px) {
						padding-left: 60px;
					}

					@media(max-width: 830px) {
						padding-left: 47px;
					}

					@media(max-width: 700px) {
						padding-left: 38px;
					}
				}
			}
		}
	}

	.welcome {
		grid-area: 2 / 2 / 3 / 5;
		background-color: var(--color-white);
		z-index: 4;

		@media(max-width: 1320px) {
			grid-area: 2 / 2 / 3 / 4;
		}

		@media(max-width: 700px) {
			grid-area: 3 / 2 / 5 / 3;
			z-index: 6;
		}
		
		.inner {
			padding: 53px 330px 48px 65px;
			width: 1100px;
			max-width: 100%;

			@media(max-width: 1320px) {
				width: 100%;
			}	

			@media(max-width: 830px) {
			    padding: 40px 54px 39px;
			}

			@media (max-width: 700px) {
                padding: 26px 33px 32px;
            }
		}

		p {
			line-height: 1.7em;
			text-align: justify;
			text-justify: inter-word; /* Verbessert die Abstände zwischen Wörtern */
			hyphens: auto; /* Aktiviert Silbentrennung */
			-webkit-hyphens: auto; /* Kompatibilität für Safari */
			min-height: 1em;

			.highlight {
				color: var(--color-accent-dark);
				font-weight: bold;
				font-size: 22px;
				font-style: italic;
				display: block;

				@media(max-width: 700px){
					font-size: 16px;
					display: inline;
				}
			}
		}
	}

	.rsvp-actions {
		grid-area: 3 / 2 / 5 / 4;
		padding-top: 10px;
		display: flex;
		gap: 10px;
		z-index: 4;

		@media(max-width: 700px) {
			grid-area: 5 / 2 / 6 / 3;
			z-index: 6;	
			flex-wrap: wrap;
			gap: 7px;
		}

		.button {
			width: 100%;
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 22px;
			font-weight: bold;
			background-color: var(--color-white);
			cursor: pointer;
			transition: background-color .12s ease;

			&:hover {
				background-color: var(--color-accent);
			}

			&:active {
				background-color: var(--color-accent-dark);
			}

			@media(max-width: 700px){
				font-size: 18px;
			}
		}
	}

	.monogram {
		grid-area: 1 / 4 / 3 / 5;
		overflow: hidden;
		position: relative;
		z-index: 5;

		@media(max-width: 1375px) {
			overflow: visible;
		}

		@media(max-width: 1150px) {
			display: none;
		}

		@media(max-width: 700px) {
			grid-area: 2 / 1 / 4 / 4;
			display: flex;
			justify-content: flex-end;
			align-items: flex-end;
		}

		svg {
			position: absolute;
			right: 0;
			bottom: 180px;
			height: auto;
			width: 270px;
			max-width: 100%;

			@media(max-width: 1460px) {
				right: -50px;
				max-width: calc(100% + 50px);
			}

			@media(max-width: 1375px) {
				bottom: 100px;
				max-width: 200px;
				right: 0;
				z-index: -1;
			}

			@media(max-width: 700px) {
				position: static;
				height: auto;
				max-width: none;
				width: 60%;
				z-index: 0;
				margin-bottom: -80px;
				
				path {
					fill: var(--color-white) !important;
					opacity: .1;
				}
			}
		}
	}
}

section {
	width: 100%;
	padding-top: 230px;
	position: relative;
	overflow: hidden;

	&:first-of-type {
		padding-top: 150px;

		@media(max-width: 830px){
			padding-top: 120px;
		}
	}

	@media(max-width: 1700px){
		padding-top: 150px;
	}

	@media(max-width: 830px){
		padding-top: 130px;
	}
	
	.h1 {
		font-family: var(--font-script);
		width: 1100px;
		margin: 0 auto;
		max-width: calc(100% - 20px - 20px);
		font-size: 76px;
		text-align: center;
		hyphens: auto;

		@media(max-width: 1000px){
			font-size: 66px;
		}

		@media(max-width: 830px){
			font-size: 60px;
		}
	}

	.h2 {
		font-family: var(--font-handwriting);
		font-size: 28px;
		line-height: 3em;
		padding-bottom: 1.1em;
		hyphens: auto;

		@media(max-width: 700px){
			font-size: 32px;
			padding-bottom: .6em;
			padding-top: .3em;
		}
	}

	.content {
		width: 1100px;
		margin: 0 auto;
		max-width: calc(100% - 50px - 50px);
		line-height: 1.7em;
		padding-top: 100px;

		p {
			min-height: 1em;
		}

		a {
			color: var(--color-accent-dark);
			text-underline-offset: 3px;
			transition: text-underline-offset .1s ease;

			&:hover {
				text-underline-offset: 6px;
			}
		}

		ul {
			list-style: disc;
			padding-left: 20px;
			margin-top: 20px;
			margin-bottom: 20px;

			li {
				margin-bottom: 1em;
				padding-left: 4px;
			}
		}

		@media(max-width: 1380px){
			padding-top: 70px;
		}

		@media(max-width: 1000px){
			padding-top: 50px;
		}

		@media (max-width: 830px) {
            padding-top: 25px;
        }

		@media(max-width: 700px) {
			max-width: calc(100% - 20px - 20px);
		}
	}

	&::after {
		z-index: -1;
		content: '';
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		height: 300px;
		background: linear-gradient(180deg, var(--color-white) 0%, var(--color-bg) 100%);	
	}

	&[data-type="bright"] {
		&::after {
			z-index: -1;
			content: '';
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			height: 300px;
			background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-white) 100%);	
		}

		&::before {
			z-index: -1;
			content: '';
			position: absolute;
			top: 300px;
			left: 0;
			right: 0;
			bottom: 0;
			background: var(--color-white);	
		}

		+ section[data-type="bright"] {
			&::after {
				display: none;
			}

			&::before {
				top: 0;
			}
		}

	}
}

.timeline {
	.content {
		display: flex;
		flex-direction: column;		

		.timeline-item {
			max-width: 300px;
			padding: 50px;

			.time {
				font-weight: bold;
			}

			&:first-child {
				padding-top: 0;
			}

			&:last-child {
				padding-bottom: 0;
			}
		}

		#timeline-1 {
			margin: 0 0 0 131px;
		}

		#timeline-2 {
			margin: -84px 145px 0 0;
			align-self: flex-end;
			text-align: right;
		}

		#timeline-3 {
			margin: 183px -359px 0 0;
			align-self: center;
			text-align: center;
		}

		#timeline-4 {
			margin: 41px 0px 0px 0;
		}

		#timeline-5 {
			margin: -113px -282px 0px 0;
			align-self: center;
			text-align: center;
		}

		#timeline-6 {
			margin: 91px 17px 0 0;
			align-self: flex-end;
			text-align: right;
		}

		@media (max-width: 1200px) {
			width: 400px;
			gap: 40px;

			.timeline-item {
				max-width: 200px;
				padding: 40px 0;
			}
			
			#timeline-1 {
				margin: 0;
			}

			#timeline-2 {
				margin: 0;
			}

			#timeline-3 {
				margin: 0;
				align-self: flex-start;
				text-align: left;
			}

			#timeline-4 {
				margin: 0;
				align-self: flex-end;
				text-align: right;
			}

			#timeline-5 {
				margin: 0;
				align-self: flex-start;
				text-align: left;
			}

			#timeline-6 {
				margin: 0;
				align-self: flex-end;
				text-align: right;
			}
		}

		@media(max-width: 700px){
			gap: 30px;
			max-width: calc(100% - 40px - 40px);

			.timeline-item {
				max-width: 190px;
				padding: 30px 0;
			}
		}
	}
}

.addresses {
	.content {
		display: flex;
		gap: 30px;
		width: 1550px;

		@media(max-width: 1075px) {
			gap: 20px;
		}

		@media(max-width: 1000px) {
			flex-direction: column;
		}

		@media(max-width: 580px) {
			gap: 45px;
			padding-bottom: 20px;
		}

		.address-box {
			background-color: var(--color-bg);
			padding: 53px 65px 48px;
			flex: 1;
			position: relative;
			display: flex;
			flex-direction: column;
			align-items: flex-start;
			opacity: 0;
			transform: translateY(30px);
			transition: opacity 1s ease, transform 1s ease;

			@media(max-width: 830px) {
			    padding: 40px 54px 39px;
			}

			@media (max-width: 700px) {
                padding: 26px 33px 32px;
            }

			&.visible {
				opacity: 1;
				transform: translateY(0);
			}

			.h2, .item, .button {
				opacity: 0;
				transition: opacity 0.8s ease .7s;
			}

			&.visible .h2,
			&.visible .item,
			&.visible .button {
				opacity: 1;
			}

			.item {
				line-height: 1.7em;
				max-width: 50%;

				&:last-of-type {
					margin-top: 30px;

					@media(max-width: 700px){
						margin-top: 27px;
					}
				}

				@media(max-width: 1500px){
					max-width: 60%;
				}				
			}

			.button {
				font-weight: bold;
				color: var(--color-text);
				background: var(--color-white);
				text-align: center;
				padding: 20px 40px;
				text-decoration: none;
				margin-top: 40px;
                display: inline-flex;
				width: auto;
				transition: background-color .12s ease;
				background-color: var(--color-white);

				&:hover {
					background-color: var(--color-accent);
				}

				&:active {
					background-color: var(--color-accent-dark);
				}

				@media(max-width: 700px){
					margin-top: 35px;
				}
			}

			&.church {
				&::after {
					content: '';
					position: absolute;
					z-index: -1;
					top: -70px;
					right: 0;
					left: 0;
					pointer-events: none;
					bottom: 30px;
					background-image: url('../img/kirche.svg');
					background-position: top right;
					background-size: contain;
					background-repeat: no-repeat;

					@media(max-width: 1500px){
						top: -50px;
						bottom: 50px;
					}

					@media(max-width: 1370px){
						top: 70px;
						bottom: 40px;
					}

					@media(max-width: 1180px){
						top: 150px;
						bottom: 30px;
					}

					@media(max-width: 1075px){
						top: auto;
						bottom: 20px;
						height: 340px;
					}

					@media(max-width: 1000px){
						top: -30px;
						bottom: 30px;
						height: auto;
					}

					@media(max-width: 800px){
						top: 30px;
						bottom: 40px;
					}

					@media(max-width: 580px){
						top: auto;
                        bottom: -20px;
                        right: -70px;
                        height: 432px;
					}
				}
			}

			&.hof {
				text-align: right;
				align-items: flex-end;

				&::after {
					content: '';
					z-index: -1;
					position: absolute;
					top: 105px;
					right: 0;
					left: 0;
					pointer-events: none;
					bottom: 30px;
					background-image: url('../img/freiaemter-hof.svg');
					background-position: top left;
					background-size: contain;
					background-repeat: no-repeat;

					@media(max-width: 1500px){
						top: 115px;
						bottom: 50px;
					}

					@media(max-width: 1370px){
						top: 180px;
						bottom: 40px;
					}

					@media(max-width: 1180px){
						top: 250px;
						bottom: 30px;
					}

					@media(max-width: 1075px){
						top: auto;
						bottom: 20px;
						height: 240px;
					}

					@media(max-width: 1000px){
						top: 70px;
						bottom: 30px;
						height: auto;
					}

					@media(max-width: 800px){
						top: 110px;
						bottom: 40px;
					}

					@media(max-width: 580px){
						top: auto;
                        bottom: -25px;
                        left: -70px;
                        height: 295px;
					}
				}
			}
		}
	}
}

.info {
	.content {
		display: flex;
		flex-wrap: wrap;
		gap: 15px;

		.info-box {
			padding: 53px 85px 75px;
			background-color: var(--color-white);
			opacity: 0;
			transform: translateY(30px);
			transition: opacity 1s ease, transform 1s ease;

			@media(max-width: 1070px) {
			    padding: 53px 65px 58px;
			}

			@media(max-width: 830px) {
			    padding: 40px 54px 49px;
			}

			@media (max-width: 700px) {
                padding: 26px 33px 32px;
            }

			&.visible {
				opacity: 1;
				transform: translateY(0);
			}

			&.wishes { transition-delay: 0s; }
			&.your-programm-point { transition-delay: 0.2s; }
			&.countdown { transition-delay: 0.4s; }
			&.dresscode { transition-delay: 0.6s; }

			.h2 {
				text-align: center;
			}

			.text {
				text-align: justify;
				text-justify: inter-word; /* Verbessert die Abstände zwischen Wörtern */
				hyphens: auto; /* Aktiviert Silbentrennung */
				-webkit-hyphens: auto; /* Kompatibilität für Safari */
			}

			&:nth-child(1) {
				width: calc(100% - 370px - 7.5px - 7.5px);

				@media(max-width: 1070px) {
					width: calc(100% - 300px - 7.5px - 7.5px);
				}

				@media(max-width: 830px) {
					width: 100%;
				}
			}

			&:nth-child(2) {
				width: 370px;
				
				@media(max-width: 1070px) {
					width: 300px;
				}

				@media(max-width: 830px) {
					width: 100%;
				}
			}

			&:nth-child(3) {
				width: 450px;

				@media(max-width: 1070px) {
					width: calc(45% - 7.5px);
				}

				@media(max-width: 950px) {
					width: calc(43% - 7.5px);
				}

				@media(max-width: 830px) {
					width: 100%;
				}
			}

			&:nth-child(4) {
				width: calc(100% - 450px - 7.5px - 7.5px);

				@media(max-width: 1070px) {
					width: calc(55% - 7.5px);
				}

				@media(max-width: 950px) {
					width: calc(57% - 7.5px);
				}

				@media(max-width: 830px) {
					width: 100%;
				}
			}

			&.countdown {
				background-color: var(--color-accent);
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				padding-bottom: 66px;

				@media(max-width: 1070px) {
					padding: 20px;
					justify-content: center;
				}

				@media(max-width: 830px) {
					padding: 40px 54px 49px;
				}

				@media (max-width: 700px) {
					padding: 26px 33px 32px;
				}

				.countdown-timer {
					display: flex;
					flex-wrap: wrap;
					align-items: center;
					justify-content: center;
					text-align: center;			

					.countdown-item {
						display: flex;
						flex-direction: column;
						align-items: center;
						justify-content: center;
						width: 60px;

						.countdown-value {
							font-family: var(--font-script);
							font-size: 30px;
						}

						&:nth-child(1) {
							width: 100%;
							flex-shrink: 0;
							margin-bottom: 20px;

							.countdown-value {
								font-size: 70px;
								line-height: 1em;
							}
						}						
					}
				}
			}
		}
	}
}

.contact {
	.content {
		display: flex;
		flex-direction: column;
		gap: 30px;
		width: 900px;

		@media(max-width: 830px) {
			gap: 40px;
		}

		@media(max-width: 560px) {
			margin-top: 30px;
		}

		.contact-box {
			display: flex;
			align-items: center;
			gap: 50px;
			opacity: 0;
			transform: translateX(60px);
			transition: opacity 0.8s ease, transform 0.8s ease;

			@media(max-width: 830px) {
				gap: 30px;
				margin-left: calc(50% - 210px - 15px);
			}

			@media(max-width: 560px) {
				gap: 20px;
				margin-left: 0;
			}

			&.visible {
				opacity: 1;
				transform: translateX(0) !important;
			}

			.avatar {
				width: 250px;
				height: 250px;
				border-radius: 50%;
				background-position: center;
				background-size: cover;
				flex-grow: 0;
				flex-shrink: 0;

				@media(max-width: 560px) {
					margin-left: -65px;
					width: 200px;
					height: 200px;
				}

				&.nadine {
					background-image: url('../img/contact/nadine.jpg');
				}

				&.dennis {
					background-image: url('../img/contact/dennis.jpg');
				}

				&.janine {
					background-image: url('../img/contact/janine.jpg');
				}

				&.michi {
					background-image: url('../img/contact/michi.jpg');
				}
			}

			.text {
				.h2 {
					padding-bottom: .2em;
					padding-top: 0;

					@media(max-width: 560px) {
						margin-top: -25px;
					}
				}
				
				@media(max-width: 560px) {
					span {
						display: none;
					}
				}
			}

			&:nth-child(2n+1){
				align-self: self-end;
				transform: translateX(-60px);
				
				@media(max-width: 830px) {
					margin-right: calc(50% - 210px - 15px);
					margin-left: 0;
				}

				@media(max-width: 560px) {
					margin-right: 0;
				}

				.avatar {
					order: 2;

					@media(max-width: 560px) {
						margin-left: 0;
						margin-right: -65px;
					}
				}

				.text {
					text-align: right;
				}
			}
		}
	}
}

.footer {
	display: grid;
	grid-template-columns: calc((100vw - 1100px) / 2) 1fr 500px 150px;
	grid-template-rows: 150px 1fr max-content;
	grid-column-gap: 0px;
	grid-row-gap: 0px;
	background-color: var(--color-white);
	padding-top: 100px;

	@media(max-width: 1500px){
		grid-template-columns: 50px 1fr 500px 50px;
	}

	@media(max-width: 1250px){
		grid-template-columns: 50px 1fr 400px 50px;
   		grid-template-rows: 88px 1fr max-content;
	}

	@media(max-width: 830px){
		grid-template-columns: 50px 1fr 300px 50px;
   		grid-template-rows: 45px 1fr max-content;
	}

	@media(max-width: 700px){
		display: flex;
		flex-direction: column;
		background-color: var(--color-accent);
		border-top: 330px solid var(--color-white);
		padding: 0 20px;
	}

	.bg {
		grid-area: 2 / 1 / 4 / 5;
		background-color: var(--color-accent);

		@media(max-width: 700px){
			display: none;
		}
	}
	
	.content { 
		grid-area: 2 / 2 / 3 / 3;
		padding-top: 100px;

		@media(max-width: 1250px){
			padding-top: 50px;
		}

		@media(max-width: 1110px){
			box-sizing: border-box;
			padding-right: 50px;
		}

		@media(max-width: 700px){
			padding-top: 20px;
			padding-right: 0;
		}

		.h1 {
			font-family: var(--font-script);
			font-size: 66px;
			hyphens: auto;
			max-width: 500px;

			@media(max-width: 1110px){
				max-width: 100%;
			}

			@media(max-width: 830px){
				font-size: 60px;
			}			
		}

		.text {
			margin-top: 2em;
			max-width: 500px;

			@media(max-width: 1110px){
				max-width: 100%;
			}

			@media(max-width: 700px){
				margin-top: 1em;
			}

			p {
				min-height: 1em;
				line-height: 1.7em;
			}
		}

		.buttons {
			display: flex;
			gap: 15px;
			margin-top: 2em;
			margin-bottom: 50px;

			@media(max-width: 830px) {
				flex-wrap: wrap;
				gap: 10px;
			}

			@media(max-width: 700px) {
				margin-bottom: 90px;
			}

			.button {
				width: 230px;
				height: 70px;
				display: flex;
				align-items: center;
				justify-content: center;
				font-weight: bold;
				background-color: var(--color-white);
				cursor: pointer;
				font-size: 18px;
				transition: background-color .12s ease;

				@media(max-width: 1110px){
					width: calc(50% - 7.5px);
				}

				@media(max-width: 830px) {
					width: 100%;
				}

				&:hover {
					background-color: var(--color-bg);
				}

				&:active {
					background-color: var(--color-accent-dark);
				}
			}
		}
	}
	
	.image-series {
		grid-area: 1 / 3 / 3 / 4;

		@media(max-width: 700px){
			order: -1;
			margin-top: -200px;
		}

		img {
			width: 100%;
			height: auto;
			object-fit: cover;

			&.footer-image-hidden {
				width: 1px;
				height: 1px;
				opacity: 0;;
			}
		}
	}
	
	.copyright {
		grid-area: 3 / 1 / 4 / 5;
		padding: 0 0 15px 30px;
		font-style: italic;
		font-size: 14px;

		@media(max-width: 700px){
			padding: 0 0 15px 0;
			text-align: center;
		}

		.michi {
			position: relative;
			display: inline-block;
		}

		.michi.glitching {
			animation: glitch 120ms steps(2) 3;
		}
	}
}

@keyframes glitch {
	0%   { transform: translate(0);       opacity: 1;   }
	20%  { transform: translate(-2px, 1px); opacity: 0.7; }
	40%  { transform: translate(2px, -1px); opacity: 0.85; }
	60%  { transform: translate(-1px, -1px); opacity: 0.6; }
	80%  { transform: translate(1px, 1px);  opacity: 0.9; }
	100% { transform: translate(0);        opacity: 1;   }
}


/* ===== RSVP POPUP ===== */

.rsvp-overlay {
	position: fixed;
	inset: 0;
	z-index: 22;
	display: flex;
	flex-direction: column;
	pointer-events: none;

	.rsvp-content {
		flex: 1;
		display: flex;
		flex-direction: column;
		overflow-y: auto;
		padding-top: 35px;
		padding-bottom: 190px;

		@media(max-width: 700px){
			padding-bottom: 150px;
		}

		.rsvp-heading {
			font-family: var(--font-handwriting);
			font-size: 35px;
			line-height: 3em;
			padding-bottom: 1em;
			hyphens: auto;
			text-align: center;
			flex-shrink: 0;
			opacity: 0;
			transform: translateY(20px);
			transition: opacity 0.4s ease, transform 0.4s ease;
		}

		.rsvp-form-area {
			flex: 1;
			overflow-y: auto;
			opacity: 0;
			width: 100%;
			margin: 0 auto;
			transform: translateY(20px);
			transition: opacity 0.4s ease, transform 0.4s ease;
			transition-delay: 0s;
		}		
	}

	.rsvp-bottom-bar {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		display: flex;
		flex-direction: column;
		align-items: center;
		z-index: 23;
		pointer-events: none;
		opacity: 0;
		transform: translateY(20px);
		transition: opacity 0.4s ease, transform 0.4s ease;
		transition-delay: 0s;
		padding: 30px 20px 40px;

		@media(max-width: 700px){
			padding: 25px 20px 25px;
		}

		.rsvp-submit {
			background-color: var(--color-accent);
			color: var(--color-text);
			font-weight: bold;
			font-size: 18px;
			padding: 18px 0;
			cursor: pointer;
			text-align: center;
			transition: background-color 0.12s ease;
			width: 280px;
			max-width: 100%;
			display: flex;
			align-items: center;
			justify-content: center;

			&:hover {
				background-color: var(--color-accent-dark);
			}

			&:active {
				background-color: var(--color-accent-dark);
			}
		}

		.rsvp-cancel {
			margin-top: 30px;
			color: var(--color-text);
			cursor: pointer;
			text-decoration: underline;
			text-underline-offset: 3px;
			transition: text-underline-offset 0.1s ease;

			&:hover {
				text-underline-offset: 6px;
			}
		}
	}

	&.active {
		pointer-events: all;

		.rsvp-heading {
			opacity: 1;
			transform: translateY(0);
			transition-delay: 0.05s;
		}

		.rsvp-form-area {
			opacity: 1;
			transform: translateY(0);
			transition-delay: 0.12s;
			
		}

		.rsvp-bottom-bar {
			opacity: 1;
			transform: translateY(0);
			pointer-events: all;
			transition-delay: 0.19s;
		}
	}
}


/* ===== RSVP FORM ELEMENTS ===== */

/* ===== GLOBAL LOADING POPOVER ===== */

.loading-popover {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.7);
	backdrop-filter: blur(8px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.loading-popover.visible {
	opacity: 1;
	pointer-events: auto;
}

.loading-popover-lottie {
	width: 40px;
	height: 40px;
}

.rsvp-search-wrapper {
	margin-bottom: 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;

	.rsvp-label {
		display: block;
		font-size: 14px;
		font-weight: bold;
		margin-bottom: 8px;
		color: var(--color-text);
	}

	.rsvp-search-field {
		position: relative;
		width: 100%;
		display: flex;
		justify-content: center;
	}

	#rsvp-family-search {
		width: 280px;
		max-width: 100%;
		padding: 14px 16px;
		font-size: 16px;
		font-family: var(--font-body);
		border: 1px solid rgba(0, 0, 0, 0.2);
		border-radius: 0;
		background: var(--color-white);
		color: var(--color-text);
		outline: none;
		transition: border-color 0.15s ease;

		&:focus {
			border-color: var(--color-accent);
		}
	}
}

/* autoComplete.js overrides */
.autoComplete_wrapper {
	width: 280px;
	max-width: 100%;

	> ul {
		background: var(--color-white);
		border: 1px solid rgba(0, 0, 0, 0.12);
		border-top: none;
		max-height: 240px;
		overflow-y: auto;
		margin: 0;
		padding: 0;
		list-style: none;
		position: absolute;
		width: 100%;
		z-index: 10;

		> li {
			padding: 12px 16px;
			cursor: pointer;
			font-family: var(--font-body);
			font-size: 16px;
			color: var(--color-text);
			transition: background-color 0.1s ease;

			&:hover,
			&[aria-selected="true"] {
				background-color: rgba(255, 151, 119, 0.2);
			}

			mark {
				background: none;
				font-weight: bold;
				color: inherit;
			}
		}
	}
}

.rsvp-info-message {
	background: #e8f4fd;
	border: 1px solid #b3d9f2;
	padding: 14px 18px;
	font-size: 14px;
	line-height: 1.5;
	margin-bottom: 24px;
	color: var(--color-text);
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
	text-align: center;

	@media(max-width: 700px){
		margin-bottom: 15px;
	}
}

.rsvp-error-message {
	background: #fdecea;
	border: 1px solid #f5c6cb;
	padding: 14px 18px;
	font-size: 14px;
	line-height: 1.5;
	margin-bottom: 24px;
	color: #721c24;
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.rsvp-guest-form {
	width: 100%;
}

.rsvp-content-wrap {
	width: 860px;
	max-width: calc(100% - 20px - 20px);
	margin-left: auto;
	margin-right: auto;

	&.has-guests {
		width: 100%;
		max-width: calc(100% - 40px - 40px);

		@media (max-width: 700px) {
			max-width: calc(100% - 20px - 20px);
		}
	}
}

.rsvp-guest-sections {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: center;

	@media (max-width: 700px) {
		flex-direction: column;
	}
}

/* Per-guest section card */
.rsvp-guest-section {
	padding: 40px 45px;
	background: rgba(255,255,255,1);
	flex: 1 1 0;
	min-width: 260px;
	max-width: 600px;

	@media (max-width: 700px) {
		padding: 20px 20px;
		min-width: 0;
		display: flex;
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.rsvp-section-label {
		font-size: 22px;
		font-weight: bold;
		margin-bottom: 20px;
		padding-bottom: 12px;
		color: var(--color-text);
	}

	@media (max-width: 700px) {
		.rsvp-radio-group {
			justify-content: center;
		}

		.rsvp-checkbox-group {
			justify-content: center;
		}

		.rsvp-field,
		.rsvp-attend-fields {
			width: 100%;
		}
	}
}

/* Radio group (Zusagen/Absagen, Hochstuhl/Kein Stuhl) */
.rsvp-radio-group {
	display: flex;
	gap: 24px;
	margin-bottom: 20px;

	@media (max-width: 400px) {
		gap: 16px;
	}

	label {
		display: flex;
		align-items: center;
		gap: 8px;
		cursor: pointer;
		font-size: 16px;
	}

	input[type="radio"] {
		appearance: none;
		-webkit-appearance: none;
		width: 22px;
		height: 22px;
		border: 2px solid rgba(0, 0, 0, 0.25);
		border-radius: 50%;
		cursor: pointer;
		position: relative;
		flex-shrink: 0;
		transition: border-color 0.15s ease;

		&:checked {
			border-color: var(--color-accent);
		}

		&:checked::after {
			content: '';
			position: absolute;
			top: 3px;
			left: 3px;
			width: 12px;
			height: 12px;
			border-radius: 50%;
			background: var(--color-accent);
		}
	}
}

/* Checkbox group (dietary) */
.rsvp-checkbox-group {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 20px;

	label {
		display: flex;
		align-items: center;
		gap: 8px;
		cursor: pointer;
		font-size: 16px;
	}

	input[type="checkbox"] {
		appearance: none;
		-webkit-appearance: none;
		width: 20px;
		height: 20px;
		border: 2px solid rgba(0, 0, 0, 0.25);
		border-radius: 0;
		cursor: pointer;
		position: relative;
		flex-shrink: 0;
		transition: border-color 0.15s ease, background-color 0.15s ease;

		&:checked {
			border-color: var(--color-accent);
			background: var(--color-accent);
		}

		&:checked::after {
			content: '\2713';
			position: absolute;
			top: -1px;
			left: 3px;
			font-size: 14px;
			color: var(--color-white);
			font-weight: bold;
		}
	}
}

/* Text inputs and textareas */
.rsvp-field {
	margin-bottom: 20px;

	&:last-child {
		margin-bottom: 0;
	}

	.rsvp-field-label {
		display: block;
		font-size: 14px;
		margin-bottom: 6px;
		color: var(--color-text);
	}

	input[type="text"],
	input[type="number"] {
		width: 100%;
		max-width: 100%;
		padding: 12px 14px;
		font-size: 16px;
		font-family: var(--font-body);
		border: 1px solid rgba(0, 0, 0, 0.2);
		border-radius: 0;
		background: var(--color-white);
		color: var(--color-text);
		outline: none;
		transition: border-color 0.15s ease;

		&:focus {
			border-color: var(--color-accent);
		}

		&::placeholder {
			color: rgba(0, 0, 0, 0.3);
		}
	}

	textarea {
		width: 100%;
		max-width: 100%;
		padding: 12px 14px;
		font-size: 16px;
		font-family: var(--font-body);
		border: 1px solid rgba(0, 0, 0, 0.2);
		border-radius: 0;
		background: var(--color-white);
		color: var(--color-text);
		outline: none;
		transition: border-color 0.15s ease;
		resize: vertical;
		min-height: 80px;

		&:focus {
			border-color: var(--color-accent);
		}

		&::placeholder {
			color: rgba(0, 0, 0, 0.3);
		}
	}

	input[type="number"] {
		max-width: 120px;
	}
}

/* Conditional fields that hide/show based on willAttend */
.rsvp-attend-fields {
	display: none;

	&.visible {
		display: block;
	}
}

/* Bottom bar background gradient */
.rsvp-overlay .rsvp-bottom-bar {
	background: linear-gradient(to bottom, transparent, var(--color-bg) 30%);
}

