/* HabiCode brand tokens and logo styles (markup: templates/_brand.html).
   Adapted from design_assets/habicode-logo-kit/src/brand.css: Lexend is the vendored font,
   .hc-logo--auto follows the app's theme toggle instead of the OS setting, and the mark's
   colours sit on its paths, so this file only recolours them. */

/* Range stops at 600: Lexend's 700+ is too heavy for app text, so every
   'bold' in page CSS lands on 600 without editing each rule. */
@font-face {
    font-family: 'Lexend';
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url('../vendor/lexend/lexend-latin.woff2') format('woff2');
}

:root {
    /* Brand colours */
    --hc-navy: #2B3A8C;        /* wordmark, small text, one-colour logo (10.1:1 on white) */
    --hc-teal: #0F9A8D;        /* mark, large text 24px+ (3.5:1 on white) */
    --hc-coral: #F0604D;       /* mark and graphics only, never text */
    --hc-coral-text: #C6432F;  /* small coral text (5.0:1 on white) */
    --hc-teal-text: #0B7D72;   /* small teal text and links (5.0:1 on white) */
    --hc-deep-navy: #1F2B6E;   /* dark backgrounds */

    /* Dark-background variants */
    --hc-teal-on-dark: #3CCFBF;
    --hc-coral-on-dark: #FF7A66;

    --hc-font: Lexend, "Segoe UI", Roboto, Arial, sans-serif;
    --hc-h: 48px; /* mark height: change this one value to resize a logo */
}

/* ---------- Logo ---------- */
.hc-logo {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--hc-h) * 0.24);
    line-height: 1;
    text-decoration: none;
}
.hc-logo .hc-logo__mark { height: var(--hc-h); width: auto; display: block; flex-shrink: 0; }

.hc-logo__text { display: flex; flex-direction: column; gap: calc(var(--hc-h) * 0.15); }
.hc-logo__word {
    font-family: var(--hc-font);
    font-weight: 600;
    font-size: calc(var(--hc-h) * 0.58);
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.hc-logo__habi { color: var(--hc-navy); }
.hc-logo__code { color: var(--hc-teal); }
.hc-logo__desc {
    font-family: var(--hc-font);
    font-weight: 500;
    font-size: max(calc(var(--hc-h) * 0.145), 9px);
    letter-spacing: 0.34em;
    color: var(--hc-coral-text);
    padding-left: 1px;
}

/* Stacked layout */
.hc-logo--stacked { flex-direction: column; gap: calc(var(--hc-h) * 0.2); }
.hc-logo--stacked .hc-logo__text { align-items: center; gap: calc(var(--hc-h) * 0.1); }
.hc-logo--stacked .hc-logo__word { font-size: calc(var(--hc-h) * 0.4); }
.hc-logo--stacked .hc-logo__desc { font-size: max(calc(var(--hc-h) * 0.094), 9px); padding-left: 0.34em; }

/* Dark surfaces, and light-theme logos while the app is in dark mode */
.hc-logo--dark .n,
[data-bs-theme="dark"] .hc-logo--auto .n { fill: #FFFFFF; }
.hc-logo--dark .t,
[data-bs-theme="dark"] .hc-logo--auto .t { fill: var(--hc-teal-on-dark); }
.hc-logo--dark .c,
[data-bs-theme="dark"] .hc-logo--auto .c { fill: var(--hc-coral-on-dark); }
.hc-logo--dark .hc-logo__habi,
[data-bs-theme="dark"] .hc-logo--auto .hc-logo__habi { color: #FFFFFF; }
.hc-logo--dark .hc-logo__code,
[data-bs-theme="dark"] .hc-logo--auto .hc-logo__code { color: var(--hc-teal-on-dark); }
.hc-logo--dark .hc-logo__desc,
[data-bs-theme="dark"] .hc-logo--auto .hc-logo__desc { color: var(--hc-coral-on-dark); }

/* The tagline stands on its own, never inside the logo */
.hc-logo-tagline {
    margin: 2rem 0 0;
    font-family: var(--hc-font);
    font-weight: 500;
    color: var(--hc-navy);
}
[data-bs-theme="dark"] .hc-logo-tagline { color: #FFFFFF; }

/* Login: the panel beside the form */
.hc-auth-brand { padding: 2rem; }
