/* ==========================================================================
   HEADER — pixel-matched to cubig.ai Framer (reference)framer.css
   Base: 1920px breakpoint. 1440px override via @media.
   ========================================================================== */

/* ── Fixed wrapper ── */
.site-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  z-index: 200;
  background-color: rgb(255, 255, 255);
}

/* ── Nav element ── */
.site-header__nav {
  width: 100%;
  display: flex;
  flex-flow: row;
  place-content: center;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgb(230, 231, 233);
  background-color: rgb(255, 255, 255);
  position: relative;
}

/* When mega menu is open, remove bottom border */
.site-header__nav.mega-open {
  border-bottom-width: 0;
}

/* ── Menu Wrapper ── */
.site-header__menu-wrapper {
  flex: 1 0 0;
  width: 1px;
  height: min-content;
  display: flex;
  flex-flow: column;
  place-content: center;
  align-items: center;
  gap: 0;
  padding: 0;
  position: relative;
  overflow: visible;
  background-color: rgba(0, 0, 0, 0);
}

/* ── Nav Group ── */
.site-header__nav-group {
  flex: none;
  width: 100%;
  height: min-content;
  display: flex;
  flex-flow: column;
  place-content: center;
  align-items: center;
  gap: 0;
  padding: 0;
  position: relative;
  overflow: visible;
}

/* ── Nav Top (the visible top bar) ── */
.site-header__nav-top {
  z-index: 1;
  flex: none;
  width: 100%;
  height: min-content;
  display: flex;
  flex-flow: row;
  place-content: center;
  align-items: center;
  gap: 10px;
  padding: 20px 24px;
  position: relative;
  overflow: visible;
  background-color: rgb(255, 255, 255);
  border-bottom: 1px solid rgb(230, 231, 233);
}

/* When mega open, nav-top border removed, width forced */
.site-header__nav.mega-open .site-header__nav-top {
  border-bottom: 0;
  width: 1920px;
}

/* ── Nav Menu: max-width row ── */
.site-header__nav-menu {
  flex: 1 0 0;
  width: 1px;
  max-width: 1168px;
  height: min-content;
  display: flex;
  flex-flow: row;
  place-content: center space-between;
  align-items: center;
  padding: 0;
  position: relative;
  overflow: visible;
}

/* ── Left block: logo ── */
.site-header__left-block {
  flex: none;
  display: flex;
  align-items: center;
}

/* ── Center block: nav links ── */
.site-header__center-block {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

/* ── Logo ── */
.site-header__logo {
  display: block;
  text-decoration: none;
}

.site-header__logo-img {
  width: 165px;
  height: 28px;
  display: block;
}

/* ── Nav Links container ── */
.nav-links {
  display: flex;
  flex-flow: row;
  place-content: center;
  align-items: center;
  gap: 34px;
}

.nav-links__items {
  display: flex;
  flex-flow: row;
  align-items: center;
  gap: 16px;
}

.nav-links__dropdown {
  position: relative;
}

/* ── Nav Link Trigger ── */
.nav-links__trigger {
  display: flex;
  flex-flow: row;
  place-content: center;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  width: min-content;
  height: min-content;
  background: rgb(255, 255, 255);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-family: 'DM Sans', 'DM Sans Placeholder', sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.5px;
  line-height: 26px;
  color: rgb(23, 23, 25);
  white-space: nowrap;
  position: relative;
  transition: background 0.2s ease;
}

.nav-links__trigger:hover {
  background: var(--c-bg-light);
}

/* ── Chevron icon ── */
.nav-links__chevron {
  flex: none;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.2s ease;
}

.nav-links__chevron svg {
  width: 100%;
  height: 100%;
}

.nav-links__dropdown:hover .nav-links__chevron,
.nav-links__dropdown.is-open .nav-links__chevron {
  transform: rotate(180deg);
}

/* ── Simple Dropdown Panel (Company, Resources) ── */
.nav-links__panel {
  display: none;
  position: absolute;
  top: 100%;
  left: -8px;
  min-width: 200px;
  background: rgb(255, 255, 255);
  border: 1px solid rgb(230, 231, 233);
  border-radius: 12px;
  padding: 8px;
  padding-top: 12px;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.06),
    0 1px 3px rgba(0, 0, 0, 0.04);
  z-index: 100;
}

/* Invisible bridge to prevent hover gap */
.nav-links__dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 8px;
  display: none;
}

.nav-links__dropdown:hover::after {
  display: block;
}

.nav-links__dropdown:hover .nav-links__panel,
.nav-links__dropdown:focus-within .nav-links__panel {
  display: flex;
  flex-direction: column;
}

.nav-links__panel:not(.nav-links__mega) a {
  display: block;
  padding: 10px 14px;
  font-family: 'DM Sans', 'DM Sans Placeholder', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: rgb(23, 23, 25);
  border-radius: 8px;
  transition: background 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.nav-links__panel:not(.nav-links__mega) a:hover {
  background: var(--c-bg-light);
}

/* ── Right block: language + buttons ── */
.site-header__right-block {
  flex: none;
  display: flex;
  flex-flow: row;
  place-content: center flex-start;
  align-items: center;
  gap: 8px;
}

/* ── Language Selector ── */
.nav-lang {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 16px 10px 14px;
  background-color: rgb(255, 255, 255);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  align-self: stretch;
  font-family: Inter, 'Inter Placeholder', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5em;
  color: rgb(0, 0, 0);
}

.nav-lang__globe {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.nav-lang__select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 14px;
}

.nav-lang__caret {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ── Contact Button ── */
.btn--contact {
  display: inline-flex;
  place-content: center;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-family: 'DM Sans', 'DM Sans Placeholder', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.1px;
  line-height: 24px;
  color: rgb(15, 15, 16);
  background-color: rgb(255, 255, 255);
  border: 1px solid rgb(230, 231, 233);
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn--contact:hover {
  background-color: var(--c-bg-light);
}

/* ── Try SynTitan Button ── */
.btn--dark {
  display: inline-flex;
  place-content: center;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-family: 'DM Sans', 'DM Sans Placeholder', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.1px;
  line-height: 20px;
  color: rgb(255, 255, 255);
  background-color: rgb(48, 49, 53);
  border: 1px solid rgb(123, 126, 133);
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn--dark:hover {
  background-color: rgb(35, 36, 40);
}

.btn--dark__arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ==========================================================================
   MEGA MENU (Product dropdown)
   Framer: nav-mega → nav-bottom_item (gap:40px, max:1168px) → Links + Content
   ========================================================================== */

.nav-mega {
  display: none;
  flex-flow: row;
  flex: none;
  place-content: center;
  align-items: center;
  gap: 0;
  width: 100%;
  height: min-content;
  padding: 0 0 40px;
  position: relative;
  overflow: visible;
  z-index: 2;
  background-color: rgb(255, 255, 255);
}

.nav-mega.is-open {
  display: flex;
}

/* ── nav-bottom_item ── */
.nav-mega__inner {
  flex: 1 0 0;
  width: 1px;
  max-width: 1168px;
  height: min-content;
  display: flex;
  flex-flow: row;
  place-content: flex-start;
  align-items: flex-start;
  gap: 40px;
  padding: 0;
  position: relative;
  overflow: visible;
}

/* ── Link Wrapper (left) ── */
.nav-mega__link-wrapper {
  flex: none;
  display: flex;
  flex-flow: row;
  place-content: center flex-start;
  align-items: center;
  gap: 34px;
}

/* ── Links column ── */
.nav-mega__links {
  display: flex;
  flex-flow: column;
  place-content: flex-start center;
  align-items: flex-start;
  gap: 4px;
  width: 320px;
  height: min-content;
  padding: 8px 0;
  position: relative;
  overflow: visible;
}

/* ── Individual link item ── */
.nav-mega__link {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgb(255, 255, 255);
  text-decoration: none;
  transition: background 0.2s ease;
}

.nav-mega__link:hover,
.nav-mega__link.is-active {
  background: var(--c-bg-light);
}

.nav-mega__title {
  font-family: 'DM Sans', 'DM Sans Placeholder', sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.5px;
  line-height: 26px;
  color: rgb(23, 23, 25);
}

.nav-mega__desc {
  font-family: 'DM Sans', 'DM Sans Placeholder', sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.5px;
  line-height: 24px;
  color: rgb(123, 126, 133);
}

/* ── Content column (right): card area ── */
.nav-mega__content {
  flex: 1 0 0;
  width: 1px;
  height: auto;
  align-self: stretch;
  display: flex;
  flex-flow: column;
  place-content: flex-start;
  align-items: flex-start;
  gap: 32px;
  padding: 0;
  position: relative;
  overflow: visible;
  border-radius: 80px;
}

/* ── Card Group: one per product ── */
.nav-mega__card-group {
  display: none;
  flex-flow: column;
  place-content: center flex-start;
  align-items: center;
  gap: 32px;
  width: 100%;
  height: 432px;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.nav-mega__card-group.is-active {
  display: flex;
}

/* ── Card (inside card-group) ── */
.nav-mega__card {
  will-change: transform;
  flex: 1 0 0;
  width: 100%;
  height: 1px;
  display: flex;
  flex-flow: column;
  place-content: center;
  align-items: center;
  gap: 8px;
  padding: 64px 80px 0;
  position: relative;
  overflow: hidden;
  border-radius: 40px;
}

/* ── Full-bleed background image ── */
.nav-mega__card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

/* ── Sticky Section ── */
.nav-mega__card-sticky {
  flex: none;
  width: 100%;
  height: min-content;
  display: flex;
  flex-flow: column;
  place-content: center flex-start;
  align-items: center;
  gap: 8px;
  padding: 10px 0 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.nav-mega__card-texts {
  flex: none;
  width: 100%;
  height: min-content;
  display: flex;
  flex-flow: column;
  place-content: center;
  align-items: center;
  gap: 8px;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.nav-mega__card-text {
  white-space: pre-wrap;
  word-break: break-word;
  width: 100%;
  max-width: 560px;
  font-family: 'DM Sans', 'DM Sans Placeholder', sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.5px;
  line-height: 24px;
  color: rgb(23, 23, 25);
  text-align: center;
}

/* ── Product Logo ── */
.nav-mega__card-logo {
  width: 84px;
  height: 20px;
  object-fit: cover;
  flex: none;
  position: relative;
}

.nav-mega__card-logo--wide {
  width: 120px;
  height: auto;
  max-height: 32px;
}

/* ── Product Name (fallback for cards without logo image) ── */
.nav-mega__card-product {
  font-family: 'DM Sans', 'DM Sans Placeholder', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: rgb(23, 23, 25);
}

/* ── Screenshot area ── */
.nav-mega__card-screenshot {
  flex: none;
  width: 560px;
  max-width: 100%;
  height: 320px;
  display: flex;
  flex-flow: column;
  place-content: center;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.nav-mega__card-screenshot img {
  flex: 1 0 0;
  width: 100%;
  max-width: 640px;
  height: 1px;
  object-fit: contain;
  position: relative;
}

/* ── BG Blur overlay ── */
.nav-mega__bg-blur {
  display: none;
  height: 80vh;
  z-index: -1;
  width: 100%;
  position: absolute;
  bottom: -640px;
  left: 0;
  overflow: hidden;
  backdrop-filter: blur(5px);
  background-color: rgba(0, 0, 0, 0.01);
}

.nav-mega.is-open ~ .nav-mega__bg-blur {
  display: flex;
}

/* ==========================================================================
   MOBILE
   ========================================================================== */

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  cursor: pointer;
  border: none;
  background: none;
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  background: rgb(23, 23, 25);
  border-radius: 2px;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

/* ── Mobile drawer (hidden on desktop) ── */
.nav-mobile {
  display: none;
}

@media (max-width: 768px) {
  .site-header__nav-top {
    padding: 14px 20px;
  }

  .nav-links {
    display: none;
  }

  /* Keep language switcher visible on mobile, hide top-bar buttons */
  .site-header__right-block {
    display: flex;
    gap: 8px;
    padding-right: 48px; /* space for hamburger */
  }

  .btn--contact,
  .btn--dark {
    display: none;
  }

  .nav-lang {
    padding: 8px 12px 8px 10px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-mega,
  .nav-mega__bg-blur {
    display: none !important;
  }

  /* Full-screen mobile drawer — header stays on top (z-index 200) */
  .nav-mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    background: rgb(255, 255, 255);
    z-index: 100;
    overflow-y: auto;
    padding: 72px 24px 32px;
    display: none;
  }

  .nav-mobile.is-open {
    display: block;
  }

  body.nav-open {
    overflow: hidden;
  }

  .nav-mobile__inner {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 520px;
    margin: 0 auto;
  }

  .nav-mobile__group {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .nav-mobile__group-label {
    font-family: 'DM Sans', 'DM Sans Placeholder', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: rgb(123, 126, 133);
    margin-bottom: 8px;
  }

  .nav-mobile__link {
    display: block;
    padding: 10px 0;
    font-family: 'DM Sans', 'DM Sans Placeholder', sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 28px;
    letter-spacing: -0.3px;
    color: rgb(23, 23, 25);
    text-decoration: none;
  }

  .nav-mobile__link:active {
    opacity: 0.6;
  }

  .nav-mobile__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
  }

  .nav-mobile__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    border-radius: 100px;
    font-family: 'DM Sans', 'DM Sans Placeholder', sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.1px;
    line-height: 20px;
    text-decoration: none;
    transition: background 0.2s ease;
  }

  .nav-mobile__btn--outline {
    background: rgb(255, 255, 255);
    color: rgb(15, 15, 16);
    border: 1px solid rgb(230, 231, 233);
  }

  .nav-mobile__btn--outline:active {
    background: var(--c-bg-light);
  }

  .nav-mobile__btn--dark {
    background: rgb(48, 49, 53);
    color: rgb(255, 255, 255);
    border: 1px solid rgb(48, 49, 53);
  }

  .nav-mobile__btn--dark:active {
    background: rgb(28, 29, 33);
  }

  .nav-mobile__btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  .nav-toggle[aria-expanded='true'] .nav-toggle__bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle[aria-expanded='true'] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle[aria-expanded='true'] .nav-toggle__bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .site-header__logo-img {
    width: 106px;
    height: 18px;
  }
}

/* ── 1440px: logo smaller ── */
@media (max-width: 1440px) {
  .site-header__logo-img {
    width: 142px;
    height: 24px;
  }
}

/* ── Header spacing for fixed header ── */
body:not(.home) main {
  padding-top: 72px;
}

@media (max-width: 768px) {
  body:not(.home) main {
    padding-top: 54px;
  }
}
