/* Casa Buswell front door. One typeface, two colours, no scripts.
   Palette: deep forest green and a cool bone, swapped for dark mode. */

@font-face {
	font-family: "Bricolage Grotesque";
	src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}

:root {
	--surface: #e9ede4;
	--ink: #14302a;
	--ink-soft: #3d5a51;
	--focus: #14302a;
}

@media (prefers-color-scheme: dark) {
	:root {
		--surface: #10231d;
		--ink: #e9ede4;
		--ink-soft: #b3c2b6;
		--focus: #e9ede4;
	}
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--surface);
	color: var(--ink);
	font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	-webkit-font-smoothing: antialiased;
}

/* The name sits low and left, like a nameplate by a door. */
.door {
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-start;
	gap: clamp(1rem, 2.5vw, 2rem);
	max-width: 1400px;
	margin: 0 auto;
	padding: clamp(1.5rem, 5vw, 4.5rem);
	padding-bottom: clamp(2.5rem, 8vh, 6rem);
}

.name {
	margin: 0;
	font-size: clamp(4rem, 19vw, 15rem);
	line-height: 0.88;
	letter-spacing: -0.045em;
	font-weight: 700;
	text-wrap: balance;
}

.name-casa,
.name-family {
	display: block;
}

.name-casa {
	font-weight: 300;
}

.name-small {
	font-size: clamp(2.75rem, 9vw, 6rem);
	line-height: 1;
}

.line {
	margin: 0;
	max-width: 32ch;
	font-size: clamp(1.125rem, 1.6vw, 1.5rem);
	line-height: 1.4;
	color: var(--ink-soft);
	text-wrap: balance;
}

.home {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 0 1.5rem;
	border-radius: 999px;
	background: var(--ink);
	color: var(--surface);
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	transition: transform 0.15s ease-out;
}

.home:active {
	transform: scale(0.98);
}

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

/* One quiet arrival: the name settles into place. */
@media (prefers-reduced-motion: no-preference) {
	.name,
	.line,
	.home {
		animation: settle 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
	}

	.line {
		animation-delay: 0.12s;
	}

	.home {
		animation-delay: 0.2s;
	}
}

@keyframes settle {
	from {
		opacity: 0;
		transform: translateY(0.4em);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
