/* ==========================================================================
   Site header: logo · menu pill with scroll progress · "Start a project"
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--nav-h);
}
body.menu-is-open .site-header { z-index: 20001; }

.site-header__bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(50px, 1fr));
  align-items: center;
  gap: 10px;
  padding: 20px;
}

/* Logo (left) */
.site-header__logo {
  justify-self: start;
  display: flex;
  align-items: center;
  width: 58px;
  padding: 5px;
  box-sizing: content-box;
  border-radius: 5px;
}
.site-header__logo img { width: 58px; height: 48px; object-fit: contain; }

/* Menu pill (centre) */
.menu-pill {
  justify-self: center;
  position: relative;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 330px;
  height: 64px;
  padding: 7px;
  border-radius: 100px;
  background: var(--c-ink);
}
.menu-pill__toggle,
.menu-pill__progress {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #333;
}
.menu-pill__toggle { flex-direction: column; gap: 5px; }
.menu-pill__line {
  width: 30px;
  height: 2px;
  border-radius: 3px;
  background: #fff;
  transition: transform .25s ease;
}
body.menu-is-open .menu-pill__line:first-child { transform: translateY(4px) rotate(45deg); }
body.menu-is-open .menu-pill__line:last-child  { transform: translateY(-4px) rotate(-45deg); }

.menu-pill__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.menu-pill__value {
  position: relative;
  z-index: 1;
  color: #fff;
  opacity: .7;
  font: 500 14.4px/1.3 var(--f-mono);
  letter-spacing: .02em;
}

/* CTA (right) */
.site-header__cta {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 24px;
  border-radius: 50px;
  background: var(--c-blue);
  color: #fff;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}
.site-header__cta {
  transition: background .25s ease, transform .45s cubic-bezier(.2, .8, .3, 1);
}
.site-header__cta:hover { background: #3644ce; transform: scale(1.055); }
.site-header__cta-main { font-size: 14.4px; line-height: 1.15; }
.site-header__cta-sub  { font-size: 11.2px; line-height: 1.15; color: rgba(255, 255, 255, .8); }

@media (min-width: 810px) and (max-width: 1199.98px) {
  .menu-pill { width: 252px; }
  .site-header__cta-main { font-size: 16px; }
  .site-header__cta-sub  { font-size: 13px; }
}

@media (max-width: 809.98px) {
  .site-header__bar {
    display: flex;
    justify-content: center;
    padding: 10px 7px 20px 10px;
  }
  .site-header__logo,
  .site-header__cta { display: none; }
  .menu-pill { width: 128px; height: 56px; padding: 3px; }
}

/* Dropdown navigation panel */
.nav-panel[hidden] { display: none; }
.nav-panel {
  position: fixed;
  z-index: 19998;
  display: flex;
  flex-direction: column;
  height: min(408px, calc(100dvh - 18px));
  max-height: calc(100dvh - 18px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: var(--menu-header-height, 110px) 19px 36px;
  border-radius: 42px;
  background: #ebebeb;
  color: #05050b;
  box-shadow: 0 18px 58px rgba(0, 0, 0, .12);
}
.nav-panel__label {
  color: #6c6c70;
  font: 600 12px/1.3 var(--f-mono);
  letter-spacing: .025em;
}
.nav-panel__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 9px;
}
.nav-panel__links a {
  display: flex;
  align-items: baseline;
  gap: 9px;
  color: #030308;
  font: 500 23px/1.17 var(--f-sans);
  letter-spacing: -.055em;
  transition: color .2s, transform .2s;
}
.nav-panel__links a:hover,
.nav-panel__links a:focus-visible { color: var(--c-blue); transform: translateX(3px); }
.nav-panel__count {
  color: #717177;
  font: 500 12px/1 var(--f-mono);
  letter-spacing: .05em;
}
.nav-panel__social { margin-top: auto; padding-top: 24px; }
.nav-panel__social-links { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.nav-panel__social-links a {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #030308;
  transition: transform .2s, color .2s;
}
.nav-panel__social-links a:hover { color: var(--c-blue); transform: translateY(-2px); }
.nav-panel__social-links svg {
  width: 19px; height: 19px;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

@media (max-width: 809.98px) {
  .nav-panel { height: auto; padding: var(--menu-header-height, 80px) 12px 16px; border-radius: 27px; }
  .nav-panel__links { gap: 3px; margin-top: 7px; }
  .nav-panel__links a { font-size: 19px; line-height: 1.16; }
  .nav-panel__label { font-size: 10px; }
  .nav-panel__social { margin-top: 14px; padding-top: 0; }
}
@media (max-height: 510px) {
  .nav-panel { height: calc(100dvh - 16px); padding-bottom: 12px; }
  .nav-panel__social { padding-top: 12px; }
}
