:root {
	--paper: #f7f3ea;
	--ink: #1f1a16;
	--soil: #7a4a2d;
	--clay: #c78453;
	--moss: #60785b;
	--mist: #f2e4cf;
	--card: rgba(255, 252, 245, 0.8);
	--line: rgba(122, 74, 45, 0.22);
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
}

body {
	font-family: "Space Grotesk", sans-serif;
	color: var(--ink);
	background:
		radial-gradient(1200px 550px at 90% -10%, rgba(199, 132, 83, 0.23), transparent 55%),
		radial-gradient(750px 420px at -5% 24%, rgba(96, 120, 91, 0.18), transparent 60%),
		linear-gradient(180deg, #fffaf2 0%, var(--paper) 52%, #efe4d0 100%);
	line-height: 1.6;
	min-height: 100vh;
}

.page-glow {
	position: fixed;
	inset: 0;
	pointer-events: none;
	background-image: linear-gradient(rgba(122, 74, 45, 0.03) 1px, transparent 1px),
		linear-gradient(90deg, rgba(122, 74, 45, 0.03) 1px, transparent 1px);
	background-size: 36px 36px;
	mask-image: radial-gradient(circle at 50% 40%, black 45%, transparent 95%);
	z-index: 0;
}

.section {
	width: min(1080px, 92%);
	margin: 0 auto;
	position: relative;
	z-index: 1;
}

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

.eyebrow {
	display: inline-block;
	margin: 0;
	padding: 0.3rem 0.8rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-size: 0.85rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

h1,
h2,
h3 {
	margin: 0;
	line-height: 1.2;
}

h1,
h2 {
	font-family: "Fraunces", serif;
	letter-spacing: 0.01em;
}

h1 {
	margin-top: 0.9rem;
	font-size: clamp(2rem, 5.3vw, 4.4rem);
	max-width: 15ch;
}

h2 {
	font-size: clamp(1.7rem, 3.1vw, 2.6rem);
	margin-bottom: 1.15rem;
}

h3 {
	font-size: 1.14rem;
	margin-bottom: 0.5rem;
}

.hero-copy,
.section-copy {
	max-width: 68ch;
	margin-top: 1rem;
}

.cta {
	display: inline-block;
	margin-top: 1.4rem;
	padding: 0.75rem 1.1rem;
	background: linear-gradient(120deg, var(--soil), var(--clay));
	color: #fff;
	text-decoration: none;
	border-radius: 0.7rem;
	font-weight: 600;
	box-shadow: 0 10px 20px rgba(72, 35, 18, 0.18);
}

.quick-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
	padding-bottom: 2rem;
}

.quick-nav a {
	text-decoration: none;
	color: var(--ink);
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.58);
	padding: 0.4rem 0.8rem;
	border-radius: 0.6rem;
	transition: transform 180ms ease, background-color 180ms ease;
}

.quick-nav a:hover {
	transform: translateY(-2px);
	background: rgba(255, 255, 255, 0.86);
}

main {
	padding-bottom: 4rem;
}

main .section {
	margin-top: 2.6rem;
}

.grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
}

.grid.two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.decision-matrix {
	margin-top: 1rem;
	display: grid;
	grid-template-columns: 220px repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	align-items: stretch;
}

.matrix-corner,
.matrix-col-label,
.matrix-row-label,
.matrix-cell {
	border: 1px solid var(--line);
	border-radius: 0.9rem;
	background: var(--card);
	backdrop-filter: blur(4px);
}

.matrix-corner,
.matrix-col-label,
.matrix-row-label {
	padding: 0.8rem;
	font-size: 0.88rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #5f4431;
	display: grid;
	place-items: center;
	text-align: center;
}

.matrix-cell {
	padding: 1rem;
}

.matrix-cell-strong {
	background: linear-gradient(145deg, rgba(255, 239, 210, 0.9), rgba(246, 255, 240, 0.9));
}

.card,
.step,
.viewer-wrap,
.floorplan-wrap {
	border: 1px solid var(--line);
	border-radius: 1rem;
	background: var(--card);
	backdrop-filter: blur(4px);
}

.card,
.step {
	padding: 1rem;
}

ul {
	margin: 0.35rem 0 0;
	padding-left: 1.15rem;
}

.solution {
	background: linear-gradient(145deg, rgba(255, 245, 227, 0.72), rgba(255, 253, 248, 0.9));
	border: 1px solid var(--line);
	border-radius: 1rem;
	padding: 1.2rem;
}

.solution-panel {
	margin-top: 1rem;
}

button {
	border: 1px solid var(--line);
	background: #fff;
	color: var(--ink);
	border-radius: 0.6rem;
	padding: 0.55rem 0.95rem;
	font-family: inherit;
	font-size: 0.95rem;
	cursor: pointer;
	transition: background-color 180ms ease;
}


.viewer-wrap {
	padding: 0.7rem;
	position: relative;
	z-index: 2;
}

#modelViewer {
	width: 100%;
	min-height: 400px;
	height: clamp(400px, 55vw, 560px);
	border-radius: 0.8rem;
	display: block;
	opacity: 1;
	background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.7), rgba(233, 222, 200, 0.95));
	transition: opacity 220ms linear;
}

.viewer-help {
	margin: 0.6rem 0 0.2rem;
	font-size: 0.92rem;
	color: #4f453d;
}

.floorplan-stage {
	border: 1px solid var(--line);
	border-radius: 1rem;
	background: var(--card);
	backdrop-filter: blur(4px);
	padding: 0.8rem;
	display: grid;
	place-items: center;
}

.floorplan-panel {
	border: 1px solid var(--line);
	border-radius: 1rem;
	background: var(--card);
	backdrop-filter: blur(4px);
	padding: 0.8rem;
	margin-top: 0.8rem;
	min-height: 540px;
	display: grid;
	place-items: center;
	position: relative;
}

.floorplan-wrap {
	margin-top: 0.75rem;
	min-height: 240px;
	padding: 0.8rem;
	display: grid;
	place-items: center;
}

#floorplanPreview {
	width: 100%;
	height: 100%;
	max-height: 530px;
	object-fit: contain;
	border-radius: 0.6rem;
	display: block;
	opacity: 0;
	transition: opacity 220ms linear;
}

#floorplanPlaceholder {
	margin: 0;
	color: #5e554d;
	font-size: 0.95rem;
	position: absolute;
	text-align: center;
	opacity: 0;
	transition: opacity 220ms linear;
}

#floorplanPlaceholder code {
	background: rgba(122, 74, 45, 0.08);
	border-radius: 0.3rem;
	padding: 0.1em 0.35em;
	font-size: 0.9em;
}

.floorplan-heading {
	margin-top: 1.4rem;
	margin-bottom: 0.2rem;
}

.floorplan-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin: 0.55rem 0 0.25rem;
}

.floorplan-note {
	color: #5e554d;
	font-size: 0.92rem;
}

.floorplan-btn {
	background: rgba(255, 255, 255, 0.72);
}

.floorplan-btn.active {
	background: linear-gradient(120deg, var(--soil), var(--clay));
	color: #fff;
	border-color: rgba(122, 74, 45, 0.6);
}

.timeline {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
}

.step-title {
	margin: 0 0 0.35rem;
	font-weight: 700;
	font-size: 0.9rem;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: #5f4431;
}

/* Upload slots */
.upload-slot {
	position: relative;
	border: 2px dashed var(--line);
	border-radius: 1rem;
	background: var(--card);
	backdrop-filter: blur(4px);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	min-height: 200px;
	padding: 1rem;
	overflow: hidden;
	transition: border-color 200ms ease, background 200ms ease;
	text-align: center;
}

.upload-slot:hover {
	border-color: var(--clay);
	background: rgba(255, 255, 255, 0.88);
}

.upload-input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.upload-icon {
	font-size: 2.2rem;
	color: var(--clay);
	line-height: 1;
	margin-bottom: 0.4rem;
}

.upload-slot:has(.upload-preview.loaded) .upload-icon {
	display: none;
}

.upload-preview {
	width: 100%;
	max-height: 160px;
	object-fit: contain;
	border-radius: 0.6rem;
	display: none;
}

.upload-preview.loaded {
	display: block;
}

.upload-label {
	margin-top: 0.5rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: #5e554d;
}

.upload-slot-final {
	min-height: 380px;
	margin-top: 1rem;
	width: 100%;
}

.upload-slot-final .upload-preview {
	max-height: 320px;
}

.draft-final-heading {
	margin-top: 1.6rem;
	margin-bottom: 0.3rem;
}

.reveal {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.show {
	opacity: 1;
	transform: translateY(0);
}

@media (max-width: 960px) {
	.grid,
	.grid.two,
	.timeline {
		grid-template-columns: 1fr;
	}

	.decision-matrix {
		grid-template-columns: 1fr;
	}

	.matrix-corner {
		display: none;
	}

	.hero {
		padding-top: 3.2rem;
	}

	.quick-nav {
		gap: 0.5rem;
	}

	.floorplan-panel {
		min-height: 380px;
	}
}
