/* ==========================================================================
   BMX Christmas — estilos
   Idea: la portada es una placa de dorsal de BMX gigante (amarillo de carrera)
   sobre verde abeto. El resto de la web es sobrio para que la placa mande.
   ========================================================================== */

:root {
	--pine: #0e3a2c;
	--pine-2: #164a39;
	--snow: #f3f6f4;
	--frost: #dce7e2;
	--plate: #f7c925;
	--candy: #d62839;
	--ink: #142019;
	--muted: #4d5e56;

	--font-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
	--font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;

	--wrap: 72rem;
	--gutter: clamp(1.25rem, 4vw, 2.5rem);
	--section: clamp(4rem, 9vw, 7rem);
	--radius-plate: 2.2rem;
	--radius-s: 0.5rem;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
	margin: 0;
	background: var(--snow);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; }
a:hover { color: var(--candy); }

:focus-visible { outline: 3px solid var(--plate); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 900; line-height: 0.95; margin: 0; }

p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

.skip-link {
	position: absolute; left: 1rem; top: -4rem; z-index: 100;
	background: var(--plate); color: var(--ink); padding: 0.6rem 1rem; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* Botones ------------------------------------------------------------------ */

.button {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 3rem; padding: 0.7rem 1.5rem;
	font-family: var(--font-display); font-weight: 900; font-size: 1.35rem; letter-spacing: 0.01em;
	text-decoration: none; border-radius: 999px; border: 2px solid transparent;
	transition: transform 0.15s ease, background-color 0.15s ease;
}
.button:active { transform: translateY(1px); }
.button--plate { background: var(--plate); color: var(--ink); }
.button--plate:hover { background: #ffd84a; color: var(--ink); }
.button--ghost { border-color: currentColor; color: #fff; }
.button--ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* Cabecera ----------------------------------------------------------------- */

.site-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--pine); color: #fff;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }

.site-brand__name {
	font-family: var(--font-display); font-weight: 900; font-size: 1.6rem;
	text-decoration: none; color: #fff;
}
.site-brand__name:hover { color: var(--plate); }
.site-brand .custom-logo { max-height: 3rem; width: auto; }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav .menu { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-nav .menu a { text-decoration: none; font-weight: 500; font-size: 0.98rem; }
.site-nav .menu a:hover { color: var(--plate); }
.site-nav__cta { min-height: 2.5rem; font-size: 1.15rem; padding-block: 0.4rem; }

.nav-toggle { display: none; }

@media (max-width: 860px) {
	.nav-toggle {
		display: inline-flex; align-items: center; justify-content: center;
		width: 3rem; height: 3rem; background: none; border: 0; color: #fff; cursor: pointer;
	}
	.nav-toggle__bars,
	.nav-toggle__bars::before,
	.nav-toggle__bars::after {
		display: block; width: 1.5rem; height: 2px; background: currentColor; position: relative;
		transition: transform 0.2s ease;
	}
	.nav-toggle__bars::before,
	.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
	.nav-toggle__bars::before { top: -7px; }
	.nav-toggle__bars::after { top: 7px; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

	.site-nav {
		position: absolute; top: 100%; left: 0; right: 0;
		flex-direction: column; align-items: stretch; gap: 0;
		background: var(--pine); padding: 0.5rem var(--gutter) 1.5rem;
		border-bottom: 1px solid rgba(255, 255, 255, 0.08);
		display: none;
	}
	.site-nav.is-open { display: flex; }
	.site-nav .menu { flex-direction: column; gap: 0; }
	.site-nav .menu a { display: block; padding: 0.85rem 0; font-size: 1.1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
	.site-nav__cta { margin-top: 1.25rem; }
}

/* Portada ------------------------------------------------------------------ */

.hero {
	position: relative; overflow: hidden;
	background: var(--pine); color: #fff;
	padding-block: clamp(3rem, 8vw, 6rem) clamp(4rem, 9vw, 7rem);
}
/* Nieve: puntos fijos, sin animación */
.hero__snow {
	position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
	background-image:
		radial-gradient(circle, rgba(255,255,255,.55) 1.2px, transparent 1.6px),
		radial-gradient(circle, rgba(255,255,255,.35) 1px, transparent 1.4px);
	background-size: 64px 64px, 37px 37px;
	background-position: 0 0, 19px 23px;
	-webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
	        mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}

.hero__inner {
	position: relative;
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
	gap: clamp(2rem, 6vw, 5rem); align-items: center;
}

.hero__date {
	font-family: var(--font-display); font-weight: 900;
	font-size: clamp(2.6rem, 5.5vw, 4.2rem); line-height: 0.95; margin-bottom: 0.9rem;
}
.hero__date time { display: block; }
.hero__time { display: block; color: var(--plate); font-size: 0.55em; margin-top: 0.35rem; }

.hero__venue { display: flex; align-items: center; gap: 0.4rem; font-size: 1.15rem; font-weight: 500; }
.hero__venue .icon { width: 1.2rem; height: 1.2rem; color: var(--plate); flex: none; }
.hero__venue a { text-decoration-color: rgba(255,255,255,.4); }
.hero__venue a:hover { color: var(--plate); }

.hero__tagline { max-width: 34ch; font-size: 1.15rem; color: rgba(255, 255, 255, 0.82); margin-top: 1.5rem; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* La placa */
.hero__plate-wrap { display: flex; flex-direction: column; align-items: center; }

.plate {
	position: relative;
	width: 100%; max-width: 34rem; aspect-ratio: 1.32;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	background: var(--plate); color: var(--ink);
	border-radius: 46% 46% var(--radius-plate) var(--radius-plate) / 26% 26% var(--radius-plate) var(--radius-plate);
	box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.12), 0 30px 60px -20px rgba(0, 0, 0, 0.55);
	transform: rotate(-4deg);
	transform-origin: 50% 0;
	animation: plate-hang 1.4s cubic-bezier(.3,.7,.3,1) both;
	padding: 12% 6% 6%;
}
.plate__bolt {
	position: absolute; top: 9%; width: 4.5%; aspect-ratio: 1; border-radius: 50%;
	background: var(--pine); box-shadow: inset 0 2px 0 rgba(0,0,0,.35);
}
.plate__bolt--l { left: 20%; }
.plate__bolt--r { right: 20%; }
.plate__title {
	font-family: var(--font-display); font-weight: 900; color: var(--candy);
	font-size: clamp(1.4rem, 3.4vw, 2.5rem); line-height: 1;
	letter-spacing: 0.01em; text-align: center; margin-bottom: 0.15em;
}
.plate__number {
	font-family: var(--font-display); font-weight: 900;
	font-size: clamp(6rem, 17vw, 13.5rem); line-height: 0.82; letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}

@keyframes plate-hang {
	0%   { transform: translateY(-60px) rotate(-16deg); opacity: 0; }
	45%  { transform: translateY(0) rotate(3deg); opacity: 1; }
	70%  { transform: rotate(-6deg); }
	100% { transform: rotate(-4deg); }
}

/* Cuenta atrás */
.countdown { margin-top: 2.25rem; text-align: center; }
.countdown__label { margin: 0 0 0.25rem; color: rgba(255,255,255,.7); font-size: 0.95rem; }
.countdown__units { display: flex; gap: clamp(1rem, 3vw, 2rem); list-style: none; margin: 0; padding: 0; justify-content: center; }
.countdown__units li { display: flex; flex-direction: column; align-items: center; min-width: 3.5rem; }
.countdown__num {
	font-family: var(--font-display); font-weight: 900; font-size: clamp(2.2rem, 4.5vw, 3rem);
	line-height: 1; font-variant-numeric: tabular-nums;
}
.countdown__unit { font-size: 0.85rem; color: rgba(255,255,255,.7); }
.countdown__live { font-family: var(--font-display); font-weight: 900; font-size: 2rem; color: var(--plate); }

@media (max-width: 860px) {
	.hero__inner { grid-template-columns: 1fr; }
	.hero__plate-wrap { order: -1; }
	.plate { max-width: 24rem; }
}

/* Secciones ---------------------------------------------------------------- */

.section { padding-block: var(--section); }
.section__title { font-size: clamp(2.8rem, 7vw, 4.75rem); margin-bottom: 0.5rem; }
.section__sub { color: var(--muted); font-size: 1.1rem; margin-bottom: 2.5rem; }
.section__title + .photo-grid,
.section__title + .videos,
.section__title + .editions { margin-top: 2.5rem; }
.section__more { margin: 2rem 0 0; font-weight: 700; }
/* Dos secciones seguidas con el mismo fondo no duplican el espacio */
.section--info + .section--editions,
.section--editions + .section--gallery { padding-top: 0; }

/* Info */
.info { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.info__intro { font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.5; max-width: 38ch; margin-top: 1.25rem; }
.info__address { color: var(--muted); }
.info__address a { margin-left: 0.5rem; font-weight: 700; color: var(--ink); }
.info__facts { margin: 0; display: grid; gap: 0; border-top: 3px solid var(--ink); }
.info__fact { padding: 1.25rem 0; border-bottom: 1px solid var(--frost); }
.info__fact dt { font-family: var(--font-display); font-weight: 900; font-size: 1.75rem; line-height: 1; margin-bottom: 0.35rem; }
.info__fact dd { margin: 0; color: var(--muted); max-width: 40ch; }

@media (max-width: 760px) { .info { grid-template-columns: 1fr; } }

/* Agenda */
.section--agenda { background: #fff; border-block: 1px solid var(--frost); }
.timeline { list-style: none; margin: 0; padding: 0; max-width: 52rem; }
.timeline__item {
	display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1.5rem;
	padding-block: 1.4rem; border-top: 1px solid var(--frost);
}
.timeline__item:last-child { border-bottom: 1px solid var(--frost); }
.timeline__time { margin: 0; }
.timeline__time time {
	display: block; font-family: var(--font-display); font-weight: 900; font-size: 2.4rem; line-height: 1;
	font-variant-numeric: tabular-nums; color: var(--candy);
}
.timeline__end { font-size: 0.9rem; color: var(--muted); }
.timeline__title { font-family: var(--font-body); font-weight: 700; font-size: 1.25rem; line-height: 1.3; margin-bottom: 0.25rem; }
.timeline__desc { margin: 0; color: var(--muted); max-width: 55ch; }
.timeline__place {
	display: inline-block; margin: 0.6rem 0 0; padding: 0.15rem 0.6rem; font-size: 0.85rem; font-weight: 500;
	background: var(--snow); border: 1px solid var(--frost); border-radius: 999px;
}

@media (max-width: 560px) {
	.timeline__item { grid-template-columns: 1fr; gap: 0.4rem; }
	.timeline__time { display: flex; align-items: baseline; gap: 0.6rem; }
}

/* Ediciones */
.editions { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.edition__link {
	display: grid; grid-template-columns: 9rem 14rem minmax(0, 1fr); gap: clamp(1rem, 3vw, 2.25rem);
	align-items: center; padding-block: 1.5rem; text-decoration: none;
	border-bottom: 1px solid var(--frost);
}
.edition__year {
	font-family: var(--font-display); font-weight: 900; font-size: clamp(3rem, 6vw, 4.5rem); line-height: 0.9;
	font-variant-numeric: tabular-nums;
}
.edition__media { display: block; aspect-ratio: 10 / 7; background: var(--frost); border-radius: var(--radius-s); overflow: hidden; }
.edition__media img { width: 100%; height: 100%; object-fit: cover; }
.edition__text { display: flex; flex-direction: column; gap: 0.3rem; }
.edition__title { font-weight: 700; font-size: 1.2rem; }
.edition__highlight { color: var(--candy); font-weight: 700; }
.edition__excerpt { color: var(--muted); max-width: 55ch; }
.edition__link:hover .edition__year { color: var(--candy); }
.edition__link:hover .edition__title { text-decoration: underline; }

@media (max-width: 760px) {
	.edition__link { grid-template-columns: 1fr 1.4fr; }
	.edition__text { grid-column: 1 / -1; }
}

/* Galería */
.photo-grid {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
	gap: 0.5rem;
}
.photo-grid__item a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 4px; background: var(--frost); }
.photo-grid__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.photo-grid__item a:hover img { transform: scale(1.04); }

/* Lightbox */
.lightbox {
	position: fixed; inset: 0; z-index: 200; display: none;
	background: rgba(8, 20, 15, 0.94); color: #fff;
	align-items: center; justify-content: center; padding: 4rem 1rem;
}
.lightbox.is-open { display: flex; }
.lightbox figure { margin: 0; max-width: min(90vw, 1400px); display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-height: 80vh; width: auto; border-radius: 4px; }
.lightbox figcaption { margin-top: 0.75rem; text-align: center; color: rgba(255,255,255,.8); }
.lightbox button {
	position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; cursor: pointer;
	width: 3rem; height: 3rem; border-radius: 50%; font-size: 1.6rem; line-height: 1;
}
.lightbox button:hover { background: var(--plate); color: var(--ink); }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* Vídeos */
.section--videos { background: var(--pine); color: #fff; }
.section--videos a:hover { color: var(--plate); }
.videos {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 2rem 1.5rem;
}
.video__trigger, .video__frame {
	position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0;
	background: #000; border-radius: var(--radius-s); overflow: hidden; cursor: pointer;
}
.video__trigger img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: opacity 0.2s; }
.video__trigger:hover img { opacity: 1; }
.video__play {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	width: 4.25rem; height: 4.25rem; border-radius: 50%; background: var(--plate); color: var(--ink);
	display: flex; align-items: center; justify-content: center;
}
.video__play .icon { width: 2rem; height: 2rem; margin-left: 4px; }
.video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__title { margin: 0.75rem 0 0; font-weight: 500; }

/* Redes */
.section--social { background: var(--candy); color: #fff; }
.social { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.social__intro p { max-width: 34ch; font-size: 1.15rem; margin-top: 1rem; }
.social__hashtag strong { font-weight: 700; background: var(--plate); color: var(--ink); padding: 0 0.35em; border-radius: 3px; }
.social__list { list-style: none; margin: 0; padding: 0; border-top: 2px solid rgba(255,255,255,.9); }
.social__link {
	display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; align-items: center; gap: 1rem;
	padding-block: 1.1rem; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35);
}
.social__link .icon { width: 1.75rem; height: 1.75rem; }
.social__name { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1; }
.social__handle { font-size: 0.95rem; opacity: 0.85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14rem; }
.social__link:hover { color: var(--plate); }

@media (max-width: 760px) {
	.social { grid-template-columns: 1fr; }
	.social__handle { display: none; }
}

/* Pie ---------------------------------------------------------------------- */

.site-footer { background: var(--ink); color: rgba(255,255,255,.8); padding-block: 3.5rem 2rem; font-size: 0.95rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.site-footer__name { font-family: var(--font-display); font-weight: 900; font-size: 1.9rem; color: #fff; margin-bottom: 0.4rem; }
.site-footer__text { max-width: 50ch; margin-top: 1rem; }
.footer-socials { display: flex; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.footer-socials a {
	display: flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem;
	border-radius: 50%; background: rgba(255,255,255,.08); color: #fff;
}
.footer-socials a:hover { background: var(--plate); color: var(--ink); }
.footer-socials .icon { width: 1.25rem; height: 1.25rem; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1rem; }
.site-footer__legal { margin-top: 2.5rem; font-size: 0.85rem; color: rgba(255,255,255,.5); }

/* Páginas interiores ------------------------------------------------------- */

.page-body { padding-block: clamp(3rem, 7vw, 5rem); }
.page-title { font-size: clamp(2.6rem, 6vw, 4.25rem); margin-bottom: 1.5rem; }
.entry-content { max-width: 44rem; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content .alignwide { max-width: none; }
.entry-content h2 { font-size: 2.2rem; margin-top: 1.6em; }
.entry-content h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.3rem; line-height: 1.3; }
.entry-content:has(.photo-grid) { max-width: none; }

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list__item { padding-block: 1.25rem; border-bottom: 1px solid var(--frost); }
.post-list__item h2 { font-family: var(--font-body); font-weight: 700; font-size: 1.3rem; line-height: 1.3; margin-bottom: 0.25rem; }
.post-list__item a { text-decoration: none; }

.edition-single__head { background: var(--pine); color: #fff; padding-block: clamp(2.5rem, 6vw, 4rem); }
.edition-single__head .page-title { margin-bottom: 0.5rem; }
.edition-single__back a { color: rgba(255,255,255,.8); font-size: 0.95rem; }
.edition-single__back a:hover { color: var(--plate); }
.edition-single__year {
	font-family: var(--font-display); font-weight: 900; color: var(--plate);
	font-size: clamp(4rem, 12vw, 8rem); line-height: 0.85; margin: 1rem 0 0.5rem;
}
.edition-single__highlight { font-weight: 700; font-size: 1.15rem; margin: 0; }
.edition-single__cover { margin-top: clamp(2rem, 5vw, 3rem); }
.edition-single__cover img { width: 100%; border-radius: var(--radius-s); }
.edition-single .section__title { font-size: 2.6rem; margin: 3rem 0 1.5rem; }

.page-404__code {
	font-family: var(--font-display); font-weight: 900; font-size: clamp(7rem, 22vw, 14rem);
	line-height: 0.8; color: var(--plate); -webkit-text-stroke: 3px var(--ink); margin: 0 0 1rem;
}

.nav-links { display: flex; gap: 0.75rem; margin-top: 2rem; }

/* Movimiento reducido ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
