/*
 * Components: card grid, experience cards, key facts, photo placeholder, video facade.
 */

/* Card grid */
.tz-card-grid,
.tz-post-grid,
.tz-post-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tz-card-grid > li + li,
.tz-post-grid > li + li,
.tz-post-list > li + li {
	margin-top: 0;
}

.tz-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
	gap: var(--tz-space-xl) var(--tz-space-l);
}

/* Card: an editorial tile, not a boxed widget. The title link stretches over the card. */
.tz-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.tz-card__media,
.tz-card__media .tz-placeholder {
	aspect-ratio: 4 / 3;
}

/*
 * No photo yet: a short curtain strip instead of a full 4:3 tile, so the facts and the
 * booking status of the first card reach the first screen on phones (review UX-1).
 */
.tz-card__media:has(> .tz-placeholder),
.tz-card__media > .tz-placeholder {
	aspect-ratio: 3 / 1;
}

.tz-card__media {
	overflow: hidden;
	border-radius: var(--tz-radius);
	background: var(--tz-surface-sunk);
}

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

.tz-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--tz-space-xs);
	padding-top: var(--tz-space-m);
}

.tz-card__types {
	order: -1;
	color: var(--tz-text-muted);
	font-size: var(--tz-step--1);
	font-weight: 500;
}

.tz-card__title {
	font-size: var(--tz-step-2);
}

.tz-card__link {
	text-decoration: none;
}

.tz-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
}

.tz-card__link:hover {
	text-decoration: underline;
	text-decoration-color: var(--tz-link-underline);
	text-decoration-thickness: 2px;
}

.tz-card__link:focus-visible {
	outline: none;
}

.tz-card:has(.tz-card__link:focus-visible) {
	outline: 3px solid var(--tz-focus);
	outline-offset: 6px;
}

.tz-card__excerpt {
	color: var(--tz-text-soft);
}

.tz-card .tz-cta-slot {
	position: relative;
	z-index: 1;
	margin-top: auto;
	padding-top: var(--tz-space-s);
}

/* Key facts */
.tz-facts {
	display: grid;
	margin: 0;
}

.tz-facts__label {
	color: var(--tz-text-muted);
	font-size: var(--tz-step--2);
	font-weight: 500;
	letter-spacing: 0.02em;
}

.tz-facts__value {
	font-family: var(--tz-font-display);
	font-size: var(--tz-step-1);
	font-weight: 700;
	line-height: 1.35;
}

.tz-facts .is-tba .tz-facts__value {
	color: var(--tz-text-muted);
	font-family: var(--tz-font-body);
	font-size: var(--tz-step--1);
	font-weight: 500;
}

.tz-facts--bar {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	border-block: 1px solid var(--tz-line-strong);
}

.tz-facts--bar .tz-facts__item {
	padding: var(--tz-space-s) var(--tz-space-s) var(--tz-space-s) 0;
}

.tz-facts--bar .tz-facts__item:nth-child(n + 3) {
	border-top: 1px solid var(--tz-line);
}

@media (min-width: 40em) {
	.tz-facts--bar {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.tz-facts--bar .tz-facts__item:nth-child(n + 3) {
		border-top: 0;
	}

	.tz-facts--bar .tz-facts__item + .tz-facts__item {
		padding-inline-start: var(--tz-space-s);
		border-inline-start: 1px solid var(--tz-line);
	}

	.tz-facts--bar .tz-facts__value {
		font-size: var(--tz-step-0);
	}
}

.tz-facts--compact {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--tz-space-xs) var(--tz-space-s);
	margin-top: var(--tz-space-2xs);
	padding-top: var(--tz-space-s);
	border-top: 1px solid var(--tz-line);
}

.tz-facts--compact .tz-facts__value {
	font-family: var(--tz-font-body);
	font-size: var(--tz-step--1);
	font-weight: 500;
}

/* Photo placeholder: nine curtain panels with a fold highlight in each, and a paper tag. */
.tz-placeholder {
	position: relative;
	display: grid;
	place-items: center;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	isolation: isolate;
	background: var(--tz-maku-black);
}

.tz-placeholder__maku {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(180deg, rgb(0 0 0 / 0.22), transparent 18%, transparent 82%, rgb(0 0 0 / 0.3)),
		repeating-linear-gradient(90deg, rgb(0 0 0 / 0.2) 0, rgb(255 255 255 / 0.06) 5.5556%, rgb(0 0 0 / 0.2) 11.1111%),
		repeating-linear-gradient(90deg, var(--tz-p1) 0 11.1111%, var(--tz-p2) 11.1111% 22.2222%, var(--tz-p3) 22.2222% 33.3333%);
}

/* The curtain order shifts from card to card so a grid of placeholders does not look stamped. */
.tz-placeholder {
	--tz-p1: var(--tz-maku-black);
	--tz-p2: var(--tz-maku-kaki);
	--tz-p3: var(--tz-maku-moegi);
}

li:nth-child(3n + 2) > .tz-card .tz-placeholder {
	--tz-p1: var(--tz-maku-kaki);
	--tz-p2: var(--tz-maku-moegi);
	--tz-p3: var(--tz-maku-black);
}

li:nth-child(3n) > .tz-card .tz-placeholder {
	--tz-p1: var(--tz-maku-moegi);
	--tz-p2: var(--tz-maku-black);
	--tz-p3: var(--tz-maku-kaki);
}

.tz-placeholder__label {
	padding: 0.4rem 0.9rem;
	border-radius: var(--tz-radius);
	background: #efece2;
	color: #211d17;
	font-family: var(--tz-font-display);
	font-size: var(--tz-step--1);
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.4;
}

.tz-placeholder--hero {
	aspect-ratio: 4 / 3;
}

.tz-placeholder--wide {
	aspect-ratio: 21 / 9;
}

@media (min-width: 48em) {
	.tz-placeholder--hero {
		aspect-ratio: 21 / 9;
	}
}

/* Video facade */
.tz-video__facade {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	border-radius: var(--tz-radius);
	background: #000;
	color: #efece2;
	text-decoration: none;
}

.tz-video__poster {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tz-video__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 4.5rem;
	height: 4.5rem;
	border: 2px solid #efece2;
	border-radius: 50%;
	background: rgb(28 25 21 / 0.78);
	transform: translate(-50%, -50%);
	transition: background-color var(--tz-duration) var(--tz-ease);
}

.tz-video__play::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	border-block: 0.75rem solid transparent;
	border-inline-start: 1.2rem solid #efece2;
	transform: translate(-50%, -50%);
}

.tz-video__facade:hover .tz-video__play {
	background: var(--tz-kaki-deep);
}

.tz-video__label {
	position: absolute;
	bottom: var(--tz-space-s);
	left: var(--tz-space-s);
	padding: 0.25rem 0.625rem;
	border-radius: var(--tz-radius);
	background: rgb(28 25 21 / 0.82);
	font-size: var(--tz-step--1);
	font-weight: 500;
}

.tz-video iframe {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: var(--tz-radius);
}

/*
 * tokiwaza-core's spam trap in contact forms: a field for bots only. Moved off screen rather
 * than display:none, which some bots skip; aria-hidden and tabindex="-1" come from the plugin.
 */
.tkz-hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
