/* Fonts */
@font-face {
    font-family: "The Directors";
    src: url("../fonts/TheDirectors-Italic.otf") format("opentype");
    font-style: italic;
    font-weight: normal;
}

@font-face {
    font-family: "Klute";
    src: url("../fonts/Klute-Black.otf") format("opentype");
    font-weight: 900;
    font-style: normal;
}

/* Variables */
:root {
    /* Colors */
    --color-bg: antiquewhite;
    --color-bg-rgb: 250, 235, 215;
    --color-text: #000;

    /* Typography */
    --font-body: "Libre Baskerville", Georgia, serif;
    --font-heading: "IBM Plex Sans", sans-serif;
    --font-logo: "Klute", sans-serif;

    /* Spacing */
    --padding-inline: clamp(1rem, 5vw, 6rem);
    --padding-block: clamp(2rem, 8vw, 8rem);
    --section-gap: 8rem;
}

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

* {
    margin: 0;
    padding: 0;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-color: var(--color-bg);
    font-family: var(--font-body);
    color: var(--color-text);
}

::selection {
    background-color: var(--color-text);
    color: var(--color-bg);
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

ul,
ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 400;
}

p {
    font-size: 2.8rem;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem var(--padding-inline);
    position: sticky;
    top: 0;
    background: linear-gradient(to bottom, rgba(var(--color-bg-rgb), 0.9) 60%, rgba(var(--color-bg-rgb), 0) 100%);
}

header h1 {
    font-family: var(--font-logo);
}

main {
    padding: 0 var(--padding-inline) var(--padding-block);
}

main section {
    margin-bottom: var(--section-gap);
}

main section:last-child {
    margin-bottom: 0;
}

main h2 {
    font-size: 2rem;
    margin-bottom: 3rem;
}

main h3 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}

main p + p {
    margin-top: 2rem;
}


#hero {
    padding: 6rem 0 10rem;
}

#hero p:first-child {
    font-size: 3.4rem;
    margin-bottom: 3rem;
}

#hero p {
    padding-left: 0;
    max-width: 80ch;
}

main article {
    margin-bottom: 4rem;
}

main article:last-child {
    margin-bottom: 0;
}

/* Leistungen Section */
.leistungen-grid {
    display: grid;
    gap: 2rem;
}

#leistungen p {
    font-size: 2rem;
}

@media (min-width: 768px) {
    .leistungen-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Kontakt Section */
#kontakt p {
    font-size: 2rem;
    font-style: normal;
}

footer {
    padding: 1rem var(--padding-inline) var(--padding-block);
}

footer p {
    font-size: 1.4rem;
    text-align: center;
}

.logo img {
    height: 3.6rem;
    width: auto;
    filter: invert(1);
}

header nav ul {
    display: flex;
    gap: 3rem;
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.8rem;
}

/* Mobile Navigation */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
    position: absolute;
    right: var(--padding-inline);
    top: 50%;
    transform: translateY(-50%);
    height: 2rem;
    width: 2.4rem;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    background: var(--color-text);
    height: 2px;
    width: 100%;
    position: absolute;
    transition: transform 0.2s ease;
}

.nav-toggle-label span {
    top: 50%;
    transform: translateY(-50%);
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
    content: "";
}

.nav-toggle-label span::before {
    top: -8px;
}

.nav-toggle-label span::after {
    top: 8px;
}

@media (max-width: 767px) {
    header {
        flex-wrap: wrap;
        background: rgba(var(--color-bg-rgb), 0.9);
    }

    .nav-toggle-label {
        display: block;
    }

    header nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(to bottom, rgba(var(--color-bg-rgb), 0.9) 80%, rgba(var(--color-bg-rgb), 0) 100%);
        transform: scaleY(0);
        transform-origin: top;
        transition: transform 0.2s ease;
    }

    header nav ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem var(--padding-inline) 2rem;
    }

    header nav ul li {
        padding: 1rem 0;
    }

    .nav-toggle:checked ~ nav {
        transform: scaleY(1);
    }

    .nav-toggle:checked ~ .nav-toggle-label span {
        background: transparent;
    }

    .nav-toggle:checked ~ .nav-toggle-label span::before {
        top: 0;
        transform: rotate(45deg);
    }

    .nav-toggle:checked ~ .nav-toggle-label span::after {
        top: 0;
        transform: rotate(-45deg);
    }

    /* Responsive Typography */
    p {
        font-size: 2rem;
    }

    #hero p:first-child {
        font-size: 2.4rem;
    }

    #leistungen p,
    #kontakt p {
        font-size: 1.6rem;
    }

    main h2 {
        font-size: 1.8rem;
    }

    main h3 {
        font-size: 1.4rem;
    }

    header h1 {
        font-size: 2.8rem;
    }

    header nav ul {
        font-size: 1.6rem;
    }

    footer p {
        font-size: 1.2rem;
    }
}
