@font-face {
	font-family: 'is';
	font-style: normal;
	src: url("../fonts/IstokWeb-Regular.ttf") format("truetype");
	font-weight: 400;
}
@font-face {
	font-family: 'is';
	font-style: normal;
	src: url("../fonts/IstokWeb-Bold.ttf") format("truetype");
	font-weight: 500;
}
@font-face {
	font-family: 'is';
	font-style: italic;
	src: url("../fonts/IstokWeb-Italic.ttf") format("truetype");
	font-weight: 400;
}
@font-face {
	font-family: 'is';
	font-style: italic;
	src: url("../fonts/IstokWeb-BoldItalic.ttf") format("truetype");
	font-weight: 500;
}

:root {
	--font-size: 16px;

	--font-color: #575757;
	--background-color: white;
	--red: #E30613;
	--grey: #575757;
	--lightgrey: color-mix(in srgb, var(--grey) 10%, white 100%);
	--gruenlandtechnik: #a8b38b;
	--bodenbearbeitung: #967e2c;
	--arbeitsgeraete: #fbb800;
	--silagetechnik: #689425;
	--kommunaltechnik: #cabc6e;
	--hof-und-weidetechnik: #f18a00;

	--gap: var(--font-size);
	--gap-l: calc(var(--font-size) * 2);
	--gap-xl: calc(var(--font-size) * 3);
	--gap-xxl: calc(var(--font-size) * 4);
	--gap-center: 0;

	--container: 1400px;
	--figure: 100dvh;
	--content-width: clamp(
        0px,
        calc(100vw - (2 * var(--gap)) - (2 * var(--gap-l))),
        var(--container)
    );

	--grid:
        [full-width-start]
            minmax(var(--gap), 1fr)
            [picture-start]
                var(--gap-l)
                [content-start]
                    minmax(0, calc(var(--content-width) / 4))
                    [quarter-start]
                        minmax(0, calc(var(--content-width) / 4))
                        [center-start]
                            var(--gap-center)
                        [center-end]
                        minmax(0, calc(var(--content-width) / 4))
                    [quarter-end]
                    minmax(0, calc(var(--content-width) / 4))
                [content-end]
                var(--gap-l)
            [picture-end]
            minmax(var(--gap), 1fr)
        [full-width-end];

	@supports (color: color(display-p3 1 1 1)) {
		--font-color: color(display-p3 0.294118 0.294118 0.294118 / 1);

		--red: color(display-p3 0.890196 0.023529 0.074510 / 1);
		--grey: color(display-p3 0.341176 0.341176 0.341176 / 1);
	}
	@media (max-width: 800px) {
		--gap-l: calc(var(--font-size) * 1.2);
		--gap-xl: calc(var(--font-size) * 1.3);
		--gap-xxl: calc(var(--font-size) * 1.4);
	}

	@media (prefers-color-scheme: dark) {
		--font-color: white;
		--background-color: color-mix(in srgb, black 100%, white 5%);
		--lightgrey: color-mix(in srgb, black 100%, white 20%);
	}
}

html, body {
	overflow-x: hidden;
	interpolate-size: allow-keywords;
    scroll-behavior: smooth;

	margin: 0;
	padding: 0;

	background-color: var(--background-color);
}

body {
	font-family: Arial, Helvetica, sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
	font-size: clamp(var(--font-size), 1.0dvw, calc(var(--font-size) * 1.2));
	color: var(--font-color);
	font-weight: 300;
	line-height: 1.5;
	letter-spacing: -.2px;	

	display: grid;
	grid-template-columns: var(--grid);
	gap: 0;

	* {
		box-sizing: border-box;
		z-index: 1;
		margin: 0;
		padding: 0;
		color: inherit;
	}

	h1, h1 *, .h1, .h1 *,
	h2, h2 *, .h2, .h2 *,
	h3, h3 *, .h3, .h3 *,
	h4, h4 *, .h4, .h4 *,
	h5, h5 *, .h5, .h5 *,
	h6, h6 *, .h6, .h6 * {
		display: block;
		font-family: is;
		text-transform: uppercase;
		line-height: 1.25;
		margin-block: 1rem;
		color: inherit;

		@media (max-width: 800px) {
			hyphens: auto;
			text-wrap: balance;
		}
	}
	h1, h1 *, .h1, .h1 * {
		font-size: clamp(calc(var(--font-size) * 2), 3.5dvw, calc(var(--font-size) * 4));
		font-weight: 900;
		letter-spacing: -2px;
	}
	h2, h2 *, .h2, .h2 * {
		font-size: clamp(calc(var(--font-size) * 1.8), 3.0dvw, calc(var(--font-size) * 3.5));
		font-weight: 750;
		font-weight: 800;
		letter-spacing: -1.75px;
	}
	h3, h3 *, .h3, .h3 * {
		font-size: clamp(calc(var(--font-size) * 1.6), 2.5dvw, calc(var(--font-size) * 3.0));
		font-weight: 600;
		font-weight: 700;
		letter-spacing: -1.5px;
	}
	h4, h4 *, .h4, .h4 * {
		font-size: clamp(calc(var(--font-size) * 1.4), 2.0dvw, calc(var(--font-size) * 2.6));
		font-weight: 500;
		font-weight: 600;
		letter-spacing: -1px;
	}
	h5, h5 *, .h5, .h5 * {
		font-size: clamp(calc(var(--font-size) * 1.2), 1.5dvw, calc(var(--font-size) * 2.0));
		font-weight: 450;
		font-weight: 500;
		text-transform: none;
		letter-spacing: -.5px;
	}
	h6, h6 *, .h6, .h6 * {
		font-size: clamp(calc(var(--font-size) * 1.0), 1.0dvw, calc(var(--font-size) * 1.5));
		font-weight: 400;
		text-transform: none;
		letter-spacing: 0px;
	}

	strong {
		font-weight: 500;
	}

	address {
		font-style: normal;
	}

	img {
		width: 100%;
		height: auto;
	}

	p {
		margin-block: var(--font-size);
	}

	a {
		text-decoration: none;
		color: var(--font-color);
		&:hover {
			text-decoration: underline;
		}
	}

	iframe {
		width: 100%;
		aspect-ratio: 16 / 9;
	}

	/*
	Header
	*/
	> header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 99;
        padding: var(--gap);
        display: flex;
        align-content: space-between;
        transition: transform 300ms ease, opacity 300ms ease;
        will-change: transform;
        &.with-bg {
            background: white;
        }

        &.is-hidden {
            transform: translateY(-100%);
            opacity: 0;
            pointer-events: none;
        }

        > a {
            display: block;
            flex: 1;
            align-self: flex-start;

            * {
                max-height: min(70px, 10dvw);
                fill: var(--red);
            }
			svg,
			img {
				width: auto;
				height: auto;
			}

            &:last-child {
                text-align: right;
                cursor: pointer;
                z-index: 1;
            }
        }

        > nav {
            position: absolute;
            right: -100dvw;
            top: 0;
            min-height: 100dvh;
            background: var(--red);
            width: 90dvw;
            max-width: 800px;
            max-height: 100dvh;
            padding: var(--gap-xxl);
            transition: all 1s ease;
            z-index: 2;
            overflow-x: auto;

            &:focus-within,
            &.active {
                right: 0;
            }
            *:focus {
                outline-color: white;
            }

            > span {
                cursor: pointer;
                color: white;
                display: flex;
                align-items: flex-end;
                align-content: flex-end;
                justify-content: flex-end;
                font-size: 60px;
                padding: 0;
            }

            > ul {
                margin: 0;
                padding: 0;
                list-style: none;

                > li {
                    margin: 0;
                    padding: 0;

                    > a {
                        cursor: pointer;
                        color: white;
                        display: block;
                        font-size: calc(var(--font-size) * 2);
                        font-weight: 500;
                        letter-spacing: 1px;
                        margin-left: var(--gap);
                        margin-block: var(--gap);
                        position: relative;
                        text-decoration: none;
                        @media (max-width: 800px) {
                            font-size: calc(var(--font-size) * 1.5);
                        }
                    }

                    &.has-submenu {
                        > a {
                            &::before {
                                content: "";
                                position: absolute;
                                top: var(--font-size);
                                left: 0;
                                height: var(--font-size);
                                width: var(--font-size);
                                transform: translateX(-1.25em) rotate(-45deg);
                                transform-origin: center;
                                border-right: 5px solid white;
                                border-bottom: 5px solid white;
                                transition: transform 500ms ease;
                                box-sizing: border-box;
                                font-weight: bold;
                                @media (max-width: 800px) {
                                    top: calc(var(--font-size) * .65);
                                    left: 5px;
                                    height: calc(var(--font-size) * .75);
                                    width: calc(var(--font-size) * .75);
                                }
                            }
                            text-decoration: none;
                        }

                        > ul {
                            display: none;
                            margin: 0;
                            padding: 0;
                            list-style: none;

                            > li {
                                > a {
                                    color: white;
                                    display: block;
                                    font-size: calc(var(--font-size) * 1.25);
                                    font-weight: 300;
                                    letter-spacing: 1px;
                                    margin-left: var(--gap-l);
                                    position: relative;
                                    text-decoration: none;
                                }
                            }
                        }

                        &.is-open {
                            > a {
                                &::before {
                                    transform: translateX(-1.25em) rotate(45deg);
                                }
                            }

                            > ul {
                                display: block;
                            }
                        }
                    }
                }
            }

            > span.lang {
                display: flex;
                align-items: flex-end;
                align-content: flex-end;
                justify-content: flex-end;
                font-size: inherit;
                padding: 0;
                margin-top: var(--gap-l);

                > a {
                    color: white;
                    display: block;
                    font-size: calc(var(--font-size) * 2);
                    font-weight: 500;
                    letter-spacing: 1px;
                    margin-left: var(--gap);
                    position: relative;
                    padding: var(--font-size);
                    text-decoration: none;
                    text-transform: uppercase;

                    &:hover,
                    &.active {
                        background-color: white;
                        color: var(--red);
                    }
                }
            }
        }
    }

	/* 
	Figure directly in body 
	*/
	> figure {
        grid-column: full-width;
        display: grid;
        grid-template-columns: var(--grid);
        grid-template-rows: 1fr;
        height: var(--figure);
        min-height: 800px;
        overflow: clip;
        z-index: 1;
		grid-row: 2;

		video,
        img {
            display: block;
            grid-column: 1 / -1;
            grid-row: 1;
            width: 100%;
            height: 100%;
            min-width: 0;
            min-height: 0;
            object-fit: cover;
			object-position: top;
            pointer-events: none;
        }


        figcaption {
            grid-column: full-width;
            grid-row: 1;

            display: grid;
            grid-template-columns: var(--grid);
            grid-template-rows: auto auto;
            align-content: end;
            row-gap: 0;

            height: var(--figure);
            min-height: 800px;
            padding-bottom: var(--gap);

            h1, .h1,
            h2, .h2 {
                margin: 0;
                line-height: 1;
                color: white;
                text-transform: uppercase;
                width: fit-content;
                * {
                    color: white;
                }
                @media(max-width:800px) {
                    hyphens: auto;
                }
            }

            h1, .h1 {
                grid-column: full-width-start / content-end;
                grid-row: 1;

                background: var(--red);

                --page-edge: max(var(--gap), calc((100vw - var(--container)) / 2));
                padding: var(--gap) var(--gap) var(--gap) calc(var(--page-edge) + var(--gap));
                font-size: calc(var(--font-size) * 4);

                &.s {
                    font-size: calc(var(--font-size) * 2) !important;
                }
                &.m {
                    font-size: calc(var(--font-size) * 3) !important;
                }
                
                @media (max-width: 800px) {
                    font-size: calc(var(--font-size) * 2.5) !important;
                    &.s {
                        font-size: calc(var(--font-size) * 1.5) !important;
                    }
                    &.m {
                        font-size: calc(var(--font-size) * 2.25) !important;
                    }
                }

            }

            h2, .h2 {
                grid-column: content;
                grid-row: 2;

                background: var(--grey);
                padding: var(--gap);
            }
        }
    }
    
	
	&:not(:has(> figure)) > main {
		padding-top: calc(var(--gap) * 5);	
	}

	/* 
	Main Content 
	*/
	> main {
		grid-row: 3;
		grid-column: full-width;
		
		display: grid;
		grid-template-columns: var(--grid);

		> section {
			grid-column: content;
			margin-block: var(--gap-l);
			padding-block: var(--gap-l);

			&:last-child {
				margin-bottom: 0;
			}

			&#welcome {
				display: grid;
				grid-template-columns: 1fr 1fr;
				gap: var(--gap-xxl);
				* {
					hyphens: auto;
				}
			}

			&#catalog {
				grid-column: content;
				display: grid;
				grid-template-columns: repeat(3, 1fr);
				gap: var(--gap);

				> h3 {
					grid-column: 1 / -1;
				}

				> article {
					display: flex;

					> a {
						display: flex;
						width: 100%;
						color: inherit;
						text-decoration: none;
					}

					figure {
						display: grid;
						grid-template-rows: auto 1fr;
						width: 100%;
						margin: 0;
					}

					img {
						width: 100%;
						aspect-ratio: 3 / 4;
						object-fit: cover;
						display: block;
					}

					figcaption {
						margin-inline: var(--gap);
						display: grid;
						grid-template-rows: auto 1fr auto;
						gap: 0 var(--gap);
					}
				}
			}
		}
	}

	/*
	Footer - end of page
	*/
	> footer {
		grid-row: 99;
		grid-column: full-width;
		display: grid;
		grid-template-columns: var(--grid);
		background: var(--grey);
		color: white !important;
		padding-block: var(--gap);

		* {
			color: white;
		}

		> div {
			grid-column: content;
			margin-block: var(--gap);

			display: grid;
			grid-template-columns: repeat(3, 1fr);
			gap: 0 var(--gap-xxl);

			svg {
				fill: white;
			}

			> span {
				grid-column: 1 / -1;
				text-transform: uppercase !important;
			}

			address {
				nav {
					display: grid;
					grid-template-columns: repeat(auto-fit, minmax(20px, 1fr));
					gap: var(--gap-xxl);
				}
			}

			form {
				section {
					display: grid;
					grid-template-columns: 9fr 1fr;
					input, button {
						appearance: none;
						border: none;
						padding: var(--gap);
						font-size: var(--font-size);
					}
					button {
						background: var(--red);
						transition: all .25s ease-in-out;

						display: flex;
						align-items: center;
						justify-content: center;


						svg {
							min-height: 100%;
							fill: white;
							transition: all .25s ease-in-out;
						}
						&:hover {
							background: color-mix(in srgb, var(--red) 100%, black 10%);
							svg {
								transform: scale(1.2);
							}
						}
					}
				}
			}
			> nav {
				ul {
					list-style: none;
					padding: 0;
				}
			}
		}
		> nav {
			grid-column: content;
			display: flex;
			gap: var(--gap-xxl);
			align-content: center;
			justify-content: center;
			margin-block: var(--gap);
		}
	}
}

.text {
	&.red {
		color: var(--red);
	}
}
.bg {
	padding: var(--gap);
	color: white;
	font-weight: 450;

	&.red {
		background-color: var(--red);
	}
}

.btn {
	padding: var(--gap);
	background: var(--red);
	color: white;
	text-align: center;
	text-transform: uppercase;
	font-weight: 400;
	transition: all .25s ease-in-out;

	display: flex;
	align-items: center;
	justify-content: center;
	gap: .25em;

	&:hover {
		text-decoration: none;
		background: color-mix(in srgb, var(--red) 100%, black 30%);
		font-weight: 500;
		outline: 1px solid white;
		outline-offset: -3px;
	}

	&.outline {
		background: transparent;
		border: 2px solid var(--red);
		color: var(--red);
		&:hover {
			border-color: color-mix(in srgb, var(--red) 100%, black 30%);
			outline-color: color-mix(in srgb, var(--red) 100%, black 30%);
			outline-offset: -5px;
			color: color-mix(in srgb, var(--red) 100%, black 30%);
		}
	}
}

/* LOGO */
.st0{fill:var(--grey)}
.st1{fill:var(--red)}
.st2{fill:#FFFFFF}
.st3{fill:#ffffff}