/* Contact page */

.contact {
	min-height: 100svh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--space-4xl) var(--space-xl);
	background: var(--bg);
	position: relative;
}

.contact__inner {
	max-width: 560px;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* Header */
.contact__header {
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: var(--space-3xl);
}

.contact__label {
	font-family: var(--serif-sc);
	font-size: 0.6rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--secondary);
	margin-bottom: var(--space-lg);
}

.contact__line {
	width: 32px;
	height: 1px;
	background: var(--divider);
	margin-bottom: var(--space-2xl);
}

.contact__heading {
	font-family: var(--serif);
	font-size: 3rem;
	font-weight: 300;
	line-height: 1.1;
	letter-spacing: -0.03em;
	color: var(--ink);
	margin-bottom: var(--space-md);
}

.contact__lede {
	font-family: var(--serif);
	font-size: 1.05rem;
	line-height: 1.7;
	color: var(--secondary);
	opacity: 0.85;
	max-width: 440px;
}

/* Form */
.contact__form {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: var(--space-xl);
}

.field {
	display: flex;
	flex-direction: column;
	gap: var(--space-xs);
}

.field label {
	font-family: var(--serif-sc);
	font-size: 0.58rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--secondary);
	opacity: 0.7;
}

.field input,
.field textarea {
	font-family: var(--serif);
	font-size: 1.05rem;
	color: var(--ink);
	background: transparent;
	border: none;
	border-bottom: 1px solid var(--border);
	padding: 10px 0;
	transition: border-color 0.3s ease;
}

.field input:focus,
.field textarea:focus {
	outline: none;
	border-bottom-color: var(--amber);
}

.field textarea {
	resize: vertical;
	min-height: 80px;
	line-height: 1.6;
}

/* Friendly fail-state copy — long-form prose with italic serif voice and
   a soft amber link rather than alarming red, since the message is
   apologetic, not a validation warning. */
.contact__error {
	font-family: var(--serif);
	font-size: 0.95rem;
	font-style: italic;
	line-height: 1.6;
	color: var(--secondary);
	max-width: 52ch;
	margin: 0 auto;
	text-align: center;
}

.contact__error-link {
	color: var(--amber);
	font-weight: 500;
	font-style: normal;
	text-decoration: none;
	transition: color 0.2s ease;
}

.contact__error-link:hover {
	color: #a88a35;
}

.contact__submit {
	align-self: center;
	font-family: var(--serif);
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--bg);
	background: var(--ink);
	border: none;
	border-radius: 100px;
	padding: 16px 40px;
	margin-top: var(--space-lg);
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
	/* Position so the checkmark can absolutely-center inside it. */
	position: relative;
	overflow: hidden;
}

.contact__submit:hover {
	background: #1e3a30;
	transform: translateY(-1px);
}

.contact__submit:disabled {
	cursor: not-allowed;
	transform: none;
}

.contact__submit.is-sending {
	cursor: progress;
	opacity: 0.85;
}

/* Label ↔ checkmark morph (mirrors .signup__btn pattern in app.css). On
   .is-done the label fades out (opacity only — text stays so the button
   keeps its width), the checkmark scales in, and its SVG path strokes
   from dashed → solid via stroke-dashoffset. */
.contact__submit-text {
	display: inline-block;
	transition: opacity 0.2s ease;
}

.contact__submit-check {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 24px;
	height: 24px;
	opacity: 0;
	transform: scale(0.3);
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact__submit-check path {
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 30;
	stroke-dashoffset: 30;
	transition: stroke-dashoffset 0.5s cubic-bezier(0.65, 0, 0.35, 1) 0.15s;
}

.contact__submit.is-done {
	cursor: default;
	background: var(--ink);
}

.contact__submit.is-done:hover {
	transform: none;
}

.contact__submit.is-done .contact__submit-text {
	opacity: 0;
}

.contact__submit.is-done .contact__submit-check {
	opacity: 1;
	transform: scale(1);
}

.contact__submit.is-done .contact__submit-check path {
	stroke-dashoffset: 0;
}

/* Failure state — same morph as the checkmark, but a red X. Stays put;
   the friendly fallback message handles the "what now" question. */
.contact__submit-fail {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 24px;
	height: 24px;
	opacity: 0;
	transform: scale(0.3);
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact__submit-fail path {
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 36;
	stroke-dashoffset: 36;
	transition: stroke-dashoffset 0.5s cubic-bezier(0.65, 0, 0.35, 1) 0.15s;
}

.contact__submit.is-failed {
	cursor: default;
	background: var(--ink);
}

.contact__submit.is-failed:hover {
	transform: none;
}

.contact__submit.is-failed .contact__submit-text {
	opacity: 0;
}

.contact__submit.is-failed .contact__submit-check {
	opacity: 0;
}

.contact__submit.is-failed .contact__submit-fail {
	opacity: 1;
	transform: scale(1);
}

.contact__submit.is-failed .contact__submit-fail path {
	stroke-dashoffset: 0;
}

/* Thanks state */
/* Thanks block mirrors the site's section-label grammar: small-caps amber
   label, short amber hairline, serif italic confirmation. Fades + lifts
   on reveal so the form → thanks swap feels considered, not abrupt. */
.contact__thanks {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-lg);
	padding: var(--space-3xl) 0;
	text-align: center;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.contact__thanks.is-in {
	opacity: 1;
	transform: translateY(0);
}

.contact__thanks-label {
	font-family: var(--serif-sc);
	font-size: 0.6rem;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--amber);
	margin: 0;
}

.contact__thanks-line {
	width: 32px;
	height: 1px;
	background: var(--divider);
}

.contact__thanks-text {
	font-family: var(--serif);
	font-size: 1.3rem;
	font-style: italic;
	font-weight: 300;
	line-height: 1.55;
	color: var(--ink);
	max-width: 32ch;
	margin: 0;
}

/* Footer meta */
.contact__footer {
	width: 100%;
	margin-top: var(--space-3xl);
	display: flex;
	flex-direction: column;
	align-items: center;
}

.contact__footer-line {
	width: 32px;
	height: 1px;
	background: var(--divider);
	margin-bottom: var(--space-xl);
}

.contact__meta {
	display: flex;
	align-items: center;
	gap: var(--space-xl);
}

.contact__meta-item {
	text-align: center;
}

.contact__meta-label {
	font-family: var(--serif-sc);
	font-size: 0.55rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--amber);
	opacity: 0.6;
	margin-bottom: 4px;
}

.contact__meta-value {
	font-family: var(--serif);
	font-size: 0.85rem;
	color: var(--ink);
	opacity: 0.7;
}

.contact__meta-link {
	font-family: var(--serif);
	font-size: 0.85rem;
	color: var(--ink);
	opacity: 0.7;
	text-decoration: none;
	transition: color 0.2s, opacity 0.2s;
}

.contact__meta-link:hover {
	color: var(--amber);
	opacity: 1;
}

.contact__meta-dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: var(--pencil);
}

/* Responsive */
@media (max-width: 768px) {
	.contact {
		padding: var(--space-3xl) var(--space-lg);
		min-height: auto;
	}

	.contact__heading {
		font-size: 2.2rem;
	}

	.contact__lede {
		font-size: 0.95rem;
	}

	.contact__meta {
		flex-direction: column;
		gap: var(--space-md);
	}

	.contact__meta-dot {
		display: none;
	}
}
