/* ── Tokens ── */
:root {
	--bg: #0d1b2a;
	--surface: #142233;
	--gold: #ffd166;
	--pink: #ef476f;
	--teal: #06d6a0;
	--text: #e8edf2;
	--muted: #7a91a8;
	--radius: 16px;
	--font-disp: "Fredoka One", cursive;
	--font-body: "Nunito", sans-serif;
}

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

body {
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	min-height: 100vh;
	overflow-x: hidden;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	background-image:
		radial-gradient(circle at 15% 20%, rgba(255, 209, 102, 0.07) 0%, transparent 50%),
		radial-gradient(circle at 85% 75%, rgba(239, 71, 111, 0.07) 0%, transparent 50%),
		radial-gradient(circle at 50% 50%, rgba(6, 214, 160, 0.05) 0%, transparent 60%);
	pointer-events: none;
	z-index: 0;
}

/* ── Layout ── */
.page {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0 1rem 4rem;
}

/* ── Hero ── */
.hero {
	text-align: center;
	padding: 2.5rem 1rem 2rem;
	max-width: 700px;
	width: 100%;
}

.hero__eyebrow {
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 0.85rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--teal);
	margin-bottom: 0.75rem;
}

.hero__name {
	font-family: var(--font-disp);
	font-size: clamp(3rem, 14vw, 6.5rem);
	color: var(--gold);
	line-height: 1;
	text-shadow: 0 0 40px rgba(255, 209, 102, 0.35);
}

.hero__age-wrap {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.5rem;
}

.hero__age {
	font-family: var(--font-disp);
	font-size: clamp(5rem, 22vw, 11rem);
	color: var(--pink);
	line-height: 0.9;
	animation: pulse-age 2.4s ease-in-out infinite;
	text-shadow: 0 0 60px rgba(239, 71, 111, 0.45);
}

.hero__anos {
	font-family: var(--font-disp);
	font-size: clamp(2rem, 6vw, 3.5rem);
	color: var(--pink);
	opacity: 0.8;
	align-self: flex-end;
	padding-bottom: 0.4rem;
}

@keyframes pulse-age {
	0%,
	100% {
		transform: scale(1);
		text-shadow: 0 0 60px rgba(239, 71, 111, 0.45);
	}
	50% {
		transform: scale(1.12);
		text-shadow:
			0 0 80px rgba(239, 71, 111, 0.8),
			0 0 120px rgba(239, 71, 111, 0.4);
	}
}

.hero__sub {
	margin-top: 1.25rem;
	font-size: clamp(0.9rem, 3.5vw, 1.05rem);
	color: var(--muted);
	line-height: 1.7;
}

.hero__sub a {
	color: var(--teal);
	text-decoration: none;
	border-bottom: 1px solid rgba(6, 214, 160, 0.4);
	transition: border-color 0.2s;
}

.hero__sub a:hover {
	border-bottom-color: var(--teal);
}

/* ── Divider ── */
.divider {
	width: 60px;
	height: 3px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--gold), var(--pink));
	margin: 2rem auto;
}

/* ── Carousel ── */
.carousel-wrap {
	width: 100%;
	max-width: 680px;
}

.carousel {
	position: relative;
	width: 100%;
	aspect-ratio: 4/3;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
	background: var(--surface);
	animation: carousel-glow 2.4s ease-in-out infinite;
}

@keyframes carousel-glow {
	0%,
	100% {
		box-shadow:
			0 24px 64px rgba(0, 0, 0, 0.5),
			0 0 0 3px rgba(239, 71, 111, 0.3),
			0 0 24px rgba(239, 71, 111, 0.15);
	}
	50% {
		box-shadow:
			0 24px 64px rgba(0, 0, 0, 0.5),
			0 0 0 3px rgba(255, 209, 102, 0.5),
			0 0 40px rgba(255, 209, 102, 0.25);
	}
}

.carousel__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 1s ease-in-out;
}

.carousel__slide.active {
	opacity: 1;
}

.carousel__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.carousel__slide.placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3rem;
	color: var(--muted);
	background: var(--surface);
}

.carousel__dots {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1rem;
}

.carousel__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--muted);
	transition:
		background 0.3s,
		transform 0.3s;
	cursor: pointer;
	border: none;
	/* área de toque maior no mobile */
	padding: 6px;
	background-clip: content-box;
}

.carousel__dot.active {
	background: var(--gold);
	background-clip: content-box;
	transform: scale(1.2);
}

/* ── RSVP trigger ── */
.rsvp-trigger-wrap {
	margin-top: 2.5rem;
}

.btn-rsvp {
	font-family: var(--font-disp);
	font-size: clamp(1.1rem, 4vw, 1.3rem);
	letter-spacing: 0.05em;
	color: var(--bg);
	background: linear-gradient(135deg, var(--gold) 0%, #ffbc2e 100%);
	border: none;
	border-radius: 100px;
	padding: 1rem 2.8rem;
	cursor: pointer;
	box-shadow: 0 8px 28px rgba(255, 209, 102, 0.35);
	transition:
		transform 0.15s,
		box-shadow 0.15s;
	/* toque fácil no mobile */
	min-height: 52px;
}

.btn-rsvp:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 36px rgba(255, 209, 102, 0.45);
}
.btn-rsvp:active {
	transform: translateY(0);
}

/* ── RSVP panel ── */
.rsvp-panel {
	width: 100%;
	max-width: 680px;
	margin-top: 2rem;
	display: none;
	flex-direction: column;
	gap: 1rem;
}

.rsvp-panel.visible {
	display: flex;
}

.rsvp-panel h2 {
	font-family: var(--font-disp);
	font-size: clamp(1.3rem, 5vw, 1.6rem);
	color: var(--gold);
	text-align: center;
}

/* ── Primary row — mobile-first ──
   Mobile:  tudo empilhado (1 coluna)
   Tablet+: nome e e-mail lado a lado, dropdown abaixo
   Desktop: os três na mesma linha
── */
.primary-row {
	display: flex;
	flex-direction: column; /* mobile: empilhado */
	gap: 0.75rem;
	background: var(--surface);
	border: 1px solid rgba(255, 209, 102, 0.2);
	border-radius: var(--radius);
	padding: 1rem;
}

@media (min-width: 480px) {
	.primary-row {
		display: grid;
		grid-template-columns: 1fr 1fr; /* nome | e-mail */
		grid-template-rows: auto auto;
	}

	.field-group--narrow {
		grid-column: 1 / -1; /* dropdown ocupa linha inteira */
		max-width: 160px; /* mas não estica demais */
	}
}

@media (min-width: 680px) {
	.primary-row {
		grid-template-columns: 1fr 1fr auto; /* os três lado a lado */
		grid-template-rows: auto;
	}

	.field-group--narrow {
		grid-column: auto;
		max-width: none;
		min-width: 120px;
	}
}

/* ── Campos ── */
.field-group {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

label {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}

input[type="text"],
input[type="email"] {
	font-family: var(--font-body);
	font-size: 1rem; /* >= 16px evita zoom automático no iOS */
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	color: var(--text);
	padding: 0.75rem 1rem;
	width: 100%;
	transition: border-color 0.2s;
	outline: none;
	/* altura mínima confortável para toque */
	min-height: 48px;
}

input[type="text"]:focus,
input[type="email"]:focus {
	border-color: var(--teal);
}

input::placeholder {
	color: var(--muted);
}

select {
	font-family: var(--font-body);
	font-size: 1rem; /* evita zoom no iOS */
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	color: var(--text);
	padding: 0.75rem 2.5rem 0.75rem 1rem;
	width: 100%;
	cursor: pointer;
	outline: none;
	transition: border-color 0.2s;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A91A8' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.85rem center;
	min-height: 48px;
}

select option {
	background: #142233;
	color: var(--text);
}

select:focus {
	border-color: var(--teal);
}

/* ── Extra names ── */
.extra-names {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.extra-name-row {
	display: flex;
	flex-direction: column; /* mobile: label acima do input */
	gap: 0.35rem;
	background: var(--surface);
	border-radius: var(--radius);
	padding: 0.85rem 1rem;
	animation: slide-in 0.2s ease;
}

@media (min-width: 480px) {
	.extra-name-row {
		flex-direction: row; /* tablet+: label e input lado a lado */
		align-items: center;
		gap: 0.75rem;
	}

	.extra-name-row .guest-label {
		white-space: nowrap;
		min-width: 90px;
	}

	.extra-name-row input {
		flex: 1;
	}
}

@keyframes slide-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.extra-name-row .guest-label {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--teal);
}

/* ── Submit ── */
.btn-submit {
	font-family: var(--font-disp);
	font-size: clamp(1rem, 4vw, 1.15rem);
	color: var(--bg);
	background: linear-gradient(135deg, var(--teal) 0%, #04b88a 100%);
	border: none;
	border-radius: 100px;
	padding: 1rem 2.5rem;
	cursor: pointer;
	align-self: center;
	box-shadow: 0 8px 24px rgba(6, 214, 160, 0.3);
	transition:
		transform 0.15s,
		box-shadow 0.15s;
	min-height: 52px;
	/* largura confortável no mobile */
	width: 100%;
	max-width: 320px;
}

.btn-submit:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 32px rgba(6, 214, 160, 0.4);
}
.btn-submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

/* ── Feedback ── */
.feedback {
	text-align: center;
	padding: 1rem;
	border-radius: var(--radius);
	font-weight: 700;
	line-height: 1.6;
	font-size: clamp(0.9rem, 3.5vw, 1rem);
	display: none;
}

.feedback.success {
	background: rgba(6, 214, 160, 0.15);
	color: var(--teal);
	display: block;
}
.feedback.error {
	background: rgba(239, 71, 111, 0.15);
	color: var(--pink);
	display: block;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
	.hero__age {
		animation: none;
	}
	.carousel__slide {
		transition: none;
	}
	.extra-name-row {
		animation: none;
	}
}
