@import url("https://fonts.googleapis.com/css2?family=Sacramento&family=Josefin+Sans:wght@300;400&display=swap");

/* ===== Override header connector lines ===== */

#header > *:before {
	display: none !important;
}

#header > * {
	margin-top: 0;
}

/* ===== Save the Date Hero Styles ===== */

.save-the-date-text {
	text-align: center;
	z-index: 10;
	position: relative;
	padding-top: 0;
}

.save-the-date-text .label {
	font-family: 'Josefin Sans', sans-serif;
	font-weight: 300;
	font-size: 1rem;
	letter-spacing: 0.4rem;
	color: #2c2c2c;
	margin-bottom: 0.5rem;
	text-transform: uppercase;
}

.save-the-date-text .names {
	font-family: 'Sacramento', cursive;
	font-size: 4.5rem;
	color: #2c2c2c;
	line-height: 1.2;
	margin-bottom: 1.5rem;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
}

.save-the-date-text .names-img {
	width: 100%;
	max-width: 550px;
	height: auto;
	margin-bottom: 0.1rem;
}

.save-the-date-text .date {
	font-family: 'Josefin Sans', sans-serif;
	font-weight: 400;
	font-size: 0.85rem;
	letter-spacing: 0.3rem;
	color: #2c2c2c;
	margin-bottom: 0.1rem;
	text-transform: uppercase;
}

.save-the-date-text .location {
	font-family: 'Josefin Sans', sans-serif;
	font-weight: 300;
	font-size: 0.7rem;
	letter-spacing: 0.2rem;
	color: #3a3a3a;
	text-transform: uppercase;
	line-height: 1.5;
	margin-bottom: 0;
}

/* ===== Mountain Scene Container ===== */

.mountain-scene {
	position: relative;
	width: 100%;
	max-width: 800px;
	height: 55vh;
	margin-top: 0;
	margin-bottom: 0;
	z-index: 5;
	overflow: visible;
}

.mountain-layer {
	position: absolute;
	width: 100%;
	height: auto;
}

.mountain-left {
	top: 0;
	left: 0;
	z-index: 1;
}

.mountain-right {
	top: 0;
	left: 0;
	z-index: 2;
}

.rifugio-layer {
	position: absolute;
	bottom: 18%;
	left: 50%;
	transform: translateX(-50%);
	z-index: 4;
	width: 65%;
	height: auto;
}

.flowers-layer {
	position: absolute;
	bottom: -40px;
	left: 5%;
	width: 90%;
	z-index: 5;
	height: auto;
}

#header nav {
	margin-top: 45px;
}

/* ===== Parallax Animations ===== */

@keyframes mountain-left-in {
	0% {
		transform: translateX(-40px);
		opacity: 0;
	}
	100% {
		transform: translateX(0px);
		opacity: 1;
	}
}

@keyframes mountain-right-in {
	0% {
		transform: translateX(40px);
		opacity: 0;
	}
	100% {
		transform: translateX(0px);
		opacity: 1;
	}
}

@keyframes rifugio-in {
	0% {
		transform: translateX(-50%) translateY(30px);
		opacity: 0;
	}
	100% {
		transform: translateX(-50%) translateY(0px);
		opacity: 1;
	}
}

@keyframes flowers-in {
	0% {
		transform: translateY(40px);
		opacity: 0;
	}
	100% {
		transform: translateY(0);
		opacity: 1;
	}
}

@keyframes text-fade-in {
	0% {
		transform: translateY(-20px);
		opacity: 0;
	}
	100% {
		transform: translateY(0);
		opacity: 1;
	}
}

/* Initial hidden state */
.mountain-left,
.mountain-right,
.rifugio-layer,
.flowers-layer {
	opacity: 0;
}

#header nav {
	opacity: 0;
	visibility: hidden;
	animation: nav-fallback 3s forwards;
}

@keyframes nav-fallback {
	0%, 99% { opacity: 0; visibility: hidden; }
	100% { opacity: 1; visibility: visible; }
}

/* Text visible immediately */
.save-the-date-text {
	opacity: 1;
}

/* Animation triggers (applied after load) */

body.scene-loaded .mountain-left {
	animation: mountain-left-in 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
	animation-delay: 0s;
}

body.scene-loaded .mountain-right {
	animation: mountain-right-in 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
	animation-delay: 0s;
}

body.scene-loaded .rifugio-layer {
	animation: rifugio-in 1.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
	animation-delay: 0.3s;
}

body.scene-loaded .flowers-layer {
	animation: flowers-in 1.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
	animation-delay: 0.45s;
}

body.scene-loaded #header nav {
	visibility: visible !important;
	opacity: 0;
	animation: text-fade-in 0.8s ease-out forwards;
	animation-delay: 1s;
}

/* ===== Responsive ===== */

@media screen and (max-width: 736px) {
	.save-the-date-text .names {
		font-size: 3rem;
	}

	.save-the-date-text .label {
		font-size: 0.85rem;
		letter-spacing: 0.3rem;
	}

	.save-the-date-text {
		padding-top: 0;
	}

	#wrapper {
		padding-top: 0.5rem !important;
		padding-bottom: 0.5rem !important;
		min-height: 100dvh !important;
		height: 100dvh;
		justify-content: flex-start !important;
	}

	#wrapper:before {
		display: none !important;
	}

	#header {
		margin-top: 0;
		display: flex;
		flex-direction: column;
		flex: 1;
		min-height: 0;
	}

	#header nav {
		margin-top: 0;
		flex-shrink: 0;
	}

	#header nav ul li a {
		height: 4rem;
		line-height: 4rem;
		font-size: 0.95rem;
		letter-spacing: 0.2rem;
	}

	#footer {
		margin-top: 0;
		padding: 0.3rem 0;
		flex-shrink: 0;
	}

	.save-the-date-text {
		flex-shrink: 0;
	}

	.mountain-scene {
		flex: 1;
		height: auto;
		min-height: 0;
	}

	.flowers-layer {
		bottom: 5%;
	}

	.rifugio-layer {
		width: 75%;
		bottom: 30%;
	}
}

@media screen and (max-width: 480px) {
	.save-the-date-text .names {
		font-size: 2.5rem;
	}

	.save-the-date-text .label {
		font-size: 0.75rem;
	}

	.rifugio-layer {
		width: 80%;
		bottom: 28%;
	}
}
