/* ==========================================================================
   Orbit Fast — shared site header (landing + blog).
   Loaded via <link href="/assets/header.css"> + <script src="/assets/header.js">.
   ========================================================================== */
:root {
  --header-h: 58px;
}

html {
  scroll-padding-top: 80px;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: #ededed;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
}
.site-header__inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 6px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  text-decoration: none;
}
.site-header__icon { width: 52px; height: 52px; display: block; }
.site-header__name {
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #000;
}

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-header .site-nav__link {
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.56);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 9px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.site-header .site-nav__link:hover { color: #000; background: rgba(0, 0, 0, 0.045); }
.site-header .site-nav__link--current { color: #000; }

/* primary CTA — solid black pill (no fill colour, no 3D) */
.site-header .site-nav__cta {
  margin-left: 8px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 20px;
  color: #fff;
  background: #000;
  padding: 9px 20px;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.site-header .site-nav__cta:hover { background: #333; }

/* hamburger (mobile only) */
.site-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  margin: -8px -8px -8px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
}
.site-header__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: #000;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.site-header.is-open .site-header__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.is-open .site-header__toggle span:nth-child(2) { opacity: 0; }
.site-header.is-open .site-header__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media screen and (max-width: 720px) {
  .site-header__toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 16px 16px;
    background: #fff;
    border-bottom: 1px solid #ededed;
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.07);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }
  .site-header.is-open .site-nav { opacity: 1; visibility: visible; transform: translateY(0); }
  .site-header .site-nav__link { padding: 13px 12px; font-size: 1rem; border-radius: 10px; }
  .site-header .site-nav__cta { margin: 8px 0 0; text-align: center; padding: 14px; font-size: 1rem; }
}

/* --- sticky install bar (mobile only) --------------------------------------
   Apple's native Smart App Banner can't be pinned, so this is our own. */
.app-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid #ededed;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(110%);
  transition: transform 0.28s ease;
}
.app-bar.is-visible { transform: translateY(0); }
.app-bar__icon { width: 44px; height: 44px; border-radius: 10px; flex: 0 0 auto; }
.app-bar__text { flex: 1 1 auto; min-width: 0; }
.app-bar__name {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-bar__meta {
  margin: 2px 0 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-bar .app-bar__btn {
  flex: 0 0 auto;
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: #000;
  padding: 9px 20px;
  border-radius: 999px;
  text-decoration: none;
}
.app-bar__close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  background: none;
  color: rgba(0, 0, 0, 0.4);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.app-bar__close:hover { color: #000; }

@media (max-width: 860px) {
  .app-bar { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  .app-bar { transition: none; }
}
