/**
 * Velvet Motion Haus — site styles.
 *
 * theme.json owns the palette, type scale and spacing scale. This file owns
 * the cinematic treatment: texture, depth, motion and the Contact Form 7 skin.
 */

:root {
	--vmh-header-h: 4.5rem;
	--vmh-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	/* Low-amplitude film grain, inlined so nothing is fetched at runtime. */
	--vmh-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

html {
	scroll-behavior: smooth;
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

/* Anchor targets clear the sticky header. */
[id] {
	scroll-margin-top: calc(var(--vmh-header-h) + 1.5rem);
}

::selection {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-bright);
	outline-offset: 3px;
}

/* ---------------------------------------------------------------- Header */

.vmh-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--wp--preset--color--base) 78%, transparent);
	backdrop-filter: saturate(1.4) blur(14px);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.3s var(--vmh-ease);
}

.vmh-header__inner {
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
	min-height: var(--vmh-header-h);
	padding-inline: clamp(1.25rem, 5vw, 3.5rem);
	gap: clamp(1rem, 3vw, 2.25rem);
}

.vmh-header__logo img {
	display: block;
	width: auto;
	max-height: 3.1rem;
	object-fit: contain;
}

.vmh-nav {
	gap: clamp(1rem, 2.5vw, 2rem);
}

.vmh-nav__link {
	margin: 0;
	font-weight: 500;
	letter-spacing: 0.02em;
}

.vmh-nav__link a {
	text-decoration: none;
	color: var(--wp--preset--color--muted);
	position: relative;
	transition: color 0.25s var(--vmh-ease);
}

.vmh-nav__link a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 100%;
	bottom: -0.4em;
	height: 1px;
	background: var(--wp--preset--color--accent);
	transition: right 0.3s var(--vmh-ease);
}

.vmh-nav__link a:hover {
	color: var(--wp--preset--color--contrast);
}

.vmh-nav__link a:hover::after {
	right: 0;
}

.vmh-button--small .wp-block-button__link {
	padding: 0.6rem 1.15rem;
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.04em;
}

@media (max-width: 600px) {
	.vmh-nav__link {
		display: none;
	}
}

/* ------------------------------------------------------------------ Hero */

.vmh-hero {
	position: relative;
	isolation: isolate;
	min-height: min(90svh, 52rem);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
}

/* Ember glow behind the mark. */
.vmh-hero::before {
	content: "";
	position: absolute;
	inset: -20% -10% auto -10%;
	height: 90%;
	background:
		radial-gradient(52% 60% at 50% 32%, rgba(206, 27, 27, 0.22) 0%, rgba(206, 27, 27, 0) 68%),
		radial-gradient(80% 50% at 50% 0%, rgba(232, 42, 42, 0.10) 0%, rgba(11, 10, 11, 0) 70%);
	z-index: -2;
	pointer-events: none;
}

/* Grain + vignette. */
.vmh-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--vmh-grain);
	background-size: 140px 140px;
	opacity: 0.055;
	mix-blend-mode: overlay;
	z-index: -1;
	pointer-events: none;
}

.vmh-hero > * {
	margin-inline: auto;
}

.vmh-hero__mark {
	width: clamp(58px, 8vw, 86px);
}

.vmh-hero__mark img {
	width: 100%;
	height: auto;
	display: block;
	filter: drop-shadow(0 10px 28px rgba(206, 27, 27, 0.35));
}

.vmh-hero__title {
	max-width: 16ch;
	margin-block: 0.35em 0;
	text-transform: uppercase;
	text-wrap: balance;
}

.vmh-hero__tagline {
	max-width: 34ch;
	margin-top: 1.15em;
	line-height: 1.45;
	text-wrap: balance;
}

.vmh-hero__actions {
	gap: 0.75rem;
}

/* Scroll cue. */
.vmh-hero__actions::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: clamp(1.5rem, 4vh, 3rem);
	width: 1px;
	height: clamp(28px, 5vh, 46px);
	background: linear-gradient(180deg, var(--wp--preset--color--hairline), transparent);
	transform: translateX(-50%);
	pointer-events: none;
}

/* -------------------------------------------------------------- Sections */

.vmh-section {
	position: relative;
	border-top: 1px solid var(--wp--preset--color--hairline);
}

.vmh-eyebrow {
	margin: 0 0 1.25rem;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.24em;
}

.vmh-section__title {
	margin: 0;
	max-width: 20ch;
	text-wrap: balance;
}

.vmh-section__head > p:last-child {
	max-width: 52ch;
	margin-top: 1.25rem;
}

/* ---------------------------------------------------------- Service cards */

.vmh-cards {
	gap: clamp(1.5rem, 3vw, 2.25rem);
}

.vmh-card {
	position: relative;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: 3px;
	overflow: hidden;
	transition: transform 0.45s var(--vmh-ease), border-color 0.45s var(--vmh-ease),
		box-shadow 0.45s var(--vmh-ease);
}

.vmh-card:hover {
	transform: translateY(-4px);
	border-color: color-mix(in srgb, var(--wp--preset--color--accent) 45%, var(--wp--preset--color--hairline));
	box-shadow: 0 26px 50px -32px rgba(0, 0, 0, 0.95);
}

/* Accent hairline that wipes in on hover. */
.vmh-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 100%;
	height: 2px;
	background: var(--wp--preset--color--accent);
	z-index: 3;
	transition: right 0.5s var(--vmh-ease);
}

.vmh-card:hover::before {
	right: 0;
}

.vmh-card__media {
	margin: 0;
	position: relative;
	overflow: hidden;
}

.vmh-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(11, 10, 11, 0) 45%, rgba(21, 19, 22, 0.85) 100%);
	pointer-events: none;
}

.vmh-card__media img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	filter: saturate(0.72) contrast(1.06) brightness(0.82);
	transform: scale(1.01);
	transition: transform 0.7s var(--vmh-ease), filter 0.5s var(--vmh-ease);
}

.vmh-card:hover .vmh-card__media img {
	filter: saturate(1) contrast(1.02) brightness(0.95);
	transform: scale(1.05);
}

.vmh-card__body {
	padding: clamp(1.5rem, 2.4vw, 2rem);
}

.vmh-card__index {
	margin: 0 0 0.85rem;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.2em;
	color: var(--wp--preset--color--accent);
}

.vmh-card__title {
	margin: 0 0 0.7rem;
}

.vmh-card__copy {
	margin: 0;
	line-height: 1.65;
}

/* ----------------------------------------------------------------- About */

.vmh-about__aside .vmh-section__title {
	max-width: 14ch;
}

.vmh-about__body > * + * {
	margin-top: 1.35em;
}

.vmh-about__lede {
	margin-top: 0;
	line-height: 1.5;
	letter-spacing: -0.015em;
}

@media (min-width: 782px) {
	.vmh-about__aside {
		position: sticky;
		top: calc(var(--vmh-header-h) + 3rem);
		align-self: flex-start;
	}
}

/* --------------------------------------------------------------- Contact */

.vmh-contact {
	background:
		radial-gradient(70% 60% at 50% 100%, rgba(206, 27, 27, 0.10) 0%, rgba(11, 10, 11, 0) 70%),
		var(--wp--preset--color--base);
}

.vmh-form {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: 4px;
	padding: clamp(1.5rem, 4vw, 2.75rem);
}

.vmh-form__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
	gap: 1.25rem;
	margin-bottom: 1.25rem;
}

.vmh-field {
	display: block;
	margin-bottom: 1.25rem;
}

.vmh-form__grid .vmh-field {
	margin-bottom: 0;
}

.vmh-field__label {
	display: block;
	margin-bottom: 0.55rem;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

/* Contact Form 7 controls. */
.vmh-form .wpcf7-form-control-wrap {
	display: block;
}

.vmh-form input[type="text"],
.vmh-form input[type="email"],
.vmh-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.9rem 1rem;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: 2px;
	color: var(--wp--preset--color--contrast);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.6;
	transition: border-color 0.25s var(--vmh-ease), box-shadow 0.25s var(--vmh-ease);
}

.vmh-form textarea {
	resize: vertical;
	min-height: 9.5rem;
}

.vmh-form input::placeholder,
.vmh-form textarea::placeholder {
	color: color-mix(in srgb, var(--wp--preset--color--muted) 62%, transparent);
}

.vmh-form input[type="text"]:focus,
.vmh-form input[type="email"]:focus,
.vmh-form textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--accent);
	box-shadow: 0 0 0 3px rgba(206, 27, 27, 0.16);
}

.vmh-form__actions {
	margin-top: 1.75rem;
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.vmh-form input[type="submit"] {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	border-radius: 2px;
	padding: 1rem 2.25rem;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.06em;
	cursor: pointer;
	transition: background-color 0.25s var(--vmh-ease), transform 0.25s var(--vmh-ease);
}

.vmh-form input[type="submit"]:hover {
	background: var(--wp--preset--color--accent-bright);
	transform: translateY(-1px);
}

.vmh-form input[type="submit"]:disabled {
	opacity: 0.6;
	cursor: progress;
}

.vmh-form .wpcf7-spinner {
	margin: 0;
	background-color: var(--wp--preset--color--muted);
}

.vmh-form .wpcf7-not-valid-tip {
	margin-top: 0.5rem;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--accent-bright);
}

.vmh-form .wpcf7-form-control.wpcf7-not-valid {
	border-color: var(--wp--preset--color--accent-bright);
}

.vmh-form .wpcf7-response-output {
	margin: 1.5rem 0 0;
	padding: 0.9rem 1.1rem;
	border: 1px solid var(--wp--preset--color--hairline);
	border-left-width: 3px;
	border-radius: 2px;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

.vmh-form .wpcf7 form.sent .wpcf7-response-output {
	border-left-color: #3fae6b;
	color: var(--wp--preset--color--contrast);
}

.vmh-form .wpcf7 form.invalid .wpcf7-response-output,
.vmh-form .wpcf7 form.failed .wpcf7-response-output,
.vmh-form .wpcf7 form.aborted .wpcf7-response-output {
	border-left-color: var(--wp--preset--color--accent-bright);
}

.vmh-form__fallback {
	margin: 0;
	color: var(--wp--preset--color--muted);
}

/* ---------------------------------------------------------------- Footer */

.vmh-footer {
	border-top: 1px solid var(--wp--preset--color--hairline);
	background: var(--wp--preset--color--base);
}

.vmh-footer__inner {
	gap: 1.25rem;
}

.vmh-footer__brand {
	gap: 0.75rem;
	align-items: center;
}

.vmh-footer__mark {
	margin: 0;
	width: 26px;
	flex: none;
}

.vmh-footer__mark img {
	display: block;
	width: 100%;
	height: auto;
}

.vmh-footer__name {
	margin: 0;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.vmh-footer__meta {
	margin: 0;
}

/* ------------------------------------------------------------- Utilities */

.vmh-page__title {
	margin-bottom: 1.5rem;
	font-size: var(--wp--preset--font-size--x-large);
}

/* Ghost / outline button. */
.wp-block-button.is-style-outline .wp-block-button__link,
.vmh-button--ghost .wp-block-button__link {
	background: transparent;
	border: 1px solid var(--wp--preset--color--hairline);
	color: var(--wp--preset--color--contrast);
	transition: border-color 0.3s var(--vmh-ease), background-color 0.3s var(--vmh-ease);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.vmh-button--ghost .wp-block-button__link:hover {
	background: color-mix(in srgb, var(--wp--preset--color--contrast) 6%, transparent);
	border-color: color-mix(in srgb, var(--wp--preset--color--contrast) 34%, transparent);
	color: var(--wp--preset--color--contrast);
}

.wp-block-image figcaption {
	color: var(--wp--preset--color--muted);
}

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

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
