/* =============================================================================
   sect.css — page-scoped section refinements
   Loaded after site.css on: index.html, treatments.html, major-surgeries.html
   site.css is never modified. Every selector here is scoped to a wrapper class
   (.jrn, .tsec, .svc) so no other page or section can be affected.
   -----------------------------------------------------------------------------
   01. Treatment journey  (.jrn)   — redesigned stepped timeline
   02. Treatment rows     (.tsec)  — uniform image frames, no letterboxing
   03. Services grid      (.svc)   — paired 2-up grid + wide finale row
============================================================================= */

/* ===== 01. TREATMENT JOURNEY =============================================== */

.jrn { background: var(--ivory-2); }

.jrn__rows {
	position: relative;
	border-top: none;
}

/* continuous rail behind the step dots */
.jrn__rows::before {
	content: "";
	position: absolute;
	left: 37px;
	top: 0;
	bottom: 0;
	width: 1px;
	background: var(--ink-12);
}

.jrn .journey__row {
	grid-template-columns: 108px minmax(0, 1fr) minmax(0, 1.42fr);
	gap: clamp(18px, 2.6vw, 56px);
	align-items: start;
	padding-block: clamp(26px, 3.3vw, 46px);
	padding-right: clamp(12px, 1.6vw, 28px);
	border-bottom: 1px solid var(--ink-12);
	opacity: 0;
	transform: translateY(18px);
	transition: opacity .8s var(--ease-out), transform .8s var(--ease-out),
		background .55s var(--ease-out);
}

.jrn .journey__row:first-child { border-top: 1px solid var(--ink-12); }

.jrn .journey__row.is-in {
	opacity: 1;
	transform: none;
}

/* step dot sitting on the rail */
.jrn .journey__row::before {
	content: "";
	position: absolute;
	left: 33px;
	top: calc(clamp(26px, 3.3vw, 46px) + .48em);
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--ivory-2);
	border: 1px solid var(--ink-12);
	z-index: 2;
	transition: background .6s var(--ease-out), border-color .6s var(--ease-out),
		box-shadow .6s var(--ease-out);
}

.jrn .journey__row.is-in::before {
	background: var(--accent);
	border-color: var(--accent);
	box-shadow: 0 0 0 5px rgba(163, 44, 36, .10);
}

/* the accent hairline that wipes in stays, recoloured softer */
.jrn .journey__row::after { background: var(--accent); }

.jrn .journey__row .n {
	grid-column: 1;
	font-family: var(--mono);
	font-size: clamp(1.5rem, 2.5vw, 2.5rem);
	letter-spacing: -.04em;
	line-height: .9;
	padding-top: 0;
	padding-left: 56px;
	color: transparent;
	-webkit-text-stroke: 1px rgba(26, 26, 24, .30);
	transition: color .5s var(--ease-out), -webkit-text-stroke .5s var(--ease-out);
}

.jrn .journey__row h3 {
	grid-column: 2;
	font-size: clamp(1.45rem, 2.6vw, 2.3rem);
	letter-spacing: -.036em;
	line-height: .98;
}

.jrn .journey__row h3::after {
	content: "";
	display: block;
	width: 26px;
	height: 2px;
	margin-top: 14px;
	background: var(--accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .75s var(--ease-out) .18s;
}

.jrn .journey__row.is-in h3::after { transform: scaleX(1); }

.jrn .journey__row p:not(.n) {
	grid-column: 3;
	max-width: 52ch;
	line-height: 1.66;
}

@media (hover: hover) and (min-width: 861px) {
	.jrn .journey__row:hover {
		background: linear-gradient(90deg, rgba(163, 44, 36, .055), rgba(163, 44, 36, 0) 64%);
	}
	.jrn .journey__row:hover .n {
		color: var(--accent);
		-webkit-text-stroke: 1px transparent;
	}
}

@media (max-width: 860px) {
	.jrn__rows::before { display: none; }
	.jrn .journey__row::before { display: none; }

	.jrn .journey__row {
		grid-template-columns: 42px minmax(0, 1fr);
		column-gap: 14px;
		row-gap: 10px;
		padding-block: 22px;
		padding-right: 0;
	}
	.jrn .journey__row .n {
		grid-column: 1;
		grid-row: 1;
		padding-left: 0;
		font-size: 1.1rem;
		letter-spacing: .04em;
		color: var(--accent);
		-webkit-text-stroke: 0;
		padding-top: 3px;
	}
	.jrn .journey__row h3 {
		grid-column: 2;
		grid-row: 1;
		font-size: clamp(1.2rem, 5.4vw, 1.6rem);
	}
	.jrn .journey__row h3::after { margin-top: 10px; }
	.jrn .journey__row p:not(.n) {
		grid-column: 2;
		grid-row: 2;
		font-size: var(--fs-sm);
		line-height: 1.6;
		max-width: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jrn .journey__row {
		opacity: 1;
		transform: none;
		transition: none;
	}
	.jrn .journey__row h3::after { transform: scaleX(1); }
}

/* ===== 02. TREATMENT ROWS ================================================== */
/* Every image frame gets the same 3:2 window, so no row is letterboxed or
   visually shrunken next to its neighbours. */

.tsec .treat__row > * { min-width: 0; }

.tsec .treat__row figure {
	aspect-ratio: 3 / 2;
	overflow: hidden;
}

.tsec .treat__row figure img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	object-fit: cover;
}

@media (max-width: 860px) {
	.tsec .treat__row figure { aspect-ratio: 16 / 10; }
}

/* ===== 03. SERVICES GRID ================================================== */
/* Items 01-04 pair up two per row; item 05 closes the section as a deliberate
   wide feature with the copy beside the image instead of a full-bleed frame. */

.svc > * { min-width: 0; }

.svc figure {
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.svc figure img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.3s var(--ease-out);
}

@media (hover: hover) {
	.svc > div:hover figure img { transform: scale(1.035); }
}

.svc__feat {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
	column-gap: clamp(24px, 3.4vw, 64px);
	align-items: center;
}

.svc__feat > figure { aspect-ratio: 3 / 2; }
.svc__feat > .prose { margin-top: 0; }

@media (max-width: 1100px) {
	.svc__feat {
		grid-template-columns: minmax(0, 1fr);
		row-gap: clamp(18px, 2.4vw, 28px);
	}
	.svc__feat > figure { aspect-ratio: 16 / 9; }
}

@media (max-width: 860px) {
	.svc figure { aspect-ratio: 16 / 10; }
	.svc__feat > figure { aspect-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
	.svc figure img { transition: none; }
}


/* ---------------------------------------------------------------------------
   Closing band figure.
   These full-width figures were rendering ~870px tall on a wide screen, which
   swamped the section above them. Cap them into a cinematic band instead.
   --------------------------------------------------------------------------- */
.svcband figure {
	aspect-ratio: 2.6/1;
	max-height: clamp(280px, 46vh, 540px);
	overflow: hidden;
}
.svcband figure img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 46%;
}
@media (max-width: 860px) {
	.svcband figure {
		aspect-ratio: 16/10;
		max-height: none;
	}
}
