/* Infinite Steamhole — closeup card + Pinterest-style masonry grid. */

/* Page background: this stylesheet loads only on Steamhole pages, so scoping to `body`
   here themes just the experiment. Saturated mustard — dark tiles pop against it: */
body {
	background-color: #e0a51c;
}

/* base.css sets body{color:#fff}; the dropdown's links are `color: inherit` on a white
   bg, so set a dark colour here for them to inherit (same fix as comps.html): */
.search-widget-dropdown {
	color: #201d18;
}

/* Cards are hidden until Colcade sweeps them into a column, or they'd flash unplaced: */
#sth-grid > .sth-card {
	display: none;
}

.sth-card {
	margin-bottom: 1.75rem;
}

/* --- Grid tiles ------------------------------------------------------------ */
/* pinteresteam-style media-stack cards, but with DISTINCT card chrome (background +
   border + padding) so it's obvious which group of media belongs to which game: */
.sth-tile {
	background: #2f2f33;
	border: 2px solid rgba(255, 255, 255, 0.28);
	padding: 0.5rem;
	color: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
	transition: box-shadow 0.15s ease-in-out;
}

.sth-tile:hover {
	box-shadow: 0 0 12px rgba(0, 0, 0, 1);
}

/* Vertical rhythm between stacked media items — tight, so the group reads as one card: */
.sth-media-stack > * + * {
	margin-top: 0.25rem;
}

/* Inner media share a small radius; only the card itself keeps the big rounded-3 corner: */
.sth-media-stack > * {
	border-radius: 0.2rem;
}

/* Known aspect ratios reserved up front so Colcade measures without reflow; the
   about-page clips size themselves once their metadata loads: */
.sth-media {
	background: rgba(128, 128, 128, 0.15);
}

.sth-media--header { aspect-ratio: 460 / 215; }
.sth-media--shot   { aspect-ratio: 16 / 9; }

.sth-media img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.sth-about-video {
	width: 100%;
	display: block;
}

/* Save button rides above the stretched-link (which sits at z-index 1): */
.sth-save {
	position: absolute;
	top: 0.9rem;
	right: 0.9rem;
	opacity: 0;
	transition: opacity 0.15s ease;
	z-index: 2;
}

.sth-tile:hover .sth-save,
.sth-save.is-applied {
	opacity: 1;
}

.sth-tile-link {
	text-decoration: none;
	color: inherit;
}

/* Title now rides at the top of the card (WI-1) so names are glanceable: */
.sth-tile-title {
	margin-bottom: 0.4rem;
	font-weight: 600;
	line-height: 1.25;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.sth-tile-meta {
	font-size: 0.85rem;
}

.sth-tile-why {
	font-size: 0.75rem;
	opacity: 0.7;
}

/* --- The closeup card ------------------------------------------------------ */
.sth-closeup {
	background: linear-gradient(to bottom, rgb(246, 241, 232), rgb(218, 209, 193));
	color: #222;
}

.sth-closeup-title {
	font-family: 'Oswald', sans-serif;
}

.sth-closeup-video video {
	width: 100%;
	display: block;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	background: #000;
	cursor: zoom-in;
}

.sth-closeup-hero {
	width: 100%;
	display: block;
}

.sth-strip-thumb {
	flex: 1 1 0;
	min-width: 0;
	cursor: zoom-in;
}

.sth-strip-thumb img {
	width: 100%;
	display: block;
	border-radius: 0.25rem;
}

.sth-closeup-meta {
	font-size: 0.9rem;
	opacity: 0.8;
}

.sth-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.2rem 0.85rem 0.2rem 0.2rem;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.08);
	color: inherit;
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 600;
	transition: background 0.15s ease, box-shadow 0.15s ease;
}

/* The tag icon rides in a cream medallion that overhangs the pill's left cap: */
.sth-chip-ico {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.9rem;
	height: 1.9rem;
	margin: -0.15rem 0;
	border-radius: 50%;
	background: #fbf7ee;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), inset 0 0 0 2px rgba(0, 0, 0, 0.12);
	transition: transform 0.15s ease;
}

.sth-chip-ico img {
	width: 1.15rem;
	height: 1.15rem;
	object-fit: contain;
	display: block;
}

.sth-chip:hover {
	background: rgba(0, 0, 0, 0.16);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.sth-chip:hover .sth-chip-ico {
	transform: scale(1.12) rotate(-4deg);
}

.sth-back {
	position: absolute;
	left: 0.75rem;
	top: 0.25rem;
	z-index: 3;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
}

/* --- Sentinels + skeletons -------------------------------------------------- */
.sth-sentinel {
	padding: 0.5rem 0 1.5rem;
}

/* Skeleton blocks appear only while a fetch is in flight: */
.sth-skeleton {
	display: none;
	height: 220px;
	border-radius: 0.75rem;
	background: rgba(128, 128, 128, 0.2);
	animation: sth-pulse 1.2s ease-in-out infinite;
}

.sth-loading .sth-skeleton {
	display: block;
}

@keyframes sth-pulse {
	0%, 100% { opacity: 0.45; }
	50% { opacity: 0.9; }
}

/* --- Closeup media cycling (WI-3) ------------------------------------------ */
.sth-main-shot img {
	width: 100%;
	display: block;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	background: #000;
	cursor: zoom-in;
}

.sth-cycle-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 2.4rem;
	height: 2.4rem;
	border: none;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.sth-cycle-prev { left: 0.5rem; }
.sth-cycle-next { right: 0.5rem; }

.sth-closeup-media:hover .sth-cycle-btn {
	opacity: 1;
}

/* Touch devices can't hover — keep the arrows visible: */
@media (hover: none) {
	.sth-cycle-btn { opacity: 1; }
}

.sth-strip-thumb.is-current img {
	outline: 3px solid #e0a51c;
	outline-offset: -1px;
}

/* --- Source thinking-strip chips (WI-5) ------------------------------------ */
.sth-source-chip {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.25);
	color: #fff;
	font-size: 0.85rem;
	opacity: 0.35;
	transition: opacity 0.3s ease;
}

.sth-source-chip.is-lit {
	opacity: 1;
}

.sth-source-chip.pulse {
	animation: sth-chip-pulse 0.6s ease-out;
}

@keyframes sth-chip-pulse {
	0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
	100% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
}

/* Easter-egg hero for the one seed with no neighbourhood (mirrors home.html's
   .home-hero-title; Archivo is loaded site-wide by base.html): */
.sth-no-game {
	margin: 0;
	font-family: 'Archivo', sans-serif;
	color: #ffffff;
	font-variation-settings: 'wdth' 125, 'wght' 900;
	font-size: clamp(2.25rem, 9vw, 64px);
	line-height: 0.8;
	letter-spacing: -0.05em;
	text-transform: uppercase;
	text-wrap: balance;
	text-shadow: 4.2px 4.8px 0 #f47500;
}

/* --- Entrance vibe door (WI-6): tag-as-hero tiles, "overhang medallion" ----- */
.sth-vibe {
	display: block;
	background: #201d18;                 /* Warm ink card. */
	border-radius: 18px;
	color: #fbf7ee;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(74, 52, 0, 0.32);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sth-vibe:hover,
.sth-vibe:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 16px 32px rgba(74, 52, 0, 0.42);
	color: #fbf7ee;
}

.sth-vibe:focus-visible {
	outline: 3px solid #e0a51c;
	outline-offset: 3px;
}

/* Capsule art fills the whole tile: */
.sth-vibe-art {
	border-radius: 18px;
	overflow: hidden;
	aspect-ratio: 460 / 215;
	background: #333;
}

.sth-vibe-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
