/**
 * Services page — Technology Stack section.
 * Figma: nodes 550:398-423 — full-width header + numbered accordion.
 */

:root {
	--sp-svc-tech-pad-top: 220px;
	--sp-svc-tech-pad-bottom: 160px;
	--sp-svc-tech-heading-size: clamp(40px, calc(72 / 1920 * 100vw), 72px);
	--sp-svc-tech-heading-lh: 0.98;
	--sp-svc-tech-header-gap: 42px;
	--sp-svc-tech-desc-size: 22px;
	--sp-svc-tech-desc-max: 490px;
	--sp-svc-tech-desc-lh: 1.48562;
	--sp-svc-tech-desc-tracking: 0.66px;
	--sp-svc-tech-item-pad-y: 56px;
	--sp-svc-tech-item-number-size: 26px;
	--sp-svc-tech-item-number-tracking: 0.78px;
	--sp-svc-tech-item-title-size: 44px;
	--sp-svc-tech-item-title-lh: 0.96;
	--sp-svc-tech-accent-width: 42px;
	--sp-svc-tech-accent-height: 3px;
	--sp-svc-tech-accent-color: #f9cf0e;
	--sp-svc-tech-accent-gap: 17px;
	--sp-svc-tech-meta-width: clamp(80px, calc(583 / 1766 * 100%), 583px);
	--sp-svc-tech-item-col-gap: 0;
	--sp-svc-tech-group-col-gap: clamp(24px, calc(48 / 1186 * 100%), 48px);
	--sp-svc-tech-group-gap-y: 84px;
	--sp-svc-tech-group-label-size: 17px;
	--sp-svc-tech-group-label-tracking: 4.25px;
	--sp-svc-tech-group-label-bottom: 15px;
	--sp-svc-tech-group-item-size: 21px;
	--sp-svc-tech-group-item-lh: 1.54267;
	--sp-svc-tech-panel-top: 50px;
	--sp-svc-tech-panel-speed: 0.35s;
	--sp-svc-tech-line-color: #000;
	--sp-svc-tech-line-opacity: 0.2;
}

.sp-svc-tech {
	background-color: var(--spaciefy-white);
	color: var(--spaciefy-black);
	padding: var(--sp-svc-tech-pad-top) 0 var(--sp-svc-tech-pad-bottom);
	border-bottom: none;
}

.sp-svc-tech__inner {
	width: var(--spaciefy-container-width);
	max-width: var(--spaciefy-container);
	margin-left: auto;
	margin-right: auto;
}

/* Section header: heading left, description right */
.sp-svc-tech__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 40px;
	margin-bottom: var(--sp-svc-tech-header-gap);
}

.sp-svc-tech__heading {
	margin: 0;
	font-family: var(--spaciefy-font-helvetica);
	font-size: var(--sp-svc-tech-heading-size);
	font-weight: 500;
	line-height: var(--sp-svc-tech-heading-lh);
	color: #000;
}

.sp-svc-tech__description {
	margin: 0 0 0 auto;
	width: var(--sp-svc-tech-desc-max);
	max-width: 100%;
	font-family: var(--spaciefy-font-helvetica);
	font-size: var(--sp-svc-tech-desc-size);
	font-weight: 300;
	line-height: var(--sp-svc-tech-desc-lh);
	letter-spacing: var(--sp-svc-tech-desc-tracking);
	color: #000;
	opacity: 0.8;
	text-align: left;
	flex-shrink: 0;
}

/* Horizontal divider */
.sp-svc-tech__divider {
	height: 1px;
	background-color: var(--sp-svc-tech-line-color);
	opacity: var(--sp-svc-tech-line-opacity);
}

/* List of stack items */
.sp-svc-tech__list {
	margin-top: 0;
}

/* Individual accordion item — meta column + spaced content column */
.sp-svc-tech__item {
	display: grid;
	grid-template-columns: var(--sp-svc-tech-meta-width) minmax(0, 1fr);
	column-gap: var(--sp-svc-tech-item-col-gap);
	align-items: start;
	padding: 0;
	border-bottom: 1px solid rgba(0, 0, 0, var(--sp-svc-tech-line-opacity));
	cursor: pointer;
	outline: none;
}

.sp-svc-tech__item:focus-visible {
	outline: 2px solid var(--spaciefy-yellow);
	outline-offset: -2px;
}

/* Item header — children participate in the parent item grid */
.sp-svc-tech__item-header {
	display: contents;
	user-select: none;
}

/* Left meta: number + yellow accent line */
.sp-svc-tech__item-meta {
	grid-column: 1;
	grid-row: 1;
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: var(--sp-svc-tech-accent-gap);
	width: auto;
	min-width: 0;
	padding-block: var(--sp-svc-tech-item-pad-y);
}

.sp-svc-tech__item-number {
	font-family: var(--spaciefy-font-helvetica);
	font-size: var(--sp-svc-tech-item-number-size);
	font-weight: 400;
	line-height: 1.43;
	letter-spacing: var(--sp-svc-tech-item-number-tracking);
	color: #000;
	white-space: nowrap;
	flex-shrink: 0;
}

/* Yellow horizontal accent — reserved width keeps titles aligned */
.sp-svc-tech__item-accent {
	display: inline-block;
	width: var(--sp-svc-tech-accent-width);
	height: var(--sp-svc-tech-accent-height);
	background-color: transparent;
	border-radius: 0;
	flex-shrink: 0;
	transition: background-color var(--sp-svc-tech-panel-speed) ease;
}

.sp-svc-tech__item.is-active .sp-svc-tech__item-accent {
	background-color: var(--sp-svc-tech-accent-color);
}

.sp-svc-tech__item-title {
	grid-column: 2;
	grid-row: 1;
	margin: 0;
	padding-block: var(--sp-svc-tech-item-pad-y);
	font-family: var(--spaciefy-font-helvetica);
	font-size: var(--sp-svc-tech-item-title-size);
	font-weight: 400;
	line-height: var(--sp-svc-tech-item-title-lh);
	color: #000;
	transition: color 0.2s ease;
	white-space: nowrap;
}

/* Expanded: header keeps top spacing; bottom spacing moves to the panel */
.sp-svc-tech__item.is-active .sp-svc-tech__item-meta,
.sp-svc-tech__item.is-active .sp-svc-tech__item-title {
	padding-bottom: 0;
}

/* Expanded panel — shares the content column with the title */
.sp-svc-tech__item-panel {
	grid-column: 2;
	grid-row: 2;
	align-self: start;
	min-height: 0;
	overflow: hidden;
	max-height: 0;
	transition: max-height var(--sp-svc-tech-panel-speed) ease;
}

.sp-svc-tech__item-panel[aria-hidden="false"] {
	max-height: 800px;
}

.sp-svc-tech__item-panel-inner {
	padding-top: 0;
	padding-bottom: 0;
}

.sp-svc-tech__item-panel[aria-hidden="false"] .sp-svc-tech__item-panel-inner {
	padding-top: var(--sp-svc-tech-panel-top);
	padding-bottom: var(--sp-svc-tech-item-pad-y);
}

/* Grid of tech sub-groups — 2 columns, 2 rows */
.sp-svc-tech__groups {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: var(--sp-svc-tech-group-col-gap);
	row-gap: var(--sp-svc-tech-group-gap-y);
}

.sp-svc-tech__group {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.sp-svc-tech__group-label {
	margin: 0 0 var(--sp-svc-tech-group-label-bottom);
	font-family: var(--spaciefy-font-helvetica);
	font-size: var(--sp-svc-tech-group-label-size);
	font-weight: 400;
	line-height: 1.43;
	letter-spacing: var(--sp-svc-tech-group-label-tracking);
	text-transform: uppercase;
	color: #000;
	opacity: 0.5;
}

.sp-svc-tech__group-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.sp-svc-tech__group-item {
	font-family: var(--spaciefy-font-helvetica);
	font-size: var(--sp-svc-tech-group-item-size);
	font-weight: 400;
	line-height: var(--sp-svc-tech-group-item-lh);
	color: #000;
}

/* Divider at bottom of each item — hidden since the item has border-bottom */
.sp-svc-tech__item-divider {
	display: none;
}
