/* =====================================================================
   Bientôt — brand tokens + the logo, app tile and wordmark (built by web/src/js/brand.js).
   The colours repeat BRAND.colors in brand.js (CSS can't read JS); tests/brand.test.js checks they match.
   main.css / app.css build the light and dark themes on these tokens.
   ===================================================================== */

/* Comfortaa Bold, only for the wordmark. Bundled (inlined by scripts/build-web.mjs), so it works offline;
   SIL Open Font License: web/src/static/fonts/Comfortaa-OFL.txt */
@font-face {
    font-family: "Comfortaa";
    font-style: normal;
    font-weight: 700;
    font-display: block;
    src: url("../static/fonts/comfortaa-700-latin.woff2") format("woff2");
}

:root {
    --brand-coral: #D85A30;
    --brand-coral-ink: #C24A1F;
    --brand-coral-on-dark: #F08A62;
    --brand-ink: #14182E;
    --brand-night: #151A38;
    --brand-white: #FFFFFF;
    --brand-ground: #F3F3F7;
    --brand-ground-dark: #0D1022;

    --brand-dot: var(--brand-ink);       /* the logo's dot and the wordmark: ink on light… */
    --font-brand: "Comfortaa", "DM Sans", system-ui, sans-serif;
}

html[data-theme="dark"] {
    --brand-dot: var(--brand-white);     /* …white on dark */
}

/* ---------- the mark ---------- */
.bt-logo {
    display: block;
    overflow: visible;
}

.bt-logo .bt-logo-dot {
    fill: var(--logo-dot, var(--brand-dot));
}

.bt-logo .bt-logo-chev {
    stroke: var(--logo-chev, var(--brand-coral));
}

.bt-logo-on-dark {
    --logo-dot: var(--brand-white);
}

.bt-logo-on-coral {
    --logo-dot: var(--brand-white);
    --logo-chev: var(--brand-white);
}

/* ---------- the app tile (= the launcher icon) ---------- */
.bt-app-tile {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: var(--tile, 52px);
    height: var(--tile, 52px);
    border-radius: calc(var(--tile, 52px) * .26);
    background: var(--brand-coral);
}

.bt-app-tile .bt-logo {
    height: 50%;
    width: auto;
}

/* ---------- the wordmark ---------- */
.bt-wordmark {
    display: inline-block;
    font-family: var(--font-brand);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.01em;
    white-space: nowrap;
    color: var(--brand-dot);
    padding-top: .3em;                   /* room for the circumflex */
}

.bt-wordmark-on-dark {
    color: var(--brand-white);
}

.bt-wm-o {
    position: relative;
    display: inline-block;
}

.bt-wm-hat {
    position: absolute;
    left: 50%;
    bottom: .84em;
    width: .4em;
    height: auto;
    transform: translateX(-50%);
    overflow: visible;
}

.bt-wm-hat path {
    stroke: var(--brand-coral);
}
