/* Site navigation — the homepage's glass pill nav, shared by every page.
   Used through <site-nav> (see nav.js). Edit here and every page updates. */

site-nav { display: contents; }

.nav {
  position: fixed;
  top: calc(38px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translate(-50%, 0);
  z-index: 10;
  display: flex;
  gap: 48px;
  align-items: center;
  height: 58px;
  padding-inline: 68px;
  border-radius: 100px;
  isolation: isolate;
  font-family: "Darker Grotesque", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  /* Liquid glass: clear body, light blur, strong color lift, so the page shows through
     like looking through a thick lens rather than frosted plastic */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.30) 0%, rgba(255, 255, 255, 0.06) 55%, rgba(255, 255, 255, 0.14) 100%);
  -webkit-backdrop-filter: blur(10px) saturate(200%) brightness(1.06) contrast(1.05);
  backdrop-filter: blur(10px) saturate(200%) brightness(1.06) contrast(1.05);
  box-shadow:
    inset 0 1.5px 0 0 rgba(255, 255, 255, 0.95),     /* bright top rim */
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.45),      /* light bounce on the bottom rim */
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),       /* glass edge */
    inset 0 0 14px 0 rgba(255, 255, 255, 0.45),      /* inner glow at the thick edge */
    inset 0 -8px 16px -10px rgba(120, 100, 85, 0.18),/* depth toward the bottom */
    0 0 0 0.5px rgba(60, 48, 38, 0.12),              /* hairline outside edge */
    0 2px 6px rgba(40, 30, 20, 0.06),                /* contact shadow */
    0 14px 36px -12px rgba(40, 30, 20, 0.22);        /* lift */
  /* Position and fade are animated by nav.js (spring on scroll, drag and snap back) */
  will-change: transform, opacity;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: grab;
}

.nav.is-dragging { cursor: grabbing; }
.nav.is-dragging a { pointer-events: none; }

/* Specular highlights: a curved glint top-left and a softer one bottom-right */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(60% 120% at 14% -30%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 60%),
    radial-gradient(40% 90% at 92% 135%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 65%);
  pointer-events: none;
}

/* Lens rim: a thin gradient border, brightest where light would hit the curve */
.nav::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.15) 35%,
    rgba(255, 255, 255, 0.05) 60%,
    rgba(255, 255, 255, 0.7) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

/* Frosted tone, for pages with dark sections (<site-nav tone="frosted">): a more
   opaque pill, as on the Framer info-vis page, so the links stay legible over black */
site-nav[tone="frosted"] .nav {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.34) 42%, rgba(236, 226, 218, 0.42) 100%);
}

/* Browsers without backdrop blur get a more solid pill so the links stay legible */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav { background: rgba(250, 246, 242, 0.92); }
}

.nav a {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(20, 18, 16, 0.88);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.nav a:hover { opacity: 0.6; }

.nav a:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 4px;
  border-radius: 6px;
}

@media (max-width: 560px) {
  .nav { gap: 40px; padding-inline: 40px; height: 52px; top: calc(24px + env(safe-area-inset-top, 0px)); }
  .nav a { font-size: 16px; }
}
