/* brand-chrome.css — navigation + footer styling.
   Shared across entire site. Per-product visual identity layers on top
   in /sonar/styles.css, /thinkq/styles.css, etc. */

/* Skip-link — visually hidden until keyboard-focused (WCAG 2.4.1) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 8px;
    z-index: 9999;
    padding: 12px 20px;
    background: var(--accent, #4a9eff);
    color: white;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: top 0.15s ease;
}
.skip-link:focus {
    top: 8px;
    color: white;
    outline: 3px solid white;
    outline-offset: 2px;
}

/* ============================================================================
   Navigation
   ============================================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(15, 15, 15, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-primary);
    z-index: 100;
}

.nav-container {
    max-width: var(--container-max);
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-lg);
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.nav-brand:hover {
    color: var(--text-primary);
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-link {
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease, background 0.15s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.nav-link.nav-active {
    color: var(--accent);
}

.nav-cta {
    padding: var(--space-sm) var(--space-md);
    background: var(--accent);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--text-sm);
}

.nav-cta:hover {
    background: var(--accent-hover);
    color: white;
}

/* Nav product group (dropdown — e.g. Games containing ThinkQ + Zero Deep Space) */
.nav-group {
    position: relative;
}

.nav-group-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    color: var(--text-secondary);
    border: none;
    outline: none;
    box-shadow: none;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: color 0.15s ease, background 0.15s ease;
}

/* Hover/active use a translucent overlay so the button reads correctly on
   both the light root-landing navbar (rgba(247,245,243,...)) and the dark
   brand-chrome fallback navbar — no need to fork per theme. */
.nav-group-btn:hover {
    color: var(--text-primary);
    background: rgba(127, 127, 127, 0.12);
}

.nav-group--active .nav-group-btn {
    color: var(--accent);
}

.nav-group-arrow {
    font-size: 0.55rem;
    opacity: 0.55;
    transition: transform 0.15s ease;
}

.nav-group.open .nav-group-arrow {
    transform: rotate(180deg);
}

/* Dropdown surface — `--bg-card` is defined by brand-tokens.css (light) and
   thinkq's `:root` (light). Falls back to `--bg-elevated` from base.css for
   dark-themed product pages (shinobi/zds). Same fallback chain for border. */
.nav-group-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 260px;
    background: var(--bg-card, var(--bg-elevated));
    border: 1px solid var(--border, var(--border-primary));
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: var(--space-xs);
    display: none;
    z-index: 10;
}

.nav-group.open .nav-group-dropdown {
    display: block;
}

.nav-group-option {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    transition: background 0.15s ease, color 0.15s ease;
    text-decoration: none;
}

.nav-group-option:hover {
    background: rgba(127, 127, 127, 0.1);
    color: var(--text-primary);
}

.nav-group-option.active {
    color: var(--accent);
    background: rgba(127, 127, 127, 0.08);
}

.nav-group-option-label {
    font-size: var(--text-sm);
    font-weight: 600;
}

.nav-group-option-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Language switcher */
.lang-switcher {
    position: relative;
}

.lang-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    cursor: pointer;
    font-family: var(--font-body);
    transition: border-color 0.15s ease, color 0.15s ease;
}

.lang-switcher-btn:hover {
    border-color: var(--border-secondary);
    color: var(--text-primary);
}

.lang-code {
    text-transform: uppercase;
    font-weight: 600;
}

.lang-arrow {
    font-size: 0.6rem;
    opacity: 0.6;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 140px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: var(--space-xs);
    display: none;
}

.lang-switcher.open .lang-dropdown {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    transition: background 0.15s ease, color 0.15s ease;
}

.lang-option:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.lang-option.active {
    color: var(--accent);
}

.lang-flag {
    font-size: 1.1rem;
}

/* Mobile menu toggle (hidden on desktop) */
.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: var(--space-sm);
    cursor: pointer;
    background: transparent;
    border: none;
}

.nav-mobile-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: transform 0.15s ease;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-primary);
        padding: var(--space-md);
        gap: var(--space-xs);
    }

    .navbar.mobile-open .nav-links {
        display: flex;
    }

    .nav-mobile-toggle {
        display: flex;
    }
}

/* ============================================================================
   Footer
   ============================================================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    padding: var(--space-3xl) 0 var(--space-xl);
    margin-top: var(--space-3xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(5, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.footer-brand .brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-lg);
    margin-bottom: var(--space-md);
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.footer-tagline-sub {
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.footer-section-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-impressum {
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--border-primary);
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: var(--space-xl);
    color: var(--text-muted);
    font-size: var(--text-xs);
    line-height: 1.8;
}

.footer-impressum p {
    margin: 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: var(--text-xs);
}

/* ============================================================================
   Cookie consent banner
   ============================================================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-secondary);
    padding: var(--space-md) 0;
    z-index: 200;
    box-shadow: var(--shadow-lg);
}

.cookie-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 280px;
}

.cookie-text strong {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.cookie-text p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin: 0;
}

.cookie-actions {
    display: flex;
    gap: var(--space-sm);
}

.cookie-btn {
    min-width: 90px;
}

/* ============================================================================
   Print styles — clean output for blog posts (readers occasionally print)
   ============================================================================ */
@media print {
    /* Hide chrome that doesn't belong on paper */
    .navbar,
    .footer,
    .cookie-banner,
    .skip-link,
    .blog-article-footer .btn,
    .lang-switcher,
    .nav-mobile-toggle,
    video,
    .ph-badge-wrap,
    .hero-actions,
    .hero-ctas,
    .blog-post-cta {
        display: none !important;
    }

    /* Strip page chrome to white/black for ink savings + readability */
    body, .site-main, .blog-article, .container {
        background: white !important;
        color: black !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Article content gets full page width, larger text */
    .blog-article-content,
    .blog-article-header {
        max-width: 100% !important;
        font-size: 12pt !important;
        line-height: 1.6 !important;
        color: black !important;
    }
    .blog-article-content a {
        color: black !important;
        text-decoration: underline;
    }
    /* Expand external links inline */
    .blog-article-content a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.9em;
        color: #555;
    }
    .blog-article-content code,
    .blog-article-content pre {
        background: #f4f4f4 !important;
        color: black !important;
        border: 1px solid #ddd !important;
        page-break-inside: avoid;
    }
    h1, h2, h3, h4 {
        color: black !important;
        page-break-after: avoid;
    }

    /* Page break sensibly between major sections */
    .section, article {
        page-break-inside: avoid;
    }

    /* Hide background gradients/glow effects */
    .text-gradient, .text-glow {
        background: none !important;
        color: black !important;
        -webkit-background-clip: unset !important;
        -webkit-text-fill-color: black !important;
    }
}
