/* =========================================================
   Atelier Egert — main stylesheet
     1. Tokens
     2. Fonts
     3. Reset & base
     4. Typography
     5. Container
     6. Buttons
     7. Background boxes & section transitions
     8. Header / hero
     9. Service
    10. Portfolio
    11. Logos
    12. About
    13. Quotes
    14. Kunden
    15. Kontakt
    16. Footer
    17. Image lightbox
    18. Scroll-to-top
    19. Responsive
   ========================================================= */

/* 1. Tokens ---------------------------------------------- */
:root {
    --font-regular: montserrat, sans-serif;
    --font-medium: montserrat-medium, sans-serif;
    --font-semibold: montserrat-semibold, sans-serif;
    --font-light: montserrat-light, sans-serif;
    --font-display: uncial-antiqua, serif;

    --color-text: #000;
    --color-text-on-dark: #fff;
    --color-muted: #999;
    --color-muted-soft: #a1a1a1;
    --color-muted-dark: #908f8f;
    --color-border: #e1e1e1;
    --color-input-bg: #f3f3f3;
    --color-divider: #272727;
    --color-overlay: rgba(0, 0, 0, 0.3);
    --color-overlay-strong: rgba(0, 0, 0, 0.7);

    --container-width: 80%;
    --container-max: 3200px;
    --container-max-narrow: 1400px;

    --pill-radius: 100px;
    --transition: 0.3s ease;
}

/* 2. Fonts ----------------------------------------------- */
@font-face {
    font-family: montserrat;
    src: url(fonts/montserrat-regular.woff) format("woff");
    font-display: swap;
}
@font-face {
    font-family: montserrat-medium;
    src: url(fonts/montserrat-medium.woff) format("woff");
    font-display: swap;
}
@font-face {
    font-family: montserrat-semibold;
    src: url(fonts/montserrat-semibold.woff) format("woff");
    font-display: swap;
}
@font-face {
    font-family: montserrat-light;
    src: url(fonts/montserrat-light.woff) format("woff");
    font-display: swap;
}
@font-face {
    font-family: uncial-antiqua;
    src: url(fonts/uncial-antiqua.woff) format("woff");
    font-display: swap;
}

/* 3. Reset & base ---------------------------------------- */
html {
    min-height: 100%;
    position: relative;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
}

#website-wrapper {
    overflow: hidden;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

li {
    float: left;
}

li a {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 0 16px;
    text-decoration: none;
    font-family: var(--font-semibold);
    font-size: 16px;
    letter-spacing: 1px;
}

li a:hover {
    color: var(--color-text-on-dark);
}

/* 4. Typography ------------------------------------------ */
h1, h2, h3, p, a {
    font-weight: normal;
}

p {
    letter-spacing: 1px;
}

h1 {
    font-family: var(--font-regular);
    font-size: 28px;
    letter-spacing: 2px;
}

h2 {
    font-family: var(--font-medium);
    font-size: 24px;
    letter-spacing: 2px;
    text-align: center;
    margin: 0 0 55px;
    padding-top: 10px;
}

h3 {
    font-family: var(--font-medium);
    font-size: 18px;
    letter-spacing: 2px;
    text-align: center;
}

/* 5. Container ------------------------------------------- */
.container {
    width: var(--container-width);
    margin: auto;
    max-width: var(--container-max);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 6. Buttons --------------------------------------------- */
.btn,
.heading a,
section#logos a,
#map-and-input button {
    text-decoration: none;
    display: inline-block;
    border-radius: var(--pill-radius);
    border: 1px solid #000;
    background-color: #000;
    color: var(--color-text-on-dark);
    font-family: var(--font-medium);
    font-style: normal;
    font-size: 12px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition);
}

.btn:hover,
section#logos a:hover,
#map-and-input button:hover {
    background-color: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-text);
}

/* fixed-size hero pill */
.btn--hero,
.heading a {
    width: 168px;
    height: 58px;
    line-height: 58px;
    margin-top: 10px;
    padding: 0;
}

.btn--hero:hover,
.heading a:hover {
    background-color: transparent;
    color: var(--color-text-on-dark);
    border: 1px solid var(--color-text-on-dark);
}

/* roomy padded pill */
.btn--padded,
section#logos a,
#map-and-input button {
    padding: 20px;
    margin-top: 10px;
}

#map-and-input button {
    margin-top: 25px;
}

/* 7. Background boxes & section transitions -------------- */
.bg-box {
    position: relative;
    width: 100%;
}

.bg-box > img {
    display: block;
    width: 100%;
    height: 900px;
    object-fit: cover;
}

.bg-box .content {
    position: absolute;
    inset: 0;
}

.gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        var(--color-overlay) 0%,
        var(--color-overlay) 100%
    );
}

.bg-pattern {
    display: block;
    background-image: url("images/pattern.jpg");
    width: 100%;
    height: 100%;
}

.bg-fixed {
    background:
        linear-gradient(0deg, var(--color-overlay) 0%, var(--color-overlay) 100%),
        url("images/background_higher.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

@media (hover: none) {
    /* iOS/touch: parallax-fixed backgrounds break, so unfix */
    .bg-fixed {
        background-attachment: scroll;
    }
}

/* SVG section-transition clips. The 6400px width and exact polygon
   placement are part of the visual identity — do not edit. */
.bg-box > #clip1,
.bg-box > #clip2,
.bg-box > .clip {
    width: 6400px;
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0);
}

.bg-box > .clip-bottom,
.bg-box > #clip1 {
    top: 100%;
    transform: translate(-50%, -100%);
}

.bg-box > .clip-top {
    top: 0;
}

.bg-box > #clip1 { height: 900px; }
.bg-box > #clip2 { height: 250px; }
.bg-box > .clip-500 { height: 500px; }

/* 8. Header / hero --------------------------------------- */
/* NOTE: .header relies on float-based layout so the bar collapses to
   padding-top height, letting .heading's padding-top: 18rem position the
   hero text against the background. Flex would re-flow the hero text. */
.header {
    padding-top: 32px;
}

.header .logo {
    float: left;
    padding-left: 16px;
}

.header .menu {
    float: right;
}

.header .logo img {
    filter: opacity(0.9);
}

.menu label,
#hamburger {
    display: none;
    padding: 0;
    margin-bottom: -5px;
}

.menu label {
    margin-top: -10px;
    color: var(--color-text-on-dark);
    text-align: right;
    font-size: 40px;
    padding: 5px 10px 5px 0;
    cursor: pointer;
}

.heading {
    color: var(--color-text-on-dark);
    text-align: center;
    padding-top: 18rem;
}

/* 9. Service --------------------------------------------- */
section#service {
    margin-top: 130px;
    margin-bottom: -100px;
    padding-top: 10px;
}

section#service > .container {
    max-width: var(--container-max-narrow);
}

#services {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    column-gap: 50px;
    row-gap: 50px;
    padding-top: 15px;
    position: relative;
    z-index: 20;
}

.service-container {
    width: 400px;
}

.service-container > h3 {
    margin: 35px 0 12px;
}

.service-container > p {
    color: var(--color-muted-soft);
    font-family: var(--font-regular);
    text-align: center;
    margin-top: 0;
    font-size: 14px;
    letter-spacing: 1px;
    line-height: 24px;
}

.rhombus {
    margin: auto;
    width: 75px;
    height: 75px;
    border: 2px solid var(--color-border);
    border-radius: 5px;
    transform: rotate(45deg);
}

.rhombus p {
    color: var(--color-muted-dark);
    font-size: 40px;
    margin: 0;
    text-align: center;
    height: 75px;
    width: 75px;
    line-height: 75px;
    transform: rotate(-45deg);
    font-family: var(--font-display);
}

/* per-letter optical alignment inside the rhombus glyph — do not edit */
.service-container:nth-child(1) .rhombus p { line-height: 81px; letter-spacing: 0; }
.service-container:nth-child(2) .rhombus p { line-height: 73px; letter-spacing: 0; }
.service-container:nth-child(3) .rhombus p { line-height: 75px; letter-spacing: -4px; }
.service-container:nth-child(4) .rhombus p { line-height: 75px; letter-spacing: 0; }
.service-container:nth-child(5) .rhombus p { line-height: 68px; letter-spacing: 0; }
.service-container:nth-child(6) .rhombus p { line-height: 67px; letter-spacing: -6px; }

/* 10. Portfolio ------------------------------------------ */
section#sec-portfolio .container {
    padding: 350px 0 450px;
    max-width: var(--container-max-narrow);
}

section#sec-portfolio .container h2 {
    margin-top: 0;
    color: var(--color-text-on-dark);
}

.portfolio-images {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    column-gap: 50px;
    row-gap: 50px;
    max-width: 940px;
    margin-left: auto;
    margin-right: auto;
}

.portfolio-images img {
    flex: 0 0 280px;
    width: 280px;
    max-width: 280px;
    object-fit: cover;
    box-shadow: 0 14px 40px 4px rgba(0, 0, 0, 0.75);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}

.portfolio-images img:hover {
    transform: scale(1.1);
    box-shadow: 0 22px 55px 6px rgba(0, 0, 0, 0.9);
}

/* 11. Logos ---------------------------------------------- */
section#logos {
    padding-bottom: 100px;
    margin-top: -90px;
    position: relative;
}

section#logos .container {
    max-width: var(--container-max-narrow);
    text-align: center;
}

section#logos .container .logos {
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: 25px;
    row-gap: 25px;
}

section#logos .container .logos .logo-container {
    text-align: center;
    flex: 1 1 200px;
}

section#logos .container .logos .logo-container:nth-child(2) {
    flex: 1 1 250px;
}

section#logos .container .logos .logo-container img {
    width: 100%;
    max-width: 300px;
}

section#logos .container .logos .logo-container:nth-child(2) img {
    max-width: 370px;
}

.logo-container > h3 {
    margin-bottom: 10px;
}

.logo-container > span {
    font-family: var(--font-regular);
    color: var(--color-muted);
    font-size: 14px;
    letter-spacing: 1px;
}

section#logos p {
    font-family: var(--font-medium);
    color: var(--color-text);
    font-size: 18px;
    margin-top: 50px;
}

/* 12. About ---------------------------------------------- */
section#about {
    position: relative;
    z-index: 10;
    margin-bottom: -150px;
}

section#about .container {
    display: flex;
    justify-content: center;
    max-width: var(--container-max-narrow);
    flex-wrap: wrap;
    column-gap: 25px;
    row-gap: 25px;
    padding-bottom: 10px;
}

section#about .container .image {
    flex: 1;
}

section#about .container .image img {
    width: 100%;
}

section#about .container p {
    flex: 1;
    margin: 0;
    font-family: var(--font-regular);
    color: var(--color-muted);
    font-size: 14px;
    letter-spacing: 1px;
    line-height: 24px;
}

/* 13. Quotes --------------------------------------------- */
section#quotes .quotes-container {
    height: 1500px;
    position: relative;
}

section#quotes .quotes-container .quote {
    position: absolute;
    width: 100%;
    max-width: 780px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 1s ease;
}

section#quotes .quotes-container .quote.is-active {
    opacity: 1;
}

.quote > p {
    font-family: var(--font-medium);
    color: var(--color-text-on-dark);
    font-size: 18px;
    line-height: 27px;
    letter-spacing: 1px;
    text-align: center;
}

.quote > .author {
    font-family: var(--font-regular);
    font-style: italic;
    font-size: 16px;
}

.quote-menu {
    position: absolute;
    left: 50%;
    bottom: 570px;
    transform: translate(-50%, 0);
}

.quote-menu div {
    display: inline-block;
    border-radius: 15px;
    border: 1px solid var(--color-text-on-dark);
    width: 14px;
    height: 14px;
    opacity: 0.5;
    margin: 0 7px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0);
    transition: background-color 1s ease;
}

.quote-menu div.is-active {
    background-color: rgba(255, 255, 255, 1);
}

/* 14. Kunden --------------------------------------------- */
section#kunden {
    position: relative;
    z-index: 10;
    margin-top: -120px;
    padding-bottom: 100px;
}

section#kunden .container {
    text-align: center;
}

section#kunden .container .logos img {
    margin: 10px;
}

section#kunden > .container {
    max-width: var(--container-max-narrow);
}

section#kunden .logo-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 20px auto 30px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
}

section#kunden .logo-track {
    display: flex;
    align-items: center;
    gap: 70px;
    list-style: none;
    margin: 0;
    padding: 0;
    width: max-content;
    animation: logo-scroll 30s linear infinite;
}

section#kunden .logo-carousel:hover .logo-track {
    animation-play-state: paused;
}

section#kunden .logo-track li {
    flex: 0 0 auto;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

section#kunden .logo-track img {
    display: block;
    max-height: 70px;
    max-width: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
}

@keyframes logo-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    section#kunden .logo-track {
        animation: none;
    }
}

section#kunden .container p {
    font-family: var(--font-regular);
    color: var(--color-text);
    font-size: 14px;
}

/* 15. Kontakt -------------------------------------------- */
section#kontakt {
    margin-bottom: -100px;
    position: relative;
    z-index: 10;
}

section#kontakt .container {
    max-width: var(--container-max-narrow);
}

#map-and-input {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    column-gap: 25px;
    row-gap: 25px;
    margin: 50px 0 70px;
}

#map-and-input > .google-maps {
    flex: 1;
}

#map-and-input > #contact-inputs {
    flex: 1;
}

#contact-inputs input,
#contact-inputs textarea {
    box-sizing: border-box;
    background-color: var(--color-input-bg);
    border: none;
    padding-left: 16px;
    font-family: var(--font-regular);
    font-size: 16px;
    margin-bottom: 15px;
    width: 100%;
    border-radius: 0;
}

#contact-inputs input {
    height: 60px;
}

#contact-inputs textarea {
    padding-top: 16px;
    resize: none;
}

#contact-inputs label {
    display: inline-block;
    font-family: var(--font-regular);
    color: var(--color-muted);
}

#my-info {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
}

#my-info > div {
    display: inline-block;
    width: 300px;
    text-align: center;
}

#my-info > div > p {
    font-family: var(--font-regular);
    color: var(--color-muted);
    letter-spacing: 1px;
    font-size: 14px;
}

/* 16. Footer --------------------------------------------- */
#footer {
    padding: 0;
    height: 350px;
}

.bg-footer {
    height: 350px;
}

.hcenter {
    text-align: center;
}

.footer-menu {
    padding-top: 300px;
}

.footer-menu ul {
    display: inline-block;
    margin: 0;
    padding: 0;
}

.footer-menu li {
    float: left;
}

/* 17. Image lightbox ------------------------------------- */
.darken {
    position: absolute;
    top: 0;
    bottom: -300px;
    left: 0;
    right: 0;
    z-index: 100;
    overflow: hidden;
    background-color: var(--color-overlay-strong);
}

.image-viewer {
    position: fixed;
    z-index: 110;
    top: 25%;
    left: 50%;
    transform: translate(-50%, 0);
    max-width: 810px;
    width: 90%;
}

.image-viewer .images-large {
    position: relative;
    margin-top: -100px;
}

.image-viewer .image-large {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* first image is in flow so the container has a height for siblings */
.image-viewer .image-large:first-of-type {
    position: relative;
}

.image-viewer .image-large.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.image-viewer .image-menu {
    position: relative;
    z-index: 3;
    text-align: center;
    margin-top: 20px;
}

.image-viewer .image-menu button {
    background-color: rgba(119, 119, 119, 0.4);
    border: none;
    color: var(--color-text-on-dark);
    border-radius: var(--pill-radius);
    width: 30px;
    height: 30px;
    margin: 10px;
    outline: none;
    padding: 0;
    cursor: pointer;
}

.image-viewer .image-menu button:hover {
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--color-text-on-dark);
}

.image-viewer .image-menu button > svg {
    display: block;
    margin-left: 50%;
    transform: translate(-50%, 0);
}

.image-viewer .image-menu button:nth-child(1) > svg {
    margin-left: calc(50% - 1px);
}

.image-viewer .image-menu button:nth-child(3) > svg {
    margin-left: calc(50% + 1px);
}

/* 18. Scroll-to-top -------------------------------------- */
#scroll-to-top {
    width: 35px;
    height: 35px;
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    border: 1px solid #000;
    outline: none;
    background-color: #000;
    color: var(--color-text-on-dark);
    cursor: pointer;
    border-radius: var(--pill-radius);
    padding-top: 3px;
    transition: background-color var(--transition);
}

#scroll-to-top:hover {
    background-color: transparent;
}

#scroll-to-top:hover svg {
    fill: var(--color-text);
}

#scroll-to-top svg {
    fill: var(--color-text-on-dark);
    margin-left: 50%;
    transform: translate(-50%, 0);
}

/* 19. Responsive ----------------------------------------- */
@media screen and (max-width: 900px) {
    .container {
        width: 90%;
    }

    .portfolio-images {
        flex-direction: column;
    }

    .portfolio-images img {
        max-width: 280px;
        height: auto;
    }

    .portfolio-images img:hover {
        transform: none;
    }

    #scroll-to-top {
        bottom: 15px;
        right: 15px;
    }

    section#logos .container .logos {
        flex-direction: column;
    }

    section#about .container p {
        text-align: center;
        flex-basis: 100%;
    }

    #map-and-input > iframe {
        flex-basis: 100%;
        height: 55vw;
    }

    #map-and-input > #contact-inputs {
        text-align: center;
    }

    .menu {
        position: absolute;
        width: 90%;
        z-index: 1;
    }

    .menu label {
        display: block;
    }

    .menu label:hover {
        cursor: pointer;
    }

    .menu ul {
        display: none;
        background-color: #000;
        width: 100%;
        text-align: right;
    }

    .menu ul li {
        display: block;
        width: 100%;
        border-top: 1px solid var(--color-divider);
        float: none;
    }

    .menu ul li a {
        display: block;
        padding: 15px;
        text-align: left;
        text-transform: uppercase;
    }

    .menu input:checked ~ ul {
        display: block;
    }

    .menu input:checked ~ label {
        background-color: #000;
    }
}
