/* ==========================================================================
   KI BIENE — Digitale Visitenkarte

   Bewusst eigenständige, schlanke Datei (statt main.css mit 36 KB): Die Karte
   ist eine Zielseite für NFC-Tags und QR-Codes und soll auf dem Handy sofort
   da sein. Design-Tokens und Schrift sind mit der Website identisch.

   Format: zentrierte Karte, max. 420 px — auf dem Desktop bewusst derselbe
   Handy-Look wie auf dem Telefon.
   ========================================================================== */

@font-face {
    font-family: 'Ubuntu Sans Mono';
    src: url('../../fonts/UbuntuSansMono-Italic.woff2') format('woff2');
    font-weight: 400 700;
    font-style: italic;
    font-display: swap;
}

:root {
    --paper: #FBF8EF;
    --surface: #FFFFFF;
    --ink: #24200F;
    --ink-soft: #6A6350;
    --gold: #E6B800;
    --gold-deep: #C9A000;
    --honey: #FCEEA7;
    --line: rgba(36, 32, 15, 0.12);
    --line-soft: rgba(36, 32, 15, 0.07);
    --radius: 18px;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
    --font-mono: 'Ubuntu Sans Mono', ui-monospace, SFMono-Regular, "SF Mono",
                 Menlo, Consolas, "Liberation Mono", monospace;
}

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

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

body {
    margin: 0;
    min-height: 100svh;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(1rem, 4vw, 2.5rem) 1rem 2.5rem;
    background:
        radial-gradient(50rem 26rem at 50% -8%, rgba(252, 238, 167, 0.55), transparent 62%),
        var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--honey); color: var(--ink); }

/* --------------------------------------------------------------------------
   Karte
   -------------------------------------------------------------------------- */
.karte {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    box-shadow: 0 2px 6px rgba(36, 32, 15, 0.05), 0 20px 48px rgba(36, 32, 15, 0.09);
    padding: 28px 24px 26px;
}

/* --------------------------------------------------------------------------
   Kopf: Bildmarke + Wortmarke wie im Website-Header
   -------------------------------------------------------------------------- */
.marke {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.marke__logo { width: 34px; height: 34px; flex: none; }

.marke__name {
    font-family: var(--font-mono);
    font-style: italic;
    font-weight: 500;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.marke__punkt { font-size: 0.32em; font-weight: 600; }
.marke__spatium { font-size: 0.32em; }

.marke__untertitel {
    margin: 8px 0 0;
    text-align: center;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Profil
   -------------------------------------------------------------------------- */
.avatar {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    margin: 24px auto 18px;
    background: var(--honey);
    box-shadow: 0 0 0 4px rgba(230, 184, 0, 0.16);
}

.name {
    margin: 0 0 5px;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.tagline {
    margin: 0 0 24px;
    text-align: center;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Kachel-Raster
   -------------------------------------------------------------------------- */
.kacheln {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 12px;
    margin-bottom: 24px;
}

.kachel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--ink);
    /* Touch-Ziel: das ganze Element ist klickbar, Icon 64 px + Label */
    padding: 2px 0;
    border-radius: 12px;
    -webkit-tap-highlight-color: rgba(230, 184, 0, 0.2);
}

.kachel__icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(36, 32, 15, 0.16);
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.kachel__icon img { width: 100%; height: 100%; object-fit: cover; }

.kachel__icon--text {
    font-size: 27px;
    line-height: 1;
    color: #fff;
}

.kachel:hover .kachel__icon,
.kachel:focus-visible .kachel__icon { transform: translateY(-3px); }

.kachel:active .kachel__icon { transform: translateY(-1px) scale(0.97); }

.kachel__label {
    font-size: 11.5px;
    line-height: 1.25;
    text-align: center;
    max-width: 92px;
    color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   QR-Button und Overlay
   -------------------------------------------------------------------------- */
.qr-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 14px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: var(--gold);
    font: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.qr-button:hover { transform: translateY(-2px); }

.qr-button__hex {
    width: 15px;
    height: 17px;
    flex: none;
    background: var(--gold);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.qr-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    padding: 1rem;
    background: rgba(25, 21, 5, 0.62);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
}

.qr-overlay.is-offen { display: flex; }

.qr-box {
    position: relative;
    width: 100%;
    max-width: 320px;
    padding: 32px 26px 22px;
    border-radius: var(--radius);
    background: var(--surface);
    text-align: center;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.3);
}

.qr-schliessen {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 40px;
    height: 40px;
    border: 0;
    background: none;
    font-size: 24px;
    line-height: 1;
    color: var(--ink-soft);
    cursor: pointer;
}

.qr-schliessen:hover { color: var(--ink); }

.qr-code { display: grid; place-items: center; margin-bottom: 14px; }
.qr-code img, .qr-code canvas { border-radius: 10px; }

.qr-url {
    margin: 0;
    font-size: 12px;
    color: var(--ink-soft);
    word-break: break-all;
}

/* --------------------------------------------------------------------------
   Fuß
   -------------------------------------------------------------------------- */
.karte__fuss {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
    text-align: center;
    font-family: var(--font-mono);
    font-style: italic;
    font-size: 11.5px;
    letter-spacing: 0.06em;
}

.karte__fuss a {
    color: var(--ink-soft);
    text-decoration: none;
}

.karte__fuss a:hover { color: var(--gold-deep); }

/* Rechtliche Links: Impressumspflicht und Widerruf der Einwilligung */
.karte__recht {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
    font-size: 11px;
    letter-spacing: 0.04em;
}

.karte__recht a {
    color: var(--ink-soft);
    text-decoration: none;
    padding: 4px 2px;
}

.karte__recht a:hover { color: var(--gold-deep); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Sehr schmale Geräte
   -------------------------------------------------------------------------- */
@media (max-width: 340px) {
    .karte { padding: 22px 16px 20px; }
    .kacheln { gap: 14px 8px; }
    .kachel__icon { width: 58px; height: 58px; border-radius: 16px; }
    .kachel__label { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    .kachel__icon, .qr-button { transition: none; }
}
