/* ImmoWest Gruppe */

:root {
    --bg: #1f2428;
    --text: #ffffff;
    --text-soft: #d5d9dc;
    --text-muted: #9fa6ab;
    --line: rgb(255 255 255 / 0.12);
    --hover: rgb(255 255 255 / 0.045);

    --orange: #ff9c0e;
    --grey: #8c8d8f;
    --pink: #fd4377;

    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --gutter: clamp(1.25rem, 4vw, 2rem);

    color-scheme: dark;
}

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

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

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font: 400 1rem/1.65 var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
}

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

.skip-link {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    background: var(--text);
    color: var(--bg);
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

/* ---------- Startseite ---------- */

.portal {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(3rem, 10vh, 6.5rem);
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: clamp(3rem, 10vh, 6rem) var(--gutter) clamp(2rem, 6vh, 4rem);
}

.portal__brand {
    width: min(76vw, 30rem);
    margin: 0;
}

.portal__brand img {
    width: 100%;
}

.portal__companies {
    width: 100%;
}

.companies {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 4vw, 3.5rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.company {
    --accent: var(--grey);
    display: flex;
    justify-content: center;
}

.company--liegenschaft {
    --accent: var(--orange);
}

.company--material {
    --accent: var(--pink);
}

.company__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    max-width: 20rem;
    padding: 1.25rem 1rem 1rem;
    border-radius: 16px;
    color: inherit;
    text-decoration: none;
}

.company__card img {
    width: 100%;
}

.company__status {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-transform: uppercase;
}

a.company__card .company__status {
    color: var(--accent);
}

.company__arrow {
    display: inline-block;
}

a.company__card:focus-visible {
    outline-color: var(--accent);
    outline-offset: 4px;
}

@media (hover: hover) {
    a.company__card,
    .company__arrow {
        transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.3s ease;
    }

    a.company__card:hover {
        background-color: var(--hover);
        transform: translateY(-6px);
    }

    a.company__card:hover .company__arrow {
        transform: translateX(4px);
    }
}

@media (max-width: 47.99em) {
    .companies {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 18rem;
        margin: 0 auto;
    }

    .company__card {
        gap: 1rem;
    }
}

/* ---------- Unterseiten ---------- */

.site-header {
    display: flex;
    justify-content: center;
    padding: 1.75rem var(--gutter) 1.5rem;
    border-bottom: 1px solid var(--line);
}

.site-header__logo {
    display: block;
    width: 8.5rem;
    border-radius: 4px;
}

.legal {
    flex: 1;
    width: 100%;
    max-width: 46rem;
    margin: 0 auto;
    padding: clamp(2.5rem, 7vw, 4.5rem) var(--gutter) 4rem;
    color: var(--text-soft);
    overflow-wrap: break-word;
    hyphens: auto;
}

.legal h1,
.legal h2,
.legal h3,
.legal h4 {
    color: var(--text);
    line-height: 1.25;
    hyphens: manual;
}

.legal h1 {
    margin: 0 0 2rem;
    font-size: clamp(1.9rem, 5vw, 2.6rem);
    letter-spacing: -0.015em;
}

.legal h2 {
    margin: 3rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-size: 1.3rem;
}

.legal h3 {
    margin: 2rem 0 0.6rem;
    font-size: 1.08rem;
}

.legal h4 {
    margin: 1.5rem 0 0.4rem;
    font-size: 1rem;
}

.legal p,
.legal ul,
.legal address {
    margin: 0 0 1rem;
}

.legal ul {
    padding-left: 1.25rem;
}

.legal li + li {
    margin-top: 0.4rem;
}

.legal address {
    font-style: normal;
}

.legal strong {
    color: var(--text);
}

.legal a {
    color: var(--orange);
    text-underline-offset: 0.2em;
}

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

.legal .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.55rem 1.15rem 0.55rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}

.legal .back-link--bottom {
    margin: 2.5rem 0 0;
}

@media (hover: hover) {
    .legal .back-link,
    .back-link__arrow {
        transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.3s ease, border-color 0.3s ease;
    }

    .legal .back-link:hover {
        border-color: rgb(255 255 255 / 0.3);
        background-color: var(--hover);
    }

    .legal .back-link:hover .back-link__arrow {
        transform: translateX(-3px);
    }
}

.legal__lead {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.legal--center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.legal .button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    background: var(--orange);
    color: var(--bg);
    font-weight: 600;
    text-decoration: none;
}

/* ---------- Seitenfuß ---------- */

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 2rem;
    padding: 1.5rem var(--gutter) calc(1.5rem + env(safe-area-inset-bottom));
    color: var(--text-muted);
    font-size: 0.85rem;
}

.page-legal .site-footer {
    border-top: 1px solid var(--line);
}

.site-footer__links {
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a {
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

.site-footer__copy {
    margin: 0;
}

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