/* --- class sheets ---------------------------------------------------------
   The class cards open the same dialog in a third mode: a paper sheet with
   the photo, the long copy and the booking CTA. The bar below stays the same,
   so ←/→ browse the four classes like the photo and video sets.
   ------------------------------------------------------------------------- */

.viewer--class .viewer-inner {
	width: min(960px, 100%);
	/* A fixed frame: the sheet and the bar keep their height and position
	   when stepping between classes, instead of resizing with the copy. */
	height: min(820px, calc(100dvh - var(--viewer-gutter) - 20px));
	max-height: calc(100dvh - var(--viewer-gutter) - 20px);
}

.viewer--class .viewer-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
	align-items: stretch;
	justify-content: flex-start;
}

.viewer--class .viewer-bar {
	flex: 0 0 auto;
}

/* The sheet can be taller than the viewport on a phone; keep the close reachable. */
.viewer--class .viewer-close {
	position: absolute;
}

.class-sheet {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 0.44fr) minmax(0, 0.56fr);
	grid-template-rows: minmax(0, 1fr);
	width: 100%;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--paper);
	color: var(--black);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

/* Grain on the paper only: the photo and the copy sit above it. */
.class-sheet::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-image: var(--noise);
	mix-blend-mode: multiply;
	opacity: 0.22;
}

.class-photo,
.class-copy {
	position: relative;
	z-index: 1;
}

.class-photo {
	min-height: 0;
	overflow: hidden;
	background: var(--card-dark);
}

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

.class-copy {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	overflow-y: auto;
	scrollbar-gutter: stable;
	padding: 40px 44px 36px;
}

.class-kicker {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 18px;
	font-family: var(--mono);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--black);
}

.class-kicker::before {
	content: "";
	width: 28px;
	height: 4px;
	background: var(--crimson);
}

.class-num::after {
	content: "·";
	margin-left: 8px;
}

.class-title {
	font-size: clamp(2.2rem, 4.2vw, 3.4rem);
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: -0.04em;
	line-height: 0.86;
	margin-bottom: 18px;
}

.class-lede {
	max-width: 46ch;
	margin-bottom: 26px;
	font-size: clamp(1rem, 1.5vw, 1.18rem);
	font-weight: 700;
	line-height: 1.35;
}

.class-label {
	margin-bottom: 10px;
	font-family: var(--mono);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.class-list {
	display: flex;
	flex-direction: column;
	gap: 9px;
	margin-bottom: 22px;
	font-size: 0.92rem;
	line-height: 1.4;
	list-style: none;
}

.class-list li {
	position: relative;
	padding-left: 18px;
}

.class-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.45em;
	width: 7px;
	height: 7px;
	background: var(--crimson);
}

.class-need {
	margin-bottom: 22px;
	padding-top: 12px;
	border-top: 1px solid rgba(0, 0, 0, 0.18);
	font-family: var(--mono);
	font-size: 0.7rem;
	line-height: 1.5;
	letter-spacing: 0.02em;
}

.class-meta {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1px;
	margin-bottom: 22px;
	background: var(--border-dark);
	color: var(--paper);
}

.class-meta div {
	padding: 12px 12px 13px;
	background: var(--black);
}

.class-meta dt {
	margin-bottom: 4px;
	font-family: var(--mono);
	font-size: 0.6rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.62;
}

.class-meta dd {
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.2;
	overflow-wrap: break-word;
}

.class-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	align-self: flex-start;
	margin-top: auto;
	text-decoration: none;
}

.class-cta svg {
	width: 16px;
	height: 16px;
}

.class-note {
	margin-top: 10px;
	font-family: var(--mono);
	font-size: 0.62rem;
	line-height: 1.5;
	letter-spacing: 0.02em;
	opacity: 0.72;
}

@media (max-width: 899px) {
	/* On a phone the sheet is taller than the frame: scroll the paper as a
	   whole and keep the bar pinned below it. */
	.viewer--class .viewer-body {
		overflow-y: auto;
		overscroll-behavior: contain;
		align-items: flex-start;
	}

	.class-sheet {
		grid-template-columns: 1fr;
		grid-template-rows: auto auto;
		height: auto;
		border-radius: 18px;
	}

	.class-photo img {
		height: auto;
		min-height: 0;
		aspect-ratio: 3 / 2;
	}

	.class-copy {
		overflow: visible;
		scrollbar-gutter: auto;
		padding: 28px 24px 26px;
	}

	.class-title {
		font-size: clamp(2rem, 9vw, 2.6rem);
	}

	.class-meta {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
