/* ══════════════════════════════════════════════════════════════
   PUBLIC SHELL — shared navbar + footer for all public pages.
   Loaded on every public page. Edit here to change the header/footer
   everywhere at once. Page-specific CSS files no longer define nav/footer.
   ══════════════════════════════════════════════════════════════ */

:root {
  --shell-blue: #2563EB;
  --shell-blue-light: #3B82F6;
  --shell-blue-border: #BFDBFE;
  --shell-text: #0F172A;
  --shell-text-mid: #334155;
}

/* ══════════════════════════════════════════════════════════════
   NAVBAR — three-zone header: brand · centered links · actions
   ══════════════════════════════════════════════════════════════ */
nav#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.6rem 6% 0;
  background: transparent;
  transition: padding 0.3s ease;
}

nav#navbar .pub-nav__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 60px;
  padding: 0 0.75rem;
  max-width: 1240px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(191, 219, 254, 0.55);
  border-radius: 16px;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.05);
  transition: background 0.3s, box-shadow 0.3s, border-color 0.3s, border-radius 0.3s;
}

/* On scroll the pill keeps its floating shape — only the surface firms up */
nav#navbar.scrolled .pub-nav__inner {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--blue-border, var(--shell-blue-border));
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.12);
}

/* ── Brand ── */
nav#navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text, var(--shell-text));
  text-decoration: none;
  flex: 1 1 0;
  min-width: 0;
  /* left zone — equal to actions so links stay centered */
}

/* Logo image — rendered at a fixed height; width scales automatically */
nav#navbar .logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
  /* Subtle drop-shadow so the logo pops on any background */
  filter: drop-shadow(0 2px 8px rgba(37, 99, 235, 0.18));
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter  0.28s ease;
}

nav#navbar .logo:hover .logo-img {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 14px rgba(37, 99, 235, 0.32));
}

/* ── Primary links (centered) ── */
nav#navbar .pub-nav__links {
  display: flex;
  list-style: none;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  flex: 0 1 auto;
}

nav#navbar .pub-nav__links>li {
  display: flex;
}

nav#navbar .pub-nav__links a {
  color: var(--text-mid, var(--shell-text-mid));
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 9px;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

nav#navbar .pub-nav__links a:hover {
  color: var(--blue, var(--shell-blue));
  background: rgba(37, 99, 235, 0.07);
}

nav#navbar .pub-nav__links a.active {
  color: var(--blue, var(--shell-blue));
  font-weight: 600;
}

nav#navbar .pub-nav__links a.active::after {
  content: '';
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.28rem;
  height: 2px;
  border-radius: 2px;
  background: var(--blue, var(--shell-blue));
}

/* ── Actions ── */
nav#navbar .pub-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 0;
  justify-content: flex-end;
  /* right zone — equal to brand */
}

nav#navbar .nav-link-plain {
  color: var(--text-mid, var(--shell-text-mid));
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  border-radius: 9px;
  transition: color 0.2s, background 0.2s;
}

nav#navbar .nav-link-plain:hover {
  color: var(--blue, var(--shell-blue));
  background: rgba(37, 99, 235, 0.07);
}

nav#navbar .nav-cta {
  background: linear-gradient(135deg, var(--blue, var(--shell-blue)), var(--blue-light, var(--shell-blue-light)));
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

nav#navbar .nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.4);
  filter: brightness(1.04);
}

/* Actions shown only inside the mobile drawer.
   Specificity must beat `.pub-nav__links > li { display: flex }`, so match the li. */
nav#navbar .pub-nav__links>li.pub-nav__mobile-actions {
  display: none;
}

/* ── Hamburger (animated) ── */
nav#navbar .hamburger {
  display: none;
  cursor: pointer;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  border-radius: 10px;
  transition: background 0.2s;
}

nav#navbar .hamburger:hover {
  background: rgba(37, 99, 235, 0.07);
}

nav#navbar .hamburger span {
  width: 22px;
  height: 2px;
  display: block;
  background: var(--text, var(--shell-text));
  border-radius: 2px;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
}

nav#navbar.is-open .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

nav#navbar.is-open .hamburger span:nth-child(2) {
  opacity: 0;
}

nav#navbar.is-open .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ══════════════════════════════════════════════════════════════
   FOOTER — CTA strip · brand + contact · link columns · bottom bar
   ══════════════════════════════════════════════════════════════ */
footer.site-footer {
  position: relative;
  background:
    radial-gradient(900px 380px at 85% -10%, rgba(37, 99, 235, 0.14), transparent 60%),
    #0B1220;
  color: #94A3B8;
  padding: 0 6% 2rem;
  margin-top: 5rem;
}

/* thin gradient hairline across the very top */
footer.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--blue, var(--shell-blue)), #60a5fa, transparent);
}

/* ── CTA strip ── */
footer.site-footer .footer-cta {
  max-width: 1200px;
  margin: 0 auto;
  transform: translateY(-2.25rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1.9rem 2.4rem;
  background: linear-gradient(135deg, var(--blue, var(--shell-blue)) 0%, #1E3A8A 100%);
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 18px;
  box-shadow: 0 24px 50px rgba(37, 99, 235, 0.28);
}

footer.site-footer .footer-cta__text h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.35rem;
}

footer.site-footer .footer-cta__text p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}

footer.site-footer .footer-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  background: #fff;
  color: var(--blue, var(--shell-blue));
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: 11px;
  box-shadow: 0 8px 22px rgba(2, 6, 23, 0.28);
  transition: transform 0.2s, box-shadow 0.2s;
}

footer.site-footer .footer-cta__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.36);
}

/* ── Main grid ── */
footer.site-footer .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Brand column */
footer.site-footer .footer-brand p {
  font-size: 0.84rem;
  color: #94A3B8;
  line-height: 1.7;
  margin: 1rem 0 1.5rem;
  max-width: 320px;
}

footer.site-footer .footer-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* Logo image in the footer — white-text variant sits perfectly on the dark bg */
footer.site-footer .footer-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(37, 99, 235, 0.25));
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter  0.28s ease;
}

footer.site-footer .footer-logo:hover .footer-logo-img {
  transform: scale(1.04);
  filter: drop-shadow(0 4px 16px rgba(96, 165, 250, 0.4));
}

/* Contact chips */
footer.site-footer .footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

footer.site-footer .footer-contact__item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  color: #CBD5E1;
  text-decoration: none;
  font-size: 0.84rem;
  transition: color 0.2s, transform 0.2s;
}

footer.site-footer .footer-contact__item:hover {
  color: #60a5fa;
  transform: translateX(2px);
}

/* Link columns */
footer.site-footer .footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

footer.site-footer .footer-links h4 {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  margin-bottom: 1.1rem;
  color: #fff;
}

footer.site-footer .footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
}

footer.site-footer .footer-links a {
  color: #94A3B8;
  text-decoration: none;
  font-size: 0.84rem;
  position: relative;
  transition: color 0.2s, padding-left 0.2s;
}

footer.site-footer .footer-links a::before {
  content: '';
  position: absolute;
  left: -0.7rem;
  top: 50%;
  width: 0;
  height: 1.5px;
  background: #60a5fa;
  transform: translateY(-50%);
  transition: width 0.2s;
}

footer.site-footer .footer-links a:hover {
  color: #fff;
  padding-left: 0.7rem;
}

footer.site-footer .footer-links a:hover::before {
  width: 0.4rem;
}

/* Bottom bar */
footer.site-footer .footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #64748B;
  gap: 1rem;
  flex-wrap: wrap;
}

footer.site-footer .footer-made {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ══ RESPONSIVE ══ */
@media (max-width: 980px) {

  /* Hide desktop center links + right actions; reveal hamburger */
  nav#navbar .pub-nav__actions {
    display: none;
  }

  nav#navbar .hamburger {
    display: flex;
  }

  /* Drawer: links drop out of the pill into a card below it */
  nav#navbar .pub-nav__links {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    margin: 0;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--blue-border, var(--shell-blue-border));
    border-radius: 16px;
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  }

  nav#navbar .pub-nav__links.open {
    display: flex;
  }

  nav#navbar.scrolled .pub-nav__links {
    top: calc(100% + 0.35rem);
  }

  nav#navbar .pub-nav__links>li {
    display: block;
  }

  nav#navbar .pub-nav__links a {
    display: block;
    padding: 0.7rem 0.85rem;
    font-size: 0.92rem;
  }

  nav#navbar .pub-nav__links a.active::after {
    display: none;
  }

  /* Show the in-drawer action buttons */
  nav#navbar .pub-nav__links>li.pub-nav__mobile-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin-top: 0.6rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--blue-mid, #DBEAFE);
  }

  nav#navbar .pub-nav__mobile-actions .nav-link-plain,
  nav#navbar .pub-nav__mobile-actions .nav-cta {
    flex: 1;
    text-align: center;
  }

  nav#navbar .pub-nav__mobile-actions .nav-link-plain {
    border: 1px solid var(--blue-border, var(--shell-blue-border));
  }

  /* Footer: stack brand above the link columns */
  footer.site-footer .footer-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 600px) {
  footer.site-footer {
    padding: 0 1.5rem 2rem;
  }

  footer.site-footer .footer-cta {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 1.6rem 1.5rem;
  }

  footer.site-footer .footer-cta__btn {
    width: 100%;
    justify-content: center;
  }

  footer.site-footer .footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
  }

  footer.site-footer .footer-bottom {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 380px) {
  footer.site-footer .footer-cols {
    grid-template-columns: 1fr;
  }
}