/* brandbill – Projektseite im Showroom.
   Eigenstaendig, nutzt nur die Tokens aus style.css (--primary-color, --text-*, --background). */

:root {
    --bb-line: color-mix(in srgb, var(--text-secondary) 20%, transparent);
    --bb-soft: color-mix(in srgb, var(--primary-color) 7%, transparent);
    --bb-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Scroll-Fortschritt (wie auf den anderen Detailseiten) ---------- */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 3px;
    height: 100vh;
    z-index: 9999;
    pointer-events: none;
}

.scroll-progress-fill {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--primary-color), #00B3FF);
    transition: height 0.1s ease-out;
}

.bb-main {
    overflow-x: clip;
}

.bb-main > section {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* ---------- Hero ---------- */
.bb-hero {
    position: relative;
    isolation: isolate;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.bb-hero::before {
    content: '';
    position: absolute;
    inset: -30% -20% auto -20%;
    height: 140%;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(36% 45% at 25% 20%, color-mix(in srgb, var(--primary-color) 20%, transparent), transparent 70%),
        radial-gradient(30% 40% at 80% 10%, color-mix(in srgb, var(--primary-color) 13%, transparent), transparent 70%);
    filter: blur(32px);
}

[data-theme="dark"] .bb-hero::before {
    opacity: 0.65;
}

.bb-crumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-family: ui-monospace, "Menlo", "Consolas", monospace;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.bb-crumb a {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: inherit;
    text-decoration: none;
    opacity: 0.75;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.bb-crumb a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.bb-crumb [aria-current] {
    color: var(--text-primary);
    font-weight: 600;
}

.bb-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 3rem;
    align-items: center;
}

.bb-kicker {
    margin: 0 0 0.6rem;
    font-family: ui-monospace, "Menlo", "Consolas", monospace;
    font-size: 0.82rem;
    color: color-mix(in srgb, var(--text-secondary) 75%, var(--primary-color));
}

.bb-title {
    margin: 0;
    font-size: clamp(2.6rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.02;
    color: var(--text-primary);
}

.bb-lead {
    margin: 1rem 0 0;
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--text-primary);
    text-wrap: pretty;
}

.bb-text {
    margin: 0.9rem 0 0;
    line-height: 1.7;
    color: var(--text-secondary);
    text-wrap: pretty;
}

[data-theme="dark"] .bb-text .highlight {
    color: var(--text-primary);
}

.bb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.6rem;
}

.bb-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0.65rem 1.15rem;
    border-radius: 12px;
    border: 1px solid var(--bb-line);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.25s var(--bb-ease), box-shadow 0.25s ease, background 0.2s ease, border-color 0.2s ease;
}

.bb-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.bb-btn--primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 10px 26px color-mix(in srgb, var(--primary-color) 32%, transparent);
}

.bb-btn--primary:hover {
    color: #fff;
    box-shadow: 0 14px 34px color-mix(in srgb, var(--primary-color) 42%, transparent);
}

.bb-btn:focus-visible,
.bb-tabs button:focus-visible,
.bb-footer-brand:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

.bb-facts {
    list-style: none;
    margin: 1.8rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1.75rem;
}

.bb-facts li {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.bb-facts strong {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.bb-facts span {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* ---------- Geraeterahmen ---------- */
.bb-device {
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--bb-line);
    background: var(--card, var(--background));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
}

.bb-device img {
    display: block;
    width: 100%;
    height: auto;
}

.bb-device-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid var(--bb-line);
    background: color-mix(in srgb, var(--text-secondary) 6%, var(--background));
}

.bb-device-bar i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--text-secondary) 35%, transparent);
}

.bb-device-bar span {
    margin-left: 0.6rem;
    font-family: ui-monospace, "Menlo", "Consolas", monospace;
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.bb-device figcaption {
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--bb-line);
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.bb-device--phone {
    border-radius: 28px;
    border-width: 6px;
    border-color: color-mix(in srgb, var(--text-primary) 85%, transparent);
    max-width: 260px;
    justify-self: center;
}

/* ---------- Galerie ---------- */
.bb-gallery {
    padding-top: 1rem;
    padding-bottom: 3rem;
}

.bb-tabs {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.3rem;
    margin-bottom: 1.25rem;
    border-radius: 999px;
    border: 1px solid var(--bb-line);
    background: color-mix(in srgb, var(--background) 85%, transparent);
    max-width: 100%;
    overflow-x: auto;
}

.bb-tabs button {
    min-height: 40px;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.bb-tabs button:hover {
    color: var(--text-primary);
}

.bb-tabs button[aria-selected="true"] {
    background: var(--primary-color);
    color: #fff;
}

.bb-gallery-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 2rem;
    align-items: start;
}

/* ---------- Leistungen ---------- */
.bb-features {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.bb-h2 {
    margin: 0 0 1.5rem;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.bb-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.bb-card {
    padding: 1.35rem 1.4rem;
    border-radius: 16px;
    border: 1px solid var(--bb-line);
    background: color-mix(in srgb, var(--background) 92%, transparent);
    transition: border-color 0.25s ease, box-shadow 0.3s ease, transform 0.3s var(--bb-ease);
}

.bb-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 18px 44px color-mix(in srgb, var(--primary-color) 14%, transparent);
    transform: translateY(-3px);
}

.bb-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.bb-card p {
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.bb-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.9rem;
}

.bb-chips span {
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bb-soft);
    color: color-mix(in srgb, var(--primary-color) 85%, var(--text-primary));
    border: 1px solid color-mix(in srgb, var(--primary-color) 28%, transparent);
}

/* ---------- CTA ---------- */
.bb-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
    margin-bottom: 1rem;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--primary-color) 30%, transparent);
    background: var(--bb-soft);
}

.bb-main > .bb-cta {
    max-width: calc(1200px - 2.5rem);
}

.bb-cta p {
    margin: 0;
    max-width: 60ch;
    color: var(--text-primary);
    line-height: 1.6;
}

/* ---------- Produktlogo im Footer (hell/dunkel ueber currentColor) ---------- */
.bb-footer-brand {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.6rem;
    margin-bottom: 1.75rem;
    color: var(--text-primary);
    text-decoration: none;
}

.bb-mark {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.bb-mark .bb-accent,
.bb-wordmark span {
    color: var(--primary-color);
}

.bb-wordmark {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1;
}

.bb-footer-note {
    flex-basis: 100%;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.bb-footer-brand:hover .bb-wordmark {
    opacity: 0.85;
}

/* ---------- Einblenden ---------- */
.bb-anim [data-reveal],
.bb-anim .bb-card {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s var(--bb-ease), transform 0.7s var(--bb-ease), border-color 0.25s ease, box-shadow 0.3s ease;
}

.bb-anim [data-reveal].is-in,
.bb-anim .bb-card.is-in {
    opacity: 1;
    transform: none;
}

.bb-anim .bb-card.is-in:hover {
    transform: translateY(-3px);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .bb-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .bb-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bb-gallery-grid {
        grid-template-columns: minmax(0, 1fr) 200px;
        gap: 1.25rem;
    }
}

@media (max-width: 640px) {
    .bb-main > section {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .bb-hero {
        padding-top: 1rem;
    }

    .bb-lead {
        font-size: 1.08rem;
    }

    .bb-actions .bb-btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .bb-gallery-grid {
        grid-template-columns: 1fr;
    }

    /* Auf dem Handy reicht der Desktop-Screenshot, das Handy-Mockup wuerde doppeln */
    .bb-device--phone {
        display: none;
    }

    .bb-feature-grid {
        grid-template-columns: 1fr;
    }

    .bb-main > .bb-cta {
        max-width: none;
        margin-left: 1rem;
        margin-right: 1rem;
        padding: 1.25rem !important;
    }

    .bb-cta .bb-btn {
        width: 100%;
        justify-content: center;
    }

    .bb-footer-brand {
        justify-content: center;
    }

    .bb-footer-note {
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bb-btn:hover,
    .bb-card:hover {
        transform: none;
    }
}
