/*
 * Motortechnik Hamburg — recreation of the archived Flex/preset1 look.
 * Every value here was measured off the live 3.9.23 site (computed styles),
 * so the two builds should be visually interchangeable.
 */

:root {
	--mt-accent:        #a38143;
	--mt-accent-soft:   rgba(163, 129, 67, .95);
	--mt-accent-btn:    rgba(163, 129, 67, .9);
	--mt-accent-icon:   #c4a66f;
	--mt-nav-active:    #bc9a5d;

	--mt-topbar-bg:     #3d3d3d;
	--mt-topbar-text:   #d4d4d4;

	--mt-header-bg:     #303030;
	--mt-header-link:   #ededed;

	--mt-body-text:     #333;
	--mt-contact-bg:    #2e2e2e;
	--mt-contact-text:  #b3b3b3;
	--mt-overlay:       rgba(72, 72, 72, .9);

	--mt-footer-bg:     #363839;
	--mt-footer-text:   #b0b0b0;

	--mt-container:     1170px;
}

/* ---------------------------------------------------------------- base -- */

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: Raleway, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 17px;
	font-weight: 300;
	line-height: 25px;
	color: var(--mt-body-text);
	background: #fff;
	overflow-x: hidden;
}

img { max-width: 100%; height: auto; border: 0; }

a { color: var(--mt-accent); text-decoration: none; transition: color .3s ease; }
a:hover, a:focus { color: var(--mt-nav-active); }

p { margin: 0 0 10px; }

h1, h2, h3, h4, h5, h6 {
	font-family: Raleway, "Helvetica Neue", Helvetica, Arial, sans-serif;
	color: var(--mt-body-text);
	margin: 20px 0 10px;
}
h1 { font-size: 40px; font-weight: 200; line-height: 1; }
h2 { font-size: 33px; font-weight: 300; }
h3 { font-size: 27px; font-weight: 400; }
h4 { font-size: 23px; font-weight: 400; }
h5 { font-size: 20px; font-weight: 500; }
h6 { font-size: 17px; font-weight: 600; }

.mt-container {
	width: 100%;
	max-width: var(--mt-container);
	margin: 0 auto;
	padding: 0 15px;
}

.mt-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--mt-accent);
	color: #fff;
	padding: 10px 16px;
	z-index: 2000;
}
.mt-skip:focus { left: 0; color: #fff; }

/* -------------------------------------------------------------- top bar -- */

#mt-topbar {
	background: var(--mt-topbar-bg);
	color: var(--mt-topbar-text);
	font-size: 15.3px;
	line-height: 25px;
	padding: 2px 0;
}
#mt-topbar .mt-container {
	display: flex;
	justify-content: flex-end;
	align-items: center;
}
.mt-contact-info {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0;
	padding: 0;
}
.mt-contact-info li {
	display: flex;
	align-items: center;
	margin: 0 7px;
}
.mt-contact-info a { color: var(--mt-topbar-text); }
.mt-contact-info a:hover { color: #fff; }
.mt-contact-info .mt-icon {
	width: 19px;
	height: 19px;
	margin: 0 5px 0 0;
	flex: 0 0 auto;
	color: var(--mt-accent-icon);
}

.mt-icon { display: inline-block; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }

/* --------------------------------------------------------------- header -- */

#mt-header {
	background: var(--mt-header-bg);
	position: relative;
	z-index: 100;
}
#mt-header .mt-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 70px;
}
.mt-logo { flex: 0 0 auto; display: flex; align-items: center; }
.mt-logo img { width: 215px; height: auto; display: block; }

/* The header pins itself once the hero has scrolled past. */
body.mt-sticky #mt-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	background: rgba(48, 48, 48, .92);
	box-shadow: 0 1px 6px rgba(0, 0, 0, .25);
}
body.mt-sticky { padding-top: 70px; }

/* ------------------------------------------------------------ main menu -- */

#mt-nav { display: flex; align-items: center; }

#mt-nav-toggle {
	display: none;
	width: 42px;
	height: 42px;
	padding: 10px 8px;
	background: none;
	border: 0;
	cursor: pointer;
}
#mt-nav-toggle span {
	display: block;
	height: 2px;
	margin: 4px 0;
	background: var(--mt-header-link);
	transition: transform .25s ease, opacity .25s ease;
}
#mt-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
#mt-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
#mt-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

#mt-nav-list ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
}
#mt-nav-list li { position: relative; }
#mt-nav-list a {
	display: inline-block;
	font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 70px;
	padding: 0 12px;
	color: var(--mt-header-link);
}
#mt-nav-list a:hover,
#mt-nav-list a:focus,
#mt-nav-list .current > a,
#mt-nav-list .active > a,
#mt-nav-list a.mt-active { color: var(--mt-nav-active); }

/* ----------------------------------------------------------------- hero -- */

.mt-hero {
	position: relative;
	height: 450px;
	margin-bottom: 30px;
	overflow: hidden;
	background: #e9e9e9;
}
.mt-hero-slide {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center top;
	background-repeat: no-repeat;
	opacity: 0;
	transition: opacity .8s ease-in-out;
}
.mt-hero-slide.is-active { opacity: 1; }

/*
 * The original slider laid its captions out on a fixed 960px grid centred in
 * the viewport, at x=250 and x=350 within it -- hence the 480px half-grid in
 * the offsets below. Measured resting positions on a 1496px viewport were
 * left 518 / 618, which these calc()s reproduce exactly.
 */
.mt-hero-caption {
	position: absolute;
	white-space: nowrap;
	font-family: Raleway, sans-serif;
	transform: translateY(-50%);
}
.mt-hero-head {
	left: calc(50% - 480px + 250px);
	top: calc(50% + 5px);
	font-size: 68px;
	font-weight: 100;
	line-height: 74px;
	color: var(--mt-accent);
	background: rgba(30, 30, 30, .95);
	padding: 5px 800px 5px 20px;
}
.mt-hero-sub {
	left: calc(50% - 480px + 350px);
	top: calc(50% + 60px);
	font-size: 25px;
	font-weight: 300;
	line-height: 25px;
	color: #222;
	background: var(--mt-accent-soft);
	padding: 5px 800px 5px 23px;
}

/*
 * Captions fly in from the right, as the original slider did.
 *
 * The resting state above is the DEFAULT: with no JS, no CSS animation support,
 * or a throttled background tab, the captions are simply visible. The entrance
 * is opt-in -- template.js adds .mt-anim once it has taken control of the
 * slides -- and it is a transition, not an `animation … forwards`, so a frame
 * that never runs can never strand a caption at opacity 0.
 */
.mt-hero.mt-anim .mt-hero-slide .mt-hero-caption {
	opacity: 0;
	transform: translate(150px, -50%);
}
.mt-hero.mt-anim .mt-hero-slide.is-active .mt-hero-caption {
	opacity: 1;
	transform: translate(0, -50%);
	transition: opacity .8s ease .3s,
	            transform 2s cubic-bezier(.645, .045, .355, 1) .3s;
}
.mt-hero.mt-anim .mt-hero-slide.is-active .mt-hero-sub {
	transition: opacity .5s ease .3s,
	            transform 1.3s cubic-bezier(.645, .045, .355, 1) .3s;
}
@media (prefers-reduced-motion: reduce) {
	.mt-hero.mt-anim .mt-hero-slide .mt-hero-caption {
		opacity: 1;
		transform: translate(0, -50%);
		transition: none;
	}
	.mt-hero.mt-anim .mt-hero-slide:not(.is-active) .mt-hero-caption { opacity: 0; }
}

/* ------------------------------------------------------------- sections -- */

.mt-section { padding: 50px 0; }

/*
 * The original grid is Bootstrap 3: .container is 1170px with 15px padding,
 * .row cancels it with -15px margins, and columns re-add 15px. Net effect is
 * that column percentages are of the full 1170 -- so the track here carries no
 * padding of its own and the columns supply all the gutters.
 */
.mt-section > .mt-container,
#kontakt > .mt-container { padding: 0; }

.mt-fluid { width: calc(100% + 30px); margin: 0 -15px; }

/* col-md-1 / col-md-10 / col-md-1 on the original: a centred 10/12 column. */
.mt-col-10 {
	width: 83.3333%;
	margin-left: 8.3333%;
	padding: 0 15px;
}

.mt-block { margin: 0 0 30px; }

.mt-title {
	font-size: 46px;
	font-weight: 200;
	line-height: 46px;
	margin: 20px 0 10px;
	color: var(--mt-body-text);
}

/* The 1px rule under each heading — a 90% "progress bar" in the original. */
.mt-rule {
	height: 1px;
	background: #ccc;
	border-radius: 4px;
	overflow: hidden;
	margin: 0 0 30px;
}
.mt-rule > span {
	display: block;
	height: 100%;
	width: 0;
	background: var(--mt-accent);
	transition: width 2s ease;
}
.mt-rule.is-filled > span { width: 90%; }

/* --------------------------------------------------------- parallax bar -- */

.mt-parallax {
	background-attachment: fixed;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	padding: 150px 0 50px;
}
.mt-parallax-band {
	background: var(--mt-overlay);
	padding: 50px 0;
}
.mt-parallax-band .mt-col-6 {
	width: 50%;
	margin-left: 25%;
	padding: 0 15px;
}
.mt-parallax-band > .mt-fluid { max-width: none; }
.mt-parallax-title {
	font-size: 46px;
	font-weight: 700;
	line-height: 46px;
	margin: 20px 0 10px;
	color: var(--mt-accent-soft);
}
.mt-parallax-band p {
	color: var(--mt-accent-soft);
	margin: 0;
}
.mt-parallax-band .mt-col-6 > .mt-block { margin: 0 0 30px; }

/* iOS ignores background-attachment: fixed; scroll instead of breaking. */
@media (hover: none) {
	.mt-parallax { background-attachment: scroll; }
}

/* ------------------------------------------------------------- carousel -- */

.mt-carousel { position: relative; margin: 0 0 30px; }
.mt-carousel-viewport { overflow: hidden; margin: 0 -25px; }
.mt-carousel-track {
	display: flex;
	transition: transform .5s ease;
	will-change: transform;
}
.mt-carousel-slide {
	flex: 0 0 25%;
	max-width: 25%;
	padding: 0 25px;
}
.mt-carousel-slide img { display: block; width: 100%; height: auto; }

.mt-carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: #999;
	cursor: pointer;
	z-index: 2;
	transition: color .3s ease;
}
.mt-carousel-arrow:hover { color: var(--mt-accent); }
.mt-carousel-arrow[disabled] { opacity: .25; cursor: default; }
.mt-carousel-prev { left: -10px; }
.mt-carousel-next { right: -10px; }
.mt-carousel-arrow svg { width: 44px; height: 44px; stroke-width: 1; }

@media (max-width: 991px) { .mt-carousel-slide { flex-basis: 33.3333%; max-width: 33.3333%; } }
@media (max-width: 767px) { .mt-carousel-slide { flex-basis: 50%;     max-width: 50%; } }
@media (max-width: 479px) { .mt-carousel-slide { flex-basis: 100%;    max-width: 100%; } }

/* -------------------------------------------------------------- contact -- */

#kontakt {
	background-color: var(--mt-contact-bg);
	background-image: url(../images/section-background-stripes2.svg);
	background-repeat: repeat;
	padding: 40px 20px 50px;
	color: var(--mt-contact-text);
}
#kontakt .mt-contact-grid {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
}
#kontakt .mt-c1 { width: 33.3333%; padding: 0 30px 30px; }
#kontakt .mt-c2 { width: 16.6667%; padding: 0 30px 30px; }
#kontakt .mt-c3 { width: 50%;      padding: 30px 35px; }

#kontakt p { color: var(--mt-contact-text); }
#kontakt a { color: var(--mt-accent); }
#kontakt a:hover { color: var(--mt-nav-active); }

.mt-contact-logo {
	text-align: center;
	padding: 20px 50px 0 25px;
	margin: 0 0 30px;
}
.mt-contact-logo img { display: inline-block; }

.mt-divider {
	border: 0;
	border-top: 1px solid #575151;
	margin: 32px 0;
}

.mt-feature {
	display: flex;
	align-items: center;
	margin: 0 0 30px;
}
.mt-feature .mt-icon {
	width: 36px;
	height: 36px;
	margin: 10px;
	padding: 0;
	flex: 0 0 auto;
	color: var(--mt-accent);
}
.mt-feature blockquote {
	border-left: 1px solid var(--mt-accent);
	padding: 10px 20px;
	margin: 0 0 20px;
	font-size: 17.5px;
	color: var(--mt-contact-text);
}
.mt-feature blockquote .mt-label { color: #676767; font-weight: 200; }
.mt-feature blockquote strong { font-weight: 700; }

.mt-space { height: 80px; }

.mt-btn {
	display: block;
	width: 100%;
	margin: 0 0 20px;
	padding: 6px 22px;
	font-family: Raleway, sans-serif;
	font-size: 14.79px;
	font-weight: 400;
	line-height: 23px;
	text-align: center;
	color: #fff;
	background: var(--mt-accent-btn);
	border: 0;
	border-radius: 0;
	cursor: pointer;
	transition: background .3s ease;
}
.mt-btn:hover, .mt-btn:focus { background: #222; color: #fff; }

/*
 * Static map: OpenStreetMap tiles stitched and darkened at build time (see
 * genmap.py) so the page makes no third-party request and the panel always
 * renders, matching the dark Google style the original asked for.
 */
.mt-map {
	position: relative;
	display: block;
	width: 100%;
	max-width: 515px;
	line-height: 0;
}
.mt-map picture { display: block; }
.mt-map img { width: 100%; height: auto; display: block; }
.mt-map-credit {
	position: absolute;
	right: 6px;
	bottom: 5px;
	font-size: 11px;
	line-height: 14px;
	padding: 1px 5px;
	color: #d8d8d8;
	background: rgba(0, 0, 0, .45);
}
.mt-map:hover .mt-map-credit { color: #fff; }

/* ---------------------------------------------------------------- modal -- */

.mt-modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: flex-start;
	justify-content: center;
	background: rgba(0, 0, 0, .6);
	z-index: 1000;
	padding: 40px 15px;
	overflow-y: auto;
}
.mt-modal[open], .mt-modal.is-open { display: flex; }
.mt-modal-dialog {
	background: #fff;
	color: var(--mt-body-text);
	width: 100%;
	max-width: 760px;
	padding: 30px 35px 40px;
	position: relative;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .4);
}
.mt-modal-dialog h3, .mt-modal-dialog h4 { margin-top: 0; }
.mt-modal-close {
	position: absolute;
	top: 8px;
	right: 12px;
	width: 36px;
	height: 36px;
	font-size: 26px;
	line-height: 1;
	background: none;
	border: 0;
	color: #888;
	cursor: pointer;
}
.mt-modal-close:hover { color: var(--mt-accent); }

/* --------------------------------------------------------------- footer -- */

#mt-footer {
	background: var(--mt-footer-bg);
	color: var(--mt-footer-text);
	text-align: center;
	padding: 20px 0;
}
#mt-footer a { color: var(--mt-accent); }
#mt-footer a:hover { color: var(--mt-nav-active); }

/* ------------------------------------------------------------ scrolltop -- */

#mt-scrolltop {
	position: fixed;
	right: 22px;
	bottom: 22px;
	width: 40px;
	height: 40px;
	background: none;
	border: 0;
	color: #fff;
	opacity: 0;
	visibility: hidden;
	cursor: pointer;
	transition: opacity .3s ease, visibility .3s ease;
	z-index: 200;
}
#mt-scrolltop.is-visible { opacity: .7; visibility: visible; }
#mt-scrolltop:hover { opacity: 1; color: var(--mt-accent); }
#mt-scrolltop svg { width: 26px; height: 26px; stroke-width: 1.5; }

/* Anchor targets must clear the pinned header. */
#motoreninstandsetzung, #automatikgetriebe, #kontakt { scroll-margin-top: 70px; }

/* --------------------------------------------------------- system bits -- */

#system-message-container { max-width: var(--mt-container); margin: 0 auto; padding: 0 15px; }

/* ---------------------------------------------------------- responsive -- */

@media (max-width: 991px) {
	.mt-hero { height: 380px; }
	.mt-hero-head { left: 60px; font-size: 46px; line-height: 52px; }
	.mt-hero-sub  { left: 90px; font-size: 20px; top: calc(50% + 48px); }

	.mt-col-10 { width: 100%; margin-left: 0; }
	.mt-parallax-band .mt-col-6 { width: 100%; margin-left: 0; }
	#kontakt .mt-c1, #kontakt .mt-c2, #kontakt .mt-c3 { width: 100%; }
	#kontakt .mt-c2 .mt-space { height: 20px; }
	.mt-btn { max-width: 260px; }
}

@media (max-width: 767px) {
	#mt-topbar { font-size: 14px; }
	#mt-topbar .mt-container { justify-content: center; }
	.mt-contact-info { justify-content: center; }

	#mt-nav-toggle { display: block; }
	#mt-nav-list {
		display: none;
		position: absolute;
		top: 70px;
		left: 0;
		right: 0;
		background: var(--mt-header-bg);
		box-shadow: 0 6px 12px rgba(0, 0, 0, .3);
	}
	#mt-nav-list.is-open { display: block; }
	#mt-nav-list ul { display: block; }
	#mt-nav-list a { display: block; line-height: 46px; padding: 0 20px; }

	.mt-hero { height: 300px; }
	.mt-hero-head { left: 15px; font-size: 30px; line-height: 36px; }
	.mt-hero-sub  { left: 25px; font-size: 16px; top: calc(50% + 40px); }

	.mt-title, .mt-parallax-title { font-size: 34px; line-height: 38px; }
	.mt-parallax { padding: 80px 0 30px; }
	.mt-section { padding: 30px 0; }
	.mt-block { margin-bottom: 20px; }
}
