/* FusionCharge customer wiki: the SHELL (header, masthead slot, nav rail, footer) in the approved home's
 * design language. Unify plan WP1, 4 Nov 2026 (output/fusioncharge-wiki-redesign-2026-11/UNIFY-PLAN.md).
 *
 * Customer tree only. Tokens come from css/fc-ui.css (--fc-*), which loads before this file; every
 * value here also carries the approved fallback, so the shell reads right even without fc-ui.css.
 * Scope: .topbar, #fc-masthead, .nav, #nav-scrim, .site-foot. Nothing in here touches a page body,
 * so the approved home (#page.page-home, css/home-ac.css) cannot change through this file.
 *
 * Brand: the FusionCharge and Ultrafast Thailand wordmarks are SVG files (assets/home-ac/); Huawei
 * appears only as words. No logo, no petal, no #E60012.
 */

/* ------------------------------------------------------------------ skip link (first focusable) */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; min-height: 40px;
  background: var(--fc-ink, #000); color: #fff; font-weight: 600; font-size: 14px; border-radius: var(--fc-radius, 3px);
  text-decoration: none;
}
.skip-link:focus, .skip-link:focus-visible { top: 8px; box-shadow: none; outline: 2px solid var(--fc-red, #C7000B); outline-offset: 2px; text-decoration: none; }

/* ------------------------------------------------------------------ header */
.topbar {
  background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--fc-rule, #DCDCD8);
  gap: 12px; min-height: 56px; padding-top: 8px; padding-bottom: 8px;
}
.topbar .brand { gap: 12px; color: var(--fc-ink, #000); font-weight: 600; letter-spacing: 0; min-width: 0; min-height: 40px; }
.topbar .brand-mark { display: block; height: 20px; width: auto; flex: none; }
.topbar .brand-sep { flex: none; width: 1px; height: 22px; background: var(--fc-rule, #DCDCD8); }
.topbar .brand small {
  display: block; margin: 0; font: 600 11px/1.2 var(--fc-sans, 'Hanken Grotesk', Arial, sans-serif);
  letter-spacing: .14em; text-transform: uppercase; color: var(--fc-ink3, #5F5F5D);
}
.topbar .brand:focus-visible { box-shadow: none; outline: 2px solid var(--fc-red, #C7000B); outline-offset: 3px; border-radius: 2px; }

/* language toggle = the .fc-seg segmented control */
.topbar .lang-switch { flex: none; border: 1px solid var(--fc-rule, #DCDCD8); border-radius: var(--fc-radius, 3px); background: var(--fc-paper, #fff); }
.topbar .lang-switch button {
  min-height: 40px; min-width: 40px; padding: 0 12px; font: 600 13px/1 var(--fc-sans, 'Hanken Grotesk', Arial, sans-serif);
  color: var(--fc-ink3, #5F5F5D);
}
.topbar .lang-switch button + button { border-left: 1px solid var(--fc-rule, #DCDCD8); }
.topbar .lang-switch button:hover { color: var(--fc-ink, #000); background: var(--fc-mist, #F6F6F4); }
.topbar .lang-switch button.active { background: var(--fc-ink, #000); color: #fff; }
.topbar .lang-switch button:focus-visible { box-shadow: none; outline: 2px solid var(--fc-red, #C7000B); outline-offset: 2px; }

/* menu button (phone): a line-icon square, like the home's deck controls */
#nav-toggle {
  flex: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--fc-rule, #DCDCD8); border-radius: var(--fc-radius, 3px);
  background: var(--fc-paper, #fff); color: var(--fc-ink, #000); place-items: center; line-height: 0;
}
@media (max-width: 980px) { #nav-toggle { display: inline-grid; } }
#nav-toggle:hover { border-color: var(--fc-ink, #000); }
#nav-toggle:focus-visible { box-shadow: none; outline: 2px solid var(--fc-red, #C7000B); outline-offset: 2px; }

/* ------------------------------------------------------------------ masthead fallback slot
 * Shown whenever the campaign bar (js/event-bar.js, generated) is NOT mounted: after the campaign
 * closes, or if the script is blocked or fails. While the bar runs it sets html.has-campaign and this
 * slot steps aside, so only one band ever sits above the header. Print hides it, like the header. */
.fc-masthead { background: var(--fc-paper, #fff); border-top: 3px solid var(--fc-red, #C7000B); border-bottom: 1px solid var(--fc-rule-soft, #ECECE9); }
html.has-campaign .fc-masthead { display: none; }
.fcm-in {
  max-width: 1440px; margin: 0 auto; padding: 8px var(--pad, 24px); min-height: 52px;
  display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap;
}
.fcm-mark { display: block; height: 16px; width: auto; flex: none; }
.fcm-rule { flex: none; width: 1px; height: 18px; background: var(--fc-rule, #DCDCD8); }
.fcm-line { flex: 1 1 260px; min-width: 0; margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--fc-ink2, #2E2E2C); }
.fcm-go {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
  font-size: 13.5px; font-weight: 600; color: var(--fc-red, #C7000B); white-space: nowrap;
}
.fcm-go:hover { color: var(--fc-red-deep, #A5000A); text-decoration: underline; text-underline-offset: 3px; }
.fcm-art { display: block; flex: none; height: 50px; width: auto; margin: -4px 0; }

/* ------------------------------------------------------------------ nav rail */
.nav-group-label { color: var(--fc-ink4, #666664); letter-spacing: .14em; }
html[data-lang="th"] .nav-group-label { letter-spacing: 0; font-size: 12px; }   /* tracking spreads Thai marks */
.nav a {
  border-radius: var(--fc-radius, 3px); color: var(--fc-ink2, #2E2E2C); min-height: 40px;
  font-size: 14.5px; font-weight: 500;
}
.nav a:hover { background: var(--fc-paper, #fff); color: var(--fc-ink, #000); }
.nav a.active {
  background: var(--fc-paper, #fff); border-left-color: var(--fc-red, #C7000B); color: var(--fc-ink, #000);
  font-weight: 700; box-shadow: none;
}
.nav a:focus-visible { box-shadow: none; outline: 2px solid var(--fc-red, #C7000B); outline-offset: -2px; }
.nav-icon { flex: none; width: 18px; height: 18px; display: inline-grid; place-items: center; line-height: 0; color: var(--fc-ink3, #5F5F5D); }
.nav-icon svg { width: 18px; height: 18px; display: block; }
.nav a:hover .nav-icon, .nav a.active .nav-icon { color: var(--fc-red, #C7000B); }

/* ------------------------------------------------------------------ footer */
.site-foot {
  margin-top: 40px; padding: 0 var(--pad, 24px) 40px; background: var(--fc-paper, #fff);
  border-top: 1px solid var(--fc-ink, #000); color: var(--fc-ink3, #5F5F5D); font-size: 13px; line-height: 1.55;
}
.sf-in { max-width: 1440px; margin: 0 auto; }
.sf-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap;
  padding: 20px 0 14px; border-bottom: 1px solid var(--fc-rule, #DCDCD8);
}
.sf-brand { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.sf-brand:hover { text-decoration: none; }
.sf-brand img { display: block; height: 18px; width: auto; flex: none; }
.site-foot .byline { margin: 0; color: var(--fc-ink2, #2E2E2C); }
.site-foot .byline strong { font-weight: 600; }
.site-foot a { color: var(--fc-red, #C7000B); font-weight: 600; display: inline-flex; align-items: center; min-height: 40px; }
.sf-brand { min-height: 40px; }
.site-foot a:hover { color: var(--fc-red-deep, #A5000A); }
.sf-row { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--fc-rule-soft, #ECECE9); color: var(--fc-ink4, #666664); }
.site-foot .foot-channels strong { display: block; margin-bottom: 2px; font-weight: 600; color: var(--fc-ink2, #2E2E2C); }
.sf-notes { padding-top: 12px; display: grid; gap: 8px; }
.sf-notes > div { margin: 0; max-width: 150ch; }
.sf-note { color: var(--fc-ink3, #5F5F5D); }
.sf-fine { color: var(--fc-ink4, #666664); font-size: 12.5px; }

/* ------------------------------------------------------------------ narrow phones */
@media (max-width: 640px) {
  .fcm-line { flex-basis: 100%; order: 3; font-size: 13px; }
  .fcm-art, .fcm-rule { display: none; }
  .fcm-go { margin-left: auto; }
}
@media (max-width: 420px) {
  .topbar { gap: 8px; }
  .topbar .brand { gap: 3px; flex-direction: column; align-items: flex-start; }
  .topbar .brand-sep { display: none; }
  .topbar .brand-mark { height: 17px; }
  .topbar .brand small { font-size: 9.5px; letter-spacing: .12em; }
}
@media (max-width: 340px) {
  .topbar .lang-switch button { min-width: 36px; padding: 0 9px; }
  .topbar .brand-mark { height: 15px; }
  .fcm-mark { height: 14px; }
  .fcm-in { column-gap: 10px; }
}

/* phone drawer: opens directly under the header wherever it sits (js/app.js sets --nav-top on open) */
@media (max-width: 980px) {
  .nav { top: var(--nav-top, 56px); height: calc(100vh - var(--nav-top, 56px)); height: calc(100dvh - var(--nav-top, 56px)); }
  #nav-scrim { top: var(--nav-top, 56px); }
}

@media print {
  .skip-link { display: none !important; }
  .fc-masthead { display: none !important; }
  .site-foot { border-top-color: #000; }
}
