.header-sign-in {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-weight: 700;
}

.mobile-nav-toggle,
.mobile-nav {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 1020px) {
  .mobile-nav-toggle {
    display: inline-flex;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    cursor: pointer;
  }

  .mobile-nav-icon {
    display: grid;
    width: 18px;
    gap: 4px;
  }

  .mobile-nav-icon span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon span:nth-child(2) {
    opacity: 0;
  }

  .mobile-nav-toggle[aria-expanded="true"] .mobile-nav-icon span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .mobile-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    background: rgba(7, 14, 25, 0.98);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(18px);
  }

  .mobile-nav[hidden] {
    display: none;
  }

  .mobile-nav a {
    display: flex;
    min-height: 46px;
    align-items: center;
    border-radius: 10px;
    padding: 0 14px;
    color: #d8e2ef;
    font-size: 15px;
    font-weight: 650;
  }

  .mobile-nav a:hover,
  .mobile-nav a:focus-visible,
  .mobile-nav a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
  }

  .mobile-nav .mobile-nav-demo {
    margin-top: 4px;
    background: linear-gradient(135deg, #c4f1ff 0%, #5eead4 100%);
    color: #04111d;
  }
}

@media (max-width: 720px) {
  .site-header {
    top: 10px;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
  }

  .site-header .brand {
    min-width: 0;
    gap: 8px;
    font-size: 15px;
  }

  .site-header .brand img {
    width: 32px;
    height: 32px;
  }

  .site-header .brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  .header-actions .header-sign-in {
    display: inline-flex;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 0 10px;
    color: #f8fafc;
  }

  .header-demo {
    display: none;
  }
}

@media (max-width: 350px) {
  .site-header {
    gap: 6px;
    padding-inline: 8px;
  }

  .site-header .brand {
    font-size: 14px;
  }

  .header-actions {
    gap: 4px;
  }

  .header-actions .header-sign-in {
    padding-inline: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav-icon span {
    transition: none;
  }
}
