/* The website's header and footer around the browser (web.py site_chrome), and the one-pane
   layout for narrow screens. The markup is bark-website's (redesign/partials/nav.html and
   footer.html); these rules follow its page.css for the same classes, on BARK design tokens
   (tokens.css). Loaded after style.css. */

/* ---------- site header ---------- */
body.site { --site-nav-h: 64px; }
.site .nav {
  position: sticky; top: 0; z-index: var(--z-sticky);
  height: var(--site-nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
  font-family: var(--font-body);
}
.site .nav-inner {
  max-width: var(--container-lg); height: 100%; margin: 0 auto; padding: 0 var(--space-6);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-6);
}
.site .nav-logo { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; }
.site .nav-logo img { height: 32px; width: auto; filter: brightness(0); }
.site .nav-logo span { font-size: var(--text-sm); font-weight: var(--weight-bold); letter-spacing: var(--tracking-caps); color: var(--fg); }
.site .nav-links { display: flex; align-items: center; gap: var(--space-8); }
.site .nav-links a, .site .nav-login {
  font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--fg-secondary); text-decoration: none;
  transition: color var(--dur-normal) var(--ease-standard), background var(--dur-normal) var(--ease-standard);
}
.site .nav-links a:hover, .site .nav-login:hover { color: var(--fg); text-decoration: none; }
.site .nav-links a[aria-current="page"] { color: var(--fg); }
.site .nav-right { display: flex; align-items: center; gap: var(--space-3); }
.site .nav-login { font-weight: var(--weight-semibold); padding: var(--space-2) var(--space-4); border-radius: var(--radius-lg); }
.site .nav-login:hover { background: var(--surface-sunken); }
.site .nav-cta {
  display: inline-flex; align-items: center;
  font-size: var(--text-sm); font-weight: var(--weight-semibold);
  background: var(--primary); color: var(--on-primary);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-lg); text-decoration: none;
  transition: background var(--dur-normal) var(--ease-standard);
}
.site .nav-cta:hover { background: var(--primary-hover); color: var(--on-primary); text-decoration: none; }
.site .nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: var(--space-2); color: var(--fg); }
.site .nav-mobile {
  display: none; position: fixed; top: var(--site-nav-h); left: 0; right: 0; z-index: var(--z-dropdown);
  background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
  padding: var(--space-3) var(--space-6) var(--space-5); font-family: var(--font-body);
}
.site .nav-mobile.open { display: block; }
.site .nav-mobile a {
  display: block; padding: var(--space-3) var(--space-1); border-bottom: 1px solid var(--divider);
  font-size: var(--text-base); font-weight: var(--weight-medium); color: var(--fg); text-decoration: none;
}
.site .nav-mobile .nav-mobile-cta {
  margin-top: var(--space-4); border: 0; border-radius: var(--radius-lg); text-align: center;
  background: var(--primary); color: var(--on-primary); font-weight: var(--weight-semibold);
}
@media (max-width: 1000px) {
  .site .nav-links, .site .nav-login, .site .nav-cta { display: none; }
  .site .nav-burger { display: block; }
}

/* ---------- site footer ---------- */
.site .footer { background: var(--primary); color: var(--fg-inverse); padding: var(--space-8) var(--space-8) var(--space-10); font-family: var(--font-body); }
.site .footer-inner { max-width: var(--container-lg); margin: 0 auto; }
.site .footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: var(--space-10); }
.site .footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.site .footer-brand { gap: var(--space-3); }
.site .footer-brand-logo { height: 96px; width: auto; filter: brightness(0) invert(1); opacity: 0.9; }
.site .footer-tagline, .site .footer-address { margin: 0; font-size: var(--text-xs); line-height: var(--leading-relaxed); opacity: 0.6; }
.site .footer-brand-links { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.site .footer-col-title {
  margin: 0; font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps); text-transform: uppercase; opacity: 0.65;
}
.site .footer-col a {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-xs); color: var(--fg-inverse); opacity: 0.65; text-decoration: none;
  transition: opacity var(--dur-normal) var(--ease-standard);
}
.site .footer-col a:hover { opacity: 0.85; text-decoration: none; }
.site .footer-address strong { display: block; margin-bottom: var(--space-1); font-weight: var(--weight-semibold); }
.site .footer-copy {
  margin-top: var(--space-8); padding-top: var(--space-4); border-top: 1px solid var(--bark-navy-600);
  display: flex; align-items: center; justify-content: center; gap: var(--space-3); flex-wrap: wrap;
  font-size: var(--text-xs); opacity: 0.65;
}
.site .footer a:focus-visible, .site .nav a:focus-visible, .site .nav button:focus-visible {
  outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-md);
}
@media (max-width: 768px) {
  .site .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
}

/* ---------- the four panes under the site header ----------
   Locally (no site header) the panes fill the window and the page never scrolls (style.css). On
   the website the header sits above them and the footer below: the panes fill the window under
   the header, and the page scrolls only to reach the footer. */
body.site.app { height: auto; overflow: visible; }
.site .shell4 { height: calc(100vh - var(--site-nav-h)); }
.site .shell4 .gutter { height: 100%; }

/* ---------- narrow screens: one pane at a time, chosen with tabs ---------- */
.ptabs { display: none; }
@media (max-width: 900px) {
  body.app { height: auto; overflow: visible; }
  .ptabs {
    display: flex; position: sticky; top: var(--site-nav-h, 0px); z-index: var(--z-sticky);
    background: var(--surface); border-bottom: 1px solid var(--border); font-family: var(--font-body);
  }
  .ptabs button {
    flex: 1 1 0; padding: var(--space-3) var(--space-1); border: 0; border-bottom: 2px solid transparent;
    background: none; font: inherit; font-size: var(--text-sm); font-weight: var(--weight-medium);
    color: var(--fg-secondary); cursor: pointer;
  }
  .ptabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--secondary); }
  .shell4, .site .shell4 { display: block; height: auto; }
  .shell4 > .gutter { display: none; }
  .shell4 > .pane { display: none; visibility: visible; overflow: visible; min-height: 60vh; }
  body[data-tab="p1"] .shell4 > .p1, body[data-tab="p2"] .shell4 > .p2,
  body[data-tab="p3"] .shell4 > .p3, body[data-tab="p4"] .shell4 > .p4 { display: block; }
  .p1 .navtree, .p2 .navtree { overflow: visible; }
}

/* ---------- embed mode (/library/embed/…: the Library in BARK Chat's side panel) ----------
   No site header or footer (base.html); the panes fill the frame, Text first on a narrow frame
   (the rules above). The build-time footer under the text is for the site only. */
.embed .foot { display: none; }
