/*!
 * Kündigungshilfe – Inhaltsseiten (Startseite, Vertragsarten, Kontakt, API, Fehler)
 */

.icon { width: 1.25em; height: 1.25em; flex: none; }

.eyebrow {
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--kh-primary);
    margin-bottom: .6em;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: .45em;
    font-size: .82rem;
    font-weight: 650;
    letter-spacing: .02em;
    padding: .35em .85em;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .22);
    margin-bottom: 18px;
}
.hero-kicker .icon { width: 1em; height: 1em; }

.page-hero { position: relative; overflow: hidden; }
.page-hero::after {
    content: "";
    position: absolute;
    right: -120px; top: -160px;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%);
    pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }

/* ---------- Startseite: Hero ---------- */

.home-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(900px 420px at 85% -10%, rgba(38, 194, 242, .45), transparent 60%),
        radial-gradient(700px 500px at -10% 110%, rgba(245, 158, 11, .18), transparent 60%),
        linear-gradient(135deg, var(--kh-hero-from), var(--kh-hero-to));
    padding: 56px 0 64px;
}
.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .7), transparent 85%);
    pointer-events: none;
}
.home-hero__grid {
    position: relative;
    display: grid;
    gap: 40px;
    align-items: center;
}
@media (min-width: 920px) {
    .home-hero { padding: 80px 0 88px; }
    .home-hero__grid { grid-template-columns: 1.15fr .85fr; gap: 56px; }
}
.home-hero h1 {
    color: #fff;
    font-size: clamp(2rem, 4.6vw, 3.25rem);
    line-height: 1.08;
    letter-spacing: -.03em;
    margin-bottom: .45em;
    max-width: 14em;
}
.home-hero__lead {
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    color: rgba(255, 255, 255, .88);
    max-width: 34em;
    margin-bottom: 28px;
}
.btn-hero-ghost {
    --btn-bg: rgba(255, 255, 255, .1);
    --btn-fg: #fff;
    --btn-border: rgba(255, 255, 255, .45);
    --btn-bg-hover: rgba(255, 255, 255, .2);
}
.hero-checks {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    padding: 0;
    margin: 28px 0 0;
    font-size: .94rem;
    color: rgba(255, 255, 255, .9);
}
.hero-checks li { display: inline-flex; align-items: center; gap: .45em; }
.hero-checks .icon {
    width: 1.3em; height: 1.3em;
    padding: .2em;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
}

/* Brief-Illustration */
.home-hero__visual { display: flex; justify-content: center; perspective: 1400px; }
.letter-card {
    position: relative;
    width: min(100%, 380px);
    aspect-ratio: 1 / 1.25;
    background: #fff;
    color: #1d2a36;
    border-radius: 10px;
    padding: 28px 30px;
    box-shadow: 0 30px 70px rgba(5, 25, 45, .45), 0 2px 0 rgba(255, 255, 255, .6) inset;
    transform: rotate(-3deg) rotateY(-6deg);
    font-family: var(--kh-font-letter);
    font-size: 11px;
    line-height: 1.45;
}
.letter-card::before {
    content: "";
    position: absolute;
    inset: 10px -12px -12px 12px;
    background: rgba(255, 255, 255, .45);
    border-radius: 10px;
    z-index: -1;
    transform: rotate(5deg);
}
.letter-card__sender { font-size: 8.5px; color: #6b7a88; border-bottom: 1px solid #c9d3dc; padding-bottom: 3px; display: inline-block; margin-top: 18%; }
.letter-card__to { margin-top: 8px; font-weight: 500; }
.letter-card__date { text-align: right; margin-top: 16px; color: #6b7a88; }
.letter-card__subject { font-weight: 700; margin-top: 10px; font-size: 12px; }
.letter-card__lines { margin-top: 12px; display: grid; gap: 7px; }
.letter-card__lines span { height: 6px; border-radius: 3px; background: #e6ecf1; }
.letter-card__lines span.short { width: 60%; }
.letter-card__sign { color: #1d3f73; margin-top: 16px; width: 55%; }
.letter-card__sign svg { width: 100%; height: auto; display: block; }
.letter-card__stamp {
    position: absolute;
    right: -18px; bottom: 34px;
    display: inline-flex; align-items: center; gap: .4em;
    background: var(--kh-success);
    color: #fff;
    font-family: var(--kh-font);
    font-size: 13px;
    font-weight: 700;
    padding: 9px 14px;
    border-radius: 999px;
    box-shadow: 0 12px 26px rgba(10, 70, 40, .35);
    transform: rotate(3deg);
}
.letter-card__stamp .icon { width: 16px; height: 16px; }
@media (max-width: 919px) {
    .home-hero__visual { display: none; }
}

/* ---------- Startseite: Abschnitte ---------- */

.home-section { padding: 64px 0; }
.home-section--alt { background: var(--kh-surface); border-top: 1px solid var(--kh-border); border-bottom: 1px solid var(--kh-border); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); letter-spacing: -.02em; }
.section-head p { font-size: 1.05rem; }
.section-more { margin-top: 28px; }

.steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    counter-reset: step;
}
.step-item {
    position: relative;
    background: var(--kh-surface);
    border: 1px solid var(--kh-border);
    border-radius: var(--kh-radius);
    padding: 22px 20px 20px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.step-item:hover { transform: translateY(-2px); box-shadow: var(--kh-shadow); border-color: color-mix(in srgb, var(--kh-primary) 30%, var(--kh-border)); }
.step-item h3 { font-size: 1.02rem; margin: 14px 0 6px; }
.step-item p { font-size: .9rem; color: var(--kh-muted); margin: 0; }
.step-num {
    position: absolute;
    top: 18px; right: 18px;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: color-mix(in srgb, var(--kh-primary) 14%, transparent);
    letter-spacing: -.04em;
}
.step-icon, .feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--kh-primary-soft);
    color: var(--kh-primary);
}
.step-icon .icon, .feature-icon .icon { width: 22px; height: 22px; }
.step-item:last-child { background: linear-gradient(135deg, var(--kh-primary), var(--kh-primary-strong)); border-color: transparent; color: #fff; }
.step-item:last-child h3 { color: #fff; }
.step-item:last-child p { color: rgba(255, 255, 255, .82); }
.step-item:last-child .step-icon { background: rgba(255, 255, 255, .16); color: #fff; }
.step-item:last-child .step-num { color: rgba(255, 255, 255, .22); }

.feature-grid {
    display: grid;
    gap: 28px 32px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.feature h3 { margin: 14px 0 6px; font-size: 1.08rem; }
.feature p { color: var(--kh-muted); margin: 0; font-size: .95rem; }

.partner-band {
    display: grid;
    gap: 32px;
    align-items: center;
}
@media (min-width: 900px) { .partner-band { grid-template-columns: 1.3fr 1fr; gap: 56px; } }
.partner-band h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.partner-band p { color: var(--kh-muted); }
.partner-banner {
    display: block;
    border-radius: var(--kh-radius);
    overflow: hidden;
    border: 1px solid var(--kh-border);
    background: var(--kh-surface-2);
    padding: 12px;
    transition: box-shadow .2s, transform .2s;
    opacity: .92;
}
.partner-banner:hover { box-shadow: var(--kh-shadow); transform: translateY(-2px); opacity: 1; }
.partner-banner img { display: block; width: 100%; height: auto; }

.seo-text { max-width: 820px; color: var(--kh-muted); }
.seo-text h2 { font-size: 1.3rem; color: var(--kh-text); }

/* ---------- Vertragsarten ---------- */

.sparten-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 28px;
}
.search-field {
    position: relative;
    flex: 1 1 280px;
    margin: 0;
    font-weight: 400;
}
.search-field > .icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--kh-muted);
    width: 18px; height: 18px;
    pointer-events: none;
}
.search-field .form-control { padding-left: 2.6em; }

.sparten-group + .sparten-group { margin-top: 36px; }
.sparten-heading { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; }
.sparten-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}
.sparten-grid--compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.sparte-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    padding: 14px 16px;
    background: var(--kh-surface);
    border: 1px solid var(--kh-border);
    border-radius: var(--kh-radius);
    color: var(--kh-text);
    text-decoration: none;
    font-weight: 600;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.home-section--alt .sparte-tile { background: var(--kh-surface-2); }
.sparte-tile:hover, .sparte-tile:focus-visible {
    color: var(--kh-text);
    border-color: color-mix(in srgb, var(--kh-primary) 45%, var(--kh-border));
    box-shadow: var(--kh-shadow);
    transform: translateY(-1px);
}
.sparte-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 42px; height: 42px;
    border-radius: 11px;
    background: var(--kh-primary-soft);
    color: var(--kh-primary);
    transition: background .15s, color .15s;
}
.sparte-icon .icon { width: 22px; height: 22px; }
.sparte-tile:hover .sparte-icon { background: var(--kh-primary); color: var(--kh-on-primary); }
.sparte-text { flex: 1; line-height: 1.3; }
.sparte-arrow { color: var(--kh-border-strong); display: inline-flex; transition: transform .15s, color .15s; }
.sparte-arrow .icon { width: 18px; height: 18px; }
.sparte-tile:hover .sparte-arrow { color: var(--kh-primary); transform: translateX(3px); }

.sparten-empty { margin-top: 20px; }

.info-strip {
    display: grid;
    gap: 14px;
    margin-top: 44px;
    padding: 20px;
    border-radius: var(--kh-radius);
    background: var(--kh-primary-soft);
    color: var(--kh-primary-strong);
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.info-strip > div { display: flex; gap: 12px; align-items: center; font-size: .94rem; }
.info-strip .icon { width: 24px; height: 24px; }

/* ---------- Kontakt ---------- */

.contact-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .contact-layout { grid-template-columns: 1.6fr 1fr; } }
.contact-aside { display: grid; gap: 12px; }
.contact-tile {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px;
    background: var(--kh-surface);
    border: 1px solid var(--kh-border);
    border-radius: var(--kh-radius);
    color: var(--kh-text);
    text-decoration: none;
    font-size: .94rem;
}
a.contact-tile:hover { color: var(--kh-text); border-color: color-mix(in srgb, var(--kh-primary) 40%, var(--kh-border)); box-shadow: var(--kh-shadow); }
.contact-tile__icon {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--kh-primary-soft); color: var(--kh-primary);
}
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- API-Dokumentation ---------- */

.docs-layout { display: grid; gap: 28px; align-items: start; }
@media (min-width: 980px) { .docs-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 40px; } }
.docs-toc__inner {
    background: var(--kh-surface);
    border: 1px solid var(--kh-border);
    border-radius: var(--kh-radius);
    padding: 16px;
}
@media (min-width: 980px) { .docs-toc__inner { position: sticky; top: 92px; } }
.docs-toc__title { display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--kh-muted); margin: 0 0 8px 10px; }
.docs-toc ul { list-style: none; margin: 0 0 14px; padding: 0; }
.docs-toc a {
    display: block;
    padding: 7px 10px;
    border-radius: 8px;
    color: var(--kh-muted);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 550;
    border-left: 2px solid transparent;
}
.docs-toc a:hover { background: var(--kh-surface-3); color: var(--kh-text); }
.docs-toc a.active { color: var(--kh-primary); background: var(--kh-primary-soft); }
@media (max-width: 979px) {
    .docs-toc ul { display: flex; flex-wrap: wrap; gap: 4px; }
}

.docs-content { min-width: 0; }
.docs-section {
    background: var(--kh-surface);
    border: 1px solid var(--kh-border);
    border-radius: var(--kh-radius);
    padding: 24px 20px;
    margin-bottom: 20px;
    scroll-margin-top: 90px;
}
@media (min-width: 768px) { .docs-section { padding: 30px 34px; } }
.docs-section h2 { font-size: 1.45rem; }
.docs-section h3 { margin-top: 1.8em; }
.docs-section > :last-child { margin-bottom: 0; }
.docs-list { padding-left: 1.2em; }
.docs-list li { margin-bottom: .4em; }

.overview-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.overview-card { padding: 18px; border-radius: 12px; background: var(--kh-surface-2); border: 1px solid var(--kh-border); }
.overview-card h3 { margin: 12px 0 4px; font-size: 1.02rem; }
.overview-card p { margin: 0; font-size: .92rem; color: var(--kh-muted); }

.code-block {
    border-radius: 12px;
    overflow: hidden;
    margin: 0 0 18px;
    background: #0f1d2a;
    border: 1px solid #1c3144;
}
.code-block__bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 8px 6px 14px;
    background: #142637;
    color: #8fa6bb;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .03em;
}
.code-block__bar .btn { --btn-fg: #cfe0ee; --btn-bg-hover: rgba(255, 255, 255, .08); }
.code-block pre { margin: 0; border-radius: 0; max-height: 520px; }

.param-table code { white-space: nowrap; }
.example-links { display: grid; gap: 10px; margin-bottom: 18px; }
.example-links > div { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; padding: 10px 12px; background: var(--kh-surface-2); border-radius: 10px; border: 1px solid var(--kh-border); }
.example-links code { word-break: break-all; }

.theme-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.theme-card {
    position: relative;
    padding: 14px;
    border: 1px solid var(--kh-border);
    border-radius: 12px;
    display: grid;
    gap: 6px;
    transition: box-shadow .15s, border-color .15s, transform .15s;
}
.theme-card:hover { box-shadow: var(--kh-shadow); border-color: color-mix(in srgb, var(--kh-primary) 40%, var(--kh-border)); transform: translateY(-1px); }
.theme-card code { font-size: .78rem; justify-self: start; }
.theme-name { font-weight: 650; }
.theme-swatches { display: flex; height: 34px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .08); }
.theme-swatches span { flex: 1; }
.theme-swatches span:first-child { flex: 2; }
.stretched { position: absolute; inset: 0; border-radius: inherit; }

/* ---------- Fehlerseite ---------- */

.page-hero--error { background: linear-gradient(135deg, #2a3a4a, var(--kh-hero-from)); }
.page-hero--error .hero-kicker { margin-bottom: 12px; }
.error-card { max-width: 720px; }

/* ---------- Extern geladene Inhalte ---------- */

.remote-content { max-width: none; overflow-wrap: anywhere; }
.remote-content h1 { font-size: 1.6rem; }
.remote-content img { height: auto; }

/* ---------- Feinschliff mobil ---------- */

.sparte-text { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }

@media (max-width: 600px) {
    .home-hero .btn-row .btn { width: 100%; }
    .home-section { padding: 44px 0; }
    .steps-list { gap: 8px; }
    .step-item {
        display: grid;
        grid-template-columns: 40px 1fr;
        column-gap: 14px;
        padding: 14px 16px;
        align-items: start;
    }
    .step-icon { width: 40px; height: 40px; grid-row: span 2; }
    .step-item h3 { margin: 2px 0 2px; font-size: .98rem; padding-right: 26px; }
    .step-item p { font-size: .86rem; }
    .step-num { top: 12px; right: 14px; font-size: 1.4rem; }
    .feature-grid { gap: 22px; }
    .docs-section { padding: 20px 16px; }
}
@media (max-width: 600px) {
    .sparten-grid { gap: 8px; }
    .sparte-tile { padding: 10px 12px; }
    .sparte-icon { width: 38px; height: 38px; }
    .sparten-toolbar .btn { width: 100%; }
}
