@import url("./colors.css");

/* Component color roles. Shared roles live in colors.css. */
:root {
	--home-beta-note-text: #713010;
	--home-button-secondary-border-hover: #bdb4ac;
	--home-secondary-text: #383431;
	--home-whiteboard-preview-shadow: rgba(61, 47, 38, .12);
}

:root {
	--home-accent: #ff8b4d;
	--home-accent-hover: #f27b3b;
	--home-accent-ink: #3b1c0d;
	--home-text: #242220;
	--home-muted: #68635f;
	--home-bg: #fbfaf8;
	--home-surface: #ffffff;
	--home-soft: #fff3eb;
	--home-border: #e8e2dc;
	--home-shadow: 0 10px 25px rgba(0, 0, 0, .1);
	--home-radius: 16px;
	--home-width: 1100px;
}

html {
	scroll-behavior: smooth;
}

body {
	background: transparent;
	color: var(--home-text);
}

.content {
	padding: 0;
}

.home-page {
	overflow: hidden;
	font-size: 1rem;
	line-height: 1.65;
}

.home-section {
	box-sizing: border-box;
	width: min(var(--home-width), calc(100% - 2.5rem));
	margin-inline: auto;
}

.hero {
	padding: clamp(2rem, 5vw, 3.75rem) 0 clamp(1.75rem, 4vw, 3rem);
}

.hero__inner {
	padding: clamp(2rem, 5vw, 3.5rem);
	border: 1px solid var(--home-border);
	border-radius: 20px;
	background: var(--ui-surface);
	box-shadow: var(--home-shadow);
	text-align: left;
}

.hero__copy {
	max-width: 48rem;
}

.hero__title {
	margin: 0;
	color: var(--home-text);
	font-size: clamp(2rem, 1.2rem + 2.8vw, 3rem);
	font-weight: 800;
	letter-spacing: -.02em;
	line-height: 1.15;
}

.hero__subtitle,
.section-copy {
	color: var(--home-muted);
	font-size: clamp(1rem, 1.4vw, 1.15rem);
	line-height: 1.65;
}

.hero__subtitle {
	max-width: 42rem;
	margin: 1.25rem 0 0;
}

.hero__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: .75rem;
	margin-top: 1.75rem;
}

.hero__note {
	margin: 1rem 0 0;
	color: var(--home-muted);
	font-size: .95rem;
}

.home-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	box-sizing: border-box;
	padding: 0 1.2rem;
	border: 1px solid transparent;
	border-radius: 999px;
	font: inherit;
	font-weight: 750;
	cursor: pointer;
	text-decoration: none;
	box-shadow: 0 5px 14px var(--ui-shadow-default);
	transition: transform .15s ease, border-color .15s ease, background-color .15s ease;
}

.home-button:hover {
	transform: translateY(-1px);
	text-decoration: none;
}

.home-button:focus-visible {
	outline: 3px solid var(--ui-focus-ring-soft);
	outline-offset: 3px;
}

.home-button--primary {
	background: var(--home-accent);
	color: var(--ui-text-on-accent);
}

.home-button--primary:hover {
	background: var(--home-accent-hover);
	color: var(--ui-text-on-accent);
}

.home-button--secondary {
	border-color: var(--ui-border-warm-control);
	background: var(--home-surface);
	color: var(--home-secondary-text);
}

.home-button--secondary:hover {
	border-color: var(--home-button-secondary-border-hover);
	color: var(--home-text);
}

.home-button--patronite {
	margin-top: 1.25rem;
	border-color: var(--home-accent);
	background: var(--home-surface);
	color: var(--home-accent);
}

.home-button--patronite:hover {
	border-color: var(--home-accent-hover);
	color: var(--home-accent-hover);
}

.whiteboard-section {
	display: grid;
	grid-template-columns: minmax(16rem, .7fr) minmax(0, 1.3fr);
	align-items: center;
	gap: clamp(2rem, 5vw, 4.5rem);
	padding: clamp(2rem, 5vw, 3.5rem);
	border: 1px solid var(--home-border);
	border-radius: 18px;
	background: var(--ui-surface);
	box-shadow: var(--home-shadow);
	text-align: left;
	scroll-margin-top: 6rem;
}

.whiteboard-section__intro {
	max-width: 31rem;
}

.home-page .section-title {
	margin: 0;
	color: var(--home-text);
	font-size: clamp(1.55rem, 1.15rem + 1.6vw, 2.1rem);
	font-weight: 800;
	letter-spacing: -.012em;
	line-height: 1.18;
}

.section-copy {
	margin: 1.15rem 0 0;
}

.whiteboard-points {
	display: grid;
	gap: .55rem;
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
}

.whiteboard-points li {
	position: relative;
	padding-left: 1.2rem;
	color: var(--home-secondary-text);
	font-weight: 650;
}

.whiteboard-points li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .72em;
	width: .38rem;
	height: .38rem;
	border-radius: 50%;
	background: var(--home-accent);
}

.whiteboard-actions {
	display: flex;
	margin-top: 1.5rem;
}

.whiteboard-actions form,
.cta form {
	min-width: 0;
	width: 100%;
}

.whiteboard-actions .home-button {
	width: auto;
	max-width: 100%;
}

.cta [data-turnstile-widget] {
	justify-content: center;
}

.whiteboard-preview {
	overflow: hidden;
	border: 1px solid var(--ui-border-warm-frame);
	border-radius: 14px;
	background: var(--ui-surface);
	box-shadow: 0 12px 30px var(--home-whiteboard-preview-shadow);
}

.whiteboard-preview img {
	display: block;
	width: 100%;
	height: auto;
	/* Keep the light screenshot's frame; the dark crop removes empty side margins. */
	aspect-ratio: 1223 / 915;
	object-fit: cover;
}

.whiteboard-preview .whiteboard-preview__dark {
	display: none;
}

@media screen {
	:root[data-site-theme="dark"] .whiteboard-preview__light {
		display: none;
	}

	:root[data-site-theme="dark"] .whiteboard-preview__dark {
		display: block;
	}
}

.features {
	padding: clamp(2.5rem, 6vw, 4.25rem) 0;
	text-align: left;
}

.features__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
	margin-top: 1.75rem;
}

.feature-card {
	box-sizing: border-box;
	min-height: 0;
	padding: 1.35rem 1.5rem;
	border: 1px solid var(--home-border);
	border-top: 3px solid var(--home-accent);
	border-radius: 14px;
	background: var(--ui-surface);
	box-shadow: 0 7px 20px var(--ui-shadow-muted);
	text-align: left;
}

.feature-card h3 {
	margin: 0;
	font-size: 1.2rem;
	line-height: 1.25;
}

.feature-card p {
	margin: .8rem 0 0;
	color: var(--home-muted);
	line-height: 1.6;
}

.free-section {
	margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
	padding: clamp(1.75rem, 4vw, 2.75rem);
	border: 1px solid var(--home-border);
	border-radius: 16px;
	background: var(--ui-surface);
	box-shadow: var(--home-shadow);
}

.free-section__copy {
	max-width: 45rem;
}

.start-section {
	margin-top: clamp(2.5rem, 6vw, 4.5rem);
	margin-bottom: 0;
}

.features__grid.start-steps {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-bottom: 0;
	padding: 0;
	list-style: none;
}

.start-step-number {
	display: block;
	margin-bottom: .85rem;
	color: var(--home-accent-hover);
	font-size: 1.6rem;
	font-weight: 800;
	line-height: 1;
}

.beta-note {
	width: fit-content;
	max-width: 100%;
	margin: 1.15rem 0 0;
	padding: .75rem .9rem;
	border: 1px solid var(--ui-border-accent-hover);
	border-radius: 10px;
	background: var(--home-soft);
	color: var(--home-beta-note-text);
	font-size: .9rem;
	font-weight: 700;
	line-height: 1.45;
}

.student-section {
	margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
	padding: clamp(1.75rem, 4vw, 2.75rem);
	border: 1px solid var(--home-border);
	border-radius: 16px;
	background: var(--ui-surface);
	box-shadow: var(--home-shadow);
}

.student-section__content {
	max-width: 57rem;
	padding-left: clamp(1.1rem, 2.5vw, 2rem);
	border-left: 3px solid var(--home-accent);
}

.student-section .section-copy {
	max-width: 50rem;
}

.cta {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.35rem;
	margin-bottom: clamp(3rem, 7vw, 5.5rem);
	padding: clamp(1.5rem, 3.5vw, 2.25rem);
	border: 1px solid var(--home-border);
	border-radius: var(--home-radius);
	background: var(--ui-surface);
	box-shadow: var(--home-shadow);
	text-align: center;
}

.cta__title {
	max-width: 45rem;
	margin: 0;
	font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
	font-weight: 800;
	letter-spacing: -.012em;
	line-height: 1.18;
}

.cta .home-button {
	flex: 0 0 auto;
}

@media (max-width: 1000px) {
	.features__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 820px) {
	.whiteboard-section {
		grid-template-columns: 1fr;
	}

	.whiteboard-section__intro {
		max-width: 42rem;
	}

}

@media (max-width: 620px) {
	.home-section {
		width: min(100% - 1.25rem, var(--home-width));
	}

	.hero {
		padding: 1.5rem 0 2rem;
	}

	.hero__inner,
	.whiteboard-section,
	.free-section,
	.student-section {
		padding: 1.35rem;
	}

	.hero__title {
		font-size: clamp(1.85rem, 8vw, 2.4rem);
	}

	.hero__cta {
		align-items: stretch;
		flex-direction: column;
	}

	.home-button {
		width: 100%;
	}

	.whiteboard-preview {
		border-radius: 10px;
	}

	.features__grid,
	.features__grid.start-steps {
		grid-template-columns: 1fr;
		margin-top: 1.75rem;
	}

	.feature-card {
		padding: 1.25rem;
	}

	.student-section__content {
		padding-left: 1.2rem;
	}

	.cta {
		align-items: stretch;
		gap: 1.25rem;
		padding: 1.35rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.home-button {
		transition: none;
	}
}
