/* Generic helpers — used across every page, not just homepage sections */
.relative {
	position: relative;
}

.absolute-fill {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.bg-elevated {
	background: var(--color-surface-elevated);
}

.text-dim {
	color: var(--color-text-dim);
}

.icon-12 {
	width: 12px;
	height: 12px;
}

.icon-16 {
	width: 16px;
	height: 16px;
}

.icon-20 {
	width: 20px;
	height: 20px;
}

.icon-24 {
	width: 24px;
	height: 24px;
}

.icon-32 {
	width: 32px;
	height: 32px;
}

/* Generic page hero — used by every non-homepage page with a hero (About,
   Services listing/detail, 404, and future pages) */
.page-hero {
	position: relative;
	overflow: hidden;
	padding-top: 64px;
	padding-bottom: 48px;
	border-bottom: 1px solid var(--color-border);
}

@media ( min-width: 768px ) {
	.page-hero {
		padding-top: 96px;
		padding-bottom: 80px;
	}
}

.page-hero-glow {
	position: absolute;
	width: 500px;
	height: 500px;
	border-radius: 50%;
	pointer-events: none;
}

.page-hero-glow-left {
	top: -128px;
	left: 0;
	background: radial-gradient( closest-side, rgba(0, 140, 200, 0.14) 0%, rgba(0, 140, 200, 0) 70% );
}

.page-hero-glow-right {
	top: -128px;
	right: 0;
	background: radial-gradient( closest-side, rgba(0, 200, 180, 0.14) 0%, rgba(0, 200, 180, 0) 70% );
}

.page-hero-title {
	margin-top: 20px;
	font-size: 36px;
	max-width: 760px;
	line-height: 1.1;
}

@media ( min-width: 768px ) {
	.page-hero-title {
		font-size: var(--text-h1);
	}
}

.page-hero-lead {
	margin-top: 20px;
	max-width: 640px;
}

/* Content + sidebar split — generic detail-page layout (Services, Portfolio) */
.content-sidebar-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
}

@media ( min-width: 1024px ) {
	.content-sidebar-grid {
		grid-template-columns: 7fr 5fr;
		gap: 48px;
	}
}

.content-sidebar-main {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.content-sidebar-main h2 {
	font-size: 22px;
	margin-bottom: 16px;
}

.content-sidebar-main .text-dim p {
	line-height: 1.7;
}

/* Back link — used by detail-page templates (Services, Portfolio) */
.back-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: var(--text-small);
	color: var(--color-text-dim);
	margin-bottom: 32px;
	transition: color 0.2s ease;
}

.back-link:hover {
	color: var(--color-teal);
}

/* Sticky sidebar CTA card — used by detail-page templates (Services, Portfolio) */
.sidebar-cta-card {
	position: sticky;
	top: 112px;
	border-radius: var(--radius-lg);
	border: 1px solid var(--color-border-teal);
	background: var(--color-teal-glow);
	padding: 24px;
}

.sidebar-cta-title {
	font-family: var(--font-sora);
	font-weight: 600;
	font-size: 18px;
	color: var(--color-text);
	margin-bottom: 8px;
}

.sidebar-cta-btn {
	width: 100%;
	justify-content: center;
	margin-top: 20px;
}

.sidebar-cta-note {
	margin-top: 16px;
	text-align: center;
	font-size: 12px;
	color: var(--color-text-dimmer);
}

/* Related/more-work section label — used by detail-page templates */
.related-label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--color-text-dimmer);
	margin-bottom: 32px;
}

/* Button */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--font-dm-sans);
	font-weight: 600;
	border-radius: var(--radius);
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform 0.2s var(--ease-reveal), box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
	white-space: nowrap;
}

.btn-sm {
	padding: 8px 16px;
	font-size: var(--text-small);
}

.btn-md {
	padding: 12px 24px;
	font-size: var(--text-body);
}

.btn-lg {
	padding: 16px 32px;
	font-size: var(--text-lead);
}

.btn-primary {
	background: var(--color-teal);
	color: var(--color-bg);
	box-shadow: var(--shadow-teal-glow);
}

.btn-primary:hover {
	transform: translateY(-1px);
}

.btn-secondary {
	background: transparent;
	border-color: var(--color-border-teal);
	color: var(--color-text);
}

.btn-secondary:hover {
	background: var(--color-teal-soft);
}

.btn-ghost {
	background: transparent;
	color: var(--color-text-dim);
}

.btn-ghost:hover {
	color: var(--color-text);
}

.btn-arrow {
	display: inline-flex;
	transition: transform 0.2s var(--ease-reveal);
}

.btn:hover .btn-arrow {
	transform: translateX(4px);
}

/* Card */
.card {
	border-radius: var(--radius-lg);
	border: 1px solid var(--color-border);
	background: var(--color-surface-alt);
	padding: 24px;
	transition: transform 0.3s var(--ease-reveal), border-color 0.3s ease, background-color 0.3s ease;
}

.card-elevated {
	background: var(--color-surface-elevated);
}

.card-accent {
	background: linear-gradient( 160deg, var(--color-teal-soft), transparent );
	border-color: var(--color-border-teal);
}

.card-hover:hover {
	transform: translateY(-4px);
	border-color: var(--color-border-teal);
}

/* Badge */
.badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: var(--text-small);
	font-weight: 600;
}

.badge-teal {
	background: var(--color-teal-soft);
	color: var(--color-teal-bright);
}

.badge-outline {
	background: transparent;
	border: 1px solid var(--color-border-teal);
	color: var(--color-text-dim);
}

.badge-muted {
	background: var(--color-surface-alt);
	color: var(--color-text-dim);
}

.badge-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	animation: pulse-soft 3s infinite;
}

/* Section heading */
.section-heading {
	max-width: 640px;
	margin-bottom: 48px;
}

.section-heading-center {
	margin-inline: auto;
	text-align: center;
}

.section-heading .eyebrow {
	display: inline-block;
	margin-bottom: 16px;
}

.section-heading h2 {
	margin-bottom: 16px;
}

.section-heading p {
	color: var(--color-text-dim);
}

/* Icon frame */
.icon-frame {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--color-teal-soft);
	border-radius: var(--radius-md);
	color: var(--color-teal);
	flex-shrink: 0;
}

.icon-frame-sm {
	width: 32px;
	height: 32px;
}

.icon-frame-md {
	width: 48px;
	height: 48px;
}

.icon-frame-lg {
	width: 64px;
	height: 64px;
}

/* Reveal — scroll-triggered fade+rise, enhanced by assets/js/reveal.js */
.reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.6s var(--ease-reveal), transform 0.6s var(--ease-reveal);
}

.reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media ( prefers-reduced-motion: reduce ) {
	.reveal {
		opacity: 1;
		transform: none;
	}
}
