/*
 * Theme four — "Midnight Bloom"
 * Midnight navy, gilded geometry, terracotta blooms.
 * Every rule is scoped to .theme-four (cover is teleported, so it carries the class too).
 */

.theme-four {
	--th-bg: #0e1b3d;
	--th-bg-deep: #091330;
	--th-bg-soft: #16274f;
	--th-gold: #d8b46a;
	--th-gold-strong: #b8924b;
	--th-gold-line: rgba(216, 180, 106, 0.32);
	--th-ivory: #f5efe6;
	--th-muted: #aab4cb;
	--th-panel: rgba(255, 248, 230, 0.04);

	/* Reusable cards stay ivory on velvet; accent uses the navy ink */
	--inv-accent: #1c2e5e;
	--inv-accent-hover: #0e1b3d;
	--inv-border: #e6dccb;
	--inv-border-strong: #d6c4a1;
	--inv-tint: #f6f0e6;
	--inv-surface: #fffdf8;
	--inv-shadow: #050b1f;

	width: 100%;
	color: var(--th-ivory);
	font-family: 'Montserrat', system-ui, sans-serif;
	font-size: 0.94rem;
	line-height: 1.8;
	background-color: var(--th-bg);
	background-image: url('images/velvet.svg');
	-webkit-font-smoothing: antialiased;
}

/* ---------- Typography ---------- */

.theme-four h1,
.theme-four h2,
.theme-four h3,
.theme-four .caption,
.theme-four .four-display {
	font-family: 'Bodoni Moda', Didot, serif;
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: 0;
}

.theme-four .four-italic {
	font-family: 'Bodoni Moda', Didot, serif;
	font-style: italic;
	font-weight: 400;
	letter-spacing: 0;
}

.theme-four .four-eyebrow {
	font-family: 'Montserrat', system-ui, sans-serif;
	font-size: 0.66rem;
	font-weight: 500;
	letter-spacing: 0.34em;
	line-height: 1.7;
	text-transform: uppercase;
	color: var(--th-gold);
}

.theme-four .text-secondary {
	color: var(--th-gold) !important;
}

.theme-four .four-muted {
	color: var(--th-muted);
}

.theme-four .four-gold {
	color: var(--th-gold);
}

/* ---------- Layout ---------- */

.theme-four .container {
	max-width: 30rem !important;
	margin-inline: auto;
	padding-inline: 1.5rem;
	text-align: center;
}

.theme-four .four-section {
	position: relative;
	padding-block: 4.5rem;
}

.theme-four .four-band {
	background:
		url('images/velvet.svg'),
		radial-gradient(90% 50% at 50% 0%, rgba(216, 180, 106, 0.08), transparent 70%),
		linear-gradient(180deg, var(--th-bg) 0%, var(--th-bg-deep) 15%, var(--th-bg-deep) 85%, var(--th-bg) 100%);
}

.theme-four .four-panel {
	position: relative;
	border: 1px solid var(--th-gold-line);
	border-radius: 0.25rem;
	background: var(--th-panel);
	box-shadow: 0 24px 48px -32px rgba(0, 0, 0, 0.8);
}

.theme-four .four-panel::before {
	position: absolute;
	inset: 5px;
	border: 1px solid rgba(216, 180, 106, 0.16);
	content: '';
	pointer-events: none;
}

/* ---------- Section heading ---------- */

.theme-four .four-heading {
	margin-bottom: 2.25rem;
	text-align: center;
}

.theme-four .four-heading__title {
	margin-top: 0.4rem;
	font-size: 1.75rem;
	color: var(--th-ivory);
}

.theme-four .four-heading__rule {
	display: block;
	width: 10rem;
	height: auto;
	margin: 0.9rem auto 0;
}

/* ---------- Hero & cover ---------- */

.theme-four .four-hero {
	position: relative;
	display: flex;
	min-height: 100dvh;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 4.5rem 1.5rem 6.5rem;
	text-align: center;
	background:
		url('images/velvet.svg'),
		radial-gradient(70% 38% at 50% 38%, rgba(216, 180, 106, 0.16), transparent 70%),
		radial-gradient(120% 60% at 50% 120%, rgba(217, 130, 95, 0.12), transparent 70%),
		linear-gradient(180deg, var(--th-bg-deep) 0%, var(--th-bg) 55%, var(--th-bg-deep) 100%);
}

.theme-four .four-hex {
	position: relative;
	z-index: 3;
	display: flex;
	width: min(84vw, 20rem);
	aspect-ratio: 793 / 900;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0 14%;
	background: url('images/header-frame.webp') center / contain no-repeat;
	filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.45));
	animation: four-hex-in 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) var(--four-delay, 0.3s) both;
}

@keyframes four-hex-in {
	from {
		opacity: 0;
		transform: scale(0.94) rotate(-3deg);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.theme-four .four-names {
	font-size: clamp(2.2rem, 10.5vw, 2.75rem);
	font-style: italic;
	font-weight: 400;
	line-height: 1.02;
	letter-spacing: 0;
	color: var(--th-ivory);
	text-wrap: balance;
}

.theme-four .four-names .four-amp {
	display: block;
	margin-block: 0.1rem;
	font-size: 0.7em;
	color: var(--th-gold);
}

.theme-four .four-date {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	margin-top: 0.9rem;
	font-family: 'Montserrat', system-ui, sans-serif;
	font-size: 0.62rem;
	font-weight: 500;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--th-gold);
}

.theme-four .four-date i {
	width: 4px;
	height: 4px;
	background: var(--th-gold);
	transform: rotate(45deg);
}

.theme-four .four-meta {
	position: relative;
	z-index: 3;
	display: flex;
	width: 100%;
	max-width: 20rem;
	flex-direction: column;
	align-items: center;
	margin-top: -0.25rem;
}

.theme-four .four-guest {
	width: 100%;
	margin-top: 0.75rem;
	padding: 0.9rem 1rem;
	border: 1px solid var(--th-gold-line);
	background: rgba(9, 19, 48, 0.55);
	backdrop-filter: blur(6px);
}

.theme-four .four-guest__name {
	margin-top: 0.2rem;
	font-size: 1.35rem;
	font-style: italic;
	line-height: 1.25;
	color: var(--th-ivory);
}

.theme-four .four-guest__address {
	font-size: 0.78rem;
	color: var(--th-muted);
}

.theme-four .four-btn {
	position: relative;
	display: inline-flex;
	min-height: 3rem;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	margin-top: 1.5rem;
	padding: 0.75rem 1.6rem;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(180deg, #ecd29b 0%, var(--th-gold) 50%, var(--th-gold-strong) 100%);
	box-shadow:
		0 14px 30px -14px rgba(216, 180, 106, 0.55),
		inset 0 1px 0 rgba(255, 255, 255, 0.45);
	color: var(--th-bg-deep);
	font-family: 'Montserrat', system-ui, sans-serif;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	cursor: pointer;
	transition: transform 0.25s ease;
}

.theme-four .four-btn::before {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	content: '';
	animation: four-ripple 2.6s ease-out infinite;
}

.theme-four .four-btn:hover {
	transform: translateY(-2px);
}

.theme-four .four-btn:focus-visible {
	outline: 2px solid var(--th-gold);
	outline-offset: 4px;
}

@keyframes four-ripple {
	0% {
		box-shadow: 0 0 0 0 rgba(216, 180, 106, 0.4);
	}

	70%,
	100% {
		box-shadow: 0 0 0 16px rgba(216, 180, 106, 0);
	}
}

.theme-four .four-btn-outline {
	display: inline-flex;
	min-height: 2.75rem;
	align-items: center;
	gap: 0.5rem;
	padding-inline: 1.25rem;
	border: 1px solid var(--th-gold-line);
	border-radius: 999px;
	color: var(--th-gold);
	font-family: 'Montserrat', system-ui, sans-serif;
	font-size: 0.68rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	transition:
		background 0.25s ease,
		color 0.25s ease;
}

.theme-four .four-btn-outline:hover {
	background: var(--th-gold);
	color: var(--th-bg-deep);
}

.theme-four .four-scroll-cue {
	position: absolute;
	bottom: calc(6.25rem + env(safe-area-inset-bottom));
	left: 50%;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	color: var(--th-gold);
	transform: translateX(-50%);
}

.theme-four .four-scroll-cue svg {
	animation: four-bob 2.2s ease-in-out infinite;
}

@keyframes four-bob {
	50% {
		translate: 0 5px;
	}
}

@media (max-height: 760px) {
	.theme-four .four-hero {
		padding-block: 3rem 5.5rem;
	}

	.theme-four .four-hex {
		width: min(70vw, 16.5rem);
	}

	.theme-four .four-names {
		font-size: clamp(1.9rem, 9vw, 2.3rem);
	}

	.theme-four .four-bloom {
		width: min(34%, 8.5rem);
	}
}

/* Cover overlay — fixed, teleported to <body> */
.theme-four.theme-four-cover {
	position: fixed;
	top: 0;
	left: 50%;
	z-index: 99999;
	width: 100%;
	max-width: 430px;
	height: 100dvh;
	overflow: hidden;
	background: var(--th-bg);
	transform: translateX(-50%) translateY(0);
	transition:
		transform 1s cubic-bezier(0.77, 0, 0.18, 1),
		visibility 0s linear 0s;
}

.theme-four.theme-four-cover .four-hero {
	height: 100dvh;
}

.theme-four.theme-four-cover.is-open {
	visibility: hidden;
	pointer-events: none;
	transform: translateX(-50%) translateY(-100%);
	transition:
		transform 1s cubic-bezier(0.77, 0, 0.18, 1),
		visibility 0s linear 1s;
}

/* ---------- Corner blooms (Blooms.vue) ---------- */

.theme-four .four-bloom {
	position: absolute;
	z-index: 2;
	width: min(46%, 12rem);
	height: auto;
	pointer-events: none;
	opacity: 0;
	animation:
		four-bloom-in 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) var(--four-delay, 0.4s) forwards,
		four-sway 9s ease-in-out calc(var(--four-delay, 0.4s) + 1.4s) infinite;
}

.theme-four .four-bloom--tr {
	top: -2.25rem;
	right: -2.75rem;
	transform-origin: center;
	rotate: 180deg;
	--four-from: 20px -20px;
}

.theme-four .four-bloom--bl {
	bottom: -2.5rem;
	left: -3rem;
	transform-origin: bottom left;
	rotate: 15deg;
	--four-from: -20px 20px;
	--four-delay: 0.6s;
}

@keyframes four-bloom-in {
	from {
		opacity: 0;
		translate: var(--four-from);
	}

	to {
		opacity: 0.95;
		translate: 0 0;
	}
}

@keyframes four-sway {
	50% {
		transform: rotate(3deg);
	}
}

/* ---------- Twinkling stars (Stars.vue) ---------- */

.theme-four .four-stars {
	position: absolute;
	inset: 0;
	z-index: 1;
	overflow: hidden;
	pointer-events: none;
}

.theme-four .four-stars span {
	position: absolute;
	top: var(--star-y);
	left: var(--star-x);
	width: var(--star-size);
	height: var(--star-size);
	background: #fff6dc;
	clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
	opacity: 0.15;
	animation: four-twinkle var(--star-duration) ease-in-out var(--star-delay) infinite;
}

@keyframes four-twinkle {
	50% {
		opacity: var(--star-opacity);
		transform: scale(1.25);
	}
}

/* ---------- Information ---------- */

.theme-four .information-content .caption-notes {
	font-family: 'Montserrat', system-ui, sans-serif;
	font-size: 1.6rem;
	letter-spacing: 0.06em;
	color: var(--th-ivory);
}

.theme-four .information-content .content-notes {
	color: var(--th-muted);
	line-height: 1.85;
}

/* ---------- Profile ---------- */

.theme-four .four-portrait {
	position: relative;
	width: 17.5rem;
	aspect-ratio: 500 / 543;
	margin: 0 auto 1.5rem;
}

.theme-four .four-portrait__photo {
	/* Slightly past measured hole so the photo reads full against the gold stroke */
	position: absolute;
	inset: 12.5% 7.5% 16.5% 5.5%;
	overflow: hidden;
	background: var(--th-bg-soft);
	clip-path: polygon(25% 0.5%, 75% 0.5%, 100% 50%, 75% 99.5%, 25% 99.5%, 0 50%);
}

.theme-four .four-portrait__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.theme-four .four-portrait__frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.theme-four .four-couple-amp {
	margin-block: 1.25rem;
	font-size: 3.5rem;
	line-height: 1;
	color: var(--th-gold);
}

/* ---------- Agenda — ivory band breaks the night ---------- */

.theme-four .four-ivory {
	--th-ivory: #0e1b3d;
	--th-muted: #5b6684;
	--th-gold: #9a7431;
	--th-gold-line: rgba(154, 116, 49, 0.35);

	color: #0e1b3d;
	background:
		url('images/velvet.svg'),
		radial-gradient(80% 40% at 50% 0%, rgba(216, 180, 106, 0.18), transparent 70%),
		#f6f0e6;
}

.theme-four .four-event {
	position: relative;
	padding: 2.25rem 1.5rem 2rem;
	overflow: hidden;
	border: 1px solid rgba(14, 27, 61, 0.14);
	background: #fffdf8;
	box-shadow: 0 24px 40px -30px rgba(14, 27, 61, 0.5);
}

.theme-four .four-event::before {
	position: absolute;
	inset: 6px;
	border: 1px solid rgba(154, 116, 49, 0.3);
	content: '';
	pointer-events: none;
}

.theme-four .four-event__bloom {
	position: absolute;
	top: -1.5rem;
	right: -1.75rem;
	width: 6.5rem;
	rotate: 180deg;
	opacity: 0.9;
	pointer-events: none;
}

.theme-four .four-event__day {
	font-family: 'Bodoni Moda', Didot, serif;
	font-size: 3.75rem;
	line-height: 1;
	color: #0e1b3d;
}

.theme-four .four-event__title {
	font-size: 1.5rem;
	font-style: italic;
	color: #0e1b3d;
}

/* ---------- Countdown ---------- */

.theme-four .four-clock {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 0.35rem;
}

.theme-four .four-clock > div {
	display: flex;
	min-width: 3.75rem;
	flex-direction: column;
	align-items: center;
}

.theme-four .four-clock__sep {
	font-family: 'Bodoni Moda', Didot, serif;
	font-size: 2.25rem;
	line-height: 1;
	color: var(--th-gold-line);
}

.theme-four .four-count__value {
	font-family: 'Bodoni Moda', Didot, serif;
	font-size: 2.75rem;
	font-variant-numeric: tabular-nums lining-nums;
	line-height: 1;
	color: var(--th-ivory);
}

.theme-four .four-count__label {
	margin-top: 0.6rem;
	font-size: 0.58rem;
	font-weight: 500;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--th-gold);
}

/* ---------- Gallery & video ---------- */

.theme-four .four-photo {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 0.2rem;
	background: var(--th-bg-soft);
}

.theme-four .four-photo::after {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 60%, rgba(9, 19, 48, 0.35));
	content: '';
	pointer-events: none;
}

.theme-four .videoWrapper {
	position: relative;
	height: 0;
	margin-bottom: 1rem;
	padding-bottom: 56.25%;
	overflow: hidden;
	border: 1px solid var(--th-gold-line);
	border-radius: 0.25rem;
}

.theme-four .videoWrapper iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* ---------- Closing ---------- */

.theme-four .four-closing {
	position: relative;
	overflow: hidden;
	padding: 4rem 1.75rem 9rem;
	text-align: center;
	background:
		url('images/velvet.svg'),
		radial-gradient(70% 45% at 50% 40%, rgba(216, 180, 106, 0.12), transparent 70%),
		var(--th-bg-deep);
}

.theme-four .four-closing .four-bloom {
	opacity: 0.9;
	animation: none;
}

.theme-four footer {
	background: url('images/velvet.svg'), var(--th-bg-deep);
	color: var(--th-muted);
}

/* ---------- Scroll reveal ---------- */

.theme-four .aos-init {
	opacity: 0 !important;
	pointer-events: none;
}

.theme-four .aos-init[data-aos='fade-up'] {
	transform: translate3d(0, 2rem, 0);
}

.theme-four .aos-init[data-aos='zoom-in'] {
	transform: scale3d(0.92, 0.92, 0.92);
}

@media (prefers-reduced-motion: reduce) {
	.theme-four .aos-init {
		opacity: 1 !important;
		pointer-events: auto;
		transform: none !important;
	}

	.theme-four .four-bloom,
	.theme-four .four-hex {
		opacity: 0.95;
		animation: none;
	}

	.theme-four .four-stars span {
		animation: none;
	}

	.theme-four .four-btn::before,
	.theme-four .four-scroll-cue svg {
		animation: none;
	}

	.theme-four.theme-four-cover,
	.theme-four.theme-four-cover.is-open {
		transition: none;
	}
}
