/* ============================================================
   Shadow Sculpture Gallery — style.css
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
.ssg-scene-wrapper {
	position: relative;
	width: 100%;
	height: 85vh;
	overflow: hidden;
	background: #0a0a0f;
	font-family: inherit;
	user-select: none;
	-webkit-user-select: none;
	touch-action: none;
}

.ssg-canvas {
	display: block;
	width: 100% !important;
	height: 100% !important;
	outline: none;
}

/* ── UI Overlay Layer ─────────────────────────────────────── */
.ssg-ui-layer {
	position: absolute;
	inset: 0;
	pointer-events: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	padding: 2rem;
	gap: 0.75rem;
}

.ssg-hint {
	margin: 0;
	font-size: clamp(0.75rem, 2vw, 0.95rem);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(200, 169, 110, 0.7);
	animation: ssg-pulse 3s ease-in-out infinite;
	text-align: center;
}

@keyframes ssg-pulse {
	0%, 100% { opacity: 0.5; }
	50%       { opacity: 1; }
}

.ssg-animal-label {
	font-size: clamp(1.2rem, 4vw, 2rem);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #ffffff;
	text-shadow: 0 0 30px rgba(200, 169, 110, 0.6);
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.5s ease, transform 0.5s ease;
}

.ssg-animal-label.ssg-visible {
	opacity: 1;
	transform: translateY(0);
}

/* ── Progress Ring ────────────────────────────────────────── */
.ssg-progress-ring {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 60px;
	height: 60px;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s;
}

.ssg-progress-ring.ssg-active {
	opacity: 1;
}

.ssg-progress-ring svg {
	transform: rotate(-90deg);
}

.ssg-ring-bg {
	fill: none;
	stroke: rgba(200, 169, 110, 0.2);
	stroke-width: 3;
}

.ssg-ring-fill {
	fill: none;
	stroke: #c8a96e;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-dasharray: 163.36;
	stroke-dashoffset: 163.36;
	transition: stroke-dashoffset 0.1s linear;
}

.ssg-ring-pct {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.65rem;
	font-weight: 700;
	color: #c8a96e;
}

/* ── Navigation ───────────────────────────────────────────── */
.ssg-nav {
	position: absolute;
	bottom: 4.5rem;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 1rem;
	z-index: 10;
}

.ssg-nav-prev,
.ssg-nav-next {
	background: rgba(200, 169, 110, 0.1);
	border: 1px solid rgba(200, 169, 110, 0.3);
	color: #c8a96e;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 1.2rem;
	line-height: 1;
	transition: background 0.2s, border-color 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ssg-nav-prev:hover,
.ssg-nav-next:hover {
	background: rgba(200, 169, 110, 0.25);
	border-color: #c8a96e;
}

.ssg-dots {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.ssg-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(200, 169, 110, 0.3);
	border: 1px solid rgba(200, 169, 110, 0.5);
	cursor: pointer;
	transition: background 0.25s, transform 0.25s;
	padding: 0;
}

.ssg-dot.ssg-dot--active {
	background: #c8a96e;
	transform: scale(1.3);
}

/* ── Continue Button ──────────────────────────────────────── */
.ssg-continue-btn {
	position: absolute;
	bottom: 1.5rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
	padding: 0.65rem 1.75rem;
	background: rgba(200, 169, 110, 0.12);
	color: #c8a96e;
	border: 1px solid #c8a96e;
	border-radius: 2rem;
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
	white-space: nowrap;
}

.ssg-continue-btn:hover {
	background: rgba(200, 169, 110, 0.25);
	box-shadow: 0 0 20px rgba(200, 169, 110, 0.3);
	transform: translateX(-50%) translateY(-2px);
}

.ssg-btn-pos--bottom-left .ssg-continue-btn {
	left: 1.5rem;
	transform: none;
}
.ssg-btn-pos--bottom-left .ssg-continue-btn:hover {
	transform: translateY(-2px);
}

.ssg-btn-pos--bottom-right .ssg-continue-btn {
	left: auto;
	right: 1.5rem;
	transform: none;
}
.ssg-btn-pos--bottom-right .ssg-continue-btn:hover {
	transform: translateY(-2px);
}

/* ── Gyro Button ──────────────────────────────────────────── */
.ssg-gyro-btn {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 10;
}

.ssg-enable-gyro {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 0.8rem;
	background: rgba(10, 10, 15, 0.7);
	border: 1px solid rgba(200, 169, 110, 0.4);
	border-radius: 1rem;
	color: rgba(200, 169, 110, 0.8);
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: border-color 0.2s, color 0.2s;
	backdrop-filter: blur(6px);
}

.ssg-enable-gyro svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

.ssg-enable-gyro:hover {
	border-color: #c8a96e;
	color: #c8a96e;
}

.ssg-enable-gyro.ssg-gyro-active {
	background: rgba(200, 169, 110, 0.15);
	border-color: #c8a96e;
	color: #c8a96e;
}

/* ── Lightbox ─────────────────────────────────────────────── */
.ssg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.ssg-lightbox[hidden] {
	display: none;
}

.ssg-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.88);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.ssg-lightbox-inner {
	position: relative;
	z-index: 1;
	background: #0f0f1a;
	border: 1px solid rgba(200, 169, 110, 0.25);
	border-radius: 1.25rem;
	max-width: 760px;
	width: 100%;
	overflow: hidden;
	animation: ssg-lb-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes ssg-lb-in {
	from { opacity: 0; transform: scale(0.85) translateY(20px); }
	to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ssg-lightbox-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 2;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(200, 169, 110, 0.1);
	border: 1px solid rgba(200, 169, 110, 0.3);
	color: #c8a96e;
	font-size: 1.3rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	transition: background 0.2s;
}

.ssg-lightbox-close:hover {
	background: rgba(200, 169, 110, 0.25);
}

.ssg-lightbox-content {
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: 320px;
}

.ssg-lightbox-img-wrap {
	background: #080810;
	overflow: hidden;
}

.ssg-lightbox-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s ease;
}

.ssg-lightbox-img:hover {
	transform: scale(1.04);
}

.ssg-lightbox-text {
	padding: 2.5rem 2rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 1rem;
}

.ssg-lightbox-name {
	margin: 0;
	font-size: clamp(1.4rem, 3vw, 2rem);
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #c8a96e;
	line-height: 1.1;
}

.ssg-lightbox-fact {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.75);
}

.ssg-lightbox-discover {
	align-self: flex-start;
	padding: 0.55rem 1.4rem;
	background: #c8a96e;
	border: none;
	border-radius: 1.5rem;
	color: #0a0a0f;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
}

.ssg-lightbox-discover:hover {
	background: #e0c078;
	transform: translateY(-1px);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
	.ssg-lightbox-content {
		grid-template-columns: 1fr;
	}

	.ssg-lightbox-img-wrap {
		height: 200px;
	}

	.ssg-lightbox-text {
		padding: 1.5rem 1.25rem;
	}

	.ssg-nav {
		bottom: 5rem;
	}
}

/* ── Reduced Motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.ssg-hint,
	.ssg-lightbox-inner,
	.ssg-animal-label,
	.ssg-continue-btn,
	.ssg-lightbox-img {
		animation: none !important;
		transition: none !important;
	}
}
