/* Reset, typography, layout, header, footer, buttons. Tokens live in tokens.css. */

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

html {
	scroll-padding-top: 124px;
}

body {
	margin: 0;
	background: var(--fg-color-bg);
	color: var(--fg-color-text);
	font-family: var(--fg-font-body);
	font-size: 1rem;
	line-height: 1.7;
	letter-spacing: 0.005em;
}

a {
	color: inherit;
	text-underline-offset: 5px;
}

button,
input,
select,
textarea {
	font: inherit;
}

/* Native selects from editor content; browsers with customizable select also get a styled option list. */
select {
	max-width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	border: 1px solid var(--fg-color-line);
	border-radius: var(--fg-radius-s);
	background-color: var(--fg-color-bg);
	color: var(--fg-color-text);
}

@supports (appearance: base-select) {
	select,
	::picker(select) {
		appearance: base-select;
	}

	::picker(select) {
		padding: 6px;
		border: 1px solid var(--fg-color-line);
		border-radius: var(--fg-radius-s);
		background: var(--fg-color-bg);
		color: var(--fg-color-text);
		box-shadow: 0 16px 40px rgb(32 26 20 / 16%);
	}

	option {
		min-height: 44px;
		padding: 10px 12px;
		border-radius: var(--fg-radius-s);
	}

	option:hover,
	option:focus-visible {
		background: var(--fg-color-surface);
	}

	option:checked {
		font-weight: 600;
	}
}

button,
a,
input,
select,
textarea,
summary {
	-webkit-tap-highlight-color: transparent;
}

button,
a {
	touch-action: manipulation;
	border-radius: var(--fg-radius-s);
}

button {
	cursor: pointer;
}

button:disabled {
	cursor: not-allowed;
}

img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
}

h1,
h2,
h3 {
	font-family: var(--fg-font-display);
	font-weight: 400;
	letter-spacing: -0.025em;
	line-height: 1.12;
	text-wrap: balance;
	margin: 0 0 24px;
}

h1 {
	font-size: clamp(3rem, 6.8vw, 6rem);
}

h2 {
	font-size: clamp(2.25rem, 4.4vw, 4.5rem);
}

h3 {
	font-size: clamp(1.75rem, 2.8vw, 2.65rem);
}

p {
	margin: 0 0 24px;
	max-width: 65ch;
	text-wrap: pretty;
}

small,
.muted {
	color: var(--fg-color-muted);
}

small {
	font-size: 0.875rem;
}

strong {
	font-weight: 600;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
	outline: 3px solid var(--fg-color-accent);
	outline-offset: 5px;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: fixed;
	left: 20px;
	top: -100px;
	z-index: var(--fg-layer-skip);
	padding: 12px;
	background: var(--fg-color-action);
	color: var(--fg-color-action-text);
}

.skip-link:focus {
	top: 12px;
}

/* Layout */

.wrap {
	max-width: 1440px;
	padding-inline: var(--fg-gutter);
	margin: auto;
}

.section {
	padding-block: clamp(64px, 9vw, 132px);
}

.compact {
	padding-block: 56px;
}

.section-title {
	max-width: 760px;
	margin-bottom: 48px;
}

.section-title p {
	max-width: 540px;
}

/* Buttons and links */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 28px;
	min-height: 52px;
	padding: 15px 24px;
	background: var(--fg-color-action);
	color: var(--fg-color-action-text);
	border: 1px solid var(--fg-color-action);
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: transform 140ms var(--fg-ease-out);
}

.button:active {
	transform: scale(0.97);
}

.button.ghost {
	background: transparent;
	color: var(--fg-color-text);
	border-color: var(--fg-color-line);
}

.text-link,
.fg-prices__book {
	display: inline-flex;
	align-items: center;
	gap: 24px;
	min-height: 44px;
	font-weight: 500;
	text-decoration: none;
	border-bottom: 1px solid var(--fg-color-accent);
}

.actions {
	display: flex;
	gap: 24px;
	align-items: center;
	flex-wrap: wrap;
}

/* Header */

.site-header {
	position: sticky;
	top: 0;
	z-index: var(--fg-layer-sticky);
	height: 104px;
	background: var(--fg-color-bg);
	border-bottom: 1px solid var(--fg-color-header-line);
}

.header-inner {
	max-width: 1600px;
	height: 100%;
	margin: auto;
	padding: 0 var(--fg-gutter);
	display: flex;
	align-items: center;
	gap: 24px;
}

.header-inner > * {
	min-width: 0;
}

.logo {
	display: block;
	flex: 0 0 252px;
	width: 252px;
	height: 88px;
	position: relative;
	overflow: hidden;
}

.logo img {
	position: absolute;
	left: -57px;
	top: -76px;
	width: 366px;
	max-width: none;
	height: auto;
	object-fit: contain;
	filter: var(--fg-logo-filter);
}

.nav {
	margin-left: auto;
}

.nav ul {
	display: flex;
	gap: 22px;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav a {
	display: block;
	min-width: 44px;
	padding: 12px 0;
	font-size: 0.94rem;
	text-decoration: none;
	white-space: nowrap;
}

.nav a[aria-current="page"] {
	color: var(--fg-color-accent);
	text-decoration: underline;
	text-underline-offset: 7px;
}

.header-book {
	gap: 8px;
	min-height: 48px;
	padding: 9px 19px;
	font-size: 0.9rem;
}

.menu-button {
	display: none;
	min-height: 44px;
	padding: 8px 12px;
	background: transparent;
	color: var(--fg-color-text);
	border: 1px solid var(--fg-color-line);
}

.nav .current-menu-ancestor > a {
	color: var(--fg-color-accent);
	text-decoration: underline;
	text-underline-offset: 7px;
}

.submenu-toggle {
	display: none;
}

@media (min-width: 1181px) {
	.nav .menu-item-has-children {
		position: relative;
		display: flex;
		align-items: center;
	}

	.menu-ready .submenu-toggle {
		display: inline-grid;
		place-items: center;
		width: 32px;
		height: 44px;
		margin-right: -10px;
		padding: 0;
		background: transparent;
		color: inherit;
		border: 0;
		cursor: pointer;
	}

	.submenu-toggle svg {
		transition: transform 160ms var(--fg-ease-out);
	}

	.submenu-toggle[aria-expanded="true"] svg {
		transform: rotate(180deg);
	}

	.nav .sub-menu {
		position: absolute;
		top: calc(100% + 10px);
		left: -20px;
		z-index: var(--fg-layer-menu);
		display: block;
		min-width: 200px;
		padding: 8px 20px;
		background: var(--fg-color-bg);
		border: 1px solid var(--fg-color-header-line);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-4px);
		transform-origin: top left;
		transition: opacity 160ms var(--fg-ease-out), transform 160ms var(--fg-ease-out), visibility 0s linear 160ms;
	}

	.nav .sub-menu::before {
		content: "";
		position: absolute;
		inset: -11px 0 auto;
		height: 11px;
	}

	html:not(.menu-ready) .nav .sub-menu {
		transition-delay: 150ms, 150ms, 310ms;
	}

	html:not(.menu-ready) .nav .menu-item-has-children:hover > .sub-menu,
	html:not(.menu-ready) .nav .menu-item-has-children:focus-within > .sub-menu,
	.nav .menu-item-has-children.is-open > .sub-menu {
		opacity: 1;
		visibility: visible;
		transform: none;
		transition-delay: 0s;
	}

	.nav .sub-menu a {
		padding: 10px 0;
	}
}

/* Footer */

.site-footer {
	padding: 70px 0 30px;
	background: var(--fg-color-surface);
	border-top: 1px solid var(--fg-color-header-line);
}

.footer-top {
	display: grid;
	grid-template-columns: 1.2fr 1fr 1fr;
	gap: 60px;
	padding-bottom: 50px;
}

.footer-top > * {
	min-width: 0;
}

.footer-wordmark {
	max-width: 330px;
	margin-top: -42px;
	margin-left: -51px;
	filter: var(--fg-logo-filter);
}

.footer-top p {
	margin: 0 0 8px;
}

.footer-top nav ul {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 24px;
	align-content: start;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-top a {
	display: inline-flex;
	min-width: 44px;
	min-height: 44px;
	align-items: center;
	text-decoration: none;
}

.footer-bottom {
	display: flex;
	justify-content: space-between;
	gap: 30px;
	padding-top: 22px;
	border-top: 1px solid var(--fg-color-line);
	color: var(--fg-color-muted);
	font-size: 0.85rem;
}

.footer-bottom a {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
}

/* Home: hero */

.home-hero {
	position: relative;
	display: grid;
	min-height: clamp(560px, 84svh, 880px);
	color: var(--fg-color-action-text);
	isolation: isolate;
}

.hero-photo {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
	background: var(--fg-color-action);
	clip-path: url("#hero-wave");
}

.hero-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 77% 100%;
}

.hero-photo::after {
	position: absolute;
	inset: 0;
	content: "";
	background:
		linear-gradient(to top, rgb(38 28 20 / 35%) 0%, rgb(38 28 20 / 15%) 30%, rgb(38 28 20 / 0%) 55%),
		linear-gradient(to right, rgb(38 28 20 / 70%) 0%, rgb(38 28 20 / 45%) 35%, rgb(38 28 20 / 0%) 60%);
}

.hero-inner {
	display: flex;
	width: 100%;
	align-items: flex-end;
	justify-content: space-between;
	gap: 48px;
	padding-top: 96px;
	padding-bottom: clamp(72px, 9vw, 120px);
}

.hero-copy {
	position: relative;
	max-width: 680px;
}

.hero-copy h1 {
	font-size: clamp(3.3rem, 6vw, 5.65rem);
	color: inherit;
}

.hero-copy p {
	max-width: 420px;
	margin: 24px 0 32px;
	font-size: 1.0625rem;
}

.place {
	display: block;
	margin-bottom: 24px;
	font-size: 0.95rem;
	font-weight: 500;
}

.home-hero .button {
	background: var(--fg-color-action-text);
	color: var(--fg-color-action);
}

.home-hero .text-link {
	color: inherit;
	border-bottom-color: currentcolor;
}

.hero-address {
	flex-shrink: 0;
	font-size: 0.875rem;
	line-height: 1.6;
	text-align: right;
}

.hero-wave-defs {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

@keyframes fg-hero-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
}

@media (prefers-reduced-motion: no-preference) {
	.hero-copy,
	.page-hero > div:not(.portrait) {
		animation: fg-hero-in 260ms var(--fg-ease-out) backwards;
	}
}

/* Home: studio window sentences */

.window {
	padding-block: clamp(56px, 8vw, 112px) clamp(96px, 11vw, 160px);
}

.window-lines {
	display: grid;
	gap: clamp(20px, 3vw, 44px);
	max-width: 1080px;
}

.window-line {
	max-width: 22ch;
	margin: 0;
	font-family: var(--fg-font-display);
	font-size: clamp(1.9rem, 4vw, 3.5rem);
	line-height: 1.2;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.window-line:nth-child(3n + 2) {
	margin-left: clamp(0px, 9vw, 130px);
}

.window-line:nth-child(3n) {
	margin-left: clamp(0px, 18vw, 260px);
	max-width: 26ch;
}

.window-line:nth-child(4) {
	margin-left: clamp(0px, 27vw, 390px);
}

/* Home: intro with the wall wave */

.intro {
	position: relative;
	margin-top: 54px;
	padding-top: 56px;
	background: var(--fg-color-surface);
}

.intro-inner {
	max-width: 1020px;
}

.intro h2 {
	max-width: 900px;
	font-size: clamp(2.5rem, 4.5vw, 4.25rem);
	line-height: 1.2;
}

.intro p {
	max-width: 520px;
	margin-top: 48px;
	margin-left: auto;
}

.wall-wave {
	position: absolute;
	top: -94px;
	left: 0;
	width: 100%;
	height: 96px;
	overflow: visible;
	pointer-events: none;
}

.wall-wave path {
	fill: var(--fg-color-surface);
}

.wall-wave .wave-light {
	fill: none;
	stroke: var(--fg-color-wave-line);
	stroke-width: 2;
	filter: drop-shadow(0 -3px 4px var(--fg-color-wave-glow));
}

/* Home: services */

.pathways {
	display: grid;
	grid-template-columns: 1.2fr 0.85fr;
	gap: 8vw;
	align-items: center;
}

.pathways-main img {
	height: 500px;
	object-position: 50% 60%;
}

.pathways-main .pathways-link {
	display: flex;
	min-height: 44px;
	align-items: center;
	justify-content: space-between;
	margin-top: 24px;
	text-decoration: none;
}

.pathways-main h3 {
	margin: 0;
}

.pathways-main p {
	margin: 12px 0 0;
	font-size: 0.95rem;
}

.pathways-side {
	display: grid;
	gap: 60px;
}

.pathway {
	display: grid;
	grid-template-columns: 120px 1fr;
	gap: 26px;
	align-items: center;
}

.pathway img {
	height: 180px;
}

.pathway h3 {
	margin-bottom: 12px;
}

.pathway p {
	margin-bottom: 16px;
	font-size: 0.95rem;
}

/* Home: next classes */

.next-section {
	background: var(--fg-color-surface);
}

.next-section .section-title {
	margin-bottom: 34px;
}

.next-times {
	display: flex;
	flex-direction: column;
}

.next-time {
	display: grid;
	grid-template-columns: 160px 1.3fr 1fr auto;
	align-items: center;
	gap: 24px;
	padding: 22px 0;
	border-top: 1px solid var(--fg-color-line);
	text-decoration: none;
}

.next-time time {
	font-size: 1.3rem;
	font-variant-numeric: tabular-nums;
}

.next-time time small {
	display: block;
	font-size: 0.85rem;
}

.next-time .class-name {
	font-size: 1.08rem;
}

.next-time .trainer {
	color: var(--fg-color-muted);
}

.next-time .time-action {
	color: var(--fg-color-accent);
	font-weight: 600;
}

.next-times + .text-link {
	margin-top: 28px;
}

/* Home: Founding Members */

.member-grid {
	display: grid;
	grid-template-columns: 0.7fr 1fr;
	gap: 12vw;
	align-items: start;
}

.member-photo {
	position: relative;
	padding-top: 80px;
}

.member-photo img {
	height: 540px;
	object-position: center;
	clip-path: inset(0 round 220px 220px 0 0);
}

.member-form {
	padding-top: 24px;
}

/* FAQ */

.question-list {
	max-width: 920px;
	margin: auto;
}

.question-list h2 {
	margin-bottom: 40px;
}

details {
	border-top: 1px solid var(--fg-color-line);
	padding: 0;
}

details:last-child {
	border-bottom: 1px solid var(--fg-color-line);
}

summary {
	position: relative;
	min-height: 60px;
	padding: 23px 40px 23px 0;
	list-style: none;
	cursor: pointer;
	font-size: 1.08rem;
	font-weight: 500;
}

summary::-webkit-details-marker {
	display: none;
}

summary::after {
	content: "+";
	position: absolute;
	right: 0;
	top: 19px;
	font-size: 1.5rem;
	color: var(--fg-color-accent);
}

details[open] summary::after {
	content: "\2212";
}

details p {
	max-width: 720px;
	padding: 0 32px 10px 0;
	color: var(--fg-color-muted);
}

/* Hover, only where a fine pointer exists */

@media (hover: hover) and (pointer: fine) {
	.button:hover {
		transform: translateY(-2px);
	}

	.nav a:hover,
	.text-link:hover,
	.fg-prices__book:hover,
	.next-time:hover .time-action {
		color: var(--fg-color-accent);
	}

	.next-time:hover {
		background: var(--fg-color-surface-alt);
	}

	.next-time:hover .trainer {
		color: var(--fg-color-text);
	}
}

/* Narrow desktop and tablet: the menu collapses */

@media (max-width: 1180px) {
	.header-inner {
		gap: 20px;
		padding-inline: 28px;
	}

	.header-book {
		order: 2;
		margin-left: auto;
	}

	.js .menu-button {
		display: block;
		order: 3;
	}

	.js .nav {
		display: none;
		position: absolute;
		top: 104px;
		left: 0;
		right: 0;
		z-index: var(--fg-layer-menu);
		max-height: calc(100dvh - 104px);
		margin: 0;
		padding: 24px var(--fg-gutter) 32px;
		overflow: auto;
		background: var(--fg-color-surface);
	}

	.js .nav.is-open {
		display: block;
	}

	.js .nav ul {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.js .nav a {
		padding: 10px 0;
		font-family: var(--fg-font-display);
		font-size: 1.65rem;
	}

	.js .nav .sub-menu {
		margin: -2px 0 8px;
		padding-left: 24px;
		border-left: 1px solid var(--fg-color-header-line);
	}

	.js .nav .sub-menu a {
		padding: 8px 0;
		font-size: 1.2rem;
	}

	html:not(.js) .site-header {
		height: auto;
		min-height: 104px;
	}

	html:not(.js) .header-inner {
		flex-wrap: wrap;
		padding-block: 12px;
	}

	html:not(.js) .nav {
		order: 3;
		flex-basis: 100%;
		margin-left: 0;
	}

	html:not(.js) .nav ul {
		flex-wrap: wrap;
		gap: 0 20px;
	}

	html:not(.js) .nav .menu-item-has-children {
		display: flex;
		flex-wrap: wrap;
		gap: 0 20px;
	}

	html:not(.js) .nav .sub-menu a {
		font-size: 0.85rem;
	}

	.pathways {
		gap: 6vw;
	}

	.member-grid {
		gap: 8vw;
	}

	.footer-top {
		gap: 30px;
	}
}

@media (max-width: 950px) {
	.pathways {
		grid-template-columns: 1fr 1fr;
		gap: 35px;
	}

	.pathways-main img {
		height: 430px;
	}

	.pathway {
		grid-template-columns: 80px 1fr;
		gap: 20px;
	}

	.pathway img {
		height: 160px;
	}

	.next-time {
		grid-template-columns: 120px 1fr auto;
	}

	.next-time .trainer {
		grid-column: 2;
		grid-row: 2;
		margin-top: -20px;
		font-size: 0.9rem;
	}

	.next-time .time-action {
		grid-column: 3;
		grid-row: 1 / 3;
	}
}

@media (max-width: 700px) {
	:root {
		--fg-gutter: 22px;
	}

	html {
		scroll-padding-top: 100px;
	}

	.site-header {
		height: 84px;
	}

	.header-inner {
		gap: 10px;
		padding-inline: 16px;
	}

	.logo {
		flex-basis: 155px;
		width: 155px;
		height: 62px;
	}

	.logo img {
		left: -36px;
		top: -48px;
		width: 228px;
	}

	.header-book {
		min-height: 44px;
		padding: 9px 11px;
		font-size: 0.84rem;
	}

	.menu-button {
		padding: 8px;
		font-size: 0.85rem;
	}

	.js .nav {
		top: 84px;
		max-height: calc(100dvh - 84px);
	}

	.home-hero {
		min-height: min(640px, 88svh);
	}

	.hero-inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 28px;
		padding-top: 72px;
		padding-bottom: 64px;
	}

	.hero-photo::after {
		background: linear-gradient(to top, rgb(38 28 20 / 25%) 0%, rgb(38 28 20 / 75%) 20%, rgb(38 28 20 / 50%) 60%, rgb(38 28 20 / 10%) 100%);
	}

	.place {
		margin-bottom: 18px;
	}

	.hero-copy h1 {
		font-size: clamp(3rem, 13vw, 4.5rem);
	}

	.hero-copy p {
		margin: 18px 0 24px;
	}

	.hero-copy .actions {
		gap: 20px;
	}

	.hero-copy .button {
		padding-inline: 20px;
	}

	.hero-address {
		text-align: left;
	}

	.window {
		padding-block: 40px 88px;
	}

	.intro {
		margin-top: 46px;
		padding-top: 30px;
	}

	.intro h2 {
		font-size: 2.5rem;
	}

	.intro p {
		margin-top: 32px;
	}

	.wall-wave {
		top: -63px;
		height: 65px;
	}

	.section {
		padding-block: 64px;
	}

	.section-title {
		margin-bottom: 32px;
	}

	.pathways {
		grid-template-columns: 1fr;
		gap: 44px;
	}

	.pathways-main img {
		height: 370px;
	}

	.pathways-side {
		gap: 38px;
	}

	.pathway {
		grid-template-columns: 104px 1fr;
		gap: 25px;
	}

	.pathway img {
		height: 185px;
	}

	.pathway h3 {
		font-size: 2rem;
	}

	.next-time {
		grid-template-columns: 85px 1fr;
		gap: 14px;
		padding-block: 20px;
	}

	.next-time .class-name {
		font-size: 1rem;
	}

	.next-time time {
		font-size: 1.2rem;
	}

	.next-time time small {
		font-size: 0.8rem;
	}

	.next-time .trainer {
		margin-top: -10px;
		font-size: 0.875rem;
	}

	.next-time .time-action {
		grid-column: 2;
		grid-row: 3;
		margin-top: -9px;
		font-size: 0.875rem;
	}

	.member-grid {
		display: flex;
		flex-direction: column-reverse;
		gap: 40px;
	}

	.member-photo {
		width: 70%;
		padding: 0;
	}

	.member-photo img {
		height: 350px;
	}

	.member-form {
		width: 100%;
		padding-top: 0;
	}

	.question-list h2 {
		font-size: 2.5rem;
	}

	.site-footer {
		padding: 50px 0 40px;
	}

	.footer-top {
		grid-template-columns: 1fr 1fr;
		gap: 40px 22px;
	}

	.footer-top > div:first-child {
		grid-column: 1 / -1;
	}

	.footer-top nav ul {
		grid-template-columns: 1fr;
	}

	.footer-wordmark {
		max-width: 300px;
		margin-top: -40px;
		margin-left: -47px;
	}

	.footer-bottom {
		display: block;
	}

	.footer-bottom span {
		display: block;
		margin-bottom: 8px;
	}

	button,
	input,
	textarea,
	select {
		scroll-margin-block: 100px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.button {
		transition: opacity 120ms ease;
	}

	.nav .sub-menu {
		transform: none;
	}

	.submenu-toggle svg {
		transition: none;
	}

	.button:active,
	.button:hover {
		transform: none;
	}

	.wall-wave .wave-light {
		filter: none;
	}
}
