/* =========================================================================
   Masinawerk — industrial one-page theme
   ========================================================================= */

:root {
	--ink: #141414;
	--ink-2: #1c1a1a;
	--ink-3: #0f0f0f;
	--paper: #ffffff;
	--paper-2: #f4f2f2;
	--concrete: #eceaea;
	--steel: #6d6968;
	--steel-2: #8a8584;
	--steel-line: #d9d5d4;
	--magenta: #c03e8e;
	--magenta-dark: #9c3078;
	--accent-grad: linear-gradient(135deg, #9c3078 0%, #c03e8e 100%);

	--font-display: "Oswald", "Arial Narrow", system-ui, sans-serif;
	--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--maxw: 1240px;
	--gutter: clamp(20px, 5vw, 48px);
	--header-h: 84px;
	--section-pad: clamp(72px, 10vw, 140px);
}

/* ---- Reset / base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.7;
	color: var(--ink);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img, svg, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.05; margin: 0; }

.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 1000;
	background: var(--magenta); color: #fff; padding: 12px 20px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---- Layout primitives -------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

.section { padding-block: var(--section-pad); position: relative; }
.section[id] { scroll-margin-top: var(--header-h); }
.section--dark { background: var(--ink); color: #e8e6e6; }
.section--dark .section__title { color: #fff; }
.section--steel { background: var(--concrete); }

.section__head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__title {
	font-size: clamp(2rem, 5vw, 3.4rem);
	text-transform: uppercase;
	letter-spacing: 0.005em;
	margin-top: 12px;
}
.section__intro { font-size: 1.1rem; color: var(--steel); margin-top: 20px; max-width: 60ch; }
.section--dark .section__intro { color: #b3aead; }
.section__head--center .section__intro { margin-inline: auto; }

.eyebrow {
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.22em;
	font-weight: 600;
	font-size: 0.82rem;
	color: var(--magenta);
	margin: 0;
	display: inline-flex;
	align-items: center;
	gap: 12px;
}
.eyebrow::before { content: ""; width: 32px; height: 2px; background: var(--magenta); display: inline-block; }
.section__head--center .eyebrow { justify-content: center; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 600;
	font-size: 0.95rem;
	padding: 16px 34px;
	border: 2px solid transparent;
	border-radius: 2px;
	transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
	will-change: transform;
}
.btn--sm { padding: 11px 22px; font-size: 0.82rem; }
.btn--accent { background: var(--accent-grad); color: #fff; box-shadow: 0 8px 24px -12px rgba(192, 62, 142, 0.9); }
.btn--accent:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(192, 62, 142, 0.95); }
.btn--ghost { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { transform: translateY(-2px); background: var(--magenta-dark); }

/* ---- Header ------------------------------------------------------------- */
.site-header {
	position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 100;
	transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
	padding-block: 18px;
}
/* Keep the fixed header clear of the WordPress admin bar for logged-in users. */
.admin-bar .site-header { inset-block-start: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { inset-block-start: 46px; } }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand__logo { height: 38px; width: auto; transition: opacity 0.3s ease; }
.brand__logo--dark { display: none; }

.site-nav__list { display: flex; gap: clamp(18px, 2.4vw, 40px); list-style: none; margin: 0; padding: 0; }
.site-nav__list a {
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 500;
	font-size: 0.95rem;
	color: #fff;
	padding-block: 6px;
	position: relative;
}
.site-nav__list a::after {
	content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
	background: var(--magenta); transition: width 0.25s ease;
}
.site-nav__list a:hover::after, .site-nav__list a:focus-visible::after { width: 100%; }

.site-header__actions { display: flex; align-items: center; gap: 18px; flex: 0 0 auto; }

.mw-lang { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.mw-lang__item a {
	font-family: var(--font-display); font-weight: 500; font-size: 0.82rem;
	letter-spacing: 0.05em; color: rgba(255, 255, 255, 0.7);
	padding: 4px 8px; border-radius: 2px; transition: color 0.2s ease, background 0.2s ease;
}
.mw-lang__item a:hover { color: #fff; }
.mw-lang__item.is-current a { color: #fff; background: var(--magenta); }

/* scrolled state (solid header on light bg) */
.site-header.is-scrolled { background: var(--paper); box-shadow: 0 1px 0 var(--steel-line), 0 12px 30px -20px rgba(0, 0, 0, 0.4); padding-block: 12px; }
.site-header.is-scrolled .brand__logo--light { display: none; }
.site-header.is-scrolled .brand__logo--dark { display: block; }
.site-header.is-scrolled .site-nav__list a { color: var(--ink); }
.site-header.is-scrolled .mw-lang__item a { color: var(--steel); }
.site-header.is-scrolled .mw-lang__item a:hover { color: var(--ink); }
.site-header.is-scrolled .mw-lang__item.is-current a { color: #fff; }

.nav-toggle { display: none; width: 46px; height: 42px; background: transparent; border: 0; position: relative; }
.nav-toggle span { display: block; position: absolute; left: 9px; right: 9px; height: 2px; background: #fff; transition: transform 0.3s ease, opacity 0.2s ease; }
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.site-header.is-scrolled .nav-toggle span { background: var(--ink); }

/* ---- Hero --------------------------------------------------------------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; color: #fff; overflow: hidden; padding-top: var(--header-h); }
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__poster { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero__video { position: absolute; inset: 0; overflow: hidden; }
.hero__video iframe {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
	width: 100vw; height: 56.25vw; min-height: 100vh; min-width: 177.78vh;
	border: 0; pointer-events: none;
}
.hero__scrim { position: absolute; inset: 0; background:
	linear-gradient(90deg, rgba(15, 15, 15, 0.82) 0%, rgba(15, 15, 15, 0.5) 45%, rgba(15, 15, 15, 0.25) 100%),
	linear-gradient(0deg, rgba(15, 15, 15, 0.85) 0%, rgba(15, 15, 15, 0) 45%);
}
.hero__inner { position: relative; z-index: 1; padding-block: 80px; }
.hero__eyebrow {
	font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.18em;
	font-weight: 500; font-size: 0.95rem; color: #fff; display: inline-flex; align-items: center; gap: 14px; margin: 0 0 24px;
}
.hero__eyebrow-mark {
	font-weight: 700; font-size: 1.05rem; color: #fff; background: var(--accent-grad);
	width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 2px;
}
.hero__title {
	font-size: clamp(2.6rem, 8.5vw, 8rem);
	text-transform: uppercase;
	line-height: 0.92;
	font-weight: 700;
	letter-spacing: -0.005em;
	margin: 0;
	text-wrap: balance;
}
.hero__subtitle { font-size: clamp(1.05rem, 1.6vw, 1.35rem); max-width: 620px; margin: 28px 0 0; color: rgba(255, 255, 255, 0.9); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }
.hero__scroll { position: absolute; left: var(--gutter); bottom: 28px; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; color: rgba(255, 255, 255, 0.7); }
.hero__scroll-text { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.72rem; writing-mode: vertical-rl; }
.hero__scroll-line { width: 1px; height: 46px; background: rgba(255, 255, 255, 0.5); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; inset: 0; background: var(--magenta); animation: mw-scroll 1.8s ease-in-out infinite; }
@keyframes mw-scroll { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* ---- Services ----------------------------------------------------------- */
.services__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1px; background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.09); }
.service-card { background: var(--ink); padding: clamp(32px, 4vw, 48px); position: relative; transition: background 0.25s ease, transform 0.25s ease; }
.service-card::before { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 0; background: var(--accent-grad); transition: height 0.3s ease; }
.service-card:hover { background: var(--ink-2); }
.service-card:hover::before { height: 100%; }
.service-card__num { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; color: var(--magenta); display: block; line-height: 1; }
.service-card__title { font-size: 1.5rem; text-transform: uppercase; color: #fff; margin: 20px 0 14px; letter-spacing: 0.01em; }
.service-card__body { color: #b3aead; }
.service-card__body p { margin: 0; }

/* ---- About -------------------------------------------------------------- */
.about__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(36px, 6vw, 80px); align-items: center; }
.about__media { position: relative; }
.about__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; border-radius: 2px; }
.about__badge {
	position: absolute; right: -18px; bottom: -18px; background: var(--accent-grad); color: #fff;
	padding: 20px 26px; display: flex; flex-direction: column; align-items: center; line-height: 1;
	box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6); border-radius: 2px;
}
.about__badge-num { font-family: var(--font-display); font-weight: 700; font-size: 2.8rem; }
.about__badge-text { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; margin-top: 4px; }
.about__body { margin-top: 24px; color: var(--steel); }
.about__body p { margin: 0 0 1em; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: clamp(48px, 6vw, 88px); background: var(--steel-line); border: 1px solid var(--steel-line); }
.stats__item { background: var(--paper); padding: clamp(28px, 3vw, 40px) 24px; text-align: center; }
.stats__value { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 4vw, 3.4rem); color: var(--ink); display: block; line-height: 1; }
.stats__label { display: block; margin-top: 10px; font-size: 0.9rem; color: var(--steel); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---- References --------------------------------------------------------- */
.references__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--steel-line); border: 1px solid var(--steel-line); }
.reference { background: var(--concrete); }
.reference__link, .reference__name { display: flex; align-items: center; justify-content: center; min-height: 130px; padding: 24px; text-align: center; transition: background 0.25s ease, color 0.25s ease; }
.reference__name { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; font-size: 1.25rem; color: var(--ink); }
.reference:hover { background: var(--ink); }
.reference:hover .reference__name { color: #fff; }
.reference__logo { max-height: 64px; width: auto; object-fit: contain; filter: grayscale(1); opacity: 0.75; transition: filter 0.25s ease, opacity 0.25s ease; }
.reference:hover .reference__logo { filter: grayscale(0); opacity: 1; }

/* ---- Contact ------------------------------------------------------------ */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
.contact__details { margin-top: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px 40px; }
.contact__block--wide { grid-column: 1 / -1; }
.contact__label { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.82rem; color: var(--magenta); margin: 0 0 10px; }
.contact__address { font-style: normal; color: #d7d3d2; }
.contact__address p { margin: 0; }
.contact__email { color: #fff; font-size: 1.15rem; border-bottom: 2px solid var(--magenta); padding-bottom: 2px; }
.contact__people { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 28px 48px; }
.person { display: flex; flex-direction: column; gap: 4px; }
.person__name { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; color: #fff; font-size: 1.05rem; }
.person__phone { color: #e8e6e6; }
.person__email { color: var(--steel-2); }
.person a:hover { color: var(--magenta); }

.contact__form-wrap { background: var(--ink-2); border: 1px solid rgba(255, 255, 255, 0.08); padding: clamp(28px, 4vw, 48px); border-radius: 2px; }
.contact__form-title { font-size: 1.6rem; text-transform: uppercase; color: #fff; margin: 0 0 24px; }

.contact__map { margin-top: clamp(48px, 6vw, 80px); }
.contact__map iframe { width: 100%; height: 420px; border: 0; filter: grayscale(1) contrast(1.05); }

/* Contact Form 7 */
.wpcf7 { color: #d7d3d2; }
.wpcf7-form p { margin: 0 0 18px; }
.wpcf7 label { display: block; font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.82rem; color: #b3aead; margin-bottom: 8px; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea {
	width: 100%; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14);
	color: #fff; padding: 14px 16px; font-family: var(--font-body); font-size: 1rem; border-radius: 2px; transition: border-color 0.2s ease, background 0.2s ease;
}
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: none; border-color: var(--magenta); background: rgba(255, 255, 255, 0.08); }
.wpcf7 textarea { min-height: 140px; resize: vertical; }
.wpcf7 input::placeholder, .wpcf7 textarea::placeholder { color: rgba(255, 255, 255, 0.4); }
.wpcf7-submit {
	font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
	background: var(--accent-grad); color: #fff; border: 0; padding: 16px 38px; border-radius: 2px; font-size: 0.95rem;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wpcf7-submit:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(192, 62, 142, 0.95); }
.wpcf7-spinner { margin: 0 0 0 12px; }
.wpcf7 .wpcf7-response-output { border-radius: 2px; margin: 8px 0 0; padding: 12px 16px; font-size: 0.95rem; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { background: var(--ink-3); color: #b3aead; }
.site-footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 48px; padding-block: clamp(56px, 7vw, 88px); }
.site-footer__logo { height: 40px; width: auto; margin-bottom: 20px; }
.site-footer__tagline { max-width: 34ch; margin: 0; }
.site-footer__nav { display: flex; flex-direction: column; gap: 12px; }
.site-footer__nav a { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.95rem; color: #e8e6e6; }
.site-footer__nav a:hover { color: var(--magenta); }
.site-footer__contact { display: flex; flex-direction: column; gap: 12px; }
.site-footer__contact a:hover { color: var(--magenta); }
.site-footer__contact p { margin: 0; }
.site-footer__bar { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.site-footer__bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 22px; font-size: 0.85rem; }
.site-footer__mark { font-family: var(--font-display); letter-spacing: 0.14em; color: var(--magenta); }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
	.nav-toggle { display: block; }
	.site-header__cta { display: none; }
	.site-nav {
		position: fixed; inset: var(--header-h) 0 auto 0; background: var(--ink);
		max-height: 0; overflow: hidden; transition: max-height 0.35s ease; border-top: 1px solid rgba(255, 255, 255, 0.08);
	}
	.site-nav.is-open { max-height: 70vh; }
	.site-nav__list { flex-direction: column; gap: 0; padding: 8px var(--gutter) 24px; }
	.site-nav__list a { display: block; color: #fff; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); font-size: 1.1rem; }
	.site-header.is-scrolled .site-nav__list a { color: #fff; }
	.about__grid { grid-template-columns: 1fr; }
	.about__media { max-width: 560px; }
	.contact__grid { grid-template-columns: 1fr; }
	.stats { grid-template-columns: repeat(2, 1fr); }
	.references__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.contact__details { grid-template-columns: 1fr; }
	.about__badge { right: 12px; bottom: -14px; padding: 16px 20px; }
	.site-footer__inner { grid-template-columns: 1fr; gap: 36px; }
	.site-footer__bar-inner { flex-direction: column; align-items: flex-start; }
	.hero__scroll { display: none; }
}

/* ---- Motion preferences ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---- Reveal-on-scroll (progressive enhancement) ------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
