/*
 * Detector de Bulos — global stylesheet, enqueued on every page.
 *
 * Two jobs:
 *   1. Self-host the two typefaces the design names, so they are the same on
 *      the landing, the shop, the activation page and the account area.
 *   2. Style the language switcher in its fixed-overlay form, used on every
 *      page that has no navbar of its own. The landing overrides it to an
 *      inline control in landing.css.
 */

/* ---------------------------------------------------------------------------
   Typefaces — self-hosted.

   antigravityWeb/styles.css names 'Plus Jakarta Sans' and 'Space Grotesk' but
   the source page never loaded either, so it silently rendered in system-ui.
   Both are SIL Open Font License, so they are served from this theme rather
   than from fonts.googleapis.com: no third-party request means no IP address
   handed to Google on every page view, which also keeps the privacy claim on
   the landing honest.

   Variable fonts, one file per subset: a single 27 KB download covers every
   weight from 200 to 800 that the design uses (400, 600, 700, 800).
   font-display: swap so text is readable before the font lands.
   --------------------------------------------------------------------------- */

@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('../fonts/PlusJakartaSans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                   U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                   U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
                   U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('../fonts/PlusJakartaSans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074,
                   U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
                   U+FFFD;
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/SpaceGrotesk-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                   U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                   U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
                   U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/SpaceGrotesk-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074,
                   U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
                   U+FFFD;
}

/* ---------------------------------------------------------------------------
   Shared tokens for pages that do not load landing.css (shop, account,
   activation). Values mirror the design's own :root so a control looks the
   same wherever it appears.
   --------------------------------------------------------------------------- */

:root {
    /* Opt out of Chrome's Auto Dark Mode site-wide, not just on the landing. */
    color-scheme: only light;

    --ddb-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --ddb-heading: 'Space Grotesk', var(--ddb-sans);
    --ddb-text-main: #0a2540;
    --ddb-text-muted: #425466;
    --ddb-surface: #ffffff;
    --ddb-border: #e2e8f0;
    --ddb-indigo: #635bff;
    --ddb-r-pill: 999px;
}

/* ---------------------------------------------------------------------------
   Language switcher — base rules, plus the fixed overlay form.

   The overlay form is no longer rendered anywhere: every page carries the site
   navbar now, and the navbar carries the switcher inside it. What survives here
   is the BASE of that control — the pill's border, its type and its focus ring —
   which chrome.css and landing.css turn into an inline control through the
   .ddb-lang-switcher--inline modifier.

   The position: fixed declarations stay because they cost nothing and are the
   only thing standing between a stylesheet that fails to load and a language
   switcher stacked on top of the brand. Do not delete them without checking
   that .ddb-lang-switcher--inline is still setting position: static.
   --------------------------------------------------------------------------- */

.ddb-lang-switcher {
    position: fixed;
    top: clamp(0.5rem, 1.5vw, 1rem);
    right: clamp(0.75rem, 3vw, 2rem);
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 0.125rem;
    padding: 0.2rem 0.35rem;
    border-radius: var(--ddb-r-pill);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--ddb-border);
    box-shadow: 0 10px 26px -14px rgba(50, 50, 93, 0.4);
    -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
    font-family: var(--ddb-sans);
}

.ddb-lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* 44x44 minimum interactive target. */
    min-width: 44px;
    min-height: 44px;
    padding: 0.35rem 0.4rem;
    border-radius: var(--ddb-r-pill);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    color: var(--ddb-text-muted);
    transition: color 0.2s ease, background-color 0.2s ease;
}

.ddb-lang-btn:hover { color: var(--ddb-text-main); }

.ddb-lang-btn.ddb-lang-active {
    color: var(--ddb-text-main);
    background: rgba(99, 91, 255, 0.1);
    text-decoration: none;
}

.ddb-lang-btn:focus-visible {
    outline: 2px solid var(--ddb-indigo);
    outline-offset: 2px;
}

.ddb-lang-sep {
    color: var(--ddb-border);
    font-size: 0.7rem;
    user-select: none;
}

/* The admin bar pushes the whole document down; keep the overlay clear of it. */
.admin-bar .ddb-lang-switcher { top: calc(32px + clamp(0.5rem, 1.5vw, 1rem)); }

@media screen and (max-width: 782px) {
    .admin-bar .ddb-lang-switcher { top: calc(46px + clamp(0.5rem, 1.5vw, 1rem)); }
}
