/* Portada d'accés · educAAlergicus (intro, escena amb el formulari i «Web en preparació») */
.camp-ap-pagina { padding: 0 !important; }
.camp-ap-portada { max-width: none !important; width: 100%; margin: 0 !important; color: #4A3732; font-family: var(--wp--preset--font-family--nunito, Nunito, system-ui, sans-serif); }
.camp-ap-portada h1, .camp-ap-portada h2, .camp-ap-portada p { margin: 0; }

/* ---------- Escena de la portada amb el formulari ---------- */
.camp-ap-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	min-height: max(100vh, 640px);
	min-height: max(100svh, 640px);
	background: #DCE9EF;
	box-sizing: border-box;
	padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 5vw, 4rem) clamp(9rem, 14vw, 12rem);
	display: flex;
	align-items: center;
}
.camp-ap-hero__escena { position: absolute; inset: 0; z-index: 0; }
.camp-ap-hero__escena svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.camp-ap-hero__escena .camp-escena__svg--mobil { display: none; }
.camp-ap-hero .camp-parada, .camp-ap-hero .camp-parada text { cursor: default; }
.camp-ap-hero__capa { position: relative; z-index: 1; width: 100%; max-width: 32rem; display: grid; gap: 0.8rem; }
/* Formulari més compacte sobre l'escena, perquè es vegi el camí */
.camp-ap-hero .camp-ap__form { gap: 0.8rem; padding: clamp(1.1rem, 3vw, 1.5rem); }
.camp-ap-hero .camp-ap input[type="text"], .camp-ap-hero .camp-ap input[type="password"] { min-height: 2.75rem; padding-block: 0.5rem; }
.camp-ap-hero .camp-ap__fila { row-gap: 0; }
.camp-ap-hero__logo img { display: block; width: 200px; height: auto; }
.camp-ap-hero__avantitol { margin-top: 1rem !important; font-size: 0.875rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #9C4F42; }
.camp-ap-hero__titol { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
.camp-ap-hero__entrada { font-size: 1.125rem; line-height: 1.5; }
.camp-ap-hero .camp-ap { margin-top: 0.4rem; }
@media (max-width: 1099px) {
	.camp-ap-hero { display: block; min-height: 0; padding-bottom: calc(58vw + 1rem); }
	.camp-ap-hero__escena .camp-escena__svg--escriptori { display: none; }
	.camp-ap-hero__escena .camp-escena__svg--mobil { display: block; }
	.camp-ap-hero__capa { max-width: 34rem; margin: 0 auto; }
}

/* ---------- Web en preparació ---------- */
.camp-ap-prep {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: clamp(1.5rem, 4vw, 3.5rem);
	padding: clamp(3rem, 8vw, 5.5rem) clamp(1rem, 5vw, 4rem);
	background: #FBF5F1;
}
.camp-ap-prep__il { flex: 0 1 240px; }
.camp-ap-prep__il svg { display: block; width: 100%; height: auto; overflow: visible; }
.camp-ap-prep__text { flex: 0 1 26rem; display: grid; gap: 0.6rem; }
.camp-ap-prep__text h2 { color: #4A3732; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); font-weight: 900; letter-spacing: -0.01em; }
.camp-ap-prep__text p { font-size: 1.125rem; line-height: 1.55; color: #6E5650; }
@media (max-width: 599px) { .camp-ap-prep { text-align: center; } }

@media (prefers-reduced-motion: no-preference) {
	.camp-mobil__cos { animation: cap-sura 4s ease-in-out infinite; transform-origin: 120px 100px; }
	.camp-mobil__cami { animation: cap-flux 1.2s linear infinite; }
	.camp-mobil__punt { transform-box: fill-box; transform-origin: center; animation: cap-punt 3.2s ease-in-out infinite; animation-delay: calc(var(--n) * 0.35s); }
	.camp-mobil__barra { transform-box: fill-box; transform-origin: left center; animation: cap-barra 3.2s ease-in-out infinite; }
	.camp-mobil__arc { animation: cap-cadenat 3.2s ease-in-out infinite; }
	.camp-mobil__cadenat { transform-box: fill-box; transform-origin: center; animation: cap-salt 3.2s ease-in-out infinite; }
}
@keyframes cap-sura { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes cap-flux { to { stroke-dashoffset: -18; } }
@keyframes cap-punt { 0%, 8% { transform: scale(0); } 18%, 78% { transform: scale(1); } 22% { transform: scale(1.3); } 90%, 100% { transform: scale(0); } }
@keyframes cap-barra { 0%, 10% { transform: scaleX(0.15); } 60%, 100% { transform: scaleX(1); } }
@keyframes cap-cadenat { 0%, 55% { transform: translateY(0); } 65%, 90% { transform: translateY(-6px); } 100% { transform: translateY(0); } }
@keyframes cap-salt { 0%, 55%, 100% { transform: scale(1); } 62% { transform: scale(1.12); } 70% { transform: scale(1); } }

/* ---------- Intro (≈5 s) ---------- */
.camp-intro { display: none; }
.camp-ap-intro .camp-intro {
	display: grid;
	place-items: center;
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: #FBF5F1;
	animation: ci-fora 0.8s cubic-bezier(0.7, 0, 0.3, 1) 4.4s forwards;
}
/* Franges de cinema */
.camp-ap-intro .camp-intro::before, .camp-ap-intro .camp-intro::after {
	content: ""; position: absolute; left: 0; right: 0; height: 11vh; background: #4A3732; z-index: 2;
	animation: ci-franja 0.7s cubic-bezier(0.7, 0, 0.3, 1) 4.1s forwards;
}
.camp-ap-intro .camp-intro::before { top: 0; }
.camp-ap-intro .camp-intro::after { bottom: 0; --ci-dir: 1; }
.camp-intro__escena { position: relative; width: min(82vw, 640px); text-align: center; animation: ci-apropa 4.6s cubic-bezier(0.3, 0, 0.2, 1) both; }
.camp-intro__logo { display: block; width: 100%; height: auto; overflow: visible; }
.camp-intro__logo .l-educ { animation: ci-esq 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.45s both; }
.camp-intro__logo .l-lergicus { animation: ci-dre 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.8s both; }
.camp-intro__logo .l-a1 { animation: ci-cau 0.7s cubic-bezier(0.3, 1.5, 0.5, 1) 1.55s both; }
.camp-intro__logo .l-a2 { animation: ci-cau 0.7s cubic-bezier(0.3, 1.5, 0.5, 1) 1.85s both; }
.camp-intro__logo .l-somriure { stroke-dasharray: 1; animation: ci-traca 0.6s ease-out 2.5s both; }
.camp-intro__lema { margin-top: 1.25rem !important; font-size: clamp(1rem, 0.8rem + 1vw, 1.375rem); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #9C4F42; animation: ci-lema 0.6s ease 3.1s both; }
/* Lluentor que travessa el logotip */
.camp-intro__escena::after {
	content: ""; position: absolute; top: -10%; bottom: -10%; width: 22%; left: -30%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.75), transparent);
	transform: skewX(-18deg); pointer-events: none;
	opacity: 0;
	animation: ci-llum 0.9s ease-in-out 3.3s both;
}
.camp-intro__salta {
	position: absolute; right: 1.25rem; bottom: calc(11vh + 1rem); z-index: 3;
	min-height: 2.75rem; padding: 0.4rem 1rem; border: 1.5px solid #C9B3B0; border-radius: 999px;
	background: rgba(255, 255, 255, 0.8); font: inherit; font-size: 0.9375rem; font-weight: 800; color: #4A3732; cursor: pointer;
	animation: ci-lema 0.4s ease 0.6s both;
}
.camp-intro.is-tancada { animation: ci-fora 0.35s ease forwards !important; }
/* La portada entra quan acaba la intro */
.camp-ap-intro .camp-ap-hero__capa > * { animation: ci-entra 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(4.7s + var(--i, 0) * 0.08s); }
.camp-ap-intro .camp-ap-hero__capa > :nth-child(2) { --i: 1; }
.camp-ap-intro .camp-ap-hero__capa > :nth-child(3) { --i: 2; }
.camp-ap-intro .camp-ap-hero__capa > :nth-child(4) { --i: 3; }
.camp-ap-intro .camp-ap-hero__capa > :nth-child(5) { --i: 4; }

@keyframes ci-esq { from { opacity: 0; transform: translateX(-700px); } to { opacity: 1; transform: none; } }
@keyframes ci-dre { from { opacity: 0; transform: translateX(700px); } to { opacity: 1; transform: none; } }
@keyframes ci-cau { from { opacity: 0; transform: translateY(-1400px) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes ci-traca { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ci-lema { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes ci-llum { 0% { left: -30%; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: 120%; opacity: 0; } }
@keyframes ci-apropa { from { transform: scale(0.94); } to { transform: scale(1.04); } }
@keyframes ci-franja { to { transform: scaleY(0); } }
@keyframes ci-fora { to { opacity: 0; visibility: hidden; } }
@keyframes ci-entra { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.camp-ap-intro .camp-intro::before { transform-origin: top; }
.camp-ap-intro .camp-intro::after { transform-origin: bottom; }
