/* Digitale Visitenkarte – Frontend */
:root {
    --bg: #eef1f6;
    --tile: #ffffff;
    --text: #1c2230;
    --muted: #5b6578;
    --line: #e2e7f0;
    --radius: 14px;
    --radius-btn: 10px;
    --shadow: 0 1px 2px rgba(20, 30, 50, .05), 0 10px 28px rgba(20, 30, 50, .07);
    --blue: #1769e0;
    --blue-hover: #1058c0;
    --dark: #1f2937;
    --dark-hover: #111827;
    --focus: #1769e0;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0e121a;
        --tile: #171d29;
        --text: #e8ecf4;
        --muted: #9aa5ba;
        --line: #263045;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .35);
        --dark: #2b3447;
        --dark-hover: #374159;
        --focus: #6aa5ff;
    }
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: clamp(16px, 4vw, 44px) clamp(16px, 4vw, 24px) 44px;
    display: grid;
    gap: 18px;
}

.tile {
    background: var(--tile);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Kopf */
.tile--head { padding: clamp(22px, 4vw, 34px) clamp(22px, 4vw, 36px); }

h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4.6vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
    display: flex;
    align-items: center;
    gap: .4em;
}

/* Logo: Höhe = Zeilenhöhe der H1 (skaliert mit der Schriftgröße) */
h1 .logo {
    flex: none;
    height: 1.15em;
    width: auto;
    max-width: 30%;
    object-fit: contain;
    display: block;
}

/* Bild links, Text rechts */
.main {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 18px;
    align-items: stretch;
}

.tile--image {
    position: relative;
    overflow: hidden;
    min-height: 340px;
}

.tile--image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ph {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: linear-gradient(145deg, rgba(23, 105, 224, .10), rgba(23, 105, 224, .02));
}

.tile--text {
    display: flex;
    flex-direction: column;
    padding: clamp(22px, 4vw, 34px);
}

.text > :first-child { margin-top: 0; }
.text > :last-child { margin-bottom: 0; }
.text p, .text ul, .text ol { margin: 0 0 1em; }
.text h2, .text h3, .text h4 { line-height: 1.25; margin: 1.2em 0 .5em; }
.text a, .legal-body a { color: var(--blue); }
@media (prefers-color-scheme: dark) { .text a, .legal-body a { color: #7db2ff; } }
.text blockquote {
    margin: 0 0 1em;
    padding-left: 1em;
    border-left: 3px solid var(--line);
    color: var(--muted);
}

/* Buttons – beide exakt gleich groß */
.tile--text { container-type: inline-size; }

/* Gleich große Buttons: Spalten teilen sich die Breite; ist die Kachel schmal, stehen sie untereinander */
.actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.25rem, 1fr));
    gap: 12px;
    margin-top: auto;
    padding-top: 1.75rem;
}

@container (max-width: 26.25rem) {
    .actions { grid-template-columns: 1fr; }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .85rem .9rem;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: var(--radius-btn);
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    text-decoration: none;
    transition: background-color .15s ease, transform .15s ease;
}

.btn:hover { transform: translateY(-1px); }
/* Instagram-Verlauf (Orange → Pink → Violett), leicht abgedunkelt für lesbare weiße Schrift */
.btn--insta {
    background: linear-gradient(45deg, #e2631a 0%, #dc2a6e 45%, #b0239f 72%, #5a4fd6 100%);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
.btn--insta:hover { filter: brightness(1.08) saturate(1.05); }
.btn--contact { background: var(--blue); color: #fff; }
.btn--contact:hover { background: var(--blue-hover); }
.btn--web { background: #d32f2f; color: #fff; }
.btn--web:hover { background: #b71c1c; }

a:focus-visible, summary:focus-visible, .btn:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* Adress-Kachel */
.tile--address {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    padding: clamp(18px, 3vw, 26px) clamp(22px, 4vw, 34px);
}

.tile--address address {
    font-style: normal;
    display: grid;
    gap: .1rem;
    line-height: 1.55;
}

.addr-firma { font-size: 1.05rem; margin-bottom: .15rem; }
.addr-line { color: var(--muted); }
.tile--address a:not(.pin) { color: var(--blue); }
@media (prefers-color-scheme: dark) { .tile--address a:not(.pin) { color: #7db2ff; } }

.pin {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .7rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-btn);
    color: var(--text);
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease;
}
.pin svg { color: #d93025; flex: none; }
.pin:hover { border-color: var(--muted); background: rgba(127, 127, 127, .08); }
.pin:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

@media (max-width: 520px) { .pin { width: 100%; justify-content: center; } }

/* Footer-Kachel */
.tile--foot { padding: 18px clamp(18px, 3vw, 28px); }

.foot-note {
    margin: 0 0 .4rem;
    color: var(--muted);
    font-size: .92rem;
}

.legal-list { display: grid; }

.legal { border-top: 1px solid var(--line); }
.legal:first-child { border-top: 0; }

.legal summary {
    cursor: pointer;
    list-style: none;
    padding: .7rem 0;
    font-weight: 600;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.legal summary::-webkit-details-marker { display: none; }
.legal summary::after {
    content: "";
    width: .5rem;
    height: .5rem;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform .2s ease;
    margin-right: .25rem;
}
.legal[open] summary::after { transform: rotate(-135deg); }

.legal-body {
    padding: .2rem 0 1rem;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.6;
    max-width: 75ch;
}
.legal-body p { margin: 0 0 .8em; }
.legal-body > :last-child { margin-bottom: 0; }

/* Mobil */
@media (max-width: 760px) {
    .main { grid-template-columns: 1fr; }
    .tile--image { min-height: 0; aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
    .btn:hover { transform: none; }
}
