.top { position: sticky; top: 0; z-index: 30; }
.top::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(250, 250, 250, .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid rgba(10, 10, 10, .07); transform-origin: top; transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s; }
.top.is-compact::before { transform: scaleY(.875); box-shadow: 0 10px 30px -18px rgba(10, 10, 10, .35); }

.top-bar { height: 64px; display: flex; align-items: center; gap: 32px; }
.top-logo, .top-cta, .top-toggle { transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.top.is-compact .top-cta, .top.is-compact .top-toggle { transform: translateY(-4px); }
.top.is-compact .top-logo { transform: translateY(-4px) scale(.92); transform-origin: left center; }

.top-logo { display: flex; flex: none; }
.top-logo img { width: 152px; height: auto; }

.top-nav { display: flex; gap: 2px; flex: 1; min-width: 0; }
.top-nav a { height: 36px; padding: 0 12px; border-radius: 10px; display: flex; align-items: center; font: 500 15px/1 var(--sans); color: var(--text-2); }
.top-nav a:hover { background: rgba(10, 10, 10, .05); color: var(--title); }

.top-cta { height: 40px; padding: 0 16px; border-radius: 12px; background: var(--brand); display: flex; align-items: center; flex: none; font: 600 15px/1 var(--sans); color: #FFFFFF; white-space: nowrap; transition: background .15s, transform .25s cubic-bezier(.2, .7, .2, 1); }
.top-cta:hover { background: var(--link); color: #FFFFFF; }

.top-toggle { display: none; position: relative; z-index: 3; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--text); align-items: center; justify-content: center; cursor: pointer; }
.top-toggle:hover { background: rgba(10, 10, 10, .05); }
.top-toggle .ico { width: 26px; height: 26px; }
.top .ico-close, .top[data-menu="open"] .ico-open { display: none; }
.top[data-menu="open"] .ico-close { display: block; }
.top-scrim { display: none; }

@media (min-width: 820px) {
  .top-nav { transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
  .top.is-compact .top-nav { transform: translateY(-4px); }
}

@media (max-width: 819px) {
  .top-bar { gap: 12px; }
  .top-logo { margin-right: auto; }
  .top-logo img { width: 136px; }
  .top-toggle { display: flex; }
  .top[data-menu="open"] .top-toggle { background: var(--surface); }
  .top-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; flex-direction: column; gap: 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: var(--surface); box-shadow: 0 -24px 60px -24px rgba(0, 0, 0, .4); visibility: hidden; transform: translateY(105%); transition: transform .35s cubic-bezier(.2, .7, .2, 1), visibility 0s .35s; }
  .top-nav::before { content: ""; width: 40px; height: 4px; margin: 0 auto 10px; border-radius: 999px; background: rgba(10, 10, 10, .16); }
  .top[data-menu="open"] .top-nav { visibility: visible; transform: none; transition-delay: 0s; }
  .top-nav a { height: auto; min-height: 56px; padding: 0 4px; border-radius: 0; border-bottom: 1px solid rgba(10, 10, 10, .06); font-size: 17px; color: var(--text); }
  .top-nav a:last-child { border-bottom: 0; }
  .top-nav a:hover { background: transparent; color: var(--link); }
  .top-scrim { display: block; position: fixed; inset: 0; z-index: 1; background: rgba(10, 10, 10, .45); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
  .top[data-menu="open"] .top-scrim { opacity: 1; visibility: visible; transition-delay: 0s; }
}
