/* ═══════════════════════════════════════════════════════════════════════════
   kysira.ai site bar + footer (markup: overrides/main.html)
   Mirrors kysira-site SiteNav.astro (navy bar, #1b2638 line, #38bdf8 accent,
   bracketed outline CTA) and Footer.astro (neutral-50/100 bands, 4-col grid).
   Everything is scoped under .site-bar / .site-footer so Material's .md-typeset
   and .md-banner / .md-footer rules don't leak in.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Site bar ────────────────────────────────────────────────────────────── */

/* Material renders the `announce` block in a banner that takes the footer
   colors, clips overflow (which would cut off the dropdowns) and pads/sizes
   its inner wrapper as typeset text. Neutralise all of that. */
.md-banner {
  background-color: #020617;
  color: #f8fafc;
  border-bottom: 1px solid #1b2638;
  overflow: visible;
}
.md-banner .md-banner__inner {
  max-width: none;
  margin: 0;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
}

.site-bar {
  font-family: var(--md-text-font-family);
  font-size: 14px;
  line-height: 1;
  color: #f8fafc;
}
/* The banner is .md-typeset, whose `ul:not([hidden])` (display, margins,
   bullets) out-ranks plain class selectors — hence the .md-banner prefix on
   every list rule below. */
.md-banner .site-bar ul,
.md-banner .site-bar li {
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-bar__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 61rem;          /* same grid as the docs header below */
  height: 56px;
  margin: 0 auto;
  padding: 0 0.8rem;
}
.site-bar__brand img {
  display: block;
  width: auto;
  height: 24px;
}
.md-banner .site-bar .site-bar__links {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 22px;
}

/* Links and menu triggers (button reset + hover/current sky) */
.site-bar .site-bar__link {
  display: inline-flex;
  align-items: center;
  height: 56px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: #f8fafc;
  cursor: pointer;
}
.site-bar .site-bar__link:hover,
.site-bar .site-bar__link:focus-visible,
.site-bar .site-bar__link[aria-current] {
  color: #38bdf8;
}
.site-bar a:focus-visible,
.site-bar button:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 4px;
}
/* Links span the bar's full height, so an outset ring would be clipped */
.site-bar .site-bar__link:focus-visible { outline-offset: -2px; }

/* Dropdowns: hover for mouse, focus-within for keyboard. The panel overlaps the
   bar's bottom edge so there is no gap for :hover to fall through. */
.site-bar__item--menu { position: relative; }
.md-banner .site-bar .site-bar__panel {
  display: none;
  position: absolute;
  top: calc(100% - 6px);
  left: -16px;
  z-index: 10;               /* above the sticky docs header (4) and tabs (3) */
  min-width: 190px;
  padding: 8px;
  background: #1e293b;
  border: 1px solid #1b2638;
  border-radius: 6px;
  box-shadow: 0 18px 40px rgb(0 0 0 / 35%);
}
.md-banner .site-bar__item--menu:hover > .site-bar__panel,
.md-banner .site-bar__item--menu:focus-within > .site-bar__panel {
  display: block;
}
.site-bar .site-bar__panel a {
  display: block;
  padding: 9px 10px;
  border-radius: 4px;
  color: #f8fafc;
}
.site-bar .site-bar__panel a:hover,
.site-bar .site-bar__panel a:focus-visible {
  background: #0f172a;
  color: #38bdf8;
}

/* "Contact Us": square outline button with the site's corner bracket */
.site-bar .site-bar__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #f8fafc;
  color: #f8fafc;
  letter-spacing: 0.01em;
  transition: background 0.2s, color 0.2s;
}
.site-bar .site-bar__cta::after {
  content: "";
  position: absolute;
  top: -5px;
  right: -5px;
  width: 9px;
  height: 9px;
  border-top: 1.5px solid #f8fafc;
  border-right: 1.5px solid #f8fafc;
  transition: transform 0.2s;
}
.site-bar .site-bar__cta:hover,
.site-bar .site-bar__cta:focus-visible {
  background: #f8fafc;
  color: #020617;
}
.site-bar .site-bar__cta:hover::after { transform: translate(2px, -2px); }

/* Narrow screens: just the wordmark and the CTA. Material's own drawer button
   sits right below, and the footer carries every site link. */
@media screen and (max-width: 59.9375em) {
  .md-banner .site-bar .site-bar__links { display: none; }
  .site-bar__inner { justify-content: space-between; }
}

/* ── Site footer ─────────────────────────────────────────────────────────── */

.site-footer {
  --sf-main-bg:     #f8fafc;   /* neutral-50 */
  --sf-main-line:   #f1f5f9;   /* neutral-100 */
  --sf-sub-bg:      #f1f5f9;   /* neutral-100 */
  --sf-sub-line:    #e2e8f0;   /* neutral-200 */
  --sf-heading:     #334155;   /* neutral-700 */
  --sf-text:        #64748b;   /* neutral-500 */
  --sf-sub-text:    #475569;   /* neutral-600 */
  --sf-hover:       #0ea5e9;   /* primary-500 */
  font-family: var(--md-text-font-family);
  font-size: 16px;
  line-height: 1.5;
  color: var(--sf-text);
}
[data-md-color-scheme="slate"] .site-footer {
  --sf-main-bg:     #020617;
  --sf-main-line:   #1b2638;
  --sf-sub-bg:      #0f172a;
  --sf-sub-line:    #1b2638;
  --sf-heading:     #e2e8f0;
  --sf-text:        #cbd5e1;
  --sf-sub-text:    #94a3b8;
  --sf-hover:       #38bdf8;
}

.site-footer__inner {
  max-width: 61rem;
  margin: 0 auto;
  padding: 0 0.8rem;
}
.site-footer__main {
  background: var(--sf-main-bg);
  border-top: 1px solid var(--sf-main-line);
}
.site-footer__main .site-footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 24px;
  padding-top: 64px;
  padding-bottom: 48px;
}
.site-footer__about p {
  max-width: 24rem;
  margin: 0;
  font-size: 14px;
}
.site-footer__logo {
  display: block;
  width: auto;
  height: 32px;
  margin-bottom: 24px;
}
.site-footer__logo--dark { display: none; }
[data-md-color-scheme="slate"] .site-footer__logo--light { display: none; }
[data-md-color-scheme="slate"] .site-footer__logo--dark { display: block; }

.site-footer h2 {
  margin: 0 0 24px;
  font-size: 18px;
  font-weight: 500;
  line-height: 32px;
  letter-spacing: normal;
  color: var(--sf-heading);
}
.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer li {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 24px;
}
.site-footer a {
  color: inherit;
  transition: color 0.3s;
}
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--sf-hover);
}

.site-footer__sub {
  background: var(--sf-sub-bg);
  border-top: 1px solid var(--sf-sub-line);
}
.site-footer__sub .site-footer__inner {
  padding-top: 16px;
  padding-bottom: 16px;
}
.site-footer__sub p {
  margin: 0;
  font-size: 14px;
  color: var(--sf-sub-text);
}

/* Material hides its own footer in print; keep the site footer out too */
@media print {
  .site-footer { display: none; }
}

@media screen and (max-width: 59.9375em) {
  .site-footer__main .site-footer__inner {
    grid-template-columns: repeat(3, 1fr);
    padding-top: 48px;
  }
  .site-footer__about { grid-column: 1 / -1; }
}
@media screen and (max-width: 29.9375em) {
  .site-footer__main .site-footer__inner { grid-template-columns: 1fr 1fr; }
}
