/* Shared palette, reset, header and footer for pages generated by
   blog.py (the blog). Copied from the legal pages' inline styles,
   which index.html / media-kit.html / terms.html still carry
   themselves — keep them in step if the header or footer look changes. */
:root {
    --bg: #ffffff;
    --panel-bg: #f7f7f8;
    --border: #e3e4e8;
    --text: #1f2328;
    --text-muted: #6b7280;
    --accent: #fd5f04;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

/* ===== Header ===== */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 24px;
}

.site-nav-left {
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo img {
    height: 45px;
    width: auto;
    display: block;
}

.site-nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-nav-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.site-nav-link:hover,
.site-nav-link.active {
    color: var(--text);
}

@media (max-width: 640px) {
    .site-nav-links {
        display: none;
    }
}

.header-cta {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.header-cta:hover {
    background: var(--panel-bg);
    border-color: var(--text-muted);
}

@media (max-width: 640px) {
    .header-cta {
        display: none;
    }
}

.header-social {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--text-muted);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.header-social a:hover {
    background: var(--panel-bg);
    color: var(--text);
}

.header-social svg {
    width: 18px;
    height: 18px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 1024px) {
    .header-social {
        display: none;
    }
}

/* ===== Language switcher ===== */

.lang-picker {
    position: relative;
}

.lang-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 8px;
    border: none;
    border-radius: 8px;
    background: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-trigger-btn:hover {
    background: var(--panel-bg);
    color: var(--text);
}

.lang-trigger-btn svg {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    min-width: 190px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    padding: 6px;
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.lang-picker.open .lang-dropdown {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: none;
    background: transparent;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.lang-option:hover {
    background: var(--panel-bg);
}

.lang-option-code {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    width: 22px;
    flex-shrink: 0;
}

.lang-option-label {
    flex: 1;
    white-space: nowrap;
}

.lang-option-check {
    width: 16px;
    height: 16px;
    color: var(--accent);
    opacity: 0;
    flex-shrink: 0;
}

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

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

.lang-option.active .lang-option-check {
    opacity: 1;
}

/* ===== Mobile menu button + drawer ===== */

.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.mobile-menu-btn:hover {
    background: var(--panel-bg);
    color: var(--text);
}

.mobile-menu-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .mobile-menu-btn {
        display: inline-flex;
    }
}

.mobile-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(15, 17, 21, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.mobile-drawer-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 91;
    width: 78vw;
    max-width: 300px;
    background: #fff;
    box-shadow: none; /* only when open: closed, it bled a grey strip down the left edge */
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
}

.mobile-drawer.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}

.mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-drawer-head img {
    height: 37px;
    width: auto;
    display: block;
}

.mobile-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.mobile-drawer-close:hover {
    background: var(--panel-bg);
    color: var(--text);
}

.mobile-drawer-close svg {
    width: 18px;
    height: 18px;
}

.mobile-drawer-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-drawer-link {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.mobile-drawer-link:hover,
.mobile-drawer-link.active {
    background: var(--panel-bg);
    color: var(--text);
}

.mobile-drawer-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 999px;
    border: none;
    background: var(--text);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.mobile-drawer-cta:hover {
    background: #343a42;
}

.mobile-drawer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: auto;
}

.mobile-drawer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--text-muted);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.mobile-drawer-social a:hover {
    background: var(--panel-bg);
    color: var(--text);
}

.mobile-drawer-social svg {
    width: 18px;
    height: 18px;
}

@media (min-width: 641px) {
    .mobile-drawer-backdrop,
    .mobile-drawer {
        display: none;
    }
}

/* ===== Footer ===== */

.site-footer {
    padding: 24px;
    text-align: center;
    font-size: 12.5px;
    color: var(--text-muted);
}

.site-footer-links {
    margin: 0 0 8px;
}

.site-footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

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

.site-footer-links-sep {
    margin: 0 8px;
}

.site-footer-rights {
    margin: 0;
}

.site-footer-legal {
    margin: 4px 0 0;
}
