/*
Theme Name: Westermann Block
Theme URI: https://staging.westermann.rocks
Author: Strategie Nord
Author URI: https://strategie-nord.de
Description: Block-Theme-Testlauf (Relaunch-Workflow ohne Divi/Figma) fuer die Westermann-Startseite. Farben und Typografie aus 000_KI-Design_Westermann.md v2.1.
Version: 0.2.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: westermann-block
*/

/* -- Navigation: pill bar on a dark band with red top strip -- */
.wm-navwrap {
	background: #1d1d1d;
	padding: 0.75rem 1.5rem 1.25rem;
	border-top: 4px solid #ad3a45;
}

.wm-navbar {
	max-width: 1200px;
	margin: 0 auto;
	background: rgba(245, 241, 238, 0.06);
	border: 1px solid rgba(245, 241, 238, 0.14);
	border-radius: 999px;
	padding: 0.5rem 0.5rem 0.5rem 1.5rem;
	align-items: center;
	gap: 1.5rem;
	flex-wrap: nowrap;
}

.wm-navbar__logo img {
	max-height: 30px;
	width: auto;
}

.wm-navbar__nav a {
	color: #f5f1ee !important;
	opacity: 0.85;
}

.wm-navbar__nav a:hover {
	opacity: 1;
}

.wm-navbar__cta {
	margin: 0;
	flex-shrink: 0;
}

@media (max-width: 600px) {
	.wm-navwrap {
		padding: 0.5rem 1rem 1rem;
	}

	.wm-navbar {
		padding: 0.4rem 0.4rem 0.4rem 1rem;
	}

	.wm-navbar__cta .wp-block-button__link {
		padding: 0.5rem 0.9rem;
		font-size: 0.75rem;
	}
}

/* -- Hero: full-bleed photo with asymmetric gradient scrim -- */
.wm-hero .wp-block-cover__background {
	background: linear-gradient(100deg, rgba(29, 29, 29, 0) 0%, rgba(29, 29, 29, 0.55) 40%, rgba(29, 29, 29, 0.94) 72%) !important;
	opacity: 1 !important;
}

.wm-hero .wp-block-cover__inner-container {
	width: 100%;
	padding: clamp(1.5rem, 6vw, 4rem);
}

.wm-hero__panel {
	text-align: left;
	max-width: 100%;
}

.wm-hero__heading {
	font-size: clamp(1.75rem, 4.2vw, 2.75rem);
	overflow-wrap: break-word;
}

.wm-hero .wm-signet img {
	width: clamp(52px, 6vw, 68px);
	height: auto;
	margin-top: 2rem;
}

@media (max-width: 600px) {
	.wm-hero .wp-block-cover__background {
		background: linear-gradient(180deg, rgba(29, 29, 29, 0.25) 0%, rgba(29, 29, 29, 0.9) 55%) !important;
	}
}

/* -- Karriere: photo bento grid, red used as a frame accent, never as fill (CI: "Rot ist Rahmen und Traeger, nicht Grundflaeche") -- */
.wm-job-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px;
}

.wm-job-grid__intro {
	grid-column: span 2;
	background: #1d1d1d;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: clamp(1.5rem, 3vw, 3rem);
}

.wm-job-tile {
	position: relative;
	border: 2px solid transparent;
	transition: border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.wm-job-tile:hover,
.wm-job-tile:focus-within {
	border-color: #ad3a45;
}

.wm-job-tile .wp-block-cover__image-background {
	transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.wm-job-tile:hover .wp-block-cover__image-background {
	transform: scale(1.06);
}

.wm-job-tile .wp-block-cover__inner-container {
	padding: 1rem 1.25rem;
}

.wm-job-tile__title {
	margin: 0 0 0.4rem !important;
}

@media (max-width: 781px) {
	.wm-job-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.wm-job-grid__intro {
		grid-column: span 2;
	}
}

@media (max-width: 480px) {
	.wm-job-grid {
		grid-template-columns: 1fr;
	}

	.wm-job-grid__intro {
		grid-column: span 1;
	}
}

/* -- Photo frames next to text (Wer wir sind / Tradition) -- */
.wm-photo-frame__img img {
	width: 100%;
	height: 320px;
	object-fit: cover;
	border-radius: 2px;
}

.wm-photo-frame__img--tall img {
	height: 240px;
}

/* -- Marquee ticker (service lines) -- */
.wm-marquee {
	overflow: hidden;
	background: #ad3a45;
	padding: 0.85rem 0;
	width: 100vw;
	margin-left: calc(50% - 50vw);
}

.wm-marquee__track {
	display: flex;
	width: max-content;
	gap: 0.75rem;
	animation: wm-marquee-scroll 26s linear infinite;
}

.wm-marquee__item {
	color: #f5f1ee;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	white-space: nowrap;
	font-size: 0.9375rem;
}

.wm-marquee__dot {
	color: #f5f1ee;
	opacity: 0.5;
}

@keyframes wm-marquee-scroll {
	from {
		transform: translateX(0);
	}

	to {
		transform: translateX(-50%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.wm-marquee__track {
		animation: none;
	}
}

/* -- Stats row -- */
.wm-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
	max-width: 900px;
	margin: 0 auto;
}

.wm-stats__item {
	text-align: center;
}

.wm-stats__value {
	font-size: clamp(2.5rem, 6vw, 3.75rem);
	font-weight: 700;
	line-height: 1;
	margin: 0 !important;
}

.wm-stats__label {
	margin: 0.5rem 0 0 !important;
	opacity: 0.75;
}

@media (max-width: 600px) {
	.wm-stats {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
}

/* -- Contact tiles + form -- */
.wm-contact-tile__icon {
	color: #ad3a45;
	margin-bottom: 0.75rem;
}

.wm-contact-form {
	border-radius: 4px;
}

.wm-contact-form .wpcf7-form-control {
	border-radius: 2px;
}

.wm-contact-form .wpcf7 input[type="submit"] {
	background: #ad3a45;
	color: #f5f1ee;
	border: none;
	border-radius: 999px;
	padding: 0.75rem 1.75rem;
	font-weight: 700;
	cursor: pointer;
	transition: filter 0.2s ease;
}

.wm-contact-form .wpcf7 input[type="submit"]:hover {
	filter: brightness(1.08);
}

/* -- Arrow links (Ansehen / Lieferprogramm ansehen) -- */
.wm-job-row__link a,
.wm-job-tile__link a,
p.wm-job-row__link a,
p.wm-job-tile__link a {
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.wm-job-row__link .arrow,
.wm-job-tile__link .arrow {
	display: inline-block;
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.wm-job-row__link a:hover .arrow,
.wm-job-tile__link a:hover .arrow,
.wm-job-tile:hover .wm-job-tile__link .arrow {
	transform: translateX(4px);
}

/* -- Tactile feedback on buttons -- */
.wp-block-button__link {
	transition: transform 0.2s ease, filter 0.2s ease;
}

.wp-block-button__link:hover {
	filter: brightness(1.08);
}

.wp-block-button__link:active {
	transform: scale(0.98);
}

/* -- Scroll reveal -- */
.wm-reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.wm-reveal--in {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.wm-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.wp-block-button__link,
	.wm-job-tile,
	.wm-job-tile .wp-block-cover__image-background,
	.wm-job-row__link .arrow,
	.wm-job-tile__link .arrow {
		transition: none;
	}
}
