/* ROUND S5C.4 - EXACT PUBLIC HEADER PARITY */

/* The wordmark is the same shared component on every public page. */
.public-unified-header .cometai-brand-wordmark,
.solutions-home-header.public-unified-header .solutions-official-brand.cometai-brand-wordmark {
  width: 122px !important;
  height: 34px !important;
  flex: 0 0 122px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

.public-unified-header .cometai-brand-wordmark__art,
.solutions-home-header.public-unified-header .cometai-brand-wordmark__art {
  left: -5px !important;
  top: 3px !important;
  width: 142px !important;
  height: 38px !important;
  transform: none !important;
}

/* Solutions follows the exact full-width alignment used by the home. */
.solutions-home-header.public-unified-header .solutions-header-inner {
  width: 100% !important;
  max-width: none !important;
  min-height: 68px;
  margin: 0 !important;
  padding: 0 5% !important;
}

.solutions-home-header.public-unified-header .solutions-header-channels {
  margin-right: .55rem;
}

/* Home mobile menu button. */
.public-header-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  gap: 4px;
  border: 1px solid rgba(139, 92, 246, .28);
  border-radius: 12px;
  padding: 10px;
  color: #fff;
  background: rgba(255, 255, 255, .035);
  cursor: pointer;
}

.public-header-menu-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}

nav.public-unified-header.is-menu-open .public-header-menu-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

nav.public-unified-header.is-menu-open .public-header-menu-toggle span:nth-child(2) {
  opacity: 0;
}

nav.public-unified-header.is-menu-open .public-header-menu-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.public-header-mobile-start {
  display: none;
}

@media (max-width: 1100px) {
  /* Home receives the same responsive menu behavior as Solutions. */
  nav.public-unified-header .public-header-menu-toggle {
    display: grid;
  }

  nav.public-unified-header .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 210;
    display: none !important;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .35rem;
    padding: .8rem max(3vw, 1rem) 1rem;
    border-bottom: 1px solid rgba(139, 92, 246, .2);
    background: rgba(7, 7, 15, .995);
    box-shadow: 0 22px 50px rgba(0, 0, 0, .38);
  }

  nav.public-unified-header.is-menu-open .nav-links {
    display: grid !important;
  }

  nav.public-unified-header .nav-links > li {
    min-width: 0;
  }

  nav.public-unified-header .nav-links > li > a {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(139, 92, 246, .14);
    border-radius: 12px;
    padding: .55rem .75rem;
    background: rgba(255, 255, 255, .025);
    font-size: .88rem;
    text-align: center;
  }

  nav.public-unified-header .public-header-mobile-start {
    display: block;
    grid-column: 1 / -1;
  }

  nav.public-unified-header .public-header-mobile-start .nav-cta {
    border: 0;
    border-radius: 999px;
    color: #fff !important;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  }

  .solutions-home-header.public-unified-header .solutions-header-menu-toggle {
    display: grid !important;
  }

  .solutions-home-header.public-unified-header .solutions-main-nav.nav-links {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 210 !important;
    display: none !important;
    max-height: calc(100vh - 112px);
    overflow-y: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .35rem;
    padding: .8rem max(3vw, 1rem) 1rem;
    border-bottom: 1px solid rgba(139, 92, 246, .2);
    background: rgba(7, 7, 15, .995);
    box-shadow: 0 22px 50px rgba(0, 0, 0, .38);
  }

  .solutions-home-header.public-unified-header.is-menu-open .solutions-main-nav.nav-links {
    display: grid !important;
  }

  .solutions-home-header.public-unified-header .solutions-main-nav.nav-links > a {
    justify-content: center;
    min-height: 46px;
    border: 1px solid rgba(139, 92, 246, .14);
    border-radius: 12px;
    background: rgba(255, 255, 255, .025);
    font-size: .88rem;
  }
}


@media (max-width: 1100px) {
  /* One shared mobile composition: logo + language + menu, icons below. */
  nav.public-unified-header {
    height: auto !important;
    min-height: 112px !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: 52px 36px;
    align-items: center;
    gap: .3rem .5rem;
    padding: .35rem 5% .45rem !important;
  }

  nav.public-unified-header > .nav-logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  nav.public-unified-header > #lang-switcher {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    margin: 0 !important;
  }

  nav.public-unified-header > .public-header-menu-toggle {
    grid-column: 3;
    grid-row: 1;
  }

  nav.public-unified-header > .nav-cta {
    display: none !important;
  }

  nav.public-unified-header > #public-channel-status-top {
    grid-column: 1 / -1;
    grid-row: 2;
    width: auto;
    margin: 0 !important;
    justify-self: center;
  }

  nav.public-unified-header .nav-links {
    top: 100%;
    grid-template-columns: 1fr;
  }

  /* Solutions uses the same rows without changing its semantic structure. */
  .solutions-home-header.public-unified-header {
    min-height: 112px !important;
  }

  .solutions-home-header.public-unified-header .solutions-header-inner {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: 52px 36px;
    min-height: 112px !important;
    align-items: center;
    gap: .3rem .5rem;
    padding: .35rem 5% .45rem !important;
  }

  .solutions-home-header.public-unified-header .solutions-official-brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .solutions-home-header.public-unified-header .solutions-home-header-tools {
    display: contents !important;
  }

  .solutions-home-header.public-unified-header .solutions-header-language-switcher {
    display: block !important;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .solutions-home-header.public-unified-header .solutions-header-menu-toggle {
    display: grid !important;
    grid-column: 3;
    grid-row: 1;
  }

  .solutions-home-header.public-unified-header .solutions-header-cta {
    display: none !important;
  }

  .solutions-home-header.public-unified-header .solutions-header-channels {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    margin: 0 !important;
  }

  .solutions-home-header.public-unified-header .solutions-main-nav.nav-links {
    top: 100% !important;
  }

  .solutions-home-header.public-unified-header .solutions-mobile-language {
    display: none !important;
  }

  .solutions-home-header.public-unified-header .solutions-mobile-header-actions {
    grid-template-columns: 1fr !important;
  }

  /* Preserve the exact shared mobile wordmark behavior. */
  .public-unified-header .cometai-brand-wordmark,
  .solutions-home-header.public-unified-header .solutions-official-brand.cometai-brand-wordmark {
    width: 112px !important;
    height: 31px !important;
    flex-basis: 112px !important;
  }

  .public-unified-header .cometai-brand-wordmark__art,
  .solutions-home-header.public-unified-header .cometai-brand-wordmark__art {
    left: -5px !important;
    top: 3px !important;
    width: 130px !important;
    height: 35px !important;
  }

  .hero {
    padding-top: 146px !important;
  }
}

@media (max-width: 420px) {
  nav.public-unified-header,
  .solutions-home-header.public-unified-header .solutions-header-inner {
    padding-right: 4% !important;
    padding-left: 4% !important;
  }

  .public-header-menu-toggle,
  .solutions-header-menu-toggle {
    width: 39px !important;
    height: 39px !important;
  }

  nav.public-unified-header #public-channel-status-top,
  .solutions-home-header.public-unified-header .solutions-header-channels {
    gap: .25rem !important;
  }
}

/* ROUND S5C.5 - EXACT WORDMARK GEOMETRY AND SINGLE-ROW RESPONSIVE HEADER */
.public-unified-header .cometai-brand-wordmark__art,
.solutions-home-header.public-unified-header .cometai-brand-wordmark__art {
  max-width: none !important;
  min-width: 142px !important;
}

@media (min-width: 1101px) {
  .solutions-home-header.public-unified-header .solutions-header-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .solutions-home-header.public-unified-header .solutions-home-header-tools {
    display: contents !important;
  }

  .solutions-home-header.public-unified-header .solutions-header-channels,
  .solutions-home-header.public-unified-header .solutions-header-language-switcher {
    margin: 0 !important;
  }
}

@media (max-width: 1100px) {
  nav.public-unified-header,
  .solutions-home-header.public-unified-header,
  .solutions-home-header.public-unified-header .solutions-header-inner {
    min-height: 68px !important;
    height: 68px !important;
  }

  nav.public-unified-header,
  .solutions-home-header.public-unified-header .solutions-header-inner {
    display: grid !important;
    grid-template-columns: 112px minmax(104px, 1fr) auto auto !important;
    grid-template-rows: 68px !important;
    align-items: center !important;
    gap: 0 .35rem !important;
    padding: 0 3% !important;
  }

  nav.public-unified-header > .nav-logo,
  .solutions-home-header.public-unified-header .solutions-official-brand {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
  }

  nav.public-unified-header > #public-channel-status-top,
  .solutions-home-header.public-unified-header .solutions-header-channels {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: auto !important;
    margin: 0 !important;
    justify-self: center !important;
    align-self: center !important;
  }

  nav.public-unified-header > #lang-switcher,
  .solutions-home-header.public-unified-header .solutions-header-language-switcher {
    grid-column: 3 !important;
    grid-row: 1 !important;
    margin: 0 !important;
    justify-self: end !important;
    align-self: center !important;
  }

  nav.public-unified-header > .public-header-menu-toggle,
  .solutions-home-header.public-unified-header .solutions-header-menu-toggle {
    grid-column: 4 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    align-self: center !important;
  }

  nav.public-unified-header > .nav-cta,
  .solutions-home-header.public-unified-header .solutions-header-cta {
    display: none !important;
  }

  .solutions-home-header.public-unified-header .solutions-home-header-tools {
    display: contents !important;
  }

  nav.public-unified-header .nav-links,
  .solutions-home-header.public-unified-header .solutions-main-nav.nav-links {
    top: 100% !important;
  }

  nav.public-unified-header .public-header-mobile-start,
  .solutions-home-header.public-unified-header .solutions-mobile-header-actions {
    display: block !important;
    grid-column: 1 / -1 !important;
  }

  .solutions-home-header.public-unified-header .solutions-mobile-header-actions {
    grid-template-columns: 1fr !important;
  }

  .solutions-home-header.public-unified-header .solutions-mobile-language {
    display: none !important;
  }

  .public-unified-header .cometai-brand-wordmark,
  .solutions-home-header.public-unified-header .solutions-official-brand.cometai-brand-wordmark {
    width: 112px !important;
    height: 31px !important;
    flex-basis: 112px !important;
  }

  .public-unified-header .cometai-brand-wordmark__art,
  .solutions-home-header.public-unified-header .cometai-brand-wordmark__art {
    left: -5px !important;
    top: 3px !important;
    width: 130px !important;
    min-width: 130px !important;
    height: 35px !important;
    max-width: none !important;
  }

  .hero {
    padding-top: 100px !important;
  }
}

@media (max-width: 520px) {
  nav.public-unified-header,
  .solutions-home-header.public-unified-header .solutions-header-inner {
    gap: 0 .18rem !important;
    padding-right: 2% !important;
    padding-left: 2% !important;
  }

  nav.public-unified-header #public-channel-status-top,
  .solutions-home-header.public-unified-header .solutions-header-channels {
    gap: .16rem !important;
  }

  nav.public-unified-header #public-channel-status-top .public-channel-status__item,
  .solutions-home-header.public-unified-header .solutions-header-channels .public-channel-status__item {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    border-radius: 7px !important;
  }

  nav.public-unified-header #public-channel-status-top .public-channel-status__glyph,
  .solutions-home-header.public-unified-header .solutions-header-channels .public-channel-status__glyph {
    width: 12px !important;
    height: 12px !important;
  }

  .solutions-home-header.public-unified-header .solutions-header-language {
    min-width: 54px !important;
    min-height: 38px !important;
    padding: .35rem .5rem !important;
  }

  .public-header-menu-toggle,
  .solutions-header-menu-toggle {
    width: 38px !important;
    height: 38px !important;
  }
}

/* ROUND S5C.6 - IDENTICAL DESKTOP AND MOBILE WORDMARK */
/* The approved desktop wordmark is the single source of truth at every viewport. */
@media (max-width: 1100px) {
  .public-unified-header .cometai-brand-wordmark,
  .solutions-home-header.public-unified-header .solutions-official-brand.cometai-brand-wordmark {
    width: 122px !important;
    min-width: 122px !important;
    height: 34px !important;
    flex-basis: 122px !important;
  }

  .public-unified-header .cometai-brand-wordmark__text,
  .solutions-home-header.public-unified-header .cometai-brand-wordmark__text {
    font-size: 22px !important;
  }

  .public-unified-header .cometai-brand-wordmark__art,
  .solutions-home-header.public-unified-header .cometai-brand-wordmark__art {
    left: -5px !important;
    top: 3px !important;
    width: 142px !important;
    min-width: 142px !important;
    height: 38px !important;
    max-width: none !important;
    transform: none !important;
  }

  .public-unified-header .cometai-brand-wordmark__particles,
  .public-unified-header .cometai-brand-wordmark__wave,
  .solutions-home-header.public-unified-header .cometai-brand-wordmark__particles,
  .solutions-home-header.public-unified-header .cometai-brand-wordmark__wave {
    display: inline !important;
  }

  nav.public-unified-header,
  .solutions-home-header.public-unified-header .solutions-header-inner {
    grid-template-columns: 122px minmax(104px, 1fr) auto auto !important;
  }
}
