/*
 * Solid Teens: the camp of the year. The camp slot (hero and page variants), the countdown, the camp
 * timeline, and the Camp page's own bands. The accent colour lives on the frame only.
 */

/*
 * The slot. The band and everything around it keep the master brand. The block sets --styi-accent (and
 * --styi-accent-text, no longer read) on the frame only; with none set the marks are gold.
 */
.styi-camp-slot {
	position: relative;
	isolation: isolate;
	display: grid;
	align-items: end;
	min-height: 28rem;
	padding: var(--wp--preset--spacing--60) var(--styi-gutter, var(--wp--preset--spacing--40));
	overflow: hidden;
	background-color: var(--wp--preset--color--deep-navy);
}

.styi-camp-slot__media {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.styi-camp-slot__media :is(img, video) {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* The film loop fades in over the still only once it is playing, so a loop that cannot play leaves the still. */
.styi-camp-slot__media video {
	opacity: 0;
}

.styi-camp-slot__media video.is-playing {
	opacity: 1;
}

/* The film loop's pause button (theme.js adds it once the loop plays): over the film's top corner, navy
   with white text, and a gold ring with a navy edge when focused, so it shows on any frame of the film. */
.styi-camp-slot__pause {
	--styi-focus: var(--wp--preset--color--gold);
	position: absolute;
	top: var(--wp--preset--spacing--30);
	right: var(--wp--preset--spacing--30);
	z-index: 2;
	min-height: 2.75rem;
	padding: 0.5rem 1rem;
	border: 0;
	border-radius: 0;
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	cursor: pointer;
}

.styi-camp-slot__pause:focus-visible {
	outline-offset: 0;
	box-shadow: 0 0 0 4px var(--wp--preset--color--navy);
}

/* The accent marks the frame (top rule and pennant); the frame itself is navy with white text, whatever
   accent an editor picks. */
:root .styi-camp-slot__frame {
	--styi-focus: var(--wp--preset--color--gold);
	position: relative;
	z-index: 1;
	width: auto;
	margin-inline: 0;
	padding: var(--wp--preset--spacing--50);
	background-color: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
	border-top: 0.5rem solid var(--styi-accent, var(--wp--preset--color--gold));
}

.styi-camp-slot__frame::before {
	content: "";
	position: absolute;
	top: -0.5rem;
	right: var(--wp--preset--spacing--50);
	width: clamp(2.5rem, 2rem + 2vw, 4rem);
	aspect-ratio: 3 / 4;
	background: var(--styi-accent, var(--wp--preset--color--gold));
	clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}

:root .styi-camp-slot__frame > * {
	margin-block: 0;
}

:root .styi-camp-slot__frame > * + * {
	margin-top: var(--wp--preset--spacing--30);
}

.styi-camp-slot__frame > .styi-camp-slot__title:first-child {
	padding-inline-end: clamp(3rem, 2.5rem + 2vw, 5rem);
}

.styi-camp-slot__logo {
	display: block;
	width: auto;
	max-width: 12rem;
	height: auto;
	max-height: 4.5rem;
	padding: 0.5rem;
	background: var(--wp--preset--color--white);
}

.styi-camp-slot__title {
	color: inherit;
	font-size: var(--wp--preset--font-size--section);
}

.styi-camp-slot__year {
	display: block;
	margin-bottom: var(--wp--preset--spacing--20);
}

/* Hero variant: the photo at 3/2 (5/4 on desktop) with the frame rising over its lower edge. The negative
   margins apply only after the photo, so a camp with no cleared still never pulls the card up. */
.styi-camp-slot--hero {
	display: block;
	min-height: 0;
	padding: 0;
	overflow: visible;
	background: none;
}

.styi-camp-slot--hero .styi-camp-slot__media {
	position: relative;
	inset: auto;
	z-index: 0;
	aspect-ratio: 3 / 2;
	overflow: hidden;
}

.styi-camp-slot--hero .styi-camp-slot__media + .styi-camp-slot__frame {
	margin: calc(-1 * var(--wp--preset--spacing--60)) var(--wp--preset--spacing--40) 0;
}

@media (max-width: 47.99rem) {
	.styi-camp-slot--hero .styi-camp-slot__media {
		margin-inline: calc(-1 * var(--styi-gutter));
	}

	.styi-camp-slot--hero .styi-camp-slot__media + .styi-camp-slot__frame {
		margin-inline: 0;
	}
}

/* Desktop: the photo runs the full height of the slot behind the card, so a film loop laid over it covers
   the whole slot. The card starts 80% of the slot width down (the old 5/4 photo edge) less spacing-80, so the
   same stretch of photo shows above it, and it overhangs the photo's left edge. */
@media (min-width: 64rem) {
	.styi-camp-slot--hero {
		display: grid;
	}

	.styi-camp-slot--hero > * {
		grid-area: 1 / 1;
	}

	.styi-camp-slot--hero .styi-camp-slot__media {
		align-self: stretch;
		aspect-ratio: auto;
		min-height: 0;
	}

	.styi-camp-slot--hero .styi-camp-slot__media + .styi-camp-slot__frame {
		align-self: end;
		margin: calc(80% - var(--wp--preset--spacing--80)) var(--wp--preset--spacing--50) 0 calc(-1 * var(--wp--preset--spacing--60));
	}
}

.styi-camp-slot--hero :is(.styi-countdown__num, .styi-countdown__day) {
	font-size: var(--wp--preset--font-size--hero);
}

/* Page variant: the frame left and the photo right at 4/5, on the slot's own deep navy. It splits by the width
   it is given (a container query on the section), so in a narrow column, such as a 680 px page column, it
   stacks instead of squeezing the frame. */
.styi-camp-slot--page {
	display: block;
	min-height: 0;
	padding: var(--wp--preset--spacing--60) max(var(--styi-gutter), calc((100% - var(--styi-wide)) / 2)) var(--wp--preset--spacing--70);
	container-type: inline-size;
}

.styi-camp-slot--page .styi-camp-slot__inner {
	display: grid;
	gap: var(--wp--preset--spacing--50);
	align-items: center;
}

.styi-camp-slot--page .styi-camp-slot__media {
	position: relative;
	inset: auto;
	z-index: 0;
	aspect-ratio: 3 / 2;
	overflow: hidden;
}

.styi-camp-slot--page .styi-camp-slot__title {
	font-size: var(--wp--preset--font-size--hero);
}

.styi-camp-slot--page .styi-camp-slot__theme {
	max-width: 14ch;
}

.styi-camp-slot--page .styi-camp-slot__verse {
	max-width: 38ch;
	padding-inline-start: var(--wp--preset--spacing--40);
	border-inline-start: 4px solid var(--wp--preset--color--gold);
	font-size: var(--wp--preset--font-size--lead);
}

@media (max-width: 47.99rem) {
	.styi-camp-slot--page .styi-camp-slot__media {
		margin-inline: calc(-1 * var(--styi-gutter));
	}
}

@container (min-width: 60rem) {
	.styi-camp-slot--page .styi-camp-slot__inner {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		column-gap: var(--wp--preset--spacing--70);
	}

	.styi-camp-slot--page .styi-camp-slot__media {
		grid-column: 2;
		grid-row: 1;
		aspect-ratio: 4 / 5;
	}

	.styi-camp-slot--page .styi-camp-slot__frame {
		grid-column: 1;
		grid-row: 1;
	}
}

.styi-camp-slot__theme {
	display: block;
}

.styi-camp-slot__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem var(--wp--preset--spacing--40);
	padding: 0;
	list-style: none;
	font-weight: 700;
}

.styi-camp-slot__verse {
	margin-inline: 0;
	padding: 0;
	border: 0;
}

.styi-camp-slot__verse cite {
	display: block;
	margin-top: 0.5rem;
	font-style: normal;
	font-weight: 700;
}

.styi-camp-slot__fee {
	font-weight: 700;
}

.styi-camp-slot .styi-camp-slot__register {
	background-color: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--navy);
	text-decoration: none;
}

.styi-camp-slot .styi-camp-slot__register:hover {
	background-color: var(--wp--preset--color--amber);
	color: var(--wp--preset--color--navy);
}

.styi-countdown__row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 0.5rem;
	margin: 0;
	font-weight: 700;
}

/* The day of camp ("Day 3 of 9") is a numeral too. 62% width, as theme.json gives the countdown numerals. */
.styi-countdown__num,
.styi-countdown__day {
	font-size: var(--wp--preset--font-size--display);
	font-stretch: 62%;
	font-weight: 800;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.styi-countdown__unit {
	font-size: var(--wp--preset--font-size--card);
}

/* During camp the row is "Day", the day numeral, "of" and the length as bare text nodes, so it is plain inline
   text, not flex: the flex gap made every bare word its own item and spread the words unevenly. "Day" and
   "of 9" take the unit size, and the numeral sits on their baseline as "21 days to go" does. */
.styi-countdown--during .styi-countdown__row {
	display: block;
	font-size: var(--wp--preset--font-size--card);
}

.styi-countdown__note {
	margin: 0;
	font-size: var(--wp--preset--font-size--lead);
}

/* Newest first, one line each, with the year as a fixed-width lead. */
.styi-camp-timeline {
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.styi-camp-timeline__item {
	display: grid;
	grid-template-columns: 4.5rem 1fr;
	gap: 0 var(--wp--preset--spacing--30);
	padding-block: var(--wp--preset--spacing--20);
	border-top: 1px solid var(--wp--preset--color--slate);
}

.styi-camp-timeline__year {
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.styi-camp-timeline__edition {
	grid-column: 2;
	font-size: var(--wp--preset--font-size--small);
}

/* The smile, use 4: a static arc under the countdown, on the camp page only (the home hero has its smile). The
   arc hangs 0.3em below the numeral, so the numeral keeps that room under it: without it the arc ran 7 to 19 px
   into the verse from 768 px up and covered its first words. */
.styi-camp-slot--page .styi-countdown--before .styi-countdown__num {
	position: relative;
	display: inline-block;
	margin-bottom: 0.3em;
}

.styi-camp-slot--page .styi-countdown--before .styi-countdown__num::after {
	content: "";
	position: absolute;
	inset: auto -0.1em -0.3em;
	height: 0.45em;
	border: 0.07em solid var(--wp--preset--color--gold);
	border-top: 0;
	border-radius: 0 0 999px 999px;
}

/* Camp: the day band's shout and ruled list, the included list, the safe list. */
.styi-shout {
	max-width: 14ch;
	font-weight: 900;
	line-height: 1.1;
}

:root .styi-day-band .wp-block-list {
	display: grid;
	gap: 0 var(--wp--preset--spacing--50);
	padding: 0;
	list-style: none;
}

@media (min-width: 48rem) {
	:root .styi-day-band .wp-block-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

:root .styi-day-band .wp-block-list > li {
	margin: 0;
	padding-block: var(--wp--preset--spacing--30);
	border-top: 2px solid currentColor;
}

:root .styi-included-band .wp-block-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--lead);
	font-weight: 700;
}

.styi-included-band .wp-block-list > li {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	margin: 0;
}

.styi-included-band .wp-block-list > li::before {
	content: "";
	flex: none;
	width: 0.5em;
	height: 0.5em;
	background: var(--wp--preset--color--navy);
}

:root .styi-safe-band .wp-block-list {
	padding: 0;
	list-style: none;
}

.styi-safe-band .wp-block-list > li {
	padding-block: var(--wp--preset--spacing--30);
	border-top: 1px solid rgb(255 255 255 / 0.25);
}

/* Camp: the timeline wall. 32 camps in 5 or 6 columns, each a ruled cell with the year and edition on one line
   and the theme under them, so the band stays under 1,100 px at 1440 instead of a long list. */
:root .styi-timeline-band > .styi-camp-timeline {
	max-width: var(--styi-wide);
	margin-top: var(--wp--preset--spacing--60);
}

.styi-timeline-band .styi-camp-timeline {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--40);
}

@media (min-width: 48rem) {
	.styi-timeline-band .styi-camp-timeline {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 64rem) {
	.styi-timeline-band .styi-camp-timeline {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

@media (min-width: 80rem) {
	.styi-timeline-band .styi-camp-timeline {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}

.styi-timeline-band .styi-camp-timeline__item {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-content: start;
	align-items: baseline;
	gap: 0.25rem 0.75rem;
	padding-block: var(--wp--preset--spacing--30) 0;
	border-top: 1px solid rgb(255 255 255 / 0.2);
}

.styi-timeline-band .styi-camp-timeline__item:first-child {
	grid-column: span 2;
	border-top: 3px solid var(--wp--preset--color--gold);
}

.styi-timeline-band .styi-camp-timeline__year {
	grid-column: 1;
	grid-row: 1;
	color: var(--wp--preset--color--gold);
	font-size: var(--wp--preset--font-size--card);
	line-height: 0.9;
}

.styi-timeline-band .styi-camp-timeline__item:first-child .styi-camp-timeline__year {
	font-size: var(--wp--preset--font-size--hero);
}

.styi-timeline-band .styi-camp-timeline__theme {
	grid-column: 1 / -1;
	grid-row: 2;
	font-weight: 700;
	font-stretch: 87.5%;
	line-height: 1.25;
}

.styi-timeline-band .styi-camp-timeline__edition {
	grid-column: 2;
	grid-row: 1;
}
