/* ==========================================================================
   Front page
   Loaded on the front page only. Section classes are prefixed `home-` so they
   can never collide with the tool or article styles.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared section furniture
   -------------------------------------------------------------------------- */
.home-kicker {
	margin-bottom: 10px;
	color: var(--text-muted);
	font-family: var(--msm-font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.home-sec-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	margin-bottom: 32px;
	text-align: center;
}

.home-sec-head > div {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.home-sec-head h2 {
	max-width: 24ch;
	font-size: clamp(1.55rem, 3.2vw, 2.25rem);
	line-height: 1.14;
}

.home-sec-text {
	max-width: 62ch;
	margin-top: 10px;
	color: var(--text-secondary);
}

.home-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--msm-brand);
	font-family: var(--msm-font-display);
	font-weight: 600;
	font-size: 0.92rem;
	text-decoration: none;
	white-space: nowrap;
}

.home-link:hover {
	color: var(--msm-brand-hover);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.home-hero {
	padding: 78px 0 0;
	background: radial-gradient(720px 320px at 8% -12%, var(--msm-brand-soft), transparent 70%);
}

.home-hero > .container {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.home-eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
	color: var(--msm-brand);
	font-family: var(--msm-font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.home-eyebrow::before,
.home-eyebrow::after {
	content: "";
	width: 26px;
	height: 1px;
	background: var(--msm-brand);
}

.home-hero-title {
	max-width: 22ch;
	font-size: clamp(2.25rem, 5.4vw, 4rem);
	font-weight: 700;
	line-height: 1.08;
}

.home-hero-title em {
	color: var(--msm-brand);
	font-style: normal;
}

.home-lede {
	max-width: 62ch;
	margin: 22px 0 32px;
	color: var(--text-secondary);
	font-size: 1.09rem;
}

.home-lede b {
	color: var(--text-primary);
	font-weight: 500;
}

/* Search console */
.home-console {
	position: relative;
	width: 100%;
	max-width: 840px;
	text-align: start;
	overflow: visible;
	border: 1px solid var(--card-border);
	border-radius: var(--radius-md, 16px);
	background: var(--bg-surface);
	box-shadow: 0 20px 52px -34px rgba(28, 25, 23, 0.55);
}

.home-console-bar {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px 0;
	padding-inline: 18px 6px;
}

.home-console-bar .msm-icon {
	flex: none;
	width: 19px;
	height: 19px;
	color: var(--text-muted);
}

.home-console-bar input {
	flex: 1;
	min-width: 0;
	padding: 17px 0;
	border: 0;
	background: transparent;
	color: var(--text-primary);
	font-family: inherit;
	font-size: 1.05rem;
	outline: none;
}

.home-console-bar input::placeholder {
	color: var(--text-muted);
}

.home-console-go {
	flex: none;
	padding: 14px 24px;
	border: 0;
	border-radius: var(--radius-sm, 12px);
	background: var(--msm-brand);
	color: var(--msm-on-brand);
	font-family: var(--msm-font-display);
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
	transition: background 0.18s;
}

.home-console-go:hover {
	background: var(--msm-brand-hover);
}

.home-console-suggest {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	padding: 11px 14px;
	border-top: 1px solid var(--card-border);
	border-radius: 0 0 var(--radius-md, 16px) var(--radius-md, 16px);
	background: var(--bg-surface-alt);
}

.home-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 1px solid var(--card-border);
	border-radius: 99px;
	background: var(--bg-surface);
	color: var(--text-secondary);
	font-family: var(--msm-font-mono);
	font-size: 0.78rem;
	text-decoration: none;
}

.home-chip span {
	color: var(--msm-brand);
}

.home-chip:hover {
	border-color: var(--msm-brand);
	color: var(--msm-brand);
}

/* Statistics */
.home-stats {
	margin-top: 58px;
	border-top: 1px solid var(--card-border);
	background: var(--bg-surface);
}

.home-stats .container {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
}

.home-stat {
	padding: 30px 26px 32px;
	text-align: center;
	border-inline-end: 1px solid var(--card-border);
}

.home-stat:last-child {
	border-inline-end: 0;
}

.home-stat-key {
	display: block;
	margin-bottom: 12px;
	color: var(--text-muted);
	font-family: var(--msm-font-mono);
	font-size: 0.69rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
}

.home-stat-value {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 3px;
	flex-wrap: wrap;
	color: var(--msm-brand);
	font-family: var(--msm-font-display);
	font-weight: 700;
	font-size: clamp(1.9rem, 3.6vw, 2.75rem);
	line-height: 1;
	letter-spacing: -0.04em;
}

.home-stat-suffix {
	color: var(--text-primary);
	font-size: 0.46em;
	font-weight: 600;
	white-space: nowrap;
}

.home-stat-label {
	display: block;
	margin-top: 10px;
	color: var(--text-secondary);
	font-size: 0.88rem;
}

/* --------------------------------------------------------------------------
   Category index
   -------------------------------------------------------------------------- */
.home-board {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.home-col {
	display: flex;
	flex-direction: column;
	min-height: 206px;
	padding: 16px 16px 12px;
	border: 1px solid var(--card-border);
	border-radius: var(--radius-md, 16px);
	background: var(--bg-surface);
	transition: border-color 0.18s;
}

.home-col:hover {
	border-color: rgba(var(--msm-brand-rgb), 0.35);
}

.home-col-top {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 12px;
}

.home-col-top h3 {
	font-size: 0.97rem;
	font-weight: 600;
}

.home-col-top a {
	color: inherit;
	text-decoration: none;
}

.home-col-top a:hover {
	color: var(--msm-brand);
}

.home-col-count {
	color: var(--text-muted);
	font-family: var(--msm-font-mono);
	font-size: 0.75rem;
}

.home-col-bar {
	display: block;
	height: 3px;
	margin-bottom: 13px;
	border-radius: 2px;
	background: var(--msm-brand);
	opacity: 0.9;
}

.home-col ul {
	display: flex;
	flex-direction: column;
	gap: 7px;
	list-style: none;
	font-size: 0.85rem;
}

.home-col li {
	display: flex;
	align-items: center;
	gap: 7px;
}

.home-col li::before {
	content: "";
	flex: none;
	width: 4px;
	height: 4px;
	border-radius: 99px;
	background: var(--msm-brand);
	opacity: 0.55;
}

.home-col li a {
	color: var(--text-secondary);
	text-decoration: none;
}

.home-col li a:hover {
	color: var(--msm-brand);
}

.home-col-more {
	margin-top: auto;
	padding-top: 12px;
	color: var(--text-muted);
	font-family: var(--msm-font-mono);
	font-size: 0.72rem;
	text-decoration: none;
}

.home-col-more:hover {
	color: var(--msm-brand);
}

/* --------------------------------------------------------------------------
   Popular tools
   -------------------------------------------------------------------------- */
.home-cards {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.home-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 9px;
	padding: 18px;
	border: 1px solid var(--card-border);
	border-radius: var(--radius-md, 16px);
	background: var(--bg-surface);
	transition: border-color 0.18s, transform 0.18s;
}

.home-card:hover {
	border-color: rgba(var(--msm-brand-rgb), 0.35);
	transform: translateY(-2px);
}

.home-card-icon {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: var(--msm-brand-soft);
	font-size: 1.1rem;
}

.home-card h3 {
	font-size: 0.97rem;
	font-weight: 600;
}

.home-card h3 a {
	color: inherit;
	text-decoration: none;
}

.home-card h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.home-card p {
	color: var(--text-muted);
	font-size: 0.84rem;
	line-height: 1.5;
}

.home-card-meta {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
	padding-top: 12px;
	color: var(--text-muted);
	font-family: var(--msm-font-mono);
	font-size: 0.72rem;
}

.home-card-flag {
	position: absolute;
	top: 14px;
	inset-inline-end: 14px;
	padding: 2px 7px;
	border-radius: 99px;
	background: rgba(180, 83, 9, 0.1);
	color: #b45309;
	font-family: var(--msm-font-mono);
	font-size: 0.66rem;
}

/* --------------------------------------------------------------------------
   How it works
   -------------------------------------------------------------------------- */
.home-flow {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}

.home-step {
	padding: 24px;
	border: 1px solid var(--card-border);
	border-radius: var(--radius-md, 16px);
	background: var(--bg-surface);
}

.home-step.is-lead {
	border-color: rgba(var(--msm-brand-rgb), 0.3);
	background: linear-gradient(180deg, var(--msm-brand-soft), transparent 60%);
}

.home-step-key {
	display: block;
	margin-bottom: 14px;
	color: var(--msm-brand);
	font-family: var(--msm-font-mono);
	font-size: 0.74rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.home-step h3 {
	margin-bottom: 8px;
	font-size: 1.05rem;
	font-weight: 600;
}

.home-step p {
	color: var(--text-secondary);
	font-size: 0.9rem;
	line-height: 1.6;
}

.home-kinds {
	margin-top: 14px;
	border: 1px solid var(--card-border);
	border-radius: var(--radius-md, 16px);
	background: var(--bg-surface);
	overflow: hidden;
}

.home-kind {
	display: grid;
	grid-template-columns: 180px minmax(0, 1fr) 230px;
	gap: 20px;
	align-items: baseline;
	padding: 15px 20px;
	border-bottom: 1px solid var(--card-border);
}

.home-kind:last-child {
	border-bottom: 0;
}

.home-kind span:first-child {
	font-family: var(--msm-font-display);
	font-weight: 600;
	font-size: 0.9rem;
}

.home-kind span:nth-child(2) {
	color: var(--text-secondary);
	font-size: 0.89rem;
}

.home-kind-example {
	color: var(--text-muted);
	font-family: var(--msm-font-mono);
	font-size: 0.76rem;
}

.home-kind-head {
	background: var(--bg-surface-alt);
}

.home-kind-head span {
	color: var(--text-muted);
	font-family: var(--msm-font-mono);
	font-size: 0.69rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------------- */
.voices-slider {
	position: relative;
}

.voices-viewport {
	overflow: hidden;
}

.voices-track {
	display: flex;
	gap: 14px;
	transition: transform 0.45s ease;
}

.home-quote {
	flex: 0 0 calc((100% - 28px) / 3);
	min-width: 0;
	display: flex;
	flex-direction: column;
	padding: 24px;
	border: 1px solid var(--card-border);
	border-radius: var(--radius-md, 16px);
	background: var(--bg-surface);
}

.voices-arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--card-border);
	border-radius: 99px;
	background: var(--bg-surface);
	box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.15);
	color: var(--text-primary);
	font-size: 1.2rem;
	line-height: 1;
	transition: border-color 0.2s, color 0.2s;
}

.voices-arrow:hover {
	border-color: var(--msm-brand);
	color: var(--msm-brand);
}

.voices-prev { inset-inline-start: -20px; }
.voices-next { inset-inline-end: -20px; }

.voices-dots {
	display: flex;
	justify-content: center;
	gap: 7px;
	margin-top: 20px;
}

.voices-dot {
	width: 7px;
	height: 7px;
	padding: 0;
	border: none;
	border-radius: 99px;
	background: var(--card-border);
	transition: width 0.2s, background 0.2s;
}

.voices-dot.is-active {
	width: 20px;
	background: var(--msm-brand);
}

@media (max-width: 860px) {
	.home-quote { flex-basis: calc((100% - 14px) / 2); }
}

@media (max-width: 560px) {
	.home-quote { flex-basis: 100%; }
	.voices-prev { inset-inline-start: 4px; }
	.voices-next { inset-inline-end: 4px; }
}

.home-quote blockquote {
	margin-bottom: 18px;
	font-size: 0.97rem;
	line-height: 1.62;
}

.home-stars {
	margin-bottom: 12px;
	color: #b45309;
	font-size: 0.78rem;
	letter-spacing: 2px;
}

.home-who {
	display: flex;
	align-items: center;
	gap: 11px;
	margin-top: auto;
}

.home-avatar,
.home-avatar-img {
	flex: none;
	width: 34px;
	height: 34px;
	border-radius: 99px;
}

.home-avatar {
	display: grid;
	place-items: center;
	background: var(--msm-brand-soft);
	color: var(--msm-brand);
	font-family: var(--msm-font-display);
	font-weight: 600;
	font-size: 0.8rem;
}

.home-avatar-img {
	object-fit: cover;
}

.home-who b {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
}

.home-who span span {
	color: var(--text-muted);
	font-size: 0.78rem;
}

/* --------------------------------------------------------------------------
   Blog
   -------------------------------------------------------------------------- */
.home-posts {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}

.home-post {
	overflow: hidden;
	border: 1px solid var(--card-border);
	border-radius: var(--radius-md, 16px);
	background: var(--bg-surface);
}

.home-post-thumb {
	display: block;
	height: 132px;
	background: var(--msm-gradient);
	opacity: 0.92;
}

.home-post-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.home-post-body {
	padding: 16px 18px 20px;
}

.home-post time {
	color: var(--text-muted);
	font-family: var(--msm-font-mono);
	font-size: 0.72rem;
}

.home-post h3 {
	margin: 7px 0 8px;
	font-size: 1rem;
	font-weight: 600;
}

.home-post h3 a {
	color: inherit;
	text-decoration: none;
}

.home-post h3 a:hover {
	color: var(--msm-brand);
}

.home-post p {
	color: var(--text-secondary);
	font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.home-faq-list {
	display: grid;
	gap: 10px;
}

.home-faq-item {
	overflow: hidden;
	border: 1px solid var(--card-border);
	border-radius: var(--radius-md, 16px);
	background: var(--bg-surface);
}

.home-faq-item[open] {
	border-color: rgba(var(--msm-brand-rgb), 0.3);
}

.home-faq-item summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 19px 22px;
	list-style: none;
	font-family: var(--msm-font-display);
	font-weight: 600;
	font-size: 1.03rem;
	cursor: pointer;
}

.home-faq-item summary::-webkit-details-marker {
	display: none;
}

.home-faq-item summary::after {
	content: "+";
	flex: none;
	color: var(--msm-brand);
	font-size: 1.25rem;
	font-weight: 500;
}

.home-faq-item[open] summary::after {
	content: "–";
}

.home-faq-answer {
	max-width: 78ch;
	padding: 0 22px 20px;
	color: var(--text-secondary);
	font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
	.home-stats {
		margin-top: 44px;
		border-top: 0;
		background: transparent;
	}

	.home-stats .container {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.home-stat {
		padding: 20px;
		border: 1px solid var(--card-border);
		border-radius: var(--radius-md, 16px);
		background: var(--bg-surface);
	}

	.home-stat-value {
		font-size: 2.25rem;
	}

	.home-flow,
	.home-board,
	.home-cards,
	.home-posts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.home-kind {
		grid-template-columns: 130px minmax(0, 1fr);
		gap: 14px;
	}

	.home-kind-example {
		grid-column: 2;
	}

	.home-kind-head span:last-child {
		display: none;
	}

}

@media (max-width: 620px) {
	.home-hero {
		padding-top: 56px;
	}

	.home-hero-title {
		font-size: clamp(2rem, 9vw, 2.6rem);
	}

	.home-flow,
	.home-board,
	.home-cards,
	.home-posts {
		grid-template-columns: 1fr;
	}

	.home-console-bar {
		flex-wrap: wrap;
		padding: 12px;
	}

	.home-console-bar input {
		flex: 1 1 100%;
		padding: 6px 0 12px;
	}

	.home-console-go {
		width: 100%;
	}

	.home-stats {
		margin-top: 36px;
	}

	.home-stats .container {
		gap: 10px;
	}

	.home-stat {
		padding: 15px 14px 16px;
		border-radius: 12px;
	}

	.home-stat-key {
		margin-bottom: 8px;
		font-size: 0.6rem;
		letter-spacing: 0.11em;
		line-height: 1.35;
	}

	.home-stat-value {
		font-size: 1.8rem;
	}

	.home-stat-label {
		margin-top: 6px;
		font-size: 0.76rem;
		line-height: 1.45;
	}

	.home-kind {
		grid-template-columns: 1fr;
		gap: 5px;
		padding: 14px 16px;
	}

	.home-kind-head {
		display: none;
	}

}

/* Cards keep their own left alignment; only the section heading is centred. */
.home-board,
.home-cards,
.voices-slider,
.home-posts,
.home-flow,
.home-kinds,
.home-faq-list {
	text-align: start;
}

/* The "browse all" link sits under the heading now that the head is a column. */
.home-sec-head .home-link {
	margin-top: 2px;
}
