/* =========================================================
   O nas Solofit
   Five full-height sections, alternating dark and light,
   with a background film in the opening one, image frames
   and scroll-linked motion.

   "Full height" is --sf-screen from snippet 10385: the screen
   height in pixels, fixed while the page is open. Never vh or
   svh, which follow a phone's browser bars and made sections
   jump on iPhone.
   ========================================================= */

[data-sfa] {
	--sfa-dark: #0D0D0D;
	--sfa-surface: #111111;
	--sfa-cream: #f2f0eb;
	--sfa-ink: #111111;
	--sfa-accent: #F2B705;

	--sfa-display: "Chakra Petch", "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--sfa-body: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	--sfa-gutter: clamp(1.25rem, 5vw, 3rem);
	--sfa-delay: 0ms;
	--sfa-screen: var(--sf-screen, 820px);
}

[data-sfa] *,
[data-sfa] *::before,
[data-sfa] *::after {
	box-sizing: border-box;
}

/* ---------- section shell ---------- */

.sfa {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 100%;
	min-height: var(--sfa-screen);
	overflow: hidden;
	padding: clamp(4rem, calc(var(--sfa-screen) * .09), 7rem) var(--sfa-gutter);
	background: var(--sfa-dark);
	color: var(--sfa-cream);
}

.sfa--light {
	background: var(--sfa-cream);
	color: var(--sfa-ink);
}

.sfa__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1140px;
	margin-inline: auto;
}

.sfa__inner--narrow {
	max-width: 820px;
}

.sfa__inner--center {
	text-align: center;
}

/* ---------- background layer + parallax ---------- */

/* 10% of extra height top and bottom gives the parallax somewhere to travel
   without exposing an edge. */
.sfa__bg {
	position: absolute;
	top: -10%;
	bottom: -10%;
	left: 0;
	right: 0;
	z-index: 0;
	overflow: hidden;
	background: var(--sfa-dark);
	will-change: transform;
}

/* Elementor's own `.elementor img { height: auto }` outranks a single class.
   It left every photo at its natural height: on a phone the mission photo
   was a strip across the top of a dark section, and the portrait stopped
   short of its frame. Two classes plus absolute positioning make each image,
   and the film, fill its box whatever the theme says. */
[data-sfa] .sfa__bg-img,
[data-sfa] .sfa__bg-video,
[data-sfa] .sfa__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	object-position: center;
}

/* The film sits over the still and fades in once it is actually playing,
   so a slow start, a refused autoplay or a data-saving phone all simply
   leave the photo. */
[data-sfa] .sfa__bg-video {
	opacity: 0;
	transition: opacity .8s ease;
}

[data-sfa] .sfa__bg-video.is-playing {
	opacity: 1;
}

/* No photo yet: there is nothing to parallax, and pinning the layer keeps the
   hint inside the section instead of drifting into the clipped overflow.
   Both revert on their own once a real image is set. */
.sfa__bg:has(.sfa__bg-ph) {
	top: 0;
	bottom: 0;
	transform: none !important;
}

/* Bottom-right, so the label never lands on top of the copy. */
.sfa__bg-ph {
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	width: 100%;
	height: 100%;
	padding: clamp(1.25rem, 4vw, 3rem);
	background-color: #232323;
	background-image: repeating-linear-gradient(
		135deg,
		rgba(242, 240, 235, .09) 0 2px,
		transparent 2px 14px
	);
}

.sfa__bg-ph .sfa__ph-label {
	color: rgba(242, 240, 235, .8);
}

.sfa__scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(180deg, rgba(13, 13, 13, .72) 0%, rgba(13, 13, 13, .38) 40%, rgba(13, 13, 13, .82) 100%);
}

.sfa__scrim--deep {
	background:
		radial-gradient(110% 80% at 50% 50%, rgba(13, 13, 13, .5) 0%, rgba(13, 13, 13, .82) 100%);
}

/* While the background is still a placeholder, ease the scrim so the
   "put a photo here" hint stays readable. */
.sfa--bg:has(.sfa__bg-ph) .sfa__scrim {
	opacity: .5;
}

/* ---------- type ---------- */

.sfa__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .7em;
	margin: 0 0 clamp(.9rem, calc(var(--sfa-screen) * .02), 1.4rem);
	font-family: var(--sfa-body);
	font-size: clamp(.6875rem, .95vw, .8125rem);
	font-weight: 500;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: rgba(242, 240, 235, .72);
}

.sfa--light .sfa__eyebrow {
	color: rgba(17, 17, 17, .6);
}

.sfa__dot {
	flex: none;
	width: .45em;
	height: .45em;
	border-radius: 50%;
	background: var(--sfa-accent);
}

.sfa__title {
	margin: 0 0 clamp(.9rem, calc(var(--sfa-screen) * .02), 1.4rem);
	font-family: var(--sfa-display);
	font-size: clamp(1.9rem, 3.4vw, 3rem);
	font-weight: 700;
	font-style: italic;
	line-height: 1.14;
	letter-spacing: -.02em;
	text-wrap: balance;
}

.sfa__title--xl {
	font-size: clamp(2.1rem, 4.6vw, 3.9rem);
	line-height: 1.08;
}

.sfa__statement {
	margin: 0;
	font-family: var(--sfa-display);
	font-size: clamp(1.8rem, 4.2vw, 3.4rem);
	font-weight: 700;
	font-style: italic;
	line-height: 1.18;
	letter-spacing: -.02em;
	text-wrap: balance;
	text-shadow: 0 2px 30px rgba(0, 0, 0, .5);
}

.sfa__lead {
	margin: 0 0 clamp(1.4rem, calc(var(--sfa-screen) * .03), 2.2rem);
	font-family: var(--sfa-body);
	font-size: clamp(1rem, 1.5vw, 1.3rem);
	line-height: 1.6;
	color: rgba(242, 240, 235, .88);
	text-wrap: balance;
}

.sfa--light .sfa__lead {
	color: rgba(17, 17, 17, .76);
}

.sfa__text {
	margin: 0 0 1em;
	max-width: 48ch;
	font-family: var(--sfa-body);
	font-size: clamp(1rem, 1.1vw, 1.125rem);
	line-height: 1.75;
	color: rgba(242, 240, 235, .78);
}

.sfa--light .sfa__text {
	color: rgba(17, 17, 17, .72);
}

.sfa__text:last-child {
	margin-bottom: 0;
}

.sfa__cta {
	margin-top: clamp(.4rem, calc(var(--sfa-screen) * .012), 1rem);
}

/* ---------- split: copy + square photo ---------- */

.sfa__split {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: clamp(2rem, 5vw, 5rem);
}

.sfa__copy {
	flex: 1 1 52%;
	min-width: 0;
}

.sfa__split .sfa__frame {
	flex: 1 1 48%;
	min-width: 0;
}

/* ---------- image frames + placeholders ---------- */

.sfa__frame {
	position: relative;
	margin: 0;
	overflow: hidden;
	border-radius: 3px;
	background: rgba(242, 240, 235, .04);
}

.sfa--light .sfa__frame {
	background: rgba(17, 17, 17, .04);
}

/* Fixed at 1250 x 1250 on every screen. */
.sfa__frame--square {
	aspect-ratio: 1 / 1;
}

.sfa__ph {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: .9rem;
	width: 100%;
	height: 100%;
	border: 1px dashed rgba(242, 240, 235, .22);
	border-radius: 3px;
	background-image: repeating-linear-gradient(
		135deg,
		rgba(242, 240, 235, .05) 0 2px,
		transparent 2px 14px
	);
}

.sfa--light .sfa__ph {
	border-color: rgba(17, 17, 17, .2);
	background-image: repeating-linear-gradient(
		135deg,
		rgba(17, 17, 17, .05) 0 2px,
		transparent 2px 14px
	);
}

.sfa__ph-mark {
	width: 34px;
	height: 34px;
	border: 2px solid var(--sfa-accent);
	border-radius: 2px;
	opacity: .75;
}

.sfa__ph-label {
	font-family: var(--sfa-body);
	font-size: .75rem;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: rgba(242, 240, 235, .5);
}

.sfa--light .sfa__ph-label {
	color: rgba(17, 17, 17, .45);
}

/* ---------- cards ---------- */

.sfa__head {
	max-width: 680px;
	margin-bottom: clamp(2rem, calc(var(--sfa-screen) * .05), 3.5rem);
}

.sfa__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(1.25rem, 3vw, 2.5rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Each card opens on a hairline with the short accent bar the home page uses,
   then a large line icon standing on a yellow marker stroke: the same
   highlight the cream sections put under their accent word. */
.sfa__card--ico {
	position: relative;
	margin: 0;
	padding-top: clamp(1.5rem, calc(var(--sfa-screen) * .03), 2rem);
	border-top: 1px solid rgba(17, 17, 17, .14);
}

.sfa:not(.sfa--light) .sfa__card--ico {
	border-top-color: rgba(242, 240, 235, .14);
}

.sfa__card--ico::before {
	content: "";
	position: absolute;
	top: -2px;
	left: 0;
	width: 44px;
	height: 3px;
	background: var(--sfa-accent);
	clip-path: polygon(0 0, 100% 0, calc(100% - 3px) 100%, 3px 100%);
}

.sfa__card-num {
	position: absolute;
	top: clamp(1.5rem, calc(var(--sfa-screen) * .03), 2rem);
	right: 0;
	font-family: var(--sfa-display);
	font-size: .875rem;
	font-weight: 700;
	letter-spacing: .06em;
	line-height: 1;
	color: rgba(17, 17, 17, .32);
}

.sfa:not(.sfa--light) .sfa__card-num {
	color: rgba(242, 240, 235, .36);
}

.sfa__icon {
	--ico-accent: var(--sfa-ink);
	--ico-ink: var(--sfa-ink);
	--ico-paper: var(--sfa-cream);

	position: relative;
	display: block;
	width: clamp(4rem, 6vw, 5.25rem);
	height: clamp(4rem, 6vw, 5.25rem);
	margin: 0 0 1.5rem;
	color: var(--sfa-ink);
}

.sfa:not(.sfa--light) .sfa__icon {
	--ico-accent: var(--sfa-cream);
	--ico-ink: var(--sfa-cream);
	color: var(--sfa-cream);
}

/* The marker: a slanted yellow stroke across the lower half of the icon. */
.sfa__icon::before {
	content: "";
	position: absolute;
	z-index: 0;
	left: -14%;
	right: -14%;
	bottom: 4%;
	height: 40%;
	background: rgba(242, 183, 5, .85);
	clip-path: polygon(7% 0, 100% 0, 93% 100%, 0 100%);
}

[data-sfa] .sfa__icon .sf-ico {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	stroke-width: 1.35;
}

.sfa__card-title {
	margin: 0 0 .5rem;
	font-family: var(--sfa-display);
	font-size: clamp(1.1rem, 1.6vw, 1.4rem);
	font-weight: 700;
	font-style: italic;
	line-height: 1.2;
}

.sfa__card-text {
	margin: 0;
	font-family: var(--sfa-body);
	font-size: clamp(.9375rem, 1vw, 1rem);
	line-height: 1.65;
	color: rgba(17, 17, 17, .68);
}

.sfa:not(.sfa--light) .sfa__card-text {
	color: rgba(242, 240, 235, .74);
}

/* ---------- motion ---------- */

[data-sfa-reveal] {
	opacity: 0;
	transform: translate3d(0, 22px, 0);
	transition:
		opacity .7s cubic-bezier(.22, .61, .36, 1) var(--sfa-delay, 0ms),
		transform .8s cubic-bezier(.22, .61, .36, 1) var(--sfa-delay, 0ms);
	will-change: opacity, transform;
}

[data-sfa-reveal].is-in {
	opacity: 1;
	transform: none;
}

/* The marker is drawn in just after its card arrives. */
.sfa__card--ico .sfa__icon::before {
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .6s cubic-bezier(.22, .61, .36, 1) calc(var(--sfa-delay, 0ms) + 250ms);
}

.sfa__card--ico.is-in .sfa__icon::before {
	transform: scaleX(1);
}

/* ---------- tablet and below ---------- */

@media (max-width: 1024px) {
	.sfa__split {
		flex-direction: column;
		align-items: stretch;
		gap: clamp(1.75rem, 5vw, 2.75rem);
	}

	/* In a column, flex sizing would decide the frame's height and fight the
	   aspect ratio. */
	.sfa__split .sfa__frame {
		flex: none;
		width: 100%;
	}

	.sfa__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.sfa {
		padding-block: clamp(3rem, calc(var(--sfa-screen) * .07), 4.5rem);
	}

	.sfa__grid {
		grid-template-columns: 1fr;
		gap: 1.75rem;
	}

	/* Phones: icon on the left, words beside it, so three cards stay short. */
	.sfa__card--ico {
		display: grid;
		grid-template-columns: 3.75rem minmax(0, 1fr);
		column-gap: 1.25rem;
		align-items: start;
	}

	.sfa__card--ico .sfa__icon {
		grid-row: 1 / span 2;
		width: 3.75rem;
		height: 3.75rem;
		margin: .15rem 0 0;
	}

	.sfa__card--ico .sfa__card-title {
		padding-right: 2.5rem;
	}
}

/* Landscape phones: a full screen is only a few hundred pixels tall. */
@media (orientation: landscape) and (max-height: 560px) {
	.sfa {
		min-height: 0;
		padding-block: 3rem;
	}
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	[data-sfa-reveal] {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.sfa__bg {
		top: 0;
		bottom: 0;
		transform: none !important;
	}

	.sfa__card--ico .sfa__icon::before {
		transform: none;
		transition: none;
	}

	/* The script never starts the film here; this keeps it hidden regardless. */
	[data-sfa] .sfa__bg-video {
		display: none;
	}
}
