/* Colori del sito. Per cambiare atmosfera, modifica solo questo blocco. */
:root {
	--cream: #f8e4cc;
	--cream-deep: #e7cba8;
	--paper: #fffaf3;
	--ink: #1c2b24;
	--forest: #1e3a2f;
	--forest-soft: #2f5344;
	--gold: #a6853f;
	--gold-soft: #e4d2a4;
	--red: #9b2335;
	--red-dark: #7a1b29;
	--muted: #5c6b63;
	--line: rgba(30, 58, 47, 0.14);
	--shadow: 0 16px 36px rgba(28, 43, 36, 0.08);
	--serif: "Fraunces", Georgia, serif;
	--sans: "Source Sans 3", "Segoe UI", sans-serif;
}

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

html {
	scroll-behavior: smooth;
}

#inicio,
#calendario,
#curiosidades,
#historia,
#humor,
#participantes,
#contacto,
#parti,
#contact {
	scroll-margin-top: 5rem;
}

body {
	margin: 0;
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1.05rem;
	line-height: 1.6;
	background-color: #f6d7be;
	background-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='340' viewBox='0 0 340 340'%3E%3Cg fill='%23b8893a'%3E%3Cpath d='M36 42l1.7 5 5.2.4-4.1 3.2 1.4 5-4.2-2.8-4.2 2.8 1.4-5-4.1-3.2 5.2-.4z' opacity='.72'/%3E%3Cpath d='M214 86l1.2 3.5 3.7.3-2.9 2.3 1 3.6-3-2-3 2 1-3.6-2.9-2.3 3.7-.3z' opacity='.5'/%3E%3Cpath d='M128 268l1.5 4.3 4.4.3-3.5 2.7 1.2 4.2-3.6-2.4-3.6 2.4 1.2-4.2-3.5-2.7 4.4-.3z' opacity='.6'/%3E%3Cpath d='M300 210l1 3 3.1.2-2.4 1.9.8 3-2.5-1.7-2.5 1.7.8-3-2.4-1.9 3.1-.2z' opacity='.4'/%3E%3C/g%3E%3Cg fill='%239b2335'%3E%3Ccircle cx='262' cy='48' r='3.4' opacity='.38'/%3E%3Ccircle cx='78' cy='168' r='2.5' opacity='.3'/%3E%3Ccircle cx='176' cy='132' r='2.2' opacity='.26'/%3E%3Ccircle cx='40' cy='300' r='3' opacity='.28'/%3E%3C/g%3E%3Cg stroke='%232f5344' stroke-width='1.3' fill='none' opacity='.34'%3E%3Cpath d='M292 150c9 12 9 20 0 32M292 150c-9 12-9 20 0 32M283 166h18'/%3E%3Cpath d='M52 78c7 9 7 16 0 25M52 78c-7 9-7 16 0 25M45 90h14'/%3E%3C/g%3E%3C/svg%3E"),
		radial-gradient(ellipse 75% 48% at 6% -8%, rgba(255, 186, 96, 0.62), transparent 58%),
		radial-gradient(ellipse 58% 42% at 100% 0%, rgba(155, 35, 53, 0.22), transparent 52%),
		radial-gradient(ellipse 80% 42% at 50% 108%, rgba(36, 82, 58, 0.16), transparent 58%),
		linear-gradient(165deg, #fbe6cf 0%, #f6d3b8 46%, #f0cbb4 100%);
	background-attachment: fixed;
	background-size: 340px 340px, auto, auto, auto, auto;
}

img {
	max-width: 100%;
	display: block;
}

a {
	color: var(--forest-soft);
}

a:hover {
	color: var(--gold);
}

h1, h2, h3 {
	font-family: var(--serif);
	font-weight: 560;
	line-height: 1.15;
	color: var(--forest);
}

p {
	margin: 0 0 0.8rem;
}

.wrap {
	width: min(1080px, calc(100% - 2rem));
	margin: 0 auto;
}

.eyebrow {
	margin: 0 0 0.55rem;
	color: var(--gold);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.section {
	padding: 3.2rem 0;
}

.section-title {
	margin: 0 0 1.3rem;
	font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.section-title::after {
	content: "";
	display: block;
	width: 3.2rem;
	height: 2px;
	margin-top: 0.6rem;
	background: var(--gold);
}

.lede {
	color: var(--muted);
	font-size: 1.15rem;
}

.preview-note {
	margin: 0;
	padding: 0.45rem 1rem;
	background: #9b2335;
	color: #fff;
	font-size: 0.92rem;
	font-weight: 700;
	text-align: center;
}

.preview-hint {
	margin: 0 0 1rem;
	color: var(--muted);
	font-size: 0.95rem;
}

.keep-lines {
	white-space: pre-line;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(248, 228, 204, 0.9);
	border-bottom: 1px solid var(--line);
	backdrop-filter: blur(12px);
}

.header-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 4.2rem;
}

.brand {
	font-family: var(--serif);
	font-size: 1.35rem;
	font-weight: 600;
	color: var(--forest);
	text-decoration: none;
}

.brand span {
	color: var(--gold);
	font-weight: 500;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 1.15rem;
}

.site-nav a {
	color: var(--forest);
	font-weight: 600;
	text-decoration: none;
}

.site-nav a:hover,
.site-nav a.is-current {
	color: var(--gold);
}

.nav-private {
	padding: 0.4rem 0.85rem;
	border: 1.5px solid var(--forest);
	border-radius: 999px;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.nav-toggle,
.nav-burger {
	display: none;
}

.hero {
	padding: 3.2rem 0 1rem;
}

.hero-grid {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: 2.5rem;
	align-items: center;
}

.hero h1 {
	margin: 0 0 0.8rem;
	font-size: clamp(2.3rem, 5vw, 3.6rem);
}

.hero-figure {
	margin: 0;
	padding: 0.55rem;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 22px;
	box-shadow: var(--shadow);
}

.hero-figure img {
	width: 100%;
	height: 320px;
	object-fit: cover;
	object-position: 18% center;
	border-radius: 16px;
}

.countdown-layout {
	display: grid;
	grid-template-columns: minmax(180px, 0.7fr) 1.4fr;
	gap: 1rem;
	align-items: start;
}

.countdown-card,
.calendar-card {
	margin: 0;
	padding: 1.3rem 1.2rem 1.4rem;
	background: var(--paper);
	border-radius: 20px;
	box-shadow: var(--shadow);
}

.countdown-card {
	display: flex;
	flex-direction: column;
	justify-content: center;
	text-align: center;
	background:
		radial-gradient(circle at 50% 0%, rgba(228, 210, 164, 0.7), transparent 58%),
		linear-gradient(180deg, #fffaf3 0%, #f6ddc2 100%);
	border-top: 3px solid var(--red);
}

.countdown-number {
	margin: 0.15rem 0 0;
	color: var(--red);
	font-family: var(--serif);
	font-size: clamp(4rem, 8vw, 6rem);
	font-weight: 650;
	line-height: 0.9;
}

.countdown-label {
	margin: 0.35rem 0 0;
	color: var(--forest);
	font-family: var(--serif);
	font-size: 1.35rem;
}

.calendar-title {
	margin: 0 0 0.85rem;
	font-size: 1.7rem;
}

.calendar-weekdays,
.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 0.35rem;
}

.calendar-weekdays {
	margin-bottom: 0.35rem;
	color: var(--gold);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-align: center;
}

.cal-day {
	display: grid;
	place-items: center;
	aspect-ratio: 1;
	border-radius: 10px;
	background: #f8e4cc;
	color: var(--forest);
	font-weight: 700;
}

.cal-day.is-empty {
	background: transparent;
}

.cal-day.is-past {
	background: rgba(30, 58, 47, 0.07);
	color: var(--muted);
	font-weight: 600;
}

.cal-day.is-today {
	box-shadow: inset 0 0 0 2px var(--gold);
}

.cal-day.is-christmas {
	background: var(--red);
	color: #fffaf3;
}

.cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
}

.card {
	margin: 0;
	padding: 1.15rem 1.15rem 1.2rem;
	background: var(--paper);
	border-top: 3px solid var(--gold);
	border-radius: 16px;
	box-shadow: var(--shadow);
}

.card h3 {
	margin: 0 0 0.4rem;
	font-size: 1.2rem;
}

.card p {
	margin: 0;
	color: var(--ink);
}

.joke-groups {
	grid-template-columns: 1.3fr 0.9fr 0.9fr;
}

.jokes {
	margin: 0.7rem 0 0;
	padding: 0;
	list-style: none;
}

.jokes li + li {
	margin-top: 0.85rem;
}

.jokes .dialogue {
	margin-top: 0.15rem;
}

.story {
	max-width: 42rem;
	margin: 0 auto;
	padding: 2rem 2.1rem 1.4rem;
	background: var(--paper);
	border-radius: 20px;
	box-shadow: var(--shadow);
}

.story h2 {
	margin-top: 0;
}

.dialogue {
	font-style: italic;
	color: var(--forest-soft);
}

.riddle {
	margin-top: 0.85rem;
}

.riddle summary {
	cursor: pointer;
	color: var(--red);
	font-weight: 700;
}

.riddle p {
	margin: 0.6rem 0 0;
	font-family: var(--serif);
	font-size: 1.15rem;
	color: var(--forest);
}

.people {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.people a {
	display: block;
	height: 100%;
	padding: 1rem 0.8rem 1.05rem;
	background-color: #f3d7b6;
	background-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='148' height='148' viewBox='0 0 148 148'%3E%3Cg fill='%23b8893a' opacity='.45'%3E%3Cpath d='M28 26l1.3 3.6 3.8.3-3 2.3 1 3.6-3.1-2.1-3.1 2.1 1-3.6-3-2.3 3.8-.3z'/%3E%3C/g%3E%3Cg fill='%239b2335' opacity='.34'%3E%3Ccircle cx='118' cy='34' r='2.5'/%3E%3Ccircle cx='124' cy='40' r='2.2'/%3E%3C/g%3E%3Cg stroke='%232f5344' stroke-width='1.15' fill='none' opacity='.4'%3E%3Cpath d='M112 108c6 8 6 13 0 21M112 108c-6 8-6 13 0 21M106 118h12'/%3E%3C/g%3E%3C/svg%3E"),
		radial-gradient(ellipse 78% 52% at 50% 34%, rgba(255, 246, 230, 0.55), transparent 68%),
		linear-gradient(168deg, #f8e4c8 0%, #efd0ae 100%);
	background-size: 148px 148px, auto, auto;
	border: 1px solid rgba(166, 133, 63, 0.38);
	border-radius: 18px;
	box-shadow: var(--shadow);
	color: inherit;
	text-align: center;
	text-decoration: none;
}

.people a:hover {
	border-color: var(--gold);
	transform: translateY(-2px);
}

.person-name {
	display: block;
	margin-top: 0.75rem;
	color: var(--red);
	font-family: var(--serif);
	font-size: 1.2rem;
	font-weight: 600;
}

.people small {
	color: var(--gold);
	font-weight: 700;
	letter-spacing: 0.03em;
}

.portrait {
	display: block;
	position: relative;
	width: 108px;
	height: 108px;
	margin: 0.55rem auto 0;
}

.portrait::before {
	content: "";
	position: absolute;
	z-index: 0;
	inset: -8px;
	border-radius: 50%;
	background:
		radial-gradient(circle at 50% 50%, transparent 62%, rgba(47, 83, 68, 0.55) 63% 70%, transparent 71%),
		radial-gradient(circle at 18% 78%, #9b2335 0 3px, transparent 3.5px),
		radial-gradient(circle at 82% 74%, #9b2335 0 3px, transparent 3.5px),
		radial-gradient(circle at 50% 8%, #b8893a 0 3px, transparent 3.5px),
		conic-gradient(from 40deg, rgba(47, 83, 68, 0.28), rgba(184, 137, 58, 0.45), rgba(47, 83, 68, 0.28));
}

.people img {
	position: relative;
	z-index: 1;
	width: 108px;
	height: 108px;
	margin: 0;
	object-fit: cover;
	border: 3px solid #c6a15c;
	border-radius: 50%;
	box-shadow: 0 0 0 3px rgba(47, 83, 68, 0.28);
}

.charm {
	position: absolute;
	z-index: 2;
	width: 52px;
	height: 52px;
	left: calc(100% + 12px);
	bottom: 2px;
	filter: drop-shadow(0 2px 2px rgba(28, 43, 36, 0.28));
}

.act-star .charm { animation: charm-twinkle 1.8s ease-in-out infinite; }
.act-gift .charm { animation: charm-bounce 1.6s ease-in-out infinite; }
.act-snow .charm { animation: charm-spin 6s linear infinite; }
.act-bell .charm { transform-origin: 50% 18%; animation: charm-swing 1.8s ease-in-out infinite; }
.act-cocoa .charm { animation: charm-steam 2.2s ease-in-out infinite; }
.act-cane .charm { animation: charm-rock 1.7s ease-in-out infinite; }
.act-lights .bulb { animation: charm-blink 1.4s steps(2, end) infinite; }
.act-lights .bulb.b { animation-delay: 0.35s; }
.act-lights .bulb.c { animation-delay: 0.7s; }
.act-train .charm { animation: charm-chug 2.4s ease-in-out infinite; }
.act-bauble .charm { transform-origin: 50% 8%; animation: charm-swing 2.6s ease-in-out infinite; }
.act-stocking .charm { transform-origin: 50% 10%; animation: charm-swing 2s ease-in-out infinite; }
.act-wreath .charm { animation: charm-spin 9s linear infinite; }
.act-sleigh .charm { animation: charm-hop 1.5s ease-in-out infinite; }

@keyframes charm-twinkle {
	0%, 100% { transform: scale(1) rotate(0deg); }
	50% { transform: scale(1.22) rotate(12deg); }
}

@keyframes charm-bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-7px); }
}

@keyframes charm-spin {
	to { transform: rotate(360deg); }
}

@keyframes charm-swing {
	0%, 100% { transform: rotate(-12deg); }
	50% { transform: rotate(12deg); }
}

@keyframes charm-steam {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-5px); }
}

@keyframes charm-rock {
	0%, 100% { transform: rotate(-16deg); }
	50% { transform: rotate(10deg); }
}

@keyframes charm-blink {
	0%, 40% { opacity: 1; }
	50%, 100% { opacity: 0.25; }
}

@keyframes charm-chug {
	0%, 100% { transform: translateX(-4px); }
	50% { transform: translateX(6px); }
}

@keyframes charm-hop {
	0%, 100% { transform: translateY(0) rotate(-6deg); }
	50% { transform: translateY(-6px) rotate(6deg); }
}

@media (prefers-reduced-motion: reduce) {
	.charm,
	.act-lights .bulb {
		animation: none;
	}
}

.contact-box {
	max-width: 36rem;
	padding: 1.6rem 1.5rem;
	background: var(--paper);
	border-radius: 18px;
	box-shadow: var(--shadow);
}

.contact-box a {
	color: var(--forest);
	font-weight: 700;
}

.site-footer {
	padding: 1.6rem 0 2rem;
	border-top: 1px solid var(--line);
	color: var(--muted);
	text-align: center;
}

.site-footer p {
	margin: 0;
}

.page {
	padding: 2.4rem 0 3.5rem;
}

.panel {
	width: min(42rem, 100%);
	margin: 0 auto;
	padding: 2rem 1.6rem 1.8rem;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 20px;
	box-shadow: var(--shadow);
}

.panel.wide {
	width: min(46rem, 100%);
}

.panel h1,
.panel h2 {
	margin: 0 0 0.4rem;
}

.meta {
	margin: 1rem 0;
	padding: 0.9rem 1rem;
	background: var(--cream);
	border-radius: 12px;
}

.meta p:last-child {
	margin-bottom: 0;
}

.field {
	margin-bottom: 1rem;
}

.field label {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--forest);
	font-weight: 700;
}

.field input,
.field textarea {
	width: 100%;
	padding: 0.75rem 0.85rem;
	border: 1.5px solid var(--cream-deep);
	border-radius: 12px;
	background: #fff;
	color: var(--ink);
	font: inherit;
}

.field textarea {
	min-height: 8rem;
	resize: vertical;
}

.field input:focus,
.field textarea:focus {
	outline: 2px solid var(--gold);
	border-color: var(--gold);
}

.field input:disabled {
	background: var(--cream);
	color: var(--muted);
}

.btn {
	display: inline-block;
	padding: 0.75rem 1.3rem;
	border: 0;
	border-radius: 999px;
	background: var(--red);
	color: #fff;
	font: inherit;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.btn:hover {
	background: var(--red-dark);
	color: #fff;
}

.btn-block {
	width: 100%;
}

.btn-quiet {
	background: transparent;
	color: var(--forest);
	box-shadow: inset 0 0 0 1.5px var(--forest);
}

.btn-quiet:hover {
	background: var(--forest);
	color: #fff;
}

.actions {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 0.75rem;
	margin-top: 1.4rem;
}

.actions .btn {
	display: block;
}

.reveal {
	margin: 1.4rem 0;
	padding: 1.5rem 1rem;
	border: 1px solid var(--gold-soft);
	border-radius: 16px;
	background: var(--cream);
	text-align: center;
}

.reveal-name {
	margin: 0;
	color: var(--red);
	font-family: var(--serif);
	font-size: clamp(2rem, 4vw, 2.8rem);
	font-weight: 600;
}

.letter-name {
	margin: 0.2rem 0 0.6rem;
	color: var(--red);
	font-family: var(--serif);
	font-size: clamp(2rem, 4vw, 3rem);
}

.letter-block {
	margin-top: 1.3rem;
}

.letter-block h2 {
	margin-bottom: 0.55rem;
	font-size: 1.45rem;
}

.letter-block h2::after {
	content: "";
	display: block;
	width: 2.4rem;
	height: 2px;
	margin-top: 0.4rem;
	background: var(--gold);
}

.prose {
	padding: 0.95rem 1rem;
	background: var(--cream);
	border-radius: 12px;
}

.center {
	margin-top: 1.5rem;
	text-align: center;
}

.alert {
	margin-bottom: 1rem;
	padding: 0.8rem 1rem;
	border-radius: 12px;
	background: #f8ebe8;
	color: var(--red-dark);
}

@media (max-width: 1100px) {
	.charm {
		width: 44px;
		height: 44px;
		left: calc(100% + 6px);
	}
}

@media (max-width: 900px) {
	.cards,
	.people {
		grid-template-columns: repeat(2, 1fr);
	}

	.hero-grid,
	.countdown-layout {
		grid-template-columns: 1fr;
	}

	.hero-figure img {
		height: 240px;
	}
}

@media (max-width: 700px) {
	.nav-burger {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
		width: 2.6rem;
		height: 2.6rem;
		cursor: pointer;
	}

	.nav-burger span,
	.nav-burger span::before,
	.nav-burger span::after {
		display: block;
		width: 1.3rem;
		height: 2px;
		background: var(--forest);
		content: "";
	}

	.nav-burger span {
		position: relative;
	}

	.nav-burger span::before,
	.nav-burger span::after {
		position: absolute;
		left: 0;
	}

	.nav-burger span::before {
		top: -6px;
	}

	.nav-burger span::after {
		top: 6px;
	}

	.nav-toggle {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: 0;
		opacity: 0;
	}

	.site-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.2rem;
		padding: 0.6rem 1rem 1rem;
		background: var(--cream);
		border-bottom: 1px solid var(--line);
	}

	.site-nav a {
		padding: 0.45rem 0;
	}

	.nav-toggle:checked ~ .site-nav {
		display: flex;
	}

	.header-bar {
		position: relative;
	}

	.cards,
	.people {
		grid-template-columns: 1fr;
	}

	.story {
		padding: 1.4rem 1.1rem 0.8rem;
	}
}
