/* ============================================================
   Homepage "Inside The Lookout": a sliding row of tall, staggered room
   photos with arrows and mouse drag (assets/js/carousel.js).
   (prototype: .rooms, .track, .room)
   ============================================================ */

/* Follows the intro on the same white: no space of its own above. */
.rooms__inner {
	padding-block: 0 var(--space-section);
}

/* The row stays inside the content column, and its photos are sized to fill
   it exactly: 4 per view on desktop, 3 on tablets, 2 on large phones, and
   one with a peek of the next on small phones (Miles 2026-11-24: "fixed
   width ... 4 items max"). The column has a fixed maximum width, so very
   wide screens look like 1440. Behaviour: assets/js/carousel.js. */
.rooms__track {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	padding-bottom: 4px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	cursor: grab;
}

.rooms__track::-webkit-scrollbar {
	display: none;
}

.rooms__track.is-dragging {
	scroll-snap-type: none;
	cursor: grabbing;
}

.rooms__card {
	position: relative;
	display: block;
	flex: 0 0 80%;
	aspect-ratio: 300 / 440;
	overflow: hidden;
	background: var(--color-line);
	text-decoration: none;
	scroll-snap-align: start;
}

.rooms__card:nth-child(odd) {
	margin-top: 32px;
}

.rooms__card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.2s var(--ease);
}

/* The label slides in from the left on hover or focus; on touch screens,
   which cannot hover, it stays shown so every photo keeps its name. */
.rooms__tag {
	position: absolute;
	top: 28px;
	left: 0;
	padding: 8px 16px;
	background: var(--color-bg);
	font-size: var(--size-label);
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	transform: translateX(-101%);
	transition: transform 0.6s var(--ease);
}

.rooms__card:focus-visible .rooms__tag {
	transform: none;
}

@media (hover: hover) {
	.rooms__card:hover img {
		transform: scale(1.07);
	}

	.rooms__card:hover .rooms__tag {
		transform: none;
	}
}

@media (hover: none) {
	.rooms__tag {
		transform: none;
	}
}

.rooms__nav {
	display: flex;
	justify-content: center;
	margin-top: 36px;
}

/* Hidden by the script when every photo fits. */
.rooms__nav[hidden] {
	display: none;
}

/* Every photo in view (very wide screens): a still row. */
.rooms__carousel.is-static .rooms__track {
	overflow-x: hidden;
	cursor: auto;
}

@media (min-width: 481px) {
	.rooms__card {
		flex-basis: calc((100% - 20px) / 2);
	}
}

@media (min-width: 761px) {
	.rooms__track {
		gap: 36px;
	}

	.rooms__card {
		flex-basis: calc((100% - 2 * 36px) / 3);
	}

	.rooms__card:nth-child(odd) {
		margin-top: 44px;
	}
}

@media (min-width: 1181px) {
	.rooms__card {
		flex-basis: calc((100% - 3 * 36px) / 4);
	}
}
