/* Shared polish for the existing KERN marketing site. */
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid #34D399;
  outline-offset: 3px;
}

/* One shared header and footer treatment across every page. */
body > nav.site-header {
  position: fixed !important;
  inset: 0 0 auto 0 !important;
  z-index: 100 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  height: 60px !important;
  padding: 0 48px !important;
  background: rgba(13,13,15,0.92) !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 0 !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: none !important;
}

.header-flow-offset > nav.site-header ~ .hero,
.header-flow-offset > nav.site-header ~ .page,
.header-flow-offset > nav.site-header ~ main {
  margin-top: 60px;
}

.site-header .nav-logo,
.site-footer .footer-logo {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  gap: 0 !important;
  color: #fff !important;
  text-decoration: none !important;
}

.site-header .nav-logo img,
.site-footer .footer-logo img {
  display: block !important;
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  object-fit: contain !important;
  margin: 0 -5px 0 0 !important;
}

.site-header .nav-logo span,
.site-footer .footer-logo span {
  color: #fff !important;
  font: 800 18px/1 'Inter', sans-serif !important;
  letter-spacing: 1px !important;
  white-space: nowrap !important;
}

.site-header .nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-header .nav-links a {
  color: rgba(255,255,255,0.48);
  font: 500 14px/1.2 'Inter', sans-serif;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.site-header .nav-links a:hover,
.site-header .nav-links a[aria-current="page"] { color: #fff; }

.site-header .nav-links .nav-cta {
  padding: 9px 20px;
  border-radius: 8px;
  background: #10B981;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
}

.site-header .nav-links .nav-cta:hover { background: #059669; }

body > footer.site-footer {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 28px !important;
  width: 100% !important;
  min-height: 78px !important;
  margin: 0 !important;
  padding: 20px 48px !important;
  background: #0D0D0F !important;
  border: 0 !important;
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 0 !important;
}

.site-footer .footer-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}

.site-footer .footer-copy {
  color: rgba(255,255,255,0.42) !important;
  font: 400 12px/1.4 'Inter', sans-serif !important;
  white-space: nowrap;
}

.site-footer .footer-links {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
  gap: 10px 20px !important;
}

.site-footer .footer-links a {
  color: rgba(255,255,255,0.46) !important;
  font: 400 13px/1.4 'Inter', sans-serif !important;
  text-decoration: none !important;
}

.site-footer .footer-links a:hover,
.site-footer .footer-links a[aria-current="page"] { color: #fff !important; }

.home-visitor-count {
  position: absolute;
  right: 12px;
  bottom: 5px;
  color: rgba(255,255,255,0.20);
  font: 400 9px/1 'Inter', sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  pointer-events: none;
  user-select: none;
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  background: #1C1C22;
  color: #F5F5F7;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-menu-button svg { width: 20px; height: 20px; }
.mobile-menu-button .menu-close { display: none; }
.mobile-menu-button[aria-expanded="true"] .menu-open { display: none; }
.mobile-menu-button[aria-expanded="true"] .menu-close { display: block; }

.product-status-note {
  max-width: 900px;
  margin: 0 auto 16px;
  padding: 16px 18px;
  border: 1px solid rgba(16,185,129,0.22);
  border-left: 3px solid #10B981;
  border-radius: 10px;
  background: rgba(16,185,129,0.06);
  color: rgba(255,255,255,0.72);
  font: 400 13px/1.65 'Inter', sans-serif;
}

.product-status-note strong { color: #F5F5F7; }

.form-privacy {
  margin: 14px 0 0;
  color: rgba(255,255,255,0.50);
  font: 400 12px/1.55 'Inter', sans-serif;
  text-align: center;
}

.form-privacy a { color: #34D399; }
.form-error {
  display: none;
  margin-top: 14px;
  color: #FCA5A5;
  font: 500 13px/1.5 'Inter', sans-serif;
  text-align: center;
}

/* Keep the floating dots visual without letting the decorative layer
   increase the document height beneath a short page's footer. */
.starfield {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100vh !important;
  height: 100svh !important;
  min-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

@media (max-width: 720px) {
  body > nav.site-header { padding-left: 16px !important; padding-right: 16px !important; }
  .js .mobile-menu-button { display: inline-flex; }
  .js .nav-links {
    position: absolute;
    top: 59px;
    left: 12px;
    right: 12px;
    display: grid !important;
    gap: 4px !important;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 12px;
    background: rgba(20,20,24,0.98);
    box-shadow: 0 18px 44px rgba(0,0,0,0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  }
  .js .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .js .nav-links a,
  .js .nav-links a:not(.nav-cta) {
    display: flex !important;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 8px;
  }
  .js .nav-links a[aria-current="page"]:not(.nav-cta) {
    color: #F5F5F7;
    background: rgba(255,255,255,0.05);
  }

  body > footer.site-footer {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 18px !important;
    padding: 24px 20px !important;
  }

  .site-footer .footer-brand {
    width: 100%;
    justify-content: space-between;
  }

  .site-footer .footer-links {
    justify-content: flex-start !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .starfield { display: none !important; }
}
