/*
 * Terra Buildr global brand lockup.
 * Load after page-specific styles so every template presents one consistent
 * two-line company mark.
 */

.brand {
  display: grid !important;
  grid-template-columns: minmax(0, max-content);
  align-content: center;
  align-items: start;
  gap: 4px;
  min-width: 0;
  min-height: 40px;
  flex: 0 0 auto;
  font-size: inherit;
  line-height: 1;
  text-decoration: none;
}

.brand span,
.brand small {
  display: block !important;
  max-width: 100%;
}

.brand span {
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -.02em;
  line-height: .95;
  white-space: nowrap;
}

.brand small {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .105em;
  line-height: 1.15;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .brand {
    gap: 3px;
    min-height: 38px;
  }

  .brand span {
    font-size: 18px;
  }

  .brand small {
    font-size: 8px;
    letter-spacing: .075em;
  }
}

@media (max-width: 1100px) {
  .site {
    position: sticky;
  }

  .menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .site > .primary {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 120;
    display: none !important;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 16px 20px 18px;
    background: #fff;
    border-bottom: 1px solid rgba(28, 44, 60, .12);
    box-shadow: 0 18px 36px rgba(18, 24, 30, .12);
  }

  .site > .primary.active {
    display: flex !important;
  }

  .site > .primary a {
    width: 100%;
    min-height: 42px;
    margin-left: 0;
  }

  .site > .primary .nav-cta {
    width: fit-content;
  }
}

@media (max-width: 390px) {
  .brand small {
    font-size: 7.5px;
    letter-spacing: .055em;
  }
}
