/* ============================================================================
   BolEnglish site header and footer for pages that do NOT load be-shell.css
   (the lesson pages built by lq-core.js).

   These are the same header and footer rules as /assets/be-shell.css, but every
   rule is scoped to .topbar or .site-footer and the brand colours are set on
   those two elements only, so adding this file changes nothing else on a page.
   Keep it in step with be-shell.css. Pair with /css/learn-nav.css (the menu).

   The header stays pinned to the top while the page scrolls, as it does with
   be-shell.css. The one exception is a page that pins a bar of its own (the
   Tech and People Skills topic pages pin their "Back to topics" bar): there
   the header scrolls away, so the two bars never sit on top of each other.
   ========================================================================== */
.topbar, .site-footer{
  --purple:#7c3aed; --green:#ec4899; --muted:#6b6786; --ink:#1f1b3a;
  font-family:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif; line-height:1.6; color:var(--ink);
  -webkit-font-smoothing:antialiased;
}
.topbar :where(*), .site-footer :where(*){ box-sizing:border-box; margin:0; padding:0; }

/* ---------- header ---------- */
.topbar{ position:relative; z-index:50; background:transparent; padding-top:16px; }
/* pinned, unless the page pins a bar of its own (a visible header.sticky; the lesson engine's
   own bar is hidden and carries .glass-strong). Browsers without :has() keep the unpinned header. */
body:not(:has(header.sticky:not(.glass-strong))) .topbar{ position:sticky; top:0; }
html:not(:has(header.sticky:not(.glass-strong))){ scroll-padding-top:92px; }
/* the lesson stylesheet sets overflow-x:hidden on <body>, which turns <body> into a scroll box and
   stops anything inside it from pinning to the window; clip hides the same overflow without that */
body:not(:has(header.sticky:not(.glass-strong))){ overflow-x:clip; }
.topbar .wrap{ display:flex; align-items:center; gap:22px; max-width:1280px; width:calc(100% - 2rem); margin:0 auto;
  background:rgba(255,255,255,.72); border:1px solid rgba(255,255,255,.6); border-radius:18px; padding:11px 22px;
  box-shadow:0 14px 38px -16px rgba(124,58,237,.34); backdrop-filter:blur(14px) saturate(1.6); -webkit-backdrop-filter:blur(14px) saturate(1.6); }
.topbar .brand{ display:flex; align-items:center; gap:10px; text-decoration:none; }
.topbar .brand .logo{ width:38px; height:38px; flex:none; display:grid; place-items:center; border-radius:12px; font-size:20px; overflow:hidden; padding:0;
  background:linear-gradient(135deg,var(--purple),var(--green)); box-shadow:0 8px 20px -6px rgba(124,58,237,.55); }
.topbar .brand .logo .brandcat, .site-footer .sf-logo .brandcat{ width:100%; height:100%; max-width:none; object-fit:cover; border-radius:inherit; display:block; }
.topbar .brand .tx{ display:flex; flex-direction:column; line-height:1.04; }
.topbar .brand .nm{ font-family:'Fredoka',sans-serif; font-weight:700; font-size:20px;
  background:linear-gradient(135deg,var(--purple),var(--green)); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.topbar .brand .tag{ font-size:10px; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); margin-top:2px; }
.topbar .top-right{ display:flex; align-items:center; gap:12px; margin-left:auto; }
.topbar .lang-btn{ display:inline-flex; align-items:center; gap:6px; font-family:'Inter',sans-serif; font-weight:700; font-size:14px; color:var(--ink);
  background:#f3f0ff; border:0; border-radius:9999px; padding:9px 14px; cursor:pointer; transition:.2s; }
.topbar .lang-btn:hover{ background:#e9e3ff; }
.topbar .nav-cta{ font-family:'Inter',sans-serif; font-weight:600; font-size:14px; color:#fff; background:linear-gradient(135deg,var(--purple),var(--green));
  padding:10px 20px; border-radius:9999px; text-decoration:none; transition:.25s; border:none; cursor:pointer; box-shadow:0 8px 20px -6px rgba(124,58,237,.5); }
.topbar .nav-cta:hover{ transform:translateY(-1px); box-shadow:0 12px 26px -6px rgba(124,58,237,.6); }
@media(max-width:520px){ .topbar .nav-cta{ display:none; } }
/* 360px and narrower: tighter bar so the logo, language button and menu button all fit */
@media(max-width:360px){
  .topbar .wrap{ gap:10px; padding:10px 12px; }
  .topbar .brand{ gap:8px; }
  .topbar .brand .nm{ font-size:18px; }
  .topbar .top-right{ gap:8px; }
  .topbar .lang-btn{ padding:9px 10px; }
}

/* ---------- footer ---------- */
.site-footer{ position:relative; margin-top:40px; }
.site-footer .fwrap{ max-width:1280px; margin:0 auto; padding:0 24px 40px; }
.site-footer .sf-card{ background:rgba(255,255,255,.78); backdrop-filter:blur(20px) saturate(140%); -webkit-backdrop-filter:blur(20px) saturate(140%);
  border:1px solid rgba(124,58,237,.12); box-shadow:0 8px 24px -8px rgba(124,58,237,.18); border-radius:24px; padding:32px; }
@media(min-width:768px){ .site-footer .sf-card{ padding:48px; } }
.site-footer .sf-grid{ display:grid; grid-template-columns:minmax(0,1fr); gap:32px; margin-bottom:32px; }
@media(min-width:768px){ .site-footer .sf-grid{ grid-template-columns:repeat(4,1fr); } .site-footer .sf-brand{ grid-column:span 2; } }
.site-footer .sf-id{ display:flex; align-items:center; gap:8px; margin-bottom:16px; }
.site-footer .sf-logo{ width:40px; height:40px; flex:none; display:grid; place-items:center; border-radius:12px; font-size:24px; overflow:hidden; padding:0; background:linear-gradient(135deg,#7c3aed,#ec4899); }
.site-footer .sf-name{ font-family:'Fredoka',sans-serif; font-weight:700; font-size:18px; background:linear-gradient(135deg,#7c3aed,#ec4899,#3b82f6); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.site-footer .sf-tag{ font-size:14px; color:#5b5878; max-width:384px; margin-bottom:20px; line-height:1.55; }
.site-footer .sf-news{ display:flex; gap:8px; max-width:384px; }
.site-footer .sf-news input{ flex:1; min-width:0; padding:12px 16px; border-radius:12px; border:1px solid rgba(124,58,237,.12); background:#f3f0ff; color:#1f1b3a; font-size:14px; font-family:'Inter',sans-serif; outline:none; }
.site-footer .sf-news input:focus{ border-color:#7c3aed; }
.site-footer .sf-news button{ flex:none; display:inline-flex; align-items:center; justify-content:center; padding:12px 16px; border:0; border-radius:14px; cursor:pointer; color:#fff; background:linear-gradient(135deg,#7c3aed,#ec4899); box-shadow:0 8px 22px -8px rgba(124,58,237,.6); transition:transform .2s ease,box-shadow .2s ease; }
.site-footer .sf-news button:hover{ transform:translateY(-2px) scale(1.02); box-shadow:0 14px 30px -10px rgba(236,72,153,.65); }
.site-footer .sf-news button svg{ width:16px; height:16px; }
.site-footer .sf-msg{ font-size:12px; margin-top:8px; color:#10b981; }
.site-footer .sf-col h4{ font-family:'Inter',sans-serif; font-weight:700; font-size:16px; line-height:1.3; color:#1f1b3a; margin:0 0 12px; }
.site-footer .sf-col a{ display:block; font-size:14px; color:#5b5878; text-decoration:none; margin-bottom:8px; transition:color .18s ease; }
.site-footer .sf-col a:hover{ color:#7c3aed; }
.site-footer .sf-bottom{ display:flex; flex-direction:column; gap:16px; align-items:center; padding-top:24px; border-top:1px solid rgba(124,58,237,.12); }
@media(min-width:640px){ .site-footer .sf-bottom{ flex-direction:row; justify-content:space-between; } }
.site-footer .sf-copy{ font-size:12px; color:#5b5878; text-align:center; }
.site-footer .sf-copy a{ font-weight:600; text-decoration:underline; color:inherit; }
.site-footer .sf-copy a:hover{ color:#7c3aed; }
.site-footer .sf-social{ display:flex; gap:12px; }
.site-footer .sf-social a{ width:36px; height:36px; display:grid; place-items:center; border-radius:8px; color:#1f1b3a; background:#f3f0ff; transition:transform .2s ease; }
.site-footer .sf-social a:hover{ transform:scale(1.1); }
.site-footer .sf-social svg{ width:16px; height:16px; }

.topbar :focus-visible, .site-footer :focus-visible{ outline:3px solid var(--green); outline-offset:2px; border-radius:6px; }
@media(prefers-reduced-motion:reduce){ .topbar *, .site-footer *{ transition:none !important; } }
