/* ==========================================================================
   legal.css — Klimaanlage Pro
   Shared stylesheet for the Impressum and Datenschutz legal pages (leg-* BEM).
   Loaded AFTER main.css, so it can rely on the --kp-* design tokens and
   override globals where needed (e.g. heading colours on dark bands).
   Climate aesthetic: white cards, deep-navy + azure accents, ice tints,
   warm-orange CTA accent, rounded corners, soft shadows.
   Responsive 1920px -> 375px. Comments in English only.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page shell
   -------------------------------------------------------------------------- */
.page-legal {
    background: var(--kp-bg);
}

/* --------------------------------------------------------------------------
   Hero — dark navy band. The site header is STICKY (not fixed), so the hero
   only needs a MODEST top padding, not the large offset a fixed header needs.
   -------------------------------------------------------------------------- */
.leg-hero {
    position: relative;
    background:
        radial-gradient(900px 420px at 88% -30%, rgba(217, 83, 30, 0.45), transparent 60%),
        linear-gradient(135deg, var(--kp-char) 0%, var(--kp-char-2) 100%);
    color: rgba(255, 255, 255, 0.86);
    padding: 54px 0 64px;
    overflow: hidden;
}

/* subtle ice glow in the corner */
.leg-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -160px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242, 215, 191, 0.18), transparent 70%);
    pointer-events: none;
}

.leg-hero__container {
    position: relative;
    z-index: 1;
    max-width: var(--kp-maxw);
    margin: 0 auto;
    padding: 0 24px;
}

.leg-hero__breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.62);
    margin-bottom: 22px;
    min-width: 0;
}

.leg-hero__breadcrumb a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    transition: color 0.18s ease;
}

.leg-hero__breadcrumb a:hover {
    color: #fff;
}

.leg-hero__breadcrumb-sep {
    color: rgba(255, 255, 255, 0.38);
}

.leg-hero__content {
    max-width: 760px;
    min-width: 0;
}

/* dark band: force white heading (global rule paints h1-h4 dark) */
.leg-hero__title {
    color: #fff;
    font-family: var(--kp-display);
    font-weight: 800;
    font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
    line-height: 1.1;
    margin: 0 0 14px;
    letter-spacing: -0.02em;
    overflow-wrap: break-word;
}

.leg-hero__subtitle {
    font-size: clamp(1rem, 0.95rem + 0.3vw, 1.18rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
    overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   Main — narrow reading container (~820px) on top of the page background
   -------------------------------------------------------------------------- */
.leg-main {
    padding: 56px 0 80px;
}

.leg-main__container {
    max-width: var(--kp-maxw);
    margin: 0 auto;
    padding: 0 24px;
}

.leg-content {
    max-width: 820px;
    margin: 0 auto;
    min-width: 0;
}

/* --------------------------------------------------------------------------
   Section
   -------------------------------------------------------------------------- */
.leg-section {
    margin-bottom: 44px;
    scroll-margin-top: 130px; /* anchor offset under sticky header */
}

.leg-section:last-child {
    margin-bottom: 0;
}

.leg-section__title {
    font-family: var(--kp-display);
    font-weight: 700;
    font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem);
    color: var(--kp-char);
    line-height: 1.25;
    margin: 0 0 20px;
    padding-bottom: 14px;
    position: relative;
    overflow-wrap: break-word;
}

/* azure -> warm underline accent */
.leg-section__title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--kp-ember), var(--kp-ember));
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.leg-card {
    background: var(--kp-surface);
    border: 1px solid var(--kp-line);
    border-radius: var(--kp-radius);
    box-shadow: var(--kp-shadow-sm);
    padding: 26px 28px;
    margin-bottom: 18px;
    min-width: 0;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.leg-card:hover {
    box-shadow: var(--kp-shadow);
    border-color: #F2D7BF;
}

.leg-card__title {
    font-family: var(--kp-display);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--kp-char);
    margin: 0 0 12px;
    line-height: 1.3;
    overflow-wrap: break-word;
}

.leg-card__body {
    min-width: 0;
}

.leg-card__body > p {
    margin: 0 0 12px;
    color: var(--kp-ink-soft);
    line-height: 1.7;
    overflow-wrap: break-word;
}

.leg-card__body > p:last-child {
    margin-bottom: 0;
}

.leg-card__body strong {
    color: var(--kp-ink);
    font-weight: 600;
}

.leg-card__body em {
    color: var(--kp-ink-soft);
    font-style: italic;
}

/* --------------------------------------------------------------------------
   Lists
   -------------------------------------------------------------------------- */
.leg-list {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.leg-list li {
    position: relative;
    padding-left: 28px;
    color: var(--kp-ink-soft);
    line-height: 1.6;
    min-width: 0;
    overflow-wrap: break-word;
}

.leg-list li strong {
    color: var(--kp-ink);
    font-weight: 600;
}

/* default bullet: azure dot */
.leg-list li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 0.6em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--kp-ember);
}

/* check variant — azure check glyph via mask */
.leg-list--check li::before {
    content: "";
    left: 4px;
    top: 0.32em;
    width: 16px;
    height: 16px;
    border-radius: 0;
    background: var(--kp-ember);
    -webkit-mask: url("/assets/icons/check.svg") center / contain no-repeat;
            mask: url("/assets/icons/check.svg") center / contain no-repeat;
}

/* numbered variant */
.leg-list--numbered {
    counter-reset: leg-num;
    gap: 12px;
}

.leg-list--numbered li {
    padding-left: 38px;
}

.leg-list--numbered li::before {
    counter-increment: leg-num;
    content: counter(leg-num);
    left: 0;
    top: 0.1em;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: var(--kp-ember-soft);
    color: var(--kp-ember-d);
    font-family: var(--kp-display);
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   Contact block (definition-style key/value rows)
   -------------------------------------------------------------------------- */
.leg-contact {
    display: grid;
    gap: 12px;
}

.leg-contact__item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 8px 16px;
    align-items: start;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--kp-line);
    min-width: 0;
}

.leg-contact__item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.leg-contact__label {
    font-weight: 600;
    color: var(--kp-char);
    min-width: 0;
    overflow-wrap: break-word;
}

.leg-contact__value {
    color: var(--kp-ink-soft);
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

a.leg-contact__value {
    color: var(--kp-ember-d);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.18s ease;
}

a.leg-contact__value:hover {
    color: var(--kp-ember);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Table of contents
   -------------------------------------------------------------------------- */
.leg-toc {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 24px;
}

.leg-toc li {
    min-width: 0;
}

.leg-toc a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--kp-radius-sm);
    background: var(--kp-surface-2);
    color: var(--kp-char);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid transparent;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    overflow-wrap: break-word;
}

.leg-toc a:hover {
    background: var(--kp-ember-soft);
    color: var(--kp-ember-d);
    border-color: #F2D7BF;
}

/* --------------------------------------------------------------------------
   Highlight callout
   -------------------------------------------------------------------------- */
.leg-highlight {
    background: linear-gradient(135deg, var(--kp-ember-soft), #fff 75%);
    border: 1px solid var(--kp-ember);
    border-left: 4px solid var(--kp-ember);
    border-radius: var(--kp-radius);
    padding: 22px 26px;
    margin-bottom: 18px;
    box-shadow: var(--kp-shadow-sm);
    min-width: 0;
}

.leg-highlight__title {
    font-family: var(--kp-display);
    font-weight: 700;
    color: var(--kp-ember-d);
    font-size: 1.08rem;
    margin: 0 0 8px;
    overflow-wrap: break-word;
}

.leg-highlight p {
    margin: 0 0 8px;
    color: var(--kp-ink-soft);
    line-height: 1.7;
    overflow-wrap: break-word;
}

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

.leg-highlight strong {
    color: var(--kp-ink);
    font-weight: 600;
}

.leg-highlight a {
    color: var(--kp-ember-d);
    font-weight: 600;
}

/* info variant: azure / ice instead of warm */
.leg-highlight--info {
    background: linear-gradient(135deg, var(--kp-ember-soft), #fff 75%);
    border-color: #F2D7BF;
    border-left-color: var(--kp-ember);
}

.leg-highlight--info .leg-highlight__title {
    color: var(--kp-ember-d);
}

.leg-highlight--info a {
    color: var(--kp-ember-d);
}

/* --------------------------------------------------------------------------
   Inline links inside copy
   -------------------------------------------------------------------------- */
.leg-link {
    color: var(--kp-ember-d);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
    transition: color 0.18s ease;
    overflow-wrap: break-word;
    word-break: break-word;
}

.leg-link:hover {
    color: var(--kp-ember);
}

/* --------------------------------------------------------------------------
   Note (muted small print)
   -------------------------------------------------------------------------- */
.leg-note {
    margin-top: 14px;
    padding: 12px 16px;
    background: var(--kp-surface-2);
    border-radius: var(--kp-radius-sm);
    font-size: 0.9rem;
    color: var(--kp-ink-soft);
    line-height: 1.6;
    overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   Footer note (validity / last-updated stamp) — dark navy band
   -------------------------------------------------------------------------- */
.leg-footer-note {
    margin-top: 22px;
    padding: 20px 24px;
    background: var(--kp-char);
    border-radius: var(--kp-radius);
    color: rgba(255, 255, 255, 0.82);
    min-width: 0;
}

.leg-footer-note p {
    margin: 0 0 6px;
    line-height: 1.6;
    overflow-wrap: break-word;
}

.leg-footer-note p:last-child {
    margin-bottom: 0;
}

.leg-footer-note strong {
    color: #fff;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Responsive — 1200 / 1024 / 768 / 480 / 375
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .leg-hero__container,
    .leg-main__container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 1024px) {
    .leg-hero {
        padding: 46px 0 54px;
    }

    .leg-main {
        padding: 44px 0 64px;
    }
}

@media (max-width: 768px) {
    .leg-hero {
        padding: 40px 0 46px;
    }

    .leg-main {
        padding: 36px 0 52px;
    }

    .leg-section {
        margin-bottom: 36px;
    }

    .leg-card {
        padding: 22px 20px;
    }

    .leg-highlight {
        padding: 20px 20px;
    }

    /* stack key/value rows */
    .leg-contact__item {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .leg-contact__label {
        font-size: 0.92rem;
    }

    /* single-column TOC */
    .leg-toc {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .leg-hero {
        padding: 36px 0 40px;
    }

    .leg-hero__breadcrumb {
        margin-bottom: 16px;
        font-size: 0.8rem;
    }

    .leg-main__container,
    .leg-hero__container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .leg-card {
        padding: 18px 16px;
        border-radius: var(--kp-radius-sm);
    }

    .leg-card__title {
        font-size: 1.02rem;
    }

    .leg-highlight {
        padding: 18px 16px;
        border-radius: var(--kp-radius-sm);
    }

    .leg-footer-note {
        padding: 18px 18px;
        border-radius: var(--kp-radius-sm);
    }

    .leg-list--numbered li {
        padding-left: 34px;
    }
}

@media (max-width: 375px) {
    .leg-hero__title {
        font-size: 1.85rem;
    }

    .leg-card {
        padding: 16px 14px;
    }

    .leg-main__container,
    .leg-hero__container {
        padding-left: 14px;
        padding-right: 14px;
    }
}
