/* ═══════════════════════════════════════════════════════════════════════════
   TOP MAGARI brand layer. Loaded last on every page.

     Primary navy  #030D63   navigation, headings, footer, dark pills
     Racing red    #C90000   call-to-action buttons, active states, highlights
     Off-white     #F7F8FC   page background          Cards   #FFFFFF
     Dark sections #070D2C   loader, dark banners

   Aim: about 55% off-white, 30% navy, 10% red, 5% black. Red is kept for actions and small highlights, never for large surfaces.
   scripts/brand.js has already moved the neutrals and the old accent to the navy family; this file adds the red.
   ═══════════════════════════════════════════════════════════════════════════ */
:root{
  --brand-navy:#030D63;--brand-navy-hover:#0F1C80;--brand-red:#C90000;--brand-red-dark:#A30000;--brand-night:#070D2C;--brand-bg:#F7F8FC;
  --brand-dark:#030D63;--brand-accent:#C90000;--brand-blue:#030D63;
  --tm-blue:#C90000;--tm-blue-strong:#A30000;--tm-ink:#030D63;--tm-paper:#F7F8FC;--tm-card:#FFFFFF;
  --text-primary:#030D63;--bg-dark:#070D2C;
}
html,body{background:var(--brand-bg)}
::selection{background:rgba(201,0,0,.16);color:#030D63}
:focus-visible{outline-color:rgba(3,13,99,.45)}

/* ---- red: call-to-action buttons (a few per screen) ---- */
.hero-cta,.srch-go,.view-btn,.cf-submit,.cta-button,.btn-band-prim,.btn-checkout,.submit-btn,.btn-grad,.btn-save,.filter-apply,.ai-btn,
.btn-primary-link,.nav-cta,.nav-auth-btn,.dl-btn.primary,.basket-actions a,.tm-btn:not(.tm-btn--secondary):not(.tm-btn--ghost):not(.tm-btn--danger),
.srch-go:focus-visible{
  background:var(--brand-red)!important;color:#fff!important;border-color:transparent!important;
}
.hero-cta:hover,.srch-go:hover,.view-btn:hover,.cf-submit:hover,.cta-button:hover,.btn-band-prim:hover,.btn-checkout:hover,.submit-btn:hover,.btn-grad:hover,
.btn-save:hover,.filter-apply:hover,.ai-btn:hover,.btn-primary-link:hover,.nav-cta:hover,.nav-auth-btn:hover,.dl-btn.primary:hover,.basket-actions a:hover,
.tm-btn:not(.tm-btn--secondary):not(.tm-btn--ghost):not(.tm-btn--danger):hover{
  background:var(--brand-red-dark)!important;
}
.submit-btn:disabled{background:#6b7194!important}
/* the person icon in the header is an account button, not a call to action */
.nav-account-icon,.detail-account{background:transparent!important;color:var(--brand-navy)!important}
.nav-account-icon:hover,.detail-account:hover{background:#ECEEF7!important}
/* a signed-in user's initial stays navy (it is an identity, not an action) */
.tm-avatar{background:var(--brand-navy)!important}

/* ---- red: highlights and active states ---- */
.hero-price,.section-eyebrow,.dash-eyebrow,.cp-eyebrow,.shop-count{color:var(--brand-red)!important}
a.nav-item.active,.nav-links a.active,.home-nav-menu a:hover{color:var(--brand-red)}
.product-tab.active,.tm-tab[aria-selected="true"]{border-bottom-color:var(--brand-red)!important}
.nav-menu a.active::after{content:"";margin-left:auto;width:7px;height:7px;border-radius:50%;background:var(--brand-red);box-shadow:0 0 0 3px rgba(201,0,0,.3);flex:none}
.type-card:hover,.type-card.active{border-color:rgba(201,0,0,.45)}
.page-btn.active{background:var(--brand-navy)!important}
.brand-pill-red,.badge-new{background:var(--brand-red);color:#fff}

/* ---- navy: navigation, footer ---- */
.navbar{border-color:rgba(3,13,99,.1)}
footer.sitewide-footer,.footer{background:var(--brand-navy)!important}
footer.sitewide-footer .footer-col a:hover{color:#fff;text-decoration:underline;text-decoration-color:var(--brand-red);text-underline-offset:4px}
footer.sitewide-footer .footer-top:hover{background:var(--brand-red);border-color:var(--brand-red);color:#fff}

/* ---- dark sections ---- */
/* the loading mark is a small white disc with the navy logo (typography.css); it must stay light or the logo disappears */
.loader{background:rgba(255,255,255,.96)!important}
.loader .logo-wrap svg{fill:var(--brand-navy)!important}
.buy-hero{background:var(--brand-night)!important}
.cta-band::after{background:linear-gradient(90deg,rgba(7,13,44,.92),rgba(7,13,44,.55))!important}

/* ---- inputs and focus follow the brand ---- */
input:focus,select:focus,textarea:focus{border-color:var(--brand-navy)!important}
input[type=checkbox],input[type=radio]{accent-color:var(--brand-navy)}

/* ---- home page: no flash of plain text before the headline reveal (lang.js adds html.tm-anim, then tm-anim-done when the reveal starts) ---- */
html.tm-anim:not(.tm-anim-done) [data-split]:not(.tm-split-ready){visibility:hidden}
html.tm-anim:not(.tm-anim-done) [data-split] ~ *{opacity:0}
html.tm-anim:not(.tm-anim-done) [data-hero-float]{opacity:0}
