/* Feria de las Aves de Santander
   Paleta y tipografía del manual de identidad. La firma visual son los estratos:
   las curvas de la papelería y la tote del manual, llevadas a toda la página. */

@font-face { font-family: 'Lato'; src: url('../fonts/lato-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Lato'; src: url('../fonts/lato-bold-italic.woff2') format('woff2'); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Lato'; src: url('../fonts/lato-heavy.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }

:root {
	--beige: #ebe2d7;
	--ocre: #cf860d;
	--terracota: #b84218;
	--oliva: #706d20;
	--verde: #393c1c;
	/* Dos derivados para que el texto cumpla contraste sobre ocre, terracota y oliva. */
	--tinta: #23250f;
	--crema: #fff5eb;
	/* Versiones para texto pequeño: el terracota y el ocre del manual no llegan a 4.5:1 en 13 px. */
	--terracota-texto: #a23a14;
	--ocre-claro: #e0a03a;

	--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
	--borde: clamp(16px, 4vw, 64px);
	--arco: clamp(26px, 6vw, 96px);
	--nav: 70px;
	--borde-nav: max(var(--borde), calc((100vw - 1360px) / 2 + var(--borde)));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
	margin: 0;
	background: var(--beige);
	color: var(--verde);
	font: 400 clamp(1rem, 0.96rem + 0.2vw, 1.125rem)/1.6 'Lato', system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}
h1, h2, h3, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }
em { font-style: italic; font-weight: 700; }
strong { font-weight: 800; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ocre); outline-offset: 3px; border-radius: 2px; }

.contenedor { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--borde); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.saltar { position: fixed; top: 8px; left: 8px; z-index: 60; padding: 10px 16px; background: var(--verde); color: var(--crema); transform: translateY(-200%); }
.saltar:focus { transform: none; }

.etiqueta { font-weight: 800; font-size: 0.8125rem; letter-spacing: 0.16em; text-transform: uppercase; }

/* ── Navegación ─────────────────────────────── */
.nav {
	position: fixed; inset: 0 0 auto 0; z-index: 50;
	display: flex; align-items: center; gap: 28px;
	padding: 12px var(--borde-nav);
	min-height: var(--nav);
	color: var(--crema);
	transition: background-color 220ms ease, color 220ms ease, box-shadow 220ms ease;
}
.nav.is-solida { background: var(--beige); color: var(--verde); box-shadow: 0 1px 0 rgba(57, 60, 28, 0.18); }
.nav__marca { position: relative; display: block; width: 52px; height: 46px; flex: none; }
.nav__simbolo { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 220ms ease; }
.nav__simbolo--color { opacity: 0; }
.nav.is-solida .nav__simbolo--color { opacity: 1; }
.nav.is-solida .nav__simbolo--neg { opacity: 0; }
.nav__enlaces { display: flex; gap: 28px; margin-left: auto; font-weight: 800; font-size: 0.9375rem; }
.nav__enlaces a { text-decoration: none; padding: 8px 0; }
.nav__idioma {
	margin-left: 0; min-width: 44px; min-height: 44px; display: grid; place-items: center;
	font-weight: 800; font-size: 0.875rem; letter-spacing: 0.06em; text-decoration: none;
	border: 1.5px solid currentColor; border-radius: 999px;
	transition: transform 160ms var(--ease-out);
}
.nav__idioma:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .nav__enlaces a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; } }
@media (max-width: 719px) { .nav__enlaces { display: none; } .nav__idioma { margin-left: auto; } }

/* ── Hero ───────────────────────────────────── */
.hero {
	position: relative; isolation: isolate; overflow: hidden;
	min-height: max(640px, 100svh);
	display: grid; place-items: center;
	padding: 90px var(--borde) clamp(130px, 24vw, 340px);
	color: var(--crema); text-align: center;
	background: var(--verde);
}
.hero__foto { position: absolute; inset: 0 0 -8% 0; z-index: -2; }
.hero__foto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero__centinela { position: absolute; inset: 0 0 auto 0; height: calc(100% - clamp(120px, 22vw, 330px) - var(--nav)); pointer-events: none; }
.hero__velo {
	position: absolute; inset: 0; z-index: -1;
	background:
		radial-gradient(62% 44% at 50% 42%, rgba(35, 37, 15, 0.5), rgba(35, 37, 15, 0) 100%),
		linear-gradient(180deg, rgba(35, 37, 15, 0.52) 0%, rgba(35, 37, 15, 0.12) 34%, rgba(35, 37, 15, 0.12) 70%, rgba(35, 37, 15, 0.3) 100%);
}
.hero__contenido { display: grid; justify-items: center; gap: clamp(14px, 2vw, 22px); }
.hero__logo { width: clamp(220px, 27vw, 390px); }
.hero__logo img { width: 100%; height: auto; }
.hero__lema { font-style: italic; font-weight: 700; font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem); line-height: 1.2; }
.hero__edicion { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; font-weight: 800; font-size: 0.8125rem; letter-spacing: 0.16em; text-transform: uppercase; }
.hero__edicion span + span::before { content: '·'; margin-inline: 0.7em; }
/* En pantallas angostas la fecha va en su propia línea, sin el punto delante. */
@media (max-width: 599px) { .hero__edicion span:last-child { flex-basis: 100%; } .hero__edicion span:last-child::before { content: none; } }

.estratos-hero { position: absolute; inset: auto 0 0 0; height: clamp(120px, 22vw, 330px); z-index: 1; pointer-events: none; }
.capa { position: absolute; inset: 0; }
.capa svg { width: 100%; height: 100%; }
.capa--ocre path { fill: var(--ocre); }
.capa--terracota path { fill: var(--terracota); }
.capa--oliva path { fill: var(--oliva); }
.capa--verde path { fill: var(--verde); }
.capa--beige path { fill: var(--beige); }
.capa--beige { bottom: -1px; }

/* Entrada: solo la primera vez que se abre la página. */
@media (prefers-reduced-motion: no-preference) {
	.js .hero__foto img { animation: foto 1800ms var(--ease-out) both; }
	.js .hero__contenido > * { animation: subir 800ms var(--ease-out) both; }
	.js .hero__lema { animation-delay: 120ms; }
	.js .hero__edicion { animation-delay: 220ms; }
	.js .capa svg { animation: capa 1000ms var(--ease-out) both; animation-delay: calc(80ms * (4 - var(--i))); }
	@keyframes foto { from { transform: scale(1.06); } to { transform: none; } }
	@keyframes subir { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
	@keyframes capa { from { transform: translateY(16%); } to { transform: none; } }
}

/* ── La feria ───────────────────────────────── */
.feria { padding-block: clamp(44px, 5vw, 72px) clamp(56px, 6vw, 88px); }
.feria__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(16px, 2vw, 32px); row-gap: clamp(20px, 2.4vw, 32px); }
.feria .etiqueta { grid-column: 1 / -1; color: var(--terracota-texto); }
.feria__titulo { grid-column: 1 / -1; font-weight: 400; font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2.25rem); line-height: 1.2; color: var(--verde); text-wrap: balance; }
.feria__titulo em { color: var(--terracota); }
.feria__texto { grid-column: 7 / -1; display: grid; gap: 1em; }
.datos { grid-column: 1 / 6; grid-row: 3; display: grid; gap: 22px; align-self: start; }
.datos dt { font-weight: 800; font-size: 0.8125rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--terracota-texto); margin-bottom: 4px; }
.datos dd { font-size: 1.0625rem; line-height: 1.45; }
@media (max-width: 859px) {
	.feria__texto, .datos { grid-column: 1 / -1; grid-row: auto; }
}

/* ── Programa: estratos que se apilan al bajar ─ */
.programa { position: relative; }
.estrato {
	position: sticky; top: var(--nav);
	min-height: clamp(250px, 42svh, 420px);
	padding-block: clamp(44px, 5vw, 76px) calc(var(--arco) + 24px);
	border-radius: 50% 50% 0 0 / var(--arco) var(--arco) 0 0;
	overflow: hidden;
}
/* Cada banda se monta sobre la anterior para que sus esquinas curvas no dejen ver el fondo. */
.estrato + .estrato { margin-top: calc(var(--arco) * -1); }
.estrato--verde { min-height: 0; padding-bottom: 20px; }
.estrato::after {
	content: ''; position: absolute; z-index: 0; pointer-events: none;
	right: -2vw; bottom: -4vw; width: clamp(200px, 32vw, 500px); aspect-ratio: 120 / 106;
	background: url('../img/simbolo-neg.svg?v=d594a5faf0') center / contain no-repeat;
	opacity: 0.09;
}
.estrato--terracota::after { right: auto; left: -2vw; transform: scaleX(-1); }
.estrato--verde::after { content: none; }
.estrato__dentro { position: relative; z-index: 1; display: grid; gap: 12px; }
.estrato__titulo { font-style: italic; font-weight: 700; font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.5rem); line-height: 1.15; text-wrap: balance; }
.estrato__texto { max-width: 34em; line-height: 1.5; }
.estrato--ocre { background: var(--ocre); color: var(--tinta); }
.estrato--terracota { background: var(--terracota); color: var(--crema); }
.estrato--oliva { background: var(--oliva); color: var(--crema); }
.estrato--verde { background: var(--verde); color: var(--beige); }
.estrato--terracota .estrato__dentro { justify-items: end; text-align: right; }
.estrato--verde .estrato__dentro { justify-items: end; text-align: right; }

/* ── El ave ─────────────────────────────────── */
.ave { position: relative; z-index: 1; background: var(--verde); color: var(--beige); padding-block: clamp(24px, 3vw, 44px) clamp(44px, 5vw, 72px); overflow: hidden; }
.ave__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; }
.colibri { will-change: transform; width: min(100%, 440px); justify-self: center; }
.colibri__svg { width: 100%; height: auto; overflow: visible; }
.ave .etiqueta { color: var(--ocre-claro); }
.ave__texto { display: grid; gap: 16px; }
.ave__titulo { font-weight: 400; font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2.25rem); line-height: 1.2; text-wrap: balance; }
.ave__cientifico { font-style: italic; font-weight: 700; color: var(--ocre-claro); font-size: 1.1875rem; }
.ave__p { max-width: 32em; }
@media (prefers-reduced-motion: no-preference) {
	.colibri__flota { animation: flotar 2600ms ease-in-out infinite alternate; }
	.colibri__ala { transform-origin: 69px 36px; animation: aletear 130ms ease-in-out infinite alternate; }
	.ave:not(.is-visible) .colibri__flota, .ave:not(.is-visible) .colibri__ala { animation-play-state: paused; }
	@keyframes flotar { from { transform: translateY(-1.2%); } to { transform: translateY(1.2%); } }
	@keyframes aletear { from { transform: rotate(-3.5deg); } to { transform: rotate(3deg); } }
}
@media (max-width: 759px) {
	.ave__grid { grid-template-columns: 1fr; }
	.colibri { width: min(78%, 360px); }
}

/* ── Topocoro ───────────────────────────────── */
.lugar {
	position: relative; isolation: isolate; overflow: hidden;
	min-height: clamp(520px, 90svh, 860px);
	display: flex; align-items: flex-end;
	padding-block: clamp(120px, 18vw, 260px) calc(var(--arco) + clamp(56px, 7vw, 110px));
	color: var(--crema); background: var(--verde);
}
.lugar__foto { position: absolute; inset: -12% 0 -12% 0; z-index: -2; }
.lugar__foto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.lugar__velo { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--verde) 0%, rgba(57, 60, 28, 0.3) 26%, rgba(35, 37, 15, 0.42) 56%, rgba(35, 37, 15, 0.82) 100%); }
.lugar__dentro { display: grid; gap: 16px; }
.lugar .etiqueta { color: var(--crema); }
.lugar__titulo { font-style: italic; font-weight: 700; font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.5rem); line-height: 1.15; }
.lugar__p { max-width: 30em; line-height: 1.5; }
.huella { max-width: 30em; margin-top: clamp(14px, 2vw, 28px); padding-top: 18px; border-top: 1.5px solid rgba(255, 245, 235, 0.5); }
.huella h3 { font-weight: 800; font-size: 0.8125rem; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 6px; }

/* ── Quiénes ────────────────────────────────── */
.org {
	position: relative; z-index: 1; background: var(--beige);
	margin-top: calc(var(--arco) * -1);
	border-radius: 50% 50% 0 0 / var(--arco) var(--arco) 0 0;
	padding-block: clamp(48px, 6vw, 84px) clamp(48px, 6vw, 84px);
}
.org .etiqueta { color: var(--terracota-texto); margin-bottom: 16px; }
.org__lista li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 4px 24px; align-items: baseline; padding-block: 12px; border-top: 1.5px solid rgba(57, 60, 28, 0.28); }
.org__lista li:last-child { border-bottom: 1.5px solid rgba(57, 60, 28, 0.28); }
.org__lista strong { font-size: 1.0625rem; line-height: 1.4; }
.org__lista span { font-size: 1rem; line-height: 1.4; }
.org__segunda { margin-top: clamp(40px, 5vw, 64px); }
.anfitriones a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .anfitriones a:hover { text-decoration: underline; text-underline-offset: 4px; } }
@media (max-width: 719px) { .org__lista li { grid-template-columns: 1fr; } }

/* ── Contacto y pie ─────────────────────────── */
.contacto {
	position: relative; z-index: 1; background: var(--terracota); color: var(--crema);
	border-radius: 50% 50% 0 0 / var(--arco) var(--arco) 0 0;
	padding-block: clamp(52px, 6vw, 84px) calc(var(--arco) + clamp(44px, 5vw, 72px));
}
.contacto__dentro { display: grid; gap: clamp(18px, 2.4vw, 32px); justify-items: center; text-align: center; }
.contacto__titulo { font-style: italic; font-weight: 700; font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.5rem); line-height: 1.15; }
.contacto__p { max-width: 34em; text-wrap: pretty; }
.contacto__botones { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.boton {
	display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 24px;
	border: 2px solid var(--crema); border-radius: 999px; color: var(--crema);
	font-weight: 800; font-size: 0.9375rem; text-decoration: none;
	transition: background-color 180ms ease, color 180ms ease, transform 160ms var(--ease-out);
}
.boton--lleno { background: var(--crema); color: var(--terracota); }
.boton:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
	.boton:hover { background: var(--crema); color: var(--terracota); }
	.boton--lleno:hover { background: var(--verde); border-color: var(--verde); color: var(--crema); }
}
.cierre { max-width: 26em; margin-top: clamp(28px, 4vw, 56px); font-size: clamp(1.125rem, 1rem + 0.8vw, 1.75rem); line-height: 1.35; text-wrap: balance; }

.pie {
	position: relative; z-index: 2; background: var(--verde); color: var(--beige);
	margin-top: calc(var(--arco) * -1);
	border-radius: 50% 50% 0 0 / var(--arco) var(--arco) 0 0;
	padding: clamp(56px, 7vw, 100px) var(--borde) 40px;
	display: grid; justify-items: center; gap: 26px; text-align: center;
}
.pie__logo { width: clamp(150px, 14vw, 190px); height: auto; }
.pie__datos { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 26px; font-size: 0.9375rem; overflow-wrap: anywhere; }
.pie__datos a { text-underline-offset: 4px; }

/* ── Aparición al bajar ─────────────────────── */
@media (prefers-reduced-motion: no-preference) {
	.js .r { opacity: 0; transform: translateY(14px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
	.js .r.is-visible { opacity: 1; transform: none; }
}
