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

:root {
	--cream: #f5f1e8;
	--dim: rgba(232, 232, 245, 0.45);
	--faint: rgba(236, 232, 245, 0.22);
	--gold: #6fa8c9;
	--gold-dim: rgba(111, 132, 201, 0.55);
	--line: rgba(232, 239, 245, 0.16);
	--bg: #060608;
	--mono: "SF Mono", "Cascadia Code", "Courier New", monospace;
	--sans: "Avenir Next", "Helvetica Neue", system-ui, sans-serif;
	--serif: "Didot", "Bodoni 72", "Playfair Display", Georgia, serif;
}

body {
	/* --- mismo degradado carmesí/negro que index.html y article.html --- */
	background: #060608;
	background-image: radial-gradient(circle at center, #04072b 0%, #060708 100%);
	color: var(--blue-dim);
	overflow: hidden;
	cursor: grab;
	font-family: var(--sans);
}

body.dragging {
	cursor: grabbing;
}

body.hover-gem {
	cursor: pointer;
}

.webgl {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	display: block;
	touch-action: none; /* drag del carrusel en tactil */
	/* el canvas se renderiza con fondo transparente (ver gallery-script.js)
	   para que se vea el degradado carmesí del body detrás del carrusel */
	background: transparent;
}

/* halo calido tras la plataforma + resto frio del cristal */
.glow {
	position: fixed;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		radial-gradient(ellipse 42% 18% at 50% 74%, rgba(90, 134, 255, 0.07), transparent 70%),
		radial-gradient(ellipse 46% 34% at 50% 50%, rgba(60, 200, 142, 0.05), transparent 70%);
}

/* --- petalos de index.html / article.html, flotando sobre el carrusel --- */
#petals-canvas {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	pointer-events: none;
}

button {
	font: inherit;
	background: none;
	border: 0;
	color: inherit;
}

.circle {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid rgba(232, 239, 245, 0.28);
	display: grid;
	place-items: center;
	font-size: 0.8rem;
	color: var(--cream);
	transition: border-color 0.3s, color 0.3s, background 0.3s;
	cursor: pointer;
	pointer-events: auto;
}

.circle:hover {
	border-color: var(--gold);
	color: var(--gold);
}

/* ---------- nav: ver nav.css (componente compartido) ---------- */

.hero {
	position: fixed;
	left: 2.6rem;
	top: 50%;
	transform: translateY(-54%);
	z-index: 10;
	max-width: 400px;
	pointer-events: none;
}

.eyebrow {
	font-family: var(--mono);
	font-size: 0.56rem;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--gold);
}

.eyebrow span {
	display: inline-block;
	width: 46px;
	height: 1px;
	background: var(--gold-dim);
	margin-left: 0.8rem;
	vertical-align: middle;
}

.hero h2 {
	margin: 1rem 0 1.2rem;
	font-family: var(--serif);
	font-size: clamp(2.3rem, 3.4vw, 3.2rem);
	font-weight: 400;
	line-height: 1.08;
	letter-spacing: 0.01em;
	color: #f8f4eb;
}

.hero h2 em {
	font-style: italic;
}

.lead {
	max-width: 250px;
	font-size: 0.78rem;
	letter-spacing: 0.02em;
	line-height: 1.75;
	color: var(--dim);
}

.cta {
	margin-top: 1.8rem;
	display: inline-flex;
	align-items: center;
	gap: 1rem;
	cursor: pointer;
	pointer-events: auto;
}

.cta span:first-child {
	font-size: 0.62rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--blue-dim);
	padding-bottom: 0.55rem;
	border-bottom: 1px solid var(--blue-dim);
	transition: color 0.3s;
}

.cta:hover span:first-child {
	color: var(--blue);
}


.panel {
	position: fixed;
	right: 2.6rem;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 1.4rem;
	text-align: right;
	pointer-events: none;
}

.counter .idx {
	font-family: var(--mono);
	font-size: 0.78rem;
	letter-spacing: 0.12em;
	color: var(--cream);
}

.counter .t {
	display: block;
	margin-top: 0.4rem;
	font-family: var(--mono);
	font-size: 0.53rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--gold-dim);
}

.cats {
	list-style: none;
	font-family: var(--mono);
	font-size: 0.6rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.cats li {
	display: flex;
	justify-content: flex-end;
	align-items: baseline;
	gap: 0.9rem;
	margin: 0.6rem 0;
	color: var(--dim);
}

.cats li i {
	font-style: normal;
	font-size: 0.55rem;
	color: var(--faint);
}

.cats li.active {
	color: var(--cream);
}

.cats li.active i {
	color: var(--gold);
}

.side-thumbs {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.side-arrows {
	display: flex;
	gap: 0.6rem;
	margin-top: 0.3rem;
}


.thumb {
	width: 74px;
	height: 52px;
	border-radius: 3px;
	overflow: hidden;
	border: 1px solid var(--line);
	cursor: pointer;
	pointer-events: auto;
	transition: border-color 0.4s, box-shadow 0.4s;
	flex: none;
}

.thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: grayscale(0.95) brightness(0.65);
	transition: filter 0.4s;
}

.thumb.active {
	border-color: var(--gold);
	box-shadow: 0 0 18px rgba(111, 112, 201, 0.22);
}

.thumb.active img {
	filter: none;
}

.side-thumbs .thumb {
	width: 42px;
	height: 54px;
}

/* ---------- franja inferior ---------- */

.play-line {
	position: fixed;
	left: 2.6rem;
	bottom: 6.4rem;
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 1rem;
	pointer-events: none;
}

.play-line .circle {
	pointer-events: none;
	font-size: 0.5rem;
	padding-left: 2px;
}

.play-line p {
	font-family: var(--mono);
	font-size: 0.56rem;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	color: var(--dim);
	line-height: 2;
}

.strip {
	position: fixed;
	bottom: 3.2rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 1rem;
	pointer-events: none;
}

.strip .thumbs {
	display: flex;
	gap: 0.7rem;
}

.dashes {
	position: fixed;
	bottom: 1.9rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
	display: flex;
	gap: 0.45rem;
	pointer-events: none;
}

.dashes i {
	width: 16px;
	height: 2px;
	border-radius: 1px;
	background: var(--faint);
	transition: width 0.4s, background 0.4s;
}

.dashes i.active {
	width: 26px;
	background: var(--blue-dim);
}

.socials {
	position: fixed;
	left: 2.6rem;
	bottom: 1.9rem;
	z-index: 10;
	font-family: var(--mono);
	font-size: 0.55rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--dim);
	pointer-events: none;
}

.socials b {
	font-weight: 400;
	color: var(--faint);
	margin: 0 0.5rem;
}

.scroll-hint {
	position: fixed;
	right: 2.6rem;
	bottom: 1.9rem;
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 0.8rem;
	font-family: var(--mono);
	font-size: 0.55rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--dim);
	pointer-events: none;
}

.scroll-hint .l {
	width: 40px;
	height: 1px;
	background: var(--faint);
}

.mouse {
	position: relative;
	width: 15px;
	height: 24px;
	border: 1px solid rgba(232, 232, 245, 0.35);
	border-radius: 8px;
}

.mouse::before {
	content: "";
	position: absolute;
	top: 4px;
	left: 50%;
	width: 2px;
	height: 5px;
	border-radius: 1px;
	background: var(--gold);
	transform: translateX(-50%);
	animation: scrolldot 2.2s ease-in-out infinite;
}

@keyframes scrolldot {
	0%, 100% { transform: translate(-50%, 0); opacity: 1; }
	55% { transform: translate(-50%, 8px); opacity: 0; }
	56% { transform: translate(-50%, 0); opacity: 0; }
}

@media (max-width: 1180px) {
	.cats,
	.side-thumbs {
		display: none;
	}
}

@media (max-width: 940px) {
	.hero {
		left: 1.3rem;
		top: 5.6rem;
		transform: none;
		max-width: 250px;
	}

	.hero h2 {
		font-size: 1.85rem;
		margin: 0.8rem 0 0.9rem;
	}

	.lead {
		max-width: 200px;
		font-size: 0.68rem;
		line-height: 1.6;
	}

	.cta {
		margin-top: 1.1rem;
		gap: 0.7rem;
	}

	.cta span:first-child {
		font-size: 0.56rem;
	}

	.cta .circle {
		width: 30px;
		height: 30px;
		font-size: 0.7rem;
	}

	.panel {
		top: 5.6rem;
		right: 1.3rem;
		transform: none;
	}

	.side-arrows {
		display: none;
	}

	.counter .idx {
		font-size: 0.7rem;
	}

	.counter .t {
		font-size: 0.48rem;
	}

	.play-line,
	.socials,
	.scroll-hint {
		display: none;
	}

	.strip {
		bottom: 2.9rem;
		gap: 0.6rem;
	}

	.strip .thumbs {
		max-width: calc(100vw - 9rem);
		overflow-x: auto;
		pointer-events: auto;
		gap: 0.45rem;
		scrollbar-width: none;
	}

	.strip .thumbs::-webkit-scrollbar {
		display: none;
	}

	.strip .thumb {
		width: 48px;
		height: 34px;
	}

	.strip .circle {
		width: 32px;
		height: 32px;
		font-size: 0.7rem;
	}

	.dashes {
		bottom: 1.5rem;
		gap: 0.35rem;
	}

	.dashes i {
		width: 12px;
	}

	.dashes i.active {
		width: 20px;
	}
}
