/*
 * Theme three — "Emerald Filigree"
 * Deep emerald velvet, hand-cut gold filigree, engraved capitals.
 * Every rule is scoped to .theme-three (cover is teleported, so it carries the class too).
 */

.theme-three {
	--th-bg: #1d3328;
	--th-bg-deep: #15271e;
	--th-bg-soft: #24402f;
	--th-gold: #e2c07f;
	--th-gold-strong: #c9a35c;
	--th-gold-line: rgba(226, 192, 127, 0.32);
	--th-ivory: #f4ecdb;
	--th-muted: #b8c5bb;
	--th-panel: rgba(255, 248, 230, 0.04);

	/* Reusable cards stay ivory on velvet; accent uses the emerald ink */
	--inv-accent: #2a4a3b;
	--inv-accent-hover: #1d3328;
	--inv-border: #e9dfc8;
	--inv-border-strong: #d9c79f;
	--inv-tint: #f7f1e3;
	--inv-surface: #fffcf5;
	--inv-shadow: #0b1610;

	width: 100%;
	color: var(--th-ivory);
	font-family: 'EB Garamond', Georgia, serif;
	font-size: 1.02rem;
	line-height: 1.7;
	background-color: var(--th-bg);
	background-image: url('images/velvet.svg');
	-webkit-font-smoothing: antialiased;
}

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

.theme-three h1,
.theme-three h2,
.theme-three h3,
.theme-three .caption,
.theme-three .three-display {
	font-family: 'Cinzel', 'Times New Roman', serif;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.06em;
}

.theme-three .three-italic {
	font-family: 'EB Garamond', Georgia, serif;
	font-style: italic;
	font-weight: 400;
	letter-spacing: 0;
}

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

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

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

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

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

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

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

.theme-three .three-band {
	background:
		url('images/velvet.svg'),
		radial-gradient(90% 50% at 50% 0%, rgba(226, 192, 127, 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-three .three-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-three .three-panel::before {
	position: absolute;
	inset: 5px;
	border: 1px solid rgba(226, 192, 127, 0.16);
	content: '';
	pointer-events: none;
}

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

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

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

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

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

.theme-three .three-hero {
	position: relative;
	display: flex;
	min-height: 100dvh;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 5.5rem 1.75rem 6rem;
	text-align: center;
	background:
		url('images/velvet.svg'),
		radial-gradient(60% 40% at 50% 42%, rgba(226, 192, 127, 0.14), transparent 70%),
		linear-gradient(180deg, var(--th-bg-deep) 0%, var(--th-bg) 50%, var(--th-bg-deep) 100%);
}

.theme-three .three-portal {
	position: relative;
	z-index: 3;
	display: flex;
	width: 100%;
	max-width: 19.5rem;
	flex-direction: column;
	align-items: center;
	padding: 3.25rem 1.5rem 2.25rem;
	border: 1px solid var(--th-gold-line);
	border-radius: 999px 999px 0.5rem 0.5rem;
	background: linear-gradient(180deg, rgba(226, 192, 127, 0.07), rgba(21, 39, 30, 0.5));
}

.theme-three .three-portal::before {
	position: absolute;
	inset: 7px;
	border: 1px solid rgba(226, 192, 127, 0.18);
	border-radius: inherit;
	content: '';
	pointer-events: none;
}

.theme-three .three-crest {
	width: 4.5rem;
	height: auto;
	filter: drop-shadow(0 0 14px rgba(226, 192, 127, 0.35));
}

.theme-three .three-names {
	margin-top: 1.1rem;
	font-size: clamp(2.1rem, 10vw, 2.6rem);
	font-weight: 500;
	line-height: 1.05;
	color: var(--th-ivory);
	text-wrap: balance;
}

.theme-three .three-names .three-amp {
	display: block;
	margin-block: 0.15rem;
	font-size: 0.85em;
	color: var(--th-gold);
}

.theme-three .three-date {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-top: 1.35rem;
	font-family: 'Cinzel', serif;
	font-size: 0.72rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--th-gold);
}

.theme-three .three-date i {
	width: 1px;
	height: 1.1rem;
	background: var(--th-gold-line);
}

.theme-three .three-guest {
	width: 100%;
	margin-top: 1.5rem;
	padding-top: 1.2rem;
	border-top: 1px solid var(--th-gold-line);
}

.theme-three .three-guest__name {
	margin-top: 0.25rem;
	font-size: 1.35rem;
	font-weight: 500;
	line-height: 1.25;
	color: var(--th-ivory);
}

.theme-three .three-guest__address {
	font-size: 0.85rem;
	font-style: italic;
	color: var(--th-muted);
}

.theme-three .three-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, #f0d79f 0%, var(--th-gold) 50%, var(--th-gold-strong) 100%);
	box-shadow:
		0 14px 30px -14px rgba(226, 192, 127, 0.55),
		inset 0 1px 0 rgba(255, 255, 255, 0.45);
	color: var(--th-bg-deep);
	font-family: 'Cinzel', serif;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	cursor: pointer;
	transition: transform 0.25s ease;
}

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

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

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

@keyframes three-ripple {
	0% {
		box-shadow: 0 0 0 0 rgba(226, 192, 127, 0.4);
	}

	70%,
	100% {
		box-shadow: 0 0 0 16px rgba(226, 192, 127, 0);
	}
}

.theme-three .three-btn-outline {
	display: inline-flex;
	min-height: 2.75rem;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.65rem 1.35rem 0.55rem;
	border: 1px solid var(--th-gold-line);
	border-radius: 999px;
	color: var(--th-gold);
	font-family: 'Cinzel', serif;
	font-size: 0.68rem;
	line-height: 1.15;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	transition:
		background 0.25s ease,
		color 0.25s ease;
}

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

.theme-three .three-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-three .three-scroll-cue svg {
	animation: three-bob 2.2s ease-in-out infinite;
}

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

@media (max-height: 760px) {
	.theme-three .three-hero {
		padding-block: 4rem;
	}

	.theme-three .three-portal {
		padding-block: 2.25rem 1.6rem;
	}

	.theme-three .three-crest {
		width: 3.5rem;
	}

	.theme-three .three-names {
		margin-top: 0.75rem;
		font-size: clamp(1.9rem, 9vw, 2.25rem);
	}

	.theme-three .three-date,
	.theme-three .three-guest,
	.theme-three .three-btn {
		margin-top: 1rem;
	}

	.theme-three .three-corner {
		width: min(22%, 5.5rem);
	}
}

/* Cover overlay — fixed, teleported to <body> */
.theme-three.theme-three-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-three.theme-three-cover .three-hero {
	height: 100dvh;
}

.theme-three.theme-three-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;
}

/* ---------- Filigree corners (Filigree.vue) ---------- */

.theme-three .three-corner {
	position: absolute;
	z-index: 2;
	width: min(27%, 7rem);
	height: auto;
	pointer-events: none;
	opacity: 0;
	filter: drop-shadow(0 0 10px rgba(226, 192, 127, 0.25));
	animation:
		three-corner-in 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) var(--three-delay, 0.4s) forwards,
		three-glow 5s ease-in-out calc(var(--three-delay, 0.4s) + 1.2s) infinite;
}

.theme-three .three-corner--tl {
	top: 1rem;
	left: 1rem;
	--three-from: -12px -12px;
}

.theme-three .three-corner--tr {
	top: 1rem;
	right: 1rem;
	--three-from: 12px -12px;
}

.theme-three .three-corner--bl {
	bottom: 1rem;
	left: 1rem;
	--three-from: -12px 12px;
	--three-delay: 0.6s;
}

.theme-three .three-corner--br {
	right: 1rem;
	bottom: 1rem;
	--three-from: 12px 12px;
	--three-delay: 0.6s;
}

@keyframes three-corner-in {
	from {
		opacity: 0;
		translate: var(--three-from);
	}

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

@keyframes three-glow {
	50% {
		opacity: 0.6;
	}
}

/* ---------- Rising gold dust (GoldDust.vue) ---------- */

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

.theme-three .three-dust span {
	position: absolute;
	bottom: -4%;
	left: var(--dust-x);
	width: var(--dust-size);
	height: var(--dust-size);
	border-radius: 999px;
	background: radial-gradient(circle, #fff3d1 0%, var(--th-gold) 45%, transparent 72%);
	opacity: 0;
	animation: three-rise var(--dust-duration) ease-in var(--dust-delay) infinite;
}

@keyframes three-rise {
	0% {
		opacity: 0;
		translate: 0 0;
	}

	15%,
	70% {
		opacity: var(--dust-opacity);
	}

	100% {
		opacity: 0;
		translate: var(--dust-drift) -95dvh;
	}
}

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

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

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

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

/* border-couple.svg viewBox 787.88×626.14; circle cx=393.94 cy=295.62 r=291.62 */
.theme-three .three-ring {
	position: relative;
	width: min(16.5rem, 88%);
	aspect-ratio: 787.88 / 626.14;
	margin: 0 auto 1.75rem;
}

.theme-three .three-ring__photo {
	position: absolute;
	/* Perfect circle at SVG circle center; diameter matches inner edge of 8px gold stroke (~73% width) */
	z-index: 1;
	top: 47.2%;
	left: 50%;
	width: 71%;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 50%;
	background: var(--th-bg-soft);
	transform: translate(-50%, -50%);
	clip-path: circle(50% at 50% 50%);
}

.theme-three .three-ring__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.theme-three .three-ring__frame {
	position: absolute;
	z-index: 2;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	pointer-events: none;
	filter: drop-shadow(0 0 12px rgba(226, 192, 127, 0.3));
}

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

/* ---------- Agenda ---------- */
/* Solid border + fixed corner flourishes (legacy pattern).
   Avoids stretched border-information.svg which pulled the frame
   into the title/CTA as the card grew taller. */

.theme-three .three-event {
	--three-event-corner: 5.75rem;
	--three-event-corner-out: 1.4rem;

	position: relative;
	margin-block: 0.85rem;
	padding: 2rem 1.75rem 2.25rem;
	border: 5px solid var(--th-gold);
	background: radial-gradient(closest-side, rgba(226, 192, 127, 0.07), transparent);
}

.theme-three .three-event--with-map {
	padding-bottom: 2.5rem;
}

.theme-three .three-event__title {
	position: relative;
	margin: 0;
	font-size: 1.45rem;
	color: var(--th-ivory);
}

.theme-three .three-event__title::before,
.theme-three .three-event__title::after,
.theme-three .three-event::before,
.theme-three .three-event::after {
	position: absolute;
	z-index: 1;
	display: block;
	width: var(--three-event-corner);
	height: var(--three-event-corner);
	pointer-events: none;
	content: '';
	background-repeat: no-repeat;
	background-size: contain;
}

/* Top uses title as origin — subtract card padding so inset matches bottom corners */
.theme-three .three-event__title::before {
	top: calc(-2rem - var(--three-event-corner-out));
	left: calc(-1.75rem - var(--three-event-corner-out));
	background-image: url('images/tl.svg');
	background-position: top left;
}

.theme-three .three-event__title::after {
	top: calc(-2rem - var(--three-event-corner-out));
	right: calc(-1.75rem - var(--three-event-corner-out));
	background-image: url('images/tr.svg');
	background-position: top right;
}

.theme-three .three-event::before {
	bottom: calc(-1 * var(--three-event-corner-out));
	left: calc(-1 * var(--three-event-corner-out));
	background-image: url('images/bl.svg');
	background-position: bottom left;
}

.theme-three .three-event::after {
	bottom: calc(-1 * var(--three-event-corner-out));
	right: calc(-1 * var(--three-event-corner-out));
	background-image: url('images/br.svg');
	background-position: bottom right;
}

.theme-three .three-event .three-btn-outline {
	margin-top: 1.5rem;
}

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

.theme-three .three-countbar {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
}

.theme-three .three-countbar > div {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 1.1rem 0.25rem;
}

.theme-three .three-countbar > div + div {
	border-left: 1px solid var(--th-gold-line);
}

.theme-three .three-count__value {
	font-family: 'Cinzel', serif;
	font-size: 1.9rem;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	color: var(--th-gold);
}

.theme-three .three-count__label {
	margin-top: 0.45rem;
	font-size: 0.6rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--th-muted);
}

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

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

.theme-three .three-photo::after {
	position: absolute;
	inset: 6px;
	border: 1px solid rgba(244, 236, 219, 0.45);
	content: '';
	pointer-events: none;
}

.theme-three .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-three .videoWrapper iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

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

.theme-three .three-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(226, 192, 127, 0.12), transparent 70%),
		var(--th-bg-deep);
}

.theme-three .three-closing .three-corner {
	top: auto;
	opacity: 0.85;
	animation: none;
}

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

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

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

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

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

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

	.theme-three .three-corner {
		opacity: 0.9;
		animation: none;
	}

	.theme-three .three-dust {
		display: none;
	}

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

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