/* ══════════════════════════════════════════════════════
   Palline di Natale — campaign page (content/pages/palline-di-natale.html).
   Only what blocks can't do: the hero ([ali_palline_hero], includes/
   palline-hero.php — baubles drawn by the xmas-baubles renderer) and the
   frame around the [xmas_baubles] configurator. Every other section is an
   ali-block; the configurator is themed by the --xb-* tokens in ali-base.css.
   Enqueued only where ali_is_palline_page() finds the hero.
   ══════════════════════════════════════════════════════ */

/* ── Hero: night-navy band, baubles hanging from the top edge ── */
.palline-hero {
	position: relative;
	overflow: hidden;
	background: var(--ali-navy);
	color: #fff;
	padding: 0 16px 3.5rem;
	display: grid;
	gap: 1.5rem;
}

/* A 560×410 stage; each bauble is placed in percentages of it. The mobile
   header row overlays the top 80px: the strings run behind it. */
.palline-hero__art {
	position: relative;
	width: min(100%, 440px);
	margin: 72px auto 0;
	aspect-ratio: 560 / 410;
}
.palline-hero__b { position: absolute; }
.palline-hero__b svg { display: block; width: 100%; height: auto; overflow: visible; }
.palline-hero__b--1 { left: 1.8%; top: 31.7%; width: 29.3%; }
.palline-hero__b--2 { left: 33%; top: 9.8%; width: 37.5%; }
.palline-hero__b--3 { left: 71.4%; top: 51.2%; width: 26.4%; }
/* Ribbon up to the top edge (clipped by the hero), meeting the bow's loop. */
.palline-hero__b::before {
	content: "";
	position: absolute;
	left: calc(50% - 1px);
	bottom: 97%;
	width: 2px;
	height: 600px;
	background: #b3122a;
}

/* One moment of motion: the middle bauble sways twice and stops (4.8 s, under
   the 5 s after which WCAG 2.2.2 would require a pause control). */
.palline-hero__b--2 {
	transform-origin: 50% -200px;
	animation: palline-sway 2.4s ease-in-out 2;
}
@keyframes palline-sway {
	0%, 100% { transform: rotate(0); }
	25% { transform: rotate(-1.6deg); }
	75% { transform: rotate(1.6deg); }
}
@media (prefers-reduced-motion: reduce) {
	.palline-hero__b--2 { animation: none; }
}

.palline-hero__text { width: 100%; max-width: 34rem; margin: 0 auto; }
.palline-hero__kicker {
	margin: 0 0 .6rem;
	font-size: .85rem;
	font-weight: 600;
	color: var(--ali-teal-light); /* 8.0:1 on navy */
}
.palline-hero h1 {
	margin: 0 0 1.1rem;
	font-family: 'DM Serif Display', Georgia, serif;
	font-weight: 400;
	font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.5rem);
	line-height: 1.08;
	color: #fff;
	text-wrap: balance;
}
.palline-hero__lead {
	margin: 0 0 .8rem;
	font-size: 1rem;
	line-height: 1.65;
	color: rgba(255, 255, 255, .9);
}
.palline-hero__terms { margin: 0 0 1.4rem; font-size: .88rem; color: rgba(255, 255, 255, .78); }

/* The deadline: a quiet outlined pill, level with the text. */
.palline-hero__tag { margin: 0 0 1.6rem; }
.palline-hero__tag span {
	display: inline-block;
	padding: .4rem .95rem;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 999px;
	background: rgba(255, 255, 255, .06);
	color: #fff;
	font-size: .88rem;
	font-weight: 500;
}
.palline-hero__tag span::before {
	content: "";
	display: inline-block;
	margin-right: .55rem;
	vertical-align: .08em;
	width: .45rem;
	height: .45rem;
	border-radius: 50%;
	background: var(--ali-teal-light);
}

.palline-hero__ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; }
.palline-hero__ctas .ali-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

@media (min-width: 900px) {
	.palline-hero {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		align-items: center;
		gap: 3rem;
		max-width: none;
		padding: 0 max(40px, calc((100% - 1140px) / 2)) 4.5rem;
		min-height: 560px;
	}
	.palline-hero__text { order: -1; margin: 0; padding-top: 4rem; }
	.palline-hero__art { width: 100%; max-width: 600px; margin: 0; align-self: start; }
}

/* ── Configurator frame (#crea) ── */
.palline-crea {
	background: #fff;
	padding: 3.5rem 16px 4rem;
	scroll-margin-top: 1rem;
}
@media (min-width: 1024px) {
	.palline-crea { padding: 5rem 40px; scroll-margin-top: 72px; /* clears the sticky topbar */ }
}
.palline-crea > .xb { max-width: 1140px; margin: 0 auto; }

/* Transparency facts (ali/content-block body) */
.palline-facts { margin: 0; }
.palline-facts dt { font-weight: 700; margin-top: 1rem; }
.palline-facts dt:first-child { margin-top: 0; }
.palline-facts dd { margin: .2rem 0 0; }

/* The plugin's compact transparency line: its `.xb-info > :first-child`
   heading rule also catches the link (the line's only element child), and
   the global link colour is the teal fill (2.73:1). Keep it body text, ink teal. */
.palline-crea .xb-info--compact a {
	font: inherit;
	color: var(--ali-teal-text);
	text-decoration: underline;
}
