/* ==========================================================================
   0. Fonts (self-hosted Inter 4.1, SIL Open Font License – see fonts/LICENSE.txt)
   ========================================================================== */
@font-face {
    font-family: "Inter";
    src: url(../fonts/inter-regular.woff2) format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url(../fonts/inter-medium.woff2) format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url(../fonts/inter-semibold.woff2) format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url(../fonts/inter-italic.woff2) format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url(../fonts/inter-medium-italic.woff2) format("woff2");
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}


/* ==========================================================================
   1. Custom Properties
   Desktop breakpoint: 64rem (1024px)
   ========================================================================== */
:root {
    /* Colors */
    --color-lime: #D8FC74;
    --color-dark: #3F4150;
    --color-light: #EEEEEE;
    --color-stone: #D0D1CC;
    --color-white: #FFFFFF;
    --color-black: #000000;

    /* Typography: family & weights */
    --font-base: "Inter", system-ui, sans-serif;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;

    /* Typography: sizes (430px values from the XD mobile artboard) */
    --fs-h2: clamp(1.8125rem, 1.45rem + 1.34vw, 3.0625rem);      /* 29px → 49px */
    --fs-services: clamp(1.375rem, 1.23rem + 0.54vw, 1.875rem);  /* 22px → 30px */
    --fs-body: clamp(1.0625rem, 1.01rem + 0.2vw, 1.25rem);       /* 17px → 20px */
    --fs-cite: clamp(0.875rem, 0.77rem + 0.4vw, 1.25rem);        /* 14px → 20px (quotes) */
    --fs-credit: clamp(0.875rem, 0.84rem + 0.13vw, 1rem);        /* 14px → 16px (photo credit) */

    /* Typography: line heights */
    --lh-tight: 1.2;   /* headings (58/49) */
    --lh-base: 1.5;    /* body text (30/20) */
    --lh-small: 1.25;  /* small text (20/16) */
    --lh-body: clamp(1.25rem, 1.07rem + 0.67vw, 1.875rem);       /* 20px → 30px */

    /* Spacing */
    --space-s: 1rem;     /* 16px */
    --space-l: 2.5rem;   /* 40px */

    --section-padding: clamp(3rem, 0.84rem + 8.05vw, 10.5rem);  /* 48px → 168px */
    --gutter: clamp(2.25rem, -9.63rem + 18.56vw, 15rem);        /* side margin: 36px up to 1024 → 180px @1800 (container reaches 1440) */
    --container-width: 90rem;                                   /* 1440px */

    /* Accent bar next to headings */
    --accent-bar-width: clamp(0.5rem, 0.43rem + 0.27vw, 0.75rem);     /* 8px → 12px */
    --accent-bar-height: clamp(3.75rem, 3.12rem + 2.35vw, 5.9375rem); /* 60px → 95px */
    --accent-bar-gap: clamp(1.25rem, 1.18rem + 0.27vw, 1.5rem);       /* 20px → 24px */
}


/* ==========================================================================
   2. Mini Reset
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
h1,
h2,
h3,
p,
ul,
figure,
blockquote {
    margin: 0;
}

/* :where() = specificity 0, so classes like .downloads can override the padding */
:where(ul[class]) {
    padding: 0;
    list-style: none;
}

img,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

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

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}


/* ==========================================================================
   3. Base Styles
   ========================================================================== */
body {
    font-family: var(--font-base);
    font-size: var(--fs-body);
    font-weight: var(--fw-regular);
    line-height: var(--lh-body);
    color: var(--color-dark);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    font-weight: var(--fw-semibold);
    line-height: var(--lh-tight);
}

h2 {
    font-size: var(--fs-h2);
    font-weight: var(--fw-medium);
}

@media (min-width: 64rem) {
    h2 {
        font-weight: var(--fw-semibold);
    }
}

h3 {
    font-size: var(--fs-body);
}

p + p {
    margin-top: 1lh;  /* one blank line */
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

a:hover {
    text-decoration-thickness: 2px;
}

:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

::selection {
    background-color: var(--color-lime);
    color: var(--color-dark);
}


/* ==========================================================================
   4. Layout Helpers
   ========================================================================== */

.container {
    width: min(100% - 2 * var(--gutter), var(--container-width));
    margin-inline: auto;
}

.section {
    padding-block: var(--section-padding);
}

.heading-accent {
    position: relative;
    padding-left: calc(var(--accent-bar-width) + var(--accent-bar-gap));
}

.heading-accent::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: var(--accent-bar-width);
    height: var(--accent-bar-height);
    background-color: currentColor;
}

.grid-2col {
    display: grid;
    row-gap: var(--space-l);
}

@media (min-width: 64rem) {
    .grid-2col {
        grid-template-columns: 586fr 708fr;
        column-gap: clamp(3rem, 7.6vw, 9.125rem);
    }
}

.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;
}


/* ==========================================================================
   5. Header
   ========================================================================== */
/* MOBILE */
.top-bar {
    height: 9px;
    background-color: var(--color-lime);
}

.hero {
    background-image: image-set(url(../img/nick-banner.webp) 1x, url(../img/nick-banner-2x.webp) 2x);
    background-size: cover;
    background-position: center;
    aspect-ratio: 430 / 342;
}

.hero-inner {
    position: relative;
    height: 100%;
}

.logo {
    position: absolute;
    bottom: 0;
    left: 0;
    width: clamp(10.5rem, 24vw, 29rem);
}

/* DESKTOP */
@media (min-width: 64rem) {
    .top-bar {
        height: 25px;
    }

    .hero {
        aspect-ratio: 1920 / 1055;  /* top bar + photo = 1080px, as in XD */
        background-position: center bottom;
    }

    .logo {
        top: 24.4%;
        bottom: auto;
    }
}


/* ==========================================================================
   6. Intro ("What does courage…" + Services)
   ========================================================================== */
/* MOBILE */
.intro {
    padding-top: clamp(3.3125rem, 1.03rem + 7.32vw, 9.8125rem);
    padding-bottom: max(4.4375rem, var(--section-padding));
    background-color: var(--color-dark);
    color: var(--color-white);
}

/* Bar starts at the top of the heading here (bottom-aligned elsewhere) */
.intro-title::before {
    top: 0.25em;
    bottom: auto;
}

/* Mobile: individual gaps from XD instead of one row-gap */
.intro-grid {
    row-gap: 0;
}

.intro-text {
    margin-top: 3.375rem;
}

.services {
    margin-top: 2.875rem;
}

.offers {
    margin-top: 1.6875rem;
}

/* Narrower text column on mobile, as in XD */
.offers p {
    max-width: 18em;
}

.intro-title {
    color: var(--color-lime);
    align-self: start;
}

.photo-credit {
    font-size: var(--fs-credit);
    font-style: italic;
    color: var(--color-lime);
}

.intro-text .photo-credit {
    margin-top: 2lh;
}

/* Container has its full 1440px from here on → credit fits on one line like in XD */
@media (min-width: 112.5rem) {
    .photo-credit {
        white-space: nowrap;
    }
}

/* Services list */
.services-list {
    margin-top: 0.75rem;
    font-size: var(--fs-services);
    font-weight: var(--fw-regular);
    font-style: italic;
    line-height: 1.875rem;
    color: var(--color-lime);
}

/* Individuals / Organisations */
.intro h3 {
    line-height: var(--lh-body);
}

.offers h3 + p {
    margin-top: 0.5lh;
}

.offers p + h3 {
    margin-top: 1.6lh;
}

/* DESKTOP */
@media (min-width: 64rem) {
    .intro-grid {
        row-gap: clamp(5rem, 7.45vw, 8.9375rem);
    }

    .intro-text,
    .services,
    .offers {
        margin-top: 0;
    }

    .offers p {
        max-width: none;
    }

    .services-list {
        margin-top: var(--space-s);
    }

    .intro-text .photo-credit {
        margin-top: 1lh;
    }

    .offers h3 + p {
        margin-top: 1lh;
    }

    .offers p + h3 {
        margin-top: 2lh;
    }

    .intro-title {
        justify-self: end;
    }

    .services {
        text-align: right;
    }

    .services-list {
        font-weight: var(--fw-medium);
        line-height: 2.23;
    }
}


/* ==========================================================================
   7. About (kitchen photo + bio)
   ========================================================================== */
/* MOBILE */
.about {
    padding-block: clamp(2.1875rem, 0.47rem + 5.23vw, 6.75rem);
}

.about-grid {
    row-gap: 1.75rem;
    color: var(--color-black);
}

/* Line break before "He is rich in friends." only exists in the desktop design */
.about-text br {
    display: none;
}

/* DESKTOP */
@media (min-width: 64rem) {
    .about-grid {
        align-items: center;
        color: var(--color-dark);
    }

    .about-text br {
        display: initial;
    }
}


/* ==========================================================================
   8. Journey (downloads)
   ========================================================================== */
/* MOBILE */
.journey {
    padding-block: max(3.3125rem, var(--section-padding)) 5.75rem;
    background-color: var(--color-light);
}

.journey-grid {
    --journey-gap: clamp(3rem, 9.5vw, 11.375rem);
    display: grid;
    row-gap: 2.75rem;
}

.journey-note {
    margin-inline: calc(-1 * var(--gutter));
    padding: 0.3rem var(--gutter);
    background-color: var(--color-lime);
    font-size: clamp(0.875rem, 0.8rem + 0.27vw, 1.125rem);
    font-style: italic;
    line-height: var(--lh-small);
}

.downloads {
    display: grid;
    row-gap: clamp(2rem, 1.3rem + 2.83vw, 4.6875rem);
    padding-left: 1.25rem;
}

.download-link {
    display: flex;
    align-items: center;
    gap: 2.25rem;
    font-size: var(--fs-body);
    text-decoration: none;
}

.download-link img {
    flex-shrink: 0;
    width: 3.5rem;
}

.download-link:hover span {
    text-decoration: underline;
}

@media (prefers-reduced-motion: no-preference) {
    .download-link img {
        transition: transform 0.2s ease;
    }

    .download-link:hover img {
        transform: translateY(3px);
    }
}

/* DESKTOP */
@media (min-width: 64rem) {
    .journey {
        padding-block: clamp(6rem, 10.2vw, 12.25rem) clamp(5rem, 7.24vw, 8.6875rem);
    }

    .journey-grid {
        grid-template-columns: 1fr 1fr;
        column-gap: var(--journey-gap);
        row-gap: clamp(2.5rem, 5.26vw, 6.3125rem);
        align-items: center;
        padding-left: clamp(0rem, 4.48vw, 5.375rem);
    }

    .journey-note {
        margin-inline: 0;
        padding: 0.85rem 1.5rem;
        line-height: var(--lh-base);
        text-align: center;
    }

    .downloads {
        grid-column: 1 / -1;
        grid-template-columns: subgrid;
        grid-template-rows: repeat(5, auto);
        grid-auto-flow: column;
        padding-left: 0;
    }

    .downloads li:nth-child(-n + 5) {
        padding-left: calc(var(--accent-bar-width) + var(--accent-bar-gap));
    }

    .download-link {
        flex-direction: row-reverse;
        justify-content: space-between;
        max-width: 27.5rem;
    }
}


/* ==========================================================================
   9. Clients (logos + quotes)
   ========================================================================== */
/* MOBILE */
.clients {
    padding-block: clamp(4.75rem, 1.56rem + 5.37vw, 8rem) clamp(4.875rem, 1.56rem + 5.37vw, 6.6875rem);
    background-color: var(--color-stone);
}

/* Free composition from XD: the logo block has a fixed size (--bw × --bh px),
   every logo is placed by its XD position in px and scales with the block */
.client-logos {
    --bw: 357;
    --bh: 246;
    position: relative;
    aspect-ratio: var(--bw) / var(--bh);
    max-width: 68.75rem;
    margin-inline: auto;
}

.client-logos li {
    position: absolute;
    left: calc(var(--x) / var(--bw) * 100%);
    top: calc(var(--y) / var(--bh) * 100%);
    width: calc(var(--w) / var(--bw) * 100%);
}

.client-logos img {
    width: 100%;
}

.client-logos li:nth-child(1)  { --x: 0;   --y: 0;   --w: 78; }  /* BASF */
.client-logos li:nth-child(2)  { --x: 94;  --y: 0;   --w: 77; }  /* Vodafone */
.client-logos li:nth-child(3)  { --x: 186; --y: 52;  --w: 77; }  /* Commerzbank */
.client-logos li:nth-child(4)  { --x: 279; --y: 0;   --w: 77; }  /* Toyota */
.client-logos li:nth-child(5)  { --x: 186; --y: 194; --w: 78; }  /* John Deere */
.client-logos li:nth-child(6)  { --x: 0;   --y: 67;  --w: 77; }  /* DEKRA */
.client-logos li:nth-child(7)  { --x: 95;  --y: 102; --w: 76; }  /* BMW */
.client-logos li:nth-child(8)  { --x: 279; --y: 154; --w: 78; }  /* BT */
.client-logos li:nth-child(9)  { --x: 279; --y: 95;  --w: 78; }  /* FEIG */
.client-logos li:nth-child(10) { --x: 1;   --y: 202; --w: 76; }  /* Mercedes-Benz */
.client-logos li:nth-child(11) { --x: 0;   --y: 135; --w: 78; }  /* SICK */
.client-logos li:nth-child(12) { --x: 186; --y: 0;   --w: 78; }  /* Freudenberg */
.client-logos li:nth-child(13) { --x: 186; --y: 137; --w: 78; }  /* WIKA */
.client-logos li:nth-child(14) { --x: 279; --y: 228; --w: 75; }  /* Deutsche Rück */
.client-logos li:nth-child(15) { --x: 96;  --y: 227; --w: 75; }  /* Allianz */

.quotes {
    display: grid;
    row-gap: var(--space-l);
    margin-top: clamp(4.3125rem, 1.27rem + 6.44vw, 9rem);
}

.quote {
    display: flex;
    flex-direction: column;
}

.quote blockquote {
    flex-grow: 1;
}

.quote p {
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    font-size: var(--fs-cite);
    font-style: italic;
    line-height: var(--lh-body);
    /* one lime bar per text line, 3px gap between lines (split above/below so the text stays centered) */
    background: linear-gradient(transparent 1.5px, var(--color-lime) 1.5px calc(100% - 1.5px), transparent 0) 0 0 / 100% 1lh;
}

.quote figcaption {
    margin-top: clamp(0.5rem, 0.36rem + 0.54vw, 1rem);
    font-size: var(--fs-cite);
}

/* DESKTOP */
@media (min-width: 64rem) {
    .client-logos {
        --bw: 1100;
        --bh: 412;
    }

    .client-logos li:nth-child(1)  { --x: 0;   --y: 0;   --w: 184.75; }  /* BASF */
    .client-logos li:nth-child(2)  { --x: 222; --y: 0;   --w: 184.5;  }  /* Vodafone */
    .client-logos li:nth-child(3)  { --x: 443; --y: 0;   --w: 184.75; }  /* Commerzbank */
    .client-logos li:nth-child(4)  { --x: 665; --y: 0;   --w: 184.75; }  /* Toyota */
    .client-logos li:nth-child(5)  { --x: 915; --y: 0;   --w: 184.75; }  /* John Deere */
    .client-logos li:nth-child(6)  { --x: 0;   --y: 174; --w: 184.5;  }  /* DEKRA */
    .client-logos li:nth-child(7)  { --x: 226; --y: 231; --w: 179.5;  }  /* BMW */
    .client-logos li:nth-child(8)  { --x: 415; --y: 181; --w: 184.75; }  /* BT */
    .client-logos li:nth-child(9)  { --x: 665; --y: 190; --w: 184.75; }  /* FEIG */
    .client-logos li:nth-child(10) { --x: 915; --y: 188; --w: 184.75; }  /* Mercedes-Benz */
    .client-logos li:nth-child(11) { --x: 0;   --y: 336; --w: 184.75; }  /* SICK */
    .client-logos li:nth-child(12) { --x: 623; --y: 290; --w: 227;    }  /* Freudenberg */
    .client-logos li:nth-child(13) { --x: 443; --y: 348; --w: 184.75; }  /* WIKA */
    .client-logos li:nth-child(14) { --x: 670; --y: 368; --w: 179.5;  }  /* Deutsche Rück */
    .client-logos li:nth-child(15) { --x: 921; --y: 364; --w: 179.5;  }  /* Allianz */

    .quotes {
        grid-template-columns: repeat(2, minmax(0, 36.625rem));
        grid-template-rows: repeat(2, auto);
        grid-auto-flow: column;
        justify-content: space-between;
        row-gap: 5rem;
    }

    .quote p {
        margin-inline: 0;
        padding-inline: 3.125rem 2.5rem;
    }

    .quote figcaption {
        padding-left: 3.125rem;
    }
}


/* ==========================================================================
   10. Footer
   ========================================================================== */
/* MOBILE */
/* Logo hangs over the top edge of the dark band (mobile) / out of its bottom edge (desktop), as in XD */
.site-footer {
    padding-block: 1.625rem 3.3125rem;
    border-bottom: 1.9375rem solid var(--color-stone);  /* grey bar at the very bottom (mobile only, as in XD) */
    background: linear-gradient(var(--color-white) 8.875rem, var(--color-dark) 0);
    color: var(--color-lime);
    font-size: var(--fs-credit);
    line-height: 1.25rem;
}

.footer-grid {
    display: grid;
    row-gap: 1.875rem;
    align-items: start;
}

.footer-logo-link {
    justify-self: start;
    margin-bottom: 0.625rem;
}

.footer-logo {
    width: 10.625rem;
}

.footer-address {
    font-style: normal;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.linkedin-link {
    margin-top: 0.625rem;
}

.footer-contact a[href^="tel:"] {
    text-decoration: none;
}

.email-button {
    padding: 0.4rem 1rem;
    border: 1.5px solid currentColor;
    border-radius: 999px;
    font-weight: var(--fw-medium);
    text-decoration: none;
}

.email-button:hover {
    background-color: var(--color-lime);
    color: var(--color-dark);
}

.legal-links {
    display: grid;
    row-gap: 1.25rem;
}

.copyright {
    margin-top: clamp(2.25rem, 1.65rem + 2.2vw, 4.25rem);
    color: var(--color-white);
}

/* DESKTOP */
@media (min-width: 64rem) {
    .site-footer {
        border-bottom: 0;
    }

    .footer-logo-link {
        margin-bottom: 0;
    }

    .footer-contact {
        gap: 1.1875rem;
    }

    .linkedin-link {
        margin-top: 0.5rem;
    }

    .site-footer {
        padding-block: 3.5625rem 3.8125rem;
        background: linear-gradient(var(--color-dark) 18.25rem, var(--color-white) 0);
    }

    .footer-grid {
        grid-template-columns: 487fr 244fr 367fr 340fr;
    }

    .footer-logo {
        width: clamp(10.625rem, 17.7vw, 21.25rem);
    }

    .footer-address,
    .footer-contact,
    .footer-legal {
        margin-top: 2.3125rem;
    }
}
