/* =======================================================================
   FleetMagic — white-label skin (ADR-021 §5, MG-1076)

   PLACEHOLDER LOOK, derived from FleetMagic's public site https://fleetmagic.biz/ on
   2026-10-30. FleetMagic has not approved it; replace the values (and the logo in
   wwwroot/img/tenants/fleetmagic/) when they send their brand guide.

   Where each raw value came from (page HTML + css/general.css + the Elementor kit
   post-14.css of fleetmagic.biz; the logo pixels were sampled from
   https://fleetmagic.biz/images/fleet-magic-costa-rica.png):
     red         #ff3131   primary accent: the colour of their buttons, links and
                           highlights (26 uses in the home page CSS)
     logo red    #ff2918   the wordmark's own fill (sampled), a hair warmer than the
                           button red; the logo stays as published
     pink        #fb1473   gradient companion (their stylesheet, FB1473)
     navy        #162056   their body/text colour (Elementor kit global colour) and
                           the dark canvas here
   Typography: the page body is Montserrat (Elementor kit font) with Ubuntu in
   css/general.css. Neither is loaded by Lupo, so the headings keep the product's
   fonts and only the shell borrows the feel.

   Derived values (not on their site, chosen for WCAG AA):
     #ff3131 on white is only 3.7:1, so TEXT and links use #b91c1c on Paper (6.5:1 on
     white, 4.8:1 on the brand tint) and #ff9a9a on the navy canvas (4.7:1 on the
     lightest surface); #ff3131 stays the fill.

   Token-only on the surfaces: the approved Slate / Paper palettes keep owning
   everything not named here. The success, warning, danger and info state tokens are
   never re-valued: they mean the same at every company
   (scripts/verify-token-compliance.ps1 enforces it).
   ======================================================================= */

:root {
    --brand-1: #ff3131; /* FleetMagic red */
    --brand-1-rgb: 255, 49, 49;
    --brand-2: #fb1473; /* pink gradient companion */
    --brand-2-rgb: 251, 20, 115;
    --blue: #ff3131; /* legacy alias — many app components still read var(--blue) */
    --brand-soft: rgba(255, 49, 49, 0.16);
    --grad: linear-gradient(120deg, var(--brand-1), var(--brand-2));
    --grad-text: linear-gradient(100deg, #ff3131, #fb1473);
    /* AA-safe text variant of --brand-1 (raw #ff3131 is 3.7:1 on white). */
    --brand-text: #b91c1c;

    --link: #b91c1c;
    --link-rgb: 185, 28, 28;
    --link-hover: #991b1b;
    --link-hover-rgb: 153, 27, 27;

    /* Marketing-home palette (_shell.scss / _home.scss): re-alias the whole --home-* set
       so the landing, nav, drawer, hero CTAs and account dropdown follow the brand
       instead of Lupo's blue and violet. Token swap only. */
    --home-primary: #ff3131;
    --home-primary-dark: #b91c1c;
    --home-primary-soft: rgba(255, 49, 49, 0.12);
    --home-accent: #fb1473;
    --home-accent-deep: #b91c1c;
    --home-primary-rgb: 255, 49, 49;
    --home-accent-rgb: 251, 20, 115;
    --home-primary-dark-rgb: 185, 28, 28;
    --home-underline: linear-gradient(135deg, #ff3131, #fb1473);
    /* Light brand tint that reads on the fixed dark marketing sections. */
    --home-on-dark: #ff9a9a;
    --home-on-dark-rgb: 255, 154, 154;
}

/* Dark identity: their navy as the canvas, the red kept as the one action colour. */
html[data-theme="dark"] {
    --bg: #162056;
    --bg-2: #0e1640;
    --bg-gray: #162056;
    --surface: #1e2b6b;
    --surface-2: #273579;
    --surface-3: #313f87;
    --border: rgba(255, 255, 255, 0.12);
    --border-2: rgba(255, 255, 255, 0.2);
    --hairline: rgba(255, 255, 255, 0.08);
    --text: #f1f3ff;
    --text-muted: #c3c9ec;
    --text-dim: #9aa3d6;
    --brand-soft: rgba(255, 49, 49, 0.2);
    --glow: 0 12px 44px rgba(251, 20, 115, 0.3);

    --link: #ff9a9a;
    --link-rgb: 255, 154, 154;
    --link-hover: #ffb8b8;
    --link-hover-rgb: 255, 184, 184;
    --brand-text: #ff9a9a;
}

html[data-theme="dark"] .chip.brand {
    color: #ffb8b8;
}

html[data-theme="light"] .chip.brand,
html[data-theme="paper"] .chip.brand {
    color: var(--brand-text);
}

/* =======================================================================
   Shell fidelity — header, wordmark, nav, dropdown. Structural rules are
   scoped under html[data-brand="fleetmagic"] so nothing leaks into the
   unbranded Lupo shell. Raw hex is allowed here: tenant sheets are where
   brand hex lives.
   ======================================================================= */

/* White header with a thin red rule on Paper (their site header is white);
   the navy canvas with a pink rule on dark. Kills the base dark-glass bar. */
html[data-brand="fleetmagic"] .home-header {
    background: #ffffff;
    backdrop-filter: none;
    box-shadow: none;
    border-bottom: 2px solid #ff3131;
}

html[data-brand="fleetmagic"][data-theme="dark"] .home-header {
    background: #162056;
    border-bottom: 1px solid #fb1473;
}

/* Tenant image logo: the red wordmark PNG, natural 150x22. */
html[data-brand="fleetmagic"] .home-brand__logo {
    height: 20px;
}

/* On the navy canvas the red wordmark is only 4.1:1 and its thin "magic" half nearly
   disappears, so the dark theme shows it white, as their own site does in its dark
   footer (they publish a white SVG there). Applies to the header and the footer logo. */
html[data-brand="fleetmagic"][data-theme="dark"] .home-brand__logo,
html[data-brand="fleetmagic"][data-theme="dark"] .tenant-footer__logo {
    filter: brightness(0) invert(1);
}

/* Fallback text wordmark (only if the logo asset is missing): navy on the white
   bar, white on the dark bar — the base rule hardcodes white. */
html[data-brand="fleetmagic"] .home-brand--tenant .home-brand__text {
    color: #162056;
}

html[data-brand="fleetmagic"][data-theme="dark"] .home-brand--tenant .home-brand__text {
    color: #ffffff;
}

/* Nav links: plain navy text, no pill, hover red. The transparent border keeps
   the box metrics of the base pill so nothing shifts. */
html[data-brand="fleetmagic"] .home-nav__dropdown-trigger,
html[data-brand="fleetmagic"] .home-nav__dropdown-trigger.home-nav__dropdown-trigger--plain {
    border: 1px solid transparent;
    background: transparent;
    color: #162056;
    font-weight: 500;
}

html[data-brand="fleetmagic"] .home-nav__dropdown-trigger:hover,
html[data-brand="fleetmagic"] .home-nav__dropdown-trigger:focus,
html[data-brand="fleetmagic"] .home-nav__dropdown-trigger.home-nav__dropdown-trigger--plain:hover,
html[data-brand="fleetmagic"] .home-nav__dropdown-trigger.home-nav__dropdown-trigger--plain:focus {
    background: transparent;
    border-color: transparent;
    color: #b91c1c;
}

html[data-brand="fleetmagic"][data-theme="dark"] .home-nav__dropdown-trigger,
html[data-brand="fleetmagic"][data-theme="dark"] .home-nav__dropdown-trigger.home-nav__dropdown-trigger--plain {
    color: rgba(255, 255, 255, 0.92);
}

html[data-brand="fleetmagic"][data-theme="dark"] .home-nav__dropdown-trigger:hover,
html[data-brand="fleetmagic"][data-theme="dark"] .home-nav__dropdown-trigger:focus,
html[data-brand="fleetmagic"][data-theme="dark"] .home-nav__dropdown-trigger.home-nav__dropdown-trigger--plain:hover,
html[data-brand="fleetmagic"][data-theme="dark"] .home-nav__dropdown-trigger.home-nav__dropdown-trigger--plain:focus {
    color: #ff9a9a;
}

/* Right-side utility controls (theme toggle, language, account, hamburger). */
html[data-brand="fleetmagic"] .home-theme-btn,
html[data-brand="fleetmagic"] .home-account__trigger,
html[data-brand="fleetmagic"] .home-header__toggle,
html[data-brand="fleetmagic"] .home-header__utility .language-switcher .btn {
    color: #162056;
    background: transparent;
    border-color: transparent;
}

html[data-brand="fleetmagic"] .home-theme-btn:hover,
html[data-brand="fleetmagic"] .home-theme-btn:focus,
html[data-brand="fleetmagic"] .home-account__trigger:hover,
html[data-brand="fleetmagic"] .home-account__trigger:focus,
html[data-brand="fleetmagic"] .home-header__utility .language-switcher .btn:hover,
html[data-brand="fleetmagic"] .home-header__utility .language-switcher .btn:focus {
    color: #b91c1c;
    background: rgba(255, 49, 49, 0.08);
    border-color: transparent;
}

html[data-brand="fleetmagic"][data-theme="dark"] .home-theme-btn,
html[data-brand="fleetmagic"][data-theme="dark"] .home-account__trigger,
html[data-brand="fleetmagic"][data-theme="dark"] .home-header__toggle,
html[data-brand="fleetmagic"][data-theme="dark"] .home-header__utility .language-switcher .btn {
    color: #eef2ff;
}

html[data-brand="fleetmagic"][data-theme="dark"] .home-theme-btn:hover,
html[data-brand="fleetmagic"][data-theme="dark"] .home-theme-btn:focus,
html[data-brand="fleetmagic"][data-theme="dark"] .home-account__trigger:hover,
html[data-brand="fleetmagic"][data-theme="dark"] .home-account__trigger:focus,
html[data-brand="fleetmagic"][data-theme="dark"] .home-header__utility .language-switcher .btn:hover,
html[data-brand="fleetmagic"][data-theme="dark"] .home-header__utility .language-switcher .btn:focus {
    color: #ff9a9a;
    background: rgba(255, 49, 49, 0.16);
}

/* Hamburger lines follow the bar (base hardcodes white-on-dark-glass). */
html[data-brand="fleetmagic"] .home-header__toggle span {
    background: #162056;
}

html[data-brand="fleetmagic"][data-theme="dark"] .home-header__toggle span {
    background: #ffffff;
}

/* Learn dropdown: a white panel in both themes with a red eyebrow rule. */
html[data-brand="fleetmagic"] .home-nav__dropdown-menu {
    min-width: 240px;
    background: #ffffff;
    border: 2px solid #e6e8f0;
    border-radius: 10px;
    padding: 0.6rem 0.55rem;
    box-shadow: 0 18px 44px rgba(22, 32, 86, 0.16);
}

html[data-brand="fleetmagic"] .home-nav__dropdown-menu .dropdown-header {
    color: #162056;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.45rem 0.65rem 0.5rem;
}

html[data-brand="fleetmagic"] .home-nav__dropdown-menu .dropdown-header::after {
    content: "";
    display: block;
    width: 50px;
    height: 2px;
    margin-top: 8px;
    background: #ff3131;
}

html[data-brand="fleetmagic"] .home-nav__dropdown-menu .dropdown-divider {
    border-top-color: #e6e8f0;
}

html[data-brand="fleetmagic"] .home-nav__dropdown-menu .dropdown-item {
    color: #162056;
    font-weight: 600;
    border-radius: 6px;
}

html[data-brand="fleetmagic"] .home-nav__dropdown-menu .dropdown-item > i {
    color: #ff3131;
}

html[data-brand="fleetmagic"] .home-nav__dropdown-menu .dropdown-item:hover,
html[data-brand="fleetmagic"] .home-nav__dropdown-menu .dropdown-item:focus,
html[data-brand="fleetmagic"] .home-nav__dropdown-menu .dropdown-item:active,
html[data-brand="fleetmagic"] .home-nav__dropdown-menu .dropdown-item.active {
    background: transparent;
    color: #b91c1c;
    text-decoration: underline;
}

/* Hub hero photo (MG-1076, Xavier 2026-11-01). The truck is cropped from the fuel-control
   slide of fleetmagic.biz (wp-content/uploads/2021/02/Combustible2.png): the left part only,
   so none of the slide's own headline or logo comes along. PLACEHOLDER like the rest of this
   sheet until FleetMagic approves it.
   It sits in the right part of the card and fades into the gradient through a mask, so the
   title, tagline and Sign in keep the solid red behind them. Below the md breakpoint the photo
   steps aside rather than sit under the text. */
html[data-brand="fleetmagic"] .cp-hero::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(52%, 440px);
    background: url("/img/tenants/fleetmagic/hero-truck.webp") 30% 60% / cover no-repeat;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
    pointer-events: none;
}

/* The copy wraps before the visible part of the photo begins (the mask leaves roughly the
   first quarter of its box transparent), so no line of text ever runs over the truck. */
html[data-brand="fleetmagic"] .cp-hero > * {
    max-width: calc(100% - 0.75 * min(52%, 440px));
}

/* Below md the card is too narrow for copy and photo side by side: the photo steps aside and
   the copy takes the full width again. */
@media (max-width: 767.98px) {
    html[data-brand="fleetmagic"] .cp-hero::before {
        display: none;
    }

    html[data-brand="fleetmagic"] .cp-hero > * {
        max-width: none;
    }
}

/* MG-1176 — the Academy hub (Views/CompanyPage/_HubAcademy.cshtml, Styles/components/_hub-academy.scss).
   The hero is FleetMagic's navy in both themes, with the same truck photo as the Standard hero above.
   White on the brand red (#ff3131) is 3.7:1 and passes only as large text, so the white-labelled
   buttons and the banner use the darker red (white on #b91c1c is 6.5:1). PLACEHOLDER like the rest of
   this sheet until FleetMagic approves it. */
html[data-brand="fleetmagic"] {
    --academy-canvas: #162056;
    --academy-panel: #1e2b6b;
    --academy-on-dark-muted: #c3c9ec;
    --academy-on-dark-accent: #ff9a9a;
    --academy-cta: #b91c1c;
    --academy-hero-image: url("/img/tenants/fleetmagic/hero-truck.webp");
}
