/**
 * Nocturne Contact - scoped styles.
 * Everything is namespaced under .np-contact so it can drop into any theme
 * without leaking styles. No external fonts or images are required.
 */

.np-contact {
	--np-bg: var(--np-token-bg, #211e34);
	--np-panel: var(--np-token-panel, #19191e);
	--np-ink: var(--np-token-ink, #f6f3ee);
	--np-muted: var(--np-token-muted, #b3aec0);
	--np-line: var(--np-token-line, rgba(255, 255, 255, 0.1));
	--np-accent: var(--np-token-accent, #bd793b);
	--np-accent-strong: var(--np-token-accent-strong, #d18d4c);
	--np-accent-soft: var(--np-token-accent-soft, rgba(189, 121, 59, 0.22));
	--np-display: var(--np-token-font-display, "Akira Expanded", "Archivo Black", "Arial Black", system-ui, sans-serif);
	--np-body: var(--np-token-font-body, "Avenir", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif);
	--np-radius: var(--np-token-radius, 4px);

	position: relative;
	isolation: isolate;
	overflow: hidden;
	overflow: clip;
	background: var(--np-bg);
	color: var(--np-ink);
	font-family: var(--np-body);
	font-weight: 300;
	font-size: var(--np-token-base-size, 16px);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

/* Flat brand background so the section blends into a dark page and still
   reads as its own block on a light theme. */

.np-contact__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	column-gap: clamp(2.5rem, 6vw, 6rem);
	align-items: start;
	max-width: var(--np-token-content-width, 1180px);
	margin: 0 auto;
	padding: clamp(2rem, 5vw, var(--np-token-section-top, 4.5rem)) clamp(1.25rem, 4vw, 3rem) var(--np-token-section-gap, 7rem);
}

.np-contact__details {
	min-width: 0;
}

/* ---------- Intro column ---------- */

.np-contact__eyebrow {
	margin: 0 0 1rem;
	color: var(--np-accent);
	font-family: var(--np-body);
	font-size: 0.68rem;
	font-weight: 500;
	letter-spacing: 0.2em;
	line-height: 1.4;
	text-transform: uppercase;
}

.np-contact__eyebrow--size-sm {
	font-size: 0.58rem;
}

.np-contact__eyebrow--size-md {
	font-size: 0.76rem;
}

.np-contact__eyebrow--size-lg {
	font-size: 0.9rem;
}

.np-contact__eyebrow--size-xl {
	font-size: 1.05rem;
}

.np-contact__title {
	margin: 0 0 1.25rem;
	color: var(--np-ink);
	font-family: var(--np-display);
	font-size: var(--np-title-size, clamp(2.4rem, 5.4vw, 4.5rem));
	font-weight: 400;
	line-height: 1.02;
	letter-spacing: -0.01em;
	text-transform: uppercase;
}

.np-contact__lede {
	max-width: 44ch;
	margin: 0;
	color: var(--np-muted);
	font-size: var(--np-lede-size, 1.02rem);
	line-height: 1.7;
}

.np-contact--title-size-sm {
	--np-title-size: calc(clamp(2.4rem, 5.4vw, 4.5rem) * 0.85);
}

.np-contact--title-size-md {
	--np-title-size: clamp(2.4rem, 5.4vw, 4.5rem);
}

.np-contact--title-size-lg {
	--np-title-size: calc(clamp(2.4rem, 5.4vw, 4.5rem) * 1.15);
}

.np-contact--title-size-xl {
	--np-title-size: calc(clamp(2.4rem, 5.4vw, 4.5rem) * 1.3);
}

.np-contact--lede-size-sm {
	--np-lede-size: 0.88rem;
}

.np-contact--lede-size-md {
	--np-lede-size: 1.02rem;
}

.np-contact--lede-size-lg {
	--np-lede-size: 1.16rem;
}

.np-contact--lede-size-xl {
	--np-lede-size: 1.3rem;
}

.np-contact--panel-title-size-sm {
	--np-panel-title-size: 0.82rem;
}

.np-contact--panel-title-size-md {
	--np-panel-title-size: 0.95rem;
}

.np-contact--panel-title-size-lg {
	--np-panel-title-size: 1.08rem;
}

.np-contact--panel-title-size-xl {
	--np-panel-title-size: 1.2rem;
}

.np-offices {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem;
	margin: clamp(2rem, 4vw, 3rem) 0 0;
	padding: 0;
	list-style: none;
}

.np-office {
	padding-top: 1.1rem;
	border-top: 1px solid var(--np-line);
}

.np-office__city {
	margin: 0 0 0.6rem;
	color: var(--np-ink);
	font-family: var(--np-display);
	font-size: 0.82rem;
	font-weight: 400;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.np-office__address {
	margin: 0 0 0.9rem;
	color: var(--np-muted);
	font-size: 0.92rem;
	line-height: 1.55;
}

.np-office__links {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.35rem;
	margin: 0;
	font-size: 0.88rem;
}

.np-office__email,
.np-office__map {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	color: var(--np-ink);
	text-decoration: none;
	overflow-wrap: anywhere;
	border-bottom: 1px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.np-office__email:hover,
.np-office__map:hover,
.np-office__email:focus-visible,
.np-office__map:focus-visible {
	color: var(--np-accent-strong);
	border-bottom-color: var(--np-accent-strong);
}

.np-office__map {
	color: var(--np-muted);
	font-size: 0.8rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* ---------- Form panel ---------- */

.np-contact__panel {
	align-self: start;
	padding: clamp(1.5rem, 3vw, 2.5rem);
	border: 1px solid var(--np-line);
	border-radius: calc(var(--np-radius) + 2px);
	background: linear-gradient(180deg, rgba(25, 25, 30, 0.94), rgba(18, 18, 23, 0.94));
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.np-contact__panel-title {
	margin: 0 0 1.5rem;
	color: var(--np-ink);
	font-family: var(--np-display);
	font-size: var(--np-panel-title-size, 0.95rem);
	font-weight: 400;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* Shown in place of the form when Contact Form 7 or the form is missing. */

.np-contact__notice {
	margin: 0;
	padding: 0.9rem 1rem;
	border: 1px solid var(--np-line);
	border-left: 3px solid var(--np-accent);
	border-radius: var(--np-radius);
	background: rgba(255, 255, 255, 0.03);
	color: var(--np-muted);
	font-size: 0.9rem;
}

.np-contact__notice code {
	color: var(--np-ink);
	font-size: 0.85em;
	word-break: break-word;
}

/* ---------- Contact Form 7 ---------- */

.np-contact .wpcf7 {
	margin: 0;
}

.np-contact .wpcf7 form {
	margin-bottom: 0;
}

.np-contact .wpcf7-form p {
	margin: 0 0 1.1rem;
}

.np-contact .wpcf7-form label {
	display: block;
	margin: 0 0 0.45rem;
	color: var(--np-muted);
	font-size: 0.7rem;
	font-weight: 400;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.np-contact .np-optional {
	color: rgba(166, 162, 176, 0.65);
	font-size: 0.68rem;
	letter-spacing: 0.06em;
	text-transform: none;
}

.np-contact .wpcf7 .wpcf7-form-control {
	display: block;
	width: 100%;
	padding: 0.85rem 1rem;
	border: 1px solid var(--np-line);
	border-radius: 3px;
	background-color: rgba(255, 255, 255, 0.035);
	color: var(--np-ink);
	font-family: var(--np-body);
	font-size: 1rem;
	font-weight: 300;
	line-height: 1.4;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.np-contact .wpcf7 .wpcf7-form-control::placeholder {
	color: rgba(166, 162, 176, 0.6);
}

.np-contact .wpcf7 .wpcf7-form-control:hover {
	border-color: rgba(255, 255, 255, 0.2);
}

.np-contact .wpcf7 .wpcf7-form-control:focus {
	outline: none;
	border-color: var(--np-accent);
	background-color: rgba(255, 255, 255, 0.05);
	box-shadow: 0 0 0 3px var(--np-accent-soft);
}

.np-contact .wpcf7 select.wpcf7-form-control {
	-webkit-appearance: none;
	appearance: none;
	padding-right: 2.5rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23a6a2b0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	cursor: pointer;
}

.np-contact .wpcf7 select.wpcf7-form-control option {
	background: var(--np-panel);
	color: var(--np-ink);
}

.np-contact .wpcf7 textarea.wpcf7-form-control {
	min-height: 140px;
	resize: vertical;
}

/* Two fields per row on wider screens. */
.np-contact .np-form-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 1rem;
}

.np-contact .np-form-row p {
	margin-bottom: 1.1rem;
}

/* Submit */
.np-contact .wpcf7 .wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: var(--np-token-button-py, 1rem) var(--np-token-button-px, 1.5rem);
	border: 0;
	-webkit-appearance: none;
	appearance: none;
	border-radius: var(--np-token-button-radius, 3px);
	background: var(--np-accent);
	color: var(--np-panel);
	font-family: var(--np-body);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.np-contact .wpcf7 .wpcf7-submit:hover {
	background: var(--np-accent-strong);
	transform: translateY(-1px);
	box-shadow: 0 10px 24px color-mix(in srgb, var(--np-accent) 28%, transparent);
}

.np-contact .wpcf7 .wpcf7-submit:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px var(--np-accent-soft);
}

.np-contact .wpcf7 .wpcf7-submit:active {
	transform: translateY(0);
}

.np-contact .np-form-submit {
	margin-bottom: 0;
}

/* Validation + response messages */
.np-contact .wpcf7-not-valid-tip {
	margin-top: 0.4rem;
	color: #ff9b9b;
	font-size: 0.78rem;
	letter-spacing: 0.02em;
}

.np-contact .wpcf7 .wpcf7-form-control.wpcf7-not-valid {
	border-color: #ff9b9b;
	box-shadow: 0 0 0 3px rgba(255, 155, 155, 0.15);
}

.np-contact .wpcf7-response-output {
	margin: 1.25rem 0 0;
	padding: 0.9rem 1rem;
	border: 1px solid var(--np-line);
	border-radius: 3px;
	color: var(--np-ink);
	font-size: 0.88rem;
	line-height: 1.5;
}

.np-contact .wpcf7-response-output:empty {
	display: none;
}

.np-contact .wpcf7 form.sent .wpcf7-response-output {
	border-color: rgba(120, 200, 140, 0.45);
	background: rgba(120, 200, 140, 0.08);
}

.np-contact .wpcf7 form.invalid .wpcf7-response-output,
.np-contact .wpcf7 form.failed .wpcf7-response-output,
.np-contact .wpcf7 form.aborted .wpcf7-response-output {
	border-color: rgba(255, 155, 155, 0.45);
	background: rgba(255, 155, 155, 0.08);
}

.np-contact .wpcf7-spinner {
	display: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
	.np-contact__inner {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"intro"
			"panel"
			"offices";
		gap: 0;
	}

	/* On phones and tablets the form comes before the office details. */
	.np-contact__details {
		display: contents;
	}

	.np-contact__intro {
		grid-area: intro;
	}

	.np-contact__panel {
		grid-area: panel;
		margin-top: clamp(2rem, 4vw, 3rem);
	}

	.np-offices {
		grid-area: offices;
	}

	/* Comfortable tap targets for the office links. */
	.np-office__links {
		gap: 0;
	}

	.np-office__email,
	.np-office__map {
		min-height: 40px;
	}
}

@media (max-width: 560px) {
	.np-contact .np-form-row {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}

	.np-offices {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.25rem;
	}

	.np-contact__panel {
		padding: 1.35rem;
		/* The panel is 94% opaque, so the blur is barely visible and costs
		   paint time on low-end phones. */
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}
}

/* Scroll reveal, matching the About section. */
.np-contact-reveal .np-contact__intro,
.np-contact-reveal .np-offices,
.np-contact-reveal .np-contact__panel {
	opacity: 0;
	transform: translateY(24px);
	transition:
		opacity var(--np-token-motion-duration, 0.8s) ease,
		transform var(--np-token-motion-duration, 0.8s) var(--np-token-motion-ease, cubic-bezier(0.22, 1, 0.36, 1));
	transition-delay: calc(var(--i, 0) * 80ms);
}

.np-contact-reveal .np-contact__intro.is-inview,
.np-contact-reveal .np-offices.is-inview,
.np-contact-reveal .np-contact__panel.is-inview {
	opacity: 1;
	transform: translateY(0);
}

/* Respect reduced motion. */
@media (prefers-reduced-motion: reduce) {
	.np-contact *,
	.np-contact *::before,
	.np-contact *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}

	.np-contact-reveal .np-contact__intro,
	.np-contact-reveal .np-offices,
	.np-contact-reveal .np-contact__panel {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}

/* Global motion tokens */
.np-contact a,
.np-contact button,
.np-contact input,
.np-contact textarea,
.np-contact .wpcf7-submit {
	transition-duration: var(--np-token-motion-duration, 0.2s);
	transition-timing-function: var(--np-token-motion-ease, ease);
}

