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

:root {
    --color-arbeitsschutz: #d5112f;
    --color-medizintechnik: #009540;
    --color-weiterbildung: #0077b3;
    --color-text: #fff;
    --color-rule: rgb(255 255 255 / 25%);

    /* Figma frame: 1728px wide, 112px side margins */
    --page-max: 1728px;
    --gutter: clamp(20px, 6.48vw, 112px);
}

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

html {
    background: #3a3a3a;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.21;
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    display: block;
}

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

a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

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

/* ---------- Page & background ---------- */

/* Frame fills in Figma: video at 20 % over the light canvas, covered by 73 % black */
.page {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    background: #f5f5f5;
}

.page__video,
.page::after {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.page__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
    pointer-events: none;
}

.page::after {
    content: "";
    background: rgb(0 0 0 / 73%);
}

.container {
    width: 100%;
    max-width: var(--page-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

main {
    flex: 1;
}

.rule {
    height: 1px;
    margin: 0 0 -1px;
    border: 0;
    background: var(--color-rule);
}

/* ---------- Logo (three SVG layers, positioned as in Figma) ---------- */

.logo {
    position: relative;
    display: block;
    flex: none;
    width: 355px;
    height: 65px;
}

.logo--small {
    width: 190px;
    height: 35px;
}

.logo img {
    position: absolute;
}

.logo__mark {
    top: 0;
    left: 0;
}

.logo__wordmark {
    top: 21.37%;
    left: 37.68%;
}

.logo__tagline {
    top: 57.72%;
    left: 37.98%;
}

/* ---------- Header ---------- */

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px 48px;
    padding-top: 78px;
    padding-bottom: 53px;
}

.brand-nav {
    margin-top: 16px;
}

.brand-nav__list {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 68px;
}

.brand-nav a {
    display: block;
    transition: opacity 0.2s ease;
}

.brand-nav a:hover {
    opacity: 0.75;
}

/* ---------- Intro ---------- */

.intro {
    padding-top: 96px;
    padding-bottom: 104px;
}

.intro__headline {
    max-width: 1232px;
    margin: 0;
    font-size: clamp(24px, 16px + 1.6vw, 36px);
    font-weight: 700;
}

.intro__text {
    max-width: 1121px;
    margin: 70px 0 0;
    font-size: clamp(18px, 14px + 1vw, 24px);
}

/* ---------- Cards ---------- */

.cards {
    display: grid;
    grid-template-columns: 327px 328px 327px;
    gap: 37px;
    margin-top: 71px;
}

.card {
    --card-color: var(--color-arbeitsschutz);

    display: flex;
    flex-direction: column;
    height: 218px;
    border: 3px solid var(--card-color);
    border-bottom-right-radius: 40px;
    overflow: hidden;
    transition: background-color 0.2s ease;
}

.card--medizintechnik {
    --card-color: var(--color-medizintechnik);
}

.card--weiterbildung {
    --card-color: var(--color-weiterbildung);
}

.card:hover {
    background-color: rgb(255 255 255 / 6%);
}

.card__title {
    display: flex;
    flex: 1;
    align-items: flex-end;
    padding: 0 32px 16px;
    font-size: 24px;
    font-weight: 700;
}

.card__cta {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 3px 32px 0;
    background: var(--card-color);
    font-size: 14px;
}

.card__arrow {
    transition: transform 0.2s ease;
}

.card:hover .card__arrow,
.card:focus-visible .card__arrow {
    transform: translateX(6px);
}

/* ---------- Footer ---------- */

.site-footer__grid {
    display: grid;
    grid-template-columns: 715fr 321fr 238fr 230fr;
    padding-top: 44px;
    padding-bottom: 58px;
    line-height: 24px;
}

.site-footer__brand {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
}

.site-footer__brand .logo {
    margin-top: -2px;
}

.site-footer__copyright {
    margin: 0;
    font-size: 14px;
}

.site-footer__address {
    font-style: normal;
}

.site-footer__links--strong {
    font-weight: 700;
}

.site-footer a:not(.logo):hover {
    text-decoration: underline;
}

/* ---------- Optical offsets taken 1:1 from the Figma frame ---------- */

@media (min-width: 1280px) {
    .site-header__logo {
        margin-left: -3px;
    }

    .brand-nav {
        margin-right: -1px;
    }

    .intro__headline {
        margin-left: -8px;
    }

    .cards,
    .site-footer__brand .logo {
        margin-left: 3px;
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 1279px) {
    .intro__headline br {
        display: none;
    }

    .cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
    }

    .site-footer__grid {
        grid-template-columns: 2fr 1.4fr 1fr 1.2fr;
        column-gap: 24px;
    }
}

@media (max-width: 899px) {
    .site-header {
        padding-top: 40px;
        padding-bottom: 32px;
    }

    .brand-nav {
        margin-top: 0;
    }

    .brand-nav__list {
        column-gap: 32px;
    }

    .intro {
        padding-top: 56px;
        padding-bottom: 64px;
    }

    .cards {
        grid-template-columns: minmax(0, 1fr);
        max-width: 420px;
        margin-top: 48px;
    }

    .intro__text {
        margin-top: 48px;
    }

    .site-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px 24px;
        padding-top: 32px;
        padding-bottom: 40px;
    }

    .site-footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 419px) {
    .site-header__logo {
        zoom: 0.8;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
