/* Pixels for Bricks navigation
   All component selectors and custom properties are isolated with the pfb-nav prefix. */

@font-face {
  font-family: "PFB Tektur";
  src: url("../assets/fonts/Tektur-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "PFB Tektur";
  src: url("../assets/fonts/Tektur-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "PFB Space Grotesk";
  src: url("../assets/fonts/SpaceGrotesk-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "PFB Space Grotesk";
  src: url("../assets/fonts/SpaceGrotesk-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

.pfb-nav,
.pfb-nav__panel,
.pfb-nav__overlay {
  --pfb-nav-deep-night: #111827;
  --pfb-nav-pixel-purple: #7c3aed;
  --pfb-nav-electric-blue: #2563eb;
  --pfb-nav-mint-pixel: #34d399;
  --pfb-nav-brick-orange: #e76f51;
  --pfb-nav-soft-sand: #f5f1e8;
  --pfb-nav-pixel-white: #fafafa;
  --pfb-nav-border-grey: #e5e7eb;

  --pfb-nav-header-height-desktop: 96px;
  --pfb-nav-header-height-tablet: 88px;
  --pfb-nav-header-height-large-mobile: 80px;
  --pfb-nav-header-height-small-mobile: 72px;
  --pfb-nav-sticky-height-desktop: 72px;
  --pfb-nav-sticky-height-tablet: 68px;
  --pfb-nav-sticky-height-large-mobile: 64px;
  --pfb-nav-sticky-height-small-mobile: 60px;

  --pfb-nav-header-height-current: var(--pfb-nav-header-height-small-mobile);
  --pfb-nav-sticky-height-current: var(--pfb-nav-sticky-height-small-mobile);
  --pfb-nav-inline-padding: 14px;
}

.pfb-nav,
.pfb-nav *,
.pfb-nav *::before,
.pfb-nav *::after,
.pfb-nav__panel,
.pfb-nav__panel *,
.pfb-nav__panel *::before,
.pfb-nav__panel *::after,
.pfb-nav__overlay {
  box-sizing: border-box;
}

.pfb-nav {
  --pfb-nav-bar-min-height: var(--pfb-nav-header-height-current);
  --pfb-nav-logo-max-height: 40px;
  --pfb-nav-bar-gap: 10px;
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: var(--pfb-nav-bar-min-height);
  overflow: visible;
  color: var(--pfb-nav-deep-night);
  background: transparent;
  font-family: "PFB Space Grotesk", "Segoe UI", Arial, sans-serif;
  line-height: 1.35;
}

.pfb-nav[data-mode="sticky"] {
  --pfb-nav-bar-min-height: var(--pfb-nav-sticky-height-current);
  --pfb-nav-logo-max-height: 34px;
  border-bottom: 1px solid var(--pfb-nav-border-grey);
}

.pfb-nav__inner {
  display: flex;
  align-items: center;
  gap: var(--pfb-nav-bar-gap);
  width: 100%;
  max-width: 1150px;
  height: 100%;
  min-height: var(--pfb-nav-bar-min-height);
  margin-inline: auto;
  padding-inline: var(--pfb-nav-inline-padding);
}

.pfb-nav__logo-link {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  min-width: 0;
  max-width: 168px;
  color: var(--pfb-nav-deep-night);
  text-decoration: none;
}

.pfb-nav__logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: var(--pfb-nav-logo-max-height);
  object-fit: contain;
}

.pfb-nav__desktop {
  display: none;
  min-width: 0;
  margin-inline-start: auto;
}

.pfb-nav__list,
.pfb-nav__panel-list {
  padding: 0;
  list-style: none;
}

.pfb-nav__list {
  display: flex;
  align-items: center;
  gap: 17px;
  margin: 0;
  white-space: nowrap;
}

.pfb-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 3px 0;
  color: var(--pfb-nav-deep-night);
  font-family: "PFB Tektur", "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: color 150ms ease;
}

.pfb-nav__link:hover {
  color: var(--pfb-nav-pixel-purple);
}

.pfb-nav__link[aria-current="page"] {
  color: var(--pfb-nav-electric-blue);
}

.pfb-nav__link[aria-current="page"]::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  width: 18px;
  height: 3px;
  margin-inline: auto;
  background: var(--pfb-nav-electric-blue);
  content: "";
}

.pfb-nav__cta {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--pfb-nav-electric-blue);
  border-radius: 8px;
  color: var(--pfb-nav-pixel-white);
  background: var(--pfb-nav-electric-blue);
  font-family: "PFB Tektur", "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.pfb-nav__cta:hover {
  border-color: var(--pfb-nav-pixel-purple);
  background: var(--pfb-nav-pixel-purple);
}

.pfb-nav__bar-cta {
  display: none;
  margin-inline-start: auto;
}

.pfb-nav__toggle,
.pfb-nav__close {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--pfb-nav-border-grey);
  border-radius: 8px;
  color: var(--pfb-nav-deep-night);
  background: var(--pfb-nav-pixel-white);
  cursor: pointer;
  appearance: none;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.pfb-nav__toggle {
  margin-inline-start: auto;
}

.pfb-nav__toggle:hover,
.pfb-nav__close:hover {
  border-color: var(--pfb-nav-pixel-purple);
  color: var(--pfb-nav-pixel-purple);
  background: var(--pfb-nav-soft-sand);
}

.pfb-nav__hamburger {
  position: relative;
  display: block;
  width: 20px;
  height: 14px;
}

.pfb-nav__hamburger::before,
.pfb-nav__hamburger::after,
.pfb-nav__hamburger-line {
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
  content: "";
  transition: transform 150ms ease, opacity 150ms ease, top 150ms ease;
}

.pfb-nav__hamburger::before {
  top: 0;
}

.pfb-nav__hamburger-line {
  top: 6px;
}

.pfb-nav__hamburger::after {
  top: 12px;
}

.pfb-nav__toggle[aria-expanded="true"] .pfb-nav__hamburger::before {
  top: 6px;
  transform: rotate(45deg);
}

.pfb-nav__toggle[aria-expanded="true"] .pfb-nav__hamburger-line {
  opacity: 0;
}

.pfb-nav__toggle[aria-expanded="true"] .pfb-nav__hamburger::after {
  top: 6px;
  transform: rotate(-45deg);
}

.pfb-nav__logo-link:focus-visible,
.pfb-nav__link:focus-visible,
.pfb-nav__cta:focus-visible,
.pfb-nav__toggle:focus-visible,
.pfb-nav__close:focus-visible,
.pfb-nav__panel-link:focus-visible {
  outline: 3px solid var(--pfb-nav-mint-pixel);
  outline-offset: 3px;
}

.pfb-nav__overlay {
  --pfb-nav-panel-top: var(--pfb-nav-header-height-current);
  position: fixed;
  z-index: 2147483000;
  inset: var(--pfb-nav-panel-top) 0 0;
  visibility: hidden;
  background: rgb(17 24 39 / 42%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.pfb-nav__panel {
  --pfb-nav-panel-top: var(--pfb-nav-header-height-current);
  position: fixed;
  z-index: 2147483001;
  top: var(--pfb-nav-panel-top);
  right: 0;
  left: 0;
  visibility: hidden;
  max-height: calc(100vh - var(--pfb-nav-panel-top));
  max-height: calc(100dvh - var(--pfb-nav-panel-top));
  overflow: auto;
  border-bottom: 1px solid var(--pfb-nav-border-grey);
  color: var(--pfb-nav-deep-night);
  background: var(--pfb-nav-pixel-white);
  box-shadow: 0 8px 20px rgb(17 24 39 / 10%);
  font-family: "PFB Space Grotesk", "Segoe UI", Arial, sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.pfb-nav__overlay[data-mode="sticky"],
.pfb-nav__panel[data-mode="sticky"] {
  --pfb-nav-panel-top: var(--pfb-nav-sticky-height-current);
}

.pfb-nav__overlay.pfb-nav__overlay--open,
.pfb-nav__panel.pfb-nav__panel--open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.pfb-nav__panel.pfb-nav__panel--open {
  transform: translateY(0);
}

.pfb-nav__panel-inner {
  width: 100%;
  max-width: 1150px;
  margin-inline: auto;
  padding: 16px var(--pfb-nav-inline-padding) 22px;
}

.pfb-nav__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--pfb-nav-border-grey);
}

.pfb-nav__panel-title {
  margin: 0;
  color: var(--pfb-nav-deep-night);
  font-family: "PFB Tektur", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
}

.pfb-nav__close-icon {
  position: relative;
  width: 18px;
  height: 18px;
}

.pfb-nav__close-icon::before,
.pfb-nav__close-icon::after {
  position: absolute;
  top: 8px;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  content: "";
}

.pfb-nav__close-icon::before {
  transform: rotate(45deg);
}

.pfb-nav__close-icon::after {
  transform: rotate(-45deg);
}

.pfb-nav__panel-list {
  display: grid;
  gap: 2px;
  margin: 12px 0 18px;
}

.pfb-nav__panel-link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  border-left: 3px solid transparent;
  color: var(--pfb-nav-deep-night);
  font-family: "PFB Tektur", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.pfb-nav__panel-link:hover {
  color: var(--pfb-nav-pixel-purple);
  background: var(--pfb-nav-soft-sand);
}

.pfb-nav__panel-link[aria-current="page"] {
  border-left-color: var(--pfb-nav-electric-blue);
  color: var(--pfb-nav-electric-blue);
  background: #eff6ff;
}

.pfb-nav__panel-cta {
  width: 100%;
  min-height: 48px;
}

body.pfb-nav-scroll-lock {
  overflow: hidden !important;
}

/* Progressive fallback: before JavaScript initializes, the links remain visible
   below the compact bar instead of becoming inaccessible. */
@media (max-width: 1149px) {
  .pfb-nav:not(.pfb-nav--ready) .pfb-nav__overlay {
    display: none;
  }

  .pfb-nav:not(.pfb-nav--ready) .pfb-nav__panel {
    position: static;
    visibility: visible;
    max-height: none;
    border-top: 1px solid var(--pfb-nav-border-grey);
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .pfb-nav:not(.pfb-nav--ready) .pfb-nav__panel-head {
    display: none;
  }
}

@media (min-width: 480px) {
  .pfb-nav,
  .pfb-nav__panel,
  .pfb-nav__overlay {
    --pfb-nav-header-height-current: var(--pfb-nav-header-height-large-mobile);
    --pfb-nav-sticky-height-current: var(--pfb-nav-sticky-height-large-mobile);
    --pfb-nav-inline-padding: 16px;
  }

  .pfb-nav {
    --pfb-nav-logo-max-height: 46px;
  }

  .pfb-nav[data-mode="sticky"] {
    --pfb-nav-logo-max-height: 38px;
  }
}

@media (min-width: 720px) {
  .pfb-nav,
  .pfb-nav__panel,
  .pfb-nav__overlay {
    --pfb-nav-header-height-current: var(--pfb-nav-header-height-tablet);
    --pfb-nav-sticky-height-current: var(--pfb-nav-sticky-height-tablet);
    --pfb-nav-inline-padding: 20px;
  }

  .pfb-nav {
    --pfb-nav-logo-max-height: 52px;
    --pfb-nav-bar-gap: 12px;
  }

  .pfb-nav[data-mode="sticky"] {
    --pfb-nav-logo-max-height: 42px;
  }

  .pfb-nav__bar-cta {
    display: inline-flex;
    min-height: 44px;
    padding-inline: 14px;
  }

  .pfb-nav__bar-cta + .pfb-nav__toggle {
    margin-inline-start: 2px;
  }

  .pfb-nav__panel-inner {
    padding-top: 18px;
    padding-bottom: 24px;
  }

  .pfb-nav__panel-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
  }
}

@media (min-width: 1150px) {
  .pfb-nav,
  .pfb-nav__panel,
  .pfb-nav__overlay {
    --pfb-nav-header-height-current: var(--pfb-nav-header-height-desktop);
    --pfb-nav-sticky-height-current: var(--pfb-nav-sticky-height-desktop);
    --pfb-nav-inline-padding: 24px;
  }

  .pfb-nav {
    --pfb-nav-logo-max-height: 58px;
    --pfb-nav-bar-gap: 22px;
  }

  .pfb-nav[data-mode="sticky"] {
    --pfb-nav-logo-max-height: 44px;
  }

  .pfb-nav__desktop {
    display: block;
  }

  .pfb-nav__bar-cta {
    display: inline-flex;
    margin-inline-start: 0;
  }

  .pfb-nav__toggle,
  .pfb-nav__overlay,
  .pfb-nav__panel {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pfb-nav__link,
  .pfb-nav__cta,
  .pfb-nav__toggle,
  .pfb-nav__close,
  .pfb-nav__hamburger::before,
  .pfb-nav__hamburger::after,
  .pfb-nav__hamburger-line,
  .pfb-nav__overlay,
  .pfb-nav__panel,
  .pfb-nav__panel-link {
    scroll-behavior: auto;
    transition-duration: 0.01ms !important;
  }
}
