/* Site header + footer, shared by the homepages (home.css) and the guides (site.css + guide.css).
   They carry their own palette and type so they render the same whatever the page tokens are.
   Header: one frame everywhere (logo, language switch, Get-the-app pill); the homepages show section
   links in the middle, the guides show "Invois | Guides" plus a link back to the app. */
.site-head, .site-foot {
  --ink: #22304a; --ink-soft: #425466; --line: #e6e9ef; --white: #fff; --paper: #f6f8fb;
  --brand-wash: #ecebff; --brand-deep: #3a33c9; --brand-dark: #4b45e0;
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.5; color: var(--ink);
}
html:lang(zh-Hans) .site-head, html:lang(zh-Hans) .site-foot { font-family: "Figtree", "Noto Sans SC", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif; }
.site-head a:hover, .site-foot a:hover { text-decoration: none; }
.site-head img, .site-foot img { display: block; }

/* ───── header ───── */
/* A slim 64px bar: logo on the left; everything else grouped on the right — section links (homepages) and Guides,
   then the language links (EN / BM / 中文), then Get the app — with thin dividers between the three groups. */
.site-head { padding: 0; margin: 0; border: 0; border-bottom: 1px solid var(--line); background: var(--white); font-size: 16px; }
.site-head .nav { max-width: 1248px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 28px; }

.brand { display: flex; align-items: center; gap: 8px; margin-right: auto; color: var(--ink); }
.brand:hover { color: var(--ink); }
.site-head .brand img { width: 26px; height: 26px; }
.brand span { font-family: "Bricolage Grotesque", "Figtree", system-ui, sans-serif; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }

/* guides: "Invois | Guides" */
.brand-group { display: flex; align-items: center; gap: 12px; min-width: 0; margin-right: auto; }
.brand-group .brand { margin-right: 0; }
.brand-sep { width: 1px; height: 18px; background: #d5d9e3; }
.brand-sub { font-family: "Bricolage Grotesque", "Figtree", system-ui, sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
.brand-sub:hover { color: var(--brand-deep); }
html:lang(zh-Hans) .brand-sub { font-family: inherit; letter-spacing: 0; }

/* homepages: in-page section links, then Guides (first in .nav-end) styled the same */
.nav-links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.nav-links a { color: var(--ink-soft); white-space: nowrap; }
.nav-links a:hover { color: var(--ink); }

.nav-end { display: flex; align-items: center; gap: 20px; }
.nav-guides, .nav-about { display: inline-flex; align-items: center; min-height: 36px; font-size: 15px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.nav-guides:hover, .nav-about:hover { color: var(--ink); }

/* language: plain text links, the current one dark, separated by slashes; a thin divider on each side */
.lang { display: flex; align-items: center; gap: 6px; padding: 0 20px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 14px; font-weight: 600; line-height: 1; }
.lang a { padding: 6px 0; color: #9aa1b4; white-space: nowrap; }
.lang a:hover { color: var(--ink); }
.lang a[aria-current] { color: var(--ink); }
.lang .sep { color: #c9cede; font-weight: 400; }
.nav-end > .lang:first-child { padding-left: 0; border-left: 0; }

.pill-btn { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 600; font-size: 15px; white-space: nowrap; }
.pill-btn:hover { color: #fff; background: #2d3d5c; }

/* five section links + Guides (BM labels are the longest) need ~1100px at a 20px gap; below that they hide */
@media (max-width: 1180px) { .site-head .nav { gap: 20px; } .nav-links { gap: 20px; } .nav-end { gap: 16px; } .lang { padding: 0 16px; } }
@media (max-width: 1100px) { .nav-links, .nav-guides { display: none; } .nav-end > .lang { padding-left: 0; border-left: 0; } }
@media (max-width: 760px) { .nav-about { display: none; } }
@media (max-width: 520px) {
  .site-head .nav { padding: 0 20px; gap: 12px; }
  .lang { gap: 5px; padding: 0; border: 0; font-size: 14px; }
  .brand-group { gap: 8px; }
  .brand-sub { font-size: 16px; }
  /* phones: no Get the app in the header; the hero and the bottom of each page have the store badges */
  .pill-btn { display: none; }
}
@media (max-width: 359px) { .site-head .brand span { display: none; } }

/* ───── footer ───── */
.site-foot { margin: 0; padding: 0; background: var(--paper); border: 0; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 15px; }
.foot-top { max-width: 1248px; margin: 0 auto; padding: 56px 24px 0; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.site-foot .brand img { width: 26px; height: 26px; }
.site-foot .brand span { font-size: 19px; }
.foot-brand p { margin: 0; max-width: 340px; font-size: 15px; color: var(--ink-soft); }
.foot-col { display: flex; flex-direction: column; gap: 10px; }
.foot-h { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
html:lang(zh-Hans) .foot-h { letter-spacing: 0.04em; }
.foot-col a { color: var(--ink-soft); }
.foot-col a[aria-current] { color: var(--ink); font-weight: 600; }
.foot-col a:hover, .foot-lang a:hover { color: var(--ink); }
.foot-bottom { max-width: 1200px; width: calc(100% - 48px); margin: 44px auto 0; padding: 20px 0 32px; border-top: 1px solid #e3e6ee; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; font-size: 14px; }
.foot-lang { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot-lang a { color: var(--ink-soft); white-space: nowrap; }
.foot-lang a[aria-current] { color: var(--ink); font-weight: 600; }
@media (max-width: 720px) {
  .foot-top { grid-template-columns: 1fr 1fr; gap: 32px 24px; padding: 40px 20px 0; }
  .foot-brand { grid-column: 1 / -1; }
  .foot-col { gap: 0; }
  .foot-col a { padding: 8px 0; }
  .foot-h { margin-bottom: 4px; font-size: 12px; }
  .foot-bottom { width: calc(100% - 40px); margin-top: 32px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .foot-lang a { padding: 6px 0; }
}
