/* jackie agentur – Grundlayout.
   Aufbau wie chris.emil-janssen.de (Vollbild, Kacheln, Footer), Gestaltung nach dem Jackie-Designsystem. */

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1.05rem;
    line-height: 1.6;
}
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.home-icon {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background-image: url('../grafiken/startseite.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
    z-index: 30;
    transition: opacity 0.2s ease;
}
.home-icon:hover { opacity: 1; }

/* Wortmarke oben rechts auf Unterseiten */
.brand-corner {
    position: fixed;
    top: 24px;
    right: 26px;
    z-index: 30;
    opacity: 0.9;
    transition: opacity 0.2s ease;
    line-height: 0;
}
.brand-corner img { height: 30px; width: auto; }
.brand-corner:hover { opacity: 1; }

h1, h2, h3 { font-family: var(--font-display); }
h1 {
    margin: 0 0 40px 0;
    font-size: 2rem;
    font-weight: 500;
    color: var(--text);
}

.content {
    max-width: 900px;
    margin: 90px auto 140px auto;
    padding: 0 20px;
}
.content.wide { max-width: 1400px; width: 90%; padding: 0; }
.content h2 {
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--text);
    margin-top: 40px;
    margin-bottom: 20px;
}
.content a, p a, .win-body a {
    color: var(--brand-text);
    text-decoration: none;
    font-weight: 600;
}
.content a:hover, p a:hover, .win-body a:hover { text-decoration: underline; }

.lead {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text);
    max-width: 820px;
}

/* ---------- Footer: Schaltflächen mit Symbol wie auf jackie.de ---------- */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    display: flex;
    justify-content: center;
    padding: 10px 12px 14px 12px;
    box-sizing: border-box;
    background: linear-gradient(transparent, rgba(14, 15, 18, 0.85) 45%);
    pointer-events: none;
}
.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    padding: 4px;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--surface) 80%, transparent);
    border: 1px solid var(--border);
    pointer-events: auto;
}
.footer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px 5px 6px;
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.footer a:hover { background: var(--surface-raised); color: var(--text); }
.footer a img { width: 22px; height: 22px; border-radius: 5px; }
body.home .footer { background: none; }

@media (max-width: 640px) {
    .footer a span { display: none; }
    .footer a { padding: 5px; }
    .footer a img { width: 28px; height: 28px; }
    .brand-corner img { height: 22px; }
    .brand-corner { top: 28px; }
}

/* ---------- Modal für externe Links ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 450px;
    text-align: center;
}
.modal-box h3 { margin-top: 0; font-weight: 500; font-size: 1.3rem; margin-bottom: 15px; }
.modal-box p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 25px; }
.modal-platform { font-weight: 500; color: var(--text); }
.modal-buttons { display: flex; gap: 15px; justify-content: center; }
.modal-btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.2s;
}
.modal-btn-cancel { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.modal-btn-cancel:hover { background: var(--surface-raised); }
.modal-btn-confirm { background: var(--brand-action); color: var(--on-brand); border: 1px solid var(--brand-action); }
.modal-btn-confirm:hover { filter: brightness(1.08); }

/* ---------- Fenster für Rechtstexte (wie jackie.de) ---------- */
.win-layer {
    position: fixed;
    inset: 0;
    z-index: 950;
    pointer-events: none;
}
.win {
    position: absolute;
    left: 50%;
    top: 16px;
    transform: translateX(-50%);
    width: min(900px, calc(100vw - 16px));
    height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    background: color-mix(in srgb, var(--surface) calc(var(--win-alpha) * 100%), transparent);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.win.open { opacity: 1; }
.win[hidden] { display: none; }
.win-head {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    padding: 0 10px 0 14px;
    background: color-mix(in srgb, var(--brand) 11%, transparent);
    box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--brand) 26%, transparent);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    cursor: grab;
    user-select: none;
    touch-action: none;
}
.win-head:active { cursor: grabbing; }
.win-head img.herz { width: 20px; height: 18px; flex: none; }
.win-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.1;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.win-alpha {
    width: 82px;
    accent-color: var(--text);
    cursor: pointer;
}
.win-x {
    flex: none;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}
.win-x:hover { background: var(--surface-raised); }
.win-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 22px 32px 32px 32px;
    color: var(--text-muted);
    font-size: 0.98rem;
}
.win-body h3 {
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 28px 0 10px 0;
}
.win-body strong { color: var(--text); font-weight: 600; }

/* Open-Source-Hinweise */
.oss-item { border-top: 1px solid var(--border); padding: 16px 0; }
.oss-item:last-child { border-bottom: 1px solid var(--border); }
.oss-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.oss-name { color: var(--text); font-weight: 600; }
.oss-name small { color: var(--text-muted); font-weight: 400; font-size: 0.95rem; }
.oss-meta { margin: 2px 0 8px 0; }
.oss-item details summary { cursor: pointer; color: var(--text); }
.oss-item pre {
    white-space: pre-wrap;
    font-size: 0.8rem;
    line-height: 1.45;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    max-height: 320px;
    overflow: auto;
}

@media (prefers-reduced-motion: reduce) {
    .win, .modal-overlay { transition: none; }
}
