/* ==========================================================================
   OPUS Logistic – Teaser-Seite
   ========================================================================== */

:root {
    --color-bg: #000;
    --color-surface: #fff;
    --color-text: #333;
    --color-text-dark: #000;
    --color-text-invert: #fff;
    --color-overlay: #545454;

    --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-heading: "Poppins", "Helvetica Neue", Helvetica, Arial, sans-serif;

    --indent-text: 250px;   /* Einzug der Textblöcke auf großen Screens */
    --indent-card: 200px;   /* Einzug der weißen Karten */
    --gutter: 20px;
}

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

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

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.43;
}

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

/* --------------------------------------------------------------------------
   Hilfsklassen
   -------------------------------------------------------------------------- */

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10;
    padding: 12px 20px;
    background: var(--color-surface);
    color: var(--color-text-dark);
    font-size: 16px;
}

.skip-link:focus {
    left: 0;
}

/* --------------------------------------------------------------------------
   Seitenfläche mit Hintergrundbild und Verlauf
   -------------------------------------------------------------------------- */

.page {
    position: relative;
    display: block;
    min-height: 1200px;
    padding: 100px var(--gutter) 200px;
    background-color: var(--color-bg);
    background-image: url(../img/icon-background.png);
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
}

.page::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
        to top,
        var(--color-overlay) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
}

.page__inner {
    position: relative;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   Hero mit Schreibmaschinen-Überschrift
   -------------------------------------------------------------------------- */

.hero {
    margin: 39px var(--gutter) 20px var(--indent-text);
}

.hero__headline {
    margin: 0;
    color: var(--color-text-invert);
    font-family: var(--font-heading);
    font-size: clamp(40px, 7vw, 80px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.5px;
    overflow-wrap: break-word;
}

.typewriter__caret {
    font-weight: 400;
    animation: caret-blink 0.9s steps(1) infinite;
}

@keyframes caret-blink {
    0%,
    49% {
        opacity: 1;
    }
    50%,
    100% {
        opacity: 0;
    }
}

/* --------------------------------------------------------------------------
   Einleitung mit Telefonnummer und E-Mail
   -------------------------------------------------------------------------- */

.intro {
    margin: 70px var(--gutter) 20px var(--indent-text);
    color: var(--color-text-invert);
}

.intro__lead {
    margin: 0 0 22px;
    font-size: 14px;
}

.intro__contact {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.5;
}

.intro__link {
    color: inherit;
    text-decoration: none;
}

.intro__link:hover,
.intro__link:focus-visible {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Weiße Infokarten
   -------------------------------------------------------------------------- */

.cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    margin-top: 50px;
}

.card {
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 18px;
    line-height: 1.43;
}

.card--muc {
    margin: 0 40px 0 var(--indent-card);
    padding: 20px;
}

.card--other {
    margin: 0 var(--indent-card) 0 0;
    padding: 20px 20px 20px 50px;
}

.card p {
    margin: 0 0 1.6em;
}

.card p:last-child {
    margin-bottom: 0;
}

.card a {
    color: var(--color-text-dark);
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: break-word;
}

.card a:hover,
.card a:focus-visible {
    text-decoration: underline;
}

.card__phone,
.card__mail {
    color: var(--color-text-dark);
    font-weight: 700;
}

.card__thanks {
    margin: 10px 0 20px;
    color: var(--color-text-dark);
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
}

.card__thanks + .card__thanks {
    margin-top: 0;
}

/* --------------------------------------------------------------------------
   Rechtliche Links
   -------------------------------------------------------------------------- */

.legal {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin: 70px var(--gutter) 0 var(--indent-text);
}

.button {
    display: inline-block;
    width: 200px;
    max-width: 100%;
    padding: 12px 24px;
    border: 1px solid var(--color-text-dark);
    border-radius: 4px;
    background: var(--color-text-dark);
    color: var(--color-text-invert);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.button:hover,
.button:focus-visible {
    background: var(--color-surface);
    border-color: var(--color-surface);
    color: var(--color-text-dark);
}

/* --------------------------------------------------------------------------
   Einblend-Animationen
   -------------------------------------------------------------------------- */

.reveal {
    opacity: 0;
    animation: reveal-fade 1.2s ease forwards;
}

.reveal--up {
    animation-name: reveal-up;
}

.cards .card:nth-child(2) {
    animation-delay: 0.2s;
}

.legal {
    animation-delay: 0.3s;
}

@keyframes reveal-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes reveal-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 1200px) {
    :root {
        --indent-text: 120px;
        --indent-card: 100px;
    }
}

@media (max-width: 921px) {
    :root {
        --indent-text: 40px;
        --indent-card: 40px;
    }

    .card--other {
        padding-left: 20px;
    }
}

@media (max-width: 768px) {
    :root {
        --indent-text: 0px;
        --indent-card: 0px;
    }

    .page {
        min-height: 0;
        padding: 70px var(--gutter) 100px;
    }

    .hero {
        margin: 0;
    }

    .intro {
        margin: 40px 0 0;
    }

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

    .card--muc,
    .card--other {
        margin: 0 0 50px;
        padding: 20px;
    }

    .card--other {
        margin-bottom: 0;
    }

    .legal {
        margin: 50px 0 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        animation: none;
    }

    .typewriter__caret {
        animation: none;
    }

    .button {
        transition: none;
    }
}
