.frm-public-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  border-bottom: 1px solid rgba(99, 102, 241, 0.12);
  background: rgba(250, 250, 254, 0.92);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.frm-public-header__inner {
  width: min(100% - 64px, 1344px);
  min-height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  gap: 32px;
}

.frm-public-header__brand {
  width: fit-content;
  min-width: 0;
  display: inline-flex;
  align-items: center;
}

.frm-public-header__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.frm-public-header__nav a,
.frm-public-header__mobile a {
  color: #343746;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
}

.frm-public-header__nav a {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  transition: color 160ms ease, background 160ms ease;
}

.frm-public-header__nav a:hover,
.frm-public-header__nav a[aria-current="page"] {
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.08);
}

.frm-public-header__cta,
.frm-public-header__mobile-cta {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.2);
  font-size: 13px;
  font-weight: 800;
}

.frm-public-header__cta { justify-self: end; }
.frm-public-header__burger,
.frm-public-header__mobile { display: none; }

.frm-public-header__burger {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 10px;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.frm-public-header__burger span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #343746;
  transition: transform 160ms ease, opacity 160ms ease;
}

.frm-public-header__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.frm-public-header__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.frm-public-header__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

[data-frm-site-footer] { scroll-margin-top: 88px; }
[data-frm-site-footer] a { min-height: 44px; }
[data-frm-site-footer] form { scroll-margin-top: 96px; }
[data-frm-site-footer] input,
[data-frm-site-footer] textarea { color: inherit; }
[data-frm-contact-form-state="idle"] input,
[data-frm-contact-form-state="idle"] textarea,
[data-frm-contact-form-state="success"] input,
[data-frm-contact-form-state="success"] textarea { opacity: 1 !important; }
[data-frm-contact-form-state="idle"] button[type="submit"],
[data-frm-contact-form-state="success"] button[type="submit"] {
  cursor: pointer !important;
  opacity: 1 !important;
}

@media (max-width: 980px) {
  .frm-public-header__inner {
    width: min(100% - 40px, 940px);
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
  }

  .frm-public-header__nav,
  .frm-public-header__cta { display: none; }
  .frm-public-header__burger { display: flex; }
  .frm-public-header__mobile {
    width: 100%;
    padding: 10px 20px 20px;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    background: rgba(250, 250, 254, 0.98);
  }
  .frm-public-header__mobile:not([hidden]) { display: grid; gap: 4px; }
  .frm-public-header__mobile a:not(.frm-public-header__mobile-cta) {
    min-height: 48px;
    padding: 0 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
  }
  .frm-public-header__mobile a[aria-current="page"] {
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.08);
  }
  .frm-public-header__mobile-cta { margin-top: 8px; }
}

@media (max-width: 560px) {
  .frm-public-header__inner {
    width: calc(100% - 32px);
    min-height: 68px;
  }
  .frm-public-header__brand [data-frm-logo-product] { width: 36px; height: 36px; }
  .frm-public-header__brand span[aria-hidden="true"],
  .frm-public-header__brand [aria-hidden="true"] + span,
  .frm-public-header__brand span[style*="JetBrains Mono"] { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .frm-public-header__nav a,
  .frm-public-header__burger span { transition: none; }
}
