/* Shared chrome for the public pages (home, sign in, register, password reset):
   the split header, the mobile menu and the footer. */

/* A split surface: light grey on the left, navy on the right. The hero and the
   auth pages are both built on it, so the header always lines up with the seam. */
.split {
  position: relative;
  background: linear-gradient(90deg, var(--mist) 50%, var(--navy) 50%);
  isolation: isolate;
}

/* ---------- header ---------- */
.site-head {
  position: relative; z-index: 30;
  display: grid; grid-template-columns: 1fr 1fr;
  font-size: 13px; font-weight: 550;
}
.sh-half { display: flex; align-items: center; gap: 28px; padding: 22px clamp(20px, 3.4vw, 44px); }
.sh-a { color: var(--text); }
.sh-b { color: var(--on-navy); justify-content: flex-end; gap: 24px; }

.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 750; font-size: 16px; letter-spacing: -.01em; text-decoration: none;
}
.brand-mark {
  width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%;
  background: var(--violet); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; letter-spacing: 0;
}

.sh-links { display: flex; gap: 24px; }
.sh-links a, .sh-link {
  position: relative; text-decoration: none; background: none; border: 0; padding: 4px 0;
  cursor: pointer; font: inherit; color: inherit; opacity: .78;
  transition: opacity 160ms ease;
}
.sh-links a::after, .sh-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 220ms var(--ease-out);
}
.sh-links a[aria-current="page"], .sh-link[aria-current="page"] { opacity: 1; }
.sh-links a[aria-current="page"]::after, .sh-link[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
  .sh-links a:hover, .sh-link:hover { opacity: 1; }
  .sh-links a:hover::after, .sh-link:hover::after { transform: scaleX(1); }
}
.sh-cta { padding: 8px 15px; font-size: 13px; }

/* Signed-in state. nav.js sets the class on <html> before first paint, so the
   header never flashes "Sign in" at someone who is already signed in. */
.in-only { display: none !important; }
html.signed-in .in-only { display: inline-flex !important; }
html.signed-in .out-only { display: none !important; }

.menuBtn {
  display: none; align-items: center; gap: 9px;
  background: none; border: 0; padding: 6px 0; cursor: pointer;
  font: 600 13px var(--sans); color: inherit;
}
.menuBtn i { position: relative; width: 18px; height: 10px; display: inline-block; }
.menuBtn i::before, .menuBtn i::after {
  content: ''; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform 220ms var(--ease-out);
}
.menuBtn i::before { top: 0; }
.menuBtn i::after { bottom: 0; }
.menuBtn[aria-expanded="true"] i::before { transform: translateY(4.25px) rotate(45deg); }
.menuBtn[aria-expanded="true"] i::after { transform: translateY(-4.25px) rotate(-45deg); }

/* ---------- mobile menu ---------- */
.menu {
  position: absolute; left: 12px; right: 12px; top: 64px; z-index: 29;
  background: var(--navy); color: var(--on-navy);
  border-radius: var(--r-md); padding: 10px 22px 22px;
  box-shadow: 0 30px 60px -20px rgba(10, 10, 25, .55);
  transform-origin: top right;
  opacity: 0; transform: translateY(-6px) scale(.98); visibility: hidden; pointer-events: none;
  /* closing is quicker than opening */
  transition: opacity 140ms ease, transform 140ms ease, visibility 0s linear 140ms;
}
.menu.open {
  opacity: 1; transform: none; visibility: visible; pointer-events: auto;
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s;
}
.menu > a, .menu button.menu-row {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 15px 0; border: 0; border-bottom: 1px solid var(--on-navy-line);
  background: none; color: inherit; text-decoration: none; text-align: left;
  font: 600 17px var(--sans); cursor: pointer;
}
.menu .menu-foot { display: flex; gap: 10px; align-items: center; margin-top: 18px; }
.menu .menu-foot .btn-light, .menu .menu-foot .btn-ghost { flex: 1; }
.menu .btn-ghost { color: var(--on-navy); border-color: var(--on-navy-line); }

@media (max-width: 820px) {
  .split { background: var(--mist); }
  .site-head { grid-template-columns: 1fr auto; background: var(--mist); }
  .sh-links { display: none; }
  .sh-b { color: var(--text); padding-left: 0; gap: 14px; }
  .sh-b > .sh-link, .sh-b > .sh-cta, .sh-b > .themeBtn { display: none !important; }
  .menuBtn { display: inline-flex; }
}
@media (min-width: 821px) { .menu { display: none; } }

/* ---------- footer ---------- */
.site-foot {
  background: var(--navy); color: var(--on-navy-muted);
  padding: 34px clamp(20px, 3.4vw, 44px);
  display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center;
  font-size: 13px;
}
.site-foot .brand { color: var(--on-navy); }
.site-foot nav { display: flex; gap: 22px; margin-left: auto; }
.site-foot a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .site-foot nav a:hover { color: var(--on-navy); } }
@media (max-width: 620px) { .site-foot nav { margin-left: 0; } }

/* ---------- install bar (pwa.js) ---------- */
.installbar {
  position: fixed; left: 50%; bottom: 18px; z-index: 60;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  width: min(560px, calc(100% - 24px));
  background: var(--navy); color: var(--on-navy);
  padding: 12px 14px 12px 18px; border-radius: var(--r-md);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6); font-size: 13.5px;
}
.installbar span { flex: 1; min-width: 180px; }
.installbar .btn-ghost { color: var(--on-navy); border-color: var(--on-navy-line); }
