/* ── Header ── */
.header {
  position: relative;
  width: 100%;
  padding-top: 0.875em;    /* 14px */
  padding-bottom: 0.875em; /* 14px */
  z-index: 9999;
}

.header__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.375em; /* 54px */
  position: relative;
}

/* ── Logo ── */
.header__logo {
  display: block;
  position: relative;
  flex-shrink: 0;
  width: 10.75em;  /* 172px */
  height: 3.375em; /* 54px */
  z-index: 9999;
}

.header__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

/* ── Nav ── */
.header__nav {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 2.375em; /* 38px */
}

.header__nav-link {
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.header__nav-link:hover {
  opacity: 0.75;
}

/* ── CTA button ── */
.header__cta {
  flex-shrink: 0;
}

/* ── Burger button ── */
.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.3125em; /* 5px */
  width: 3.375em; /* 54px */
  height: 3.375em; /* 54px */
  background: none;
  border: 1px solid var(--white);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.header__burger-line {
  display: block;
  width: 1.25em; /* 20px */
  height: 0.125em; /* 2px */
  background: var(--white);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ── Responsive ≤1180px ── */
@media (max-width: 1180px) {
  .header__nav,
  .btn-ghost.header__cta {
    display: none;
  }

  .header__burger {
    display: flex;
    z-index: 9999;
  }

  /* Open state — fixed header bar above everything */
  .header--open {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
  }

  .header--open .header__nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    z-index: 999;
    background: var(--dark);
    padding: 2em var(--space-wrapper) 6em;
    gap: 1.5em;
    overflow-y: auto;
    padding-top: 8em;
  }

  .header--open .header__nav-link {
    font-size: 1.25em;
    color: var(--white);
  }

  .header--open .btn-ghost.header__cta {
    display: flex;
    position: fixed;
    bottom: 2.5em;
    left: var(--space-wrapper);
    z-index: 1001;
  }

  /* Burger → X */
  .header--open .header__burger-line:nth-child(1) {
    transform: translateY(0.4375em) rotate(45deg);
  }

  .header--open .header__burger-line:nth-child(2) {
    opacity: 0;
  }

  .header--open .header__burger-line:nth-child(3) {
    transform: translateY(-0.4375em) rotate(-45deg);
  }
}
