/* =========================================================
   Treningi personalne Solofit: the page opening

   .sfti  dark, under the fixed header: label, title, lead and
          shortcuts to the sections below. data-sf-flush tells
          Solo Fit's header not to pad the body, so the dark runs
          right up to the top; the opening clears the header and
          the promo strip itself (--sfh-h, --sfh-promo-h).

   The background speaks the language of the other subpages: an
   inset shadow on the top and bottom edge, a soft pool of light
   and one hairline glyph in Chakra Petch geometry. The glyph is
   a mask over a flat colour.
   ========================================================= */

.sfti {
	--sfti-ink: #0d0d0d;
	--sfti-paper: #f2f0eb;
	--sfti-accent: #f2b705;
	--sfti-head: "Chakra Petch";
	--sfti-body: "Barlow";
	--sfti-ease: cubic-bezier(.2, .8, .2, 1);
	--sfti-screen: var(--sf-screen, 820px);
	--sfti-top: calc(var(--sfh-h, 74px) + var(--sfh-promo-h, 0px));
	--sfti-glyph-color: rgba(242, 183, 5, .22);

	position: relative;
	isolation: isolate;
	box-sizing: border-box;
	width: 100%;
	background: var(--sfti-ink);
	color: var(--sfti-paper);
	font-family: var(--sfti-body), sans-serif;
	-webkit-tap-highlight-color: transparent;
	box-shadow:
		inset 0 170px 150px -140px rgba(0, 0, 0, .55),
		inset 0 -170px 150px -140px rgba(0, 0, 0, .55);
}

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

.sfti ::selection {
	background: rgba(242, 183, 5, .28);
	color: var(--sfti-paper);
}

/* ---------- background layers ---------- */

.sfti::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background: radial-gradient(ellipse 95% 620px at 50% 420px, rgba(242, 240, 235, .055), rgba(242, 240, 235, 0) 70%);
	background: radial-gradient(ellipse min(1200px, 95vw) 620px at 50% 420px, rgba(242, 240, 235, .055), rgba(242, 240, 235, 0) 70%);
}

/* The glyph exists only on openings that name one, so a missing
   drawing can never leave the colour painted over everything. */
.sfti--g-kettlebell::after,
.sfti--g-dumbbell::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background-color: var(--sfti-glyph-color);
	-webkit-mask-image: var(--sfti-glyph);
	mask-image: var(--sfti-glyph);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: var(--sfti-glyph-size);
	mask-size: var(--sfti-glyph-size);
	-webkit-mask-position: var(--sfti-glyph-pos);
	mask-position: var(--sfti-glyph-pos);
}

.sfti--g-kettlebell {
	--sfti-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 300'%3E%3Cpath fill='none' stroke='black' stroke-width='1' vector-effect='non-scaling-stroke' d='M78 14H182L214 46V118H190V54L174 38H86L70 54V118H46V46Z M58 112H202L246 156V238L202 282H58L14 238V156Z M100 160H160L178 178V216L160 234H100L82 216V178Z'/%3E%3C/svg%3E");
}

.sfti--g-dumbbell {
	--sfti-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 340 200'%3E%3Cpath fill='none' stroke='black' stroke-width='1' vector-effect='non-scaling-stroke' d='M40 30H70L78 38V162L70 170H40L32 162V38Z M86 55H106L112 61V139L106 145H86L80 139V61Z M112 92H228V108H112Z M234 61L240 55H260L266 61V139L260 145H240L234 139Z M270 38L278 30H308L316 38V162L308 170H278L270 162Z M8 92H32V108H8Z M316 92H334V108H316Z'/%3E%3C/svg%3E");
}

/* Phones first: tucked into the top right beside the heading. */
.sfti {
	--sfti-glyph-size: clamp(11rem, 44vw, 15rem) auto;
	--sfti-glyph-pos: right -3.5rem top calc(var(--sfti-top) + 1.25rem);
}

/* ---------- layout ---------- */

.sfti__inner {
	position: relative;
	display: grid;
	gap: 2.5rem;
	width: 100%;
	max-width: 84rem;
	margin: 0 auto;
	padding: calc(var(--sfti-top) + 2.25rem) 1.15rem 4rem;
}

.sfti__head {
	display: flex;
	flex-direction: column;
	gap: .8rem;
	min-width: 0;
}

.sfti__eyebrow {
	display: flex;
	align-items: center;
	gap: .6rem;
	margin: 0;
	font-family: var(--sfti-body), sans-serif;
	font-size: .68rem;
	font-weight: 600;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: #8a8a85;
}

.sfti__dot {
	flex: none;
	width: .4rem;
	height: .4rem;
	border-radius: 50%;
	background: var(--sfti-accent);
}

.sfti .sfti__title {
	margin: 0;
	font-family: var(--sfti-head), sans-serif;
	font-weight: 700;
	font-size: clamp(2.4rem, 11vw, 3.2rem);
	line-height: 1;
	letter-spacing: -.03em;
	text-transform: none;
	color: var(--sfti-paper);
	text-wrap: balance;
}

.sfti .sfti__title em {
	font-style: italic;
	color: var(--sfti-accent);
}

.sfti__lead {
	max-width: 34rem;
	margin: 0;
	font-size: 1rem;
	line-height: 1.6;
	color: rgba(242, 240, 235, .76);
	text-wrap: pretty;
}

/* ---------- shortcuts ---------- */

.sfti__routes {
	display: flex;
	flex-direction: column;
	gap: .75rem;
	min-width: 0;
}

.sfti__routes-t {
	margin: 0;
	font-size: .68rem;
	font-weight: 600;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: #8a8a85;
}

.sfti .sfti__list {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid rgba(242, 240, 235, .1);
}

.sfti .sfti__list li {
	margin: 0;
	padding: 0;
}

/* Pinned on every state: the theme turns links navy on hover and tap. */
.sfti .sfti__route,
.sfti .sfti__route:hover,
.sfti .sfti__route:focus,
.sfti .sfti__route:active,
.sfti .sfti__route:visited {
	color: var(--sfti-paper);
	text-decoration: none;
}

.sfti .sfti__route {
	position: relative;
	display: grid;
	grid-template-columns: 3rem minmax(0, 1fr) 1.25rem;
	align-items: center;
	gap: 1rem;
	padding: 1.2rem .5rem 1.2rem 0;
	border-bottom: 1px solid rgba(242, 240, 235, .1);
}

/* The home page's accent bar, drawn in over the row you are on. */
.sfti__route::before {
	content: "";
	position: absolute;
	top: -1px;
	left: 0;
	width: 44px;
	height: 3px;
	background: var(--sfti-accent);
	clip-path: polygon(0 0, 100% 0, calc(100% - 3px) 100%, 3px 100%);
	transform: scaleX(0);
	transform-origin: left center;
}

.sfti__route-ico {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	border: 1px solid rgba(242, 240, 235, .14);
	border-radius: 3px;
	background: rgba(242, 240, 235, .04);
	color: var(--sfti-accent);
}

.sfti__route-ico .sft-i {
	width: 22px;
	height: 22px;
}

.sfti__route-b {
	display: flex;
	flex-direction: column;
	gap: .2rem;
	min-width: 0;
}

.sfti__route-t {
	font-family: var(--sfti-head), sans-serif;
	font-weight: 600;
	font-size: 1.15rem;
	line-height: 1.25;
	color: var(--sfti-paper);
}

.sfti__route-d {
	font-size: .92rem;
	line-height: 1.45;
	color: rgba(242, 240, 235, .6);
}

.sfti__route-go {
	color: rgba(242, 240, 235, .35);
}

.sfti__route-go .sft-i {
	display: block;
	width: 20px;
	height: 20px;
}

.sfti .sfti__route:hover .sfti__route-ico,
.sfti .sfti__route:focus-visible .sfti__route-ico {
	border-color: rgba(242, 183, 5, .55);
	background: rgba(242, 183, 5, .12);
}

.sfti .sfti__route:hover .sfti__route-go,
.sfti .sfti__route:focus-visible .sfti__route-go {
	color: var(--sfti-accent);
}

.sfti .sfti__route:hover::before,
.sfti .sfti__route:focus-visible::before {
	transform: scaleX(1);
}

.sfti .sfti__route:focus-visible {
	outline: 2px solid var(--sfti-accent);
	outline-offset: 2px;
	border-radius: 3px;
}

/* =========================================================
   SIZES
   ========================================================= */

@media (min-width: 768px) {
	.sfti__inner {
		padding-inline: 2rem;
	}
}

@media (min-width: 1025px) {
	.sfti {
		/* Bottom left, under the title. */
		--sfti-glyph-size: clamp(300px, 26vw, 420px) auto;
		--sfti-glyph-pos: left -5rem bottom 2.5rem;
	}

	.sfti__inner {
		padding: calc(var(--sfh-h, 100px) + var(--sfh-promo-h, 0px) + clamp(3rem, calc(var(--sfti-screen) * .09), 6.5rem)) 3rem clamp(4.5rem, calc(var(--sfti-screen) * .11), 7.5rem);
	}

	.sfti--routes .sfti__inner {
		grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
		gap: clamp(3rem, 6vw, 6.5rem);
		align-items: end;
	}

	.sfti .sfti__title {
		font-size: clamp(3.4rem, 5.4vw, 5.25rem);
	}

	.sfti__lead {
		font-size: 1.1rem;
	}

	.sfti__route-t {
		font-size: 1.25rem;
	}
}

/* =========================================================
   MOTION
   ========================================================= */

@media (prefers-reduced-motion: no-preference) {
	.sfti__dot.is-pulse {
		animation: sfti-pulse 2.4s ease-out infinite;
	}

	@keyframes sfti-pulse {
		0% {
			box-shadow: 0 0 0 0 rgba(242, 183, 5, .6);
		}

		70%,
		100% {
			box-shadow: 0 0 0 .6rem rgba(242, 183, 5, 0);
		}
	}

	.sfti__route::before {
		transition: transform .28s var(--sfti-ease);
	}

	.sfti__route-ico,
	.sfti__route-go {
		transition: border-color .2s ease, background-color .2s ease, color .2s ease;
	}

	.sfti__route-go .sft-i {
		transition: transform .2s ease;
	}

	.sfti .sfti__route:hover .sfti__route-go .sft-i {
		transform: translateY(3px);
	}

	.sfti .sfti__route[href^="http"]:hover .sfti__route-go .sft-i,
	.sfti .sfti__route[href^="/"]:hover .sfti__route-go .sft-i {
		transform: translateX(3px);
	}
}

/* ---------- print and forced colours ---------- */

@media print {
	.sfti::before,
	.sfti::after {
		display: none;
	}
}

@media (forced-colors: active) {
	.sfti__route::before {
		forced-color-adjust: none;
		background: Highlight;
	}
}
