/* ==========================================================================
   Infrito Insights - Header
   88px white bar: a prominent logo + "Insights", navigation, search and the
   "Book a demo" button. At 900px and below the navigation becomes a toggled
   panel (the concept simply hid it, leaving mobile visitors without a menu).
   The logo is sized by HEIGHT, so an uploaded logo of any shape scales well.
   ========================================================================== */

/* ---- Brand (shared by header and footer) ---- */
.inf-brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 18px;
  color: var(--inf-ink);
  text-decoration: none;
}

.inf-brand__logo {
  display: block;
  width: auto;
  height: 46px;
  max-width: 240px;
  object-fit: contain;
}

.inf-brand__label {
  padding-left: 18px;
  border-left: 1px solid var(--inf-line-divider);
  font-family: var(--inf-font-display);
  font-size: 1.0625rem;
  font-weight: var(--inf-weight-bold);
  line-height: 1.7;
  letter-spacing: var(--inf-tracking-brand);
  white-space: nowrap;
}

/* ---- Bar ---- */
.inf-header {
  position: relative;
  z-index: var(--inf-z-header);
  background: var(--inf-surface);
  border-bottom: 1px solid var(--inf-line);
}

.inf-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: var(--inf-header-height);
}

/* ---- Navigation ---- */
.inf-nav {
  margin-left: auto;
  padding-right: 8px;
}

.inf-nav__list {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.inf-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-block: 8px;
  color: var(--inf-ink-soft);
  font-size: var(--inf-text-md);
  font-weight: var(--inf-weight-medium);
  white-space: nowrap;
  text-decoration: none;
}

/* Orange underline that slides in on hover and marks the current page. */
.inf-nav__link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 1px;
  background: var(--inf-orange);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--inf-duration) var(--inf-ease);
}

.inf-nav__link:hover,
.inf-nav__link.is-current {
  color: var(--inf-orange-strong);
}

.inf-nav__link:hover::after,
.inf-nav__link.is-current::after {
  transform: scaleX(1);
}

.inf-nav__link .inf-icon--new-tab {
  width: 12px;
  height: 12px;
}

/* ---- Actions ---- */
.inf-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inf-header__actions .inf-icon-btn {
  width: 46px;
  height: 46px;
}

.inf-header__actions .inf-icon-btn .inf-icon {
  width: 18px;
  height: 18px;
}

.inf-header__cta-slot {
  display: contents;
}

.inf-header__cta {
  gap: 10px;
  min-height: 46px;
  padding: 13px 20px;
  font-size: var(--inf-text-md);
}

.inf-menu-toggle {
  display: none;
}

.inf-menu-toggle__close,
.inf-menu-toggle[aria-expanded="true"] .inf-menu-toggle__open {
  display: none;
}

.inf-menu-toggle[aria-expanded="true"] .inf-menu-toggle__close {
  display: block;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1000px) {
  .inf-header__inner {
    gap: 20px;
  }

  .inf-brand {
    gap: 14px;
  }

  .inf-brand__logo {
    height: 42px;
  }

  .inf-brand__label {
    padding-left: 14px;
    font-size: 1rem;
  }

  .inf-nav__list {
    gap: 20px;
  }

  .inf-header__actions {
    gap: 10px;
  }

  .inf-header__actions .inf-icon-btn {
    width: 44px;
    height: 44px;
  }

  .inf-header__cta {
    min-height: 44px;
    padding: 12px 16px;
  }
}

/* Menu toggle + navigation panel. */
@media (max-width: 900px) {
  .inf-brand__logo {
    height: 40px;
  }

  .inf-menu-toggle {
    display: inline-grid;
  }

  /* The panel: hidden (and so not focusable) until the toggle opens it. */
  .inf-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    margin: 0;
    padding: 6px 0 12px;
    background: var(--inf-surface);
    border-bottom: 1px solid var(--inf-line);
    box-shadow: var(--inf-shadow-md);
  }

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

  .inf-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-width: var(--inf-shell-max);
    margin-inline: auto;
    padding-inline: var(--inf-gutter);
  }

  .inf-nav__item + .inf-nav__item {
    border-top: 1px solid var(--inf-line);
  }

  .inf-nav__link {
    display: flex;
    min-height: var(--inf-tap-min);
    padding-block: 12px;
    font-size: var(--inf-text-base);
  }

  .inf-nav__link::after {
    display: none;
  }

  .inf-header__actions {
    margin-left: auto;
  }
}

@media (max-width: 540px) {
  .inf-header__inner {
    gap: 8px;
  }

  .inf-brand {
    gap: 8px;
  }

  .inf-brand__logo {
    height: 30px;
    max-width: 150px;
  }

  .inf-brand__label {
    padding-left: 8px;
    font-size: var(--inf-text-xs);
  }

  .inf-header__actions {
    gap: 6px;
  }

  .inf-header__actions .inf-icon-btn {
    width: 38px;
    height: 38px;
  }

  .inf-header__actions .inf-icon-btn .inf-icon {
    width: 16px;
    height: 16px;
  }

  .inf-header__cta {
    gap: 4px;
    min-height: 38px;
    padding: 6px 9px;
    font-size: var(--inf-text-2xs);
  }

  .inf-header__cta .inf-btn__icon {
    display: none;
  }
}

@media (max-width: 400px) {
  .inf-brand__logo {
    height: 28px;
  }

  .inf-brand__label {
    font-size: var(--inf-text-2xs);
  }
}

/* Small phones (iPhone SE / mini, 360px Androids). */
@media (max-width: 380px) {
  .inf-header__inner {
    gap: 6px;
  }

  .inf-brand {
    gap: 5px;
  }

  .inf-brand__logo {
    height: 26px;
  }

  .inf-brand__label {
    padding-left: 5px;
  }

  .inf-header__actions {
    gap: 4px;
  }

  .inf-header__actions .inf-icon-btn {
    width: 36px;
    height: 36px;
  }

  .inf-header__cta {
    min-height: 36px;
    padding-inline: 6px;
  }
}

/* Very narrow screens: the logo alone, without the "Insights" label. */
@media (max-width: 340px) {
  .inf-brand__label {
    display: none;
  }
}
