/**
 * Homepage — built from the client's Figma.
 *
 * Scoped under .sc-home. The 35 legacy pages and 803 posts still render through
 * parent BuddyBoss styles, so a global reset would break them.
 *
 * Sizes were derived from the supplied design image measured against its 1440
 * frame; they are not read from the Figma file itself.
 */

/* ------------------------------------------------------------- foundation */
.sc-home {
	font-family: var(--sc-font-body);
	font-size: var(--sc-fs-base);
	line-height: var(--sc-lh-normal);
	color: var(--sc-text-body);
	background: var(--sc-surface);
	-webkit-font-smoothing: antialiased;
}

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

.sc-home img {
	display: block;
	max-width: 100%;
	height: auto;
}

.sc-home ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sc-home h1,
.sc-home h2,
.sc-home h3 {
	margin: 0;
	font-family: var(--sc-font-heading);
	font-weight: var(--sc-fw-bold);
	line-height: var(--sc-lh-heading);
	color: var(--sc-navy);
}

.sc-home p {
	margin: 0;
}

.sc-home a {
	text-decoration: none;
}

.sc-home :focus-visible {
	outline: 2px solid var(--sc-focus);
	outline-offset: 3px;
	border-radius: var(--sc-radius-sm);
}

/* The BuddyBoss page wrappers constrain and pad their content; the homepage
   sections are full-bleed, so those constraints are lifted on this template. */
.home #main-wrap,
.home #inner-wrap,
.home #page,
.home #main {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
}

/* ---------------------------------------------------------- shared pieces */
.sc-home .sc-section {
	padding-block: 88px;
}

.sc-home .sc-section--blue {
	background: var(--sc-surface-blue);
}

.sc-home .sc-eyebrow {
	margin-bottom: 14px;
	color: var(--sc-green-text);
	font-size: var(--sc-fs-eyebrow);
	font-weight: var(--sc-fw-semibold);
	letter-spacing: var(--sc-track-eyebrow);
	text-transform: uppercase;
}

/* Max-widths come straight off the design, measured against its 1440 frame.
   They are in px, not ch — ch depends on the font, which is not yet confirmed. */
/* Set here rather than on --sc-fs-3xl: that token also drives .sc-page
   headings on the legal and archive templates, which should not move. */
.sc-home .sc-section__title {
	max-width: 600px;
	font-size: 40px;
}

.sc-home .sc-section__title--narrow {
	max-width: 520px;
}

.sc-home .sc-section__lead {
	max-width: 700px;
	margin-top: 18px;
	font-size: var(--sc-fs-sm);
	line-height: 1.75;
}

/* ----------------------------------------------------------------- button */
.sc-home .sc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 22px;
	border: 1px solid transparent;
	border-radius: var(--sc-radius-sm);
	font-size: var(--sc-fs-sm);
	font-weight: var(--sc-fw-semibold);
	line-height: 1.2;
	transition: background-color var(--sc-transition), border-color var(--sc-transition), color var(--sc-transition);
}

.sc-home .sc-btn--primary {
	background: var(--sc-orange);
	color: var(--sc-text-invert);
}

.sc-home .sc-btn--primary:hover,
.sc-home .sc-btn--primary:focus-visible {
	background: var(--sc-orange-dark);
	color: var(--sc-text-invert);
}

.sc-home .sc-btn--ghost {
	background: var(--sc-surface);
	border-color: var(--sc-border);
	color: var(--sc-navy);
}

.sc-home .sc-btn--ghost:hover,
.sc-home .sc-btn--ghost:focus-visible {
	border-color: var(--sc-navy);
	background: var(--sc-navy-tint);
	color: var(--sc-navy);
}

/* ------------------------------------------------------------------- hero */
.sc-home .sc-hero {
	background: var(--sc-surface-cream);
	overflow: hidden;
}

/*
 * Design columns are 605px copy / 72px gap / 482px image inside 1176px. The
 * image column is widened to 524px at the client's request; the copy column
 * gives up the difference and still fits the headline on three lines.
 */
.sc-home .sc-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 580fr) minmax(0, 524fr);
	align-items: stretch;
	gap: 72px;
	padding-block: 96px;
}

.sc-home .sc-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border: 1px solid var(--sc-border);
	border-radius: var(--sc-radius-pill);
	background: var(--sc-surface);
	color: var(--sc-green-text);
	font-size: var(--sc-fs-xs);
	font-weight: var(--sc-fw-semibold);
	line-height: 1;
}

.sc-home .sc-hero__title {
	margin-top: 26px;
	font-size: var(--sc-fs-4xl);
	line-height: 1.24;
	letter-spacing: -0.01em;
}

/* Gold rule sitting under the last line of the headline. */
.sc-home .sc-hero__rule {
	display: block;
	width: min(100%, 480px);
	height: 10px;
	margin-top: 14px;
	border-radius: 2px;
	background: var(--sc-gold);
}

.sc-home .sc-hero__lead {
	max-width: 540px;
	margin-top: 26px;
	font-size: var(--sc-fs-lg);
	line-height: 1.75;
}

.sc-home .sc-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 34px;
}

.sc-home .sc-hero__media {
	justify-self: end;
	width: 100%;
}

/*
 * Hero frame is 4:3 to match the supplied photo exactly, so nothing is cropped.
 *
 * Two crops were stacking up before: the template requested the 1600x900
 * "seniorcare-hero" size, which had already sliced the top and bottom off the
 * 1600x1200 original, and then `cover` discarded a third of the width to fit
 * the design's near-square 30/31 frame. That is what read as "zoomed in".
 *
 * The design's frame is taller than the photo. Matching it exactly needs the
 * portrait crop of this shot from Figma; until that is uploaded, the frame
 * follows the photo so the whole scene stays visible.
 */
.sc-home .sc-hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	border-radius: var(--sc-radius-lg);
}

/* --------------------------------------------------------- topic cards --- */
.sc-home .sc-topics {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 32px;
	margin-top: 40px;
}

.sc-home .sc-topic__link {
	display: block;
	height: 100%;
	padding: 30px;
	border: 1px solid var(--sc-border);
	border-radius: var(--sc-radius);
	background: var(--sc-surface);
	transition: box-shadow var(--sc-transition), transform var(--sc-transition), border-color var(--sc-transition);
}

.sc-home .sc-topic__link:hover,
.sc-home .sc-topic__link:focus-visible {
	border-color: var(--sc-navy-tint);
	box-shadow: var(--sc-shadow);
	transform: translateY(-2px);
}

/* Icon sits beside the label and title rather than above them, so all four
   cards read as one row of heading regardless of how long the title runs. */
.sc-home .sc-topic__head {
	display: flex;
	align-items: center;
	gap: 16px;
}

.sc-home .sc-topic__heading {
	display: block;
	min-width: 0;   /* lets a long title wrap instead of overflowing the card */
}

.sc-home .sc-topic__icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 10px;
	color: var(--sc-text-invert);
}

.sc-home .sc-topic__icon--navy   { background: var(--sc-navy); }
.sc-home .sc-topic__icon--green  { background: var(--sc-green); }
.sc-home .sc-topic__icon--orange { background: var(--sc-orange); }

/* All four labels are the SAME green in the Figma (--sc-green-text, the value
   the client supplied on 2026-07-30) — only the icon tile carries the card's
   accent colour. The label used to inherit that accent, so the cards printed a
   navy / green / orange / navy set instead. The --navy/--green/--orange
   modifier is still emitted in the markup as a hook, but deliberately has no
   colour rule of its own; do not reintroduce one. */
.sc-home .sc-topic__label {
	display: block;
	margin-top: 0;
	font-size: 12px;
	font-weight: var(--sc-fw-semibold);
	letter-spacing: var(--sc-track-eyebrow);
	text-transform: uppercase;
	color: var(--sc-green-text);
}

.sc-home .sc-topic__title {
	display: block;
	margin-top: 4px;
	font-family: var(--sc-font-heading);
	font-size: var(--sc-fs-xl);
	font-weight: var(--sc-fw-bold);
	line-height: 1.35;
	color: var(--sc-navy);
}

.sc-home .sc-topic__text {
	display: block;
	margin-top: 18px;
	font-size: var(--sc-fs-sm);
	line-height: 1.7;
	color: var(--sc-text-body);
}

/* ------------------------------------------------------- promise cards --- */
.sc-home .sc-promises {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 32px;
}

.sc-home .sc-promise {
	position: relative;
	overflow: hidden;
	padding: 40px;
	border-radius: var(--sc-radius-lg);
	color: var(--sc-text-invert);
}

/* Soft circle bleeding off the top-right corner, as in the design. */
.sc-home .sc-promise::after {
	content: "";
	position: absolute;
	top: -70px;
	right: -70px;
	width: 210px;
	height: 210px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.07);
	pointer-events: none;
}

.sc-home .sc-promise--green { background: var(--sc-green); }
.sc-home .sc-promise--navy  { background: var(--sc-navy); }

.sc-home .sc-promise__icon {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.16);
	color: var(--sc-text-invert);
}

.sc-home .sc-promise__title {
	position: relative;
	z-index: 1;
	margin-top: 26px;
	max-width: 360px;
	font-size: var(--sc-fs-2xl);
	color: var(--sc-text-invert);
}

.sc-home .sc-promise__text {
	position: relative;
	z-index: 1;
	margin-top: 16px;
	max-width: none;
	font-size: var(--sc-fs-sm);
	line-height: 1.75;
	color: rgba(255, 255, 255, 0.88);
}

/* ------------------------------------------------------ resource cards --- */
.sc-home .sc-resources {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 32px;
	margin-top: 36px;
}

.sc-home .sc-resource {
	padding: 26px 28px;
	border: 1px solid var(--sc-border);
	border-radius: var(--sc-radius);
	background: var(--sc-surface-soft);
}

.sc-home .sc-resource__label {
	color: var(--sc-green-text);
	font-size: 12px;
	font-weight: var(--sc-fw-semibold);
	letter-spacing: var(--sc-track-eyebrow);
	text-transform: uppercase;
}

.sc-home .sc-resource__title {
	margin-top: 8px;
	font-size: var(--sc-fs-xl);
	line-height: 1.35;
}

.sc-home .sc-resource__text {
	margin-top: 10px;
	font-size: var(--sc-fs-sm);
	line-height: 1.7;
}

.sc-home .sc-resource__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
	color: var(--sc-orange);
	font-size: var(--sc-fs-sm);
	font-weight: var(--sc-fw-semibold);
}

.sc-home .sc-resource__cta:hover,
.sc-home .sc-resource__cta:focus-visible {
	color: var(--sc-orange-dark);
}

.sc-home .sc-resource__cta svg {
	transition: transform var(--sc-transition);
}

.sc-home .sc-resource__cta:hover svg {
	transform: translateX(3px);
}

/* ======================================================== breakpoints ==== */
@media (max-width: 1024px) {
	.sc-home .sc-section {
		padding-block: 64px;
	}

	/*
	 * Stop stretching the hero photo to the copy column's height here.
	 *
	 * Between the two-column layout and the 860px single-column break, the copy
	 * column grows taller as text wraps while the image column gets narrower —
	 * around 900px that produced a 385x546 portrait frame, cropping 47% off a
	 * 4:3 photo. Pinning the frame to the photo's own ratio keeps the whole
	 * scene visible through that band.
	 */
	.sc-home .sc-hero__inner {
		align-items: center;
		gap: 40px;
		padding-block: 72px;
	}

	.sc-home .sc-hero__img {
		height: auto;
		aspect-ratio: 4 / 3;
	}

	.sc-home .sc-hero__title {
		font-size: 44px;
	}

	.sc-home .sc-section__title,
	.sc-home .sc-section__title--narrow {
		max-width: 460px;
		font-size: 34px;
	}

	.sc-home .sc-topics,
	.sc-home .sc-promises,
	.sc-home .sc-resources {
		gap: 24px;
	}

	.sc-home .sc-promise {
		padding: 32px;
	}

	.sc-home .sc-promise__title {
		margin-top: 22px;
	}
}

@media (max-width: 860px) {
	/* Single column: the hero image drops below the copy. */
	.sc-home .sc-hero__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 36px;
		padding-block: 56px;
		align-items: center;
	}

	.sc-home .sc-hero__title,
	.sc-home .sc-hero__lead {
		max-width: none;
	}

	.sc-home .sc-hero__img {
		aspect-ratio: 16 / 11;
	}

	.sc-home .sc-topics,
	.sc-home .sc-promises,
	.sc-home .sc-resources {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 768px) {
	.sc-home .sc-section {
		padding-block: 52px;
	}

	.sc-home .sc-hero__title {
		font-size: 36px;
	}

	.sc-home .sc-hero__lead {
		font-size: var(--sc-fs-base);
	}

	.sc-home .sc-section__title,
	.sc-home .sc-section__title--narrow {
		max-width: none;
		font-size: 28px;
	}
}

@media (max-width: 575px) {
	.sc-home .sc-hero__title {
		font-size: 30px;
	}

	.sc-home .sc-hero__rule {
		height: 8px;
	}

	.sc-home .sc-hero__actions .sc-btn {
		flex: 1 1 100%;
	}

	.sc-home .sc-topic__link {
		padding: 24px;
	}

	.sc-home .sc-promise {
		padding: 26px;
	}

	.sc-home .sc-promise__title {
		margin-top: 18px;
		font-size: 22px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sc-home *,
	.sc-home *::before,
	.sc-home *::after {
		transition-duration: 0.01ms !important;
	}
}
