/**
 * Front Page – Solar Marketplace (Stitch design)
 * Mobile-first, design tokens from Stitch mockup.
 */

:root {
	--sm-primary: #ffc300;
	--sm-primary-hover: #e6b000;
	--sm-bg-light: #fcfbf8;
	--sm-bg-dark: #231e0f;
	--sm-surface-light: #ffffff;
	--sm-surface-dark: #2d2614;
	--sm-text-main: #1d190c;
	--sm-text-secondary: #574f3b;
	--sm-border-light: #eae3cd;
	--sm-radius: 1rem;
	--sm-radius-lg: 1.5rem;
	--sm-radius-xl: 2rem;
	--sm-container: min(1280px, 100% - 2rem);
	--sm-shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
	--sm-shadow-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

@media (min-width: 640px) {
	:root {
		--sm-container: min(1280px, 100% - 3rem);
	}
}

@media (min-width: 1024px) {
	:root {
		--sm-container: min(1280px, 100% - 4rem);
	}
}

.sm-front-page {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	background: var(--sm-bg-light);
	color: var(--sm-text-main);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

/* Hero */
.sm-hero {
	position: relative;
	padding: 3rem 0 6rem;
}
@media (min-width: 1024px) {
	.sm-hero {
		padding: 5rem 0 8rem;
	}
}
.sm-hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}
.sm-hero__bg::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(252, 251, 248, 0.9), rgba(252, 251, 248, 0.8), var(--sm-bg-light));
	z-index: 1;
}
.sm-hero__bg-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}
.sm-hero__inner {
	position: relative;
	z-index: 10;
	max-width: var(--sm-container);
	margin: 0 auto;
	padding: 0 1rem;
	text-align: center;
}
@media (min-width: 640px) {
	.sm-hero__inner { padding: 0 1.5rem; }
}
@media (min-width: 1024px) {
	.sm-hero__inner { padding: 0 2rem; }
}
.sm-hero__title {
	font-size: 2.25rem;
	line-height: 1.2;
	font-weight: 900;
	color: var(--sm-text-main);
	max-width: 56rem;
	margin: 0 auto 1.5rem;
	letter-spacing: -0.02em;
}
@media (min-width: 768px) {
	.sm-hero__title { font-size: 3rem; }
}
@media (min-width: 1024px) {
	.sm-hero__title { font-size: 3.75rem; margin-bottom: 1.5rem; }
}
.sm-hero__subtitle {
	font-size: 1.125rem;
	line-height: 1.5;
	color: var(--sm-text-secondary);
	max-width: 42rem;
	margin: 0 auto 2.5rem;
	font-weight: 500;
}
@media (min-width: 768px) {
	.sm-hero__subtitle { font-size: 1.25rem; margin-bottom: 2.5rem; }
}

/* Lead form */
.sm-hero__form-wrap {
	max-width: 56rem;
	margin: 0 auto 2rem;
}
.sm-lead-form {
	background: var(--sm-surface-light);
	padding: 0.5rem;
	border-radius: var(--sm-radius-xl);
	box-shadow: var(--sm-shadow-hover);
	border: 1px solid #f3f4f6;
	transition: transform 0.3s ease;
}
.sm-lead-form:hover {
	transform: translateY(-2px);
}
.sm-lead-form__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: stretch;
}
@media (min-width: 768px) {
	.sm-lead-form__row {
		flex-wrap: nowrap;
		gap: 0;
		align-items: center;
	}
}
.sm-lead-form__field {
	flex: 1 1 100%;
	position: relative;
	min-width: 0;
}
@media (min-width: 768px) {
	.sm-lead-form__field {
		flex: 1 1 auto;
		flex-grow: 1;
		min-width: 0;
	}
}
.sm-lead-form__field--icon .sm-lead-form__input {
	padding-left: 3rem;
}
.sm-lead-form__field--icon .sm-lead-form__icon--suffix {
	left: auto;
	right: 1rem;
	transform: translateY(-50%);
	pointer-events: none;
}
.sm-lead-form__icon {
	position: absolute;
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
	color: #9ca3af;
	font-size: 1.25rem;
	pointer-events: none;
}
.sm-lead-form__input {
	width: 100%;
	height: 3.5rem;
	padding: 0 1rem;
	background: #f9fafb;
	border: none;
	border-radius: 0.75rem;
	color: var(--sm-text-main);
	font-weight: 500;
	font-size: 1.125rem;
	transition: background 0.2s, border-color 0.2s;
}
.sm-lead-form__input::placeholder {
	color: #9ca3af;
}
.sm-lead-form__input:focus {
	outline: none;
	background: #fff;
	box-shadow: 0 0 0 2px var(--sm-primary);
}
.sm-lead-form__select {
	appearance: none;
	cursor: pointer;
}
.sm-lead-form__row > .sm-lead-form__field + .sm-lead-form__field::before {
	content: '';
	display: none;
}
@media (min-width: 768px) {
	.sm-lead-form__row > .sm-lead-form__field + .sm-lead-form__field::before {
		content: '';
		position: absolute;
		left: 0;
		top: 50%;
		transform: translateY(-50%);
		width: 1px;
		height: 3.5rem;
		background: #e5e7eb;
		pointer-events: none;
	}
}
.sm-lead-form__btn {
	width: 100%;
	height: 3.5rem;
	padding: 0 2rem;
	background: var(--sm-primary);
	color: var(--sm-text-main);
	font-weight: 700;
	font-size: 1.125rem;
	border: none;
	border-radius: 0.75rem;
	box-shadow: var(--sm-shadow-soft);
	cursor: pointer;
	transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
	white-space: nowrap;
	flex-shrink: 0;
}
@media (min-width: 768px) {
	.sm-lead-form__btn {
		width: auto;
		min-height: 3.5rem;
	}
}
.sm-lead-form__btn:hover {
	background: var(--sm-primary-hover);
	box-shadow: var(--sm-shadow-hover);
}
.sm-lead-form__btn:active {
	transform: scale(0.98);
}
#sm-hero-form {
	scroll-margin-top: 2rem;
}

.sm-hero__social-proof {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: var(--sm-text-secondary);
	font-weight: 500;
	text-align: center;
}
@media (max-width: 479px) {
	.sm-hero__social-proof {
		flex-wrap: wrap;
		justify-content: center;
	}
}
.sm-hero__avatars {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}
.sm-hero__avatar {
	width: 2rem;
	height: 2rem;
	border-radius: 9999px;
	background: #dcfce7;
	color: #15803d;
	font-size: 0.75rem;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff;
}
.sm-hero__rating {
	margin-left: 0.25rem;
	white-space: nowrap;
}

/* Container */
.sm-container {
	width: 100%;
	max-width: var(--sm-container);
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
}
@media (min-width: 640px) {
	.sm-container { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
	.sm-container { padding-left: 2rem; padding-right: 2rem; }
}

/* Trust bar */
.sm-trust-bar {
	border-top: 1px solid var(--sm-border-light);
	border-bottom: 1px solid var(--sm-border-light);
	background: var(--sm-surface-light);
	padding: 3rem 0;
}
.sm-trust-bar__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}
@media (min-width: 768px) {
	.sm-trust-bar__grid { grid-template-columns: repeat(3, 1fr); }
}
.sm-trust-bar__item {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	padding: 1rem;
	border-radius: var(--sm-radius);
	transition: background 0.2s;
}
.sm-trust-bar__item:hover {
	background: #f9fafb;
}
.sm-trust-bar__icon {
	width: 3rem;
	height: 3rem;
	border-radius: 9999px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	flex-shrink: 0;
}
.sm-trust-bar__icon--blue { background: #eff6ff; color: #2563eb; }
.sm-trust-bar__icon--green { background: #f0fdf4; color: #16a34a; }
.sm-trust-bar__icon--purple { background: #faf5ff; color: #9333ea; }
.sm-trust-bar__title {
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--sm-text-main);
	margin: 0 0 0.25rem;
}
.sm-trust-bar__text {
	font-size: 0.875rem;
	color: var(--sm-text-secondary);
	line-height: 1.5;
	margin: 0;
}

/* Section common */
.sm-section {
	padding: 5rem 0;
}
.sm-section--light {
	background: var(--sm-bg-light);
}
.sm-section--white {
	background: var(--sm-surface-light);
}
.sm-section--border {
	border-top: 1px solid var(--sm-border-light);
}
.sm-section__header {
	text-align: center;
	margin-bottom: 4rem;
}
.sm-section__header--row {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
	margin-bottom: 3rem;
}
@media (min-width: 768px) {
	.sm-section__header--row {
		flex-direction: row;
		justify-content: space-between;
		align-items: flex-end;
	}
}
.sm-section__title {
	font-size: 1.875rem;
	font-weight: 900;
	color: var(--sm-text-main);
	margin: 0 0 0.5rem;
}
@media (min-width: 768px) {
	.sm-section__title { font-size: 2.25rem; }
}
.sm-section__title--center {
	text-align: center;
	margin-bottom: 3rem;
}
.sm-section__subtitle {
	font-size: 1.125rem;
	color: var(--sm-text-secondary);
	max-width: 42rem;
	margin: 0;
}
.sm-section__header--row .sm-section__subtitle {
	max-width: none;
}
.sm-section__footer-mobile {
	text-align: center;
	margin-top: 2rem;
}
@media (min-width: 768px) {
	.sm-section__footer-mobile { display: none; }
}

.sm-link {
	display: inline-flex;
	align-items: center;
	color: var(--sm-primary);
	font-weight: 700;
	text-decoration: none;
	transition: text-decoration 0.2s;
}
.sm-link:hover {
	text-decoration: underline;
}
.sm-link--desktop {
	display: none;
}
@media (min-width: 768px) {
	.sm-link--desktop { display: inline-flex; }
}
.sm-link__arrow {
	margin-left: 0.25rem;
	font-size: 1.125rem;
}

/* Steps (How it works) */
.sm-steps {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}
@media (min-width: 768px) {
	.sm-steps { grid-template-columns: repeat(3, 1fr); }
}
.sm-step {
	position: relative;
	background: var(--sm-surface-light);
	border-radius: var(--sm-radius-xl);
	padding: 2rem;
	border: 1px solid var(--sm-border-light);
	box-shadow: var(--sm-shadow-soft);
	transition: box-shadow 0.3s;
}
.sm-step:hover {
	box-shadow: var(--sm-shadow-hover);
}
.sm-step__num {
	position: absolute;
	top: -1.5rem;
	left: 2rem;
	width: 3rem;
	height: 3rem;
	background: var(--sm-primary);
	color: var(--sm-text-main);
	font-weight: 700;
	font-size: 1.25rem;
	border-radius: 9999px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--sm-shadow-soft);
	border: 4px solid #fff;
}
.sm-step__img-wrap {
	height: 12rem;
	width: 100%;
	background: #f9fafb;
	border-radius: 0.75rem;
	margin-bottom: 1.5rem;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}
.sm-step__img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s;
}
.sm-step:hover .sm-step__img-wrap img {
	transform: scale(1.05);
}
.sm-step__title {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--sm-text-main);
	margin: 0 0 0.5rem;
}
.sm-step__text {
	font-size: 1rem;
	color: var(--sm-text-secondary);
	line-height: 1.5;
	margin: 0;
}

/* Stats */
.sm-stats {
	padding: 5rem 0;
	background: #fffbeb;
	border-top: 1px solid rgba(254, 243, 199, 0.5);
	border-bottom: 1px solid rgba(254, 243, 199, 0.5);
}
.sm-stats__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	text-align: center;
}
@media (min-width: 768px) {
	.sm-stats__grid {
		grid-template-columns: repeat(3, 1fr);
		border-left: 1px solid rgba(253, 230, 138, 0.5);
	}
}
.sm-stats__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	border-top: 1px solid rgba(253, 230, 138, 0.5);
}
@media (min-width: 768px) {
	.sm-stats__item { border-top: none; border-left: 1px solid rgba(253, 230, 138, 0.5); }
}
.sm-stats__label {
	font-size: 1rem;
	color: var(--sm-text-secondary);
	font-weight: 500;
	margin-bottom: 0.5rem;
}
.sm-stats__value {
	font-size: 3rem;
	font-weight: 900;
	color: var(--sm-text-main);
	letter-spacing: -0.02em;
}
@media (min-width: 768px) {
	.sm-stats__value { font-size: 3.75rem; }
}
.sm-stats__badge {
	font-size: 0.875rem;
	color: #a16207;
	font-weight: 500;
	margin-top: 0.5rem;
	background: #fef9c3;
	padding: 0.25rem 0.75rem;
	border-radius: 9999px;
}

/* Cities grid */
.sm-cities {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
}
@media (min-width: 768px) {
	.sm-cities { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
	.sm-cities { grid-template-columns: repeat(6, 1fr); }
}
.sm-city {
	display: block;
	position: relative;
	overflow: hidden;
	border-radius: 0.75rem;
	aspect-ratio: 4 / 3;
	box-shadow: var(--sm-shadow-soft);
	transition: box-shadow 0.3s;
	text-decoration: none;
}
.sm-city:hover {
	box-shadow: var(--sm-shadow-hover);
}
.sm-city__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.7s;
}
.sm-city:hover .sm-city__img {
	transform: scale(1.1);
}
.sm-city:not(:has(.sm-city__img)) {
	background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}
.sm-city__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
	display: flex;
	align-items: flex-end;
	padding: 1rem;
}
.sm-city__name {
	position: absolute;
	bottom: 1rem;
	left: 1rem;
	right: 1rem;
	color: #fff;
	font-weight: 700;
	font-size: 0.875rem;
}
@media (min-width: 768px) {
	.sm-city__name { font-size: 1rem; }
}

/* Blog grid */
.sm-blog-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}
@media (min-width: 768px) {
	.sm-blog-grid { grid-template-columns: repeat(3, 1fr); }
}
.sm-blog-card {
	display: flex;
	flex-direction: column;
}
.sm-blog-card__link {
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	flex: 1;
}
.sm-blog-card__img-wrap {
	border-radius: var(--sm-radius-xl);
	overflow: hidden;
	margin-bottom: 1rem;
	height: 16rem;
	background: #f3f4f6;
	border: 1px solid var(--sm-border-light);
	box-shadow: var(--sm-shadow-soft);
}
.sm-blog-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s;
}
.sm-blog-card:hover .sm-blog-card__img {
	transform: scale(1.05);
}
.sm-blog-card__title {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--sm-text-main);
	margin: 0 0 0.5rem;
	transition: color 0.2s;
}
.sm-blog-card:hover .sm-blog-card__title {
	color: var(--sm-primary);
}
.sm-blog-card__excerpt {
	font-size: 1rem;
	color: var(--sm-text-secondary);
	line-height: 1.5;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Testimonials */
.sm-testimonials {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}
@media (min-width: 768px) {
	.sm-testimonials { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
	.sm-testimonials { grid-template-columns: repeat(3, 1fr); }
}
.sm-testimonial {
	background: #f9fafb;
	border-radius: var(--sm-radius-xl);
	padding: 1.5rem;
	border: 1px solid var(--sm-border-light);
}
.sm-testimonial__header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}
.sm-testimonial__avatar {
	width: 3rem;
	height: 3rem;
	border-radius: 9999px;
	object-fit: cover;
}
.sm-testimonial__avatar--placeholder {
	background: #e5e7eb;
}
.sm-testimonial__name {
	font-weight: 700;
	color: var(--sm-text-main);
	margin: 0 0 0.25rem;
	font-size: 1rem;
}
.sm-testimonial__stars {
	color: #eab308;
	font-size: 0.875rem;
}
.sm-testimonial__text {
	font-size: 1rem;
	color: var(--sm-text-secondary);
	font-style: italic;
	line-height: 1.5;
	margin: 0;
}

/* Final CTA */
.sm-cta {
	position: relative;
	padding: 6rem 0;
	background: var(--sm-surface-dark);
	overflow: hidden;
}
.sm-cta::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 33.333%;
	height: 100%;
	background: rgba(255, 195, 0, 0.05);
	transform: skewX(-12deg);
	transform-origin: top right;
}
.sm-cta__inner {
	position: relative;
	z-index: 10;
	max-width: 56rem;
	margin: 0 auto;
	padding: 0 1rem;
	text-align: center;
}
@media (min-width: 640px) {
	.sm-cta__inner { padding: 0 1.5rem; }
}
@media (min-width: 1024px) {
	.sm-cta__inner { padding: 0 2rem; }
}
.sm-cta__title {
	font-size: 2.25rem;
	font-weight: 900;
	color: #fff;
	margin: 0 0 1.5rem;
}
@media (min-width: 768px) {
	.sm-cta__title { font-size: 3rem; }
}
.sm-cta__text {
	font-size: 1.25rem;
	color: #d1d5db;
	max-width: 42rem;
	margin: 0 auto 2.5rem;
}
.sm-cta__btn {
	display: inline-block;
	background: var(--sm-primary);
	color: var(--sm-text-main);
	font-weight: 700;
	font-size: 1.25rem;
	padding: 1rem 2.5rem;
	border-radius: 9999px;
	text-decoration: none;
	box-shadow: 0 0 20px rgba(255, 195, 0, 0.4);
	transition: box-shadow 0.2s, transform 0.2s;
}
.sm-cta__btn:hover {
	box-shadow: 0 0 30px rgba(255, 195, 0, 0.6);
	transform: translateY(-2px);
	color: var(--sm-text-main);
}
.sm-cta__disclaimer {
	margin-top: 1rem;
	font-size: 0.875rem;
	color: #9ca3af;
}

/* Theme .mi icons (MyListing icon font) */
.sm-lead-form__icon .mi,
.sm-link__arrow .mi,
.sm-trust-bar__icon .mi {
	font-size: inherit;
}
.sm-trust-bar__icon .mi {
	font-size: 1.5rem;
}
