:root {
  --site-header-height: 60px;
  scroll-padding-top: calc(var(--site-header-height) + 12px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  min-height: var(--site-header-height);
  padding-inline: 15px;
  background: #fff;
  box-shadow: 0 2px 5px #0002;
}

.site-header .brand.site-brand { gap: 7px; }
.site-header .site-brand-horse { width: 46px; }
.site-header .site-brand-wordmark { width: 77px; }

.site-navigation {
  position: absolute;
  inset: 100% 0 auto;
  display: none;
  max-height: calc(100dvh - var(--site-header-height));
  overflow-y: auto;
  background: #fff;
  color: #000;
  box-shadow: 0 3px 5px #0002;
  font: 400 16px Verdana, "Microsoft JhengHei", "Heiti TC", sans-serif;
}

.site-navigation[data-open="true"] { display: grid; }

.site-navigation a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding-inline: 15px;
  white-space: nowrap;
  transition: color .3s ease;
}

.site-navigation a:focus-visible { color: #2563eb; }

.header-cta {
  display: inline-grid;
  place-items: center;
  min-height: 40px;
  margin-inline-start: auto;
  padding-inline: 14px;
  border-radius: 999px;
  background: #066fd1;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color .3s ease, box-shadow .3s ease, transform .3s ease;
}

@media (hover: hover) {
  .site-navigation a:hover { color: #2563eb; }

  .header-cta:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 16px rgb(59 130 246 / .3);
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .header-cta:hover { transform: translateY(-2px); }
}

.header-menu-toggle {
  display: grid;
  place-items: center end;
  width: 40px;
  height: 44px;
  margin-inline-start: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #005bac;
  cursor: pointer;
}

.header-menu-toggle span {
  width: 20px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -8px currentColor, 0 8px currentColor;
}

@media (min-width: 992px) {
  :root { --site-header-height: 80px; }
  .site-header { padding-inline: 30px; }
  .site-header .brand.site-brand { gap: 8px; }
  .site-header .site-brand-horse { width: 53px; }
  .site-header .site-brand-wordmark { width: 89px; }

  .site-navigation,
  .site-navigation[data-open="true"] {
    position: static;
    display: flex;
    gap: 26px;
    max-height: none;
    margin-inline-start: 142px;
    overflow: visible;
    box-shadow: none;
  }

  .site-navigation a {
    position: relative;
    min-height: var(--site-header-height);
    padding-inline: 0;
  }

  .site-navigation a::after {
    content: "";
    position: absolute;
    bottom: 15px;
    left: 50%;
    width: calc(100% + 10px);
    height: 3px;
    border-radius: 2px;
    background: #3b82f6;
    transform: translateX(-50%) scaleX(0);
    transition: transform .3s ease;
  }

  .site-navigation a:focus-visible::after {
    transform: translateX(-50%) scaleX(1);
  }

  @media (hover: hover) {
    .site-navigation a:hover::after {
      transform: translateX(-50%) scaleX(1);
    }
  }

  .header-cta {
    min-height: 44px;
    padding-inline: 24px;
    font-size: 16px;
  }

  .header-menu-toggle { display: none; }
}

@media (min-width: 1200px) {
  .site-header .brand.site-brand { gap: 9px; }
  .site-header .site-brand-horse { width: 56px; }
  .site-header .site-brand-wordmark { width: 95px; }
  .site-navigation,
  .site-navigation[data-open="true"] {
    gap: 36px;
    margin-inline-start: 178px;
  }
}
.site-header-completion .header-menu-toggle { margin-inline-start: auto; }
