.screen > header.site-header {
  position: fixed;
  /* Figma 1440: logo top 61 → bar top ≈ 51 with 10px pad */
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  /* Content width: 100px side insets (logo x=100 … btns right 1340 → 1240) */
  width: min(1240px, calc(100% - 200px));
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 1.6vw, 24px);
  padding: 10px clamp(14px, 1.8vw, 24px);
  box-sizing: border-box;
  border-radius: 22px;
  overflow: visible;
  background: transparent;
  border: none;
  box-shadow: 0 10px 40px rgba(67, 50, 138, 0.1), 0 2px 8px rgba(0, 0, 0, 0.03);
  transition:
    top 280ms ease,
    width 280ms ease,
    border-radius 280ms ease,
    box-shadow 280ms ease;
}

.site-header__material {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}

.site-header__filter {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-color: rgba(255, 255, 255, 0.42);
  background-image: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.28) 100%
  );
  -webkit-backdrop-filter: blur(18px) saturate(170%) brightness(1.05);
  backdrop-filter: blur(18px) saturate(170%) brightness(1.05);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.55),
    inset 0 -1px 1px rgba(255, 255, 255, 0.22),
    inset 1px 0 1px rgba(255, 255, 255, 0.16),
    inset -1px 0 1px rgba(255, 255, 255, 0.16);
}

.site-header__filter::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.42) 0%,
    rgba(255, 255, 255, 0.1) 28%,
    transparent 58%
  );
  mix-blend-mode: screen;
  pointer-events: none;
}

@supports (backdrop-filter: url(#twexel-liquid-glass)) {
  .site-header__filter {
    -webkit-backdrop-filter: blur(6px) saturate(160%) brightness(1.04)
      url(#twexel-liquid-glass);
    backdrop-filter: blur(6px) saturate(160%) brightness(1.04)
      url(#twexel-liquid-glass);
  }
}

.screen > header.site-header.is-scrolled {
  top: 24px;
  box-shadow: 0 14px 48px rgba(67, 50, 138, 0.12), 0 4px 12px rgba(0, 0, 0, 0.05);
}

.screen > header.site-header.is-scrolled .site-header__filter {
  background-color: rgba(255, 255, 255, 0.55);
  background-image: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.68) 0%,
    rgba(255, 255, 255, 0.4) 100%
  );
  border-color: rgba(255, 255, 255, 0.5);
}

.screen > header.site-header > :not(.site-header__material) {
  position: relative;
  z-index: 1;
}

.screen > header.site-header .logo,
.screen > header.site-header .menu,
.screen > header.site-header .header-actions,
.screen > header.site-header .view-3,
.screen > header.site-header .view-5,
.screen > header.site-header .lang-switch,
.screen > header.site-header .platforms-switch,
.screen > header.site-header .features-switch {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: 1;
}

.screen > header.site-header .header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 0;
}

.screen > header.site-header .logo {
  display: flex;
  flex-shrink: 0;
  width: 132px;
  height: 46px;
  gap: 3px;
  aspect-ratio: auto;
}

.screen > header.site-header .logo .png {
  width: 46px;
  height: 46px;
  margin-top: 0;
  object-fit: contain;
}

.screen > header.site-header .logo .twexel {
  width: 82px;
  height: 21px;
  margin-top: 12px;
  object-fit: contain;
}

.screen > header.site-header .menu {
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
  gap: clamp(12px, 1.4vw, 28px);
}

.screen > header.site-header .text-wrapper,
.screen > header.site-header .text-wrapper-3,
.screen > header.site-header .text-wrapper-6 {
  font-size: 14px;
  line-height: 1;
}

.screen > header.site-header .view-3,
.screen > header.site-header .view-5 {
  flex-shrink: 0;
  padding: 10px 14px;
}

@media (min-width: 1680px) {
  .screen > header.site-header {
    display: flex;
    position: fixed;
    overflow: visible;
    /* Figma 1920: logo top 61, side inset ~203 → width 1514 */
    top: 48px;
    width: min(1514px, calc(100% - 406px));
    padding: 12px 28px;
    gap: 28px;
  }

  .screen > header.site-header.is-scrolled {
    top: 24px;
  }

  .screen > header.site-header .logo {
    width: 148px;
    height: 52px;
    gap: 3px;
  }

  .screen > header.site-header .logo .png {
    width: 52px;
    height: 52px;
  }

  .screen > header.site-header .logo .twexel {
    width: 92px;
    height: 24px;
    margin-top: 13px;
  }

  .screen > header.site-header .menu {
    gap: 28px;
  }

  .screen > header.site-header .text-wrapper,
  .screen > header.site-header .text-wrapper-3,
  .screen > header.site-header .text-wrapper-6 {
    font-size: 15px;
    line-height: 1;
  }

  .screen > header.site-header .view-3,
  .screen > header.site-header .view-5 {
    padding: 12px 18px;
  }
}

@media (max-width: 1679px) {
  .screen > header.site-header {
    top: 48px;
    width: min(1240px, calc(100% - 200px));
    padding: 10px clamp(14px, 1.8vw, 24px);
    gap: clamp(12px, 1.6vw, 24px);
  }

  .screen > header.site-header.is-scrolled {
    top: 24px;
  }
}

@media (max-width: 1023px) {
  .screen > header.site-header {
    top: 8px;
    width: calc(100% - 24px);
    min-height: 0;
    padding: 10px 16px;
    border-radius: 18px;
    gap: 0;
    justify-content: space-between;
    align-items: center;
  }

  .screen > header.site-header .menu,
  .screen > header.site-header .header-actions {
    display: none !important;
  }

  .screen > header.site-header .site-header__menu-btn {
    display: flex !important;
    margin-left: auto;
  }

  .screen > header.site-header.is-scrolled {
    top: 6px;
  }
}

@media (max-width: 480px) {
  .screen > header.site-header {
    top: 6px;
    width: calc(100% - 16px);
    padding: 8px 10px;
    border-radius: 16px;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .screen > header.site-header,
  .screen > header.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(67, 50, 138, 0.1);
  }

  .site-header__filter {
    background: transparent !important;
    background-image: none !important;
    border-color: rgba(230, 226, 242, 0.95);
    box-shadow: none;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .site-header__filter::after {
    display: none;
  }
}

@media (prefers-contrast: more) {
  .screen > header.site-header,
  .screen > header.site-header.is-scrolled {
    background: #fff;
    border: 1px solid #43328a;
    box-shadow: none;
  }

  .site-header__material {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen > header.site-header {
    transition: none;
  }

  .site-header__filter {
    -webkit-backdrop-filter: blur(18px) saturate(170%) brightness(1.05) !important;
    backdrop-filter: blur(18px) saturate(170%) brightness(1.05) !important;
  }
}

.site-header-liquid-svg {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Mobile burger — hidden on desktop by default */
.screen > header.site-header .site-header__menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.screen > header.site-header .site-header__menu-btn img {
  display: block;
  width: 40px;
  height: 40px;
}

.screen > header.site-header .site-header__menu-btn:focus-visible {
  outline: 2px solid #4a90e2;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Mobile nav — Postmypost-like panel (light) */
.site-mobile-nav,
.site-mobile-nav__sub {
  --smn-bg: #fff;
  --smn-fg: #0d0d0d;
  --smn-muted: #424242;
  --smn-accent: #43328a;
  --smn-radius: 40px;
  --smn-max-w: 28.125rem;
  --smn-max-h: 42.5rem;
  --smn-pad-x: clamp(1.25rem, 4vw, 1.75rem);
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: var(--smn-max-w);
  height: 100dvh;
  max-height: var(--smn-max-h);
  margin: 0;
  padding: 12px var(--smn-pad-x) 32px;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--smn-fg);
  background:
    linear-gradient(
      165deg,
      #f3f0fa 0%,
      #ffffff 42%,
      #f7f5fc 100%
    );
  border: 0;
  border-radius: 0 0 var(--smn-radius) var(--smn-radius);
  box-shadow: 0 9px 15.3px rgba(94, 76, 224, 0.15), 0 18px 48px rgba(67, 50, 138, 0.12);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 150ms ease-out,
    transform 200ms ease-out,
    visibility 200ms ease-out;
}

.site-mobile-nav.is-open,
.site-mobile-nav__sub.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.site-mobile-nav__sub {
  z-index: 1101;
  transform: translateX(100%);
}

.site-mobile-nav__sub.is-open {
  transform: translateX(0);
}

.site-mobile-nav[hidden],
.site-mobile-nav__sub[hidden],
.site-mobile-nav__backdrop[hidden] {
  display: none !important;
}

.site-mobile-nav__close,
.site-mobile-nav__back {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 8px;
  border: 0;
  color: var(--smn-fg);
  background: transparent;
  cursor: pointer;
  position: sticky;
  top: 0;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}

.site-mobile-nav__close img,
.site-mobile-nav__back img,
.site-mobile-nav__close svg,
.site-mobile-nav__back svg {
  display: block;
  width: 18px;
  height: 18px;
}

.site-mobile-nav__close:focus-visible,
.site-mobile-nav__back:focus-visible {
  outline: 2px solid var(--smn-accent);
  outline-offset: 2px;
  border-radius: 8px;
}

.site-mobile-nav__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  width: 100%;
  margin: auto 0;
  padding: 12px 0 54px;
}

.site-mobile-nav__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-mobile-nav__link,
.site-mobile-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--smn-fg);
  background: transparent;
  font-family: Manrope, "Manrope Fallback", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.site-mobile-nav__link:focus-visible,
.site-mobile-nav__btn:focus-visible {
  outline: 2px solid var(--smn-accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.site-mobile-nav__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  width: 100%;
  margin: 0;
}

.site-mobile-nav__actions + .site-mobile-nav__lang {
  margin-top: 54px;
}

.site-mobile-nav__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: Manrope, "Manrope Fallback", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.site-mobile-nav__action--login {
  color: var(--smn-accent);
  background: transparent;
  border: 1.5px solid var(--smn-accent);
}

.site-mobile-nav__action--signup {
  color: #fff;
  background: var(--smn-accent);
  border: 1.5px solid var(--smn-accent);
}

.site-mobile-nav__action:focus-visible {
  outline: 2px solid var(--smn-accent);
  outline-offset: 3px;
}

.site-mobile-nav__lang {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 24px;
  flex-shrink: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-mobile-nav__lang-option {
  display: inline-flex;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--smn-muted);
  background: transparent;
  font-family: Manrope, "Manrope Fallback", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.site-mobile-nav__lang-option.is-active {
  color: var(--smn-fg);
  font-weight: 700;
}

.site-mobile-nav__lang-option:disabled {
  opacity: 0.45;
  cursor: default;
}

.site-mobile-nav__lang-option:focus-visible {
  outline: 2px solid var(--smn-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.site-mobile-nav__sub-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  flex: 1 1 auto;
  width: 100%;
  margin: 0;
  padding: 24px 0 16px;
  overflow: auto;
}

.site-mobile-nav__sub-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 4px;
  color: var(--smn-fg);
  text-decoration: none;
  font-family: Manrope, "Manrope Fallback", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  border-radius: 12px;
}

.site-mobile-nav__sub-item:focus-visible {
  outline: 2px solid var(--smn-accent);
  outline-offset: 2px;
}

.site-mobile-nav__sub-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--smn-accent);
  background: #e4dcf6;
}

.site-mobile-nav__sub-icon img,
.site-mobile-nav__sub-icon svg {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.site-mobile-nav__sub-item--auto .site-mobile-nav__sub-icon {
  color: #43328a;
  background: #e4dcf6;
}

.site-mobile-nav__sub-item--cross .site-mobile-nav__sub-icon {
  color: #5e4ce0;
  background: #ddd6ff;
}

.site-mobile-nav__sub-item--ai .site-mobile-nav__sub-icon {
  color: #7366bd;
  background: #eadcec;
}

.site-mobile-nav__sub-item--factory .site-mobile-nav__sub-icon {
  color: #43328a;
  background: #e0d8f3;
}

.site-mobile-nav__sub-item--video .site-mobile-nav__sub-icon {
  color: #5e4ce0;
  background: #e4dff8;
}

.site-mobile-nav__backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(15, 12, 40, 0.28);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 400ms ease-out, visibility 400ms ease-out;
  -webkit-tap-highlight-color: transparent;
}

.site-mobile-nav__backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.is-mobile-nav-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .site-mobile-nav,
  .site-mobile-nav__sub,
  .site-mobile-nav__backdrop {
    transition: none;
  }
}

/* Auth/CTA as links — не наследовать чёрный текст секций поверх фиолетовых кнопок */
a.view-3,
a.view-5 {
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

a.home-hero__cta,
a.home-pr__plan-cta,
a.home-cta__btn,
a.home-tf__cta,
a.factory-cta,
a.autopost-cta,
a.crosspost-cta,
a.ai-cta,
a.home-media__cta,
a.home-shorts__cta,
a.home-ai-gen__cta,
a.home-ai-text__cta,
a.home-ai-plan__cta,
a.home-stats__cta,
a.home-sync__cta,
a.home-personal__cta,
a.home-ap__cta,
a.home-crossposting__cta,
a.home-sp__cta,
a.int-hero__cta,
a.plat-cta {
  text-decoration: none;
  color: #fff;
  box-sizing: border-box;
}

a.home-hero__cta span,
a.home-pr__plan-cta .home-pr__plan-cta-text,
a.factory-cta span,
a.autopost-cta span,
a.crosspost-cta span,
a.ai-cta span,
a.plat-cta span {
  color: #fff;
}

a.plat-cta--ghost,
a.plat-cta--ghost span {
  color: #43328a;
}
