:root {
  --header-height: 84px;
  --header-height-scrolled: 64px;
  --header-radius: 20px;
  --header-border: rgba(255, 255, 255, 0.08);
  --header-bg: rgba(10, 10, 10, 0.55);
  --header-bg-scrolled: rgba(10, 10, 10, 0.82);
  --header-blur: blur(16px);
  --text-main: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.72);
  --yellow: #facc15;
  --container-max: 1280px;
  --side-pad: 20px;
}

.site-header {
  position: fixed;
  top: 14px;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0 var(--side-pad);
  transition: top 0.3s ease, transform 0.3s ease;
}

#header-placeholder {
  margin: 0;
  padding: 0px 0px 10px 0px;
}

.header-shell {
  max-width: var(--container-max);
  margin: 0 auto;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 20px;
  border: 1px solid var(--header-border);
  border-radius: var(--header-radius);
  background: var(--header-bg);
  backdrop-filter: var(--header-blur);
  -webkit-backdrop-filter: var(--header-blur);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
  transition:
    min-height 0.3s ease,
    padding 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.site-header.scrolled .header-shell {
  min-height: var(--header-height-scrolled);
  padding: 0 16px;
  background: var(--header-bg-scrolled);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #facc15, #fde68a);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease;
}

.site-header.scrolled .brand-mark {
  width: 30px;
  height: 30px;
}

.brand-text {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.desktop-nav a {
  position: relative;
  text-decoration: none;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--text-main);
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 1.5px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after,
.desktop-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--yellow);
  color: #000;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(250, 204, 21, 0.24);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  padding: 0;
  position: relative;
}

.menu-toggle span {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
  transform: translateX(-50%);
  transition: all 0.25s ease;
}

.menu-toggle span:first-child {
  top: 17px;
}

.menu-toggle span:last-child {
  top: 25px;
}

.site-header.menu-open .menu-toggle span:first-child {
  top: 21px;
  transform: translateX(-50%) rotate(45deg);
}

.site-header.menu-open .menu-toggle span:last-child {
  top: 21px;
  transform: translateX(-50%) rotate(-45deg);
}

.mobile-menu {
  max-width: var(--container-max);
  margin: 10px auto 0;
  background: rgba(10, 10, 10, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    max-height 0.35s ease,
    opacity 0.25s ease,
    transform 0.25s ease;
}

.site-header.menu-open .mobile-menu {
  max-height: 420px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 14px;
}

.mobile-nav a {
  color: #fff;
  text-decoration: none;
  padding: 14px 12px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.25s ease, color 0.25s ease;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background: rgba(255, 255, 255, 0.06);
}

.mobile-cta {
  margin-top: 8px;
  background: var(--yellow);
  color: #000 !important;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 1024px) {
  .desktop-nav {
    gap: 18px;
  }

  .header-cta {
    padding: 0 14px;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-cta {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
  }

  .header-shell {
    min-height: 74px;
    padding: 0 14px;
  }

  .site-header.scrolled .header-shell {
    min-height: 62px;
    padding: 0 12px;
  }

  .brand-text {
    font-size: 14px;
  }
}

@media (max-width: 767px) {
  .site-header {
    position: relative;
    top: 0;
    padding: 0;
    margin-top: 10px;
  }

  .header-shell {
    min-height: 70px;
    padding: 0 14px;
    border-radius: 18px;
  }

  .site-header.scrolled .header-shell {
    min-height: 70px;
    padding: 0 14px;
    background: var(--header-bg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
  }
}

@media (max-width: 640px) {
  .site-header {
    top: 10px;
    padding: 0 12px;
  }

  .header-shell {
    border-radius: 18px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .brand-text {
    font-size: 13px;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
}