@font-face {
	font-family: 'Flama Semicondensed';
	src: url('../../assets/flama-semicondensed-medium.woff2') format('woff2');
	font-weight: 500;
	font-display: swap;
}

@font-face {
	font-family: 'Flama';
	src: url('../../assets/flama-book.woff2') format('woff2');
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: 'Flama';
	src: url('../../assets/flama-medium.woff2') format('woff2');
	font-weight: 500;
	font-display: swap;
}

:root {
	/* palette */
	--palette-black: #000000;
	--palette-white: #ffffff;
	--palette-grey-900: #141414;
	--palette-grey-700: #595959;
	--palette-grey-400: #a6a6a6;
	--palette-lime: #cfff48;
	--palette-mint: #4affd4;
	--palette-purple: #bc9cff;
	--palette-rose: #ffbecd;
	--palette-orange: #ffa14a;
	--palette-black-35: rgb(0 0 0 / 0.35);
	--palette-black-88: rgb(0 0 0 / 0.88);

	/* roles */
	--surface: var(--palette-black);
	--surface-raised: var(--palette-grey-900);
	--text: var(--palette-white);
	--text-muted: var(--palette-grey-400);
	--rule: var(--palette-grey-700);
	--on-signal: var(--palette-black);
	--focus-ring: var(--palette-white);
	--photo-dim: var(--palette-black-35);
	--photo-ceiling: rgb(0 0 0 / 0.6);
	--photo-floor: var(--palette-black-88);
	--book-color: var(--palette-orange);

	/* type */
	--font-title: 'Flama Semicondensed', 'Arial Narrow', Arial, sans-serif;
	--font-text: 'Flama', Arial, sans-serif;
	--tracking-title: 0.1em;
	--tracking-label: 0.06em;
	--step-section: clamp(3.25rem, 11vw, 9.5rem);
	--step-verse: clamp(1.9rem, 5.4vw, 4.5rem);
	--step-lead: clamp(1.125rem, 1.6vw, 1.375rem);
	--step-num: clamp(2.75rem, 8vw, 6rem);
	--pack-lead: clamp(7.5rem, 16vw, 15rem);
	--step-row: clamp(1.05rem, 2.3vw, 1.85rem);

	/* space */
	--gutter: clamp(1.25rem, 4vw, 3.5rem);
	--space-s: 0.75rem;
	--space-m: clamp(1rem, 2vw, 1.5rem);
	--space-l: clamp(2.5rem, 6vw, 5rem);
	--space-xl: clamp(5rem, 12vw, 10rem);
	--radius-pill: 999px;
}

.book--lime { --book-color: var(--palette-lime); }
.book--mint { --book-color: var(--palette-mint); }
.book--purple { --book-color: var(--palette-purple); }
.book--rose { --book-color: var(--palette-rose); }
.book--orange { --book-color: var(--palette-orange); }

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	background: var(--surface);
	color: var(--text);
	font-family: var(--font-text);
	font-size: 100%;
	line-height: 1.55;
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--surface);
}

img {
	display: block;
	max-width: 100%;
}

h1,
h2,
h3,
p,
figure,
ul,
dl,
dd {
	margin: 0;
}

ul {
	padding: 0;
	list-style: none;
}

a {
	color: inherit;
}

button {
	font: inherit;
	color: inherit;
	cursor: pointer;
}

:focus-visible {
	outline: 0.1875rem solid var(--focus-ring);
	outline-offset: 0.2em;
}

.skip {
	position: absolute;
	left: var(--gutter);
	top: -4rem;
	z-index: 50;
	padding: 0.75rem 1.25rem;
	background: var(--palette-white);
	color: var(--palette-black);
}

.skip:focus {
	top: 1rem;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.display {
	font-family: var(--font-title);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: var(--tracking-title);
	line-height: 0.95;
}

.label {
	font-family: var(--font-text);
	font-weight: 500;
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: var(--tracking-label);
	color: var(--text-muted);
}

.section-title,
.kit__title,
.banner__title {
	text-wrap: balance;
}

.section-title {
	font-size: var(--step-section);
	padding-inline: var(--gutter);
}

.section {
	padding-block: var(--space-xl) 0;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	min-height: 3.5rem;
	padding: 0.9rem 2rem;
	border: 0.125rem solid transparent;
	border-radius: var(--radius-pill);
	font-family: var(--font-text);
	font-weight: 500;
	font-size: 0.9375rem;
	letter-spacing: var(--tracking-label);
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1.1;
	transition: background-color 0.18s, color 0.18s, border-color 0.18s;
}

.button--signal {
	background: var(--book-color);
	color: var(--on-signal);
}

.button--signal:hover {
	background: var(--palette-white);
}

.button--outline {
	border-color: var(--palette-white);
	background: transparent;
	color: var(--palette-white);
}

.button--outline:hover {
	background: var(--palette-white);
	color: var(--palette-black);
}

.button--inverse {
	background: var(--palette-black);
	color: var(--palette-white);
}

.button--inverse:hover {
	background: var(--palette-white);
	color: var(--palette-black);
}

.button--small {
	min-height: 2.75rem;
	padding: 0.6rem 1.25rem;
	font-size: 0.8125rem;
}

.disc {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 3.25rem;
	aspect-ratio: 1;
	border: 0;
	border-radius: 50%;
	background: var(--book-color);
	color: var(--on-signal);
	transition: transform 0.18s, background-color 0.18s, color 0.18s;
}

.disc::before {
	content: '';
	width: 34%;
	aspect-ratio: 0.9;
	margin-left: 8%;
	background: currentcolor;
	clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.disc--inline {
	width: 2rem;
	background: var(--on-signal);
	color: var(--book-color);
}

.disc--large {
	width: clamp(4.5rem, 9vw, 6.5rem);
}

/* header */

.site-header {
	position: absolute;
	inset: 0 0 auto;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-m);
	padding: 1.25rem var(--gutter);
}

.site-header__logo {
	width: 4.25rem;
	height: auto;
}

.site-header__nav {
	display: flex;
	gap: clamp(1rem, 3vw, 2.5rem);
	font-family: var(--font-title);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: var(--tracking-title);
	font-size: 1rem;
}

.site-header__link {
	text-decoration: none;
	padding-block: 0.5rem;
}

.site-header__link:hover {
	text-decoration: underline;
	text-underline-offset: 0.35em;
}

.site-header__link--secondary {
	display: none;
}

@media (min-width: 40em) {
	.site-header__link--secondary {
		display: inline;
	}
}

/* stage: the hero where the title is the picture */

.stage {
	position: sticky;
	top: 0;
	z-index: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: end;
	height: 100vh;
	height: 100svh;
	min-height: 34rem;
	overflow: hidden;
	isolation: isolate;
}

.stage__photo {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	animation: settle 2.2s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}

.stage::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(to bottom, var(--photo-ceiling), transparent 22%), var(--photo-dim);
}

.stage::after {
	content: '';
	position: absolute;
	inset: 40% 0 0;
	z-index: -1;
	background: linear-gradient(to top, var(--photo-floor), transparent);
}

.stage__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space-m);
	padding: 6rem var(--gutter) max(var(--gutter), 2rem);
}

.stage__title {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.06em;
	justify-items: center;
	font-size: 6rem;
}

.js .stage__title,
.js .tile__title {
	visibility: hidden;
}

.is-fitted .stage__title,
.is-fitted .tile__title {
	visibility: visible;
}

.fit {
	display: block;
	width: max-content;
	max-width: none;
	padding-inline-start: var(--tracking-title);
	font-size: var(--fit-size, clamp(3rem, 20vw, 14rem));
	white-space: nowrap;
	animation: rise 1s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}

.fit:nth-child(1) { animation-delay: 0.15s; }
.fit:nth-child(2) { animation-delay: 0.3s; }
.fit:nth-child(3) { animation-delay: 0.45s; }

.stage__lead {
	text-wrap: balance;
	justify-self: center;
	max-width: 36rem;
	text-align: center;
	font-size: var(--step-lead);
	animation: fade 1s 0.7s both;
}

.stage__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-s);
	animation: fade 1s 0.85s both;
}

.stage__credit {
	justify-self: center;
	animation: fade 1s 0.5s both;
}

.stage__credit {
	color: var(--palette-white);
}

@keyframes settle {
	from { transform: scale(1.08); }
	to { transform: scale(1); }
}

@keyframes rise {
	from { opacity: 0; transform: translateY(0.18em); }
	to { opacity: 1; transform: none; }
}

@keyframes fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* sheet: black page that rises over the pinned stage */

.sheet {
	position: relative;
	z-index: 1;
	background: var(--surface);
}

.verse {
	padding: var(--space-xl) var(--gutter) 0;
}

.verse__text {
	max-width: 22ch;
	font-size: var(--step-verse);
	line-height: 1.08;
	letter-spacing: 0.06em;
}

.verse__ref {
	margin-top: var(--space-m);
}

.feature {
	display: grid;
	gap: var(--space-l);
	padding: var(--space-l) var(--gutter) 0;
	align-items: start;
}

.feature__text {
	display: grid;
	gap: var(--space-m);
	max-width: 38rem;
	font-size: var(--step-lead);
}

.feature__meta {
	color: var(--text-muted);
	font-size: 0.9375rem;
}

.feature__cover {
	max-width: 22rem;
}

@media (min-width: 56em) {
	.feature {
		grid-template-columns: minmax(18rem, 5fr) 7fr;
		gap: clamp(3rem, 8vw, 8rem);
	}

	.feature__cover {
		max-width: none;
	}
}

.cover {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--palette-white);
}

.cover__img {
	position: absolute;
	top: -6%;
	left: -20.7%;
	width: 141.4%;
	max-width: none;
	height: auto;
}

.buy {
	display: grid;
	gap: var(--space-m);
	padding-top: var(--space-m);
}

.buy__price {
	font-size: clamp(2.75rem, 6vw, 4.5rem);
	line-height: 1;
}

.buy__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-m) 2rem;
}

/* chapters */

.chapters {
	margin-top: var(--space-l);
}

.chapter {
	border-top: 0.0625rem solid var(--rule);
}

.chapter:last-child {
	border-bottom: 0.0625rem solid var(--rule);
}

.chapter__row {
	display: grid;
	grid-template-columns: calc(var(--step-num) * 1.4) 1fr auto;
	align-items: center;
	gap: var(--space-m);
	padding: 1.1rem var(--gutter);
	list-style: none;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.chapter__row::-webkit-details-marker {
	display: none;
}

.chapter__row:hover {
	background: var(--surface-raised);
}

.chapter__num {
	font-size: var(--step-num);
	line-height: 0.9;
}

.chapter__title {
	font-size: var(--step-row);
	line-height: 1.15;
	text-wrap: balance;
}

.chapter[open] .chapter__row {
	background: var(--book-color);
	color: var(--on-signal);
	--focus-ring: var(--on-signal);
}

.chapter[open] .chapter__disc {
	background: var(--on-signal);
	color: var(--book-color);
}

.chapter__body {
	display: grid;
	gap: var(--space-m);
	padding: var(--space-m) var(--gutter) var(--space-l);
	animation: fade 0.35s both;
}

.chapter__still {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--surface-raised);
}

.chapter__photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.chapter__play {
	position: absolute;
	inset: 0;
	margin: auto;
}

.chapter__play:hover {
	transform: scale(1.07);
	background: var(--palette-white);
}

.chapter__info {
	display: grid;
	gap: var(--space-m);
	align-content: start;
	max-width: 32rem;
	font-size: var(--step-lead);
}

.chapter__videos {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-s);
}

@media (min-width: 56em) {
	.chapter__body {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: clamp(2rem, 5vw, 5rem);
		padding-left: calc(var(--gutter) + var(--step-num) * 1.4 + var(--space-m));
	}
}

/* packs */

.packs {
	margin-top: var(--space-l);
}

.pack {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: var(--space-m) var(--space-m);
	align-items: center;
	padding: var(--space-l) var(--gutter);
	border-top: 0.0625rem solid var(--rule);
}

.pack:last-child {
	border-bottom: 0.0625rem solid var(--rule);
}

.pack--primary {
	background: var(--book-color);
	color: var(--on-signal);
	border-top-color: transparent;
	--focus-ring: var(--on-signal);
}

.pack__lead {
	font-size: var(--step-num);
	line-height: 0.9;
	min-width: var(--pack-lead);
}

.pack__covers {
	display: flex;
	width: var(--pack-lead);
}

.pack__cover {
	flex: 1;
	min-width: 0;
	margin-left: -0.9rem;
	outline: 0.125rem solid var(--book-color);
}

.pack__cover:first-child {
	margin-left: 0;
}

.pack__name {
	font-size: var(--step-row);
	line-height: 1.1;
}

.pack__text {
	margin-top: 0.4rem;
	font-size: 1rem;
	max-width: 34rem;
}

.pack__buy {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-m);
}

.pack__price {
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1;
}

@media (min-width: 56em) {
	.pack {
		grid-template-columns: var(--pack-lead) 1fr auto;
		gap: var(--space-m) var(--space-l);
	}

	.pack__buy {
		grid-column: auto;
		gap: var(--space-l);
	}
}

/* banner: link out to the course page over a photo */

.banner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: end;
	min-height: 78svh;
	margin-top: var(--space-xl);
	overflow: hidden;
	isolation: isolate;
}

.banner__photo {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.banner::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(to bottom, var(--photo-ceiling), transparent 22%), var(--photo-dim);
}

.banner::after {
	content: '';
	position: absolute;
	inset: 30% 0 0;
	z-index: -1;
	background: linear-gradient(to top, var(--photo-floor), transparent);
}

.banner__body {
	display: grid;
	gap: var(--space-m);
	justify-items: start;
	padding: var(--space-xl) var(--gutter) var(--space-l);
}

.banner__title {
	font-size: var(--step-section);
}

.banner__text {
	max-width: 34rem;
	font-size: var(--step-lead);
}

/* footer */

.site-footer {
	display: grid;
	gap: var(--space-l);
	padding: var(--space-l) var(--gutter) 8rem;
	background: var(--surface);
}

.site-footer__logo {
	width: 7.5rem;
	height: auto;
}

.site-footer__columns {
	display: grid;
	gap: var(--space-l) var(--space-xl);
	font-size: 1rem;
}

.site-footer__list {
	display: grid;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.site-footer__link {
	text-underline-offset: 0.25em;
}

.site-footer__small {
	color: var(--text-muted);
	font-size: 0.875rem;
}

@media (min-width: 48em) {
	.site-footer__columns {
		grid-template-columns: repeat(3, auto);
		justify-content: start;
	}
}

/* buy pill: fixed, appears once the stage is covered */

.pill-cta {
	position: fixed;
	left: 50%;
	bottom: max(1rem, env(safe-area-inset-bottom));
	z-index: 30;
	min-width: min(20rem, calc(100vw - 2.5rem));
	border: 0.25rem solid var(--surface);
	translate: -50% 0;
	transition: translate 0.3s cubic-bezier(0.2, 0.7, 0.1, 1), opacity 0.3s;
}

.pill-cta.is-hidden {
	translate: -50% 200%;
	opacity: 0;
	pointer-events: none;
}

/* overview */

.tiles {
	background: var(--surface);
}

.tile {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: end;
	height: 100vh;
	height: 100svh;
	min-height: 34rem;
	overflow: hidden;
	isolation: isolate;
	scroll-snap-align: start;
}

.tile__photo {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tile::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(to bottom, var(--photo-ceiling), transparent 22%), var(--photo-dim);
}

.tile::after {
	content: '';
	position: absolute;
	inset: 40% 0 0;
	z-index: -1;
	background: linear-gradient(to top, var(--photo-floor), transparent);
}

.focus--high { object-position: 50% 30%; }
.focus--mid { object-position: 50% 50%; }
.focus--low { object-position: 50% 66%; }

.tile__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space-m);
	padding: 5rem var(--gutter) max(var(--gutter), 2rem);
}

.tile__title {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.06em;
	justify-items: center;
}

.tile__lead {
	text-wrap: balance;
	justify-self: center;
	max-width: 34rem;
	text-align: center;
	font-size: var(--step-lead);
}

.tile__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: var(--space-s) var(--space-m);
}

.tile__price {
	font-size: 2rem;
	line-height: 1;
}

.kit {
	display: grid;
	gap: var(--space-m);
	justify-items: start;
	padding: var(--space-xl) var(--gutter);
	background: var(--book-color);
	color: var(--on-signal);
	--focus-ring: var(--on-signal);
}

.kit__title {
	font-size: var(--step-section);
}

.kit__text {
	max-width: 34rem;
	font-size: var(--step-lead);
}

html:has(.tiles) {
	scroll-snap-type: y proximity;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.stage__photo,
	.fit,
	.stage__lead,
	.stage__actions,
	.stage__credit,
	.chapter__body {
		animation: none;
	}
}
