/* ============================================================
   SGT regression fixes - UI/nav/footer/PWA foundation
   2026-05-29
   ============================================================ */

/* Accessibility skip link: hidden until keyboard focus */
.skip-link {
  position: absolute;
  left: 12px;
  top: 8px;
  z-index: 10000;
  transform: translateY(-140%);
  opacity: 0;
  pointer-events: none;
  background: var(--teal, #06b6d4);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  outline: 3px solid rgba(6,182,212,0.35);
  outline-offset: 2px;
}

/* Shared footer normalization */
.sgt-shared-footer,
.site-footer-landing {
  width: 100%;
  margin-top: 32px;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border, #e2e8f0);
  background: var(--bg-2, var(--bg2, transparent));
  color: var(--text, #0f172a);
}
.sgt-shared-footer .footer,
.site-footer-landing .footer {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
.sgt-shared-footer .footer-brand,
.site-footer-landing .footer-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text, #0f172a);
  text-decoration: none;
  font-weight: 800;
}
.sgt-shared-footer .footer-logo-mini,
.site-footer-landing .footer-logo-mini { font-size: 20px; }
.sgt-shared-footer .footer-links,
.site-footer-landing .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
}
.sgt-shared-footer .footer-link,
.site-footer-landing .footer-link {
  color: var(--teal, #06b6d4);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.sgt-shared-footer .footer-link:hover,
.site-footer-landing .footer-link:hover,
.sgt-shared-footer .footer-link:focus-visible,
.site-footer-landing .footer-link:focus-visible { text-decoration: underline; }
.sgt-shared-footer .footer-copy,
.site-footer-landing .footer-copy {
  color: var(--muted, #64748b);
  font-size: 12px;
}
@media (max-width: 720px) {
  .sgt-shared-footer,
  .site-footer-landing { padding-bottom: calc(var(--bottom-nav, 65px) + 18px + env(safe-area-inset-bottom)); }
  .sgt-shared-footer .footer-links,
  .site-footer-landing .footer-links { gap: 8px 12px; }
}

/* Landing CTA contrast guard for dark/gradient blocks */
.waitlist-banner .btn-outline,
.partner-card .btn-outline,
.cta-banner .btn-outline,
.hero .btn-outline,
.waitlist-banner .btn-hero.btn-outline,
.partner-card .btn-hero.btn-outline {
  background: rgba(255,255,255,0.96);
  color: #0f172a;
  border-color: rgba(255,255,255,0.96);
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
}
.waitlist-banner .btn-outline:hover,
.partner-card .btn-outline:hover,
.cta-banner .btn-outline:hover,
.hero .btn-outline:hover,
.waitlist-banner .btn-hero.btn-outline:hover,
.partner-card .btn-hero.btn-outline:hover,
.waitlist-banner .btn-outline:focus-visible,
.partner-card .btn-outline:focus-visible,
.cta-banner .btn-outline:focus-visible,
.hero .btn-outline:focus-visible,
.waitlist-banner .btn-hero.btn-outline:focus-visible,
.partner-card .btn-hero.btn-outline:focus-visible {
  background: #fff;
  color: #0f172a;
  border-color: var(--teal, #06b6d4);
  transform: translateY(-2px);
}
.btn-primary:focus-visible,
.btn-hero:focus-visible,
.nav-cta:focus-visible,
.pricing-btn:focus-visible {
  outline: 3px solid rgba(6,182,212,0.45);
  outline-offset: 3px;
}

/* Persistent PWA install affordance */
.sgt-install-quicklink {
  position: fixed;
  right: 16px;
  bottom: calc(var(--bottom-nav, 65px) + 18px + env(safe-area-inset-bottom));
  z-index: 9996;
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(6,182,212,0.35);
  border-radius: 999px;
  background: var(--teal, #06b6d4);
  color: #fff;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(6,182,212,0.28);
  cursor: pointer;
}
.sgt-install-quicklink.is-visible { display: inline-flex; }
.sgt-install-quicklink:hover,
.sgt-install-quicklink:focus-visible { filter: brightness(0.96); outline: none; }
@media (max-width: 899px) {
  .sgt-install-quicklink {
    left: 16px;
    right: 16px;
    bottom: calc(var(--bottom-nav, 64px) + 20px + env(safe-area-inset-bottom));
    width: auto;
    min-height: 56px;
    justify-content: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    gap: 10px;
    box-shadow: 0 14px 34px rgba(15,23,42,0.18);
  }
  .sgt-install-quicklink-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
  }
  .sgt-install-quicklink-text {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
    line-height: 1.25;
  }
}
@media (min-width: 900px) {
  .sgt-install-quicklink {
    right: 96px;
    bottom: 20px;
  }
}
