/* Rift Valley — Odin-style flowing hero and rounded panels. */

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	overflow-x: clip;
	padding-top: 5.5rem;
}

body.home,
body:has(.rift-flow-hero),
.editor-styles-wrapper:has(.rift-flow-hero) {
	padding-top: 0 !important;
}

/* WordPress block-gap leaves a stone strip above the photo. Kill it. */
body.home .wp-site-blocks,
body:has(.rift-flow-hero) .wp-site-blocks,
.editor-styles-wrapper:has(.rift-flow-hero) {
	padding-top: 0 !important;
	gap: 0 !important;
	row-gap: 0 !important;
}

body.home .wp-site-blocks > * + *,
body:has(.rift-flow-hero) .wp-site-blocks > * + *,
body:has(.rift-flow-hero) main,
body:has(.rift-flow-hero) .wp-block-group:has(> .rift-flow-hero),
.editor-styles-wrapper:has(.rift-flow-hero) > * + * {
	margin-top: 0 !important;
	margin-block-start: 0 !important;
}

/*
 * Pin the header wrapper itself. A height:0 parent makes the links
 * visible but not clickable in Chrome.
 */
.wp-block-template-part:has(.rift-header),
header.wp-block-template-part {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	width: 100%;
	max-width: none;
	height: auto;
	margin: 0;
	padding: 0;
	overflow: visible;
	background: transparent;
	min-height: 4.75rem;
	pointer-events: auto;
}

.wp-block-template-part:has(.rift-header) .rift-header,
header.wp-block-template-part .rift-header {
	position: relative !important;
	top: auto;
	left: auto;
	right: auto;
}

#about,
#visit,
#contact {
	scroll-margin-top: 6rem;
}

/* Floating pill header over the flowing photo. */
.rift-header {
	position: fixed !important;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	background: transparent !important;
	pointer-events: auto !important;
	padding-top: max(0.75rem, env(safe-area-inset-top)) !important;
	padding-right: max(0.75rem, env(safe-area-inset-right)) !important;
	padding-bottom: 0 !important;
	padding-left: max(0.75rem, env(safe-area-inset-left)) !important;
}

.rift-header-inner {
	max-width: 1180px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: nowrap;
	gap: 0.5rem;
	background: #214e20;
	color: #fff;
	border-radius: 999px;
	padding: 0.45rem 0.7rem 0.45rem 0.85rem;
	box-shadow: 0 12px 32px rgba(33, 78, 32, 0.28);
}

.rift-brand {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	min-width: 0;
}

.rift-header-nav {
	display: flex;
	align-items: center;
	gap: 1.1rem;
	flex-wrap: wrap;
}

.rift-header-nav a {
	color: #fff !important;
	text-decoration: none;
	font-size: 0.95rem;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	pointer-events: auto;
	position: relative;
	z-index: 2;
	cursor: pointer;
}

.rift-header-nav a:hover {
	color: #e0a231 !important;
}

.rift-nav-toggle-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.rift-nav-toggle {
	display: none;
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	z-index: 1200;
	position: relative;
}

.rift-nav-toggle span,
.rift-nav-toggle span::before,
.rift-nav-toggle span::after {
	display: block;
	width: 22px;
	height: 2px;
	background: #fff;
	border-radius: 2px;
	position: relative;
}

.rift-nav-toggle span::before,
.rift-nav-toggle span::after {
	content: "";
	position: absolute;
	left: 0;
}

.rift-nav-toggle span::before { top: -7px; }
.rift-nav-toggle span::after { top: 7px; }

#rift-nav-toggle:checked + .rift-nav-toggle span { background: transparent; }
#rift-nav-toggle:checked + .rift-nav-toggle span::before {
	top: 0;
	transform: rotate(45deg);
}
#rift-nav-toggle:checked + .rift-nav-toggle span::after {
	top: 0;
	transform: rotate(-45deg);
}

.rift-header .wp-block-site-logo img {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
}

.rift-header .wp-block-site-title a,
.rift-header .wp-block-navigation a,
.rift-header .wp-block-navigation-item__content {
	color: #fff !important;
	text-decoration: none;
}

.rift-header .wp-block-site-title {
	font-size: 1.15rem;
}

.rift-header .wp-block-buttons .wp-block-button__link {
	white-space: nowrap;
	border-radius: 999px;
	padding: 0.55rem 1.15rem;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

.wp-block-button .wp-block-button__link,
.rift-cta .wp-block-button__link {
	background-color: #e0a231 !important;
	color: #214e20 !important;
	border-radius: 12px;
	padding: 0.85rem 1.6rem;
	font-weight: 700;
	min-height: 44px;
	touch-action: manipulation;
}

/* Full-bleed flowing gym photos. */
img,
video,
iframe {
	max-width: 100%;
}

.rift-flow-hero {
	position: relative;
	isolation: isolate;
	min-height: 115vh;
	min-height: 115svh;
	display: flex !important;
	flex-direction: column !important;
	justify-content: flex-end !important;
	align-items: stretch !important;
	overflow: hidden;
	color: #fff;
	background-color: #162816;
	width: auto;
	max-width: none !important;
	padding: 0 !important;
	margin-top: calc(-1 * var(--wp--style--block-gap, 0px)) !important;
	margin-left: calc(-1 * var(--wp--style--root--padding-left, 0px));
	margin-right: calc(-1 * var(--wp--style--root--padding-right, 0px));
}

/* Keep photos pinned behind the text, including editor wrappers. */
.rift-flow-hero .rift-flow-slides,
.rift-flow-hero .rift-flow-shade,
.rift-flow-hero .wp-block-html,
.rift-flow-hero > .wp-block:has(.rift-flow-slides),
.editor-styles-wrapper .rift-flow-hero .block-editor-block-list__block:has(.rift-flow-slides) {
	position: absolute !important;
	inset: 0 !important;
	z-index: 0;
	margin: 0 !important;
	padding: 0 !important;
	width: auto !important;
	max-width: none !important;
	height: auto !important;
	min-height: 100% !important;
	overflow: hidden;
	pointer-events: none;
	border: 0 !important;
}

.rift-flow-slides {
	transform-origin: center top;
	will-change: transform;
}

.rift-flow-slides img {
	position: absolute;
	inset: -8%;
	width: 116%;
	height: 116%;
	max-width: none !important;
	object-fit: cover;
	object-position: center;
	margin: 0;
	opacity: 0;
	will-change: opacity, transform;
	backface-visibility: hidden;
	animation: rift-fade 24s infinite ease-in-out, rift-pan 24s infinite alternate ease-in-out;
}

.rift-flow-slides img:nth-child(1) {
	opacity: 1;
	animation-name: rift-fade-first, rift-pan;
	animation-delay: 0s, 0s;
}

.rift-flow-slides img:nth-child(2) { animation-delay: 8s, -6s; }
.rift-flow-slides img:nth-child(3) { animation-delay: 16s, -12s; }

@keyframes rift-fade {
	0% { opacity: 0; }
	16% { opacity: 1; }
	33% { opacity: 1; }
	50% { opacity: 0; }
	100% { opacity: 0; }
}

@keyframes rift-fade-first {
	0%,
	33% { opacity: 1; }
	50%,
	100% { opacity: 0; }
}

@keyframes rift-pan {
	0% { transform: scale(1.04) translate3d(0, 0, 0); }
	100% { transform: scale(1.12) translate3d(-2%, -1.5%, 0); }
}

.rift-flow-shade,
.rift-flow-hero .rift-flow-shade {
	z-index: 1 !important;
	background: linear-gradient(to top, rgba(18, 40, 18, 0.88) 0%, rgba(18, 40, 18, 0.42) 45%, rgba(18, 40, 18, 0.12) 78%, rgba(18, 40, 18, 0.06) 100%);
}

.rift-flow-copy {
	position: relative;
	z-index: 2;
	padding: 0 6vw 9vh;
	max-width: 1100px;
	width: 100%;
	pointer-events: auto;
	margin-top: auto;
}

.rift-flow-copy .rift-kicker {
	font-family: Oswald, Inter, sans-serif;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-size: 0.95rem;
	margin: 0 0 0.85rem;
	color: #e0a231 !important;
}

.rift-flow-copy h1,
.rift-flow-copy .wp-block-heading {
	font-family: Oswald, Inter, sans-serif;
	font-weight: 700;
	text-transform: uppercase;
	font-size: clamp(3rem, 8vw, 6.6rem);
	line-height: 0.9;
	letter-spacing: -0.02em;
	margin: 0 0 1.1rem;
	color: #fff !important;
}

.rift-flow-copy p {
	max-width: 38rem;
	font-size: 1.15rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.82);
	margin: 0 0 1.6rem;
}

/* Full-bleed text boxes, same width as the cycling photos, with a stone gap between them. */
.rift-panel {
	background: #214e20;
	color: #fff;
	border-radius: 28px;
	overflow: hidden;
	width: auto;
	max-width: none !important;
	margin-top: 1.75rem !important;
	margin-bottom: 1.75rem !important;
	margin-left: calc(-1 * var(--wp--style--root--padding-left, 0px));
	margin-right: calc(-1 * var(--wp--style--root--padding-right, 0px));
	padding-left: 6vw !important;
	padding-right: 6vw !important;
}

.rift-panel h2,
.rift-display {
	font-family: Oswald, Inter, sans-serif;
	font-weight: 700;
	text-transform: uppercase;
	font-size: clamp(2.4rem, 6vw, 5.2rem);
	line-height: 0.95;
	letter-spacing: -0.02em;
	color: #fff;
	margin: 0 0 1rem;
}

.rift-panel h3 {
	font-family: Oswald, Inter, sans-serif;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #fff;
	font-size: 1.35rem;
	margin: 0 0 0.65rem;
}

.rift-panel p,
.rift-panel a {
	color: rgba(255, 255, 255, 0.78);
}

.rift-panel a:hover {
	color: #e0a231;
}

.rift-panel > .wp-block-image {
	margin: 0 -6vw;
	width: calc(100% + 12vw);
	max-width: none;
}

.rift-panel > .wp-block-image img,
.rift-panel-photo img {
	display: block;
	width: 100%;
	height: min(42vw, 420px);
	object-fit: cover;
}

.rift-panel > .wp-block-group,
.rift-panel > .wp-block-columns {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.rift-panel .rift-panel {
	background: transparent;
	margin: 0 !important;
	border-radius: 0;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.rift-info-card {
	height: 100%;
}

.rift-info-card p {
	margin: 0;
}

.rift-testimonial {
	height: 100%;
}

.rift-testimonial p {
	margin: 0;
	color: rgba(255, 255, 255, 0.78);
}

.rift-testimonial .rift-testimonial-name {
	margin-top: 1.25rem;
	font-family: Oswald, Inter, sans-serif;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #e0a231;
}

.rift-testimonial .rift-stars {
	letter-spacing: 0.15em;
	color: #e0a231;
	margin-top: 0.25rem;
}

.wp-block-post-title {
	font-family: Oswald, Inter, sans-serif;
	font-weight: 700;
	text-transform: uppercase;
	font-size: clamp(2.4rem, 6vw, 4.6rem);
	line-height: 0.95;
	letter-spacing: -0.02em;
	margin: 0 0 1.25rem;
}

.rift-panel .wp-block-post-title {
	color: #fff;
}

.rift-footer {
	border-top: 1px solid rgba(33, 78, 32, 0.15);
	padding: 2.5rem 1.5rem 3rem;
}

.rift-page-main {
	padding: 1.5rem 0 4rem;
}

.rift-footer a {
	text-decoration: none;
}

.rift-footer a:hover {
	text-decoration: underline;
}

.rift-hero-photo img,
.rift-team-photo img {
	border-radius: 28px;
	border: 3px solid rgba(255, 255, 255, 0.18);
	width: 100%;
	height: auto;
	object-fit: cover;
}

form.rift-lead-form {
	background: #fff;
	border-radius: 24px;
	padding: 1.5rem;
	margin: 1.5rem auto 0;
	max-width: 36rem;
}

.rift-lead-form input[type="text"],
.rift-lead-form input[type="email"],
.rift-lead-form input[type="tel"],
.rift-lead-form input[type="number"],
.rift-lead-form input[type="url"],
.rift-lead-form select,
.rift-lead-form textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	border: 1px solid #214e20;
	border-radius: 10px;
	padding: 0.75rem 0.9rem;
	background: #f5f6f5;
	color: #214e20;
	font-family: inherit;
	font-size: 16px;
}

.rift-lead-form,
.rift-lead-form p,
.rift-lead-form a,
.rift-lead-form label,
.rift-lead-form em {
	color: #214e20;
}

.rift-lead-form textarea { min-height: 8rem; }
.rift-lead-form label { display: block; margin-bottom: 0.35rem; font-weight: 600; }
.rift-lead-form .rift-sms-optin {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	font-weight: 400;
	font-size: 0.9rem;
	line-height: 1.45;
}
.rift-lead-form input[type="checkbox"] {
	width: 1.1rem;
	height: 1.1rem;
	margin-top: 0.2rem;
	flex-shrink: 0;
}
.rift-lead-form .g-recaptcha {
	margin: 1rem 0;
}
.rift-lead-form p,
.rift-lead-form .gfield,
.rift-lead-form .wpforms-field,
.rift-lead-form .form-group { margin-bottom: 1rem; }

.rift-lead-form button,
.rift-lead-form input[type="submit"] {
	background: #e0a231;
	color: #214e20;
	border: 0;
	border-radius: 12px;
	font-weight: 700;
	padding: 0.85rem 1.5rem;
	min-height: 48px;
	cursor: pointer;
	touch-action: manipulation;
}

a[href^="mailto:"],
a[href^="tel:"] {
	overflow-wrap: anywhere;
	word-break: break-word;
}

.rift-lead-form iframe,
.wodify-embed iframe {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 520px;
	border: 0;
}

.wodify-embed iframe {
	min-height: 700px;
	background: #fff;
}

@media (max-width: 900px) {
	.wp-block-navigation__responsive-container-open {
		display: flex !important;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 8px;
		color: #fff;
		background: transparent;
		border: 0;
	}

	.wp-block-navigation__responsive-container-open svg {
		width: 28px;
		height: 28px;
		fill: currentColor;
	}

	.wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none !important;
	}

	.wp-block-navigation__responsive-container.is-menu-open {
		position: fixed;
		inset: 0;
		background: #214e20 !important;
		padding: max(5.5rem, calc(env(safe-area-inset-top) + 4.5rem)) 1.5rem 2rem;
		overflow-y: auto;
		z-index: 100;
	}

	.wp-block-navigation__responsive-container-close {
		width: 44px;
		height: 44px;
		color: #fff;
		top: max(0.75rem, env(safe-area-inset-top));
		right: max(0.75rem, env(safe-area-inset-right));
	}

	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
		width: 100%;
	}

	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
		display: flex;
		align-items: center;
		min-height: 48px;
		padding: 0.85rem 0;
		font-size: 1.35rem;
		font-weight: 600;
		border-bottom: 1px solid rgba(255, 255, 255, 0.12);
		color: #fff !important;
	}

	.rift-header .wp-block-site-title {
		display: none;
	}

	.rift-header-inner {
		border-radius: 999px;
		padding: 0.3rem 0.4rem 0.3rem 0.4rem;
		gap: 0.35rem;
	}

	.rift-header .wp-block-site-logo img {
		width: 40px;
		height: 40px;
	}

	.rift-header .wp-block-buttons .wp-block-button__link {
		padding: 0.45rem 0.85rem;
		font-size: 0.85rem;
	}

	.rift-nav-toggle { display: flex; }

	.rift-header-nav {
		display: none;
		position: fixed;
		inset: 0;
		z-index: 1100;
		background: #214e20;
		flex-direction: column;
		justify-content: flex-start;
		gap: 0;
		padding: max(5.5rem, calc(env(safe-area-inset-top) + 4.5rem)) 1.5rem 2rem;
		overflow-y: auto;
	}

	#rift-nav-toggle:checked ~ .rift-header-nav {
		display: flex;
	}

	body:has(#rift-nav-toggle:checked) {
		overflow: hidden;
	}

	.rift-header-nav a {
		font-size: 1.45rem;
		font-weight: 600;
		width: 100%;
		min-height: 52px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	}

	.rift-flow-copy {
		padding: 0 1.15rem max(4.75rem, calc(env(safe-area-inset-bottom) + 3.5rem));
	}

	.rift-flow-copy h1,
	.rift-flow-copy .wp-block-heading {
		font-size: clamp(2.35rem, 12vw, 3.4rem);
		hyphens: none;
		overflow-wrap: break-word;
	}

	.rift-flow-copy p {
		font-size: 1.02rem;
		margin-bottom: 1.25rem;
	}

	.rift-flow-copy .rift-kicker {
		font-size: 0.78rem;
		letter-spacing: 0.1em;
	}

	.rift-panel {
		border-radius: 22px;
		margin-top: 1.25rem !important;
		margin-bottom: 1.25rem !important;
		margin-left: calc(-1 * var(--wp--style--root--padding-left, 0px));
		margin-right: calc(-1 * var(--wp--style--root--padding-right, 0px));
	}

	.rift-panel h2,
	.rift-display,
	.wp-block-post-title {
		font-size: clamp(2rem, 10vw, 2.8rem);
	}

	.rift-panel h3 {
		font-size: 1.15rem;
	}

	.rift-panel > .wp-block-group,
	.rift-panel > .wp-block-columns {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	.rift-panel > .wp-block-image img,
	.rift-panel-photo img {
		height: 210px;
	}

	.wp-block-columns {
		flex-direction: column;
		gap: 1.35rem;
	}

	.wp-block-column {
		flex-basis: 100% !important;
		width: 100%;
	}

	.rift-team-photo img {
		border-radius: 18px;
	}

	.wodify-embed iframe,
	.rift-lead-form iframe {
		min-height: 420px;
	}

	.rift-lead-form button,
	.rift-lead-form input[type="submit"],
	.wp-block-button .wp-block-button__link {
		width: 100%;
		justify-content: center;
		text-align: center;
	}

	.rift-header .wp-block-buttons,
	.rift-header .wp-block-button,
	.rift-header .wp-block-button .wp-block-button__link {
		width: auto;
	}

	.rift-footer {
		padding-left: 0.25rem;
		padding-right: 0.25rem;
	}

	.rift-footer .wp-block-columns {
		text-align: left;
	}

	.rift-footer a {
		display: inline-block;
		min-height: 44px;
		padding-top: 0.35rem;
	}
}

@media (max-width: 480px) {
	.wp-site-blocks {
		padding-left: 0.75rem !important;
		padding-right: 0.75rem !important;
	}

	body {
		padding-top: 4.75rem;
		font-size: 16px;
	}

	body.home,
	body:has(.rift-flow-hero) {
		padding-top: 0 !important;
	}

	.rift-header {
		padding-top: max(0.55rem, env(safe-area-inset-top)) !important;
		padding-left: max(0.55rem, env(safe-area-inset-left)) !important;
		padding-right: max(0.55rem, env(safe-area-inset-right)) !important;
	}
}

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

	.rift-flow-slides img {
		animation: none;
		opacity: 0;
		transform: none;
	}

	.rift-flow-slides img:first-child {
		opacity: 1;
	}
}
